/games/hlserver-heroes/

'logo' rowspan='2'>cgit logo index : gsoc2013-evolution
Google Summer of Code 2013 - GNOME - Archive Integration workspace
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat
-rw-r--r--ChangeLog81
-rw-r--r--NEWS127
-rw-r--r--README4
-rw-r--r--addressbook/ChangeLog213
-rw-r--r--addressbook/backend/ebook/e-book.c2
-rw-r--r--addressbook/backend/ebook/evolution-gnomecard-importer.c8
-rw-r--r--addressbook/backend/pas/pas-backend-file.c16
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.c7
-rw-r--r--addressbook/contact-editor/e-contact-quick-add.c10
-rw-r--r--addressbook/gui/component/e-address-popup.c118
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c9
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c10
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c126
-rw-r--r--art/Makefile.am1
-rw-r--r--calendar/ChangeLog398
-rw-r--r--calendar/conduits/calendar/e-calendar-conduit-control-applet.desktop.in8
-rw-r--r--calendar/conduits/todo/e-todo-conduit-control-applet.desktop.in7
-rw-r--r--calendar/gui/Evolution-Composer.h353
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c231
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.h45
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.glade228
-rw-r--r--calendar/gui/calendar-model.c8
-rw-r--r--calendar/gui/dialogs/Makefile.am2
-rw-r--r--calendar/gui/dialogs/delete-comp.c2
-rw-r--r--calendar/gui/e-day-view-time-item.c1
-rw-r--r--calendar/gui/e-day-view.c311
-rw-r--r--calendar/gui/e-meeting-edit.c4
-rw-r--r--calendar/gui/e-week-view-main-item.c1
-rw-r--r--calendar/gui/e-week-view.c310
-rw-r--r--calendar/gui/event-editor.c56
-rw-r--r--calendar/gui/evolution-calendar-control.c201
-rw-r--r--calendar/gui/gnome-cal.c163
-rw-r--r--calendar/gui/goto.c3
-rw-r--r--calendar/gui/main.c1
-rw-r--r--camel/ChangeLog610
-rw-r--r--camel/camel-filter-driver.c3
-rw-r--r--camel/camel-folder-summary.c514
-rw-r--r--camel/camel-mime-part.c29
-rw-r--r--camel/camel-mime-utils.c42
-rw-r--r--camel/camel-movemail.c2
-rw-r--r--camel/camel-object.c6
-rw-r--r--camel/camel-operation.c7
-rw-r--r--camel/camel-provider.c11
-rw-r--r--camel/camel-remote-store.c3
-rw-r--r--camel/camel-search-private.c81
-rw-r--r--camel/camel-service.c164
-rw-r--r--camel/camel-uid-cache.c7
-rw-r--r--camel/camel-url.c3
-rw-r--r--camel/camel-vee-folder.c15
-rw-r--r--camel/providers/cache/Makefile.am1
-rw-r--r--camel/providers/imap/Makefile.am2
-rw-r--r--camel/providers/imap/camel-imap-folder.c16
-rw-r--r--camel/providers/imap/camel-imap-message-cache.c2
-rw-r--r--camel/providers/imap/camel-imap-store.c41
-rw-r--r--camel/providers/local/Makefile.am4
-rw-r--r--camel/providers/local/camel-mbox-summary.c22
-rw-r--r--camel/providers/nntp/Makefile.am1
-rw-r--r--camel/providers/pop3/Makefile.am4
-rw-r--r--camel/providers/pop3/camel-pop3-store.c7
-rw-r--r--camel/providers/sendmail/Makefile.am6
-rw-r--r--camel/providers/smtp/Makefile.am4
-rw-r--r--composer/ChangeLog64
-rw-r--r--composer/e-msg-composer-select-file.c3
-rw-r--r--configure.in86
-rw-r--r--doc/ChangeLog13
-rw-r--r--doc/devel/ChangeLog11
-rw-r--r--e-util/ChangeLog176
-rw-r--r--e-util/Makefile.am8
-rw-r--r--e-util/e-bit-array.c412
-rw-r--r--e-util/e-bit-array.h82
-rw-r--r--e-util/e-gui-utils.c1
-rw-r--r--e-util/e-i18n.h63
-rw-r--r--e-util/e-sorter.c142
-rw-r--r--e-util/e-sorter.h59
-rw-r--r--e-util/e-text-event-processor-emacs-like.c499
-rw-r--r--e-util/e-text-event-processor-emacs-like.h67
-rw-r--r--e-util/e-text-event-processor-types.h133
-rw-r--r--e-util/e-text-event-processor.c146
-rw-r--r--e-util/e-text-event-processor.h75
-rw-r--r--e-util/e-util.c1050
-rw-r--r--e-util/e-util.h205
-rw-r--r--e-util/e-xml-utils.c420
-rw-r--r--e-util/e-xml-utils.h99
-rw-r--r--executive-summary/ChangeLog32
-rw-r--r--filter/ChangeLog58
-rw-r--r--filter/filter-colour.c4
-rw-r--r--filter/filter-datespec.c20
-rw-r--r--filter/filter-driver.c778
-rw-r--r--filter/filter-element.h3
-rw-r--r--filter/filter-filter.c93
-rw-r--r--filter/filter-folder.c6
-rw-r--r--filter/filter-input.c9
-rw-r--r--filter/filter-message-search.c806
-rw-r--r--filter/filter-option.c10
-rw-r--r--filter/filter-part.c60
-rw-r--r--filter/filter-rule.c96
-rw-r--r--filter/filter-score.c5
-rw-r--r--filter/libfilter-i18n.h37
-rw-r--r--filter/rule-context.c6
-rw-r--r--filter/score-rule.c13
-rw-r--r--help/ChangeLog13
-rw-r--r--help/devel/ChangeLog11
-rw-r--r--libical/ChangeLog170
-rw-r--r--libical/src/Makefile.am9
-rw-r--r--libical/src/libical/Makefile.am152
-rw-r--r--libical/src/libical/icallangbind.h17
-rw-r--r--libical/src/libical/icalmime.c2
-rw-r--r--libical/src/libical/icalparameter.h.in57
-rw-r--r--libical/src/libical/icalproperty.h.in57
-rw-r--r--libical/src/libical/icalrecur.h57
-rw-r--r--libical/src/libical/icalvalue.h.in74
-rw-r--r--libical/src/libical/sspm.c4
-rw-r--r--libical/src/libicalss/Makefile.am30
-rw-r--r--libical/src/libicalss/icalcstp.h164
-rw-r--r--libical/src/libicalvcal/Makefile.am3
-rw-r--r--libical/src/test/recur.c18
-rw-r--r--libical/src/test/testclassify.c1
-rw-r--r--libical/src/test/testvcal.c10
-rw-r--r--libical/test-data/recur.txt36
-rw-r--r--mail/ChangeLog433
-rw-r--r--mail/component-factory.c73
-rw-r--r--mail/folder-browser-factory.c23
-rw-r--r--mail/folder-browser.c183
-rw-r--r--mail/folder-browser.h6
-rw-r--r--mail/importers/elm-importer.c6
-rw-r--r--mail/importers/evolution-mbox-importer.c14
-rw-r--r--mail/importers/evolution-outlook-importer.c12
-rw-r--r--mail/mail-account-editor.c11
-rw-r--r--mail/mail-account-gui.c4
-rw-r--r--mail/mail-callbacks.c156
-rw-r--r--mail/mail-config.c124
-rw-r--r--mail/mail-config.h19
-rw-r--r--mail/mail-crypto.c452
-rw-r--r--mail/mail-display.c265
-rw-r--r--mail/mail-format.c265
-rw-r--r--mail/mail-local.c8
-rw-r--r--mail/mail-ops.c52
-rw-r--r--mail/mail-send-recv.c22
-rw-r--r--mail/message-list.c274
-rw-r--r--mail/openpgp-utils.c1280
-rw-r--r--mail/session.c18
-rw-r--r--shell/ChangeLog137
-rw-r--r--shell/e-local-folder.c7
-rw-r--r--shell/e-setup.c12
-rw-r--r--shell/e-shell-folder-creation-dialog.c5
-rw-r--r--shell/e-shell-view.c63
-rw-r--r--shell/e-shortcuts.c4
-rw-r--r--shell/e-splash.c8
-rw-r--r--shell/e-storage-set-view.c21
-rw-r--r--shell/evolution-shell-component-client.c5
-rw-r--r--shell/evolution-shell-component.c9
-rw-r--r--shell/importer/evolution-importer-client.c15
-rw-r--r--shell/importer/importer.c97
-rw-r--r--shell/importer/intelligent.c29
-rw-r--r--shell/main.c14
-rw-r--r--ui/ChangeLog42
-rw-r--r--ui/evolution-addressbook.h25
-rw-r--r--ui/evolution-mail.xml105
-rw-r--r--ui/evolution-message-composer.h53
-rw-r--r--ui/evolution.xml14
-rw-r--r--widgets/ChangeLog14
-rw-r--r--widgets/meeting-time-sel/e-meeting-time-sel-item.c5
-rw-r--r--widgets/meeting-time-sel/e-meeting-time-sel.c7
-rw-r--r--widgets/menus/gal-define-views-dialog.c329
-rw-r--r--widgets/menus/gal-define-views-dialog.h75
-rw-r--r--widgets/menus/gal-define-views-model.c315
-rw-r--r--widgets/menus/gal-define-views-model.h50
-rw-r--r--widgets/menus/gal-define-views.glade311
-rw-r--r--widgets/menus/gal-view-collection.c578
-rw-r--r--widgets/menus/gal-view-collection.h95
-rw-r--r--widgets/menus/gal-view-etable.c199
-rw-r--r--widgets/menus/gal-view-etable.h44
-rw-r--r--widgets/menus/gal-view-factory-etable.c126
-rw-r--r--widgets/menus/gal-view-factory-etable.h39
-rw-r--r--widgets/menus/gal-view-factory.c112
-rw-r--r--widgets/menus/gal-view-factory.h56
-rw-r--r--widgets/menus/gal-view-menus.c6
-rw-r--r--widgets/menus/gal-view-new-dialog.c218
-rw-r--r--widgets/menus/gal-view-new-dialog.glade220
-rw-r--r--widgets/menus/gal-view-new-dialog.h76
-rw-r--r--widgets/menus/gal-view.c210
-rw-r--r--widgets/menus/gal-view.h74
-rw-r--r--widgets/misc/e-calendar.c5
-rw-r--r--widgets/misc/e-canvas-utils.c137
-rw-r--r--widgets/misc/e-canvas-utils.h36
-rw-r--r--widgets/misc/e-canvas-vbox.c350
-rw-r--r--widgets/misc/e-canvas-vbox.h88
-rw-r--r--widgets/misc/e-canvas.c760
-rw-r--r--widgets/misc/e-canvas.h129
-rw-r--r--widgets/misc/e-cell-date-edit.c15
-rw-r--r--widgets/misc/e-colors.c81
-rw-r--r--widgets/misc/e-colors.h21
-rw-r--r--widgets/misc/e-cursors.c136
-rw-r--r--widgets/misc/e-cursors.h45
-rw-r--r--widgets/misc/e-dateedit.c22
-rw-r--r--widgets/misc/e-gui-utils.c215
-rw-r--r--widgets/misc/e-gui-utils.h29
-rw-r--r--widgets/misc/e-popup-menu.c156
-rw-r--r--widgets/misc/e-popup-menu.h37
-rw-r--r--widgets/misc/e-printable.c207
-rw-r--r--widgets/misc/e-printable.h76
-rw-r--r--widgets/misc/e-reflow.c863
-rw-r--r--widgets/misc/e-reflow.h115
-rw-r--r--widgets/misc/e-selection-model-array.c466
-rw-r--r--widgets/misc/e-selection-model-array.h64
-rw-r--r--widgets/misc/e-selection-model-simple.c101
-rw-r--r--widgets/misc/e-selection-model-simple.h48
-rw-r--r--widgets/misc/e-selection-model.c592
-rw-r--r--widgets/misc/e-selection-model.h132
-rw-r--r--widgets/misc/e-unicode.c3002
-rw-r--r--widgets/misc/e-unicode.h86
-rw-r--r--widgets/misc/gal-categories.glade175
-rw-r--r--widgets/misc/pixmaps/.cvsignore2
-rw-r--r--widgets/misc/pixmaps/cursor_cross.xpm38
-rw-r--r--widgets/misc/pixmaps/cursor_hand_closed.xpm38
-rw-r--r--widgets/misc/pixmaps/cursor_hand_open.xpm38
-rw-r--r--widgets/misc/pixmaps/cursor_zoom_in.xpm37
-rw-r--r--widgets/misc/pixmaps/cursor_zoom_out.xpm37
-rw-r--r--widgets/misc/test-color.c47
-rw-r--r--widgets/table/.cvsignore13
-rw-r--r--widgets/table/add-col.xpm22
-rw-r--r--widgets/table/arrow-down.xpm21
-rw-r--r--widgets/table/arrow-up.xpm21
-rw-r--r--widgets/table/check-empty.xpm21
-rw-r--r--widgets/table/check-filled.xpm21
-rw-r--r--widgets/table/clip.pngbin192 -> 0 bytes
-rw-r--r--widgets/table/e-cell-checkbox.c53
-rw-r--r--widgets/table/e-cell-checkbox.h28
-rw-r--r--widgets/table/e-cell-combo.c619
-rw-r--r--widgets/table/e-cell-combo.h62
-rw-r--r--widgets/table/e-cell-date.c156
-rw-r--r--widgets/table/e-cell-date.h32
-rw-r--r--widgets/table/e-cell-float.c93
-rw-r--r--widgets/table/e-cell-float.h53
-rw-r--r--widgets/table/e-cell-number.c69
-rw-r--r--widgets/table/e-cell-number.h32
-rw-r--r--widgets/table/e-cell-pixbuf.c242
-rw-r--r--widgets/table/e-cell-pixbuf.h36
-rw-r--r--widgets/table/e-cell-popup.c504
-rw-r--r--widgets/table/e-cell-popup.h93
-rw-r--r--widgets/table/e-cell-size.c91
-rw-r--r--widgets/table/e-cell-size.h32
-rw-r--r--widgets/table/e-cell-spin-button.c663
-rw-r--r--widgets/table/e-cell-spin-button.h97
-rw-r--r--widgets/table/e-cell-string.c9
-rw-r--r--widgets/table/e-cell-text.c2431
-rw-r--r--widgets/table/e-cell-text.h81
-rw-r--r--widgets/table/e-cell-toggle.c342
-rw-r--r--widgets/table/e-cell-toggle.h39
-rw-r--r--widgets/table/e-cell-tree.c721
-rw-r--r--widgets/table/e-cell-tree.h52
-rw-r--r--widgets/table/e-cell.c354
-rw-r--r--widgets/table/e-cell.h113
-rw-r--r--widgets/table/e-table-click-to-add.c544
-rw-r--r--widgets/table/e-table-click-to-add.h55
-rw-r--r--widgets/table/e-table-col-dnd.h14
-rw-r--r--widgets/table/e-table-col.c207
-rw-r--r--widgets/table/e-table-col.h71
-rw-r--r--widgets/table/e-table-column-specification.c119
-rw-r--r--widgets/table/e-table-column-specification.h51
-rw-r--r--widgets/table/e-table-column.c293
-rw-r--r--widgets/table/e-table-config-field.c278
-rw-r--r--widgets/table/e-table-config-field.h47
-rw-r--r--widgets/table/e-table-config.c790
-rw-r--r--widgets/table/e-table-config.glade1870
-rw-r--r--widgets/table/e-table-config.h78
-rw-r--r--widgets/table/e-table-defines.h22
-rw-r--r--widgets/table/e-table-example-1.c286
-rw-r--r--widgets/table/e-table-example-2.c329
-rw-r--r--widgets/table/e-table-extras.c191
-rw-r--r--widgets/table/e-table-extras.h52
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c190
-rw-r--r--widgets/table/e-table-field-chooser-dialog.h75
-rw-r--r--widgets/table/e-table-field-chooser-item.c561
-rw-r--r--widgets/table/e-table-field-chooser-item.h50
-rw-r--r--widgets/table/e-table-field-chooser.c248
-rw-r--r--widgets/table/e-table-field-chooser.glade129
-rw-r--r--widgets/table/e-table-field-chooser.h80
-rw-r--r--widgets/table/e-table-group-container.c1393
-rw-r--r--widgets/table/e-table-group-container.h74
-rw-r--r--widgets/table/e-table-group-leaf.c486
-rw-r--r--widgets/table/e-table-group-leaf.h58
-rw-r--r--widgets/table/e-table-group.c656
-rw-r--r--widgets/table/e-table-group.glade206
-rw-r--r--widgets/table/e-table-group.h151
-rw-r--r--widgets/table/e-table-header-item.c1593
-rw-r--r--widgets/table/e-table-header-item.h83
-rw-r--r--widgets/table/e-table-header-utils.c451
-rw-r--r--widgets/table/e-table-header-utils.h65
-rw-r--r--widgets/table/e-table-header.c834
-rw-r--r--widgets/table/e-table-header.h94
-rw-r--r--widgets/table/e-table-item.c2768
-rw-r--r--widgets/table/e-table-item.h157
-rw-r--r--widgets/table/e-table-memory-callbacks.c254
-rw-r--r--widgets/table/e-table-memory-callbacks.h72
-rw-r--r--widgets/table/e-table-memory.c284
-rw-r--r--widgets/table/e-table-memory.h58
-rw-r--r--widgets/table/e-table-model.c541
-rw-r--r--widgets/table/e-table-model.h148
-rw-r--r--widgets/table/e-table-one.c236
-rw-r--r--widgets/table/e-table-one.h39
-rw-r--r--widgets/table/e-table-scrolled.c211
-rw-r--r--widgets/table/e-table-scrolled.h54
-rw-r--r--widgets/table/e-table-selection-model.c303
-rw-r--r--widgets/table/e-table-selection-model.h55
-rw-r--r--widgets/table/e-table-simple.c269
-rw-r--r--widgets/table/e-table-simple.h75
-rw-r--r--widgets/table/e-table-size-test.c287
-rw-r--r--widgets/table/e-table-sort-info.c452
-rw-r--r--widgets/table/e-table-sort-info.h83
-rw-r--r--widgets/table/e-table-sorted-variable.c210
-rw-r--r--widgets/table/e-table-sorted-variable.h46
-rw-r--r--widgets/table/e-table-sorted.c273
-rw-r--r--widgets/table/e-table-sorted.h46
-rw-r--r--widgets/table/e-table-sorter.c395
-rw-r--r--widgets/table/e-table-sorter.h49
-rw-r--r--widgets/table/e-table-sorting-utils.c328
-rw-r--r--widgets/table/e-table-sorting-utils.h61
-rw-r--r--widgets/table/e-table-specification.c374
-rw-r--r--widgets/table/e-table-specification.h65
-rw-r--r--widgets/table/e-table-state.c243
-rw-r--r--widgets/table/e-table-state.h54
-rw-r--r--widgets/table/e-table-subset-variable.c227
-rw-r--r--widgets/table/e-table-subset-variable.h63
-rw-r--r--widgets/table/e-table-subset.c390
-rw-r--r--widgets/table/e-table-subset.h62
-rw-r--r--widgets/table/e-table-tooltip.h22
-rw-r--r--widgets/table/e-table-tree.h23
-rw-r--r--widgets/table/e-table-utils.c111
-rw-r--r--widgets/table/e-table-utils.h22
-rw-r--r--widgets/table/e-table.c2281
-rw-r--r--widgets/table/e-table.diabin4514 -> 0 bytes
-rw-r--r--widgets/table/e-table.h291
-rw-r--r--widgets/table/e-tree-memory-callbacks.c262
-rw-r--r--widgets/table/e-tree-memory-callbacks.h97
-rw-r--r--widgets/table/e-tree-memory.c627
-rw-r--r--widgets/table/e-tree-memory.h78
-rw-r--r--widgets/table/e-tree-model.c876
-rw-r--r--widgets/table/e-tree-model.h184
-rw-r--r--widgets/table/e-tree-scrolled.c208
-rw-r--r--widgets/table/e-tree-scrolled.h54
-rw-r--r--widgets/table/e-tree-selection-model.c1242
-rw-r--r--widgets/table/e-tree-selection-model.h52
-rw-r--r--widgets/table/e-tree-simple.c200
-rw-r--r--widgets/table/e-tree-simple.h67
-rw-r--r--widgets/table/e-tree-sorted-variable.c458
-rw-r--r--widgets/table/e-tree-sorted-variable.h62
-rw-r--r--widgets/table/e-tree-sorted.c1280
-rw-r--r--widgets/table/e-tree-sorted.h58
-rw-r--r--widgets/table/e-tree-table-adapter.c1035
-rw-r--r--widgets/table/e-tree-table-adapter.h64
-rw-r--r--widgets/table/e-tree.c2330
-rw-r--r--widgets/table/e-tree.h264
-rw-r--r--widgets/table/image1.pngbin1858 -> 0 bytes
-rw-r--r--widgets/table/image2.pngbin1987 -> 0 bytes
-rw-r--r--widgets/table/image3.pngbin2051 -> 0 bytes
-rw-r--r--widgets/table/remove-col.xpm22
-rw-r--r--widgets/table/sample.table11
-rw-r--r--widgets/table/spec.xml21
-rw-r--r--widgets/table/table-test.c45
-rw-r--r--widgets/table/table-test.h4
-rw-r--r--widgets/table/test-check.c206
-rw-r--r--widgets/table/test-cols.c250
-rw-r--r--widgets/table/test-table.c394
-rw-r--r--widgets/table/tree-expanded.xpm23
-rw-r--r--widgets/table/tree-unexpanded.xpm23
-rw-r--r--widgets/text/.cvsignore10
-rw-r--r--widgets/text/e-completion-test.c197
-rw-r--r--widgets/text/e-completion-view.c695
-rw-r--r--widgets/text/e-completion-view.h103
-rw-r--r--widgets/text/e-completion.c478
-rw-r--r--widgets/text/e-completion.h93
-rw-r--r--widgets/text/e-entry-test.c79
-rw-r--r--widgets/text/e-entry.c1194
-rw-r--r--widgets/text/e-entry.h93
-rw-r--r--widgets/text/e-table-text-model.c226
-rw-r--r--widgets/text/e-table-text-model.h60
-rw-r--r--widgets/text/e-text-model-repos.c73
-rw-r--r--widgets/text/e-text-model-repos.h55
-rw-r--r--widgets/text/e-text-model-test.c74
-rw-r--r--widgets/text/e-text-model-uri.c345
-rw-r--r--widgets/text/e-text-model-uri.h42
-rw-r--r--widgets/text/e-text-model.c592
-rw-r--r--widgets/text/e-text-model.h113
-rw-r--r--widgets/text/e-text-test.c155
-rw-r--r--widgets/text/e-text.c3876
-rw-r--r--widgets/text/e-text.h240
387 files changed, 4344 insertions, 74275 deletions
diff --git a/ChangeLog b/ChangeLog
index f5d65b022b..3703467cd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,20 +4,22 @@
`executive-summary/widgets/Makefile', as that subdir doesn't get
distributed anymore.
-2001-04-26 Dan Winship <danw@ximian.com>
+2001-04-24 Ettore Perazzoli <ettore@ximian.com>
- * README: We no longer depend on libunicode.
+ * NEWS (Shell): Updated with the changes in the shell.
- * 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).
+2001-04-23 Damon Chaplin <damon@ximian.com>
- * configure.in: Check for gethostbyname_r so e_gethostbyname_r
- will DTRT.
-
-2001-04-24 Dan Winship <danw@ximian.com>
+ * NEWS (Tasks): added stuff about new popup items.
+
+2001-04-23 Dan Winship <danw@ximian.com>
+
+ * NEWS (Mail): Updated. I think it's mostly covered except for
+ importer stuff now
- * configure.in: Bump up the gal requirement
+2001-04-23 Christopher James Lahey <clahey@ximian.com>
+
+ * NEWS (Addressbook, General): Added Addressbook and ETable NEWS.
2001-04-23 Ettore Perazzoli <ettore@ximian.com>
@@ -26,15 +28,23 @@
* Makefile.am (SUBDIRS): Build the docs last.
-2001-04-21 Jeffrey Stedfast <fejj@ximian.com>
+2001-04-23 Not Zed <NotZed@Ximian.com>
+
+ * NEWS (Mail): Updated slightly, Trow's turn?
- * 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-22 Jeffrey Stedfast <fejj@ximian.com>
-2001-04-21 Duncan Mak <duncan@ximian.com>
+ * NEWS: Updated with 0.10 mailer improvements. Dan/Iain/Michael
+ should add anything I left off.
- * art/Makefile.am (images_DATA): Added in composer-message.png.
+2001-04-17 Ettore Perazzoli <ettore@ximian.com>
+
+ * configure.in: Don't generate the Makefiles under `camel/tests'
+ for now.
+
+2001-04-17 Ettore Perazzoli <ettore@ximian.com>
+
+ * configure.in: Bump required GAL version to 0.7.
2001-04-16 Ettore Perazzoli <ettore@ximian.com>
@@ -51,49 +61,16 @@
* 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>
+2001-04-06 Not Zed <NotZed@Ximian.com>
- * 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.
+ * README (gnome-xml): Fixed the branch name to LIB_XML_1_BRANCH
+ rather than LIB_XML_1_X.
-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
diff --git a/NEWS b/NEWS
index 820c398eb4..c422bf46e9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,130 @@
+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
----------------------------------
diff --git a/README b/README
index 67ac311fb2..20fe0dc5f4 100644
--- a/README
+++ b/README
@@ -107,7 +107,7 @@ and -devel packages for each library.
GNOME CVS (0.8.2 is too old)
- gnome-xml - 1.8.10 or later in the 1.0 series, but not from the 2.0
- series (If you get this from GNOME CVS, use the tag "LIB_XML_1_X".)
+ series (If you get this from GNOME CVS, use the tag "LIB_XML_1_BRANCH".)
(*)
- gnome-print - 0.25 or later (*)
@@ -141,6 +141,8 @@ and -devel packages for each library.
*** either gnome-libs or evolution for the Makefiles to work
*** properly.
+ - libunicode - 0.4.gnome (*)
+
- gal (GNOME Application Library) - 0.5.99.5 or later
- gtkhtml - 0.8.2 or later
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 04f3ac9421..9bff289077 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,51 +1,20 @@
-2001-04-25 Dan Winship <danw@ximian.com>
+2001-04-21 Kjartan Maraas <kmaraas@gnome.org>
- * 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.
+ * contact-editor/e-contact-quick-add.c (build_quick_add_dialog):
+ Pull up utf8 conversion fixes from trow on HEAD. Fixes bug #2256.
+
+2001-04-20 Kjartan Maraas <kmaraas@gnome.org>
- * 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: Pull up fix to
+ convert from utf8. Works only partially. See bugzilla
+ # 2256.
+
+2001-04-18 Gediminas Paulauskas <menesis@delfi.lt>
- * gui/component/e-address-popup.c (e_address_popup_refresh_names):
- Convert utf8 strings into gtk strings before displaying.
+ * 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-04-14 Christopher James Lahey <clahey@ximian.com>
@@ -119,114 +88,26 @@
* backend/pas/pas-backend-file.c (INITIAL_VCARD): Update the built
in VCard.
-2001-04-12 JP Rosevear <jpr@ximian.com>
+2001-04-11 Chris Toshok <toshok@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/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.
- * 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>
+2001-04-11 Christopher James Lahey <clahey@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
+ * backend/pas/pas-backend-file.c: Send report_writable signal to
+ newly connected books.
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
@@ -236,58 +117,16 @@
* 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.
+ * gui/widgets/e-addressbook-model.c (addressbook_append_row):
+ Fixed this function. We removed the col offset.
- * 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>
+2001-04-02 Iain Holmes <iain@ximian.com>
- * *.*: Clean up #includes. Replace <gnome.h>, <bonobo.h> and
- <gtk/gtk.h> with more finegrained headers where needed.
+ * backend/ebook/evolution-gnomecard-importer.c (importer_init): Shut
+ down and unregister the factory on exit.
2001-03-28 Christopher James Lahey <clahey@ximian.com>
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c
index a5231f8303..76764f9894 100644
--- a/addressbook/backend/ebook/e-book.c
+++ b/addressbook/backend/ebook/e-book.c
@@ -1040,7 +1040,7 @@ e_book_get_cursor (EBook *book,
guint
e_book_get_book_view (EBook *book,
- const gchar *query,
+ gchar *query,
EBookBookViewCallback cb,
gpointer closure)
{
diff --git a/addressbook/backend/ebook/evolution-gnomecard-importer.c b/addressbook/backend/ebook/evolution-gnomecard-importer.c
index bb5e45cdd6..53a1dd30aa 100644
--- a/addressbook/backend/ebook/evolution-gnomecard-importer.c
+++ b/addressbook/backend/ebook/evolution-gnomecard-importer.c
@@ -1,11 +1,9 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#include <config.h>
-#include <stdio.h>
-
+#include <bonobo.h>
+#include <gnome.h>
#include <liboaf/liboaf.h>
-#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-main.h>
+#include <stdio.h>
#include <e-book.h>
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index ec7bdfcd7f..0e3168f5a3 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -7,7 +7,9 @@
*/
#include "config.h"
+#include <gtk/gtksignal.h>
#include <stdio.h>
+#include <gnome.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
@@ -21,18 +23,14 @@
#endif
#endif
-#include <gtk/gtksignal.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
-#include <gal/util/e-util.h>
-#include <gal/widgets/e-unicode.h>
-
-#include <ebook/e-card-simple.h>
-#include <e-util/e-sexp.h>
-#include <e-util/e-dbhash.h>
#include "pas-backend-file.h"
#include "pas-book.h"
#include "pas-card-cursor.h"
+#include <ebook/e-card-simple.h>
+#include <e-util/e-sexp.h>
+#include <e-util/e-dbhash.h>
+#include <gal/util/e-util.h>
+#include <gal/widgets/e-unicode.h>
#define PAS_BACKEND_FILE_VERSION_NAME "PAS-DB-VERSION"
#define PAS_BACKEND_FILE_VERSION "0.1"
diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c
index c8cd900f87..b174caf65f 100644
--- a/addressbook/backend/pas/pas-backend-ldap.c
+++ b/addressbook/backend/pas/pas-backend-ldap.c
@@ -9,10 +9,10 @@
#define DEBUG
#include "config.h"
+#include <gtk/gtksignal.h>
#include <fcntl.h>
#include <time.h>
#include <lber.h>
-#include <gtk/gtksignal.h>
#ifdef DEBUG
#define LDAP_DEBUG
@@ -39,13 +39,12 @@
#include "ldap_schema.h"
#endif
-#include <e-util/e-sexp.h>
-#include <ebook/e-card-simple.h>
-
#include "pas-backend-ldap.h"
#include "pas-book.h"
#include "pas-card-cursor.h"
+#include <e-util/e-sexp.h>
+#include <ebook/e-card-simple.h>
#define LDAP_MAX_SEARCH_RESPONSES 100
diff --git a/addressbook/contact-editor/e-contact-quick-add.c b/addressbook/contact-editor/e-contact-quick-add.c
index f9556f6758..66e773d1c5 100644
--- a/addressbook/contact-editor/e-contact-quick-add.c
+++ b/addressbook/contact-editor/e-contact-quick-add.c
@@ -27,15 +27,7 @@
#include <config.h>
#include <ctype.h>
-#include <glib.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtktable.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
+#include <gnome.h>
#include <gal/widgets/e-unicode.h>
#include <addressbook/backend/ebook/e-book.h>
#include <addressbook/backend/ebook/e-book-util.h>
diff --git a/addressbook/gui/component/e-address-popup.c b/addressbook/gui/component/e-address-popup.c
index 134ce1241b..7b9c11cf5e 100644
--- a/addressbook/gui/component/e-address-popup.c
+++ b/addressbook/gui/component/e-address-popup.c
@@ -42,6 +42,11 @@ static GtkObjectClass *parent_class;
static EBook *common_book = NULL; /* still sort of lame */
static void e_address_popup_destroy (GtkObject *);
+static void e_address_popup_realize (GtkWidget *);
+static gint e_address_popup_button_press_event (GtkWidget *, GdkEventButton *ev);
+static gint e_address_popup_enter_notify_event (GtkWidget *, GdkEventCrossing *ev);
+static gint e_address_popup_leave_notify_event (GtkWidget *, GdkEventCrossing *ev);
+
static void e_address_popup_query (EAddressPopup *);
@@ -49,10 +54,16 @@ static void
e_address_popup_class_init (EAddressPopupClass *klass)
{
GtkObjectClass *object_class = (GtkObjectClass *) klass;
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
parent_class = GTK_OBJECT_CLASS (gtk_type_class (gtk_event_box_get_type ()));
object_class->destroy = e_address_popup_destroy;
+
+ widget_class->realize = e_address_popup_realize;
+ widget_class->button_press_event = e_address_popup_button_press_event;
+ widget_class->enter_notify_event = e_address_popup_enter_notify_event;
+ widget_class->leave_notify_event = e_address_popup_leave_notify_event;
}
static void
@@ -79,6 +90,57 @@ e_address_popup_destroy (GtkObject *obj)
GTK_OBJECT_CLASS (parent_class)->destroy (obj);
}
+static void
+e_address_popup_realize (GtkWidget *w)
+{
+ EAddressPopup *pop = E_ADDRESS_POPUP (w);
+
+ if (GTK_WIDGET_CLASS (parent_class)->realize)
+ GTK_WIDGET_CLASS (parent_class)->realize (w);
+
+ /* Start the death count. */
+ pop->leave_timeout_tag = gtk_timeout_add (10000, (GtkFunction) gtk_widget_destroy, pop);
+}
+
+static gint
+e_address_popup_button_press_event (GtkWidget *w, GdkEventButton *ev)
+{
+ gtk_widget_destroy (w);
+ return FALSE;
+}
+
+static gint
+e_address_popup_enter_notify_event (GtkWidget *w, GdkEventCrossing *ev)
+{
+ EAddressPopup *pop = E_ADDRESS_POPUP (w);
+
+ if (pop->leave_timeout_tag) {
+ gtk_timeout_remove (pop->leave_timeout_tag);
+ pop->leave_timeout_tag = 0;
+ }
+
+ return FALSE;
+}
+
+static gint
+e_address_popup_leave_notify_event (GtkWidget *w, GdkEventCrossing *ev)
+{
+ EAddressPopup *pop = E_ADDRESS_POPUP (w);
+ const gint slack=5;
+ gint x, y;
+
+ /* Manually check our "leave" events to avoid weird erroneous leaves
+ that seem related to bonobo... */
+ gdk_window_get_pointer (w->window, &x, &y, NULL);
+ if (slack <= x && x < w->allocation.width-slack && slack <= y && y < w->allocation.height-slack)
+ return FALSE;
+
+ if (pop->leave_timeout_tag == 0)
+ pop->leave_timeout_tag = gtk_timeout_add (1000, (GtkFunction) gtk_widget_destroy, pop);
+
+ return FALSE;
+}
+
GtkType
e_address_popup_get_type (void)
{
@@ -138,7 +200,9 @@ e_address_popup_set_name (EAddressPopup *pop, const gchar *name)
pop->name = g_strdup (name);
g_strstrip (pop->name);
- if (pop->name && pop->email)
+ ++pop->set_count;
+
+ if (pop->set_count >= 2)
e_address_popup_refresh_names (pop);
}
@@ -151,7 +215,9 @@ e_address_popup_set_email (EAddressPopup *pop, const gchar *email)
pop->email = g_strdup (email);
g_strstrip (pop->email);
- if (pop->name && pop->email)
+ ++pop->set_count;
+
+ if (pop->set_count >= 2)
e_address_popup_refresh_names (pop);
}
@@ -213,6 +279,36 @@ e_address_popup_new (void)
return GTK_WIDGET (pop);
}
+static GtkWidget *
+e_address_popup_popup (EAddressPopup *pop)
+{
+ GtkWidget *win, *fr;
+ gint x, y;
+
+ win = gtk_window_new (GTK_WINDOW_POPUP);
+ fr = gtk_frame_new (NULL);
+ gtk_container_add (GTK_CONTAINER (win), fr);
+ gtk_container_add (GTK_CONTAINER (fr), GTK_WIDGET (pop));
+
+ gtk_window_set_policy (GTK_WINDOW (win), FALSE, FALSE, FALSE);
+
+ gdk_window_get_pointer (NULL, &x, &y, NULL);
+ x = MAX (x-10, 0);
+ y = MAX (y-10, 0);
+ gtk_widget_set_uposition (win, x, y);
+
+ gtk_signal_connect_object (GTK_OBJECT (pop),
+ "destroy",
+ GTK_SIGNAL_FUNC(gtk_widget_destroy),
+ GTK_OBJECT (win));
+
+ gtk_widget_show (GTK_WIDGET (pop));
+ gtk_widget_show (fr);
+ gtk_widget_show (win);
+
+ return win;
+}
+
static void
found_fields_cb (EBook *book, EBookStatus status, EList *writable_fields, gpointer closure)
{
@@ -256,15 +352,7 @@ e_address_popup_cardify (EAddressPopup *pop, ECard *card)
static void
add_contacts_cb (EAddressPopup *pop)
{
- if (pop->email && *pop->email) {
-
- if (pop->name && *pop->name)
- e_contact_quick_add (pop->name, pop->email, NULL, NULL);
- else
- e_contact_quick_add_free_form (pop->email, NULL, NULL);
-
- }
-
+ e_contact_quick_add (pop->name, pop->email, NULL, NULL);
gtk_widget_destroy (GTK_WIDGET (pop));
}
@@ -399,13 +487,7 @@ e_address_popup_factory_new_control (void)
GtkWidget *w;
w = e_address_popup_new ();
- control = bonobo_control_new (w);
- gtk_widget_show (w);
-
- gtk_signal_connect_object (GTK_OBJECT (w),
- "destroy",
- GTK_SIGNAL_FUNC (bonobo_object_unref),
- GTK_OBJECT (control));
+ control = bonobo_control_new (e_address_popup_popup (E_ADDRESS_POPUP (w)));
bag = bonobo_property_bag_new (NULL, set_prop, w);
bonobo_property_bag_add (bag, "name", PROPERTY_NAME,
diff --git a/addressbook/gui/component/select-names/e-select-names-bonobo.c b/addressbook/gui/component/select-names/e-select-names-bonobo.c
index 98c235c067..deab1aeee6 100644
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.c
+++ b/addressbook/gui/component/select-names/e-select-names-bonobo.c
@@ -25,21 +25,20 @@
#include <config.h>
#endif
-#include "e-select-names-bonobo.h"
+#include <gnome.h>
#include <bonobo/bonobo-property-bag.h>
#include <bonobo/bonobo-control.h>
-#include <gal/util/e-util.h>
-#include <gal/e-text/e-entry.h>
-
#include "Evolution-Addressbook-SelectNames.h"
+#include <gal/util/e-util.h>
+#include <gal/e-text/e-entry.h>
#include "e-select-names-manager.h"
-
#include "e-select-names-model.h"
#include "e-select-names-text-model.h"
+#include "e-select-names-bonobo.h"
#define PARENT_TYPE bonobo_object_get_type ()
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
index f9556f6758..66e773d1c5 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.c
@@ -27,15 +27,7 @@
#include <config.h>
#include <ctype.h>
-#include <glib.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtktable.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
+#include <gnome.h>
#include <gal/widgets/e-unicode.h>
#include <addressbook/backend/ebook/e-book.h>
#include <addressbook/backend/ebook/e-book-util.h>
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 5a340bc0a6..45f1b29bfa 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -21,36 +21,40 @@
*/
#include <config.h>
+#include <gnome.h>
+
+#include "e-addressbook-view.h"
-#include <libgnome/gnome-paper.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnome/gnome-util.h>
#include <gal/e-table/e-table-scrolled.h>
#include <gal/e-table/e-table-model.h>
#include <gal/widgets/e-scroll-frame.h>
#include <gal/widgets/e-popup-menu.h>
-#include <gal/menus/gal-view-factory-etable.h>
-#include <gal/menus/gal-view-etable.h>
-
-#include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-dialog.h>
-#include <libgnomeprint/gnome-print-master.h>
-#include <libgnomeprint/gnome-print-master-preview.h>
-
#include "widgets/menus/gal-view-menus.h"
-#include "addressbook/printing/e-contact-print.h"
-#include "addressbook/printing/e-contact-print-envelope.h"
+#include <gal/menus/gal-view-factory-etable.h>
+#include <gal/menus/gal-view-etable.h>
#include "gal-view-factory-minicard.h"
#include "gal-view-minicard.h"
-#include "e-addressbook-view.h"
#include "e-addressbook-model.h"
+
#include "e-minicard-view-widget.h"
-#include "e-contact-save-as.h"
#include "e-contact-editor.h"
+#include "e-contact-save-as.h"
+#include "addressbook/printing/e-contact-print.h"
+#include "addressbook/printing/e-contact-print-envelope.h"
+#include "e-card-simple.h"
+#include "e-card.h"
+#include "e-book.h"
+
+#include "glade/glade-xml.h"
+
+#include <libgnomeprint/gnome-print.h>
+#include <libgnomeprint/gnome-print-dialog.h>
+#include <libgnomeprint/gnome-print-master.h>
+#include <libgnomeprint/gnome-print-master-preview.h>
static void e_addressbook_view_init (EAddressbookView *card);
static void e_addressbook_view_class_init (EAddressbookViewClass *klass);
@@ -74,15 +78,6 @@ enum {
LAST_SIGNAL
};
-enum DndTargetType {
- DND_TARGET_TYPE_VCARD,
-};
-#define VCARD_TYPE "text/x-vcard"
-static GtkTargetEntry drag_types[] = {
- { VCARD_TYPE, 0, DND_TARGET_TYPE_VCARD },
-};
-static const int num_drag_types = sizeof (drag_types) / sizeof (drag_types[0]);
-
static guint e_addressbook_view_signals [LAST_SIGNAL] = {0, };
GtkType
@@ -570,12 +565,12 @@ table_right_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, EA
CardAndBook *card_and_book;
EPopupMenu menu[] = {
- {N_("Save as VCard"), NULL, GTK_SIGNAL_FUNC(save_as), NULL, 0},
- {N_("Send contact to other"), NULL, GTK_SIGNAL_FUNC(send_as), NULL, 0},
- {N_("Send message to contact"), NULL, GTK_SIGNAL_FUNC(send_to), NULL, 0},
- {N_("Print"), NULL, GTK_SIGNAL_FUNC(print), NULL, 0},
- {N_("Print Envelope"), NULL, GTK_SIGNAL_FUNC(print_envelope), NULL, 0},
- {N_("Delete"), NULL, GTK_SIGNAL_FUNC(delete), NULL, 0},
+ {"Save as VCard", NULL, GTK_SIGNAL_FUNC(save_as), NULL, 0},
+ {"Send contact to other", NULL, GTK_SIGNAL_FUNC(send_as), NULL, 0},
+ {"Send message to contact", NULL, GTK_SIGNAL_FUNC(send_to), NULL, 0},
+ {"Print", NULL, GTK_SIGNAL_FUNC(print), NULL, 0},
+ {"Print Envelope", NULL, GTK_SIGNAL_FUNC(print_envelope), NULL, 0},
+ {"Delete", NULL, GTK_SIGNAL_FUNC(delete), NULL, 0},
{NULL, NULL, NULL, NULL, 0}
};
@@ -597,38 +592,6 @@ table_right_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, EA
}
static void
-table_drag_data_get (ETable *table,
- int row,
- int col,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- gpointer user_data)
-{
- EAddressbookView *view = user_data;
-
- printf ("table_drag_data_get (row %d, col %d)\n", row, col);
-
- if (!E_IS_ADDRESSBOOK_MODEL(view->object))
- return;
-
- switch (info) {
- case DND_TARGET_TYPE_VCARD: {
- char *value;
-
- value = e_card_simple_get_vcard(E_ADDRESSBOOK_MODEL(view->object)->data[row]);
-
- gtk_selection_data_set (selection_data,
- selection_data->target,
- 8,
- value, strlen (value));
- break;
- }
- }
-}
-
-static void
status_message (GtkObject *object, const gchar *status, EAddressbookView *eav)
{
gtk_signal_emit (GTK_OBJECT (eav),
@@ -639,32 +602,21 @@ status_message (GtkObject *object, const gchar *status, EAddressbookView *eav)
#ifdef JUST_FOR_TRANSLATORS
static char *list [] = {
N_("* Click here to add a contact *"),
- N_("File As"),
- N_("Full Name"),
+ N_("Name"),
N_("Email"),
- N_("Primary Phone"),
- N_("Assistant Phone"),
- N_("Business Phone"),
- N_("Callback Phone"),
- N_("Company Phone"),
- N_("Home Phone"),
+ N_("Primary"),
+ N_("Business"),
+ N_("Home"),
N_("Organization"),
- N_("Business Address"),
- N_("Home Address"),
- N_("Mobile Phone"),
- N_("Car Phone"),
+ N_("Mobile"),
+ N_("Car"),
N_("Business Fax"),
N_("Home Fax"),
- N_("Business Phone 2"),
- N_("Home Phone 2"),
+ N_("Business 2"),
+ N_("Home 2"),
N_("ISDN"),
- N_("Other Phone"),
- N_("Other Fax"),
+ N_("Other"),
N_("Pager"),
- N_("Radio"),
- N_("Telex"),
- N_("TTY"),
- N_("Other Address"),
N_("Email 2"),
N_("Email 3"),
N_("Web Site"),
@@ -678,6 +630,7 @@ static char *list [] = {
N_("Spouse"),
N_("Note"),
N_("Free-busy URL"),
+ N_("Click here to add a contact")
};
#endif
@@ -758,15 +711,6 @@ create_table_view (EAddressbookView *view)
gtk_signal_connect(GTK_OBJECT(e_table_scrolled_get_table(E_TABLE_SCROLLED(table))), "right_click",
GTK_SIGNAL_FUNC(table_right_click), view);
- /* drag & drop signals */
- e_table_drag_source_set (E_TABLE(E_TABLE_SCROLLED(table)->table), GDK_BUTTON1_MASK,
- drag_types, num_drag_types, GDK_ACTION_MOVE);
-
- gtk_signal_connect (GTK_OBJECT (E_TABLE_SCROLLED(table)->table),
- "table_drag_data_get",
- GTK_SIGNAL_FUNC (table_drag_data_get),
- view);
-
gtk_table_attach(GTK_TABLE(view), table,
0, 1,
0, 1,
diff --git a/art/Makefile.am b/art/Makefile.am
index 8745c61b01..fac9c3f1d5 100644
--- a/art/Makefile.am
+++ b/art/Makefile.am
@@ -23,7 +23,6 @@ images_DATA = \
butterfly.png \
cellphone.png \
delete_message.xpm \
- compose-message.png \
envelope.png \
evolution-calendar-mini.png \
evolution-calendar.png \
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 108f241953..43646e5dae 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -2,279 +2,53 @@
* gui/dialogs/Makefile.am (INCLUDES): Add `$(EXTRA_GNOME_CFLAGS)'.
-2001-04-26 Dan Winship <danw@ximian.com>
+2001-04-23 Kjartan Maraas <kmaraas@gnome.org>
- * conduits/todo/Makefile.am (libetodo_conduit_la_LIBADD): Remove
- UNICODE_LIBS
+ * gui/event-editor.c: Pull up a fix for i18n from HEAD.
+ Don't use e_utf8-variants of functions on non-UTF8 strings.
+ * gui/dialogs/delete-comp.c: Pull up another fix for i18n from
+ HEAD here.
+
+2001-04-18 Gediminas Paulauskas <menesis@delfi.lt>
- * 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
+ * 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-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.
+ * gui/calendar-model.c (calendar_model_append_row): Changed
+ append_row to just send the information to the model.
2001-04-04 Kjartan Maraas <kmaraas@gnome.org>
- * gui/calendar-commands.c: Fix headers.
+ * gui/calendar-commands.c: Header preparations for changes
+ in gal
* 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/calendar-model.c: And here.
+ * gui/e-day-view-time-item.c: And here.
+ * gui/e-day-view-top-item.c: Here too.
+ * gui/e-day-view.c: Ditto.
+ * gui/e-meeting-edit.c: Ditto.
+ * gui/e-week-view-main-item.c: Ditto.
+ * gui/e-week-view.c: Ditto.
+ * gui/event-editor.c: Ditto.
+ * gui/gnome-cal.c: Ditto.
+ * gui/goto.c: Ditto.
+ * gui/main.c: Ditto.
+ * gui/print.c: Ditto.
+
+2001-03-27 Anna Marie Dirks <anna@ximian.com>
* gui/e-itip-control.c: fixed button placement to comply
- with gnome standards.
+ with gnome standards.
-2001-03-27 Anna Marie Dirks <anna@ximian.com>
+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
@@ -307,7 +81,7 @@
* 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
@@ -349,7 +123,7 @@
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.
+ event.
(e_week_view_on_goto_date): Go To support.
(e_week_view_on_goto_today): Goto today support.
@@ -357,7 +131,7 @@
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.
+ event.
(e_day_view_on_goto_date): Go To support.
(e_day_view_on_goto_today): Goto today support.
@@ -366,7 +140,7 @@
2001-03-07 Miguel de Icaza <miguel@ximian.com>
* gui/control-factory.c (calendar_persist_init): New function:
- inits the BonoboPersistFile server.
+ inits the BonoboPersistFile server.
* gui/GNOME_Evolution_Calendar.oaf.in: Added BonoboPropertyBag to
the list of supported interfaces that were supported but not
@@ -376,7 +150,7 @@
2001-03-15 Dan Winship <danw@ximian.com>
- * gui/e-week-view.c (e_week_view_start_editing_event):
+ * 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.
@@ -403,13 +177,13 @@
* 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.
+ 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.
+ state.
This will also let us add icon support (when we get nice icons for
this)
@@ -436,7 +210,7 @@
* 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):
+ * 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.
@@ -451,13 +225,13 @@
* 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.
+ 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.
+ state.
This will also let us add icon support (when we get nice icons for
this)
@@ -572,7 +346,7 @@
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
@@ -610,7 +384,7 @@
* 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
@@ -620,16 +394,16 @@
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.
@@ -641,7 +415,7 @@
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
@@ -654,7 +428,7 @@
* gui/dialogs/task-editor-dialog.glade: Make more consistent,
fixing bugs 1247 and 1249
- * gui/dialogs/task-editor.c (fill_widgets):
+ * gui/dialogs/task-editor.c (fill_widgets):
* gui/event-editor-dialog.glade: Gui tidying
@@ -663,7 +437,7 @@
* 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
@@ -676,7 +450,7 @@
* 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
@@ -768,7 +542,7 @@
* 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
@@ -827,7 +601,7 @@
* 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>.
@@ -895,7 +669,7 @@
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
@@ -914,9 +688,9 @@
* gui/dialogs/save-comp.h: new header
- * gui/dialogs/save-comp.c (save_component_dialog): shows the save
+ * 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
@@ -935,7 +709,7 @@
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
@@ -958,7 +732,7 @@
2001-01-19 JP Rosevear <jpr@ximian.com>
- * cal-util/cal-component.c (cal_component_alarm_new): create a new
+ * 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
@@ -966,7 +740,7 @@
* cal-util/cal-component.h: new protos
- * conduits/calendar/calendar-conduit.c (comp_from_remote_record):
+ * 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.
@@ -974,7 +748,7 @@
* 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
@@ -1016,18 +790,18 @@
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-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.
@@ -1038,7 +812,7 @@
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
@@ -1046,7 +820,7 @@
* 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.
@@ -1214,7 +988,7 @@
2001-01-14 JP Rosevear <jpr@ximian.com>
- * conduits/calendar/Makefile.am: pass -module and -avoid-version to
+ * conduits/calendar/Makefile.am: pass -module and -avoid-version to
conduit linker
* conduits/todo/Makefile.am: ditto
@@ -1244,7 +1018,7 @@
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-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
@@ -1273,7 +1047,7 @@
2001-01-09 Dave Camp <dave@helixcode.com>
- * gui/Makefile.am: Replaced e-meet-dialog.glade.h with
+ * 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.
@@ -1307,7 +1081,7 @@
* 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.
@@ -1315,7 +1089,7 @@
* 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
@@ -1332,12 +1106,12 @@
* 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/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):
+ * 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>
@@ -1358,9 +1132,9 @@
* 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
@@ -1370,7 +1144,7 @@
(categories_clicked): throw up the categories dialog and update
when ok is clicked
- * gui/dialogs/task-editor-dialog.glade: Tweak to name the categories
+ * 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
@@ -1467,9 +1241,9 @@
2000-12-22 JP Rosevear <jpr@helixcode.com>
- * gui/dialogs/delete-comp.c (delete_component_dialog): Clean up
+ * 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
@@ -1479,9 +1253,9 @@
2000-12-22 JP Rosevear <jpr@helixcode.com>
- * pcs/cal-backend-file.c (cal_backend_file_get_alarms_for_object):
+ * 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
@@ -1495,13 +1269,13 @@
* 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
@@ -1579,7 +1353,7 @@
* conduits/todo/todo-conduit.h: Fix erroneous documentation
- * conduits/todo/todo-conduit.c (comp_from_remote_record): if
+ * 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
@@ -1591,8 +1365,8 @@
(post_sync): Destroy the map later
(conduit_get_gpilot_conduit): Fix e_todo_context_new params
- * conduits/calendar/calendar-conduit.[hc]: Similar to above
-
+ * conduits/calendar/calendar-conduit.[hc]: Similar to above
+
2000-12-19 JP Rosevear <jpr@helixcode.com>
* conduits/calendar/calendar-conduit.c: Remove pointless comment
@@ -1602,12 +1376,12 @@
2000-12-19 JP Rosevear <jpr@helixcode.com>
- * conduits/calendar/calendar-conduit.c (local_record_from_comp):
+ * 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
diff --git a/calendar/conduits/calendar/e-calendar-conduit-control-applet.desktop.in b/calendar/conduits/calendar/e-calendar-conduit-control-applet.desktop.in
deleted file mode 100644
index 5988e6cb08..0000000000
--- a/calendar/conduits/calendar/e-calendar-conduit-control-applet.desktop.in
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-_Name=Evolution Calendar Conduit
-_Comment=Configure the Evolution Calendar conduit
-Exec=e-calendar-conduit-control-applet --cap-id=1
-TryExec=e-calendar-conduit-control-applet
-Terminal=0
-Type=Application
-Icon=gnome-calendar-conduit.png
diff --git a/calendar/conduits/todo/e-todo-conduit-control-applet.desktop.in b/calendar/conduits/todo/e-todo-conduit-control-applet.desktop.in
deleted file mode 100644
index ec5856fcad..0000000000
--- a/calendar/conduits/todo/e-todo-conduit-control-applet.desktop.in
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-_Name=Evolution ToDo Conduit
-_Comment=Configure the Evolution ToDo conduit
-Exec=e-todo-conduit-control-applet --cap-id=1
-TryExec=e-todo-conduit-control-applet
-Terminal=0
-Type=Application
diff --git a/calendar/gui/Evolution-Composer.h b/calendar/gui/Evolution-Composer.h
deleted file mode 100644
index 557a8dcdd4..0000000000
--- a/calendar/gui/Evolution-Composer.h
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * This file was generated by orbit-idl - DO NOT EDIT!
- */
-
-#include <glib.h>
-#define ORBIT_IDL_SERIAL 9
-#include <orb/orbit.h>
-
-#ifndef Evolution_Composer_H
-#define Evolution_Composer_H 1
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-/** typedefs **/
-#include <bonobo/Bonobo.h>
-# 13 "/usr/share/idl/Bonobo.idl"
-#if !defined(ORBIT_DECL_GNOME_Evolution_Composer) && !defined(_GNOME_Evolution_Composer_defined)
-#define ORBIT_DECL_GNOME_Evolution_Composer 1
-#define _GNOME_Evolution_Composer_defined 1
-#define GNOME_Evolution_Composer__free CORBA_Object__free
- typedef CORBA_Object GNOME_Evolution_Composer;
- extern CORBA_unsigned_long GNOME_Evolution_Composer__classid;
-#if !defined(TC_IMPL_TC_GNOME_Evolution_Composer_0)
-#define TC_IMPL_TC_GNOME_Evolution_Composer_0 'E'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_1 'v'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_2 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_3 'l'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_4 'u'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_5 't'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_6 'i'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_7 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_8 'n'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_9 '_'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_10 'C'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_11 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_12 'm'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_13 'p'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_14 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_15 's'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_16 'e'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_17 'r'
- extern const struct CORBA_TypeCode_struct
- TC_GNOME_Evolution_Composer_struct;
-#define TC_GNOME_Evolution_Composer ((CORBA_TypeCode)&TC_GNOME_Evolution_Composer_struct)
-#endif
-#endif
-#if !defined(_GNOME_Evolution_Composer_Recipient_defined)
-#define _GNOME_Evolution_Composer_Recipient_defined 1
- typedef struct
- {
- CORBA_char *name;
- CORBA_char *address;
- }
- GNOME_Evolution_Composer_Recipient;
-
-#if !defined(TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_0)
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_0 'E'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_1 'v'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_2 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_3 'l'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_4 'u'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_5 't'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_6 'i'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_7 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_8 'n'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_9 '_'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_10 'C'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_11 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_12 'm'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_13 'p'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_14 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_15 's'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_16 'e'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_Recipient_17 'r'
- extern const struct CORBA_TypeCode_struct
- TC_GNOME_Evolution_Composer_Recipient_struct;
-#define TC_GNOME_Evolution_Composer_Recipient ((CORBA_TypeCode)&TC_GNOME_Evolution_Composer_Recipient_struct)
-#endif
- extern GNOME_Evolution_Composer_Recipient
- *GNOME_Evolution_Composer_Recipient__alloc(void);
- extern gpointer GNOME_Evolution_Composer_Recipient__free(gpointer mem,
- gpointer dat,
- CORBA_boolean free_strings); /* ORBit internal use */
-#endif
-#if !defined(ORBIT_DECL_CORBA_sequence_GNOME_Evolution_Composer_Recipient) && !defined(_CORBA_sequence_GNOME_Evolution_Composer_Recipient_defined)
-#define ORBIT_DECL_CORBA_sequence_GNOME_Evolution_Composer_Recipient 1
-#define _CORBA_sequence_GNOME_Evolution_Composer_Recipient_defined 1
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_0 'E'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_1 'v'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_2 'o'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_3 'l'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_4 'u'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_5 't'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_6 'i'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_7 'o'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_8 'n'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_9 '_'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_10 'C'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_11 'o'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_12 'm'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_13 'p'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_14 'o'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_15 's'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_16 'e'
-#define ORBIT_IMPL_CORBA_sequence_GNOME_Evolution_Composer_Recipient_17 'r'
- typedef struct
- {
- CORBA_unsigned_long _maximum,
- _length;
- GNOME_Evolution_Composer_Recipient *_buffer;
- CORBA_boolean _release;
- }
- CORBA_sequence_GNOME_Evolution_Composer_Recipient;
-#if !defined(TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_0)
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_0 'E'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_1 'v'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_2 'o'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_3 'l'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_4 'u'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_5 't'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_6 'i'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_7 'o'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_8 'n'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_9 '_'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_10 'C'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_11 'o'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_12 'm'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_13 'p'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_14 'o'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_15 's'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_16 'e'
-#define TC_IMPL_TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_17 'r'
- extern const struct CORBA_TypeCode_struct
- TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_struct;
-#define TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient ((CORBA_TypeCode)&TC_CORBA_sequence_GNOME_Evolution_Composer_Recipient_struct)
-#endif
- extern CORBA_sequence_GNOME_Evolution_Composer_Recipient
- *CORBA_sequence_GNOME_Evolution_Composer_Recipient__alloc(void);
- extern gpointer
- CORBA_sequence_GNOME_Evolution_Composer_Recipient__free(gpointer mem,
- gpointer dat,
- CORBA_boolean free_strings); /* ORBit internal use */
- GNOME_Evolution_Composer_Recipient
- *CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf
- (CORBA_unsigned_long len);
-#endif
-#if !defined(_GNOME_Evolution_Composer_RecipientList_defined)
-#define _GNOME_Evolution_Composer_RecipientList_defined 1
- typedef CORBA_sequence_GNOME_Evolution_Composer_Recipient
- GNOME_Evolution_Composer_RecipientList;
-#if !defined(TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_0)
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_0 'E'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_1 'v'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_2 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_3 'l'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_4 'u'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_5 't'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_6 'i'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_7 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_8 'n'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_9 '_'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_10 'C'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_11 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_12 'm'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_13 'p'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_14 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_15 's'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_16 'e'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_RecipientList_17 'r'
- extern const struct CORBA_TypeCode_struct
- TC_GNOME_Evolution_Composer_RecipientList_struct;
-#define TC_GNOME_Evolution_Composer_RecipientList ((CORBA_TypeCode)&TC_GNOME_Evolution_Composer_RecipientList_struct)
-#endif
- extern GNOME_Evolution_Composer_RecipientList
- *GNOME_Evolution_Composer_RecipientList__alloc(void);
- extern gpointer GNOME_Evolution_Composer_RecipientList__free(gpointer mem,
- gpointer dat,
- CORBA_boolean free_strings); /* ORBit internal use */
-#endif
-#define ex_GNOME_Evolution_Composer_CouldNotParse "IDL:GNOME/Evolution/Composer/CouldNotParse:1.0"
- void _ORBIT_GNOME_Evolution_Composer_CouldNotParse_demarshal(GIOPRecvBuffer
- *
- _ORBIT_recv_buffer,
- CORBA_Environment
- * ev);
- void _ORBIT_GNOME_Evolution_Composer_CouldNotParse_marshal(GIOPSendBuffer *
- _ORBIT_send_buffer,
- CORBA_Environment
- * ev);
-#if !defined(_GNOME_Evolution_Composer_CouldNotParse_defined)
-#define _GNOME_Evolution_Composer_CouldNotParse_defined 1
- typedef struct
- {
- int dummy;
- }
- GNOME_Evolution_Composer_CouldNotParse;
-
-#if !defined(TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_0)
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_0 'E'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_1 'v'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_2 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_3 'l'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_4 'u'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_5 't'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_6 'i'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_7 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_8 'n'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_9 '_'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_10 'C'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_11 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_12 'm'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_13 'p'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_14 'o'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_15 's'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_16 'e'
-#define TC_IMPL_TC_GNOME_Evolution_Composer_CouldNotParse_17 'r'
- extern const struct CORBA_TypeCode_struct
- TC_GNOME_Evolution_Composer_CouldNotParse_struct;
-#define TC_GNOME_Evolution_Composer_CouldNotParse ((CORBA_TypeCode)&TC_GNOME_Evolution_Composer_CouldNotParse_struct)
-#endif
-#define GNOME_Evolution_Composer_CouldNotParse__alloc() NULL
- extern gpointer GNOME_Evolution_Composer_CouldNotParse__free(gpointer mem,
- gpointer dat,
- CORBA_boolean free_strings); /* ORBit internal use */
-#endif
-
-/** POA structures **/
- typedef struct
- {
- void *_private;
- void (*setHeaders) (PortableServer_Servant _servant,
- const GNOME_Evolution_Composer_RecipientList * to,
- const GNOME_Evolution_Composer_RecipientList * cc,
- const GNOME_Evolution_Composer_RecipientList * bcc,
- const CORBA_char * subject, CORBA_Environment * ev);
- void (*setBodyText) (PortableServer_Servant _servant,
- const CORBA_char * body, CORBA_Environment * ev);
- void (*attachMIME) (PortableServer_Servant _servant,
- const CORBA_char * data, CORBA_Environment * ev);
- void (*attachData) (PortableServer_Servant _servant,
- const CORBA_char * content_type,
- const CORBA_char * filename,
- const CORBA_char * description,
- const CORBA_boolean show_inline,
- const CORBA_char * data, CORBA_Environment * ev);
- void (*show) (PortableServer_Servant _servant, CORBA_Environment * ev);
- }
- POA_GNOME_Evolution_Composer__epv;
- typedef struct
- {
- PortableServer_ServantBase__epv *_base_epv;
- POA_Bonobo_Unknown__epv *Bonobo_Unknown_epv;
- POA_GNOME_Evolution_Composer__epv *GNOME_Evolution_Composer_epv;
- }
- POA_GNOME_Evolution_Composer__vepv;
- typedef struct
- {
- void *_private;
- POA_GNOME_Evolution_Composer__vepv *vepv;
- }
- POA_GNOME_Evolution_Composer;
- extern void POA_GNOME_Evolution_Composer__init(PortableServer_Servant
- servant,
- CORBA_Environment * ev);
- extern void POA_GNOME_Evolution_Composer__fini(PortableServer_Servant
- servant,
- CORBA_Environment * ev);
-
-/** prototypes **/
-#define GNOME_Evolution_Composer_ref Bonobo_Unknown_ref
-#define GNOME_Evolution_Composer_unref Bonobo_Unknown_unref
-#define GNOME_Evolution_Composer_queryInterface Bonobo_Unknown_queryInterface
- void GNOME_Evolution_Composer_setHeaders(GNOME_Evolution_Composer _obj,
- const
- GNOME_Evolution_Composer_RecipientList
- * to,
- const
- GNOME_Evolution_Composer_RecipientList
- * cc,
- const
- GNOME_Evolution_Composer_RecipientList
- * bcc, const CORBA_char * subject,
- CORBA_Environment * ev);
- void GNOME_Evolution_Composer_setBodyText(GNOME_Evolution_Composer _obj,
- const CORBA_char * body,
- CORBA_Environment * ev);
- void GNOME_Evolution_Composer_attachMIME(GNOME_Evolution_Composer _obj,
- const CORBA_char * data,
- CORBA_Environment * ev);
- void GNOME_Evolution_Composer_attachData(GNOME_Evolution_Composer _obj,
- const CORBA_char * content_type,
- const CORBA_char * filename,
- const CORBA_char * description,
- const CORBA_boolean show_inline,
- const CORBA_char * data,
- CORBA_Environment * ev);
- void GNOME_Evolution_Composer_show(GNOME_Evolution_Composer _obj,
- CORBA_Environment * ev);
-
- void
- _ORBIT_skel_GNOME_Evolution_Composer_setHeaders
- (POA_GNOME_Evolution_Composer * _ORBIT_servant,
- GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev,
- void (*_impl_setHeaders) (PortableServer_Servant _servant,
- const GNOME_Evolution_Composer_RecipientList
- * to,
- const GNOME_Evolution_Composer_RecipientList
- * cc,
- const GNOME_Evolution_Composer_RecipientList
- * bcc, const CORBA_char * subject,
- CORBA_Environment * ev));
- void
- _ORBIT_skel_GNOME_Evolution_Composer_setBodyText
- (POA_GNOME_Evolution_Composer * _ORBIT_servant,
- GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev,
- void (*_impl_setBodyText) (PortableServer_Servant _servant,
- const CORBA_char * body,
- CORBA_Environment * ev));
- void
- _ORBIT_skel_GNOME_Evolution_Composer_attachMIME
- (POA_GNOME_Evolution_Composer * _ORBIT_servant,
- GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev,
- void (*_impl_attachMIME) (PortableServer_Servant _servant,
- const CORBA_char * data,
- CORBA_Environment * ev));
- void
- _ORBIT_skel_GNOME_Evolution_Composer_attachData
- (POA_GNOME_Evolution_Composer * _ORBIT_servant,
- GIOPRecvBuffer * _ORBIT_recv_buffer, CORBA_Environment * ev,
- void (*_impl_attachData) (PortableServer_Servant _servant,
- const CORBA_char * content_type,
- const CORBA_char * filename,
- const CORBA_char * description,
- const CORBA_boolean show_inline,
- const CORBA_char * data,
- CORBA_Environment * ev));
- void _ORBIT_skel_GNOME_Evolution_Composer_show(POA_GNOME_Evolution_Composer
- * _ORBIT_servant,
- GIOPRecvBuffer *
- _ORBIT_recv_buffer,
- CORBA_Environment * ev,
- void (*_impl_show)
- (PortableServer_Servant
- _servant,
- CORBA_Environment * ev));
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
-#undef ORBIT_IDL_SERIAL
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
deleted file mode 100644
index 164d043e13..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/* Evolution calendar - alarm notification dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <glade/glade.h>
-#include "alarm-notify-dialog.h"
-
-
-
-/* The useful contents of the alarm notify dialog */
-typedef struct {
- GladeXML *xml;
-
- GtkWidget *dialog;
- GtkWidget *close;
- GtkWidget *snooze;
- GtkWidget *edit;
- GtkWidget *heading;
- GtkWidget *summary;
- GtkWidget *snooze_time;
-
- AlarmNotifyFunc func;
- gpointer func_data;
-} AlarmNotify;
-
-
-
-/* Callback used when the notify dialog is destroyed */
-static void
-dialog_destroy_cb (GtkObject *object, gpointer data)
-{
- AlarmNotify *an;
-
- an = data;
- gtk_object_unref (GTK_OBJECT (an->xml));
- g_free (an);
-}
-
-/* Delete_event handler for the alarm notify dialog */
-static gint
-delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
- AlarmNotify *an;
-
- an = data;
- g_assert (an->func != NULL);
-
- (* an->func) (ALARM_NOTIFY_CLOSE, -1, an->func_data);
-
- gtk_widget_destroy (widget);
- return TRUE;
-}
-
-/* Callback for the close button */
-static void
-close_clicked_cb (GtkWidget *widget, gpointer data)
-{
- AlarmNotify *an;
-
- an = data;
- g_assert (an->func != NULL);
-
- (* an->func) (ALARM_NOTIFY_CLOSE, -1, an->func_data);
-
- gtk_widget_destroy (an->dialog);
-}
-
-/* Callback for the snooze button */
-static void
-snooze_clicked_cb (GtkWidget *widget, gpointer data)
-{
- AlarmNotify *an;
- int snooze_time;
-
- an = data;
- g_assert (an->func != NULL);
-
- snooze_time = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (an->snooze_time));
- (* an->func) (ALARM_NOTIFY_SNOOZE, snooze_time, an->func_data);
-
- gtk_widget_destroy (an->dialog);
-}
-
-/* Callback for the edit button */
-static void
-edit_clicked_cb (GtkWidget *widget, gpointer data)
-{
- AlarmNotify *an;
-
- an = data;
- g_assert (an->func != NULL);
-
- (* an->func) (ALARM_NOTIFY_EDIT, -1, an->func_data);
-
- gtk_widget_destroy (an->dialog);
-}
-
-/**
- * alarm_notify_dialog:
- * @trigger: Trigger time for the alarm.
- * @occur: Occurrence time for the event.
- * @comp: Calendar component object which corresponds to the alarm.
- * @func: Function to be called when a dialog action is invoked.
- * @func_data: Closure data for @func.
- *
- * Runs the alarm notification dialog. The specified @func will be used to
- * notify the client about result of the actions in the dialog.
- *
- * Return value: TRUE on success, FALSE if the dialog could not be created.
- **/
-gboolean
-alarm_notify_dialog (time_t trigger, time_t occur, CalComponent *comp,
- AlarmNotifyFunc func, gpointer func_data)
-{
- AlarmNotify *an;
- char buf[256];
- struct tm tm_trigger;
- struct tm tm_occur;
- CalComponentText summary;
-
- g_return_val_if_fail (trigger != -1, FALSE);
- g_return_val_if_fail (occur != -1, FALSE);
- g_return_val_if_fail (comp != NULL, FALSE);
- g_return_val_if_fail (IS_CAL_COMPONENT (comp), FALSE);
- g_return_val_if_fail (func != NULL, FALSE);
-
- an = g_new0 (AlarmNotify, 1);
-
- an->func = func;
- an->func_data = func_data;
-
- an->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-notify.glade", NULL);
- if (!an->xml) {
- g_message ("alarm_notify_dialog(): Could not load the Glade XML file!");
- g_free (an);
- return FALSE;
- }
-
- an->dialog = glade_xml_get_widget (an->xml, "alarm-notify");
- an->close = glade_xml_get_widget (an->xml, "close");
- an->snooze = glade_xml_get_widget (an->xml, "snooze");
- an->edit = glade_xml_get_widget (an->xml, "edit");
- an->heading = glade_xml_get_widget (an->xml, "heading");
- an->summary = glade_xml_get_widget (an->xml, "summary");
- an->snooze_time = glade_xml_get_widget (an->xml, "snooze-time");
-
- if (!(an->dialog && an->close && an->snooze && an->edit && an->heading && an->summary
- && an->snooze_time)) {
- g_message ("alarm_notify_dialog(): Could not find all widgets in Glade file!");
- gtk_object_unref (GTK_OBJECT (an->xml));
- g_free (an);
- return FALSE;
- }
-
- gtk_object_set_data (GTK_OBJECT (an->dialog), "alarm-notify", an);
- gtk_signal_connect (GTK_OBJECT (an->dialog), "destroy",
- GTK_SIGNAL_FUNC (dialog_destroy_cb), an);
-
- /* Title */
-
- /* FIXME: use am_pm_flag or 24-hour time */
-
- tm_trigger = *localtime (&trigger);
- strftime (buf, sizeof (buf), _("Alarm on %A %b %d %Y %H:%M"), &tm_trigger);
- gtk_window_set_title (GTK_WINDOW (an->dialog), buf);
-
- /* Heading */
-
- tm_occur = *localtime (&occur);
- strftime (buf, sizeof (buf),
- _("Notification about your appointment on %A %b %d %Y %H:%M"),
- &tm_occur);
- gtk_label_set_text (GTK_LABEL (an->heading), buf);
-
- /* Summary */
-
- cal_component_get_summary (comp, &summary);
-
- if (summary.value)
- gtk_label_set_text (GTK_LABEL (an->summary), summary.value);
- else
- gtk_label_set_text (GTK_LABEL (an->summary), _("No summary available."));
-
- /* Connect actions */
-
- gtk_signal_connect (GTK_OBJECT (an->dialog), "delete_event",
- GTK_SIGNAL_FUNC (delete_event_cb),
- an);
-
- gtk_signal_connect (GTK_OBJECT (an->close), "clicked",
- GTK_SIGNAL_FUNC (close_clicked_cb),
- an);
-
- gtk_signal_connect (GTK_OBJECT (an->snooze), "clicked",
- GTK_SIGNAL_FUNC (snooze_clicked_cb),
- an);
-
- gtk_signal_connect (GTK_OBJECT (an->edit), "clicked",
- GTK_SIGNAL_FUNC (edit_clicked_cb),
- an);
-
- /* Run! */
-
- gtk_widget_show (an->dialog);
- return TRUE;
-}
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.h b/calendar/gui/alarm-notify/alarm-notify-dialog.h
deleted file mode 100644
index f2c938c495..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Evolution calendar - alarm notification dialog
- *
- * Copyright (C) 2000 Helix Code, Inc.
- * Copyright (C) 2000 Ximian, Inc.
- *
- * Author: Federico Mena-Quintero <federico@ximian.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef ALARM_NOTIFY_DIALOG_H
-#define ALARM_NOTIFY_DIALOG_H
-
-#include <time.h>
-#include <glib.h>
-#include <cal-util/cal-component.h>
-
-
-
-typedef enum {
- ALARM_NOTIFY_CLOSE,
- ALARM_NOTIFY_SNOOZE,
- ALARM_NOTIFY_EDIT
-} AlarmNotifyResult;
-
-typedef void (* AlarmNotifyFunc) (AlarmNotifyResult result, int snooze_mins, gpointer data);
-
-gboolean alarm_notify_dialog (time_t trigger, time_t occur, CalComponent *comp,
- AlarmNotifyFunc func, gpointer func_data);
-
-
-
-#endif
diff --git a/calendar/gui/alarm-notify/alarm-notify.glade b/calendar/gui/alarm-notify/alarm-notify.glade
deleted file mode 100644
index 41718d0572..0000000000
--- a/calendar/gui/alarm-notify/alarm-notify.glade
+++ /dev/null
@@ -1,228 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Evolution Calendar</name>
- <program_name>evolution-calendar</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
- <use_widget_names>False</use_widget_names>
- <output_main_file>True</output_main_file>
- <output_support_files>True</output_support_files>
- <output_build_files>True</output_build_files>
- <backup_source_files>True</backup_source_files>
- <main_source_file>interface.c</main_source_file>
- <main_header_file>interface.h</main_header_file>
- <handler_source_file>callbacks.c</handler_source_file>
- <handler_header_file>callbacks.h</handler_header_file>
- <support_source_file>support.c</support_source_file>
- <support_header_file>support.h</support_header_file>
-</project>
-
-<widget>
- <class>GtkWindow</class>
- <name>alarm-notify</name>
- <cxx_use_heap>True</cxx_use_heap>
- <title></title>
- <type>GTK_WINDOW_DIALOG</type>
- <position>GTK_WIN_POS_CENTER</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox2</name>
- <border_width>4</border_width>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>heading</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label></label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>True</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>summary</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label></label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>True</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>close</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Close</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>snooze</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Snooze</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>edit</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <label>Edit appointment</label>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator1</name>
- <cxx_use_heap>True</cxx_use_heap>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <cxx_use_heap>True</cxx_use_heap>
- <label>Snooze time (minutes)</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>snooze-time</name>
- <cxx_use_heap>True</cxx_use_heap>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>5</value>
- <lower>1</lower>
- <upper>1440</upper>
- <step>1</step>
- <page>5</page>
- <page_size>5</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c
index f75499f4da..2b53eddbcc 100644
--- a/calendar/gui/calendar-model.c
+++ b/calendar/gui/calendar-model.c
@@ -22,6 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include <config.h>
#include <math.h>
@@ -36,10 +37,11 @@
#undef __USE_XOPEN
#include <ctype.h>
-
+#include <glib.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
#include <libgnomeui/gnome-messagebox.h>
#include <libgnomeui/gnome-stock.h>
-#include <libgnome/gnome-i18n.h>
#include <gal/widgets/e-unicode.h>
#include <e-util/e-time-utils.h>
#include <cal-util/timeutil.h>
@@ -47,6 +49,8 @@
#include "calendar-commands.h"
+
+
/* Private part of the ECalendarModel structure */
struct _CalendarModelPrivate {
/* Calendar client we are using */
diff --git a/calendar/gui/dialogs/Makefile.am b/calendar/gui/dialogs/Makefile.am
index 12342538ab..55e6ef9670 100644
--- a/calendar/gui/dialogs/Makefile.am
+++ b/calendar/gui/dialogs/Makefile.am
@@ -4,8 +4,6 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"calendar-gui\" \
-I$(top_srcdir) \
-I$(top_srcdir)/calendar \
- -I$(top_srcdir)/calendar/cal-client \
- -I$(top_builddir)/calendar/cal-client \
-I$(top_srcdir)/libical/src/libical \
-I$(top_builddir)/libical/src/libical \
-I$(includedir) \
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
index f24c3493fb..c6c300708b 100644
--- a/calendar/gui/dialogs/delete-comp.c
+++ b/calendar/gui/dialogs/delete-comp.c
@@ -62,7 +62,7 @@ delete_component_dialog (CalComponent *comp, GtkWidget *widget)
vtype = cal_component_get_vtype (comp);
cal_component_get_summary (comp, &summary);
- tmp = e_utf8_to_gtk_string (widget, summary.value);
+ tmp = e_utf8_to_locale_string (summary.value);
switch (vtype) {
case CAL_COMPONENT_EVENT:
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index 4d005f3b49..29c32c3de2 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -29,6 +29,7 @@
*/
#include <config.h>
+#include <string.h>
#include <glib.h>
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index b10382a3ea..770c79fc56 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -27,33 +27,33 @@
*/
#include <config.h>
-
-#include "e-day-view.h"
-
#include <math.h>
#include <time.h>
-#include <gdk/gdkkeysyms.h>
#include <gdk/gdkx.h>
+#include <gdk/gdkkeysyms.h>
#include <gtk/gtkdnd.h>
#include <gtk/gtkmain.h>
+#include <gtk/gtkselection.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkvscrollbar.h>
-#include <gtk/gtkwindow.h>
-#include <gal/e-text/e-text.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-canvas-utils.h>
-#include <libgnomeui/gnome-canvas-rect-ellipse.h>
+#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
-
-#include "cal-util/timeutil.h"
+#include <libgnomeui/gnome-canvas-rect-ellipse.h>
+#include <cal-util/timeutil.h>
#include "dialogs/delete-comp.h"
#include "comp-util.h"
-#include "calendar-commands.h"
-#include "goto.h"
-#include "e-meeting-edit.h"
+#include "e-day-view.h"
#include "e-day-view-time-item.h"
#include "e-day-view-top-item.h"
#include "e-day-view-main-item.h"
+#include "calendar-commands.h"
+#include <gal/widgets/e-canvas.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-popup-menu.h>
+#include "e-meeting-edit.h"
+#include "goto.h"
/* Images */
#include "art/bell.xpm"
@@ -253,6 +253,9 @@ static void e_day_view_foreach_event_with_uid (EDayView *day_view,
EDayViewForeachEventCallback callback,
gpointer data);
+static void e_day_view_queue_reload_events (EDayView *day_view);
+static gboolean e_day_view_reload_events_idle_cb (gpointer data);
+static void e_day_view_reload_events (EDayView *day_view);
static void e_day_view_free_events (EDayView *day_view);
static void e_day_view_free_event_array (EDayView *day_view,
GArray *array);
@@ -485,14 +488,13 @@ e_day_view_init (EDayView *day_view)
day_view->calendar = NULL;
day_view->client = NULL;
- day_view->sexp = g_strdup ("#t"); /* match all by default */
- day_view->query = NULL;
day_view->long_events = g_array_new (FALSE, FALSE,
sizeof (EDayViewEvent));
day_view->long_events_sorted = TRUE;
day_view->long_events_need_layout = FALSE;
day_view->long_events_need_reshape = FALSE;
+ day_view->reload_events_idle_id = 0;
for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) {
day_view->events[day] = g_array_new (FALSE, FALSE,
@@ -792,7 +794,7 @@ e_day_view_init (EDayView *day_view)
/* Create the cursors. */
- day_view->normal_cursor = gdk_cursor_new (GDK_LEFT_PTR);
+ day_view->normal_cursor = gdk_cursor_new (GDK_TOP_LEFT_ARROW);
day_view->move_cursor = gdk_cursor_new (GDK_FLEUR);
day_view->resize_width_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW);
day_view->resize_height_cursor = gdk_cursor_new (GDK_SB_V_DOUBLE_ARROW);
@@ -849,23 +851,17 @@ e_day_view_destroy (GtkObject *object)
e_day_view_stop_auto_scroll (day_view);
+ if (day_view->reload_events_idle_id != 0) {
+ g_source_remove (day_view->reload_events_idle_id);
+ day_view->reload_events_idle_id = 0;
+ }
+
if (day_view->client) {
gtk_signal_disconnect_by_data (GTK_OBJECT (day_view->client), day_view);
gtk_object_unref (GTK_OBJECT (day_view->client));
day_view->client = NULL;
}
- if (day_view->sexp) {
- g_free (day_view->sexp);
- day_view->sexp = NULL;
- }
-
- if (day_view->query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (day_view->query), day_view);
- gtk_object_unref (GTK_OBJECT (day_view->query));
- day_view->query = NULL;
- }
-
if (day_view->large_font)
gdk_font_unref (day_view->large_font);
@@ -1376,11 +1372,23 @@ e_day_view_set_calendar (EDayView *day_view,
}
-/* Callback used when a component is updated in the live query */
+/* Callback used when the calendar client finishes opening */
static void
-query_obj_updated_cb (CalQuery *query, const char *uid,
- gboolean query_in_progress, int n_scanned, int total,
- gpointer data)
+cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
+{
+ EDayView *day_view;
+
+ day_view = E_DAY_VIEW (data);
+
+ if (status != CAL_CLIENT_OPEN_SUCCESS)
+ return;
+
+ e_day_view_queue_reload_events (day_view);
+}
+
+/* Callback used when the calendar client tells us that an object changed */
+static void
+obj_updated_cb (CalClient *client, const char *uid, gpointer data)
{
EDayView *day_view;
EDayViewEvent *event;
@@ -1388,8 +1396,13 @@ query_obj_updated_cb (CalQuery *query, const char *uid,
CalClientGetStatus status;
gint day, event_num;
+ g_return_if_fail (E_IS_DAY_VIEW (data));
+
day_view = E_DAY_VIEW (data);
+ /* Sanity check. */
+ g_return_if_fail (client == day_view->client);
+
/* If our time hasn't been set yet, just return. */
if (day_view->lower == 0 && day_view->upper == 0)
return;
@@ -1403,7 +1416,7 @@ query_obj_updated_cb (CalQuery *query, const char *uid,
break;
case CAL_CLIENT_GET_SYNTAX_ERROR:
- g_message ("query_obj_updated_cb(): Syntax error when getting object `%s'", uid);
+ g_message ("obj_updated_cb(): Syntax error when getting object `%s'", uid);
return;
case CAL_CLIENT_GET_NOT_FOUND:
@@ -1415,6 +1428,12 @@ query_obj_updated_cb (CalQuery *query, const char *uid,
return;
}
+ /* We only care about events. */
+ if (cal_component_get_vtype (comp) != CAL_COMPONENT_EVENT) {
+ gtk_object_unref (GTK_OBJECT (comp));
+ 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. */
@@ -1462,9 +1481,10 @@ query_obj_updated_cb (CalQuery *query, const char *uid,
gtk_widget_queue_draw (day_view->main_canvas);
}
-/* Callback used when a component is removed from the live query */
+
+/* Callback used when the calendar client tells us that an object was removed */
static void
-query_obj_removed_cb (CalQuery *query, const char *uid, gpointer data)
+obj_removed_cb (CalClient *client, const char *uid, gpointer data)
{
EDayView *day_view;
@@ -1478,117 +1498,6 @@ query_obj_removed_cb (CalQuery *query, const char *uid, gpointer data)
gtk_widget_queue_draw (day_view->main_canvas);
}
-/* Callback used when a query ends */
-static void
-query_query_done_cb (CalQuery *query, CalQueryDoneStatus status, const char *error_str, gpointer data)
-{
- EDayView *day_view;
-
- day_view = E_DAY_VIEW (data);
-
- /* FIXME */
-
- if (status != CAL_QUERY_DONE_SUCCESS)
- fprintf (stderr, "query done: %s\n", error_str);
-}
-
-/* Callback used when an evaluation error occurs when running a query */
-static void
-query_eval_error_cb (CalQuery *query, const char *error_str, gpointer data)
-{
- EDayView *day_view;
-
- day_view = E_DAY_VIEW (data);
-
- /* FIXME */
-
- fprintf (stderr, "eval error: %s\n", error_str);
-}
-
-
-/* Builds a complete query sexp for the day view by adding the predicates to
- * filter only for VEVENTS that fit in the day view's time range.
- */
-static char *
-adjust_query_sexp (EDayView *day_view, const char *sexp)
-{
- char *start, *end;
- char *new_sexp;
-
- /* If the dates have not been set yet, we just want an empty query. */
- if (day_view->lower == 0 || day_view->upper == 0)
- return g_strdup ("#f");
-
- start = isodate_from_time_t (day_view->lower);
- end = isodate_from_time_t (day_view->upper);
-
- new_sexp = g_strdup_printf ("(and (= (get-vtype) \"VEVENT\")"
- " (occur-in-time-range? (make-time \"%s\")"
- " (make-time \"%s\"))"
- " %s)",
- start, end,
- sexp);
-
- g_free (start);
- g_free (end);
-
- return new_sexp;
-}
-
-
-/* Restarts a query for the day view */
-static void
-update_query (EDayView *day_view)
-{
- char *real_sexp;
-
- e_day_view_free_events (day_view);
- gtk_widget_queue_draw (day_view->top_canvas);
- gtk_widget_queue_draw (day_view->main_canvas);
-
- if (!(day_view->client
- && cal_client_get_load_state (day_view->client) == CAL_CLIENT_LOAD_LOADED))
- return;
-
- if (day_view->query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (day_view->query), day_view);
- gtk_object_unref (GTK_OBJECT (day_view->query));
- }
-
- g_assert (day_view->sexp != NULL);
- real_sexp = adjust_query_sexp (day_view, day_view->sexp);
-
- day_view->query = cal_client_get_query (day_view->client, real_sexp);
- g_free (real_sexp);
-
- if (!day_view->query) {
- g_message ("update_query(): Could not create the query");
- return;
- }
-
- gtk_signal_connect (GTK_OBJECT (day_view->query), "obj_updated",
- GTK_SIGNAL_FUNC (query_obj_updated_cb), day_view);
- gtk_signal_connect (GTK_OBJECT (day_view->query), "obj_removed",
- GTK_SIGNAL_FUNC (query_obj_removed_cb), day_view);
- gtk_signal_connect (GTK_OBJECT (day_view->query), "query_done",
- GTK_SIGNAL_FUNC (query_query_done_cb), day_view);
- gtk_signal_connect (GTK_OBJECT (day_view->query), "eval_error",
- GTK_SIGNAL_FUNC (query_eval_error_cb), day_view);
-}
-
-/* Callback used when the calendar client finishes opening */
-static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- EDayView *day_view;
-
- day_view = E_DAY_VIEW (data);
-
- if (status != CAL_CLIENT_OPEN_SUCCESS)
- return;
-
- update_query (day_view);
-}
/**
* e_day_view_set_cal_client:
@@ -1621,35 +1530,17 @@ e_day_view_set_cal_client (EDayView *day_view,
day_view->client = client;
if (day_view->client) {
- if (cal_client_get_load_state (day_view->client) == CAL_CLIENT_LOAD_LOADED)
- update_query (day_view);
- else
+ if (cal_client_get_load_state (day_view->client) != CAL_CLIENT_LOAD_LOADED)
gtk_signal_connect (GTK_OBJECT (day_view->client), "cal_opened",
GTK_SIGNAL_FUNC (cal_opened_cb), day_view);
- }
-}
-/**
- * e_day_view_set_query:
- * @day_view: A day view.
- * @sexp: S-expression that defines the query.
- *
- * Sets the query sexp that the day view will use for filtering the displayed
- * events.
- **/
-void
-e_day_view_set_query (EDayView *day_view, const char *sexp)
-{
- g_return_if_fail (day_view != NULL);
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
- g_return_if_fail (sexp != NULL);
-
- if (day_view->sexp)
- g_free (day_view->sexp);
-
- day_view->sexp = g_strdup (sexp);
+ gtk_signal_connect (GTK_OBJECT (day_view->client), "obj_updated",
+ GTK_SIGNAL_FUNC (obj_updated_cb), day_view);
+ gtk_signal_connect (GTK_OBJECT (day_view->client), "obj_removed",
+ GTK_SIGNAL_FUNC (obj_removed_cb), day_view);
+ }
- update_query (day_view);
+ e_day_view_queue_reload_events (day_view);
}
@@ -2052,7 +1943,7 @@ e_day_view_set_selected_time_range (EDayView *day_view,
/* See if we need to change the days shown. */
if (lower != day_view->lower) {
e_day_view_recalc_day_starts (day_view, lower);
- update_query (day_view);
+ e_day_view_queue_reload_events (day_view);
}
/* Set the selection. */
@@ -2249,8 +2140,7 @@ e_day_view_set_days_shown (EDayView *day_view,
e_day_view_recalc_day_starts (day_view, day_view->lower);
e_day_view_recalc_cell_sizes (day_view);
-
- update_query (day_view);
+ e_day_view_queue_reload_events (day_view);
}
@@ -2529,7 +2419,7 @@ e_day_view_recalc_work_week (EDayView *day_view)
day_view->selection_start_day = -1;
e_day_view_recalc_day_starts (day_view, lower);
- update_query (day_view);
+ e_day_view_queue_reload_events (day_view);
/* This updates the date navigator. */
e_day_view_update_calendar_selection_time (day_view);
@@ -4037,6 +3927,77 @@ e_day_view_abort_resize (EDayView *day_view,
}
+/* This frees any events currently loaded, and queues a reload. */
+static void
+e_day_view_queue_reload_events (EDayView *day_view)
+{
+ e_day_view_free_events (day_view);
+
+ if (day_view->reload_events_idle_id == 0) {
+ /* We'll use a high idle priority here, so the events are
+ reloaded before the canvas is updated. */
+ day_view->reload_events_idle_id = g_idle_add_full
+ (G_PRIORITY_HIGH_IDLE,
+ e_day_view_reload_events_idle_cb, day_view, NULL);
+ }
+}
+
+
+static gboolean
+e_day_view_reload_events_idle_cb (gpointer data)
+{
+ EDayView *day_view;
+
+ g_return_val_if_fail (E_IS_DAY_VIEW (data), FALSE);
+
+ GDK_THREADS_ENTER ();
+
+ day_view = E_DAY_VIEW (data);
+
+ day_view->reload_events_idle_id = 0;
+
+ e_day_view_reload_events (day_view);
+
+ GDK_THREADS_LEAVE ();
+ return FALSE;
+}
+
+
+static void
+e_day_view_reload_events (EDayView *day_view)
+{
+ e_day_view_free_events (day_view);
+
+ if (!(day_view->client
+ && cal_client_get_load_state (day_view->client) == CAL_CLIENT_LOAD_LOADED))
+ return;
+
+ /* If both lower & upper are 0, then the time range hasn't been set,
+ so we don't try to load any events. */
+ if (day_view->lower != 0 || day_view->upper != 0) {
+#if 0
+ g_print ("EDayView (%s) generating instances\n",
+ day_view->work_week_view ? "Work Week" : "1 Day View");
+#endif
+ cal_client_generate_instances (day_view->client,
+ CALOBJ_TYPE_EVENT,
+ day_view->lower,
+ day_view->upper,
+ e_day_view_add_event,
+ day_view);
+ }
+
+ /* We need to do this to make sure the top canvas is resized. */
+ day_view->long_events_need_layout = TRUE;
+
+ e_day_view_check_layout (day_view);
+ e_day_view_reshape_main_canvas_resize_bars (day_view);
+
+ gtk_widget_queue_draw (day_view->top_canvas);
+ gtk_widget_queue_draw (day_view->main_canvas);
+}
+
+
static void
e_day_view_free_events (EDayView *day_view)
{
diff --git a/calendar/gui/e-meeting-edit.c b/calendar/gui/e-meeting-edit.c
index 78c67e5d3a..bcef9d1701 100644
--- a/calendar/gui/e-meeting-edit.c
+++ b/calendar/gui/e-meeting-edit.c
@@ -24,9 +24,11 @@
#include <gtk/gtkclist.h>
#include <gtk/gtkentry.h>
#include <gtk/gtkmain.h>
+#include <gtk/gtksignal.h>
#include <gtk/gtktogglebutton.h>
+#include <gtk/gtkwidget.h>
#include <gtk/gtkwindow.h>
-#include <gdk_imlib.h>
+#include <Imlib.h>
#include <libgnomeui/gnome-dialog.h>
#include <libgnomeui/gnome-dialog-util.h>
#include <bonobo/bonobo-object.h>
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c
index 34508e63a3..90d2057860 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -28,7 +28,6 @@
*/
#include <config.h>
-
#include <glib.h>
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index c06b568d9d..de8f977928 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -28,34 +28,36 @@
*/
#include <config.h>
-
-#include "e-week-view.h"
-
#include <math.h>
#include <gdk/gdkkeysyms.h>
+#include <gtk/gtkrange.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkvscrollbar.h>
-#include <gtk/gtkwindow.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
-#include <gal/e-text/e-text.h>
-#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-canvas-utils.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
+
#include "dialogs/delete-comp.h"
-#include "comp-util.h"
-#include "cal-util/timeutil.h"
#include "calendar-commands.h"
-#include "goto.h"
-#include "e-meeting-edit.h"
+#include "comp-util.h"
+#include "e-week-view.h"
#include "e-week-view-event-item.h"
#include "e-week-view-main-item.h"
#include "e-week-view-titles-item.h"
+#include <cal-util/timeutil.h>
+#include <gal/widgets/e-canvas.h>
+#include <gal/e-text/e-text.h>
+#include <gal/widgets/e-popup-menu.h>
+#include <gal/widgets/e-gui-utils.h>
+#include <gal/widgets/e-canvas-utils.h>
+#include "e-meeting-edit.h"
+#include "goto.h"
/* Images */
#include "art/bell.xpm"
#include "art/recur.xpm"
+
#include "art/jump.xpm"
#define E_WEEK_VIEW_SMALL_FONT \
@@ -109,6 +111,9 @@ static gint e_week_view_convert_position_to_day (EWeekView *week_view,
static void e_week_view_update_selection (EWeekView *week_view,
gint day);
+static void e_week_view_queue_reload_events (EWeekView *week_view);
+static gboolean e_week_view_reload_events_idle_cb (gpointer data);
+static void e_week_view_reload_events (EWeekView *week_view);
static void e_week_view_free_events (EWeekView *week_view);
static gboolean e_week_view_add_event (CalComponent *comp,
time_t start,
@@ -254,14 +259,13 @@ e_week_view_init (EWeekView *week_view)
week_view->calendar = NULL;
week_view->client = NULL;
- week_view->sexp = g_strdup ("#t"); /* match all by default */
- week_view->query = NULL;
week_view->events = g_array_new (FALSE, FALSE,
sizeof (EWeekViewEvent));
week_view->events_sorted = TRUE;
week_view->events_need_layout = FALSE;
week_view->events_need_reshape = FALSE;
+ week_view->reload_events_idle_id = 0;
week_view->spans = NULL;
@@ -381,7 +385,7 @@ e_week_view_init (EWeekView *week_view)
/* Create the cursors. */
- week_view->normal_cursor = gdk_cursor_new (GDK_LEFT_PTR);
+ week_view->normal_cursor = gdk_cursor_new (GDK_TOP_LEFT_ARROW);
week_view->move_cursor = gdk_cursor_new (GDK_FLEUR);
week_view->resize_width_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW);
week_view->last_cursor_set = NULL;
@@ -414,23 +418,17 @@ e_week_view_destroy (GtkObject *object)
e_week_view_free_events (week_view);
+ if (week_view->reload_events_idle_id != 0) {
+ g_source_remove (week_view->reload_events_idle_id);
+ week_view->reload_events_idle_id = 0;
+ }
+
if (week_view->client) {
gtk_signal_disconnect_by_data (GTK_OBJECT (week_view->client), week_view);
gtk_object_unref (GTK_OBJECT (week_view->client));
week_view->client = NULL;
}
- if (week_view->sexp) {
- g_free (week_view->sexp);
- week_view->sexp = NULL;
- }
-
- if (week_view->query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (week_view->query), week_view);
- gtk_object_unref (GTK_OBJECT (week_view->query));
- week_view->query = NULL;
- }
-
if (week_view->small_font)
gdk_font_unref (week_view->small_font);
@@ -884,11 +882,23 @@ e_week_view_set_calendar (EWeekView *week_view,
}
-/* Callback used when a component is updated in the live query */
+/* Callback used when the calendar client finishes opening */
static void
-query_obj_updated_cb (CalQuery *query, const char *uid,
- gboolean query_in_progress, int n_scanned, int total,
- gpointer data)
+cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
+{
+ EWeekView *week_view;
+
+ week_view = E_WEEK_VIEW (data);
+
+ if (status != CAL_CLIENT_OPEN_SUCCESS)
+ return;
+
+ e_week_view_queue_reload_events (week_view);
+}
+
+/* Callback used when the calendar client tells us that an object changed */
+static void
+obj_updated_cb (CalClient *client, const char *uid, gpointer data)
{
EWeekView *week_view;
EWeekViewEvent *event;
@@ -898,6 +908,9 @@ query_obj_updated_cb (CalQuery *query, const char *uid,
week_view = E_WEEK_VIEW (data);
+ /* Sanity check. */
+ g_return_if_fail (client == week_view->client);
+
/* If we don't have a valid date set yet, just return. */
if (!g_date_valid (&week_view->first_day_shown))
return;
@@ -919,6 +932,12 @@ query_obj_updated_cb (CalQuery *query, const char *uid,
return;
}
+ /* We only care about events. */
+ if (cal_component_get_vtype (comp) != CAL_COMPONENT_EVENT) {
+ gtk_object_unref (GTK_OBJECT (comp));
+ 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. */
@@ -964,9 +983,9 @@ query_obj_updated_cb (CalQuery *query, const char *uid,
gtk_widget_queue_draw (week_view->main_canvas);
}
-/* Callback used when a component is removed from the live query */
+/* Callback used when the calendar client tells us that an object was removed */
static void
-query_obj_removed_cb (CalClient *client, const char *uid, gpointer data)
+obj_removed_cb (CalClient *client, const char *uid, gpointer data)
{
EWeekView *week_view;
@@ -979,117 +998,6 @@ query_obj_removed_cb (CalClient *client, const char *uid, gpointer data)
gtk_widget_queue_draw (week_view->main_canvas);
}
-/* Callback used when a query ends */
-static void
-query_query_done_cb (CalQuery *query, CalQueryDoneStatus status, const char *error_str, gpointer data)
-{
- EWeekView *week_view;
-
- week_view = E_WEEK_VIEW (data);
-
- /* FIXME */
-
- if (status != CAL_QUERY_DONE_SUCCESS)
- fprintf (stderr, "query done: %s\n", error_str);
-}
-
-/* Callback used when an evaluation error occurs when running a query */
-static void
-query_eval_error_cb (CalQuery *query, const char *error_str, gpointer data)
-{
- EWeekView *week_view;
-
- week_view = E_WEEK_VIEW (data);
-
- /* FIXME */
-
- fprintf (stderr, "eval error: %s\n", error_str);
-}
-
-/* Builds a complete query sexp for the week view by adding the predicates to
- * filter only for VEVENTS that fit in the week view's time range.
- */
-static char *
-adjust_query_sexp (EWeekView *week_view, const char *sexp)
-{
- int num_days;
- char *start, *end;
- char *new_sexp;
-
- /* If the dates have not been set yet, we just want an empty query. */
- if (!g_date_valid (&week_view->first_day_shown))
- return g_strdup ("#f");
-
- num_days = week_view->multi_week_view ? week_view->weeks_shown * 7 : 7;
-
- start = isodate_from_time_t (week_view->day_starts[0]);
- end = isodate_from_time_t (week_view->day_starts[num_days]);
-
- new_sexp = g_strdup_printf ("(and (= (get-vtype) \"VEVENT\")"
- " (occur-in-time-range? (make-time \"%s\")"
- " (make-time \"%s\"))"
- " %s)",
- start, end,
- sexp);
-
- g_free (start);
- g_free (end);
-
- return new_sexp;
-}
-
-/* Restarts a query for the week view */
-static void
-update_query (EWeekView *week_view)
-{
- char *real_sexp;
-
- e_week_view_free_events (week_view);
- gtk_widget_queue_draw (week_view->main_canvas);
-
- if (!(week_view->client
- && cal_client_get_load_state (week_view->client) == CAL_CLIENT_LOAD_LOADED))
- return;
-
- if (week_view->query) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (week_view->query), week_view);
- gtk_object_unref (GTK_OBJECT (week_view->query));
- }
-
- g_assert (week_view->sexp != NULL);
- real_sexp = adjust_query_sexp (week_view, week_view->sexp);
-
- week_view->query = cal_client_get_query (week_view->client, real_sexp);
- g_free (real_sexp);
-
- if (!week_view->query) {
- g_message ("update_query(): Could not create the query");
- return;
- }
-
- gtk_signal_connect (GTK_OBJECT (week_view->query), "obj_updated",
- GTK_SIGNAL_FUNC (query_obj_updated_cb), week_view);
- gtk_signal_connect (GTK_OBJECT (week_view->query), "obj_removed",
- GTK_SIGNAL_FUNC (query_obj_removed_cb), week_view);
- gtk_signal_connect (GTK_OBJECT (week_view->query), "query_done",
- GTK_SIGNAL_FUNC (query_query_done_cb), week_view);
- gtk_signal_connect (GTK_OBJECT (week_view->query), "eval_error",
- GTK_SIGNAL_FUNC (query_eval_error_cb), week_view);
-}
-
-/* Callback used when the calendar client finishes opening */
-static void
-cal_opened_cb (CalClient *client, CalClientOpenStatus status, gpointer data)
-{
- EWeekView *week_view;
-
- week_view = E_WEEK_VIEW (data);
-
- if (status != CAL_CLIENT_OPEN_SUCCESS)
- return;
-
- update_query (week_view);
-}
/**
* e_week_view_set_cal_client:
@@ -1122,35 +1030,17 @@ e_week_view_set_cal_client (EWeekView *week_view,
week_view->client = client;
if (week_view->client) {
- if (cal_client_get_load_state (week_view->client) == CAL_CLIENT_LOAD_LOADED)
- update_query (week_view);
- else
+ if (cal_client_get_load_state (week_view->client) != CAL_CLIENT_LOAD_LOADED)
gtk_signal_connect (GTK_OBJECT (week_view->client), "cal_opened",
GTK_SIGNAL_FUNC (cal_opened_cb), week_view);
- }
-}
-/**
- * e_week_view_set_query:
- * @week_view: A week view.
- * @sexp: S-expression that defines the query.
- *
- * Sets the query sexp that the week view will use for filtering the displayed
- * events.
- **/
-void
-e_week_view_set_query (EWeekView *week_view, const char *sexp)
-{
- g_return_if_fail (week_view != NULL);
- g_return_if_fail (E_IS_WEEK_VIEW (week_view));
- g_return_if_fail (sexp != NULL);
-
- if (week_view->sexp)
- g_free (week_view->sexp);
-
- week_view->sexp = g_strdup (sexp);
+ gtk_signal_connect (GTK_OBJECT (week_view->client), "obj_updated",
+ GTK_SIGNAL_FUNC (obj_updated_cb), week_view);
+ gtk_signal_connect (GTK_OBJECT (week_view->client), "obj_removed",
+ GTK_SIGNAL_FUNC (obj_removed_cb), week_view);
+ }
- update_query (week_view);
+ e_week_view_queue_reload_events (week_view);
}
@@ -1220,7 +1110,7 @@ e_week_view_set_selected_time_range (EWeekView *week_view,
start_time = time_add_day (start_time, -day_offset);
start_time = time_day_begin (start_time);
e_week_view_recalc_day_starts (week_view, start_time);
- update_query (week_view);
+ e_week_view_queue_reload_events (week_view);
}
/* Set the selection to the given days. */
@@ -1251,6 +1141,7 @@ e_week_view_set_selected_time_range (EWeekView *week_view,
if (update_adjustment_value)
gtk_adjustment_set_value (GTK_RANGE (week_view->vscrollbar)->adjustment, 0);
+
gtk_widget_queue_draw (week_view->main_canvas);
}
@@ -1338,7 +1229,7 @@ e_week_view_set_first_day_shown (EWeekView *week_view,
g_date_to_struct_tm (&base_date, &start_tm);
start_time = mktime (&start_tm);
e_week_view_recalc_day_starts (week_view, start_time);
- update_query (week_view);
+ e_week_view_queue_reload_events (week_view);
}
/* Try to keep the previous selection, but if it is no longer shown
@@ -1367,6 +1258,7 @@ e_week_view_set_first_day_shown (EWeekView *week_view,
if (update_adjustment_value)
gtk_adjustment_set_value (GTK_RANGE (week_view->vscrollbar)->adjustment, 0);
+
gtk_widget_queue_draw (week_view->main_canvas);
}
@@ -1474,7 +1366,8 @@ e_week_view_set_weeks_shown (EWeekView *week_view,
if (g_date_valid (&week_view->first_day_shown))
e_week_view_set_first_day_shown (week_view, &week_view->first_day_shown);
- update_query (week_view);
+ /* Make sure the events are reloaded. */
+ e_week_view_queue_reload_events (week_view);
}
}
@@ -2128,6 +2021,77 @@ e_week_view_update_selection (EWeekView *week_view,
}
+/* This frees any events currently loaded, and queues a reload. */
+static void
+e_week_view_queue_reload_events (EWeekView *week_view)
+{
+ e_week_view_free_events (week_view);
+
+ if (week_view->reload_events_idle_id == 0) {
+ /* We'll use a low priority here, so the user can scroll
+ the view quickly. */
+ week_view->reload_events_idle_id = g_idle_add_full
+ (G_PRIORITY_LOW,
+ e_week_view_reload_events_idle_cb, week_view, NULL);
+ }
+}
+
+
+static gboolean
+e_week_view_reload_events_idle_cb (gpointer data)
+{
+ EWeekView *week_view;
+
+ g_return_val_if_fail (E_IS_WEEK_VIEW (data), FALSE);
+
+ GDK_THREADS_ENTER ();
+
+ week_view = E_WEEK_VIEW (data);
+
+ week_view->reload_events_idle_id = 0;
+
+ e_week_view_reload_events (week_view);
+
+ GDK_THREADS_LEAVE ();
+ return FALSE;
+}
+
+
+static void
+e_week_view_reload_events (EWeekView *week_view)
+{
+ gint num_days;
+
+ e_week_view_free_events (week_view);
+
+ if (!(week_view->client
+ && cal_client_get_load_state (week_view->client) == CAL_CLIENT_LOAD_LOADED))
+ return;
+
+ /* Only load events if the date range has been set. */
+ if (g_date_valid (&week_view->first_day_shown)) {
+ num_days = week_view->multi_week_view
+ ? week_view->weeks_shown * 7 : 7;
+
+#if 0
+ g_print ("EWeekView (%s) generating instances\n",
+ week_view->multi_week_view ? "Month View" : "Week View");
+#endif
+ cal_client_generate_instances (week_view->client,
+ CALOBJ_TYPE_EVENT,
+ week_view->day_starts[0],
+ week_view->day_starts[num_days],
+ e_week_view_add_event,
+ week_view);
+ }
+
+ week_view->events_need_reshape = TRUE;
+ e_week_view_check_layout (week_view);
+
+ gtk_widget_queue_draw (week_view->main_canvas);
+}
+
+
static void
e_week_view_free_events (EWeekView *week_view)
{
@@ -2815,7 +2779,7 @@ e_week_view_on_adjustment_changed (GtkAdjustment *adjustment,
lower = time_day_begin (lower);
e_week_view_recalc_day_starts (week_view, lower);
- update_query (week_view);
+ e_week_view_queue_reload_events (week_view);
/* Update the selection, if needed. */
if (week_view->selection_start_day != -1) {
diff --git a/calendar/gui/event-editor.c b/calendar/gui/event-editor.c
index 07fe04d992..8310dee743 100644
--- a/calendar/gui/event-editor.c
+++ b/calendar/gui/event-editor.c
@@ -26,24 +26,26 @@
#include <config.h>
#include <string.h>
+#include <glib.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
+#include <e-util/e-dialog-widgets.h>
+#include <widgets/misc/e-dateedit.h>
#include <gal/widgets/e-unicode.h>
#include <gal/widgets/e-categories.h>
-#include <libgnomeui/gnome-propertybox.h>
-#include <libgnome/gnome-i18n.h>
-
-#include "calendar-config.h"
-#include "cal-util/timeutil.h"
+#include <cal-util/timeutil.h>
#include "dialogs/delete-comp.h"
#include "dialogs/save-comp.h"
-#include "e-meeting-edit.h"
-#include "e-util/e-dialog-widgets.h"
+#include "calendar-config.h"
#include "event-editor.h"
+#include "e-meeting-edit.h"
+#include "calendar-config.h"
#include "tag-calendar.h"
#include "weekday-picker.h"
-#include "widgets/misc/e-dateedit.h"
#include "widget-util.h"
+
enum {BEFORE, AFTER};
enum {MINUTES, HOURS, DAYS};
@@ -141,9 +143,6 @@ struct _EventEditorPrivate {
GtkWidget *classification_private;
GtkWidget *classification_confidential;
- GtkWidget *contacts;
- GtkWidget *contacts_btn;
-
GtkWidget *categories;
GtkWidget *categories_btn;
@@ -968,11 +967,8 @@ get_widgets (EventEditor *ee)
priv->classification_private = GW ("classification-private");
priv->classification_confidential = GW ("classification-confidential");
- priv->contacts_btn = GW ("contacts-button");
- priv->contacts = GW ("contacts");
-
- priv->categories_btn = GW ("categories-button");
priv->categories = GW ("categories");
+ priv->categories_btn = GW ("categories-button");
priv->reminder_summary = GW ("reminder-summary");
priv->reminder_starting_date = GW ("reminder-starting-date");
@@ -1021,10 +1017,6 @@ get_widgets (EventEditor *ee)
&& priv->classification_public
&& priv->classification_private
&& priv->classification_confidential
- && priv->contacts_btn
- && priv->contacts
- && priv->categories_btn
- && priv->categories
&& priv->reminder_summary
&& priv->reminder_starting_date
&& priv->reminder_list
@@ -1252,19 +1244,15 @@ init_widgets (EventEditor *ee)
GTK_SIGNAL_FUNC (field_changed), ee);
gtk_signal_connect (GTK_OBJECT (priv->description), "changed",
GTK_SIGNAL_FUNC (field_changed), ee);
- gtk_signal_connect (GTK_OBJECT (priv->classification_public), "toggled",
- GTK_SIGNAL_FUNC (field_changed), ee);
- gtk_signal_connect (GTK_OBJECT (priv->classification_private), "toggled",
+ gtk_signal_connect (GTK_OBJECT (priv->classification_public),
+ "toggled",
GTK_SIGNAL_FUNC (field_changed), ee);
- gtk_signal_connect (GTK_OBJECT (priv->classification_confidential), "toggled",
+ gtk_signal_connect (GTK_OBJECT (priv->classification_private),
+ "toggled",
GTK_SIGNAL_FUNC (field_changed), ee);
- gtk_signal_connect (GTK_OBJECT (priv->categories), "changed",
+ gtk_signal_connect (GTK_OBJECT (priv->classification_confidential),
+ "toggled",
GTK_SIGNAL_FUNC (field_changed), ee);
-
- /* FIXME: we do not support these fields yet, so we disable them */
-
- gtk_widget_set_sensitive (priv->contacts_btn, FALSE);
- gtk_widget_set_sensitive (priv->contacts, FALSE);
}
static const int classification_map[] = {
@@ -2398,7 +2386,7 @@ dialog_to_comp_object (EventEditor *ee, CalComponent *comp)
cal_component_set_description_list (comp, &l);
}
- if (str)
+ if (!str)
g_free (str);
/* Dates */
@@ -2616,8 +2604,6 @@ raise_and_focus (GtkWidget *widget)
static void
obj_updated_cb (CalClient *client, const char *uid, gpointer data)
{
- /* FIXME: Do something sensible if the component changes under our feet */
-#if 0
EventEditor *ee;
EventEditorPrivate *priv;
CalComponent *comp;
@@ -2660,17 +2646,12 @@ obj_updated_cb (CalClient *client, const char *uid, gpointer data)
}
raise_and_focus (priv->app);
-#endif
}
/* Callback used when the calendar client tells us that an object was removed */
static void
obj_removed_cb (CalClient *client, const char *uid, gpointer data)
{
- /* FIXME: Do something sensible if the component is removed under our
- * feet.
- */
-#if 0
EventEditor *ee;
EventEditorPrivate *priv;
const gchar *editing_uid;
@@ -2691,7 +2672,6 @@ obj_removed_cb (CalClient *client, const char *uid, gpointer data)
raise_and_focus (priv->app);
-#endif
}
/**
diff --git a/calendar/gui/evolution-calendar-control.c b/calendar/gui/evolution-calendar-control.c
deleted file mode 100644
index 7ebe2b5f8e..0000000000
--- a/calendar/gui/evolution-calendar-control.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-#include <config.h>
-#include <gnome.h>
-#include <glade/glade.h>
-#include <bonobo.h>
-#include <bonobo/bonobo-control.h>
-#include <glade/glade.h>
-
-#ifdef USING_OAF
-#include <liboaf/liboaf.h>
-#else
-#include <libgnorba/gnorba.h>
-#endif
-
-#include <cal-util/timeutil.h>
-#include <gui/alarm.h>
-#include <gui/gnome-cal.h>
-#include <gui/calendar-commands.h>
-
-#define PROPERTY_CALENDAR_URI "folder_uri"
-
-#define PROPERTY_CALENDAR_URI_IDX 1
-
-#ifdef USING_OAF
-#define CONTROL_FACTORY_ID "OAFIID:control-factory:calendar:f4f90989-0f50-4af2-ad94-8bbdf331f0bc"
-#else
-#define CONTROL_FACTORY_ID "control-factory:calendar"
-#endif
-
-CORBA_Environment ev;
-CORBA_ORB orb;
-
-
-static void
-control_activate_cb (BonoboControl *control,
- gboolean activate,
- gpointer user_data)
-{
- if (activate)
- calendar_control_activate (control, user_data);
- else
- calendar_control_deactivate (control);
-}
-
-
-
-static void
-init_bonobo (int *argc, char **argv)
-{
-#ifdef USING_OAF
- /* FIXME: VERSION instead of "0.0". */
- gnome_init_with_popt_table ("evolution-calendar", "0.0",
- *argc, argv, oaf_popt_options,
- 0, NULL);
- oaf_init (*argc, argv);
-#else
- gnome_CORBA_init_with_popt_table (
- "evolution-calendar", "0.0",
- argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
-#endif
-
- if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE)
- g_error (_("Could not initialize Bonobo"));
-
- glade_gnome_init ();
-}
-
-
-
-static void
-get_prop (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- gpointer user_data)
-{
- /*GnomeCalendar *gcal = user_data;*/
-
- switch (arg_id) {
-
- case PROPERTY_CALENDAR_URI_IDX:
- /*
- if (fb && fb->uri)
- BONOBO_ARG_SET_STRING (arg, fb->uri);
- else
- BONOBO_ARG_SET_STRING (arg, "");
- */
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- }
-}
-
-static void
-set_prop (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- gpointer user_data)
-{
- GnomeCalendar *gcal = user_data;
- char *filename;
-
- switch (arg_id) {
-
- case PROPERTY_CALENDAR_URI_IDX:
- printf ("set_prop: '%s'\n", BONOBO_ARG_GET_STRING (arg));
- filename = g_strdup_printf ("%s/calendar.vcf",
- BONOBO_ARG_GET_STRING (arg));
- calendar_set_uri (gcal, filename);
- g_free (filename);
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- break;
- }
-}
-
-
-static void
-calendar_properties_init (GnomeCalendar *gcal)
-{
- gcal->properties = bonobo_property_bag_new (get_prop, set_prop, gcal);
-
- bonobo_property_bag_add (gcal->properties,
- PROPERTY_CALENDAR_URI,
- PROPERTY_CALENDAR_URI_IDX,
- BONOBO_ARG_STRING,
- NULL,
- _("The URI that the calendar will display"),
- 0);
-
- bonobo_control_set_property_bag (gcal->control, gcal->properties);
-}
-
-
-
-static BonoboObject *
-calendar_control_factory (BonoboGenericFactory *Factory, void *closure)
-{
- BonoboControl *control;
-
- /* Create the control. */
- GnomeCalendar *cal = new_calendar (full_name, NULL, NULL, 0);
-
- gtk_widget_show (GTK_WIDGET (cal));
-
- control = bonobo_control_new (GTK_WIDGET (cal));
- cal->control = control;
-
- calendar_properties_init (cal);
-
- gtk_signal_connect (GTK_OBJECT (control), "activate",
- control_activate_cb, cal);
-
- return BONOBO_OBJECT (control);
-}
-
-
-static void
-calendar_control_factory_init (void)
-{
- static BonoboGenericFactory *factory = NULL;
-
- if (factory != NULL)
- return;
-
- puts ("XXXXXX - initializing calendar factory!!!");
-
- factory = bonobo_generic_factory_new (CONTROL_FACTORY_ID, calendar_control_factory, NULL);
-
- if (factory == NULL)
- g_error ("I could not register a Calendar control factory.");
-}
-
-
-int
-main (int argc, char **argv)
-{
- init_bonobo (&argc, argv);
- glade_gnome_init ();
- alarm_init ();
- e_cursors_init ();
-
- init_calendar ();
-
- //g_log_set_always_fatal ((GLogLevelFlags) 0xFFFF);
- g_log_set_always_fatal (G_LOG_LEVEL_ERROR |
- G_LOG_LEVEL_CRITICAL |
- G_LOG_LEVEL_WARNING);
-
- CORBA_exception_init (&ev);
-
- calendar_control_factory_init ();
- component_factory_init ();
-
- bonobo_main ();
-
- return 0;
-}
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 138e5cb280..917489c043 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -37,7 +37,6 @@
#include <gal/e-paned/e-hpaned.h>
#include <gal/e-paned/e-vpaned.h>
#include <cal-util/timeutil.h>
-#include "widgets/misc/e-search-bar.h"
#include "dialogs/alarm-notify-dialog.h"
#include "e-calendar-table.h"
#include "e-day-view.h"
@@ -92,8 +91,6 @@ struct _GnomeCalendarPrivate {
/* Widgets */
- GtkWidget *search_bar;
-
GtkWidget *hpane;
GtkWidget *notebook;
GtkWidget *vpane;
@@ -205,147 +202,6 @@ gnome_calendar_class_init (GnomeCalendarClass *class)
object_class->destroy = gnome_calendar_destroy;
}
-static GtkWidget *
-get_current_page (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- return GTK_NOTEBOOK (priv->notebook)->cur_page->child;
-}
-
-enum {
- SEARCH_SHOW_ALL
-};
-
-static ESearchBarItem search_menu_items[] = {
- { N_("Show all "), SEARCH_SHOW_ALL },
- { NULL, -1 }
-};
-
-enum {
- SEARCH_ANY_FIELD_CONTAINS,
- SEARCH_SUMMARY_CONTAINS,
- SEARCH_DESCRIPTION_CONTAINS,
- SEARCH_COMMENT_CONTAINS,
- SEARCH_HAS_CATEGORY
-};
-
-static ESearchBarItem search_option_items[] = {
- { N_("Any field contains"), SEARCH_ANY_FIELD_CONTAINS },
- { N_("Summary contains"), SEARCH_SUMMARY_CONTAINS },
- { N_("Description contains"), SEARCH_DESCRIPTION_CONTAINS },
- { N_("Comment contains"), SEARCH_COMMENT_CONTAINS },
- { N_("Has category"), SEARCH_HAS_CATEGORY },
- { NULL, -1 }
-};
-
-/* Sets the query sexp for the current view in the calendar */
-static void
-set_query (GnomeCalendar *gcal, char *sexp)
-{
- GnomeCalendarPrivate *priv;
- GtkWidget *page;
-
- g_assert (sexp != NULL);
-
- priv = gcal->priv;
-
- page = get_current_page (gcal);
-
- if (page == priv->day_view || page == priv->work_week_view)
- e_day_view_set_query (E_DAY_VIEW (page), sexp);
- else if (page == priv->week_view || page == priv->month_view)
- e_week_view_set_query (E_WEEK_VIEW (page), sexp);
- else {
- g_warning ("A penguin bit my hand!");
- g_assert_not_reached ();
- }
-}
-
-/* Sets the query string to be (contains? "field" "text") */
-static void
-set_query_contains (GnomeCalendar *gcal, const char *field, const char *text)
-{
- char *sexp;
-
- sexp = g_strdup_printf ("(contains? \"%s\" \"%s\")", field, text);
- set_query (gcal, sexp);
- g_free (sexp);
-}
-
-/* Callback used when the query string is changed in the search bar */
-static void
-search_bar_query_changed_cb (ESearchBar *search_bar, gpointer data)
-{
- GnomeCalendar *gcal;
- int item;
- char *text;
-
- gcal = GNOME_CALENDAR (data);
-
- item = e_search_bar_get_option_choice (search_bar);
- text = e_search_bar_get_text (search_bar);
-
- if (!text)
- return; /* This is an error in the UTF8 conversion, not an empty string! */
-
- switch (item) {
- case SEARCH_ANY_FIELD_CONTAINS:
- set_query_contains (gcal, "any", text);
- break;
-
- case SEARCH_SUMMARY_CONTAINS:
- set_query_contains (gcal, "summary", text);
- break;
-
- case SEARCH_DESCRIPTION_CONTAINS:
- set_query_contains (gcal, "description", text);
- break;
-
- case SEARCH_COMMENT_CONTAINS:
- set_query_contains (gcal, "comment", text);
- break;
-
- case SEARCH_HAS_CATEGORY: {
- char *sexp;
-
- sexp = g_strdup_printf ("(has-categories? \"%s\")", text);
- set_query (gcal, sexp);
- g_free (sexp);
- break;
- }
-
- default:
- g_assert_not_reached ();
- }
-
- g_free (text);
-}
-
-/* Callback used when a menu item is activated in the search bar */
-static void
-search_bar_menu_activated_cb (ESearchBar *search_bar, int item, gpointer data)
-{
- GnomeCalendar *gcal;
-
- gcal = GNOME_CALENDAR (data);
-
- switch (item) {
- case SEARCH_SHOW_ALL:
- set_query (gcal, "#t"); /* match all */
- /* FIXME: should we change the rest of the search bar so that
- * the user sees that he selected "show all" instead of some
- * type/text search combination?
- */
- break;
-
- default:
- g_assert_not_reached ();
- }
-}
-
static void
setup_widgets (GnomeCalendar *gcal)
{
@@ -356,15 +212,6 @@ setup_widgets (GnomeCalendar *gcal)
priv = gcal->priv;
- priv->search_bar = e_search_bar_new (search_menu_items, search_option_items);
- gtk_signal_connect (GTK_OBJECT (priv->search_bar), "query_changed",
- GTK_SIGNAL_FUNC (search_bar_query_changed_cb), gcal);
- gtk_signal_connect (GTK_OBJECT (priv->search_bar), "menu_activated",
- GTK_SIGNAL_FUNC (search_bar_menu_activated_cb), gcal);
-
- gtk_widget_show (priv->search_bar);
- gtk_box_pack_start (GTK_BOX (gcal), priv->search_bar, FALSE, FALSE, 0);
-
/* The main HPaned, with the notebook of calendar views on the left
and the ECalendar and ToDo list on the right. */
priv->hpane = e_hpaned_new ();
@@ -531,6 +378,16 @@ gnome_calendar_destroy (GtkObject *object)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
+static GtkWidget *
+get_current_page (GnomeCalendar *gcal)
+{
+ GnomeCalendarPrivate *priv;
+
+ priv = gcal->priv;
+
+ return GTK_NOTEBOOK (priv->notebook)->cur_page->child;
+}
+
char *
gnome_calendar_get_current_view_name (GnomeCalendar *gcal)
{
diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c
index 448f898638..5c58ea9a74 100644
--- a/calendar/gui/goto.c
+++ b/calendar/gui/goto.c
@@ -9,14 +9,15 @@
*/
#include <config.h>
+#include <glib.h>
#include <gtk/gtkmenu.h>
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkspinbutton.h>
#include <gtk/gtktogglebutton.h>
#include <gtk/gtkwindow.h>
-#include <libgnomeui/gnome-dialog.h>
#include <glade/glade.h>
+#include <libgnomeui/gnome-dialog.h>
#include "calendar-commands.h"
#include "tag-calendar.h"
#include "goto.h"
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index e75819f0f0..674a55078c 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -57,6 +57,7 @@ init_bonobo (int argc, char **argv)
g_error (_("Could not initialize Bonobo"));
}
+
int
main (int argc, char **argv)
{
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 0d3f7288fe..8b84b09372 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,118 +1,11 @@
-2001-04-26 Jeffrey Stedfast <fejj@ximian.com>
+2001-04-20 Not Zed <NotZed@Ximian.com>
- * camel-file-utils.h: #include <sys/types.h> for off_t.
+ * providers/local/camel-mbox-summary.c (summary_rebuild): Use
+ unsigned ints.
-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).
+ * camel-mime-part.c (init_header_name_table): Setupt he
+ header_formatted table with a much more complete list of headers
+ we dont want to fold (addresses).
2001-04-18 Dan Winship <danw@ximian.com>
@@ -128,12 +21,10 @@
* 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>
+2001-04-17 Ettore Perazzoli <ettore@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.
+ * providers/imap/camel-imap-store.c (imap_disconnect):
+ s/imap_store/store/ to get it to compile.
2001-04-17 Dan Winship <danw@ximian.com>
@@ -149,69 +40,27 @@
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.
+2001-04-16 Ettore Perazzoli <ettore@ximian.com>
- * providers/smtp/camel-smtp-transport.c (smtp_helo): Use
- strstrcase.
+ * providers/pop3/Makefile.am (INCLUDES): Add
+ `$(EXTRA_GNOME_CFLAGS)'.
-2001-04-15 Jeffrey Stedfast <fejj@ximian.com>
+ * providers/nntp/Makefile.am (INCLUDES): Add
+ `$(EXTRA_GNOME_CFLAGS)'.
- * 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).
+ * providers/cache/Makefile.am (INCLUDES): Add
+ `$(EXTRA_GNOME_CFLAGS)'.
-2001-04-14 Jeffrey Stedfast <fejj@ximian.com>
+ * providers/local/Makefile.am (INCLUDES): Add
+ `$(EXTRA_GNOME_CFLAGS)'.
- * camel-cipher-context.c: Check to make sure the context is a
- valid context in all the user functions.
+2001-04-16 Ettore Perazzoli <ettore@ximian.com>
-2001-04-13 Jon Trowbridge <trow@ximian.com>
+ * providers/imap/Makefile.am (INCLUDES): Add
+ $(EXTRA_GNOME_CFLAGS)'.
- * 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.
+ * providers/smtp/Makefile.am (INCLUDES): Add
+ `$(EXTRA_GNOME_CFLAGS)'.
2001-04-13 Dan Winship <danw@ximian.com>
@@ -227,37 +76,11 @@
(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.
@@ -267,392 +90,6 @@
* 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
@@ -779,7 +216,6 @@
(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>
diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c
index 464ccc1539..2cacf6b40a 100644
--- a/camel/camel-filter-driver.c
+++ b/camel/camel-filter-driver.c
@@ -849,8 +849,7 @@ camel_filter_driver_filter_message (CamelFilterDriver *driver, CamelMimeMessage
p->uid = uid;
p->source = source;
- if (camel_mime_message_get_source (message) == NULL)
- camel_mime_message_set_source (message, source_url);
+ /* camel_mime_message_set_identity (message, source_url); */
node = (struct _filter_rule *)p->rules.head;
while (node->next) {
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index e9b60cebc2..69444641cd 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -24,6 +24,7 @@
#endif
#include <unistd.h>
+#include <netinet/in.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
@@ -31,7 +32,9 @@
#include "camel-folder-summary.h"
-#include <camel/camel-file-utils.h>
+#include <camel/camel-mime-message.h>
+#include <camel/camel-multipart.h>
+
#include <camel/camel-mime-filter.h>
#include <camel/camel-mime-filter-index.h>
#include <camel/camel-mime-filter-charset.h>
@@ -39,7 +42,6 @@
#include <camel/camel-mime-filter-basic.h>
#include <camel/camel-mime-filter-html.h>
#include <camel/camel-mime-message.h>
-#include <camel/camel-multipart.h>
#include <camel/camel-stream-mem.h>
#include "hash-table-utils.h"
@@ -151,7 +153,7 @@ camel_folder_summary_init (CamelFolderSummary *s)
s->message_info_chunks = NULL;
s->content_info_chunks = NULL;
-#if defined (DOESTRV) || defined (DOEPOOLV)
+#ifdef DOESTRV
s->message_info_strings = CAMEL_MESSAGE_INFO_LAST;
#endif
@@ -506,7 +508,7 @@ perform_content_info_load(CamelFolderSummary *s, FILE *in)
if (ci == NULL)
return NULL;
- if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500) {
+ if (camel_folder_summary_decode_uint32(in, &count) == -1 || count > 500) {
camel_folder_summary_content_info_free(s, ci);
return NULL;
}
@@ -585,7 +587,7 @@ perform_content_info_save(CamelFolderSummary *s, FILE *out, CamelMessageContentI
CamelMessageContentInfo *part;
((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_save(s, out, ci);
- camel_file_util_encode_uint32(out, my_list_size((struct _node **)&ci->childs));
+ camel_folder_summary_encode_uint32(out, my_list_size((struct _node **)&ci->childs));
part = ci->childs;
while (part) {
perform_content_info_save(s, out, part);
@@ -704,7 +706,6 @@ void camel_folder_summary_add(CamelFolderSummary *s, CamelMessageInfo *info)
CAMEL_SUMMARY_LOCK(s, summary_lock);
-/* unnecessary for pooled vectors */
#ifdef DOESTRV
/* this is vitally important, and also if this is ever modified, then
the hash table needs to be resynced */
@@ -1065,6 +1066,200 @@ void camel_folder_summary_remove_index(CamelFolderSummary *s, int index)
}
}
+/**
+ * camel_folder_summary_encode_uint32:
+ * @out:
+ * @value:
+ *
+ * Utility function to save an uint32 to a file.
+ *
+ * Return value: -1 on error.
+ **/
+int
+camel_folder_summary_encode_uint32(FILE *out, guint32 value)
+{
+ int i;
+
+ io(printf("Encoding int %u\n", value));
+
+ for (i=28;i>0;i-=7) {
+ if (value >= (1<<i)) {
+ unsigned int c = (value>>i) & 0x7f;
+ if (fputc(c, out) == -1)
+ return -1;
+ }
+ }
+ return fputc(value | 0x80, out);
+}
+
+/**
+ * camel_folder_summary_decode_uint32:
+ * @in:
+ * @dest:
+ *
+ * Retrieve an encoded uint32 from a file.
+ *
+ * Return value: -1 on error. @*dest will contain the
+ * decoded value.
+ **/
+int
+camel_folder_summary_decode_uint32(FILE *in, guint32 *dest)
+{
+ guint32 value=0, v;
+
+ /* until we get the last byte, keep decoding 7 bits at a time */
+ while ( ((v = fgetc(in)) & 0x80) == 0 && v!=EOF) {
+ value |= v;
+ value <<= 7;
+ }
+ if (v == EOF) {
+ *dest = value>>7;
+ return -1;
+ }
+ *dest = value | (v&0x7f);
+
+ io(printf("Decoding int %u\n", *dest));
+
+ return 0;
+}
+
+/**
+ * camel_folder_summary_encode_fixed_int32:
+ * @out:
+ * @value:
+ *
+ * Encode a gint32, performing no compression, but converting
+ * to network order.
+ *
+ * Return value: -1 on error.
+ **/
+int
+camel_folder_summary_encode_fixed_int32(FILE *out, gint32 value)
+{
+ guint32 save;
+
+ save = htonl(value);
+ if (fwrite(&save, sizeof(save), 1, out) != 1)
+ return -1;
+ return 0;
+}
+
+/**
+ * camel_folder_summary_decode_fixed_int32:
+ * @in:
+ * @dest:
+ *
+ * Retrieve a gint32.
+ *
+ * Return value: -1 on error.
+ **/
+int
+camel_folder_summary_decode_fixed_int32(FILE *in, gint32 *dest)
+{
+ guint32 save;
+
+ if (fread(&save, sizeof(save), 1, in) == 1) {
+ *dest = ntohl(save);
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+/**
+ * camel_folder_summary_encode_time_t:
+ * @out:
+ * @value:
+ *
+ * Encode a time_t value to the file.
+ *
+ * Return value: -1 on error.
+ **/
+int
+camel_folder_summary_encode_time_t(FILE *out, time_t value)
+{
+ int i;
+
+ for (i=sizeof(time_t)-1;i>=0;i--) {
+ if (fputc((value >> (i*8)) & 0xff, out) == -1)
+ return -1;
+ }
+ return 0;
+}
+
+/**
+ * camel_folder_summary_decode_time_t:
+ * @in:
+ * @dest:
+ *
+ * Decode a time_t value.
+ *
+ * Return value: -1 on error.
+ **/
+int
+camel_folder_summary_decode_time_t(FILE *in, time_t *dest)
+{
+ time_t save = 0;
+ unsigned int v;
+ int i = sizeof(time_t) - 1;
+
+ while ( i>=0 && (v = fgetc(in)) != EOF) {
+ save |= v << (i*8);
+ i--;
+ }
+ *dest = save;
+ if (v == EOF)
+ return -1;
+ return 0;
+}
+
+/**
+ * camel_folder_summary_encode_off_t:
+ * @out:
+ * @value:
+ *
+ * Encode an off_t type.
+ *
+ * Return value:
+ **/
+int
+camel_folder_summary_encode_off_t(FILE *out, off_t value)
+{
+ int i;
+
+ for (i=sizeof(off_t)-1;i>=0;i--) {
+ if (fputc((value >> (i*8)) & 0xff, out) == -1)
+ return -1;
+ }
+ return 0;
+}
+
+/**
+ * camel_folder_summary_decode_off_t:
+ * @in:
+ * @dest:
+ *
+ * Decode an off_t type.
+ *
+ * Return value:
+ **/
+int
+camel_folder_summary_decode_off_t(FILE *in, off_t *dest)
+{
+ off_t save = 0;
+ unsigned int v;
+ int i = sizeof(off_t) - 1;
+
+ while ( i>=0 && (v = fgetc(in)) != EOF) {
+ save |= v << (i*8);
+ i--;
+ }
+ *dest = save;
+ if (v == EOF)
+ return -1;
+ return 0;
+}
+
/* should be sorted, for binary search */
/* This is a tokenisation mechanism for strings written to the
summary - to save space.
@@ -1131,7 +1326,7 @@ 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);
+ return camel_folder_summary_encode_uint32(out, 0);
} else {
int len = strlen(str);
int i, token=-1;
@@ -1157,9 +1352,9 @@ camel_folder_summary_encode_token(FILE *out, const char *str)
#endif
}
if (token != -1) {
- return camel_file_util_encode_uint32(out, token+1);
+ return camel_folder_summary_encode_uint32(out, token+1);
} else {
- if (camel_file_util_encode_uint32(out, len+32) == -1)
+ if (camel_folder_summary_encode_uint32(out, len+32) == -1)
return -1;
if (fwrite(str, len, 1, out) != 1)
return -1;
@@ -1185,7 +1380,7 @@ camel_folder_summary_decode_token(FILE *in, char **str)
io(printf("Decode token ...\n"));
- if (camel_file_util_decode_uint32(in, &len) == -1) {
+ if (camel_folder_summary_decode_uint32(in, &len) == -1) {
g_warning("Could not decode token from file");
*str = NULL;
return -1;
@@ -1222,6 +1417,77 @@ camel_folder_summary_decode_token(FILE *in, char **str)
return 0;
}
+/**
+ * camel_folder_summary_encode_string:
+ * @out:
+ * @str:
+ *
+ * Encode a normal string and save it in the output file.
+ *
+ * Return value: -1 on error.
+ **/
+int
+camel_folder_summary_encode_string(FILE *out, const char *str)
+{
+ register int len;
+
+ io(printf("Encoding string: '%s'\n", str));
+
+ if (str == NULL)
+ return camel_folder_summary_encode_uint32(out, 0);
+
+ len = strlen(str);
+ if (camel_folder_summary_encode_uint32(out, len+1) == -1)
+ return -1;
+ if (fwrite(str, len, 1, out) == 1)
+ return 0;
+ return -1;
+}
+
+
+/**
+ * camel_folder_summary_decode_string:
+ * @in:
+ * @str:
+ *
+ * Decode a normal string from the input file.
+ *
+ * Return value: -1 on error.
+ **/
+int
+camel_folder_summary_decode_string(FILE *in, char **str)
+{
+ guint32 len;
+ register char *ret;
+
+ io(printf("Decode string ...\n", str));
+
+ if (camel_folder_summary_decode_uint32(in, &len) == -1) {
+ *str = NULL;
+ return -1;
+ }
+
+ len--;
+ if (len > 65536) {
+ *str = NULL;
+ io(printf("String = '%s'\n", *str));
+ return -1;
+ }
+
+ ret = g_malloc(len+1);
+ if (fread(ret, len, 1, in) != 1) {
+ g_free(ret);
+ *str = NULL;
+ return -1;
+ }
+
+ io(printf("String = '%s'\n", ret));
+
+ ret[len] = 0;
+ *str = ret;
+ return 0;
+}
+
static struct _node *
my_list_append(struct _node **list, struct _node *n)
{
@@ -1255,11 +1521,11 @@ summary_header_load(CamelFolderSummary *s, FILE *in)
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) {
+ if (camel_folder_summary_decode_fixed_int32(in, &version) == -1
+ || camel_folder_summary_decode_fixed_int32(in, &flags) == -1
+ || camel_folder_summary_decode_fixed_int32(in, &nextuid) == -1
+ || camel_folder_summary_decode_time_t(in, &time) == -1
+ || camel_folder_summary_decode_fixed_int32(in, &count) == -1) {
return -1;
}
@@ -1281,11 +1547,11 @@ summary_header_save(CamelFolderSummary *s, FILE *out)
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));
+ camel_folder_summary_encode_fixed_int32(out, s->version);
+ camel_folder_summary_encode_fixed_int32(out, s->flags);
+ camel_folder_summary_encode_fixed_int32(out, s->nextuid);
+ camel_folder_summary_encode_time_t(out, s->time);
+ return camel_folder_summary_encode_fixed_int32(out, camel_folder_summary_count(s));
}
/* are these even useful for anything??? */
@@ -1405,9 +1671,6 @@ camel_folder_summary_info_new(CamelFolderSummary *s)
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
@@ -1448,36 +1711,27 @@ message_info_new(CamelFolderSummary *s, struct _header_raw *h)
struct _header_references *refs, *scan;
char *msgid;
int count;
- char *subject, *from, *to, *cc, *mlist;
mi = camel_folder_summary_info_new(s);
- subject = camel_folder_summary_format_string(h, "subject");
- from = camel_folder_summary_format_address(h, "from");
- to = camel_folder_summary_format_address(h, "to");
- cc = camel_folder_summary_format_address(h, "cc");
- mlist = header_raw_check_mailing_list(&h);
-
-#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);
+#ifdef DOESTRV
+ msgid = camel_folder_summary_format_string(h, "subject");
+ e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, msgid);
+ msgid = camel_folder_summary_format_address(h, "from");
+ e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_FROM, msgid);
+ msgid = camel_folder_summary_format_address(h, "to");
+ e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_TO, msgid);
+ msgid = camel_folder_summary_format_address(h, "cc");
+ e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_CC, msgid);
+ msgid = header_raw_check_mailing_list(&h);
+ e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_MLIST, msgid);
#else
- mi->subject = subject;
- mi->from = from;
- mi->to = to;
- mi->cc = cc;
- mi->mlist = mlist;
+ mi->subject = camel_folder_summary_format_string(h, "subject");
+ mi->from = camel_folder_summary_format_address(h, "from");
+ mi->to = camel_folder_summary_format_address(h, "to");
+ mi->cc = camel_folder_summary_format_address(h, "cc");
+ mi->mlist = header_raw_check_mailing_list(&h);
#endif
-
mi->user_flags = NULL;
mi->user_tags = NULL;
mi->date_sent = header_decode_date(header_raw_find(&h, "date", NULL), NULL);
@@ -1526,80 +1780,76 @@ message_info_load(CamelFolderSummary *s, FILE *in)
CamelMessageInfo *mi;
guint count;
int i;
- char *subject, *from, *to, *cc, *mlist, *uid;;
+#ifdef DOESTRV
+ char *tmp;
+#endif
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);
+#ifdef DOESTRV
+ camel_folder_summary_decode_string(in, &tmp);
+ e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_UID, tmp);
+ camel_folder_summary_decode_uint32(in, &mi->flags);
+ camel_folder_summary_decode_uint32(in, &mi->size);
+ camel_folder_summary_decode_time_t(in, &mi->date_sent);
+ camel_folder_summary_decode_time_t(in, &mi->date_received);
+ camel_folder_summary_decode_string(in, &tmp);
+ e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_SUBJECT, tmp);
+ camel_folder_summary_decode_string(in, &tmp);
+ e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_FROM, tmp);
+ camel_folder_summary_decode_string(in, &tmp);
+ e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_TO, tmp);
+ camel_folder_summary_decode_string(in, &tmp);
+ e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_CC, tmp);
+ camel_folder_summary_decode_string(in, &tmp);
+ e_strv_set_ref_free(mi->strings, CAMEL_MESSAGE_INFO_MLIST, tmp);
#else
- mi->uid = uid;
- mi->subject = subject;
- mi->from = from;
- mi->to = to;
- mi->cc = cc;
- mi->mlist = mlist;
+ camel_folder_summary_decode_string(in, &mi->uid);
+ camel_folder_summary_decode_uint32(in, &mi->flags);
+ camel_folder_summary_decode_uint32(in, &mi->size);
+ camel_folder_summary_decode_time_t(in, &mi->date_sent);
+ camel_folder_summary_decode_time_t(in, &mi->date_received);
+ camel_folder_summary_decode_string(in, &mi->subject);
+ camel_folder_summary_decode_string(in, &mi->from);
+ camel_folder_summary_decode_string(in, &mi->to);
+ camel_folder_summary_decode_string(in, &mi->cc);
+ camel_folder_summary_decode_string(in, &mi->mlist);
#endif
-
mi->content = NULL;
- camel_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);
+ camel_folder_summary_decode_fixed_int32(in, &mi->message_id.id.part.hi);
+ camel_folder_summary_decode_fixed_int32(in, &mi->message_id.id.part.lo);
- if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500)
+ if (camel_folder_summary_decode_uint32(in, &count) == -1 || count > 500)
goto error;
if (count > 0) {
mi->references = g_malloc(sizeof(*mi->references) + ((count-1) * sizeof(mi->references->references[0])));
mi->references->size = count;
for (i=0;i<count;i++) {
- camel_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);
+ camel_folder_summary_decode_fixed_int32(in, &mi->references->references[i].id.part.hi);
+ camel_folder_summary_decode_fixed_int32(in, &mi->references->references[i].id.part.lo);
}
}
- if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500)
+ if (camel_folder_summary_decode_uint32(in, &count) == -1 || count > 500)
goto error;
for (i=0;i<count;i++) {
char *name;
- camel_file_util_decode_string(in, &name);
+ camel_folder_summary_decode_string(in, &name);
camel_flag_set(&mi->user_flags, name, TRUE);
g_free(name);
}
- if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500)
+ if (camel_folder_summary_decode_uint32(in, &count) == -1 || count > 500)
goto error;
for (i=0;i<count;i++) {
char *name, *value;
- camel_file_util_decode_string(in, &name);
- camel_file_util_decode_string(in, &value);
+ camel_folder_summary_decode_string(in, &name);
+ camel_folder_summary_decode_string(in, &value);
camel_tag_set(&mi->user_tags, name, value);
g_free(name);
g_free(value);
@@ -1624,44 +1874,44 @@ message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageInfo *mi)
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_folder_summary_encode_string(out, camel_message_info_uid(mi));
+ camel_folder_summary_encode_uint32(out, mi->flags);
+ camel_folder_summary_encode_uint32(out, mi->size);
+ camel_folder_summary_encode_time_t(out, mi->date_sent);
+ camel_folder_summary_encode_time_t(out, mi->date_received);
+ camel_folder_summary_encode_string(out, camel_message_info_subject(mi));
+ camel_folder_summary_encode_string(out, camel_message_info_from(mi));
+ camel_folder_summary_encode_string(out, camel_message_info_to(mi));
+ camel_folder_summary_encode_string(out, camel_message_info_cc(mi));
+ camel_folder_summary_encode_string(out, camel_message_info_mlist(mi));
- camel_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);
+ camel_folder_summary_encode_fixed_int32(out, mi->message_id.id.part.hi);
+ camel_folder_summary_encode_fixed_int32(out, mi->message_id.id.part.lo);
if (mi->references) {
- camel_file_util_encode_uint32(out, mi->references->size);
+ camel_folder_summary_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);
+ camel_folder_summary_encode_fixed_int32(out, mi->references->references[i].id.part.hi);
+ camel_folder_summary_encode_fixed_int32(out, mi->references->references[i].id.part.lo);
}
} else {
- camel_file_util_encode_uint32(out, 0);
+ camel_folder_summary_encode_uint32(out, 0);
}
count = camel_flag_list_size(&mi->user_flags);
- camel_file_util_encode_uint32(out, count);
+ camel_folder_summary_encode_uint32(out, count);
flag = mi->user_flags;
while (flag) {
- camel_file_util_encode_string(out, flag->name);
+ camel_folder_summary_encode_string(out, flag->name);
flag = flag->next;
}
count = camel_tag_list_size(&mi->user_tags);
- camel_file_util_encode_uint32(out, count);
+ camel_folder_summary_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);
+ camel_folder_summary_encode_string(out, tag->name);
+ camel_folder_summary_encode_string(out, tag->value);
tag = tag->next;
}
@@ -1671,9 +1921,7 @@ message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageInfo *mi)
static void
message_info_free(CamelFolderSummary *s, CamelMessageInfo *mi)
{
-#ifdef DOEPOOLV
- e_poolv_destroy(mi->strings);
-#elif defined (DOESTRV)
+#ifdef DOESTRV
e_strv_destroy(mi->strings);
#else
g_free(mi->uid);
@@ -1720,7 +1968,7 @@ content_info_load(CamelFolderSummary *s, FILE *in)
ct = header_content_type_new(type, subtype);
g_free(type); /* can this be removed? */
g_free(subtype);
- if (camel_file_util_decode_uint32(in, &count) == -1 || count > 500)
+ if (camel_folder_summary_decode_uint32(in, &count) == -1 || count > 500)
goto error;
for (i=0;i<count;i++) {
@@ -1738,7 +1986,7 @@ content_info_load(CamelFolderSummary *s, FILE *in)
camel_folder_summary_decode_token(in, &ci->description);
camel_folder_summary_decode_token(in, &ci->encoding);
- camel_file_util_decode_uint32(in, &ci->size);
+ camel_folder_summary_decode_uint32(in, &ci->size);
ci->childs = NULL;
@@ -1762,7 +2010,7 @@ content_info_save(CamelFolderSummary *s, FILE *out, CamelMessageContentInfo *ci)
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));
+ camel_folder_summary_encode_uint32(out, my_list_size((struct _node **)&ct->params));
hp = ct->params;
while (hp) {
camel_folder_summary_encode_token(out, hp->name);
@@ -1772,12 +2020,12 @@ content_info_save(CamelFolderSummary *s, FILE *out, CamelMessageContentInfo *ci)
} 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_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);
+ return camel_folder_summary_encode_uint32(out, ci->size);
}
static void
@@ -2267,9 +2515,6 @@ 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
@@ -2346,10 +2591,8 @@ camel_message_info_dup_to(const CamelMessageInfo *from, CamelMessageInfo *to)
to->refcount = 1;
/* Copy strings */
-#ifdef DOEPOOLV
- e_poolv_cpy (to->strings, from->strings);
-#elif defined (DOESTRV)
- /* to->strings = e_strv_new(CAMEL_MESSAGE_INFO_LAST); */
+#ifdef DOESTRV
+ to->strings = e_strv_new(CAMEL_MESSAGE_INFO_LAST);
e_strv_set(to->strings, CAMEL_MESSAGE_INFO_SUBJECT, camel_message_info_subject(from));
e_strv_set(to->strings, CAMEL_MESSAGE_INFO_FROM, camel_message_info_from(from));
e_strv_set(to->strings, CAMEL_MESSAGE_INFO_TO, camel_message_info_to(from));
@@ -2418,9 +2661,7 @@ camel_message_info_free(CamelMessageInfo *mi)
}
GLOBAL_INFO_UNLOCK(info);
-#ifdef DOEPOOLV
- e_poolv_destroy(mi->strings);
-#elif defined (DOESTRV)
+#ifdef DOESTRV
e_strv_destroy(mi->strings);
#else
g_free(mi->uid);
@@ -2437,26 +2678,19 @@ camel_message_info_free(CamelMessageInfo *mi)
g_free(mi);
}
-#if defined (DOEPOOLV) || defined (DOESTRV)
+#ifdef DOESTRV
const char *camel_message_info_string(const CamelMessageInfo *mi, int type)
{
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->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
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index c8720b2fea..28f48a195e 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -23,24 +23,21 @@
* USA
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
#include <string.h>
+#include "camel-mime-part.h"
#include <stdio.h>
-#include <ctype.h>
+#include "string-utils.h"
#include "hash-table-utils.h"
+#include "camel-mime-part-utils.h"
+#include <ctype.h>
#include "camel-mime-parser.h"
#include "camel-stream-mem.h"
#include "camel-stream-filter.h"
#include "camel-mime-filter-basic.h"
#include "camel-mime-filter-crlf.h"
#include "camel-mime-filter-charset.h"
-#include "camel-mime-part.h"
-#include "camel-mime-part-utils.h"
#include "camel-exception.h"
-#include "string-utils.h"
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
@@ -84,6 +81,13 @@ static int construct_from_parser (CamelMimePart *, CamelMi
/* forward references */
static void set_disposition (CamelMimePart *mime_part, const gchar *disposition);
+static char *header_formatted[] = {
+ "Content-Type", "Content-Disposition", "Message-ID", "Resent-Message-ID",
+ "To", "Resent-To", "Cc", "Resent-cc", "Bcc", "Resent-bcc",
+ "From", "Resent-From", "Sender", "Resent-Sender",
+ "Reply-To", "Resent-Reply-To",
+};
+
/* loads in a hash table the set of header names we */
/* recognize and associate them with a unique enum */
@@ -91,6 +95,8 @@ static void set_disposition (CamelMimePart *mime_part, const gchar *disposition)
static void
init_header_name_table()
{
+ int i;
+
header_name_table = g_hash_table_new (g_strcase_hash, g_strcase_equal);
g_hash_table_insert (header_name_table, "Content-Description", (gpointer)HEADER_DESCRIPTION);
g_hash_table_insert (header_name_table, "Content-Disposition", (gpointer)HEADER_DISPOSITION);
@@ -100,13 +106,8 @@ init_header_name_table()
g_hash_table_insert (header_name_table, "Content-Type", (gpointer)HEADER_CONTENT_TYPE);
header_formatted_table = g_hash_table_new(g_strcase_hash, g_strcase_equal);
- g_hash_table_insert(header_formatted_table, "Content-Type", (void *)1);
- g_hash_table_insert(header_formatted_table, "Content-Disposition", (void *)1);
- g_hash_table_insert(header_formatted_table, "To", (void *)1);
- g_hash_table_insert(header_formatted_table, "From", (void *)1);
- g_hash_table_insert(header_formatted_table, "Cc", (void *)1);
- g_hash_table_insert(header_formatted_table, "Bcc", (void *)1);
- g_hash_table_insert(header_formatted_table, "Message-ID", (void *)1);
+ for (i=0;i<sizeof(header_formatted)/sizeof(header_formatted[0]);i++)
+ g_hash_table_insert(header_formatted_table, header_formatted[i], (void *)1);
}
static void
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 7e486689ef..ed6589819f 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -38,6 +38,7 @@
#define MAXHOSTNAMELEN 1024
#endif
+#include <unicode.h>
#include <iconv.h>
#include <time.h>
@@ -47,7 +48,6 @@
#include <regex.h>
#include <glib.h>
-#include <gal/unicode/gunicode.h>
#include "camel-mime-utils.h"
#include "camel-charset-map.h"
@@ -128,7 +128,7 @@ static unsigned char camel_mime_base64_rank[256] = {
if any of these change, then the tables above should be regenerated
by compiling this with -DBUILD_TABLE, and running.
- gcc -DCLEAN_DATE -o buildtable -I.. `gnome-config --cflags --libs gal` -DBUILD_TABLE camel-mime-utils.c camel-charset-map.c
+ gcc -DCLEAN_DATE -o buildtable -I.. `glib-config --cflags --libs` -lunicode -DBUILD_TABLE camel-mime-utils.c camel-charset-map.c
./buildtable
*/
@@ -1277,19 +1277,18 @@ header_encode_string (const unsigned char *in)
word = NULL;
start = inptr;
while (inptr && *inptr) {
- gunichar c;
+ unicode_char_t c;
const char *newinptr;
- newinptr = g_utf8_next_char (inptr);
+ newinptr = unicode_get_utf8 (inptr, &c);
if (newinptr == NULL) {
w(g_warning ("Invalid UTF-8 sequence encountered (pos %d, char '%c'): %s",
(inptr-in), inptr[0], in));
inptr++;
continue;
}
- c = g_utf8_get_char (inptr);
- if (g_unichar_isspace (c) && !last_was_space) {
+ if (unicode_isspace (c) && !last_was_space) {
/* we've reached the end of a 'word' */
if (word && !(last_was_encoded && encoding)) {
g_string_append_len (out, start, word - start);
@@ -1328,11 +1327,11 @@ header_encode_string (const unsigned char *in)
} else if (c >= 256) {
encoding = MAX (encoding, 2);
last_was_space = FALSE;
- } else if (!g_unichar_isspace (c)) {
+ } else if (!unicode_isspace (c)) {
last_was_space = FALSE;
}
- if (!g_unichar_isspace (c) && !word)
+ if (!unicode_isspace (c) && !word)
word = inptr;
inptr = newinptr;
@@ -1423,20 +1422,19 @@ header_encode_phrase_get_words (const unsigned char *in)
start = inptr;
encoding = 0;
while (inptr && *inptr) {
- gunichar c;
+ unicode_char_t c;
const char *newinptr;
- newinptr = g_utf8_next_char (inptr);
+ newinptr = unicode_get_utf8 (inptr, &c);
if (newinptr == NULL) {
w(g_warning ("Invalid UTF-8 sequence encountered (pos %d, char '%c'): %s",
(inptr - in), inptr[0], in));
inptr++;
continue;
}
- c = g_utf8_get_char (inptr);
inptr = newinptr;
- if (g_unichar_isspace (c)) {
+ if (unicode_isspace (c)) {
if (count > 0) {
word = g_new0 (struct _phrase_word, 1);
word->start = start;
@@ -3058,21 +3056,11 @@ header_raw_check_mailing_list(struct _header_raw **list)
const char *v;
regex_t pattern;
regmatch_t match[2];
- int i, errcode;
-
- for (i = 0; i < sizeof (mail_list_magic) / sizeof (mail_list_magic[0]); i++) {
- if ((errcode = regcomp (&pattern, mail_list_magic[i].pattern, REG_EXTENDED|REG_ICASE)) != 0) {
- char *errstr;
- size_t len;
-
- len = regerror (errcode, &pattern, NULL, 0);
- errstr = g_malloc0 (len + 1);
- regerror (errcode, &pattern, errstr, len);
-
- g_warning ("Internal error, compiling regex failed: %s: %s",
- mail_list_magic[i].pattern, errstr);
- g_free (errstr);
-
+ int i;
+
+ for (i=0;i<sizeof(mail_list_magic)/sizeof(mail_list_magic[0]);i++) {
+ if (regcomp(&pattern, mail_list_magic[i].pattern, REG_EXTENDED|REG_ICASE) == -1) {
+ g_warning("Internal error, compiling regex failed: %s: %s", mail_list_magic[i].pattern, strerror(errno));
continue;
}
diff --git a/camel/camel-movemail.c b/camel/camel-movemail.c
index 4e1d67563d..c80b8d3902 100644
--- a/camel/camel-movemail.c
+++ b/camel/camel-movemail.c
@@ -23,9 +23,7 @@
* USA
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <sys/stat.h>
#include <sys/uio.h>
diff --git a/camel/camel-object.c b/camel/camel-object.c
index 7f53a68bfe..50c0c213f9 100644
--- a/camel/camel-object.c
+++ b/camel/camel-object.c
@@ -23,11 +23,7 @@
* USA
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
-#include <string.h>
#include "camel-object.h"
/* I just mashed the keyboard for these... */
@@ -336,10 +332,8 @@ obj_finalize (CamelObject * obj)
obj->s.magic = CAMEL_OBJECT_FINALIZED_VALUE;
if (obj->event_to_hooklist) {
-#if 0
g_hash_table_foreach (obj->event_to_hooklist, (GHFunc) g_free,
NULL);
-#endif
g_hash_table_destroy (obj->event_to_hooklist);
obj->event_to_hooklist = NULL;
}
diff --git a/camel/camel-operation.c b/camel/camel-operation.c
index 0b5678d29a..1f7d6494b0 100644
--- a/camel/camel-operation.c
+++ b/camel/camel-operation.c
@@ -1,6 +1,5 @@
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+
+#include "config.h"
#include <stdio.h>
#ifdef ENABLE_THREADS
@@ -62,8 +61,6 @@ static pthread_mutex_t operation_active_lock = PTHREAD_MUTEX_INITIALIZER;
#define CAMEL_ACTIVE_UNLOCK()
#endif
-static unsigned int stamp (void);
-
static GHashTable *operation_active;
typedef struct _CamelOperationMsg {
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
index ba1dfd5b48..7de7cd9a8b 100644
--- a/camel/camel-provider.c
+++ b/camel/camel-provider.c
@@ -29,9 +29,10 @@
/* FIXME: Shouldn't we add a version number to providers ? */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
+#include "camel-provider.h"
+#include "camel-exception.h"
+#include "hash-table-utils.h"
#include <dirent.h>
#include <errno.h>
@@ -40,10 +41,6 @@
#include <gmodule.h>
-#include "camel-provider.h"
-#include "camel-exception.h"
-#include "hash-table-utils.h"
-
/**
* camel_provider_init:
*
diff --git a/camel/camel-remote-store.c b/camel/camel-remote-store.c
index a0f142e889..d07a5f824b 100644
--- a/camel/camel-remote-store.c
+++ b/camel/camel-remote-store.c
@@ -23,9 +23,7 @@
*
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <sys/time.h>
#include <sys/types.h>
@@ -233,7 +231,6 @@ remote_connect (CamelService *service, CamelException *ex)
#endif /* HAVE_NSS */
ret = camel_tcp_stream_connect (CAMEL_TCP_STREAM (tcp_stream), h, port);
- camel_free_host(h);
if (ret == -1) {
if (errno == EINTR)
camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c
index e46cc29cc8..e5adb5de02 100644
--- a/camel/camel-search-private.c
+++ b/camel/camel-search-private.c
@@ -22,13 +22,12 @@
*
*/
-/* (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
+/* (from glibc headers:
+ POSIX says that <sys/types.h> must be included (by the caller) before <regex.h>. */
#include <sys/types.h>
#include <regex.h>
#include <string.h>
@@ -40,11 +39,10 @@
#include "camel-multipart.h"
#include "camel-stream-mem.h"
#include "e-util/e-sexp.h"
+#include <unicode.h>
#include "camel-search-private.h"
-#include <gal/unicode/gunicode.h>
-
#define d(x)
/* builds the regex into pattern */
@@ -191,16 +189,55 @@ header_soundex(const char *header, const char *match)
return truth;
}
-static gunichar
+#if 0
+/* Why do it this way when the unicode lib already has a function to do this? */
+static unicode_char_t
+utf8_get (const char **inp)
+{
+ guint32 c, v = 0, s, shift;
+ const unsigned char *p = *inp;
+
+ if (p == NULL)
+ return 0;
+
+ s = *p++;
+ if ((s & 0x80) == 0) { /* 7 bit char */
+ v = s;
+ } else if (s>0xf7) { /* invalid char, we can only have upto 4 bits encoded */
+ p = NULL;
+ } else if (s>=0xc0) { /* valid start char */
+ shift = 0;
+ do {
+ c = *p++;
+ if ((c & 0xc0) == 0x80) {
+ v = (v<<6) | (c&0x3f);
+ shift += 5;
+ } else {
+ *inp = NULL;
+ return 0;
+ }
+ s <<= 1;
+ } while ((s & 0x80) != 0);
+ v |= s << shift;
+ } else { /* invalid start char, internal char */
+ p = NULL;
+ }
+
+ *inp = p;
+ return v;
+}
+#endif
+
+static unicode_char_t
utf8_get (const char **inp)
{
const unsigned char *p = *inp;
- gunichar c;
+ unicode_char_t c;
g_return_val_if_fail (p != NULL, 0);
- c = g_utf8_get_char (p);
- *inp = g_utf8_next_char (p);
+ p = unicode_get_utf8 (p, &c);
+ *inp = p;
return c;
}
@@ -208,8 +245,8 @@ utf8_get (const char **inp)
static const char *
camel_ustrstrcase (const char *haystack, const char *needle)
{
- gunichar *nuni, *puni;
- gunichar u;
+ unicode_char_t *nuni, *puni;
+ unicode_char_t u;
const char *p;
g_return_val_if_fail (haystack != NULL, NULL);
@@ -220,11 +257,11 @@ camel_ustrstrcase (const char *haystack, const char *needle)
if (strlen(haystack) == 0)
return NULL;
- puni = nuni = alloca (sizeof (gunichar) * strlen (needle));
+ puni = nuni = alloca (sizeof (unicode_char_t) * strlen (needle));
p = needle;
while ((u = utf8_get (&p)))
- *puni++ = g_unichar_tolower (u);
+ *puni++ = unicode_tolower (u);
/* NULL means there was illegal utf-8 sequence */
if (!p)
@@ -232,9 +269,9 @@ camel_ustrstrcase (const char *haystack, const char *needle)
p = haystack;
while ((u = utf8_get (&p))) {
- gunichar c;
+ unicode_char_t c;
- c = g_unichar_tolower (u);
+ c = unicode_tolower (u);
/* We have valid stripped char */
if (c == nuni[0]) {
const gchar *q = p;
@@ -245,7 +282,7 @@ camel_ustrstrcase (const char *haystack, const char *needle)
if (!q || !u)
return NULL;
- c = g_unichar_tolower (u);
+ c = unicode_tolower (u);
if (c != nuni[npos])
break;
@@ -273,15 +310,15 @@ camel_ustrstrcase (const char *haystack, const char *needle)
static int
camel_ustrcasecmp (const char *s1, const char *s2)
{
- gunichar u1, u2 = 0;
+ unicode_char_t 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);
+ u1 = unicode_tolower (u1);
+ u2 = unicode_tolower (u2);
if (u1 < u2)
return -1;
else if (u1 > u2)
@@ -303,15 +340,15 @@ camel_ustrcasecmp (const char *s1, const char *s2)
static int
camel_ustrncasecmp (const char *s1, const char *s2, size_t len)
{
- gunichar u1, u2 = 0;
+ unicode_char_t u1, u2 = 0;
CAMEL_SEARCH_COMPARE (s1, s2, NULL);
u1 = utf8_get (&s1);
u2 = utf8_get (&s2);
while (len > 0 && u1 && u2) {
- u1 = g_unichar_tolower (u1);
- u2 = g_unichar_tolower (u2);
+ u1 = unicode_tolower (u1);
+ u2 = unicode_tolower (u2);
if (u1 < u2)
return -1;
else if (u1 > u2)
diff --git a/camel/camel-service.c b/camel/camel-service.c
index 7c31bde274..b0e8c1ec59 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -23,31 +23,16 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
-
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
+#include "camel-service.h"
+#include "camel-session.h"
+#include "camel-exception.h"
#include <ctype.h>
#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-#ifdef ENABLE_THREADS
-#include <pthread.h>
-#include "e-util/e-msgport.h"
-#endif
-
-#include "e-util/e-host-utils.h"
-#include "camel-service.h"
-#include "camel-session.h"
-#include "camel-exception.h"
-#include "camel-operation.h"
#include "camel-private.h"
-#define d(x)
-
static CamelObjectClass *parent_class = NULL;
/* Returns the class for a CamelService */
@@ -481,144 +466,29 @@ camel_service_query_auth_types (CamelService *service, CamelException *ex)
struct hostent *
camel_service_gethost (CamelService *service, CamelException *ex)
{
+ struct hostent *h;
char *hostname;
+#warning "This needs to use gethostbyname_r()"
+
if (service->url->host)
hostname = service->url->host;
else
hostname = "localhost";
+ h = gethostbyname (hostname);
+ if (!h) {
+ extern int h_errno;
- return camel_get_host_byname(hostname, ex);
-}
-
-#ifdef offsetof
-#define STRUCT_OFFSET(type, field) ((gint) offsetof (type, field))
-#else
-#define STRUCT_OFFSET(type, field) ((gint) ((gchar*) &((type *) 0)->field))
-#endif
-
-struct _lookup_msg {
-#ifdef ENABLE_THREADS
- EMsg msg;
-#endif
- const char *name;
- int result;
- int herr;
- struct hostent hostbuf;
- int hostbuflen;
- char *hostbufmem;
-};
-
-static void *
-get_host(void *data)
-{
- struct _lookup_msg *info = data;
-
- while ((info->result = e_gethostbyname_r(info->name, &info->hostbuf, info->hostbufmem, info->hostbuflen, &info->herr)) == ERANGE) {
- d(printf("gethostbyname fialed?\n"));
-#ifdef ENABLE_THREADS
- pthread_testcancel();
-#endif
- info->hostbuflen *= 2;
- info->hostbufmem = g_realloc(info->hostbufmem, info->hostbuflen);
- }
-
- d(printf("gethostbyname ok?\n"));
-
-#ifdef ENABLE_THREADS
- e_msgport_reply((EMsg *)info);
-#endif
- return NULL;
-}
-
-struct hostent *camel_get_host_byname(const char *name, CamelException *ex)
-{
-#ifdef ENABLE_THREADS
- int fdmax, fd, cancel_fd;
-#endif
- struct _lookup_msg *msg;
-
- g_return_val_if_fail(name != NULL, NULL);
-
- if (camel_operation_cancel_check(NULL)) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled"));
- return NULL;
- }
-
- camel_operation_start(NULL, _("Resolving: %s"), name);
-
- msg = g_malloc0(sizeof(*msg));
- msg->hostbuflen = 1024;
- msg->hostbufmem = g_malloc(msg->hostbuflen);
- msg->name = name;
-
-#ifdef ENABLE_THREADS
- cancel_fd = camel_operation_cancel_fd(NULL);
- if (cancel_fd == -1) {
-#endif
- get_host(msg);
-#ifdef ENABLE_THREADS
- } else {
- EMsgPort *reply_port;
- pthread_t id;
- fd_set rdset;
-
- reply_port = msg->msg.reply_port = e_msgport_new();
- fd = e_msgport_fd(msg->msg.reply_port);
- if (pthread_create(&id, NULL, get_host, msg) == 0) {
- FD_ZERO(&rdset);
- FD_SET(cancel_fd, &rdset);
- FD_SET(fd, &rdset);
- fdmax = MAX(fd, cancel_fd) + 1;
- d(printf("waiting for name return/cancellation in main process\n"));
- if (select(fdmax, &rdset, NULL, 0, NULL) == -1) {
- camel_exception_setv(ex, 1, _("Failure in name lookup: %s"), strerror(errno));
- d(printf("Cancelling lookup thread\n"));
- pthread_cancel(id);
- } else if (FD_ISSET(cancel_fd, &rdset)) {
- d(printf("Cancelling lookup thread\n"));
- camel_exception_setv(ex, CAMEL_EXCEPTION_USER_CANCEL, _("Cancelled"));
- pthread_cancel(id);
- } else {
- struct _lookup_msg *reply = (struct _lookup_msg *)e_msgport_get(reply_port);
-
- g_assert(reply == msg);
- }
- d(printf("waiting for child to exit\n"));
- pthread_join(id, NULL);
- d(printf("child done\n"));
- }
- e_msgport_destroy(reply_port);
- }
-#endif
-
- camel_operation_end(NULL);
-
- if (msg->herr) {
- if (!camel_exception_is_set(ex)) {
- if (msg->herr == HOST_NOT_FOUND || msg->herr == NO_DATA)
- camel_exception_setv(ex, 1, _("Host lookup failed: %s: host not found"), name);
- else
- camel_exception_setv(ex, 1, _("Host lookup failed: %s: unknown reason"), name);
+ if (h_errno == HOST_NOT_FOUND || h_errno == NO_DATA) {
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
+ _("No such host %s."), hostname);
+ } else {
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
+ _("Temporarily unable to look "
+ "up hostname %s."), hostname);
}
- g_free(msg->hostbufmem);
- g_free(msg);
return NULL;
- } else {
- return &msg->hostbuf;
}
-}
-
-void camel_free_host(struct hostent *h)
-{
- struct _lookup_msg *msg;
-
- g_return_if_fail(h != NULL);
-
- /* yeah this looks ugly but it is safe. we passed out a reference to inside our structure, this maps it
- to the base structure, so we can free everything right without having to keep track of it separately */
- msg = (struct _lookup_msg *)(((char *)h) - STRUCT_OFFSET(struct _lookup_msg, hostbuf));
- g_free(msg->hostbufmem);
- g_free(msg);
+ return h;
}
diff --git a/camel/camel-uid-cache.c b/camel/camel-uid-cache.c
index fcea86f608..f6f2388a99 100644
--- a/camel/camel-uid-cache.c
+++ b/camel/camel-uid-cache.c
@@ -23,9 +23,8 @@
* USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
+#include "camel-uid-cache.h"
#include <errno.h>
#include <fcntl.h>
@@ -33,8 +32,6 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "camel-uid-cache.h"
-
static void free_uid (gpointer key, gpointer value, gpointer data);
static void maybe_write_uid (gpointer key, gpointer value, gpointer data);
diff --git a/camel/camel-url.c b/camel/camel-url.c
index aa4c0e2c4f..78cb52153a 100644
--- a/camel/camel-url.c
+++ b/camel/camel-url.c
@@ -25,15 +25,12 @@
* 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"
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index 7fdef39272..0d90ca06d2 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -20,11 +20,7 @@
* USA
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-
-#include <string.h>
#include "camel-exception.h"
#include "camel-vee-folder.h"
@@ -38,10 +34,12 @@
#include "e-util/md5-utils.h"
-#if defined (DOEPOOLV) || defined (DOESTRV)
+#ifdef DOESTRV
#include "e-util/e-memory.h"
#endif
+#include <string.h>
+
#define d(x)
#define _PRIVATE(o) (((CamelVeeFolder *)(o))->priv)
@@ -411,6 +409,8 @@ vee_sync(CamelFolder *folder, gboolean expunge, CamelException *ex)
struct _CamelVeeFolderPrivate *p = _PRIVATE(vf);
GList *node;
+ printf("vee-sync\n");
+
CAMEL_VEE_FOLDER_LOCK(vf, subfolder_lock);
node = p->folders;
@@ -488,7 +488,6 @@ vee_search_by_expression(CamelFolder *folder, const char *expression, CamelExcep
node = g_list_next(node);
}
- g_free(expr);
CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock);
g_hash_table_destroy(searched);
@@ -573,9 +572,7 @@ vee_folder_add_info(CamelVeeFolder *vf, CamelFolder *f, CamelMessageInfo *info,
mi = (CamelVeeMessageInfo *)camel_folder_summary_info_new(folder->summary);
camel_message_info_dup_to(info, (CamelMessageInfo *)mi);
-#ifdef DOEPOOLV
- mi->info.strings = e_poolv_set(mi->info.strings, CAMEL_MESSAGE_INFO_UID, uid, TRUE);
-#elif defined (DOESTRV)
+#ifdef DOESTRV
mi->info.strings = e_strv_set_ref_free(mi->info.strings, CAMEL_MESSAGE_INFO_UID, uid);
mi->info.strings = e_strv_pack(mi->info.strings);
#else
diff --git a/camel/providers/cache/Makefile.am b/camel/providers/cache/Makefile.am
index 7f9f6a9df5..5427584605 100644
--- a/camel/providers/cache/Makefile.am
+++ b/camel/providers/cache/Makefile.am
@@ -15,6 +15,7 @@ INCLUDES = \
-I$(srcdir)/../../.. \
-I$(includedir) \
-I$(top_srcdir)/intl \
+ $(EXTRA_GNOME_CFLAGS) \
$(GTK_INCLUDEDIR) \
-I$(top_srcdir)/camel \
-DG_LOG_DOMAIN=\"camel-cache-provider\"
diff --git a/camel/providers/imap/Makefile.am b/camel/providers/imap/Makefile.am
index 545c404174..b88ff794f9 100644
--- a/camel/providers/imap/Makefile.am
+++ b/camel/providers/imap/Makefile.am
@@ -16,7 +16,7 @@ INCLUDES = -I.. \
-I$(top_srcdir)/e-util \
-I$(top_srcdir) \
-I$(includedir) \
- $(GNOME_INCLUDEDIR) \
+ $(EXTRA_GNOME_CFLAGS) \
$(GTK_INCLUDEDIR) \
-DG_LOG_DOMAIN=\"camel-imap-provider\"
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 9f325aae56..1813b16e1b 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -22,9 +22,8 @@
* USA
*/
-#ifdef HAVE_CONFIG_H
+
#include <config.h>
-#endif
#include <stdlib.h>
#include <sys/types.h>
@@ -36,6 +35,8 @@
#include <fcntl.h>
#include <ctype.h>
+#include <gal/util/e-util.h>
+
#include "camel-imap-folder.h"
#include "camel-imap-command.h"
#include "camel-imap-message-cache.h"
@@ -1101,15 +1102,8 @@ imap_update_summary (CamelFolder *folder,
if (g_datalist_get_data (&fetch_data, "UID"))
camel_message_info_set_uid (mi, g_strdup (g_datalist_get_data (&fetch_data, "UID")));
- if (g_datalist_get_data (&fetch_data, "FLAGS")) {
- guint32 flags = GPOINTER_TO_INT (g_datalist_get_data (&fetch_data, "FLAGS"));
-
- ((CamelImapMessageInfo *)mi)->server_flags = flags;
- /* "or" them in with the existing flags that may
- * have been set by summary_info_new_from_message.
- */
- mi->flags |= flags;
- }
+ if (g_datalist_get_data (&fetch_data, "FLAGS"))
+ mi->flags = GPOINTER_TO_INT (g_datalist_get_data (&fetch_data, "FLAGS"));
if (g_datalist_get_data (&fetch_data, "RFC822.SIZE"))
mi->size = GPOINTER_TO_INT (g_datalist_get_data (&fetch_data, "RFC822.SIZE"));
diff --git a/camel/providers/imap/camel-imap-message-cache.c b/camel/providers/imap/camel-imap-message-cache.c
index cd96409515..f6ff654a83 100644
--- a/camel/providers/imap/camel-imap-message-cache.c
+++ b/camel/providers/imap/camel-imap-message-cache.c
@@ -23,9 +23,7 @@
* USA
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <ctype.h>
#include <dirent.h>
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 38f585d6e7..2d70284f7c 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -22,9 +22,8 @@
*
*/
-#ifdef HAVE_CONFIG_H
+
#include <config.h>
-#endif
#include <stdio.h>
#include <stdlib.h>
@@ -32,13 +31,13 @@
#include <unistd.h>
#include <errno.h>
+#include <gal/util/e-util.h>
#include "e-util/e-path.h"
#include "camel-imap-store.h"
#include "camel-imap-folder.h"
#include "camel-imap-utils.h"
#include "camel-imap-command.h"
-#include "camel-file-utils.h"
#include "camel-folder.h"
#include "camel-exception.h"
#include "camel-session.h"
@@ -569,8 +568,8 @@ imap_store_setup_online (CamelImapStore *store, CamelException *ex)
g_free (path);
/* Write header and capabilities */
- camel_file_util_encode_uint32 (storeinfo, IMAP_STOREINFO_VERSION);
- camel_file_util_encode_uint32 (storeinfo, store->capabilities);
+ camel_folder_summary_encode_uint32 (storeinfo, IMAP_STOREINFO_VERSION);
+ camel_folder_summary_encode_uint32 (storeinfo, store->capabilities);
/* Get namespace and hierarchy separator */
if ((store->capabilities & IMAP_CAPABILITY_NAMESPACE) &&
@@ -584,11 +583,11 @@ imap_store_setup_online (CamelImapStore *store, CamelException *ex)
result = camel_imap_response_extract (response, "NAMESPACE", ex);
if (!result)
return FALSE;
-
- name = strstrcase (result, "NAMESPACE ((");
+
+ name = e_strstrcase (result, "NAMESPACE ((");
if (name) {
char *sep;
-
+
name += 12;
store->namespace = imap_parse_string (&name, &len);
if (name && *name++ == ' ') {
@@ -637,8 +636,8 @@ imap_store_setup_online (CamelImapStore *store, CamelException *ex)
}
/* Write namespace/separator out */
- camel_file_util_encode_string (storeinfo, store->namespace);
- camel_file_util_encode_uint32 (storeinfo, store->dir_sep);
+ camel_folder_summary_encode_string (storeinfo, store->namespace);
+ camel_folder_summary_encode_uint32 (storeinfo, store->dir_sep);
if (CAMEL_STORE (store)->flags & CAMEL_STORE_SUBSCRIPTIONS) {
/* Get subscribed folders */
@@ -660,7 +659,7 @@ imap_store_setup_online (CamelImapStore *store, CamelException *ex)
}
g_hash_table_insert (store->subscribed_folders, name,
GINT_TO_POINTER (1));
- camel_file_util_encode_string (storeinfo, result);
+ camel_folder_summary_encode_string (storeinfo, result);
}
camel_imap_response_free (response);
}
@@ -681,20 +680,20 @@ imap_store_setup_offline (CamelImapStore *store, CamelException *ex)
g_free (path);
tmp = 0;
if (storeinfo)
- camel_file_util_decode_uint32 (storeinfo, &tmp);
+ camel_folder_summary_decode_uint32 (storeinfo, &tmp);
if (tmp != IMAP_STOREINFO_VERSION) {
/* This must set ex and return FALSE if we're here... */
return camel_imap_store_check_online (store, ex);
}
- camel_file_util_decode_uint32 (storeinfo, &store->capabilities);
- camel_file_util_decode_string (storeinfo, &store->namespace);
- camel_file_util_decode_uint32 (storeinfo, &tmp);
+ camel_folder_summary_decode_uint32 (storeinfo, &store->capabilities);
+ camel_folder_summary_decode_string (storeinfo, &store->namespace);
+ camel_folder_summary_decode_uint32 (storeinfo, &tmp);
store->dir_sep = tmp;
/* Get subscribed folders */
store->subscribed_folders = g_hash_table_new (g_str_hash, g_str_equal);
- while (camel_file_util_decode_string (storeinfo, &buf) == 0) {
+ while (camel_folder_summary_decode_string (storeinfo, &buf) == 0) {
if (!imap_parse_list_response (buf, NULL, NULL, &name)) {
g_free (buf);
continue;
@@ -866,7 +865,7 @@ get_folder (CamelStore *store, const char *folder_name, guint32 flags,
if (!selectable) {
camel_exception_setv (ex, CAMEL_EXCEPTION_STORE_NO_FOLDER,
- _("%s is not a selectable folder"),
+ "%s is not a selectable folder",
folder_name);
g_free (short_name);
return NULL;
@@ -874,7 +873,7 @@ get_folder (CamelStore *store, const char *folder_name, guint32 flags,
folder_dir = e_path_to_physical (imap_store->storage_path,
folder_name);
- if (camel_mkdir_hier (folder_dir, S_IRWXU) == 0) {
+ if (e_mkdir_hier (folder_dir, S_IRWXU) == 0) {
new_folder = camel_imap_folder_new (store, folder_name,
short_name, folder_dir,
ex);
@@ -896,7 +895,7 @@ static char *
imap_concat (CamelImapStore *imap_store, const char *prefix, const char *suffix)
{
int len;
-
+
len = strlen (prefix);
if (len == 0 || prefix[len - 1] == imap_store->dir_sep)
return g_strdup_printf ("%s%s", prefix, suffix);
@@ -1068,8 +1067,8 @@ get_unread_online (CamelImapStore *imap_store, CamelFolderInfo *fi)
status = camel_imap_response_extract (response, "STATUS", NULL);
if (!status)
return;
-
- p = strstrcase (status, "UNSEEN");
+
+ p = e_strstrcase (status, "UNSEEN");
if (p)
fi->unread_message_count = strtoul (p + 6, NULL, 10);
g_free (status);
diff --git a/camel/providers/local/Makefile.am b/camel/providers/local/Makefile.am
index 9c6b353186..6cc82ea75a 100644
--- a/camel/providers/local/Makefile.am
+++ b/camel/providers/local/Makefile.am
@@ -15,7 +15,7 @@ INCLUDES = -I.. \
-I$(top_srcdir)/e-util \
-I$(top_srcdir) \
-I$(includedir) \
- $(GNOME_INCLUDEDIR) \
+ $(EXTRA_GNOME_CFLAGS) \
$(GTK_INCLUDEDIR) \
-DG_LOG_DOMAIN=\"camel-local-provider\"
@@ -53,6 +53,6 @@ noinst_HEADERS = \
libcamellocal_la_LDFLAGS = -version-info 0:0:0
-libcamellocal_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(top_builddir)/libibex/libibex.la
+libcamellocal_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS)
EXTRA_DIST = libcamellocal.urls
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index 3f0dd100dd..c0de5173fb 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -24,10 +24,6 @@
#include <config.h>
#endif
-#include "camel-mbox-summary.h"
-#include "camel/camel-mime-message.h"
-#include "camel/camel-operation.h"
-
#include <sys/stat.h>
#include <sys/uio.h>
#include <unistd.h>
@@ -36,7 +32,6 @@
#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"
@@ -153,7 +148,7 @@ summary_header_load(CamelFolderSummary *s, FILE *in)
if (((CamelFolderSummaryClass *)camel_mbox_summary_parent)->summary_header_load(s, in) == -1)
return -1;
- return camel_file_util_decode_uint32(in, &mbs->folder_size);
+ return camel_folder_summary_decode_uint32(in, &mbs->folder_size);
}
static int
@@ -164,7 +159,7 @@ summary_header_save(CamelFolderSummary *s, FILE *out)
if (((CamelFolderSummaryClass *)camel_mbox_summary_parent)->summary_header_save(s, out) == -1)
return -1;
- return camel_file_util_encode_uint32(out, mbs->folder_size);
+ return camel_folder_summary_encode_uint32(out, mbs->folder_size);
}
static CamelMessageInfo *
@@ -208,7 +203,7 @@ message_info_load(CamelFolderSummary *s, FILE *in)
if (mi) {
CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi;
- if (camel_file_util_decode_off_t(in, &mbi->frompos) == -1)
+ if (camel_folder_summary_decode_off_t(in, &mbi->frompos) == -1)
goto error;
}
@@ -226,7 +221,7 @@ message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageInfo *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)
+ || camel_folder_summary_encode_off_t(out, mbi->frompos) == -1)
return -1;
return 0;
@@ -287,9 +282,10 @@ summary_rebuild(CamelMboxSummary *mbs, off_t offset, CamelException *ex)
while (camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM) {
CamelMessageInfo *info;
- off_t pc = camel_mime_parser_tell_start_from (mp) + 1;
-
- camel_operation_progress (NULL, (int) (((float) pc / size) * 100));
+ unsigned int pc;
+
+ pc = ((unsigned int)camel_mime_parser_tell(mp) + 1) * 100 / size;
+ camel_operation_progress(NULL, pc);
info = camel_folder_summary_add_from_parser(s, mp);
if (info == NULL) {
@@ -527,7 +523,7 @@ mbox_summary_sync_full(CamelLocalSummary *cls, gboolean expunge, CamelFolderChan
count = camel_folder_summary_count(s);
for (i = 0; i < count; i++) {
- int pc = (i + 1) * 100 / count;
+ int pc = (i+1)*100/count;
camel_operation_progress(NULL, pc);
diff --git a/camel/providers/nntp/Makefile.am b/camel/providers/nntp/Makefile.am
index a453ec305f..e8bffda155 100644
--- a/camel/providers/nntp/Makefile.am
+++ b/camel/providers/nntp/Makefile.am
@@ -15,6 +15,7 @@ INCLUDES = -I../.. \
-I$(top_srcdir) \
-I$(includedir) \
$(EXTRA_GNOME_CFLAGS) \
+ $(GTK_INCLUDEDIR) \
-DG_LOG_DOMAIN=\"camel-nntp-provider\"
libcamelnntp_la_SOURCES = \
diff --git a/camel/providers/pop3/Makefile.am b/camel/providers/pop3/Makefile.am
index 476e3d3189..8d6c811903 100644
--- a/camel/providers/pop3/Makefile.am
+++ b/camel/providers/pop3/Makefile.am
@@ -15,7 +15,7 @@ INCLUDES = \
-I$(top_srcdir)/intl \
-I$(top_srcdir)/camel \
-I$(top_srcdir)/e-util \
- $(GNOME_INCLUDEDIR) \
+ $(EXTRA_GNOME_CFLAGS) \
$(KRB4_CFLAGS) \
$(GTK_INCLUDEDIR) \
-DG_LOG_DOMAIN=\"camel-pop3-provider\"
@@ -32,6 +32,6 @@ libcamelpop3include_HEADERS = \
libcamelpop3_la_LDFLAGS = $(KRB4_LDFLAGS) -version-info 0:0:0
-libcamelpop3_la_LIBADD = $(top_builddir)/e-util/libeutil.la
+libcamelpop3_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(UNICODE_LIBS)
EXTRA_DIST = libcamelpop3.urls
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index c163e844c9..e1fc049084 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -23,9 +23,7 @@
* USA
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -190,12 +188,9 @@ connect_to_server (CamelService *service, CamelException *ex)
/* Need to copy hostname, because krb_realmofhost will
* call gethostbyname as well, and gethostbyname uses
* static storage.
- * This isn't really necessary since gethost() returns a copy anyway,
- * but for simplicity leave the old code here - NZ
*/
h = camel_service_gethost (service, ex);
hostname = g_strdup (h->h_name);
- camel_free_host(h);
fd = CAMEL_STREAM_FS (CAMEL_REMOTE_STORE (service)->ostream)->fd;
diff --git a/camel/providers/sendmail/Makefile.am b/camel/providers/sendmail/Makefile.am
index deec529871..23375661db 100644
--- a/camel/providers/sendmail/Makefile.am
+++ b/camel/providers/sendmail/Makefile.am
@@ -14,9 +14,9 @@ INCLUDES = \
-I$(srcdir)/../../.. \
-I$(includedir) \
-I$(top_srcdir)/intl \
- -I$(top_srcdir)/camel \
- $(GNOME_INCLUDEDIR) \
- $(GTK_INCLUDEDIR) \
+ $(EXTRA_GNOME_CFLAGS) \
+ $(GTK_INCLUDEDIR) \
+ -I$(top_srcdir)/camel \
-DG_LOG_DOMAIN=\"camel-sendmail-provider\"
libcamelsendmail_la_SOURCES = \
diff --git a/camel/providers/smtp/Makefile.am b/camel/providers/smtp/Makefile.am
index 74597f57f5..ed1a44610d 100644
--- a/camel/providers/smtp/Makefile.am
+++ b/camel/providers/smtp/Makefile.am
@@ -15,7 +15,7 @@ INCLUDES = \
-I$(top_srcdir)/intl \
-I$(top_srcdir)/camel \
-I$(top_srcdir)/e-util \
- $(GNOME_INCLUDEDIR) \
+ $(EXTRA_GNOME_CFLAGS) \
$(GTK_INCLUDEDIR) \
$(NSPR_CFLAGS) \
$(NSS_CFLAGS) \
@@ -31,6 +31,6 @@ libcamelsmtpinclude_HEADERS = \
libcamelsmtp_la_LDFLAGS = -version-info 0:0:0
-libcamelsmtp_la_LIBADD = $(top_builddir)/e-util/libeutil.la
+libcamelsmtp_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(UNICODE_LIBS)
EXTRA_DIST = libcamelsmtp.urls
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 5b5e66ac21..c867bbddc3 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,47 +1,3 @@
-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
@@ -52,26 +8,6 @@
* 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
diff --git a/composer/e-msg-composer-select-file.c b/composer/e-msg-composer-select-file.c
index c575a6d4ad..b1a55c0d3b 100644
--- a/composer/e-msg-composer-select-file.c
+++ b/composer/e-msg-composer-select-file.c
@@ -22,8 +22,7 @@
*/
#include <gtk/gtkfilesel.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
+
#include "e-msg-composer-select-file.h"
diff --git a/configure.in b/configure.in
index b79126efa2..7711886cd2 100644
--- a/configure.in
+++ b/configure.in
@@ -27,10 +27,10 @@ AC_DEFUN(EVO_CHECK_LIB, [
pkgvers=`echo $pkgvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
if test "$pkgvers" -lt $cmpvers; then
- AC_MSG_ERROR([
-""
-"You need $dispname $dispvers or later to build Evolution"
-"If you think you already have this installed, consult the README."])
+ echo ""
+ echo "You need $dispname $dispvers or later to build Evolution" 1>&2
+ echo "(If you think you already have this installed, consult the README.)" 1>&2
+ exit 1
fi
])
@@ -151,39 +151,6 @@ if test x"$ac_cv_ctime_r_three_args" = xyes ; then
fi
dnl **************************************************
-dnl gethostbyname_r prototype
-dnl **************************************************
-
-AC_CHECK_FUNCS(gethostbyname_r,[
-AC_CACHE_CHECK([if gethostbyname_r wants five arguments], ac_cv_gethostbyname_r_five_args,
-[
- AC_TRY_COMPILE([
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netdb.h>
-
- #define BUFSIZE (sizeof(struct hostent)+10)
- ],[
- struct hostent hent;
- char buffer[BUFSIZE];
- int bufsize=BUFSIZE;
- int h_errno;
-
- (void)gethostbyname_r( "www.ximian.com", &hent, buffer, bufsize, &h_errno);
- ],[
- ac_cv_gethostbyname_r_five_args=yes
- ],[
- ac_cv_gethostbyname_r_five_args=no
- ])
-])])
-
-if test x"$ac_cv_gethostbyname_r_five_args" = xyes ; then
- AC_DEFINE(GETHOSTBYNAME_R_FIVE_ARGS)
-fi
-
-dnl **************************************************
dnl * pas-backend-file stuff.
dnl * check for db_185.h. if it's there, we use it.
dnl * otherwise, we use db.h (since it'll be 185).
@@ -308,11 +275,24 @@ EVO_CHECK_LIB(Bonobo, 0.36, bonobox)
EVO_CHECK_LIB(OAF, 0.6, oaf)
EVO_CHECK_LIB(libglade, 0.14, libglade)
EVO_CHECK_LIB(gdk-pixbuf with GNOME canvas support, 0.9.0, gnomecanvaspixbuf)
-EVO_CHECK_LIB(GAL, 0.7.99.2, gal)
+EVO_CHECK_LIB(GAL, 0.7, gal)
EVO_CHECK_LIB(GtkHTML, 0.8, gtkhtml)
EVO_CHECK_LIB(GNOME-VFS, 0.4.2, vfs)
EVO_CHECK_LIB(libxml, 1.8.10, xml)
+dnl **********
+dnl libunicode
+dnl **********
+AC_MSG_CHECKING(for libunicode)
+if unicode-config --libs > /dev/null 2>&1; then
+ UNICODE_LIBS=`unicode-config --libs`
+ UNICODE_CFLAGS=`unicode-config --cflags`
+ AC_SUBST(UNICODE_LIBS)
+ AC_SUBST(UNICODE_CFLAGS)
+ AC_MSG_RESULT(found)
+else
+ AC_MSG_ERROR(libunicode not found)
+fi
dnl *************************
@@ -323,24 +303,19 @@ GLIB_LIBS="`glib-config --libs`"
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
-GAL_CFLAGS="`gnome-config --cflags gal`"
-GAL_LIBS="`gnome-config --libs gal`"
-AC_SUBST(GAL_CFLAGS)
-AC_SUBST(GAL_LIBS)
-
-EXTRA_GNOME_LIBS="`gnome-config --libs libglade gdk_pixbuf gnomecanvaspixbuf gnomeui gal` $THREADS_LIBS"
-EXTRA_GNOME_CFLAGS="`gnome-config --cflags libglade gdk_pixbuf gnomecanvaspixbuf gnomeui gal` $THREADS_CFLAGS"
+EXTRA_GNOME_LIBS="`gnome-config --libs libglade gdk_pixbuf gnomecanvaspixbuf gnomeui gal` $THREADS_LIBS $UNICODE_LIBS"
+EXTRA_GNOME_CFLAGS="`gnome-config --cflags libglade gdk_pixbuf gnomecanvaspixbuf gnomeui gal` $THREADS_CFLAGS $UNICODE_CFLAGS"
AC_SUBST(EXTRA_GNOME_LIBS)
AC_SUBST(EXTRA_GNOME_CFLAGS)
-BONOBO_GNOME_LIBS="`gnome-config --libs bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui` $OAF_LIBS"
-BONOBO_GNOME_CFLAGS="`gnome-config --cflags bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui` $OAF_CFLAGS"
+BONOBO_GNOME_LIBS="`gnome-config --libs bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui` $UNICODE_LIBS $OAF_LIBS"
+BONOBO_GNOME_CFLAGS="`gnome-config --cflags bonobox_print libglade gdk_pixbuf gnomecanvaspixbuf gnomeui ` $UNICODE_CFLAGS $OAF_CFLAGS"
AC_SUBST(BONOBO_GNOME_LIBS)
AC_SUBST(BONOBO_GNOME_CFLAGS)
-BONOBO_HTML_GNOME_LIBS="`gnome-config --libs bonobox_print libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_LIBS"
-BONOBO_HTML_GNOME_CFLAGS="`gnome-config --cflags bonobox_print libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_CFLAGS"
+BONOBO_HTML_GNOME_LIBS="`gnome-config --libs bonobox_print libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_LIBS $UNICODE_LIBS"
+BONOBO_HTML_GNOME_CFLAGS="`gnome-config --cflags bonobox_print libglade gdk_pixbuf gtkhtml gnomecanvaspixbuf gnomeui ` $THREAD_CFLAGS $UNICODE_CFLAGS"
AC_SUBST(BONOBO_HTML_GNOME_LIBS)
AC_SUBST(BONOBO_HTML_GNOME_CFLAGS)
@@ -544,7 +519,7 @@ if test "x${with_nspr_libs}" != "xno" -a "x${have_nspr_includes}" != "xno"; then
CFLAGS_save="$CFLAGS"
LDFLAGS_save="$LDFLAGS"
- nsprlibs="-lnspr4 -lplc4 -lplds4 -lpthread"
+ nsprlibs="-lnspr4"
AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs,
[
CFLAGS="$CFLAGS $NSPR_CFLAGS"
@@ -601,11 +576,11 @@ msg_nss="no"
if test "x${with_nss_libs}" != "xno" -a "x${have_nss_includes}" != "xno"; then
LDFLAGS_save="$LDFLAGS"
- nsprlibs="-lnspr4 -lplc4 -lplds4 -lpthread"
+ nsprlibs="-lnspr4"
nsslibs="-lnss3 -lnssckbi -lssl3 -lsmime3"
AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs,
[
- LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
+ LDFLAGS="$LDFLAGS -L$with_nss_libs $nsslibs"
AC_TRY_LINK_FUNC(NSS_Init, moz_nss_libs="yes", moz_nss_libs="no")
LDFLAGS="$LDFLAGS_save"
])
@@ -732,13 +707,6 @@ camel/providers/smtp/Makefile
camel/providers/imap/Makefile
camel/providers/nntp/Makefile
camel/providers/local/Makefile
-camel/tests/Makefile
-camel/tests/lib/Makefile
-camel/tests/message/Makefile
-camel/tests/misc/Makefile
-camel/tests/folder/Makefile
-camel/tests/smime/Makefile
-camel/tests/stream/Makefile
composer/Makefile
widgets/Makefile
widgets/meeting-time-sel/Makefile
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 1b5327ee46..aa34407936 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,7 +1,7 @@
-2001-04-23 Jon Trowbridge <trow@ximian.com>
+2001-04-24 Ettore Perazzoli <ettore@ximian.com>
- * C/Makefile.am (install-data-local): Changed dependency for
- install-data-local from "evolution" to "evolution-guide".
+ * C/Makefile.am (install-data-local): Depend on `evolution-guide',
+ not `evolution'.
2001-04-23 Ettore Perazzoli <ettore@ximian.com>
@@ -15,11 +15,6 @@
(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
@@ -292,10 +287,12 @@
* C/preface.sgml: Spelling fixes, etc.
+=======
2000-09-19 Federico Mena Quintero <federico@helixcode.com>
* C/Makefile.am: Fixed to install the stylesheet-images as well.
+>>>>>>> 1.26
2000-09-07 Aaron Weber <aaron@helixcode.com>
* C/fig/ New files: contact-editor.png, mail-composer.png,
diff --git a/doc/devel/ChangeLog b/doc/devel/ChangeLog
index 6e1455b514..648b851d77 100644
--- a/doc/devel/ChangeLog
+++ b/doc/devel/ChangeLog
@@ -1,8 +1,3 @@
-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
@@ -19,12 +14,6 @@
* 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
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index b282021766..4566df01e3 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,127 +1,4 @@
-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>
+2001-04-18 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
@@ -129,53 +6,10 @@
* 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-04-08 JP Rosevear <jpr@ximian.com>
+
+ * Makefile.am: Setup up the conduit library building better so the
+ files get disted
2001-03-20 Radek Doulik <rodo@ximian.com>
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index 822c766f43..85f470021e 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -6,6 +6,7 @@ INCLUDES = \
-I$(top_srcdir) \
$(GNOME_INCLUDEDIR) \
$(EXTRA_GNOME_CFLAGS) \
+ $(UNICODE_CFLAGS) \
$(PISOCK_CFLAGS) \
-DEVOLUTION_IMAGES=\""$(imagesdir)"\" \
-DG_LOG_DOMAIN=\"e-utils\"
@@ -22,8 +23,6 @@ libeutil_la_SOURCES = \
e-gtk-utils.h \
e-gui-utils.c \
e-gui-utils.h \
- e-host-utils.c \
- e-host-utils.h \
e-html-utils.c \
e-html-utils.h \
e-iterator.c \
@@ -42,14 +41,12 @@ libeutil_la_SOURCES = \
e-sexp.h \
e-time-utils.c \
e-time-utils.h \
- e-url.c \
- e-url.h \
e-dbhash.c \
e-dbhash.h \
md5-utils.c \
md5-utils.h
-libeutil_la_LIBADD = $(GAL_LIBS)
+libeutil_la_LIBADD = $(UNICODE_LIBS)
libeutil_static_la_SOURCES = $(libeutil_la_SOURCES)
libeutil_static_la_LDFLAGS = --all-static
@@ -72,4 +69,3 @@ libeconduit_static_la_SOURCES = $(libeconduit_la_SOURCES)
libeconduit_static_la_LDFLAGS = --all-static
EXTRA_DIST = $(pilot_sources)
-
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
deleted file mode 100644
index f8934f8b4e..0000000000
--- a/e-util/e-bit-array.c
+++ /dev/null
@@ -1,412 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-selection-model-array.c: a Selection Model
- *
- * Author:
- * Christopher James Lahey <clahey@ximian.com>
- *
- * (C) 2000, 2001 Ximian, Inc.
- */
-#include <config.h>
-#include <gtk/gtksignal.h>
-#include "e-bit-array.h"
-#include "gal/util/e-util.h"
-
-#define EBA_CLASS(e) ((EBitArrayClass *)((GtkObject *)e)->klass)
-
-#define PARENT_TYPE (gtk_object_get_type ())
-
-#define ONES ((guint32) 0xffffffff)
-
-#define BOX(n) ((n) / 32)
-#define OFFSET(n) (31 - ((n) % 32))
-#define BITMASK(n) ((guint32)(((guint32) 0x1) << OFFSET((n))))
-#define BITMASK_LEFT(n) ((((n) % 32) == 0) ? 0 : (ONES << (32 - ((n) % 32))))
-#define BITMASK_RIGHT(n) ((guint32)(((guint32) ONES) >> ((n) % 32)))
-
-static GtkObjectClass *parent_class;
-
-static void
-e_bit_array_insert_real(EBitArray *eba, int row)
-{
- int box;
- int i;
- if(eba->bit_count >= 0) {
- /* Add another word if needed. */
- if ((eba->bit_count & 0x1f) == 0) {
- eba->data = g_renew(gint, eba->data, (eba->bit_count >> 5) + 1);
- eba->data[eba->bit_count >> 5] = 0;
- }
-
- /* The box is the word that our row is in. */
- box = BOX(row);
- /* Shift all words to the right of our box right one bit. */
- for (i = eba->bit_count >> 5; i > box; i--) {
- eba->data[i] = (eba->data[i] >> 1) | (eba->data[i - 1] << 31);
- }
-
- /* Shift right half of box one bit to the right. */
- eba->data[box] = (eba->data[box] & BITMASK_LEFT(row)) | ((eba->data[box] & BITMASK_RIGHT(row)) >> 1);
- eba->bit_count ++;
- }
-}
-
-static void
-e_bit_array_delete_real(EBitArray *eba, int row, gboolean move_selection_mode)
-{
- int box;
- int i;
- int last;
- int selected = FALSE;
- if(eba->bit_count >= 0) {
- guint32 bitmask;
- box = row >> 5;
- last = eba->bit_count >> 5;
-
- /* Build bitmasks for the left and right half of the box */
- bitmask = BITMASK_RIGHT(row) >> 1;
- if (move_selection_mode)
- selected = e_bit_array_value_at(eba, row);
- /* Shift right half of box one bit to the left. */
- eba->data[box] = (eba->data[box] & BITMASK_LEFT(row))| ((eba->data[box] & bitmask) << 1);
-
- /* Shift all words to the right of our box left one bit. */
- if (box < last) {
- eba->data[box] &= eba->data[box + 1] >> 31;
-
- for (i = box + 1; i < last; i++) {
- eba->data[i] = (eba->data[i] << 1) | (eba->data[i + 1] >> 31);
- }
- /* this over-runs our memory! */
- /*eba->data[i] = eba->data[i] << 1; */
- }
- eba->bit_count --;
- /* Remove the last word if not needed. */
- if ((eba->bit_count & 0x1f) == 0) {
- eba->data = g_renew(gint, eba->data, eba->bit_count >> 5);
- }
- if (move_selection_mode && selected) {
- e_bit_array_select_single_row (eba, row > 0 ? row - 1 : 0);
- }
- }
-}
-
-/* FIXME : Improve efficiency here. */
-void
-e_bit_array_delete(EBitArray *eba, int row, int count)
-{
- int i;
- for (i = 0; i < count; i++)
- e_bit_array_delete_real(eba, row, FALSE);
-}
-
-/* FIXME : Improve efficiency here. */
-void
-e_bit_array_delete_single_mode(EBitArray *eba, int row, int count)
-{
- int i;
- for (i = 0; i < count; i++)
- e_bit_array_delete_real(eba, row, TRUE);
-}
-
-/* FIXME : Improve efficiency here. */
-void
-e_bit_array_insert(EBitArray *eba, int row, int count)
-{
- int i;
- for (i = 0; i < count; i++)
- e_bit_array_insert_real(eba, row);
-}
-
-/* FIXME: Implement this more efficiently. */
-void
-e_bit_array_move_row(EBitArray *eba, int old_row, int new_row)
-{
- e_bit_array_delete_real(eba, old_row, FALSE);
- e_bit_array_insert_real(eba, new_row);
-}
-
-static void
-eba_destroy (GtkObject *object)
-{
- EBitArray *eba;
-
- eba = E_BIT_ARRAY (object);
-
- g_free(eba->data);
-}
-
-/**
- * e_selection_model_is_row_selected
- * @selection: #EBitArray to check
- * @n: The row to check
- *
- * This routine calculates whether the given row is selected.
- *
- * Returns: %TRUE if the given row is selected
- */
-gboolean
-e_bit_array_value_at (EBitArray *eba,
- gint n)
-{
- if (eba->bit_count < n || eba->bit_count == 0)
- return 0;
- else
- return (eba->data[BOX(n)] >> OFFSET(n)) & 0x1;
-}
-
-/**
- * e_selection_model_foreach
- * @selection: #EBitArray to traverse
- * @callback: The callback function to call back.
- * @closure: The closure
- *
- * This routine calls the given callback function once for each
- * selected row, passing closure as the closure.
- */
-void
-e_bit_array_foreach (EBitArray *eba,
- EForeachFunc callback,
- gpointer closure)
-{
- int i;
- int last = (eba->bit_count + 31) / 32;
- for (i = 0; i < last; i++) {
- if (eba->data[i]) {
- int j;
- guint32 value = eba->data[i];
- for (j = 0; j < 32; j++) {
- if (value & 0x80000000) {
- callback(i * 32 + j, closure);
- }
- value <<= 1;
- }
- }
- }
-}
-
-/**
- * e_selection_model_clear
- * @selection: #EBitArray to clear
- *
- * This routine clears the selection to no rows selected.
- */
-void
-e_bit_array_clear(EBitArray *eba)
-{
- g_free(eba->data);
- eba->data = NULL;
- eba->bit_count = 0;
-}
-
-#define PART(x,n) (((x) & (0x01010101 << n)) >> n)
-#define SECTION(x, n) (((x) >> (n * 8)) & 0xff)
-
-/**
- * e_selection_model_selected_count
- * @selection: #EBitArray to count
- *
- * This routine calculates the number of rows selected.
- *
- * Returns: The number of rows selected in the given model.
- */
-gint
-e_bit_array_selected_count (EBitArray *eba)
-{
- gint count;
- int i;
- int last;
-
- if (!eba->data)
- return 0;
-
- count = 0;
-
- last = BOX(eba->bit_count - 1);
-
- for (i = 0; i <= last; i++) {
- int j;
- guint32 thiscount = 0;
- for (j = 0; j < 8; j++)
- thiscount += PART(eba->data[i], j);
- for (j = 0; j < 4; j++)
- count += SECTION(thiscount, j);
- }
-
- return count;
-}
-
-/**
- * e_selection_model_select_all
- * @selection: #EBitArray to select all
- *
- * This routine selects all the rows in the given
- * #EBitArray.
- */
-void
-e_bit_array_select_all (EBitArray *eba)
-{
- int i;
-
- if (!eba->data)
- eba->data = g_new0 (gint, (eba->bit_count + 31) / 32);
-
- for (i = 0; i < (eba->bit_count + 31) / 32; i ++) {
- eba->data[i] = ONES;
- }
-
- /* need to zero out the bits corresponding to the rows not
- selected in the last full 32 bit mask */
- if (eba->bit_count % 32) {
- int unselected_mask = 0;
- int num_unselected_in_last_byte = 32 - eba->bit_count % 32;
-
- for (i = 0; i < num_unselected_in_last_byte; i ++)
- unselected_mask |= 1 << i;
-
- eba->data[(eba->bit_count + 31) / 32 - 1] &= ~unselected_mask;
- }
-}
-
-/**
- * e_selection_model_invert_selection
- * @selection: #EBitArray to invert
- *
- * This routine inverts all the rows in the given
- * #EBitArray.
- */
-void
-e_bit_array_invert_selection (EBitArray *eba)
-{
- int i;
-
- if (!eba->data)
- eba->data = g_new0 (gint, (eba->bit_count + 31) / 32);
-
- for (i = 0; i < (eba->bit_count + 31) / 32; i ++) {
- eba->data[i] = ~eba->data[i];
- }
-}
-
-int
-e_bit_array_bit_count (EBitArray *eba)
-{
- return eba->bit_count;
-}
-
-gboolean
-e_bit_array_cross_and (EBitArray *eba)
-{
- int i;
- for (i = 0; i < eba->bit_count / 32; i++) {
- if (eba->data[i] != ONES)
- return FALSE;
- }
- if ((eba->bit_count % 32) && ((eba->data[i] & BITMASK_LEFT(eba->bit_count)) != BITMASK_LEFT(eba->bit_count)))
- return FALSE;
- return TRUE;
-}
-
-gboolean
-e_bit_array_cross_or (EBitArray *eba)
-{
- int i;
- for (i = 0; i < eba->bit_count / 32; i++) {
- if (eba->data[i] != 0)
- return TRUE;
- }
- if ((eba->bit_count % 32) && ((eba->data[i] & BITMASK_LEFT(eba->bit_count)) != 0))
- return TRUE;
- return FALSE;
-}
-
-#define OPERATE(object, i,mask,grow) ((grow) ? (((object)->data[(i)]) |= ((guint32) ~(mask))) : (((object)->data[(i)]) &= (mask)))
-
-void
-e_bit_array_change_one_row(EBitArray *eba, int row, gboolean grow)
-{
- int i;
- i = BOX(row);
-
- OPERATE(eba, i, ~BITMASK(row), grow);
-}
-
-void
-e_bit_array_change_range(EBitArray *eba, int start, int end, gboolean grow)
-{
- int i, last;
- if (start != end) {
- i = BOX(start);
- last = BOX(end);
-
- if (i == last) {
- OPERATE(eba, i, BITMASK_LEFT(start) | BITMASK_RIGHT(end), grow);
- } else {
- OPERATE(eba, i, BITMASK_LEFT(start), grow);
- if (grow)
- for (i ++; i < last; i++)
- eba->data[i] = ONES;
- else
- for (i ++; i < last; i++)
- eba->data[i] = 0;
- OPERATE(eba, i, BITMASK_RIGHT(end), grow);
- }
- }
-}
-
-void
-e_bit_array_select_single_row (EBitArray *eba, int row)
-{
- int i;
- for (i = 0; i < ((eba->bit_count + 31) / 32); i++) {
- if (!((i == BOX(row) && eba->data[i] == BITMASK(row)) ||
- (i != BOX(row) && eba->data[i] == 0))) {
- g_free(eba->data);
- eba->data = g_new0(gint, (eba->bit_count + 31) / 32);
- eba->data[BOX(row)] = BITMASK(row);
-
- break;
- }
- }
-}
-
-void
-e_bit_array_toggle_single_row (EBitArray *eba, int row)
-{
- if (eba->data[BOX(row)] & BITMASK(row))
- eba->data[BOX(row)] &= ~BITMASK(row);
- else
- eba->data[BOX(row)] |= BITMASK(row);
-}
-
-
-static void
-e_bit_array_init (EBitArray *eba)
-{
- eba->data = NULL;
- eba->bit_count = 0;
-}
-
-static void
-e_bit_array_class_init (EBitArrayClass *klass)
-{
- GtkObjectClass *object_class;
-
- parent_class = gtk_type_class (PARENT_TYPE);
-
- object_class = GTK_OBJECT_CLASS(klass);
-
- object_class->destroy = eba_destroy;
-}
-
-E_MAKE_TYPE(e_bit_array, "EBitArray", EBitArray,
- e_bit_array_class_init, e_bit_array_init, PARENT_TYPE);
-
-EBitArray *
-e_bit_array_new (int count)
-{
- EBitArray *eba = gtk_type_new (e_bit_array_get_type ());
- eba->bit_count = count;
- eba->data = g_new0(gint, (eba->bit_count + 31) / 32);
- return eba;
-}
diff --git a/e-util/e-bit-array.h b/e-util/e-bit-array.h
deleted file mode 100644
index 7469413be3..0000000000
--- a/e-util/e-bit-array.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _E_BIT_ARRAY_H_
-#define _E_BIT_ARRAY_H_
-
-#include <gtk/gtkobject.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define E_BIT_ARRAY_TYPE (e_bit_array_get_type ())
-#define E_BIT_ARRAY(o) (GTK_CHECK_CAST ((o), E_BIT_ARRAY_TYPE, EBitArray))
-#define E_BIT_ARRAY_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_BIT_ARRAY_TYPE, EBitArrayClass))
-#define E_IS_BIT_ARRAY(o) (GTK_CHECK_TYPE ((o), E_BIT_ARRAY_TYPE))
-#define E_IS_BIT_ARRAY_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_BIT_ARRAY_TYPE))
-
-#ifndef _E_FOREACH_FUNC_H_
-#define _E_FOREACH_FUNC_H_
-typedef void (*EForeachFunc) (int model_row,
- gpointer closure);
-#endif
-
-typedef struct {
- GtkObject base;
-
- gint bit_count;
- guint32 *data;
-} EBitArray;
-
-typedef struct {
- GtkObjectClass parent_class;
-} EBitArrayClass;
-
-
-GtkType e_bit_array_get_type (void);
-EBitArray *e_bit_array_new (int count);
-
-gboolean e_bit_array_value_at (EBitArray *selection,
- gint n);
-void e_bit_array_foreach (EBitArray *selection,
- EForeachFunc callback,
- gpointer closure);
-void e_bit_array_clear (EBitArray *selection);
-gint e_bit_array_selected_count (EBitArray *selection);
-void e_bit_array_select_all (EBitArray *selection);
-void e_bit_array_invert_selection (EBitArray *selection);
-int e_bit_array_bit_count (EBitArray *selection);
-void e_bit_array_change_one_row (EBitArray *selection,
- int row,
- gboolean grow);
-void e_bit_array_change_range (EBitArray *selection,
- int start,
- int end,
- gboolean grow);
-void e_bit_array_select_single_row (EBitArray *eba,
- int row);
-void e_bit_array_toggle_single_row (EBitArray *eba,
- int row);
-
-void e_bit_array_insert (EBitArray *esm,
- int row,
- int count);
-void e_bit_array_delete (EBitArray *esm,
- int row,
- int count);
-void e_bit_array_delete_single_mode (EBitArray *esm,
- int row,
- int count);
-void e_bit_array_move_row (EBitArray *esm,
- int old_row,
- int new_row);
-gint e_bit_array_bit_count (EBitArray *esm);
-
-gboolean e_bit_array_cross_and (EBitArray *esm);
-gboolean e_bit_array_cross_or (EBitArray *esm);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* _E_BIT_ARRAY_H_ */
diff --git a/e-util/e-gui-utils.c b/e-util/e-gui-utils.c
index d6b72f6b69..2ed26448f3 100644
--- a/e-util/e-gui-utils.c
+++ b/e-util/e-gui-utils.c
@@ -12,7 +12,6 @@
#include "e-gui-utils.h"
-#include <glib.h>
#include <gtk/gtksignal.h>
#include <gtk/gtkalignment.h>
#include <libgnome/gnome-defs.h>
diff --git a/e-util/e-i18n.h b/e-util/e-i18n.h
deleted file mode 100644
index 58d3420be3..0000000000
--- a/e-util/e-i18n.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copied from gnome-i18nP.h, because this header is typically not installed
- *
- * This file has to be included before any file from the GNOME libraries
- * to have this override the definitions that are pulled from the gnome-i18n.h
- *
- * the difference is that gnome-i18n.h is used for applications, and this is
- * used by libraries (because libraries have to use dcgettext instead of
- * gettext and they need to provide the translation domain, unlike apps).
- *
- * So you can just put this after you include config.h
- */
-
-#ifndef __E_I18N_H__
-#define __E_I18N_H__
-
-#include <glib.h>
-#include "libgnome/gnome-defs.h"
-
-BEGIN_GNOME_DECLS
-
-#ifdef ENABLE_NLS
-# include <libintl.h>
-# undef _
-# define _(String) dgettext (PACKAGE, String)
-# ifdef gettext_noop
-# define N_(String) gettext_noop (String)
-# else
-# define N_(String) (String)
-# endif
-#else
-/* Stubs that do something close enough. */
-# define textdomain(String) (String)
-# define gettext(String) (String)
-# define dgettext(Domain,Message) (Message)
-# define dcgettext(Domain,Message,Type) (Message)
-# define bindtextdomain(Domain,Directory) (Domain)
-# define _(String) (String)
-# define N_(String) (String)
-#endif
-
-/*
- * Do not remove the following define, nor do surround it with ifdefs.
- *
- * If you get any `redefined' errors, it means that you are including
- * -incorrectly- a header file provided by gnome-libs before this file.
- * To correctly solve this issue include this file before any libgnome/
- * libgnomeui headers
- */
-
-#define __GNOME_I18N_H__ 1
-
-
-/* This is copied staight out of the prototypes for gnome-i18n.h */
-const char *gnome_i18n_get_language(void);
-GList *gnome_i18n_get_language_list (const gchar *category_name);
-void gnome_i18n_set_preferred_language (const char *val);
-const char *gnome_i18n_get_preferred_language (void);
-void gnome_i18n_init (void);
-
-END_GNOME_DECLS
-
-#endif /* __E_I18N_H__ */
diff --git a/e-util/e-sorter.c b/e-util/e-sorter.c
deleted file mode 100644
index b6e0c000fc..0000000000
--- a/e-util/e-sorter.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * E-sorted.c: Virtual sorter class
- *
- * Author:
- * Chris Lahey <clahey@ximian.com>
- *
- * (C) 2000,2001 Ximian, Inc.
- */
-#include <config.h>
-#include <stdlib.h>
-#include <gtk/gtksignal.h>
-#include <string.h>
-#include "gal/util/e-util.h"
-#include "e-sorter.h"
-
-#define d(x)
-
-#define PARENT_TYPE gtk_object_get_type()
-
-static GtkObjectClass *parent_class;
-
-#define ES_CLASS(es) ((ESorterClass *)((GtkObject *)(es))->klass)
-
-static gint es_model_to_sorted (ESorter *es, int row);
-static gint es_sorted_to_model (ESorter *es, int row);
-static void es_get_model_to_sorted_array (ESorter *es, int **array, int *count);
-static void es_get_sorted_to_model_array (ESorter *es, int **array, int *count);
-static gboolean es_needs_sorting(ESorter *es);
-
-static void
-es_class_init (ESorterClass *klass)
-{
- parent_class = gtk_type_class (PARENT_TYPE);
-
- klass->model_to_sorted = es_model_to_sorted;
- klass->sorted_to_model = es_sorted_to_model;
- klass->get_model_to_sorted_array = es_get_model_to_sorted_array;
- klass->get_sorted_to_model_array = es_get_sorted_to_model_array;
- klass->needs_sorting = es_needs_sorting;
-}
-
-static void
-es_init (ESorter *es)
-{
-}
-
-E_MAKE_TYPE(e_sorter, "ESorter", ESorter, es_class_init, es_init, PARENT_TYPE);
-
-ESorter *
-e_sorter_new (void)
-{
- ESorter *es = gtk_type_new (E_SORTER_TYPE);
-
- return es;
-}
-
-
-static gint
-es_model_to_sorted (ESorter *es, int row)
-{
- return row;
-}
-
-static gint
-es_sorted_to_model (ESorter *es, int row)
-{
- return row;
-}
-
-
-static void
-es_get_model_to_sorted_array (ESorter *es, int **array, int *count)
-{
-}
-
-static void
-es_get_sorted_to_model_array (ESorter *es, int **array, int *count)
-{
-}
-
-
-static gboolean
-es_needs_sorting(ESorter *es)
-{
- return FALSE;
-}
-
-gint
-e_sorter_model_to_sorted (ESorter *es, int row)
-{
- g_return_val_if_fail(es != NULL, -1);
- g_return_val_if_fail(row >= 0, -1);
-
- if (ES_CLASS(es)->model_to_sorted)
- return ES_CLASS(es)->model_to_sorted (es, row);
- else
- return -1;
-}
-
-gint
-e_sorter_sorted_to_model (ESorter *es, int row)
-{
- g_return_val_if_fail(es != NULL, -1);
- g_return_val_if_fail(row >= 0, -1);
-
- if (ES_CLASS(es)->sorted_to_model)
- return ES_CLASS(es)->sorted_to_model (es, row);
- else
- return -1;
-}
-
-
-void
-e_sorter_get_model_to_sorted_array (ESorter *es, int **array, int *count)
-{
- g_return_if_fail(es != NULL);
-
- if (ES_CLASS(es)->get_model_to_sorted_array)
- ES_CLASS(es)->get_model_to_sorted_array (es, array, count);
-}
-
-void
-e_sorter_get_sorted_to_model_array (ESorter *es, int **array, int *count)
-{
- g_return_if_fail(es != NULL);
-
- if (ES_CLASS(es)->get_sorted_to_model_array)
- ES_CLASS(es)->get_sorted_to_model_array (es, array, count);
-}
-
-
-gboolean
-e_sorter_needs_sorting(ESorter *es)
-{
- g_return_val_if_fail (es != NULL, FALSE);
-
- if (ES_CLASS(es)->needs_sorting)
- return ES_CLASS(es)->needs_sorting (es);
- else
- return FALSE;
-}
diff --git a/e-util/e-sorter.h b/e-util/e-sorter.h
deleted file mode 100644
index fa6c5bbc60..0000000000
--- a/e-util/e-sorter.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-#ifndef _E_SORTER_H_
-#define _E_SORTER_H_
-
-#include <gtk/gtkobject.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define E_SORTER_TYPE (e_sorter_get_type ())
-#define E_SORTER(o) (GTK_CHECK_CAST ((o), E_SORTER_TYPE, ESorter))
-#define E_SORTER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_SORTER_TYPE, ESorterClass))
-#define E_IS_SORTER(o) (GTK_CHECK_TYPE ((o), E_SORTER_TYPE))
-#define E_IS_SORTER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_SORTER_TYPE))
-
-typedef struct {
- GtkObject base;
-} ESorter;
-
-typedef struct {
- GtkObjectClass parent_class;
- gint (*model_to_sorted) (ESorter *sorter,
- int row);
- gint (*sorted_to_model) (ESorter *sorter,
- int row);
-
- void (*get_model_to_sorted_array) (ESorter *sorter,
- int **array,
- int *count);
- void (*get_sorted_to_model_array) (ESorter *sorter,
- int **array,
- int *count);
-
- gboolean (*needs_sorting) (ESorter *sorter);
-} ESorterClass;
-
-GtkType e_sorter_get_type (void);
-ESorter *e_sorter_new (void);
-
-gint e_sorter_model_to_sorted (ESorter *sorter,
- int row);
-gint e_sorter_sorted_to_model (ESorter *sorter,
- int row);
-
-void e_sorter_get_model_to_sorted_array (ESorter *sorter,
- int **array,
- int *count);
-void e_sorter_get_sorted_to_model_array (ESorter *sorter,
- int **array,
- int *count);
-
-gboolean e_sorter_needs_sorting (ESorter *sorter);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_SORTER_H_ */
diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c
deleted file mode 100644
index f3077ae42f..0000000000
--- a/e-util/e-text-event-processor-emacs-like.c
+++ /dev/null
@@ -1,499 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-text-event-processor.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <string.h>
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtksignal.h>
-#include "e-text-event-processor-emacs-like.h"
-
-static void e_text_event_processor_emacs_like_init (ETextEventProcessorEmacsLike *card);
-static void e_text_event_processor_emacs_like_class_init (ETextEventProcessorEmacsLikeClass *klass);
-static gint e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event);
-
-static ETextEventProcessorClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0
-};
-
-static const ETextEventProcessorCommand control_keys[26] =
-{
- { E_TEP_START_OF_LINE, E_TEP_MOVE, 0, "" }, /* a */
- { E_TEP_BACKWARD_CHARACTER, E_TEP_MOVE, 0, "" }, /* b */
- { E_TEP_SELECTION, E_TEP_COPY, 0, "" }, /* c */
- { E_TEP_FORWARD_CHARACTER, E_TEP_DELETE, 0, "" }, /* d */
- { E_TEP_END_OF_LINE, E_TEP_MOVE, 0, "" }, /* e */
- { E_TEP_FORWARD_CHARACTER, E_TEP_MOVE, 0, "" }, /* f */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* g */
- { E_TEP_BACKWARD_CHARACTER, E_TEP_DELETE, 0, "" }, /* h */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* i */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* j */
- { E_TEP_END_OF_LINE, E_TEP_DELETE, 0, "" }, /* k */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* l */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* m */
- { E_TEP_FORWARD_LINE, E_TEP_MOVE, 0, "" }, /* n */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* o */
- { E_TEP_BACKWARD_LINE, E_TEP_MOVE, 0, "" }, /* p */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* q */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* r */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* s */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* t */
- { E_TEP_START_OF_LINE, E_TEP_DELETE, 0, "" }, /* u */
- { E_TEP_SELECTION, E_TEP_PASTE, 0, "" }, /* v */
- { E_TEP_SELECTION, E_TEP_DELETE, 0, "" }, /* w */
- { E_TEP_SELECTION, E_TEP_DELETE, 0, "" }, /* x */
- { E_TEP_SELECTION, E_TEP_PASTE, 0, "" }, /* y */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" } /* z */
-};
-
-static const ETextEventProcessorCommand alt_keys[26] =
-{
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* a */
- { E_TEP_BACKWARD_WORD, E_TEP_MOVE, 0, "" }, /* b */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* c */
- { E_TEP_FORWARD_WORD, E_TEP_DELETE, 0, "" }, /* d */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* e */
- { E_TEP_FORWARD_WORD, E_TEP_MOVE, 0, "" }, /* f */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* g */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* h */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* i */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* j */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* k */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* l */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* m */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* n */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* o */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* p */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* q */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* r */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* s */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* t */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* u */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* v */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* w */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* x */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* y */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" } /* z */
-
-};
-
-GtkType
-e_text_event_processor_emacs_like_get_type (void)
-{
- static GtkType text_event_processor_emacs_like_type = 0;
-
- if (!text_event_processor_emacs_like_type)
- {
- static const GtkTypeInfo text_event_processor_emacs_like_info =
- {
- "ETextEventProcessorEmacsLike",
- sizeof (ETextEventProcessorEmacsLike),
- sizeof (ETextEventProcessorEmacsLikeClass),
- (GtkClassInitFunc) e_text_event_processor_emacs_like_class_init,
- (GtkObjectInitFunc) e_text_event_processor_emacs_like_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- text_event_processor_emacs_like_type = gtk_type_unique (e_text_event_processor_get_type (), &text_event_processor_emacs_like_info);
- }
-
- return text_event_processor_emacs_like_type;
-}
-
-static void
-e_text_event_processor_emacs_like_class_init (ETextEventProcessorEmacsLikeClass *klass)
-{
- GtkObjectClass *object_class;
- ETextEventProcessorClass *processor_class;
-
- object_class = (GtkObjectClass*) klass;
- processor_class = (ETextEventProcessorClass*) klass;
-
- parent_class = gtk_type_class (e_text_event_processor_get_type ());
-
- processor_class->event = e_text_event_processor_emacs_like_event;
-}
-
-static void
-e_text_event_processor_emacs_like_init (ETextEventProcessorEmacsLike *tep)
-{
-}
-
-static gint
-e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event)
-{
- ETextEventProcessorCommand command;
- ETextEventProcessorEmacsLike *tep_el = E_TEXT_EVENT_PROCESSOR_EMACS_LIKE(tep);
- command.action = E_TEP_NOP;
- switch (event->type) {
- case GDK_BUTTON_PRESS:
- if (event->button.button == 1) {
- command.action = E_TEP_GRAB;
- command.time = event->button.time;
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
- if (event->button.state & GDK_SHIFT_MASK)
- command.action = E_TEP_SELECT;
- else
- command.action = E_TEP_MOVE;
- command.position = E_TEP_VALUE;
- command.value = event->button.position;
- command.time = event->button.time;
- tep_el->mouse_down = TRUE;
- }
- break;
- case GDK_2BUTTON_PRESS:
- if (event->button.button == 1) {
- command.action = E_TEP_SELECT;
- command.position = E_TEP_SELECT_WORD;
- command.time = event->button.time;
- }
- break;
- case GDK_3BUTTON_PRESS:
- if (event->button.button == 1) {
- command.action = E_TEP_SELECT;
- command.position = E_TEP_SELECT_ALL;
- command.time = event->button.time;
- }
- break;
- case GDK_BUTTON_RELEASE:
- if (event->button.button == 1) {
- command.action = E_TEP_UNGRAB;
- command.time = event->button.time;
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
- command.time = event->button.time;
- tep_el->mouse_down = FALSE;
- command.action = E_TEP_NOP;
- } else if (event->button.button == 2) {
- command.action = E_TEP_MOVE;
- command.position = E_TEP_VALUE;
- command.value = event->button.position;
- command.time = event->button.time;
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
-
- command.action = E_TEP_GET_SELECTION;
- command.position = E_TEP_SELECTION;
- command.value = 0;
- command.time = event->button.time;
- }
- break;
- case GDK_MOTION_NOTIFY:
- if (tep_el->mouse_down) {
- command.action = E_TEP_SELECT;
- command.position = E_TEP_VALUE;
- command.time = event->motion.time;
- command.value = event->motion.position;
- }
- break;
- case GDK_KEY_PRESS:
- {
- ETextEventProcessorEventKey key = event->key;
- command.time = event->key.time;
- if (key.state & GDK_SHIFT_MASK)
- command.action = E_TEP_SELECT;
- else
- command.action = E_TEP_MOVE;
- switch(key.keyval) {
- case GDK_Home:
- case GDK_KP_Home:
- if (key.state & GDK_CONTROL_MASK)
- command.position = E_TEP_START_OF_BUFFER;
- else
- command.position = E_TEP_START_OF_LINE;
- break;
- case GDK_End:
- case GDK_KP_End:
- if (key.state & GDK_CONTROL_MASK)
- command.position = E_TEP_END_OF_BUFFER;
- else
- command.position = E_TEP_END_OF_LINE;
- break;
- case GDK_Page_Up:
- case GDK_KP_Page_Up: command.position = E_TEP_BACKWARD_PAGE; break;
-
- case GDK_Page_Down:
- case GDK_KP_Page_Down: command.position = E_TEP_FORWARD_PAGE; break;
- /* CUA has Ctrl-Up/Ctrl-Down as paragraph up down */
- case GDK_Up:
- case GDK_KP_Up: command.position = E_TEP_BACKWARD_LINE; break;
-
- case GDK_Down:
- case GDK_KP_Down: command.position = E_TEP_FORWARD_LINE; break;
-
- case GDK_Left:
- case GDK_KP_Left:
- if (key.state & GDK_CONTROL_MASK)
- command.position = E_TEP_BACKWARD_WORD;
- else
- command.position = E_TEP_BACKWARD_CHARACTER;
- break;
- case GDK_Right:
- case GDK_KP_Right:
- if (key.state & GDK_CONTROL_MASK)
- command.position = E_TEP_FORWARD_WORD;
- else
- command.position = E_TEP_FORWARD_CHARACTER;
- break;
-
- case GDK_BackSpace:
- command.action = E_TEP_DELETE;
- if (key.state & GDK_CONTROL_MASK)
- command.position = E_TEP_BACKWARD_WORD;
- else
- command.position = E_TEP_BACKWARD_CHARACTER;
- break;
- case GDK_Clear:
- command.action = E_TEP_DELETE;
- command.position = E_TEP_END_OF_LINE;
- break;
- case GDK_Insert:
- case GDK_KP_Insert:
- if (key.state & GDK_SHIFT_MASK) {
- command.action = E_TEP_PASTE;
- command.position = E_TEP_SELECTION;
- } else if (key.state & GDK_CONTROL_MASK) {
- command.action = E_TEP_COPY;
- command.position = E_TEP_SELECTION;
- } else {
- /* gtk_toggle_insert(text) -- IMPLEMENT -- FIXME */
- }
- break;
- case GDK_Delete:
- case GDK_KP_Delete:
- if (key.state & GDK_CONTROL_MASK){
- command.action = E_TEP_DELETE;
- command.position = E_TEP_FORWARD_WORD;
- } else if (key.state & GDK_SHIFT_MASK) {
- command.action = E_TEP_COPY;
- command.position = E_TEP_SELECTION;
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
-
- command.action = E_TEP_DELETE;
- command.position = E_TEP_SELECTION;
- } else {
- command.action = E_TEP_DELETE;
- command.position = E_TEP_FORWARD_CHARACTER;
- }
- break;
- case GDK_Tab:
- case GDK_KP_Tab:
- case GDK_ISO_Left_Tab:
- case GDK_3270_BackTab:
- /* Don't insert literally */
- command.action = E_TEP_NOP;
- command.position = E_TEP_SELECTION;
- break;
- case GDK_Return:
- case GDK_KP_Enter:
- if (tep->allow_newlines) {
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "\n";
- } else {
- command.action = E_TEP_ACTIVATE;
- command.position = E_TEP_SELECTION;
- }
- break;
- case GDK_Escape:
- /* Don't insert literally */
- command.action = E_TEP_NOP;
- command.position = E_TEP_SELECTION;
- break;
-
- case GDK_KP_Space:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = " ";
- break;
- case GDK_KP_Equal:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "=";
- break;
- case GDK_KP_Multiply:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "*";
- break;
- case GDK_KP_Add:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "+";
- break;
- case GDK_KP_Subtract:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "-";
- break;
- case GDK_KP_Decimal:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = ".";
- break;
- case GDK_KP_Divide:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "/";
- break;
- case GDK_KP_0:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "0";
- break;
- case GDK_KP_1:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "1";
- break;
- case GDK_KP_2:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "2";
- break;
- case GDK_KP_3:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "3";
- break;
- case GDK_KP_4:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "4";
- break;
- case GDK_KP_5:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "5";
- break;
- case GDK_KP_6:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "6";
- break;
- case GDK_KP_7:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "7";
- break;
- case GDK_KP_8:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "8";
- break;
- case GDK_KP_9:
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = 1;
- command.string = "9";
- break;
-
- default:
- if (key.state & GDK_CONTROL_MASK) {
- if ((key.keyval >= 'A') && (key.keyval <= 'Z'))
- key.keyval -= 'A' - 'a';
-
- if ((key.keyval >= 'a') && (key.keyval <= 'z')) {
- command.position = control_keys[(int) (key.keyval - 'a')].position;
- if (control_keys[(int) (key.keyval - 'a')].action != E_TEP_MOVE)
- command.action = control_keys[(int) (key.keyval - 'a')].action;
- command.value = control_keys[(int) (key.keyval - 'a')].value;
- command.string = control_keys[(int) (key.keyval - 'a')].string;
- }
-
- if (key.keyval == 'x' || key.keyval == 'w') {
- command.action = E_TEP_COPY;
- command.position = E_TEP_SELECTION;
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
-
- command.action = E_TEP_DELETE;
- command.position = E_TEP_SELECTION;
- }
-
- break;
- } else if (key.state & GDK_MOD1_MASK) {
- if ((key.keyval >= 'A') && (key.keyval <= 'Z'))
- key.keyval -= 'A' - 'a';
-
- if ((key.keyval >= 'a') && (key.keyval <= 'z')) {
- command.position = alt_keys[(int) (key.keyval - 'a')].position;
- if (alt_keys[(int) (key.keyval - 'a')].action != E_TEP_MOVE)
- command.action = alt_keys[(int) (key.keyval - 'a')].action;
- command.value = alt_keys[(int) (key.keyval - 'a')].value;
- command.string = alt_keys[(int) (key.keyval - 'a')].string;
- }
- } else if (key.length > 0) {
- if (key.keyval >= GDK_KP_0 && key.keyval <= GDK_KP_9) {
- key.keyval = '0';
- key.string = "0";
- }
- command.action = E_TEP_INSERT;
- command.position = E_TEP_SELECTION;
- command.value = strlen(key.string);
- command.string = key.string;
-
- } else {
- command.action = E_TEP_NOP;
- }
- }
- break;
- case GDK_KEY_RELEASE:
- command.time = event->key.time;
- command.action = E_TEP_NOP;
- break;
- default:
- command.action = E_TEP_NOP;
- break;
- }
- }
- if (command.action != E_TEP_NOP) {
- gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
- return 1;
- }
- else
- return 0;
-}
-
-ETextEventProcessor *
-e_text_event_processor_emacs_like_new (void)
-{
- ETextEventProcessorEmacsLike *retval = gtk_type_new (e_text_event_processor_emacs_like_get_type ());
- return E_TEXT_EVENT_PROCESSOR (retval);
-}
-
diff --git a/e-util/e-text-event-processor-emacs-like.h b/e-util/e-text-event-processor-emacs-like.h
deleted file mode 100644
index 7d1f0e68d2..0000000000
--- a/e-util/e-text-event-processor-emacs-like.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-text-event-processor-emacs-like.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef __E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__
-#define __E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__
-
-#include <gal/util/e-text-event-processor.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-/* ETextEventProcessorEmacsLike - Turns events on a text widget into commands. Uses an emacs-ish interface.
- *
- */
-
-#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE (e_text_event_processor_emacs_like_get_type ())
-#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE(obj) (GTK_CHECK_CAST ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, ETextEventProcessorEmacsLike))
-#define E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE, ETextEventProcessorEmacsLikeClass))
-#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE(obj) (GTK_CHECK_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE))
-#define E_IS_TEXT_EVENT_PROCESSOR_EMACS_LIKE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_TYPE))
-
-
-typedef struct _ETextEventProcessorEmacsLike ETextEventProcessorEmacsLike;
-typedef struct _ETextEventProcessorEmacsLikeClass ETextEventProcessorEmacsLikeClass;
-
-struct _ETextEventProcessorEmacsLike
-{
- ETextEventProcessor parent;
-
- /* object specific fields */
- guint mouse_down : 1;
-};
-
-struct _ETextEventProcessorEmacsLikeClass
-{
- ETextEventProcessorClass parent_class;
-};
-
-
-GtkType e_text_event_processor_emacs_like_get_type (void);
-ETextEventProcessor *e_text_event_processor_emacs_like_new (void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_TEXT_EVENT_PROCESSOR_EMACS_LIKE_H__ */
diff --git a/e-util/e-text-event-processor-types.h b/e-util/e-text-event-processor-types.h
deleted file mode 100644
index 1e012cdf1a..0000000000
--- a/e-util/e-text-event-processor-types.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-text-event-processor.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
- * file for a list of people on the GTK+ Team. See the ChangeLog
- * files for a list of changes. These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#ifndef __E_TEXT_EVENT_PROCESSOR_TYPES_H__
-#define __E_TEXT_EVENT_PROCESSOR_TYPES_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#include <gdk/gdktypes.h>
-
-typedef union _ETextEventProcessorEvent ETextEventProcessorEvent;
-
-typedef enum {
- E_TEP_VALUE,
- E_TEP_SELECTION,
-
- E_TEP_START_OF_BUFFER,
- E_TEP_END_OF_BUFFER,
-
- E_TEP_START_OF_LINE,
- E_TEP_END_OF_LINE,
-
- E_TEP_FORWARD_CHARACTER,
- E_TEP_BACKWARD_CHARACTER,
-
- E_TEP_FORWARD_WORD,
- E_TEP_BACKWARD_WORD,
-
- E_TEP_FORWARD_LINE,
- E_TEP_BACKWARD_LINE,
-
- E_TEP_FORWARD_PARAGRAPH,
- E_TEP_BACKWARD_PARAGRAPH,
-
- E_TEP_FORWARD_PAGE,
- E_TEP_BACKWARD_PAGE,
-
- E_TEP_SELECT_WORD,
- E_TEP_SELECT_ALL
-
-} ETextEventProcessorCommandPosition;
-
-typedef enum {
- E_TEP_MOVE,
- E_TEP_SELECT,
- E_TEP_DELETE,
- E_TEP_INSERT,
-
- E_TEP_COPY,
- E_TEP_PASTE,
- E_TEP_GET_SELECTION,
- E_TEP_SET_SELECT_BY_WORD,
- E_TEP_ACTIVATE,
-
- E_TEP_GRAB,
- E_TEP_UNGRAB,
-
- E_TEP_NOP
-} ETextEventProcessorCommandAction;
-
-typedef struct {
- ETextEventProcessorCommandPosition position;
- ETextEventProcessorCommandAction action;
- int value;
- char *string;
- guint32 time;
-} ETextEventProcessorCommand;
-
-typedef struct {
- GdkEventType type;
- guint32 time;
- guint state;
- guint button;
- gint position;
-} ETextEventProcessorEventButton;
-
-typedef struct {
- GdkEventType type;
- guint32 time;
- guint state;
- guint keyval;
- gint length;
- gchar *string;
-} ETextEventProcessorEventKey;
-
-typedef struct {
- GdkEventType type;
- guint32 time;
- guint state;
- gint position;
-} ETextEventProcessorEventMotion;
-
-union _ETextEventProcessorEvent {
- GdkEventType type;
- ETextEventProcessorEventButton button;
- ETextEventProcessorEventKey key;
- ETextEventProcessorEventMotion motion;
-};
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_TEXT_EVENT_PROCESSOR_TYPES_H__ */
diff --git a/e-util/e-text-event-processor.c b/e-util/e-text-event-processor.c
deleted file mode 100644
index 6449b23463..0000000000
--- a/e-util/e-text-event-processor.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-text-event-processor.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "e-text-event-processor.h"
-#include <gtk/gtksignal.h>
-
-static void e_text_event_processor_init (ETextEventProcessor *card);
-static void e_text_event_processor_class_init (ETextEventProcessorClass *klass);
-
-static void e_text_event_processor_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-static void e_text_event_processor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
-
-static GtkObjectClass *parent_class = NULL;
-
-/* The arguments we take */
-enum {
- ARG_0,
- ARG_ALLOW_NEWLINES,
-};
-
-enum {
- E_TEP_EVENT,
- E_TEP_LAST_SIGNAL
-};
-
-static guint e_tep_signals[E_TEP_LAST_SIGNAL] = { 0 };
-
-GtkType
-e_text_event_processor_get_type (void)
-{
- static GtkType text_event_processor_type = 0;
-
- if (!text_event_processor_type)
- {
- static const GtkTypeInfo text_event_processor_info =
- {
- "ETextEventProcessor",
- sizeof (ETextEventProcessor),
- sizeof (ETextEventProcessorClass),
- (GtkClassInitFunc) e_text_event_processor_class_init,
- (GtkObjectInitFunc) e_text_event_processor_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- text_event_processor_type = gtk_type_unique (gtk_object_get_type (), &text_event_processor_info);
- }
-
- return text_event_processor_type;
-}
-
-static void
-e_text_event_processor_class_init (ETextEventProcessorClass *klass)
-{
- GtkObjectClass *object_class;
-
- object_class = (GtkObjectClass*) klass;
-
- parent_class = gtk_type_class (gtk_object_get_type ());
-
- e_tep_signals[E_TEP_EVENT] =
- gtk_signal_new ("command",
- GTK_RUN_LAST,
- object_class->type,
- GTK_SIGNAL_OFFSET (ETextEventProcessorClass, command),
- gtk_marshal_NONE__POINTER,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_POINTER);
-
- gtk_object_class_add_signals (object_class, e_tep_signals, E_TEP_LAST_SIGNAL);
-
- gtk_object_add_arg_type ("ETextEventProcessor::allow_newlines", GTK_TYPE_BOOL,
- GTK_ARG_READWRITE, ARG_ALLOW_NEWLINES);
-
- klass->event = NULL;
- klass->command = NULL;
-
- object_class->set_arg = e_text_event_processor_set_arg;
- object_class->get_arg = e_text_event_processor_get_arg;
-}
-
-static void
-e_text_event_processor_init (ETextEventProcessor *tep)
-{
- tep->allow_newlines = TRUE;
-}
-
-gint
-e_text_event_processor_handle_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event)
-{
- if (E_TEXT_EVENT_PROCESSOR_CLASS(GTK_OBJECT(tep)->klass)->event) {
- return E_TEXT_EVENT_PROCESSOR_CLASS(GTK_OBJECT(tep)->klass)->event(tep, event);
- } else {
- return 0;
- }
-}
-
-/* Set_arg handler for the text item */
-static void
-e_text_event_processor_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ETextEventProcessor *tep = E_TEXT_EVENT_PROCESSOR (object);
-
- switch (arg_id) {
- case ARG_ALLOW_NEWLINES:
- tep->allow_newlines = GTK_VALUE_BOOL (*arg);
- break;
- default:
- return;
- }
-}
-
-/* Get_arg handler for the text item */
-static void
-e_text_event_processor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- ETextEventProcessor *tep = E_TEXT_EVENT_PROCESSOR (object);
-
- switch (arg_id) {
- case ARG_ALLOW_NEWLINES:
- GTK_VALUE_BOOL (*arg) = tep->allow_newlines;
- break;
- default:
- arg->type = GTK_TYPE_INVALID;
- break;
- }
-}
diff --git a/e-util/e-text-event-processor.h b/e-util/e-text-event-processor.h
deleted file mode 100644
index 00785db757..0000000000
--- a/e-util/e-text-event-processor.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-text-event-processor.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef __E_TEXT_EVENT_PROCESSOR_H__
-#define __E_TEXT_EVENT_PROCESSOR_H__
-
-#include <glib.h>
-#include <gtk/gtkobject.h>
-#include <gal/util/e-text-event-processor-types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-/* ETextEventProcessor - Turns events on a text widget into commands.
- *
- */
-
-#define E_TEXT_EVENT_PROCESSOR_TYPE (e_text_event_processor_get_type ())
-#define E_TEXT_EVENT_PROCESSOR(obj) (GTK_CHECK_CAST ((obj), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessor))
-#define E_TEXT_EVENT_PROCESSOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TEXT_EVENT_PROCESSOR_TYPE, ETextEventProcessorClass))
-#define E_IS_TEXT_EVENT_PROCESSOR(obj) (GTK_CHECK_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_TYPE))
-#define E_IS_TEXT_EVENT_PROCESSOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_TEXT_EVENT_PROCESSOR_TYPE))
-
-
-typedef struct _ETextEventProcessor ETextEventProcessor;
-typedef struct _ETextEventProcessorClass ETextEventProcessorClass;
-
-struct _ETextEventProcessor
-{
- GtkObject parent;
-
- /* object specific fields */
- guint allow_newlines : 1;
-};
-
-struct _ETextEventProcessorClass
-{
- GtkObjectClass parent_class;
-
- /* signals */
- void (* command) (ETextEventProcessor *tep, ETextEventProcessorCommand *command);
-
- /* virtual functions */
- gint (* event) (ETextEventProcessor *tep, ETextEventProcessorEvent *event);
-};
-
-
-GtkType e_text_event_processor_get_type (void);
-gint e_text_event_processor_handle_event (ETextEventProcessor *tep, ETextEventProcessorEvent *event);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#endif /* __E_TEXT_EVENT_PROCESSOR_H__ */
diff --git a/e-util/e-util.c b/e-util/e-util.c
deleted file mode 100644
index 5bbb9522b4..0000000000
--- a/e-util/e-util.c
+++ /dev/null
@@ -1,1050 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-xml-utils.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <glib.h>
-#include <gtk/gtkobject.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <sys/stat.h>
-#include <string.h>
-#include <locale.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "e-util.h"
-#if 0
-#include <libgnomevfs/gnome-vfs.h>
-#endif
-
-int
-g_str_compare(const void *x, const void *y)
-{
- if (x == NULL || y == NULL) {
- if (x == y)
- return 0;
- else
- return x ? -1 : 1;
- }
-
- return strcmp(x, y);
-}
-
-int
-g_int_compare(const void *x, const void *y)
-{
- if ( GPOINTER_TO_INT(x) < GPOINTER_TO_INT(y) )
- return -1;
- else if ( GPOINTER_TO_INT(x) == GPOINTER_TO_INT(y) )
- return 0;
- else
- return 1;
-}
-
-char *
-e_strdup_strip(const char *string)
-{
- int i;
- int length = 0;
- int initial = 0;
- for ( i = 0; string[i]; i++ ) {
- if (initial == i && isspace((unsigned char) string[i])) {
- initial ++;
- }
- if (!isspace((unsigned char) string[i])) {
- length = i - initial + 1;
- }
- }
- return g_strndup(string + initial, length);
-}
-
-void
-e_free_object_list (GList *list)
-{
- GList *p;
-
- for (p = list; p != NULL; p = p->next)
- gtk_object_unref (GTK_OBJECT (p->data));
-
- g_list_free (list);
-}
-
-void
-e_free_string_list (GList *list)
-{
- GList *p;
-
- for (p = list; p != NULL; p = p->next)
- g_free (p->data);
-
- g_list_free (list);
-}
-
-#define BUFF_SIZE 1024
-
-char *
-e_read_file(const char *filename)
-{
- int fd;
- char buffer[BUFF_SIZE];
- GList *list = NULL, *list_iterator;
- GList *lengths = NULL, *lengths_iterator;
- int length = 0;
- int bytes;
- char *ret_val;
-
- fd = open(filename, O_RDONLY);
- if (fd == -1)
- return NULL;
- bytes = read(fd, buffer, BUFF_SIZE);
- while (bytes) {
- if (bytes > 0) {
- char *temp = g_malloc(bytes);
- memcpy (temp, buffer, bytes);
- list = g_list_prepend(list, temp);
- lengths = g_list_prepend(lengths, GINT_TO_POINTER(bytes));
- length += bytes;
- } else {
- if (errno != EINTR) {
- close(fd);
- g_list_foreach(list, (GFunc) g_free, NULL);
- g_list_free(list);
- g_list_free(lengths);
- return NULL;
- }
- }
- bytes = read(fd, buffer, BUFF_SIZE);
- }
- ret_val = g_new(char, length + 1);
- ret_val[length] = 0;
- lengths_iterator = lengths;
- list_iterator = list;
- for ( ; list_iterator; list_iterator = list_iterator->next, lengths_iterator = lengths_iterator->next) {
- int this_length = GPOINTER_TO_INT(lengths_iterator->data);
- length -= this_length;
- memcpy(ret_val + length, list_iterator->data, this_length);
- }
- close(fd);
- g_list_foreach(list, (GFunc) g_free, NULL);
- g_list_free(list);
- g_list_free(lengths);
- return ret_val;
-}
-
-gint
-e_write_file(const char *filename, const char *data, int flags)
-{
- int fd;
- int length = strlen(data);
- int bytes;
- fd = open(filename, flags, 0666);
- if (fd == -1)
- return errno;
- while (length > 0) {
- bytes = write(fd, data, length);
- if (bytes > 0) {
- length -= bytes;
- data += bytes;
- } else {
- if (errno != EINTR && errno != EAGAIN) {
- int save_errno = errno;
- close(fd);
- return save_errno;
- }
- }
- }
- close(fd);
- return 0;
-}
-
-/**
- * e_mkdir_hier:
- * @path: a directory path
- * @mode: a mode, as for mkdir(2)
- *
- * This creates the named directory with the given @mode, creating
- * any necessary intermediate directories (with the same @mode).
- *
- * Return value: 0 on success, -1 on error, in which case errno will
- * be set as for mkdir(2).
- **/
-int
-e_mkdir_hier(const char *path, mode_t mode)
-{
- char *copy, *p;
-
- p = copy = g_strdup (path);
- do {
- p = strchr (p + 1, '/');
- if (p)
- *p = '\0';
- if (access (copy, F_OK) == -1) {
- if (mkdir (copy, mode) == -1) {
- g_free (copy);
- return -1;
- }
- }
- if (p)
- *p = '/';
- } while (p);
-
- g_free (copy);
- return 0;
-}
-
-#if 0
-char *
-e_read_uri(const char *uri)
-{
- GnomeVFSHandle *handle;
- GList *list = NULL, *list_iterator;
- GList *lengths = NULL, *lengths_iterator;
- gchar buffer[1025];
- gchar *ret_val;
- int length = 0;
- GnomeVFSFileSize bytes;
-
- gnome_vfs_open(&handle, uri, GNOME_VFS_OPEN_READ);
-
- gnome_vfs_read(handle, buffer, 1024, &bytes);
- while (bytes) {
- if (bytes) {
- char *temp = g_malloc(bytes);
- memcpy (temp, buffer, bytes);
- list = g_list_prepend(list, temp);
- lengths = g_list_prepend(lengths, GINT_TO_POINTER((gint) bytes));
- length += bytes;
- }
- gnome_vfs_read(handle, buffer, 1024, &bytes);
- }
-
- ret_val = g_new(char, length + 1);
- ret_val[length] = 0;
- lengths_iterator = lengths;
- list_iterator = list;
- for ( ; list_iterator; list_iterator = list_iterator->next, lengths_iterator = lengths_iterator->next) {
- int this_length = GPOINTER_TO_INT(lengths_iterator->data);
- length -= this_length;
- memcpy(ret_val + length, list_iterator->data, this_length);
- }
- gnome_vfs_close(handle);
- g_list_foreach(list, (GFunc) g_free, NULL);
- g_list_free(list);
- g_list_free(lengths);
- return ret_val;
-}
-#endif
-
-typedef gint (*GtkSignal_INT__INT_INT_POINTER) (GtkObject * object,
- gint arg1,
- gint arg2,
- gpointer arg3,
- gpointer user_data);
-
-void
-e_marshal_INT__INT_INT_POINTER (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_INT__INT_INT_POINTER rfunc;
- gint *return_val;
- return_val = GTK_RETLOC_INT (args[3]);
- rfunc = (GtkSignal_INT__INT_INT_POINTER) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_INT (args[1]),
- GTK_VALUE_POINTER (args[2]),
- func_data);
-}
-
-typedef gint (*GtkSignal_INT__INT_POINTER_INT_POINTER) (GtkObject * object,
- gint arg1,
- gpointer arg2,
- gint arg3,
- gpointer arg4,
- gpointer user_data);
-
-void
-e_marshal_INT__INT_POINTER_INT_POINTER (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_INT__INT_POINTER_INT_POINTER rfunc;
- gint *return_val;
- return_val = GTK_RETLOC_INT (args[4]);
- rfunc = (GtkSignal_INT__INT_POINTER_INT_POINTER) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_INT (args[2]),
- GTK_VALUE_POINTER (args[3]),
- func_data);
-}
-
-typedef void (*GtkSignal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL) (GtkObject * object,
- GtkObject *arg1,
- gdouble arg2,
- gdouble arg3,
- gboolean arg4,
- gpointer user_data);
-
-void
-e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL rfunc;
- rfunc = (GtkSignal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL) func;
- (*rfunc) (object,
- GTK_VALUE_OBJECT (args[0]),
- GTK_VALUE_DOUBLE (args[1]),
- GTK_VALUE_DOUBLE (args[2]),
- GTK_VALUE_BOOL (args[3]),
- func_data);
-}
-
-typedef gdouble (*GtkSignal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL) (GtkObject * object,
- GtkObject *arg1,
- gdouble arg2,
- gdouble arg3,
- gboolean arg4,
- gpointer user_data);
-
-void
-e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL rfunc;
- gdouble *return_val;
- return_val = GTK_RETLOC_DOUBLE (args[4]);
- rfunc = (GtkSignal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_OBJECT (args[0]),
- GTK_VALUE_DOUBLE (args[1]),
- GTK_VALUE_DOUBLE (args[2]),
- GTK_VALUE_BOOL (args[3]),
- func_data);
-}
-
-typedef gdouble (*GtkSignal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL) (GtkObject * object,
- GtkObject *arg1,
- gdouble arg2,
- gdouble arg3,
- gboolean arg4,
- gpointer user_data);
-
-void
-e_marshal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL rfunc;
- gboolean *return_val;
- return_val = GTK_RETLOC_BOOL (args[4]);
- rfunc = (GtkSignal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_OBJECT (args[0]),
- GTK_VALUE_DOUBLE (args[1]),
- GTK_VALUE_DOUBLE (args[2]),
- GTK_VALUE_BOOL (args[3]),
- func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_INT_POINTER_POINTER_INT_INT) (GtkObject * object,
- gint arg1,
- gint arg2,
- gpointer arg3,
- gpointer arg4,
- gint arg5,
- gint arg6,
- gpointer user_data);
-void
-e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_INT_POINTER_POINTER_INT_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_INT_POINTER_POINTER_INT_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]),
- GTK_VALUE_POINTER (args[2]),
- GTK_VALUE_POINTER (args[3]),
- GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT) (GtkObject * object,
- gint arg1,
- gpointer arg2,
- gint arg3,
- gpointer arg4,
- gpointer arg5,
- gint arg6,
- gint arg7,
- gpointer user_data);
-void
-e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT (args[2]),
- GTK_VALUE_POINTER (args[3]),
- GTK_VALUE_POINTER (args[4]),
- GTK_VALUE_INT (args[5]), GTK_VALUE_INT (args[6]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_INT_POINTER_INT) (GtkObject * object,
- gint arg1,
- gint arg2,
- gpointer arg3,
- gint arg4, gpointer user_data);
-void
-e_marshal_NONE__INT_INT_POINTER_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_INT_POINTER_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_INT_POINTER_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]),
- GTK_VALUE_POINTER (args[2]), GTK_VALUE_INT (args[3]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER_INT) (GtkObject * object,
- gint arg1,
- gpointer arg2,
- gint arg3,
- gpointer arg4,
- gint arg5, gpointer user_data);
-void
-e_marshal_NONE__INT_POINTER_INT_POINTER_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_POINTER_INT_POINTER_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT (args[2]),
- GTK_VALUE_POINTER (args[3]), GTK_VALUE_INT (args[4]), func_data);
-}
-
-typedef gboolean (*GtkSignal_BOOL__INT_INT_POINTER_INT_INT_INT) (GtkObject * object,
- gint arg1,
- gint arg2,
- gpointer arg3,
- gint arg4,
- gint arg5,
- gint arg6,
- gpointer user_data);
-void
-e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_BOOL__INT_INT_POINTER_INT_INT_INT rfunc;
- gboolean *return_val;
- return_val = GTK_RETLOC_BOOL (args[6]);
- rfunc = (GtkSignal_BOOL__INT_INT_POINTER_INT_INT_INT) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_INT (args[1]),
- GTK_VALUE_POINTER (args[2]),
- GTK_VALUE_INT (args[3]),
- GTK_VALUE_INT (args[4]),
- GTK_VALUE_INT (args[5]), func_data);
-}
-
-typedef gboolean (*GtkSignal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT) (GtkObject * object,
- gint arg1,
- gpointer arg2,
- gint arg3,
- gpointer arg4,
- gint arg5,
- gint arg6,
- gint arg7,
- gpointer user_data);
-void
-e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT rfunc;
- gboolean *return_val;
- return_val = GTK_RETLOC_BOOL (args[7]);
- rfunc = (GtkSignal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT) func;
- *return_val = (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_INT (args[2]),
- GTK_VALUE_POINTER (args[3]),
- GTK_VALUE_INT (args[4]),
- GTK_VALUE_INT (args[5]),
- GTK_VALUE_INT (args[6]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT) (GtkObject *
- object,
- gint arg1,
- gint arg2,
- gpointer
- arg3,
- gint arg4,
- gint arg5,
- gpointer
- arg6,
- gint arg7,
- gint arg8,
- gpointer
- user_data);
-
-void
-e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg * args)
-{
- GtkSignal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]),
- GTK_VALUE_POINTER (args[2]),
- GTK_VALUE_INT (args[3]),
- GTK_VALUE_INT (args[4]),
- GTK_VALUE_POINTER (args[5]),
- GTK_VALUE_INT (args[6]), GTK_VALUE_INT (args[7]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT) (GtkObject *
- object,
- gint arg1,
- gpointer arg2,
- gint arg3,
- gpointer arg4,
- gint arg5,
- gint arg6,
- gpointer arg7,
- gint arg8,
- gint arg9,
- gpointer user_data);
-
-void
-e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject * object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg * args)
-{
- GtkSignal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT rfunc;
- rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT) func;
- (*rfunc) (object,
- GTK_VALUE_INT (args[0]),
- GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_INT (args[2]),
- GTK_VALUE_POINTER (args[3]),
- GTK_VALUE_INT (args[4]),
- GTK_VALUE_INT (args[5]),
- GTK_VALUE_POINTER (args[6]),
- GTK_VALUE_INT (args[7]), GTK_VALUE_INT (args[8]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__POINTER_POINTER_INT) (GtkObject *, gpointer,
- gpointer, gint, gpointer);
-
-void
-e_marshal_NONE__POINTER_POINTER_INT (GtkObject * object, GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__POINTER_POINTER_INT rfunc;
- rfunc = (GtkSignal_NONE__POINTER_POINTER_INT) func;
- (*rfunc) (object, GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_INT (args[2]), func_data);
-}
-
-typedef void (*GtkSignal_NONE__INT_POINTER_INT_POINTER) (GtkObject *, gint, gpointer,
- gint, gpointer, gpointer);
-
-void
-e_marshal_NONE__INT_POINTER_INT_POINTER (GtkObject * object, GtkSignalFunc func,
- gpointer func_data, GtkArg * args)
-{
- GtkSignal_NONE__INT_POINTER_INT_POINTER rfunc;
- rfunc = (GtkSignal_NONE__INT_POINTER_INT_POINTER) func;
- (*rfunc) (object, GTK_VALUE_INT (args[0]), GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_INT (args[2]), GTK_VALUE_POINTER (args[3]), func_data);
-}
-
-typedef int (*GtkSignal_INT__POINTER_POINTER) (GtkObject *,
- gpointer, gpointer,
- gpointer user_data);
-void
-e_marshal_INT__POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
-{
- GtkSignal_INT__POINTER_POINTER rfunc;
- int *return_val;
-
- rfunc = (GtkSignal_INT__POINTER_POINTER) func;
- return_val = GTK_RETLOC_INT (args[2]);
-
- *return_val = (*rfunc) (object,
- GTK_VALUE_POINTER (args[0]),
- GTK_VALUE_POINTER (args[1]),
- func_data);
-}
-
-typedef int (*GtkSignal_INT__POINTER_POINTER_POINTER) (GtkObject *,
- gpointer, gpointer, gpointer,
- gpointer user_data);
-void
-e_marshal_INT__POINTER_POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
-{
- GtkSignal_INT__POINTER_POINTER_POINTER rfunc;
- int *return_val;
-
- rfunc = (GtkSignal_INT__POINTER_POINTER_POINTER) func;
- return_val = GTK_RETLOC_INT (args[3]);
-
- *return_val = (*rfunc) (object,
- GTK_VALUE_POINTER (args[0]),
- GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_POINTER (args[2]),
- func_data);
-}
-
-typedef int (*GtkSignal_INT__POINTER_POINTER_POINTER_POINTER) (GtkObject *,
- gpointer, gpointer, gpointer, gpointer,
- gpointer user_data);
-void
-e_marshal_INT__POINTER_POINTER_POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
-{
- GtkSignal_INT__POINTER_POINTER_POINTER_POINTER rfunc;
- int *return_val;
-
- rfunc = (GtkSignal_INT__POINTER_POINTER_POINTER_POINTER) func;
- return_val = GTK_RETLOC_INT (args[4]);
-
- *return_val = (*rfunc) (object,
- GTK_VALUE_POINTER (args[0]),
- GTK_VALUE_POINTER (args[1]),
- GTK_VALUE_POINTER (args[2]),
- GTK_VALUE_POINTER (args[3]),
- func_data);
-}
-
-
-void
-e_marshal_NONE__POINTER_INT_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args)
-{
- (* (void (*)(GtkObject *, gpointer, int, int, int, gpointer)) func)
- (object,
- GTK_VALUE_POINTER (args[0]),
- GTK_VALUE_INT (args[1]),
- GTK_VALUE_INT (args[2]),
-
- GTK_VALUE_INT (args[3]),
- func_data);
-}
-
-gchar**
-e_strsplit (const gchar *string,
- const gchar *delimiter,
- gint max_tokens)
-{
- GSList *string_list = NULL, *slist;
- gchar **str_array, *s;
- guint i, n = 1;
-
- g_return_val_if_fail (string != NULL, NULL);
- g_return_val_if_fail (delimiter != NULL, NULL);
-
- if (max_tokens < 1)
- max_tokens = G_MAXINT;
-
- s = strstr (string, delimiter);
- if (s)
- {
- guint delimiter_len = strlen (delimiter);
-
- do
- {
- guint len;
- gchar *new_string;
-
- len = s - string;
- new_string = g_new (gchar, len + 1);
- strncpy (new_string, string, len);
- new_string[len] = 0;
- string_list = g_slist_prepend (string_list, new_string);
- n++;
- string = s + delimiter_len;
- s = strstr (string, delimiter);
- }
- while (--max_tokens && s);
- }
-
- n++;
- string_list = g_slist_prepend (string_list, g_strdup (string));
-
- str_array = g_new (gchar*, n);
-
- i = n - 1;
-
- str_array[i--] = NULL;
- for (slist = string_list; slist; slist = slist->next)
- str_array[i--] = slist->data;
-
- g_slist_free (string_list);
-
- return str_array;
-}
-
-gchar *
-e_strstrcase (const gchar *haystack, const gchar *needle)
-{
- /* find the needle in the haystack neglecting case */
- const gchar *ptr;
- guint len;
-
- g_return_val_if_fail (haystack != NULL, NULL);
- g_return_val_if_fail (needle != NULL, NULL);
-
- len = strlen(needle);
- if (len > strlen(haystack))
- return NULL;
-
- if (len == 0)
- return (gchar *) haystack;
-
- for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++)
- if (!g_strncasecmp (ptr, needle, len))
- return (gchar *) ptr;
-
- return NULL;
-}
-
-void
-e_filename_make_safe (gchar *string)
-{
- gchar *p;
-
- g_return_if_fail (string != NULL);
-
- for (p = string; *p; p++) {
- if (!isprint ((unsigned char)*p) || strchr (" /'\"`&();|<>${}!", *p))
- *p = '_';
- }
-}
-
-static gint
-epow10 (gint number) {
- gint value;
-
- for (value = 1; number > 0; number --) {
- value *= 10;
- }
- return value;
-}
-
-gchar *
-e_format_number (gint number)
-{
- GList *iterator, *list = NULL;
- struct lconv *locality;
- gint char_length = 0;
- gint group_count = 0;
- guchar *grouping;
- int last_count = 3;
- int divider;
- char *value;
- char *value_iterator;
- int initial_grouping;
-
- locality = localeconv();
- grouping = locality->grouping;
- initial_grouping = *grouping;
- while (number) {
- char *group;
- switch (*grouping) {
- default:
- last_count = *grouping;
- grouping++;
- case 0:
- divider = epow10(last_count);
- if((!list && (number/divider) > 0) || number > divider) {
- group = g_strdup_printf("%0*d", initial_grouping, number % divider);
- } else {
- group = g_strdup_printf("%d", number % divider);
- }
- number /= divider;
- break;
- case CHAR_MAX:
- group = g_strdup_printf("%d", number);
- number = 0;
- break;
- }
- char_length += strlen(group);
- list = g_list_prepend(list, group);
- group_count ++;
- }
-
- if (list) {
- value = g_new(char, char_length + (group_count - 1) * strlen(locality->thousands_sep));
-
- iterator = list;
- value_iterator = value;
-
- strcpy(value_iterator, iterator->data);
- value_iterator += strlen(iterator->data);
- for (iterator = iterator->next; iterator; iterator = iterator->next) {
- strcpy(value_iterator, locality->thousands_sep);
- value_iterator += strlen(locality->thousands_sep);
-
- strcpy(value_iterator, iterator->data);
- value_iterator += strlen(iterator->data);
- }
- e_free_string_list (list);
- return value;
- } else {
- return g_strdup("0");
- }
-}
-
-gchar *
-e_format_number_float (gfloat number)
-{
- gint int_part;
- gint fraction;
- struct lconv *locality;
- gchar *str_intpart;
- gchar *decimal_point;
- gchar *str_fraction;
- gchar *value;
-
- locality = localeconv();
-
- int_part = (int) number;
- str_intpart = e_format_number (int_part);
-
- if (!strcmp(locality->mon_decimal_point, "")) {
- decimal_point = ".";
- }
- else {
- decimal_point = locality->mon_decimal_point;
- }
-
- fraction = (int) ((number - int_part) * 100);
-
- if (fraction == 0) {
- str_fraction = g_strdup ("00");
- }
- else {
- str_fraction = g_strdup_printf ("%02d", fraction);
- }
-
- value = g_strconcat (str_intpart, decimal_point, str_fraction, NULL);
-
- g_free (str_intpart);
- g_free (str_fraction);
-
- return value;
-}
-
-gboolean
-e_create_directory (gchar *directory)
-{
- gchar *full_name;
- gchar *position;
- gchar *current_dir = g_get_current_dir();
- struct stat info;
- gboolean return_value = TRUE;
-
- if (directory[0] == '/') {
- full_name = g_malloc0 (strlen (directory) + 1);
- strcpy (full_name, directory);
- } else {
- full_name = g_malloc0 (strlen (directory) + strlen (current_dir) + 2);
- sprintf (full_name, "%s/%s", current_dir, directory);
- }
-
- if ((position = strrchr (full_name, '/')) == full_name) {
- if (stat (full_name, &info)) {
- switch (errno) {
- case ENOENT:
- if (mkdir (full_name, 0777)) {
- switch (errno) {
- default:
- return_value = FALSE;
- break;
- }
- }
- break;
- default:
- return_value = FALSE;
- break;
- }
- }
- } else {
- *position = 0;
- e_create_directory (full_name);
- *position = '/';
- if (stat (full_name, &info)) {
- switch (errno) {
- case ENOENT:
- if (mkdir (full_name, 0777)) {
- switch (errno) {
- default:
- return_value = FALSE;
- break;
- }
- }
- break;
- default:
- return_value = FALSE;
- break;
- }
- }
- }
-
- g_free (current_dir);
- g_free (full_name);
-
- return (return_value);
-}
-
-
-/* Perform a binary search for key in base which has nmemb elements
- of size bytes each. The comparisons are done by (*compare)(). */
-void e_bsearch (const void *key,
- const void *base,
- size_t nmemb,
- size_t size,
- ESortCompareFunc compare,
- gpointer closure,
- size_t *start,
- size_t *end)
-{
- size_t l, u, idx;
- const void *p;
- int comparison;
- if (!(start || end))
- return;
-
- l = 0;
- u = nmemb;
- while (l < u) {
- idx = (l + u) / 2;
- p = (void *) (((const char *) base) + (idx * size));
- comparison = (*compare) (key, p, closure);
- if (comparison < 0)
- u = idx;
- else if (comparison > 0)
- l = idx + 1;
- else {
- size_t lsave, usave;
- lsave = l;
- usave = u;
- if (start) {
- while (l < u) {
- idx = (l + u) / 2;
- p = (void *) (((const char *) base) + (idx * size));
- comparison = (*compare) (key, p, closure);
- if (comparison <= 0)
- u = idx;
- else
- l = idx + 1;
- }
- *start = l;
-
- l = lsave;
- u = usave;
- }
- if (end) {
- while (l < u) {
- idx = (l + u) / 2;
- p = (void *) (((const char *) base) + (idx * size));
- comparison = (*compare) (key, p, closure);
- if (comparison < 0)
- u = idx;
- else
- l = idx + 1;
- }
- *end = l;
- }
- return;
- }
- }
-
- if (start)
- *start = l;
- if (end)
- *end = l;
-}
-
-static gpointer closure_closure;
-static ESortCompareFunc compare_closure;
-
-static int
-qsort_callback(const void *data1, const void *data2)
-{
- return (*compare_closure) (data1, data2, closure_closure);
-}
-
-/* Forget it. We're just going to use qsort. I lost the need for a stable sort. */
-void
-e_sort (void *base,
- size_t nmemb,
- size_t size,
- ESortCompareFunc compare,
- gpointer closure)
-{
- closure_closure = closure;
- compare_closure = compare;
- qsort(base, nmemb, size, qsort_callback);
-#if 0
- void *base_copy;
- int i;
- base_copy = g_malloc(nmemb * size);
-
- for (i = 0; i < nmemb; i++) {
- int position;
- e_bsearch(base + (i * size), base_copy, i, size, compare, closure, NULL, &position);
- memmove(base_copy + (position + 1) * size, base_copy + position * size, (i - position) * size);
- memcpy(base_copy + position * size, base + i * size, size);
- }
- memcpy(base, base_copy, nmemb * size);
- g_free(base_copy);
-#endif
-}
diff --git a/e-util/e-util.h b/e-util/e-util.h
deleted file mode 100644
index bf89b27aa1..0000000000
--- a/e-util/e-util.h
+++ /dev/null
@@ -1,205 +0,0 @@
-#ifndef _E_UTIL_H_
-#define _E_UTIL_H_
-
-#include <sys/types.h>
-#include <gtk/gtktypeutils.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#define E_MAKE_TYPE(l,str,t,ci,i,parent) \
-GtkType l##_get_type(void)\
-{\
- static GtkType type = 0;\
- if (!type){\
- GtkTypeInfo info = {\
- str,\
- sizeof (t),\
- sizeof (t##Class),\
- (GtkClassInitFunc) ci,\
- (GtkObjectInitFunc) i,\
- NULL, /* reserved 1 */\
- NULL, /* reserved 2 */\
- (GtkClassInitFunc) NULL\
- };\
- type = gtk_type_unique (parent, &info);\
- }\
- return type;\
-}
-
-
-#define E_MAKE_X_TYPE(l,str,t,ci,i,parent,poa_init,offset) \
-GtkType l##_get_type(void)\
-{\
- static GtkType type = 0;\
- if (!type){\
- GtkTypeInfo info = {\
- str,\
- sizeof (t),\
- sizeof (t##Class),\
- (GtkClassInitFunc) ci,\
- (GtkObjectInitFunc) i,\
- NULL, /* reserved 1 */\
- NULL, /* reserved 2 */\
- (GtkClassInitFunc) NULL\
- };\
- type = bonobo_x_type_unique (\
- parent, poa_init, NULL,\
- offset, &info);\
- }\
- return type;\
-}
-
-typedef enum {
- E_FOCUS_NONE,
- E_FOCUS_CURRENT,
- E_FOCUS_START,
- E_FOCUS_END
-} EFocus;
-int g_str_compare (const void *x,
- const void *y);
-int g_int_compare (const void *x,
- const void *y);
-char *e_strdup_strip (const char *string);
-void e_free_object_list (GList *list);
-void e_free_string_list (GList *list);
-char *e_read_file (const char *filename);
-int e_write_file (const char *filename,
- const char *data,
- int flags);
-int e_mkdir_hier (const char *path,
- mode_t mode);
-
-gchar **e_strsplit (const gchar *string,
- const gchar *delimiter,
- gint max_tokens);
-gchar *e_strstrcase (const gchar *haystack,
- const gchar *needle);
-void e_filename_make_safe (gchar *string);
-gchar *e_format_number (gint number);
-gchar *e_format_number_float (gfloat number);
-
-gboolean e_create_directory (gchar *directory);
-
-
-typedef int (*ESortCompareFunc) (const void *first,
- const void *second,
- gpointer closure);
-
-void e_sort (void *base,
- size_t nmemb,
- size_t size,
- ESortCompareFunc compare,
- gpointer closure);
-void e_bsearch (const void *key,
- const void *base,
- size_t nmemb,
- size_t size,
- ESortCompareFunc compare,
- gpointer closure,
- size_t *start,
- size_t *end);
-
-
-
-void e_marshal_INT__INT_INT_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_INT__INT_POINTER_INT_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_INT_POINTER_POINTER_UINT_UINT e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT
-void e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_UINT_UINT e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT
-void e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_INT_POINTER_UINT e_marshal_NONE__INT_INT_POINTER_INT
-void e_marshal_NONE__INT_INT_POINTER_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_POINTER_INT_POINTER_UINT e_marshal_NONE__INT_POINTER_INT_POINTER_INT
-void e_marshal_NONE__INT_POINTER_INT_POINTER_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_BOOL__INT_INT_POINTER_INT_INT_UINT e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT
-void e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_UINT e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT
-void e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_UINT_UINT e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT
-void e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#define e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_UINT_UINT e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT
-void e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_NONE__POINTER_POINTER_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_NONE__INT_POINTER_INT_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_INT__POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_INT__POINTER_POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-void e_marshal_INT__POINTER_POINTER_POINTER_POINTER (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-void e_marshal_NONE__POINTER_INT_INT_INT (GtkObject *object,
- GtkSignalFunc func,
- gpointer func_data,
- GtkArg *args);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _E_UTIL_H_ */
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
deleted file mode 100644
index 3754d42ba2..0000000000
--- a/e-util/e-xml-utils.c
+++ /dev/null
@@ -1,420 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-xml-utils.c
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include "e-xml-utils.h"
-
-#include <locale.h>
-#include <math.h>
-#include <string.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
-#include "gal/util/e-i18n.h"
-
-xmlNode *
-e_xml_get_child_by_name (const xmlNode *parent, const xmlChar *child_name)
-{
- xmlNode *child;
-
- g_return_val_if_fail (parent != NULL, NULL);
- g_return_val_if_fail (child_name != NULL, NULL);
-
- for (child = parent->childs; child != NULL; child = child->next) {
- if (xmlStrcmp (child->name, child_name) == 0) {
- return child;
- }
- }
- return NULL;
-}
-
-/* Returns the first child with the name child_name and the "lang"
- * attribute that matches the current LC_MESSAGES, or else, the first
- * child with the name child_name and no "lang" attribute.
- */
-xmlNode *
-e_xml_get_child_by_name_by_lang (const xmlNode *parent,
- const xmlChar *child_name,
- const gchar *lang)
-{
- xmlNode *child;
- /* This is the default version of the string. */
- xmlNode *C = NULL;
-
- g_return_val_if_fail (parent != NULL, NULL);
- g_return_val_if_fail (child_name != NULL, NULL);
-
- if (lang == NULL) {
-#ifdef HAVE_LC_MESSAGES
- lang = setlocale (LC_MESSAGES, NULL);
-#else
- lang = setlocale (LC_CTYPE, NULL);
-#endif
- }
- for (child = parent->childs; child != NULL; child = child->next) {
- if (xmlStrcmp (child->name, child_name) == 0) {
- xmlChar *this_lang = xmlGetProp (child, "lang");
- if (this_lang == NULL) {
- C = child;
- } else if (xmlStrcmp(this_lang, "lang") == 0) {
- return child;
- }
- }
- }
- return C;
-}
-
-static xmlNode *
-e_xml_get_child_by_name_by_lang_list_with_score (const xmlNode *parent,
- const gchar *name,
- GList *lang_list,
- gint *best_lang_score)
-{
- xmlNodePtr best_node = NULL, node;
-
- for (node = parent->childs; node != NULL; node = node->next) {
- xmlChar *lang;
-
- if (node->name == NULL || strcmp (node->name, name) != 0) {
- continue;
- }
- lang = xmlGetProp (node, "xml:lang");
- if (lang != NULL) {
- GList *l;
- gint i;
-
- for (l = lang_list, i = 0;
- l != NULL && i < *best_lang_score;
- l = l->next, i++) {
- if (strcmp ((gchar *) l->data, lang) == 0) {
- best_node = node;
- *best_lang_score = i;
- }
- }
- } else {
- if (best_node == NULL) {
- best_node = node;
- }
- }
- xmlFree (lang);
- if (*best_lang_score == 0) {
- return best_node;
- }
- }
-
- return best_node;
-}
-
-/*
- * e_xml_get_child_by_name_by_lang_list:
- *
- */
-xmlNode *
-e_xml_get_child_by_name_by_lang_list (const xmlNode *parent,
- const gchar *name,
- GList *lang_list)
-{
- gint best_lang_score = INT_MAX;
-
- g_return_val_if_fail (parent != NULL, NULL);
- g_return_val_if_fail (name != NULL, NULL);
-
- if (lang_list == NULL) {
- lang_list = gnome_i18n_get_language_list ("LC_MESSAGES");
- }
- return e_xml_get_child_by_name_by_lang_list_with_score
- (parent,name,
- lang_list,
- &best_lang_score);
-}
-
-/*
- * e_xml_get_child_by_name_no_lang
- *
- */
-xmlNode *
-e_xml_get_child_by_name_no_lang (const xmlNode *parent, const gchar *name)
-{
- xmlNodePtr node;
-
- g_return_val_if_fail (parent != NULL, NULL);
- g_return_val_if_fail (name != NULL, NULL);
-
- for (node = parent->childs; node != NULL; node = node->next) {
- xmlChar *lang;
-
- if (node->name == NULL || strcmp (node->name, name) != 0) {
- continue;
- }
- lang = xmlGetProp (node, "xml:lang");
- if (lang == NULL) {
- return node;
- }
- xmlFree (lang);
- }
-
- return NULL;
-}
-
-gint
-e_xml_get_integer_prop_by_name (const xmlNode *parent, const xmlChar *prop_name)
-{
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- return e_xml_get_integer_prop_by_name_with_default (parent, prop_name, 0);
-}
-
-gint
-e_xml_get_integer_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- gint def)
-{
- xmlChar *prop;
- gint ret_val = def;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- (void) sscanf (prop, "%d", &ret_val);
- xmlFree (prop);
- }
- return ret_val;
-}
-
-void
-e_xml_set_integer_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- gint value)
-{
- gchar *valuestr;
-
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- valuestr = g_strdup_printf ("%d", value);
- xmlSetProp (parent, prop_name, valuestr);
- g_free (valuestr);
-}
-
-guint
-e_xml_get_uint_prop_by_name (const xmlNode *parent, const xmlChar *prop_name)
-{
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- return e_xml_get_uint_prop_by_name_with_default (parent, prop_name, 0);
-}
-
-guint
-e_xml_get_uint_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- guint def)
-{
- xmlChar *prop;
- guint ret_val = def;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- (void) sscanf (prop, "%u", &ret_val);
- xmlFree (prop);
- }
- return ret_val;
-}
-
-void
-e_xml_set_uint_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- guint value)
-{
- gchar *valuestr;
-
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- valuestr = g_strdup_printf ("%u", value);
- xmlSetProp (parent, prop_name, valuestr);
- g_free (valuestr);
-}
-
-gboolean
-e_xml_get_bool_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name)
-{
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- return e_xml_get_bool_prop_by_name_with_default (parent,
- prop_name,
- FALSE);
-}
-
-gboolean
-e_xml_get_bool_prop_by_name_with_default(const xmlNode *parent,
- const xmlChar *prop_name,
- gboolean def)
-{
- xmlChar *prop;
- gboolean ret_val = def;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- if (g_strcasecmp (prop, "true") == 0) {
- ret_val = TRUE;
- } else if (g_strcasecmp (prop, "false") == 0) {
- ret_val = FALSE;
- }
- xmlFree(prop);
- }
- return ret_val;
-}
-
-void
-e_xml_set_bool_prop_by_name (xmlNode *parent, const xmlChar *prop_name, gboolean value)
-{
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- if (value) {
- xmlSetProp (parent, prop_name, "true");
- } else {
- xmlSetProp (parent, prop_name, "false");
- }
-}
-
-gdouble
-e_xml_get_double_prop_by_name (const xmlNode *parent, const xmlChar *prop_name)
-{
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- return e_xml_get_double_prop_by_name_with_default (parent, prop_name, 0.0);
-}
-
-gdouble
-e_xml_get_double_prop_by_name_with_default (const xmlNode *parent, const xmlChar *prop_name, gdouble def)
-{
- xmlChar *prop;
- gdouble ret_val = def;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- (void) sscanf (prop, "%lf", &ret_val);
- xmlFree (prop);
- }
- return ret_val;
-}
-
-void
-e_xml_set_double_prop_by_name(xmlNode *parent, const xmlChar *prop_name, gdouble value)
-{
- gchar *valuestr;
-
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- if (fabs (value) < 1e9 && fabs (value) > 1e-5) {
- valuestr = g_strdup_printf ("%f", value);
- } else {
- valuestr = g_strdup_printf ("%.*g", DBL_DIG, value);
- }
- xmlSetProp (parent, prop_name, valuestr);
- g_free (valuestr);
-}
-
-gchar *
-e_xml_get_string_prop_by_name (const xmlNode *parent, const xmlChar *prop_name)
-{
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- return e_xml_get_string_prop_by_name_with_default (parent, prop_name, NULL);
-}
-
-gchar *
-e_xml_get_string_prop_by_name_with_default (const xmlNode *parent, const xmlChar *prop_name, const gchar *def)
-{
- xmlChar *prop;
- gchar *ret_val;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- ret_val = g_strdup (prop);
- xmlFree (prop);
- } else {
- ret_val = g_strdup (def);
- }
- return ret_val;
-}
-
-void
-e_xml_set_string_prop_by_name (xmlNode *parent, const xmlChar *prop_name, const gchar *value)
-{
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- if (value != NULL) {
- xmlSetProp (parent, prop_name, value);
- }
-}
-
-gchar *
-e_xml_get_translated_string_prop_by_name (const xmlNode *parent, const xmlChar *prop_name)
-{
- xmlChar *prop;
- gchar *ret_val = NULL;
- gchar *combined_name;
-
- g_return_val_if_fail (parent != NULL, 0);
- g_return_val_if_fail (prop_name != NULL, 0);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- ret_val = g_strdup (prop);
- xmlFree (prop);
- return ret_val;
- }
-
- combined_name = g_strdup_printf("_%s", prop_name);
- prop = xmlGetProp ((xmlNode *) parent, combined_name);
- if (prop != NULL) {
- ret_val = g_strdup (gettext(prop));
- xmlFree (prop);
- }
- g_free(combined_name);
-
- return ret_val;
-}
diff --git a/e-util/e-xml-utils.h b/e-util/e-xml-utils.h
deleted file mode 100644
index ba102c1c3d..0000000000
--- a/e-util/e-xml-utils.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * e-xml-utils.h
- * Copyright (C) 2000 Helix Code, Inc.
- * Author: Chris Lahey <clahey@helixcode.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __E_XML_UTILS__
-#define __E_XML_UTILS__
-
-#include <libgnome/gnome-defs.h>
-#include <glib.h>
-#include <gnome-xml/tree.h>
-
-BEGIN_GNOME_DECLS
-
-xmlNode *e_xml_get_child_by_name (const xmlNode *parent,
- const xmlChar *child_name);
-/* lang set to NULL means use the current locale. */
-xmlNode *e_xml_get_child_by_name_by_lang (const xmlNode *parent,
- const xmlChar *child_name,
- const gchar *lang);
-/* lang_list set to NULL means use the current locale. */
-xmlNode *e_xml_get_child_by_name_by_lang_list (const xmlNode *parent,
- const gchar *name,
- GList *lang_list);
-xmlNode *e_xml_get_child_by_name_no_lang (const xmlNode *parent,
- const gchar *name);
-
-
-gint e_xml_get_integer_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-gint e_xml_get_integer_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- gint def);
-void e_xml_set_integer_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- gint value);
-
-
-guint e_xml_get_uint_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-guint e_xml_get_uint_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- guint def);
-void e_xml_set_uint_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- guint value);
-
-
-gboolean e_xml_get_bool_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-gboolean e_xml_get_bool_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- gboolean def);
-void e_xml_set_bool_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- gboolean value);
-
-gdouble e_xml_get_double_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-gdouble e_xml_get_double_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- gdouble def);
-void e_xml_set_double_prop_by_name ( xmlNode *parent,
- const xmlChar *prop_name,
- gdouble value);
-
-
-gchar *e_xml_get_string_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-gchar *e_xml_get_string_prop_by_name_with_default (const xmlNode *parent,
- const xmlChar *prop_name,
- const gchar *def);
-void e_xml_set_string_prop_by_name (xmlNode *parent,
- const xmlChar *prop_name,
- const gchar *value);
-
-gchar *e_xml_get_translated_string_prop_by_name (const xmlNode *parent,
- const xmlChar *prop_name);
-
-END_GNOME_DECLS
-
-#endif /* __E_XML_UTILS__ */
diff --git a/executive-summary/ChangeLog b/executive-summary/ChangeLog
index d5788e2a1e..6eac045497 100644
--- a/executive-summary/ChangeLog
+++ b/executive-summary/ChangeLog
@@ -1,38 +1,8 @@
-2001-04-25 Dan Winship <danw@ximian.com>
+2001-04-18 Gediminas Paulauskas <menesis@delfi.lt>
- * idl/Makefile.am (INCLUDES): Remove this section, which doesn't
- apply to anything since there are no targets in this directory.
-
- * test-service/Makefile.am:
- * evolution-services/Makefile.am:
- * component/Makefile.am: Remove UNICODE_LIBS/UNICODE_CFLAGS
-
-2001-04-14 Michael Meeks <michael@ximian.com>
-
- * idl/Makefile.am: Remove stale build cruftiness.
-
-2001-04-10 Gediminas Paulauskas <menesis@delfi.lt>
-
- * widgets/e-summary-subwindow.c: added some missing includes.
- * widgets/e-summary-title-button.h: same.
-
-2001-04-04 Gediminas Paulauskas <menesis@delfi.lt>
-
- * component/component-factory.c: last time I've broken shortcut view.
- renamed icons properly.
-
-2001-04-01 Gediminas Paulauskas <menesis@delfi.lt>
-
- * component/component-factory.c: Changed folder type icon to tiny
- executive summary icon.
* component/e-summary-factory.c: replaced set_pixmap with new EPixmap
cache.
-2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * *.*: Clean up includes. Remove/replace <gnome.h>, <bonobo.h>
- and <gtk/gtk.h>.
-
2001-03-08 Ettore Perazzoli <ettore@ximian.com>
* component/component-factory.c (factory_fn): Specify a NULL
diff --git a/filter/ChangeLog b/filter/ChangeLog
index 5d2978ce1d..e3d6c96ced 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,18 +1,3 @@
-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,
@@ -25,48 +10,11 @@
* 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.
+ * filter-rule.c: Added #ifdef FOR_TRANSLATIONS_ONLY section
+ containing strings to make gettext pick them up. Solves
+ #1971 in bugzilla. (rule directions not translated.)
2001-03-22 Jeffrey Stedfast <fejj@ximian.com>
diff --git a/filter/filter-colour.c b/filter/filter-colour.c
index bebc83453c..8b49de74fb 100644
--- a/filter/filter-colour.c
+++ b/filter/filter-colour.c
@@ -22,8 +22,8 @@
#include <config.h>
#endif
-#include <gtk/gtksignal.h>
-#include <libgnomeui/gnome-color-picker.h>
+#include <gtk/gtk.h>
+#include <gnome.h>
#include "e-util/e-sexp.h"
#include "filter-colour.h"
diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c
index 857194ebb3..0ebf858c7b 100644
--- a/filter/filter-datespec.c
+++ b/filter/filter-datespec.c
@@ -19,25 +19,9 @@
*/
#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
#include <time.h>
-#include <glib.h>
-#include <gtk/gtkcalendar.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkhseparator.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkmenu.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtktable.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-stock.h>
+#include <gtk/gtk.h>
+#include <gnome.h>
#include "filter-datespec.h"
#include "e-util/e-sexp.h"
diff --git a/filter/filter-driver.c b/filter/filter-driver.c
deleted file mode 100644
index bc941a9c01..0000000000
--- a/filter/filter-driver.c
+++ /dev/null
@@ -1,778 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2000 Helix Code Inc.
- *
- * Authors: Michael Zucchi <notzed@helixcode.com>
- * Jeffrey Stedfast <fejj@helixcode.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "filter-driver.h"
-#include "filter-message-search.h"
-
-#include <glib.h>
-#include <gtk/gtk.h>
-#include <gnome.h>
-#include <gtkhtml/gtkhtml.h>
-
-#include <time.h>
-
-#include <gnome-xml/tree.h>
-#include <gnome-xml/parser.h>
-
-#include <camel/camel.h>
-#include "filter-context.h"
-#include "filter-filter.h"
-#include "e-util/e-sexp.h"
-#include "e-util/e-memory.h"
-
-#define d(x)
-
-/* type of status for a log report */
-enum filter_log_t {
- FILTER_LOG_NONE,
- FILTER_LOG_START, /* start of new log entry */
- FILTER_LOG_ACTION, /* an action performed */
- FILTER_LOG_END, /* end of log */
-};
-
-struct _FilterDriverPrivate {
- GHashTable *globals; /* global variables */
-
- CamelFolder *defaultfolder; /* defualt folder */
-
- FDStatusFunc *statusfunc; /* status callback */
- void *statusdata; /* status callback data */
-
- FilterContext *context;
-
- /* for callback */
- FilterGetFolderFunc get_folder;
- void *data;
-
- /* run-time data */
- GHashTable *folders; /* folders that message has been copied to */
- GHashTable *forwards; /* addresses that have been forwarded the message */
-
- gboolean terminated; /* message processing was terminated */
- gboolean deleted; /* message was marked for deletion */
- gboolean copied; /* message was copied to some folder or another */
-
- CamelMimeMessage *message; /* input message */
- CamelMessageInfo *info; /* message summary info */
-
- FILE *logfile; /* log file */
-
- CamelException *ex;
-
- /* evaluator */
- ESExp *eval;
-};
-
-#define _PRIVATE(o) (((FilterDriver *)(o))->priv)
-
-static void filter_driver_class_init (FilterDriverClass *klass);
-static void filter_driver_init (FilterDriver *obj);
-static void filter_driver_finalise (GtkObject *obj);
-
-static void filter_driver_log (FilterDriver *driver, enum filter_log_t status, const char *desc, ...);
-
-static CamelFolder *open_folder (FilterDriver *d, const char *folder_url);
-static int close_folders (FilterDriver *d);
-
-static ESExpResult *do_delete (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *);
-static ESExpResult *mark_forward (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *);
-static ESExpResult *do_copy (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *);
-static ESExpResult *do_move (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *);
-static ESExpResult *do_stop (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *);
-static ESExpResult *do_colour (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *);
-static ESExpResult *do_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *);
-static ESExpResult *do_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *);
-
-/* these are our filter actions - each must have a callback */
-static struct {
- char *name;
- ESExpFunc *func;
- int type; /* set to 1 if a function can perform shortcut evaluation, or
- doesn't execute everything, 0 otherwise */
-} symbols[] = {
- { "delete", (ESExpFunc *) do_delete, 0 },
- { "forward-to", (ESExpFunc *) mark_forward, 0 },
- { "copy-to", (ESExpFunc *) do_copy, 0 },
- { "move-to", (ESExpFunc *) do_move, 0 },
- { "stop", (ESExpFunc *) do_stop, 0 },
- { "set-colour", (ESExpFunc *) do_colour, 0 },
- { "set-score", (ESExpFunc *) do_score, 0 },
- { "set-system-flag", (ESExpFunc *) do_flag, 0 }
-};
-
-static GtkObjectClass *filter_driver_parent;
-
-enum SIGNALS {
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-guint
-filter_driver_get_type (void)
-{
- static guint type = 0;
-
- if (!type) {
- GtkTypeInfo type_info = {
- "FilterDriver",
- sizeof (FilterDriver),
- sizeof (FilterDriverClass),
- (GtkClassInitFunc) filter_driver_class_init,
- (GtkObjectInitFunc) filter_driver_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (gtk_object_get_type (), &type_info);
- }
-
- return type;
-}
-
-static void
-filter_driver_class_init (FilterDriverClass *klass)
-{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
-
- filter_driver_parent = gtk_type_class (gtk_object_get_type ());
-
- object_class->finalize = filter_driver_finalise;
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-filter_driver_init (FilterDriver *obj)
-{
- struct _FilterDriverPrivate *p;
- int i;
-
- p = _PRIVATE (obj) = g_malloc0 (sizeof (*p));
-
- p->eval = e_sexp_new ();
- /* Load in builtin symbols */
- for (i = 0; i < sizeof (symbols) / sizeof (symbols[0]); i++) {
- if (symbols[i].type == 1) {
- e_sexp_add_ifunction (p->eval, 0, symbols[i].name, (ESExpIFunc *)symbols[i].func, obj);
- } else {
- e_sexp_add_function (p->eval, 0, symbols[i].name, symbols[i].func, obj);
- }
- }
-
- p->globals = g_hash_table_new (g_str_hash, g_str_equal);
-
- p->folders = g_hash_table_new (g_str_hash, g_str_equal);
-}
-
-static void
-free_hash_strings (void *key, void *value, void *data)
-{
- g_free (key);
- g_free (value);
-}
-
-static void
-filter_driver_finalise (GtkObject *obj)
-{
- FilterDriver *driver = (FilterDriver *) obj;
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
-
- /* close all folders that were opened for appending */
- close_folders (driver);
- g_hash_table_destroy (p->folders);
-
- g_hash_table_foreach (p->globals, free_hash_strings, driver);
- g_hash_table_destroy (p->globals);
-
- e_sexp_unref(p->eval);
-
- if (p->defaultfolder)
- camel_object_unref (CAMEL_OBJECT (p->defaultfolder));
-
- g_free (p);
-
- ((GtkObjectClass *)(filter_driver_parent))->finalize (GTK_OBJECT (obj));
-}
-
-/**
- * filter_driver_new:
- * @system: path to system rules
- * @user: path to user rules
- * @get_folder: function to call to fetch folders
- *
- * Create a new FilterDriver object.
- *
- * Return value: A new FilterDriver widget.
- **/
-FilterDriver *
-filter_driver_new (FilterContext *context, FilterGetFolderFunc get_folder, void *data)
-{
- FilterDriver *new;
- struct _FilterDriverPrivate *p;
-
- new = FILTER_DRIVER (gtk_type_new (filter_driver_get_type ()));
- p = _PRIVATE (new);
-
- p->get_folder = get_folder;
- p->data = data;
- p->context = context;
- gtk_object_ref (GTK_OBJECT (context));
-
- return new;
-}
-
-void
-filter_driver_set_logfile (FilterDriver *d, FILE *logfile)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (d);
-
- p->logfile = logfile;
-}
-
-void
-filter_driver_set_status_func (FilterDriver *d, FDStatusFunc *func, void *data)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (d);
-
- p->statusfunc = func;
- p->statusdata = data;
-}
-
-void
-filter_driver_set_default_folder (FilterDriver *d, CamelFolder *def)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (d);
-
- if (p->defaultfolder)
- camel_object_unref (CAMEL_OBJECT (p->defaultfolder));
-
- p->defaultfolder = def;
-
- if (p->defaultfolder)
- camel_object_ref (CAMEL_OBJECT (p->defaultfolder));
-}
-
-static void
-report_status (FilterDriver *driver, enum filter_status_t status, const char *desc, ...)
-{
- /* call user-defined status report function */
- struct _FilterDriverPrivate *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, str, p->statusdata);
- g_free (str);
- }
-}
-
-
-#if 0
-void
-filter_driver_set_global (FilterDriver *d, const char *name, const char *value)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (d);
- char *oldkey, *oldvalue;
-
- if (g_hash_table_lookup_extended (p->globals, name, (void *)&oldkey, (void *)&oldvalue)) {
- g_free (oldvalue);
- g_hash_table_insert (p->globals, oldkey, g_strdup (value));
- } else {
- g_hash_table_insert (p->globals, g_strdup (name), g_strdup (value));
- }
-}
-#endif
-
-static ESExpResult *
-do_delete (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *driver)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
-
- d(fprintf (stderr, "doing delete\n"));
- p->deleted = TRUE;
- filter_driver_log (driver, FILTER_LOG_ACTION, "Delete");
-
- return NULL;
-}
-
-static ESExpResult *
-mark_forward (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *driver)
-{
- /*struct _FilterDriverPrivate *p = _PRIVATE (driver);*/
-
- d(fprintf (stderr, "marking message for forwarding\n"));
- /* FIXME: do stuff here */
- filter_driver_log (driver, FILTER_LOG_ACTION, "Forward");
-
- return NULL;
-}
-
-static ESExpResult *
-do_copy (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *driver)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
- int i;
-
- d(fprintf (stderr, "copying message...\n"));
-
- for (i = 0; i < argc; i++) {
- if (argv[i]->type == ESEXP_RES_STRING) {
- /* open folders we intent to copy to */
- char *folder = argv[i]->value.string;
- char *service_url;
- CamelFolder *outbox;
-
- outbox = open_folder (driver, folder);
- if (!outbox)
- continue;
-
- p->copied = TRUE;
- camel_folder_append_message (outbox, p->message, p->info, p->ex);
-
- service_url = camel_service_get_url (CAMEL_SERVICE (camel_folder_get_parent_store (outbox)));
- filter_driver_log (driver, FILTER_LOG_ACTION, "Copy to folder %s", service_url);
- g_free (service_url);
- }
- }
-
- return NULL;
-}
-
-static ESExpResult *
-do_move (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *driver)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
- int i;
-
- d(fprintf (stderr, "moving message...\n"));
-
- for (i = 0; i < argc; i++) {
- if (argv[i]->type == ESEXP_RES_STRING) {
- /* open folders we intent to move to */
- char *folder = argv[i]->value.string;
- char *service_url;
- CamelFolder *outbox;
-
- outbox = open_folder (driver, folder);
- if (!outbox)
- continue;
-
- p->copied = TRUE;
- p->deleted = TRUE; /* a 'move' is a copy & delete */
-
- camel_folder_append_message (outbox, p->message, p->info, p->ex);
-
- service_url = camel_service_get_url (CAMEL_SERVICE (camel_folder_get_parent_store (outbox)));
- filter_driver_log (driver, FILTER_LOG_ACTION, "Move to folder %s", service_url);
- g_free (service_url);
- }
- }
-
- return NULL;
-}
-
-static ESExpResult *
-do_stop (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *driver)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
-
- 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, FilterDriver *driver)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
-
- d(fprintf (stderr, "setting colour tag\n"));
- if (argc > 0 && argv[0]->type == ESEXP_RES_STRING) {
- camel_tag_set (&p->info->user_tags, "colour", argv[0]->value.string);
- 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, FilterDriver *driver)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
-
- d(fprintf (stderr, "setting score tag\n"));
- if (argc > 0 && argv[0]->type == ESEXP_RES_INT) {
- char *value;
-
- value = g_strdup_printf ("%d", argv[0]->value.number);
- camel_tag_set (&p->info->user_tags, "score", value);
- filter_driver_log (driver, FILTER_LOG_ACTION, "Set score to %d", argv[0]->value.number);
- g_free (value);
- }
-
- return NULL;
-}
-
-static ESExpResult *
-do_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterDriver *driver)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
-
- d(fprintf (stderr, "setting flag\n"));
- if (argc == 1 && argv[0]->type == ESEXP_RES_STRING) {
- p->info->flags |= camel_system_flag (argv[0]->value.string) | CAMEL_MESSAGE_FOLDER_FLAGGED;
- filter_driver_log (driver, FILTER_LOG_ACTION, "Set %s flag", argv[0]->value.string);
- }
-
- return NULL;
-}
-
-static CamelFolder *
-open_folder (FilterDriver *driver, const char *folder_url)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
- CamelFolder *camelfolder;
-
- /* we have a lookup table of currently open folders */
- camelfolder = g_hash_table_lookup (p->folders, folder_url);
- if (camelfolder)
- return camelfolder;
-
- camelfolder = p->get_folder (driver, folder_url, p->data);
-
- if (camelfolder) {
- g_hash_table_insert (p->folders, g_strdup (folder_url), camelfolder);
- camel_folder_freeze (camelfolder);
- }
-
- return camelfolder;
-}
-
-static void
-close_folder (void *key, void *value, void *data)
-{
- CamelFolder *folder = value;
- FilterDriver *driver = data;
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
-
- g_free (key);
- camel_folder_sync (folder, FALSE, p->ex);
- camel_folder_thaw (folder);
- camel_object_unref (CAMEL_OBJECT (folder));
-}
-
-/* flush/close all folders */
-static int
-close_folders (FilterDriver *driver)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
-
- 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
-filter_driver_log (FilterDriver *driver, enum filter_log_t status, const char *desc, ...)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
-
- if (p->logfile) {
- char *str = NULL;
-
- if (desc) {
- va_list ap;
-
- va_start (ap, desc);
- str = g_strdup_vprintf (desc, ap);
- }
-
- switch (status) {
- case FILTER_LOG_START: {
- /* write log header */
- const char *subject = NULL;
- char *fromstr;
- const CamelInternetAddress *from;
- char date[50];
- time_t t;
-
- /* FIXME: does this need locking? Probably */
-
- from = camel_mime_message_get_from (p->message);
- fromstr = camel_address_format((CamelAddress *)from);
- subject = camel_mime_message_get_subject (p->message);
-
- time (&t);
- strftime (date, 49, "%a, %d %b %Y %H:%M:%S", localtime (&t));
- fprintf (p->logfile, "Applied filter \"%s\" to message from %s - \"%s\" at %s\n",
- str, fromstr ? fromstr : "unknown", subject ? subject : "", date);
- g_free(fromstr);
- break;
- }
- case FILTER_LOG_ACTION:
- fprintf (p->logfile, "Action: %s\n", str);
- break;
- case FILTER_LOG_END:
- fprintf (p->logfile, "\n");
- break;
- default:
- /* nothing else is loggable */
- break;
- }
-
- g_free (str);
- }
-}
-
-
-/* will filter only an mbox - is more efficient as it doesn't need to open the folder through camel directly */
-void
-filter_driver_filter_mbox (FilterDriver *driver, const char *mbox, const char *source, CamelException *ex)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
- CamelMimeParser *mp = NULL;
- char *source_url = NULL;
- int fd = -1;
- int i = 0;
- struct stat st;
-
- fd = open (mbox, O_RDONLY);
- if (fd == -1) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, "Unable to open spool folder");
- goto fail;
- }
- /* to get the filesize */
- fstat (fd, &st);
-
- mp = camel_mime_parser_new ();
- camel_mime_parser_scan_from (mp, TRUE);
- if (camel_mime_parser_init_with_fd (mp, fd) == -1) {
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, "Unable to process spool folder");
- goto fail;
- }
- fd = -1;
-
- source_url = g_strdup_printf ("file://%s", mbox);
-
- while (camel_mime_parser_step (mp, 0, 0) == HSCAN_FROM) {
- CamelMimeMessage *msg;
- int pc = 0;
-
- if (st.st_size > 0)
- pc = (int)(100.0 * ((double)camel_mime_parser_tell (mp) / (double)st.st_size));
-
- report_status (driver, FILTER_STATUS_START, "Getting message %d (%d%% of file)", i, pc);
-
- msg = camel_mime_message_new ();
- if (camel_mime_part_construct_from_parser (CAMEL_MIME_PART (msg), mp) == -1) {
- report_status (driver, FILTER_STATUS_END, "Failed message %d", i);
- camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, "Cannot open message");
- camel_object_unref (CAMEL_OBJECT (msg));
- goto fail;
- }
-
- filter_driver_filter_message (driver, msg, NULL, source_url, source, ex);
- camel_object_unref (CAMEL_OBJECT (msg));
- if (camel_exception_is_set (ex)) {
- report_status (driver, FILTER_STATUS_END, "Failed message %d", i);
- goto fail;
- }
-
- report_status (driver, FILTER_STATUS_END, "Finished message %d", i);
- i++;
-
- /* skip over the FROM_END state */
- camel_mime_parser_step (mp, 0, 0);
- }
-
- if (p->defaultfolder)
- camel_folder_sync (p->defaultfolder, FALSE, ex);
-
-fail:
- g_free (source_url);
- if (fd != -1)
- close (fd);
- if (mp)
- camel_object_unref (CAMEL_OBJECT (mp));
-}
-
-/* will filter a folder */
-void
-filter_driver_filter_folder (FilterDriver *driver, CamelFolder *folder, const char *source,
- GPtrArray *uids, gboolean remove, CamelException *ex)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
- int i;
- int freeuids = FALSE;
- CamelMimeMessage *message;
- const CamelMessageInfo *info;
- char *source_url, *service_url;
-
- service_url = camel_service_get_url (CAMEL_SERVICE (camel_folder_get_parent_store (folder)));
- source_url = g_strdup_printf ("%s%s", service_url, camel_folder_get_full_name (folder));
- g_free (service_url);
-
- if (uids == NULL) {
- uids = camel_folder_get_uids (folder);
- freeuids = TRUE;
- }
-
- for (i = 0; i < uids->len; i++) {
- report_status (driver, FILTER_STATUS_START, "Getting message %d of %d", i+1, uids->len);
-
- message = camel_folder_get_message (folder, uids->pdata[i], ex);
- if (camel_exception_is_set (ex)) {
- report_status (driver, FILTER_STATUS_END, "Failed at message %d of %d", i+1, uids->len);
- break;
- }
-
- if (camel_folder_has_summary_capability (folder))
- info = camel_folder_get_message_info (folder, uids->pdata[i]);
- else
- info = NULL;
-
- filter_driver_filter_message (driver, message, (CamelMessageInfo *)info, source_url, source, ex);
- if (camel_exception_is_set (ex)) {
- report_status (driver, FILTER_STATUS_END, "Failed at message %d of %d", i+1, uids->len);
- break;
- }
-
- if (remove)
- camel_folder_set_message_flags (folder, uids->pdata[i],
- CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED);
-
- camel_object_unref (CAMEL_OBJECT (message));
- }
-
- if (freeuids)
- camel_folder_free_uids (folder, uids);
-
- if (p->defaultfolder)
- camel_folder_sync (p->defaultfolder, FALSE, ex);
-
- g_free (source_url);
-}
-
-void
-filter_driver_filter_message (FilterDriver *driver, CamelMimeMessage *message, CamelMessageInfo *info,
- const char *source_url, const char *source, CamelException *ex)
-{
- struct _FilterDriverPrivate *p = _PRIVATE (driver);
- ESExpResult *r;
- GString *fsearch, *faction;
- FilterFilter *rule;
- gboolean freeinfo = FALSE;
- gboolean filtered = FALSE;
-
- if (info == NULL) {
- struct _header_raw *h = CAMEL_MIME_PART (message)->headers;
-
- info = camel_message_info_new_from_header (h);
- freeinfo = TRUE;
- } else {
- if (info->flags & CAMEL_MESSAGE_DELETED)
- return;
- }
-
- p->ex = ex;
- p->terminated = FALSE;
- p->deleted = FALSE;
- p->copied = FALSE;
- p->message = message;
- p->info = info;
-
- fsearch = g_string_new ("");
- faction = g_string_new ("");
-
- rule = NULL;
- while ((rule = (FilterFilter *)rule_context_next_rule ((RuleContext *)p->context, (FilterRule *)rule, source))) {
- gboolean matched;
-
- g_string_truncate (fsearch, 0);
- g_string_truncate (faction, 0);
-
- filter_rule_build_code (FILTER_RULE (rule), fsearch);
- filter_filter_build_action (rule, faction);
-
- d(fprintf (stderr, "applying rule %s\n action %s\n", fsearch->str, faction->str));
-
- matched = filter_message_search (p->message, p->info, source_url, fsearch->str, p->ex);
-
- if (matched) {
- filtered = TRUE;
- filter_driver_log (driver, FILTER_LOG_START, FILTER_RULE (rule)->name);
-#ifndef NO_WARNINGS
-#warning "Must check expression parsed and executed properly?"
-#endif
- /* perform necessary filtering actions */
- e_sexp_input_text (p->eval, faction->str, strlen (faction->str));
- e_sexp_parse (p->eval);
- r = e_sexp_eval (p->eval);
- e_sexp_result_free (r);
- if (p->terminated)
- break;
- }
- }
-
- g_string_free (fsearch, TRUE);
- g_string_free (faction, TRUE);
-
- /* *Now* we can set the DELETED flag... */
- if (p->deleted)
- info->flags = info->flags | CAMEL_MESSAGE_DELETED | 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;
- filter_driver_log (driver, FILTER_LOG_ACTION, "Copy to default folder");
- camel_folder_append_message (p->defaultfolder, p->message, p->info, p->ex);
- }
-
- if (freeinfo)
- camel_message_info_free (info);
-
- if (filtered)
- filter_driver_log (driver, FILTER_LOG_END, NULL);
-}
diff --git a/filter/filter-element.h b/filter/filter-element.h
index 1ed6c431f0..1b358269c2 100644
--- a/filter/filter-element.h
+++ b/filter/filter-element.h
@@ -21,8 +21,7 @@
#ifndef _FILTER_ELEMENT_H
#define _FILTER_ELEMENT_H
-#include <gtk/gtkobject.h>
-#include <gtk/gtkwidget.h>
+#include <gtk/gtk.h>
#include <gnome-xml/parser.h>
#include <gnome-xml/xmlmemory.h>
diff --git a/filter/filter-filter.c b/filter/filter-filter.c
index 96d444528b..e5fd65846b 100644
--- a/filter/filter-filter.c
+++ b/filter/filter-filter.c
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2000-2001 Ximian Inc.
+ * Copyright (C) 2000 Helix Code Inc.
*
- * Authors: Not Zed <notzed@ximian.com>
- * Jeffrey Stedfast <fejj@ximian.com>
+ * Authors: Not Zed <notzed@lostzed.mmc.com.au>
+ * Jeffrey Stedfast <fejj@helixcode.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License
@@ -20,20 +20,9 @@
*/
#include <config.h>
+#include <gnome.h>
-#include <string.h>
-#include <glib.h>
-#include <gtk/gtkframe.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtktable.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
#include <gal/widgets/e-unicode.h>
-
#include "filter-filter.h"
#include "filter-context.h"
@@ -303,8 +292,6 @@ option_activate (GtkMenuItem *item, struct _part_data *data)
data->partwidget = filter_part_get_widget (newpart);
if (data->partwidget)
gtk_box_pack_start (GTK_BOX (data->container), data->partwidget, FALSE, FALSE, 0);
-
- gtk_object_set_data (GTK_OBJECT (data->container), "part", newpart);
}
static GtkWidget *
@@ -368,64 +355,49 @@ struct _rule_data {
static void
less_parts (GtkWidget *button, struct _rule_data *data)
{
- FilterPart *part;
- GtkWidget *rule;
GList *l;
+ FilterPart *part;
+ GtkWidget *w;
l = ((FilterFilter *)data->fr)->actions;
if (g_list_length (l) < 2)
return;
- rule = gtk_object_get_data (GTK_OBJECT (button), "rule");
- part = gtk_object_get_data (GTK_OBJECT (rule), "part");
-
- /* remove the part from the list */
+ /* remove the last one from the list */
+ l = g_list_last (l);
+ part = l->data;
filter_filter_remove_action ((FilterFilter *)data->fr, part);
gtk_object_unref (GTK_OBJECT (part));
/* and from the display */
- gtk_container_remove (GTK_CONTAINER (data->parts), rule);
- gtk_container_remove (GTK_CONTAINER (data->parts), button);
-}
-
-static void
-attach_rule (GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row)
-{
- GtkWidget *remove;
- GtkWidget *pixmap;
-
- gtk_table_attach (GTK_TABLE (data->parts), rule, 0, 1, row, row + 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ l = g_list_last (GTK_BOX (data->parts)->children);
+ w = ((GtkBoxChild *) l->data)->widget;
+ gtk_container_remove (GTK_CONTAINER (data->parts), w);
- pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_REMOVE);
- remove = gnome_pixmap_button (pixmap, _("Remove"));
- gtk_object_set_data (GTK_OBJECT (remove), "rule", rule);
- gtk_object_set_data (GTK_OBJECT (rule), "part", part);
- /*gtk_button_set_relief (GTK_BUTTON (remove), GTK_RELIEF_NONE);*/
- gtk_signal_connect (GTK_OBJECT (remove), "clicked", less_parts, data);
- gtk_table_attach (GTK_TABLE (data->parts), remove, 1, 2, row, row + 1,
- 0, 0, 0, 0);
- gtk_widget_show (remove);
+ /* if there's only 1 action, we can't remove anymore so set insensitive */
+ if (g_list_length (((FilterFilter *)data->fr)->actions) <= 1)
+ gtk_widget_set_sensitive (button, FALSE);
}
static void
more_parts (GtkWidget *button, struct _rule_data *data)
{
FilterPart *new;
+ GtkWidget *w;
/* 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);
+ gtk_box_pack_start (GTK_BOX (data->parts), w, FALSE, FALSE, 0);
+ }
+
+ /* set the "Remove action" button sensitive */
+ if (g_list_length (((FilterFilter *)data->fr)->actions) > 1) {
+ w = gtk_object_get_data (GTK_OBJECT (button), "remove");
+ gtk_widget_set_sensitive (w, TRUE);
}
}
@@ -435,7 +407,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
GtkWidget *widget;
GtkWidget *parts, *inframe;
GtkWidget *hbox;
- GtkWidget *add, *pixmap;
+ GtkWidget *add, *remove, *pixmap;
GtkWidget *w;
GtkWidget *frame;
GtkWidget *scrolledwindow;
@@ -444,7 +416,6 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
FilterPart *part;
struct _rule_data *data;
FilterFilter *ff = (FilterFilter *)fr;
- gint rows, i = 0;
widget = ((FilterRuleClass *)(parent_class))->get_widget (fr, f);
@@ -453,8 +424,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
inframe = gtk_vbox_new (FALSE, 3);
gtk_container_add (GTK_CONTAINER (frame), inframe);
- rows = g_list_length (ff->actions);
- parts = gtk_table_new (rows, 2, FALSE);
+ parts = gtk_vbox_new (FALSE, 3);
data = g_malloc0 (sizeof (*data));
data->f = (FilterContext *)f;
data->fr = fr;
@@ -468,6 +438,17 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
gtk_signal_connect (GTK_OBJECT (add), "clicked", more_parts, data);
gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 3);
+ pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_REMOVE);
+ remove = gnome_pixmap_button (pixmap, _("Remove action"));
+ gtk_object_set_data (GTK_OBJECT (add), "remove", remove);
+ gtk_button_set_relief (GTK_BUTTON (remove), GTK_RELIEF_NONE);
+ gtk_signal_connect (GTK_OBJECT (remove), "clicked", less_parts, data);
+ gtk_box_pack_start (GTK_BOX (hbox), remove, FALSE, FALSE, 3);
+
+ /* if we only have 1 action, then we can't remove any more so disable this */
+ if (g_list_length (ff->actions) <= 1)
+ gtk_widget_set_sensitive (remove, FALSE);
+
gtk_box_pack_start (GTK_BOX (inframe), hbox, FALSE, FALSE, 3);
l = ff->actions;
@@ -475,7 +456,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
part = l->data;
d(printf ("adding action %s\n", part->title));
w = get_rule_part_widget ((FilterContext *)f, part, fr);
- attach_rule (w, data, part, i++);
+ gtk_box_pack_start (GTK_BOX (parts), w, FALSE, FALSE, 3);
l = g_list_next (l);
}
diff --git a/filter/filter-folder.c b/filter/filter-folder.c
index a16aa0c795..f2dcc6edad 100644
--- a/filter/filter-folder.c
+++ b/filter/filter-folder.c
@@ -19,14 +19,10 @@
*/
#include <config.h>
+#include <gnome.h>
#define SHELL
-#include <glib.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
#include <gal/widgets/e-unicode.h>
#include "filter-folder.h"
diff --git a/filter/filter-input.c b/filter/filter-input.c
index da04195f62..f027daa568 100644
--- a/filter/filter-input.c
+++ b/filter/filter-input.c
@@ -22,15 +22,10 @@
#include <config.h>
#endif
-#include <string.h>
+#include <gtk/gtk.h>
+#include <gnome.h>
#include <regex.h>
-#include <gtk/gtkobject.h>
-#include <gtk/gtkwidget.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
#include <gal/widgets/e-unicode.h>
#include "filter-input.h"
diff --git a/filter/filter-message-search.c b/filter/filter-message-search.c
deleted file mode 100644
index 415bdb170c..0000000000
--- a/filter/filter-message-search.c
+++ /dev/null
@@ -1,806 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors: Jeffrey Stedfast <fejj@helixcode.com>
- *
- * Copyright 2000 Helix Code, Inc. (www.helixcode.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "filter-message-search.h"
-#include <gal/widgets/e-unicode.h>
-#include <e-util/e-sexp.h>
-#include <regex.h>
-#include <string.h>
-#include <ctype.h>
-
-typedef struct {
- CamelMimeMessage *message;
- CamelMessageInfo *info;
- const char *source;
- CamelException *ex;
-} FilterMessageSearch;
-
-/* ESExp callbacks */
-static ESExpResult *header_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_matches (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_starts_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_ends_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_exists (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_soundex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *header_full_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *match_all (struct _ESExp *f, int argc, struct _ESExpTerm **argv, FilterMessageSearch *fms);
-static ESExpResult *body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *body_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *user_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *user_tag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_sent_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_received_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_current_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-static ESExpResult *get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
-
-/* builtin functions */
-static struct {
- char *name;
- ESExpFunc *func;
- int type; /* set to 1 if a function can perform shortcut evaluation, or
- doesn't execute everything, 0 otherwise */
-} symbols[] = {
- { "match-all", (ESExpFunc *) match_all, 0 },
- { "body-contains", (ESExpFunc *) body_contains, 0 },
- { "body-regex", (ESExpFunc *) body_regex, 0 },
- { "header-contains", (ESExpFunc *) header_contains, 0 },
- { "header-matches", (ESExpFunc *) header_matches, 0 },
- { "header-starts-with", (ESExpFunc *) header_starts_with, 0 },
- { "header-ends-with", (ESExpFunc *) header_ends_with, 0 },
- { "header-exists", (ESExpFunc *) header_exists, 0 },
- { "header-soundex", (ESExpFunc *) header_soundex, 0 },
- { "header-regex", (ESExpFunc *) header_regex, 0 },
- { "header-full-regex", (ESExpFunc *) header_full_regex, 0 },
- { "user-tag", (ESExpFunc *) user_tag, 0 },
- { "user-flag", (ESExpFunc *) user_flag, 0 },
- { "system-flag", (ESExpFunc *) system_flag, 0 },
- { "get-sent-date", (ESExpFunc *) get_sent_date, 0 },
- { "get-received-date", (ESExpFunc *) get_received_date, 0 },
- { "get-current-date", (ESExpFunc *) get_current_date, 0 },
- { "get-score", (ESExpFunc *) get_score, 0 },
- { "get-source", (ESExpFunc *) get_source, 0 },
-};
-
-static ESExpResult *
-header_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
-
- if (argc == 2) {
- char *header = (argv[0])->value.string;
- char *match = (argv[1])->value.string;
- const char *contents;
-
- contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), header);
-
- if (contents) {
- if (e_utf8_strstrcase (contents, match))
- matched = TRUE;
- }
- }
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- return r;
-}
-
-static ESExpResult *
-header_matches (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
-
- if (argc == 2) {
- char *header = (argv[0])->value.string;
- char *match = (argv[1])->value.string;
- const char *contents;
-
- contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), header);
-
- if (contents) {
- /* danw says to use search-engine style matching...
- * This means that if the search match string is
- * lowercase then compare case-insensitive else
- * compare case-sensitive. */
- gboolean is_lowercase = TRUE;
- char *c;
-
- /* remove any leading white space... */
- for ( ; *contents && isspace (*contents); contents++);
-
- for (c = match; *c; c++) {
- if (isalpha (*c) && isupper (*c)) {
- is_lowercase = FALSE;
- break;
- }
- }
-
- if (is_lowercase) {
- if (!g_strcasecmp (contents, match))
- matched = TRUE;
- } else {
- if (!strcmp (contents, match))
- matched = TRUE;
- }
- }
- }
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- return r;
-}
-
-static ESExpResult *
-header_starts_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
-
- if (argc == 2) {
- char *header = (argv[0])->value.string;
- char *match = (argv[1])->value.string;
- const char *contents;
-
- contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), header);
-
- if (contents && strlen (contents) >= strlen (match)) {
- /* danw says to use search-engine style matching...
- * This means that if the search match string is
- * lowercase then compare case-insensitive else
- * compare case-sensitive. */
- gboolean is_lowercase = TRUE;
- char *c;
-
- /* remove any leading white space... */
- for ( ; *contents && isspace (*contents); contents++);
-
- for (c = match; *c; c++) {
- if (isalpha (*c) && isupper (*c)) {
- is_lowercase = FALSE;
- break;
- }
- }
-
- if (is_lowercase) {
- if (!g_strncasecmp (contents, match, strlen (match)))
- matched = TRUE;
- } else {
- if (!strncmp (contents, match, strlen (match)))
- matched = TRUE;
- }
- }
- }
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- return r;
-}
-
-static ESExpResult *
-header_ends_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
-
- if (argc == 2) {
- char *header = (argv[0])->value.string;
- char *match = (argv[1])->value.string;
- const char *contents;
-
- contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), header);
-
- if (contents && strlen (contents) >= strlen (match)) {
- /* danw says to use search-engine style matching...
- * This means that if the search match string is
- * lowercase then compare case-insensitive else
- * compare case-sensitive. */
- gboolean is_lowercase = TRUE;
- char *c, *end;
-
- /* remove any leading white space... */
- for ( ; *contents && isspace (*contents); contents++);
-
- for (c = match; *c; c++) {
- if (isalpha (*c) && isupper (*c)) {
- is_lowercase = FALSE;
- break;
- }
- }
-
- end = (char *) contents + strlen (contents) - strlen (match);
-
- if (is_lowercase) {
- if (!g_strcasecmp (end, match))
- matched = TRUE;
- } else {
- if (!strcmp (end, match))
- matched = TRUE;
- }
- }
- }
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- return r;
-}
-
-static ESExpResult *
-header_exists (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
-
- if (argc == 1) {
- char *header = (argv[0])->value.string;
- const char *contents;
-
- contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), header);
-
- if (contents)
- matched = TRUE;
- }
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- return r;
-}
-
-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 gint
-soundexcmp (const gchar *sound1, const gchar *sound2)
-{
- gchar code1[5], code2[5];
-
- soundexify (sound1, code1);
- soundexify (sound2, code2);
-
- return strcmp (code1, code2);
-}
-
-static ESExpResult *
-header_soundex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
-
- if (argc == 2) {
- char *header = (argv[0])->value.string;
- char *match = (argv[1])->value.string;
- const char *contents;
-
- contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), header);
-
- if (contents) {
- /* remove any leading white space... */
- for ( ; *contents && isspace (*contents); contents++);
-
- if (!soundexcmp (contents, match))
- matched = TRUE;
- }
- }
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- return r;
-}
-
-static ESExpResult *
-header_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
-
- if (argc == 2) {
- char *header = (argv[0])->value.string;
- char *match = (argv[1])->value.string;
- regex_t regexpat; /* regex patern */
- regmatch_t *fltmatch;
- gint regerr = 0;
- size_t reglen = 0;
- gchar *regmsg;
- const char *contents;
-
- contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), header);
-
- regerr = regcomp (&regexpat, match, REG_EXTENDED | REG_NEWLINE | REG_ICASE);
- if (regerr) {
- /* 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);
- camel_exception_setv (fms->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to perform regex search on message header: %s"),
- regmsg);
- g_free (regmsg);
- regfree (&regexpat);
- } else {
- if (contents) {
- fltmatch = g_new0 (regmatch_t, regexpat.re_nsub);
-
- if (!regexec (&regexpat, contents, regexpat.re_nsub, fltmatch, 0))
- matched = TRUE;
-
- g_free (fltmatch);
- regfree (&regexpat);
- }
- }
- }
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- return r;
-}
-
-static gchar *
-get_full_header (CamelMimeMessage *message)
-{
- CamelMimePart *mp = CAMEL_MIME_PART (message);
- GString *str = g_string_new ("");
- char *ret;
- struct _header_raw *h;
-
- for (h = mp->headers; h; h = h->next) {
- if (h->value != NULL)
- g_string_sprintfa (str, "%s%s%s\n", h->name,
- isspace (h->value[0]) ? ":" : ": ", h->value);
- }
-
- ret = str->str;
- g_string_free (str, FALSE);
-
- return ret;
-}
-
-static ESExpResult *
-header_full_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
-
- if (argc == 1) {
- char *match = (argv[0])->value.string;
- regex_t regexpat; /* regex patern */
- regmatch_t *fltmatch;
- gint regerr = 0;
- size_t reglen = 0;
- gchar *regmsg;
- char *contents;
-
- contents = get_full_header (fms->message);
-
- regerr = regcomp (&regexpat, match, REG_EXTENDED | REG_NEWLINE | REG_ICASE);
- if (regerr) {
- /* 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);
- camel_exception_setv (fms->ex, CAMEL_EXCEPTION_SYSTEM,
- _("Failed to perform regex search on message header: %s"),
- regmsg);
- g_free (regmsg);
- regfree (&regexpat);
- } else {
- if (contents) {
- fltmatch = g_new0 (regmatch_t, regexpat.re_nsub);
-
- if (!regexec (&regexpat, contents, regexpat.re_nsub, fltmatch, 0))
- matched = TRUE;
-
- g_free (fltmatch);
- regfree (&regexpat);
- }
- }
- g_free (contents);
- }
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- 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;
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- if (argv[0]->type == ESEXP_RES_BOOL)
- r->value.bool = argv[0]->value.bool;
- else
- r->value.bool = FALSE;
-
- return r;
-}
-
-static gboolean
-mime_part_matches (CamelMimePart *mime_part, const char *match, gboolean regex, CamelException *ex)
-{
- CamelStream *stream;
- GByteArray *array;
- char *text;
- regex_t regexpat; /* regex patern */
- regmatch_t *fltmatch;
- gint regerr = 0;
- size_t reglen = 0;
- gchar *regmsg;
- gboolean matched = FALSE;
-
- array = g_byte_array_new ();
- stream = camel_stream_mem_new_with_byte_array (array);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (mime_part), stream);
- camel_object_unref (CAMEL_OBJECT (stream));
-
- g_byte_array_append (array, "", 1);
-
- text = array->data;
-
- if (regex) {
- regerr = regcomp (&regexpat, match, REG_EXTENDED | REG_NEWLINE | REG_ICASE);
- if (regerr) {
- /* 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);
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- "Failed to perform regex search on message body: %s",
- regmsg);
- g_free (regmsg);
- regfree (&regexpat);
- } else {
- fltmatch = g_new0 (regmatch_t, regexpat.re_nsub);
-
- if (!regexec (&regexpat, text, regexpat.re_nsub, fltmatch, 0))
- matched = TRUE;
-
- g_free (fltmatch);
- regfree (&regexpat);
- }
- } else {
- if (strstr (text, match))
- matched = TRUE;
- }
-
- g_byte_array_free (array, TRUE);
-
- return matched;
-}
-
-static gboolean
-handle_multipart (CamelMultipart *multipart, const char *match, gboolean regex, CamelException *ex)
-{
- gboolean matched = FALSE;
- int i, nparts;
-
- nparts = camel_multipart_get_number (multipart);
-
- for (i = 0; i < nparts && !matched; i++) {
- CamelContentType *content;
- CamelMimePart *mime_part;
-
- mime_part = camel_multipart_get_part (multipart, i);
- content = camel_mime_part_get_content_type (mime_part);
-
- if (header_content_type_is (content, "text", "*")) {
- /* we only want to match text parts */
- matched = mime_part_matches (mime_part, match, regex, ex);
-
- if (camel_exception_is_set (ex))
- break;
- } else if (header_content_type_is (content, "multipart", "*")) {
- CamelDataWrapper *wrapper;
- CamelMultipart *mpart;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
- mpart = CAMEL_MULTIPART (wrapper);
-
- matched = handle_multipart (mpart, match, regex, ex);
-
- if (camel_exception_is_set (ex))
- break;
- }
- }
-
- return matched;
-}
-
-static ESExpResult *
-body_contains (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
-
- if (argc > 0) {
- CamelContentType *content;
- char *match;
-
- match = (*argv)->value.string;
-
- content = camel_mime_part_get_content_type (CAMEL_MIME_PART (fms->message));
-
- if (header_content_type_is (content, "multipart", "*")) {
- CamelDataWrapper *wrapper;
- CamelMultipart *multipart;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (CAMEL_MIME_PART (fms->message)));
- multipart = CAMEL_MULTIPART (wrapper);
-
- matched = handle_multipart (multipart, match, FALSE, fms->ex);
- } else {
- /* single-part message so just search the entire message */
- matched = mime_part_matches (CAMEL_MIME_PART (fms->message), match, FALSE, fms->ex);
- }
- }
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- return r;
-}
-
-static ESExpResult *
-body_regex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- gboolean matched = FALSE;
- ESExpResult *r;
-
- if (argc > 0) {
- CamelContentType *content;
- char *match;
-
- match = (*argv)->value.string;
-
- content = camel_mime_part_get_content_type (CAMEL_MIME_PART (fms->message));
-
- if (header_content_type_is (content, "multipart", "*")) {
- CamelDataWrapper *wrapper;
- CamelMultipart *multipart;
-
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (CAMEL_MIME_PART (fms->message)));
- multipart = CAMEL_MULTIPART (wrapper);
-
- matched = handle_multipart (multipart, match, TRUE, fms->ex);
- } else {
- /* single-part message so just search the entire message */
- matched = mime_part_matches (CAMEL_MIME_PART (fms->message), match, TRUE, fms->ex);
- }
- }
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- r->value.bool = matched;
-
- 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 (ESEXP_RES_BOOL);
- r->value.bool = truth;
-
- return r;
-}
-
-static ESExpResult *
-system_flag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
- gboolean truth = FALSE;
-
- if (argc == 1)
- truth = camel_system_flag_get (fms->info->flags, argv[0]->value.string);
-
- r = e_sexp_result_new (ESEXP_RES_BOOL);
- r->value.bool = truth;
-
- return r;
-}
-
-static ESExpResult *
-user_tag (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
- const char *tag;
-
- tag = camel_tag_get (&fms->info->user_tags, argv[0]->value.string);
-
- r = e_sexp_result_new (ESEXP_RES_STRING);
- r->value.string = g_strdup (tag ? tag : "");
-
- return r;
-}
-
-static ESExpResult *
-get_sent_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
-
- r = e_sexp_result_new(ESEXP_RES_INT);
- r->value.number = camel_mime_message_get_date(fms->message, NULL);
-
- return r;
-}
-
-static ESExpResult *
-get_received_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
-
- r = e_sexp_result_new(ESEXP_RES_INT);
- r->value.number = camel_mime_message_get_date_received(fms->message, NULL);
-
- return r;
-}
-
-static ESExpResult *
-get_current_date (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
-
- r = e_sexp_result_new (ESEXP_RES_INT);
- r->value.number = time (NULL);
-
- return r;
-}
-
-static ESExpResult *
-get_score (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
- const char *tag;
-
- tag = camel_tag_get (&fms->info->user_tags, "score");
-
- r = e_sexp_result_new (ESEXP_RES_INT);
- if (tag)
- r->value.number = atoi (tag);
- else
- r->value.number = 0;
-
- return r;
-}
-
-static ESExpResult *
-get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
-{
- ESExpResult *r;
-
- r = e_sexp_result_new (ESEXP_RES_STRING);
- r->value.string = g_strdup (fms->source);
-
- return r;
-}
-
-gboolean
-filter_message_search (CamelMimeMessage *message, CamelMessageInfo *info,
- const char *source, const char *expression, CamelException *ex)
-{
- FilterMessageSearch *fms;
- ESExp *sexp;
- ESExpResult *result;
- gboolean retval;
- int i;
-
- fms = g_new (FilterMessageSearch, 1);
- fms->message = message;
- fms->info = info;
- fms->source = source;
- fms->ex = ex;
-
- sexp = e_sexp_new ();
-
- for (i = 0; i < sizeof (symbols) / sizeof (symbols[0]); i++) {
- if (symbols[i].type == 1) {
- e_sexp_add_ifunction (sexp, 0, symbols[i].name,
- (ESExpIFunc *)symbols[i].func, fms);
- } else {
- e_sexp_add_function (sexp, 0, symbols[i].name,
- symbols[i].func, fms);
- }
- }
-
- e_sexp_input_text (sexp, expression, strlen (expression));
- e_sexp_parse (sexp);
- result = e_sexp_eval (sexp);
-
- g_free (fms);
-
- if (result->type == ESEXP_RES_BOOL)
- retval = result->value.bool;
- else
- retval = FALSE;
-
- e_sexp_unref(sexp);
- e_sexp_result_free (result);
-
- return retval;
-}
diff --git a/filter/filter-option.c b/filter/filter-option.c
index a5e0b5671d..9005aa89f8 100644
--- a/filter/filter-option.c
+++ b/filter/filter-option.c
@@ -19,18 +19,12 @@
*/
#include <config.h>
-
-#include <string.h>
-#include <glib.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <gal/widgets/e-unicode.h>
+#include <gnome.h>
#include "filter-option.h"
#include "filter-part.h"
#include "e-util/e-sexp.h"
+#include <gal/widgets/e-unicode.h>
#define d(x)
diff --git a/filter/filter-part.c b/filter/filter-part.c
index 59e6c7da73..12c7a90f0f 100644
--- a/filter/filter-part.c
+++ b/filter/filter-part.c
@@ -19,21 +19,13 @@
*/
#include <config.h>
+#include <gnome.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <glib.h>
-#include <gtk/gtkbox.h>
-#include <gtk/gtkhbox.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
#include <gal/widgets/e-unicode.h>
#include "filter-part.h"
#include "filter-element.h"
-
#define d(x)
static void filter_part_class_init (FilterPartClass *class);
@@ -101,21 +93,8 @@ static void
filter_part_finalise(GtkObject *obj)
{
FilterPart *o = (FilterPart *)obj;
- GList *l;
-
+
o = o;
-
- l = o->elements;
- while (l) {
- gtk_object_unref((GtkObject *)l->data);
- l = g_list_next(l);
- }
-
- g_list_free(o->elements);
- g_free(o->name);
- g_free(o->title);
- g_free(o->code);
-
((GtkObjectClass *)(parent_class))->finalize(obj);
}
@@ -156,13 +135,10 @@ int
filter_part_xml_create (FilterPart *ff, xmlNodePtr node)
{
xmlNodePtr n;
- char *type, *str, *decstr;
+ char *type;
FilterElement *el;
- str = xmlGetProp(node, "name");
- ff->name = g_strdup(str);
- if (str)
- xmlFree(str);
+ ff->name = xmlGetProp(node, "name");
n = node->childs;
while (n) {
if (!strcmp (n->name, "input")) {
@@ -171,25 +147,27 @@ filter_part_xml_create (FilterPart *ff, xmlNodePtr node)
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));
+ xmlFree (type);
+ d(printf ("adding element part %p %s\n", 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")) {
+ } else if (!strcmp (n->name, "title")) {
if (!ff->title) {
+ gchar *str, *decstr;
str = xmlNodeGetContent (n);
- ff->title = e_utf8_xml1_decode (str);
- if (str)
- xmlFree (str);
+ decstr = e_utf8_xml1_decode (str);
+ if (str) xmlFree (str);
+ ff->title = decstr;
}
} else if (!strcmp (n->name, "code")) {
if (!ff->code) {
+ gchar *str, *decstr;
str = xmlNodeGetContent (n);
- ff->code = e_utf8_xml1_decode (str);
- if (str)
- xmlFree (str);
+ decstr = e_utf8_xml1_decode (str);
+ if (str) xmlFree (str);
+ ff->code = decstr;
}
} else {
g_warning ("Unknwon part element in xml: %s\n", n->name);
@@ -259,9 +237,9 @@ filter_part_clone (FilterPart *fp)
FilterElement *fe, *ne;
new = (FilterPart *)gtk_type_new ((GTK_OBJECT (fp))->klass->type);
- new->name = g_strdup(fp->name);
- new->title = g_strdup(fp->title);
- new->code = g_strdup(fp->code);
+ 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;
@@ -445,7 +423,7 @@ filter_part_expand_code (FilterPart *ff, const char *source, GString *out)
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));
+ d(printf("expand code: looking up variab le '%s' = %p\n", name, fe));
if (fe) {
g_string_sprintfa (out, "%.*s", newstart-start, start);
filter_element_format_sexp (fe, out);
diff --git a/filter/filter-rule.c b/filter/filter-rule.c
index bd55a26b26..b4cd135e4a 100644
--- a/filter/filter-rule.c
+++ b/filter/filter-rule.c
@@ -20,17 +20,8 @@
*/
#include <config.h>
-#include <string.h>
-#include <glib.h>
-#include <gtk/gtkframe.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkmenuitem.h>
-#include <gtk/gtkoptionmenu.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <gtk/gtktable.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-stock.h>
+#include <gnome.h>
+
#include <gal/widgets/e-unicode.h>
#include "filter-rule.h"
@@ -387,9 +378,7 @@ filter_rule_build_code (FilterRule *fr, GString *out)
g_assert(IS_FILTER_RULE(fr));
g_assert(out != NULL);
- ((FilterRuleClass *) ((GtkObject *) fr)->klass)->build_code(fr, out);
-
- g_message ("build_code: [%s](%d)", out->str, out->len);
+ return ((FilterRuleClass *) ((GtkObject *) fr)->klass)->build_code(fr, out);
}
static void
@@ -451,8 +440,6 @@ option_activate (GtkMenuItem *item, struct _part_data *data)
data->partwidget = filter_part_get_widget (newpart);
if (data->partwidget)
gtk_box_pack_start (GTK_BOX (data->container), data->partwidget, FALSE, FALSE, 0);
-
- gtk_object_set_data (GTK_OBJECT (data->container), "part", newpart);
}
static GtkWidget *
@@ -518,48 +505,35 @@ struct _rule_data {
static void
less_parts (GtkWidget *button, struct _rule_data *data)
{
+ GList *l;
FilterPart *part;
- GtkWidget *rule;
+ GtkWidget *w;
- if (g_list_length (data->fr->parts) < 2)
+ l = data->fr->parts;
+ if (g_list_length (l) < 2)
return;
- rule = gtk_object_get_data (GTK_OBJECT (button), "rule");
- part = gtk_object_get_data (GTK_OBJECT (rule), "part");
-
- /* remove the part from the list */
+ /* remove the last one from the list */
+ l = g_list_last (l);
+ part = l->data;
filter_rule_remove_part (data->fr, part);
gtk_object_unref (GTK_OBJECT (part));
/* and from the display */
- gtk_container_remove (GTK_CONTAINER (data->parts), rule);
- gtk_container_remove (GTK_CONTAINER (data->parts), button);
-}
-
-static void
-attach_rule (GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row)
-{
- GtkWidget *remove;
- GtkWidget *pixmap;
-
- gtk_table_attach (GTK_TABLE (data->parts), rule, 0, 1, row, row + 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ l = g_list_last (GTK_BOX (data->parts)->children);
+ w = ((GtkBoxChild *) l->data)->widget;
+ gtk_container_remove (GTK_CONTAINER (data->parts), w);
- pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_REMOVE);
- remove = gnome_pixmap_button (pixmap, _("Remove"));
- gtk_object_set_data (GTK_OBJECT (remove), "rule", rule);
- gtk_object_set_data (GTK_OBJECT (rule), "part", part);
- /*gtk_button_set_relief (GTK_BUTTON (remove), GTK_RELIEF_NONE);*/
- gtk_signal_connect (GTK_OBJECT (remove), "clicked", less_parts, data);
- gtk_table_attach (GTK_TABLE (data->parts), remove, 1, 2, row, row + 1,
- 0, 0, 0, 0);
- gtk_widget_show (remove);
+ /* if there's only 1 criterion, we can't remove anymore so set insensitive */
+ if (g_list_length (data->fr->parts) <= 1)
+ gtk_widget_set_sensitive (button, FALSE);
}
static void
more_parts (GtkWidget *button, struct _rule_data *data)
{
FilterPart *new;
+ GtkWidget *w;
/* first make sure that the last part is ok */
if (data->fr->parts) {
@@ -575,16 +549,16 @@ more_parts (GtkWidget *button, struct _rule_data *data)
/* 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);
+ gtk_box_pack_start (GTK_BOX (data->parts), w, FALSE, FALSE, 0);
+ }
+
+ /* set the "Remove criterion" button sensitive */
+ if (g_list_length (data->fr->parts) > 1) {
+ w = gtk_object_get_data (GTK_OBJECT (button), "remove");
+ gtk_widget_set_sensitive (w, TRUE);
}
}
@@ -606,7 +580,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
{
GtkWidget *vbox, *parts, *inframe;
GtkWidget *hbox;
- GtkWidget *add, *pixmap;
+ GtkWidget *add, *remove, *pixmap;
GtkWidget *w;
GtkWidget *menu, *item, *omenu;
GtkWidget *frame;
@@ -617,7 +591,6 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
GList *l;
FilterPart *part;
struct _rule_data *data;
- gint rows, i = 0;
/* this stuff should probably be a table, but the
rule parts need to be a vbox */
@@ -647,9 +620,8 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
inframe = gtk_vbox_new (FALSE, 3);
gtk_container_add (GTK_CONTAINER (frame), inframe);
- /* this is the parts table, it should probably be inside a scrolling list */
- rows = g_list_length (fr->parts);
- parts = gtk_table_new (rows, 2, FALSE);
+ /* this is the parts list, it should probably be inside a scrolling list */
+ parts = gtk_vbox_new (FALSE, 3);
/* data for the parts part of the display */
data = g_malloc0 (sizeof (*data));
@@ -686,6 +658,17 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
gtk_signal_connect (GTK_OBJECT (add), "clicked", more_parts, data);
gtk_box_pack_start (GTK_BOX (hbox), add, FALSE, FALSE, 3);
+ pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_REMOVE);
+ remove = gnome_pixmap_button (pixmap, _("Remove criterion"));
+ gtk_object_set_data (GTK_OBJECT (add), "remove", remove);
+ gtk_button_set_relief (GTK_BUTTON (remove), GTK_RELIEF_NONE);
+ gtk_signal_connect (GTK_OBJECT (remove), "clicked", less_parts, data);
+ gtk_box_pack_start (GTK_BOX (hbox), remove, FALSE, FALSE, 3);
+
+ /* if we only have 1 criterion, then we can't remove any more so disable this */
+ if (g_list_length (fr->parts) <= 1)
+ gtk_widget_set_sensitive (remove, FALSE);
+
gtk_box_pack_end (GTK_BOX (hbox), omenu, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
@@ -694,9 +677,8 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
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++);
+ gtk_box_pack_start (GTK_BOX (parts), w, FALSE, FALSE, 3);
l = g_list_next (l);
}
diff --git a/filter/filter-score.c b/filter/filter-score.c
index d60a006afa..ff738c7ac0 100644
--- a/filter/filter-score.c
+++ b/filter/filter-score.c
@@ -24,9 +24,8 @@
#include <config.h>
#endif
-#include <stdlib.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkspinbutton.h>
+#include <gtk/gtk.h>
+#include <gnome.h>
#include "e-util/e-sexp.h"
#include "filter-score.h"
diff --git a/filter/libfilter-i18n.h b/filter/libfilter-i18n.h
index 7fdeff6abe..e561ee8071 100644
--- a/filter/libfilter-i18n.h
+++ b/filter/libfilter-i18n.h
@@ -1,40 +1,24 @@
/* Automatically generated. Do not edit. */
-char *s = N_("after");
char *s = N_("Assign Colour");
char *s = N_("Assign Score");
char *s = N_("Attachments");
-char *s = N_("before");
-char *s = N_("contains");
char *s = N_("Copy to Folder");
char *s = N_("Date received");
char *s = N_("Date sent");
char *s = N_("Delete");
char *s = N_("Deleted");
-char *s = N_("does not contain");
-char *s = N_("does not end with");
-char *s = N_("does not exist");
-char *s = N_("does not sound like");
-char *s = N_("does not start with");
char *s = N_("Do Not Exist");
char *s = N_("Draft");
-char *s = N_("ends with");
char *s = N_("Exist");
-char *s = N_("exists");
char *s = N_("Expression");
char *s = N_("Forward to Address");
char *s = N_("Important");
-char *s = N_("is");
-char *s = N_("is greater than");
-char *s = N_("is less than");
-char *s = N_("is not");
char *s = N_("Mailing list");
char *s = N_("Message Body");
char *s = N_("Message Header");
char *s = N_("Message was received");
char *s = N_("Message was sent");
char *s = N_("Move to Folder");
-char *s = N_("on or after");
-char *s = N_("on or before");
char *s = N_("Read");
char *s = N_("Recipients");
char *s = N_("Regex Match");
@@ -42,12 +26,27 @@ char *s = N_("Replied to");
char *s = N_("Score");
char *s = N_("Sender");
char *s = N_("Set Status");
-char *s = N_("sounds like");
-char *s = N_("Source Account");
char *s = N_("Specific header");
-char *s = N_("starts with");
char *s = N_("Status");
char *s = N_("Stop Processing");
char *s = N_("Subject");
+char *s = N_("after");
+char *s = N_("before");
+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 sound like");
+char *s = N_("does not start with");
+char *s = N_("ends with");
+char *s = N_("exists");
+char *s = N_("is greater than");
+char *s = N_("is less than");
+char *s = N_("is not");
+char *s = N_("is");
+char *s = N_("on or after");
+char *s = N_("on or before");
+char *s = N_("sounds like");
+char *s = N_("starts with");
char *s = N_("was after");
char *s = N_("was before");
diff --git a/filter/rule-context.c b/filter/rule-context.c
index 3f121de572..54412d2eb9 100644
--- a/filter/rule-context.c
+++ b/filter/rule-context.c
@@ -23,10 +23,8 @@
#endif
#include <errno.h>
-#include <string.h>
-#include <gtk/gtksignal.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
+#include <gtk/gtk.h>
+#include <gnome.h>
#include "rule-context.h"
diff --git a/filter/score-rule.c b/filter/score-rule.c
index c8b9376d44..979ed68900 100644
--- a/filter/score-rule.c
+++ b/filter/score-rule.c
@@ -20,18 +20,7 @@
*/
#include <config.h>
-
-#include <string.h>
-
-#include <glib.h>
-#include <gtk/gtkbox.h>
-#include <gtk/gtkframe.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkspinbutton.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-i18n.h>
+#include <gnome.h>
#include "score-rule.h"
diff --git a/help/ChangeLog b/help/ChangeLog
index 1b5327ee46..aa34407936 100644
--- a/help/ChangeLog
+++ b/help/ChangeLog
@@ -1,7 +1,7 @@
-2001-04-23 Jon Trowbridge <trow@ximian.com>
+2001-04-24 Ettore Perazzoli <ettore@ximian.com>
- * C/Makefile.am (install-data-local): Changed dependency for
- install-data-local from "evolution" to "evolution-guide".
+ * C/Makefile.am (install-data-local): Depend on `evolution-guide',
+ not `evolution'.
2001-04-23 Ettore Perazzoli <ettore@ximian.com>
@@ -15,11 +15,6 @@
(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
@@ -292,10 +287,12 @@
* C/preface.sgml: Spelling fixes, etc.
+=======
2000-09-19 Federico Mena Quintero <federico@helixcode.com>
* C/Makefile.am: Fixed to install the stylesheet-images as well.
+>>>>>>> 1.26
2000-09-07 Aaron Weber <aaron@helixcode.com>
* C/fig/ New files: contact-editor.png, mail-composer.png,
diff --git a/help/devel/ChangeLog b/help/devel/ChangeLog
index 6e1455b514..648b851d77 100644
--- a/help/devel/ChangeLog
+++ b/help/devel/ChangeLog
@@ -1,8 +1,3 @@
-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
@@ -19,12 +14,6 @@
* 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
diff --git a/libical/ChangeLog b/libical/ChangeLog
index 7d74fce7cd..82cd7156e9 100644
--- a/libical/ChangeLog
+++ b/libical/ChangeLog
@@ -1,160 +1,37 @@
-2001-04-18 Ettore Perazzoli <ettore@ximian.com>
+2001-04-26 Ettore Perazzoli <ettore@ximian.com>
- * src/Makefile.am (SUBDIRS): Don't compile the Python stuff nor
- the tests for now; they are broken.
+ * src/libical/Makefile.am (GENERATEDHEADERS): New variable, define
+ to have all the generated files but `ical.h'.
+ (BUILT_SOURCES): Define as `ical.h' plus `$(GENERATEDHEADERS)'.
+ (dist-hook): New target. Just remove the `$(BUILT_SOURCES)' in
+ the `$(distdir)'.
-2001-04-18 Ettore Perazzoli <ettore@ximian.com>
+2001-02-27 Ettore Perazzoli <ettore@ximian.com>
- * src/libicalss/Makefile.am (COMBINEDHEADERS): All of these have
- to come from the srcdir: prepend `$(srcdir)'.
-
-2001-04-18 Ettore Perazzoli <ettore@ximian.com>
-
- * src/libical/Makefile.am (COMBINEDHEADERS): Shouldn't prepend
- `$(top_builddir)/src/libical' to `icalderivedvalue.h',
- `icalderivedparameter.h', `icalderivedproperty.h' here, that
- confuses the dependencies for make.
-
- * src/libical/Makefile.am (ical.h): Depend on
- `$(COMBINEDHEADERS)', not `$(BUILT_SOURCES)'.
-
-2001-04-01 Eric Busboom <eric@softwarestudio.org>
-
- * icalcomponent.h Changed meaning of
- icalcomponent_new_from_string. It used to create a new component
- given the text name of the component type to create. Now it calls
- icalparser_parse_string to create a new component from the
- complete iCalendar text representation of the component.
-
-2001-03-31 Eric Busboom <eric@softwarestudio.org>
-
- * icalvalue Changed ACTION properties to take an ACTION value
- instead of TEXT. The ACTION value is enumerated.
-
-2001-03-26 Eric Busboom <eric@softwarestudio.org>
-
- * icalparameter.h icalparameter_rsvp_* routines now take, return
- ICAL_RSVP_TRUE and ICAL_RSVP_FALSE, not 0 and 1
-
-2001-03-25 Eric Busboom <eric@softwarestudio.org>
-
- * icalrecur.c Many changes to get YEARLY rules working and fix
- other errors. Recurrences are stil broken, but more types of rue
- now work.
-
-2001-03-16 Eric Busboom <eric@softwarestudio.org>
-
- * icalparameter.c Changed icalparameter_new_from_string() to
- icalparameter_new_from_value_string(). Created new
- icalparameter_new_from_string() that takes strings of
- form"PARAMNAME=PARAMVALUE"
-
- * *_XNAME changes all _XNAME enumerations to _X
-
- * derived props, values, parameters. Seperated out derived
- proeprties, parameters and values into their own files. This makes
- it easier to auto generate all of the enumerations for values,
- parameters and proeprties.
-
- * icalenum.h Major changes to icalenum. Movel all of the
- icalenum_* values to other modules, and changed the names. Look
- for #defines in icalenum.h tying the old name to the new
- name. Also moved all of the enumerations into other files.
-
-
-
-2001-02-26 Eric Busboom <eric@softwarestudio.org>
-
- * src/libical/icalproperty.c Added
- icalproperty_set_parameter_from_string and
- icalproperty_set_value_from_string to aid in binding to Python
-
-2001-02-15 Eric Busboom <eric@softwarestudio.org>
-
- * design-data/prop-to-value.txt Made a new CSV file,
- properties.cvs That collects property-to-value and default value
- information
-
- * src/libical/icalproperty.{c,h}.in Moved auto generated code into
- icalderivedproperty.{c,h} and created icalderivedproperty.{c,h}.in
-
-
-
-2001-02-14 JP Rosevear <jpr@ximian.com>
-
- * src/libical/Makefile.am: Sigh, automake is dumber than i thought
-
-2001-02-12 JP Rosevear <jpr@ximian.com>
-
- * src/test/Makefile.am: link with the static versions
-
- * src/python/Makefile.am: use include dir discovered in configure checks
-
- * src/python/.cvsignore: shush
-
- * src/libical/icalrestriction.c: remove autogenerated file
-
- * src/libical/Makefile.am: the generated files are now disted so
- look for them in the source dir rather than the build dir
-
- * src/Makefile.am: Only build the python dir if all the configure
- stuff checked out
-
- * configure.in: Remove shared library disabling and add a python
- check and allow for the python bindings to not be built
-
-2001-02-11 Eric Busboom <eric@softwarestudio.org>
-
- * src/python/Makefile.am Tweaked makefile to use automake more,
- but it stil isn't quie right.
+ * src/libical/Makefile.am (ical.h): Depend on `$(BUILT_SOURCES)',
+ not `$(COMBINEDHEADERS)'.
2001-02-09 JP Rosevear <jpr@ximian.com>
- * Shush cvs
-
-2001-02-09 JP Rosevear <jpr@ximian.com>
+ * src/libical/Makefile.am: The built sources shouldn't be cleaned
- * src/libical/Makefile.am: Slightly over zealous during the merge
-
-2001-02-09 JP Rosevear <jpr@ximian.com>
-
- * src/libical/Makefile.am: Correct typo
-
- * Removal of more auto generated files
-
-2001-02-09 JP Rosevear <jpr@ximian.com>
-
- * Removal of various auto generated files
-
2001-02-09 JP Rosevear <jpr@ximian.com>
* src/libical/icalparameter.c.in (icalparameter_new_from_string):
its NEEDS-ACTION rather than NEEDSACTION
(icalparameter_as_ical_string): ditto
-2001-02-09 Eric Busboom <eric@softwarestudio.org>
-
- * python Added src/python directory. Inserted SWIG wrapper files,
- and a simple interface to Component, Time, Duration, Period and
- Store.
-
- * icallangbind.c More experimental work
-
- * icalduration.{c,h}, icalperiod.{c,h} Broke out period and
- duration types into their own files
-
2001-02-06 Christopher James Lahey <clahey@ximian.com>
* src/libical/icallangbind.c: Added a missing #include here.
* src/libical/icalrecur.c (icalrecur_add_bydayrules): Copy the
passed in const vals since we change it.
-
-2001-02-06 Eric Busboom <eric@softwarestudio.org>
- * icaltime.c Changed icaltime_from_day_of_year to run mktime in
- the UTC timezone. This fixed a bug where it would return one day
- eariler for some timezones.
+2001-02-05 JP Rosevear <jpr@ximian.com>
+
+ * src/libical/icallangbind.c (icallangbind_get_property): Use the
+ renamed api call
2001-02-05 Ettore Perazzoli <ettore@ximian.com>
@@ -162,7 +39,7 @@
`icalparameter.h', `icalproperty.h' and `icalrestriction.h' are
created in the builddir so they shouldn't be prefixed with
`$(top_builddir)/src/libical'.
-
+
2001-01-26 Eric Busboom <eric@softwarestudio.org>
* icalproperty.c.in Improved icalproperty_as_ical_string() to
@@ -174,21 +51,30 @@
for combined value type -- non standard values that can have more
than on standard value type. These non-standard types now delegate
to stadard types.
+
2001-01-24 Dan Winship <danw@helixcode.com>
* src/libical/icaltime.c: Remove unused "extern long timezone".
-2001-01-24 Eric Busboom <eric@softwarestudio.org>
+2001-01-24 Damon Chaplin <damon@helixcode.com>
- * icalfileset.c fixed icalfileset_read-from_file so it will handle
- lines longer than 80 char properly.
+ * src/libical/icaltime.c (set_tz):
+ (unset_tz): rewrote to fix problems with freeing the environment
+ string after calling putenv() and to fix memory leaks. (We save a
+ pointer to the last TZ env var we set, so we free it after the next
+ time we set TZ.)
2001-01-23 JP Rosevear <jpr@ximian.com>
* configure.in: Don't AC_INIT on an autogenerated file that does not
exist beforehand
-
+
+2001-01-24 Eric Busboom <eric@softwarestudio.org>
+
+ * icalfileset.c fixed icalfileset_read-from_file so it will handle
+ lines longer than 80 char properly.
+
2001-01-23 Eric Busboom <eric@softwarestudio.org>
* icltime.c Removed all of the _local_ routines and simplified
diff --git a/libical/src/Makefile.am b/libical/src/Makefile.am
index d6ba22c548..bff5609c92 100644
--- a/libical/src/Makefile.am
+++ b/libical/src/Makefile.am
@@ -1,7 +1,4 @@
-if WITH_PYTHON
-PYTHON_DIR = python
-else
-PYTHON_DIR =
-endif
+SUBDIRS = libical libicalvcal
-SUBDIRS = libical libicalss libicalvcal # $(PYTHON_DIR) test
+# disabled libicalss and test until they build
+#SUBDIRS = libical libicalss libicalvcal test
diff --git a/libical/src/libical/Makefile.am b/libical/src/libical/Makefile.am
index 9c123b6bd9..d972616e2a 100644
--- a/libical/src/libical/Makefile.am
+++ b/libical/src/libical/Makefile.am
@@ -1,28 +1,3 @@
-#======================================================================
-# FILE: Makefile.am
-# CREATOR: eric
-#
-# $Id: Makefile.am,v 1.28 2001/04/18 15:00:51 ettore Exp $
-#
-#
-# (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of either:
-#
-# The LGPL as published by the Free Software Foundation, version
-# 2.1, available at: http://www.fsf.org/copyleft/lesser.html
-#
-# Or:
-#
-# The Mozilla Public License Version 1.0. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# The original code is icalcomponent.c
-#
-#======================================================================
-
-
DESIGNDATA = $(top_srcdir)/design-data
ICALSCRIPTS = $(top_srcdir)/scripts
@@ -45,8 +20,6 @@ INCLUDES = \
libical_la_LDFLAGS = -version-info 0:0:0
libical_la_SOURCES = \
- icalattendee.h \
- icalattendee.c \
icalcomponent.c \
icalcomponent.h \
icalenums.c \
@@ -60,13 +33,8 @@ libical_la_SOURCES = \
icalmime.h \
icalparameter.c \
icalparameter.h \
- icalparameterimpl.h \
- icalderivedparameter.c \
- icalderivedparameter.h \
icalparser.c \
icalparser.h \
- icalderivedproperty.c \
- icalderivedproperty.h \
icalproperty.c \
icalproperty.h \
icalrecur.c \
@@ -75,17 +43,10 @@ libical_la_SOURCES = \
icalrestriction.h \
icaltime.c \
icaltime.h \
- icalduration.h \
- icalduration.c \
- icalperiod.h \
- icalperiod.c \
icaltypes.c \
icaltypes.h \
icalvalue.c \
icalvalue.h \
- icalvalueimpl.h \
- icalderivedvalue.c \
- icalderivedvalue.h \
icalyacc.h \
icalyacc.y \
pvl.c \
@@ -105,39 +66,36 @@ libicalinclude_HEADERS = ical.h
COMBINEDHEADERS = \
$(top_builddir)/src/libical/icalversion.h \
$(top_srcdir)/src/libical/icaltime.h \
- $(top_srcdir)/src/libical/icalduration.h \
- $(top_srcdir)/src/libical/icalperiod.h \
$(top_srcdir)/src/libical/icalenums.h \
$(top_srcdir)/src/libical/icaltypes.h \
$(top_srcdir)/src/libical/icalrecur.h \
- icalderivedvalue.h \
- icalderivedparameter.h \
- $(top_srcdir)/src/libical/icalvalue.h \
- $(top_srcdir)/src/libical/icalparameter.h \
- icalderivedproperty.h \
- $(top_srcdir)/src/libical/icalproperty.h \
- $(top_srcdir)/src/libical/icalattendee.h \
+ icalvalue.h \
+ icalparameter.h \
+ icalproperty.h \
$(top_srcdir)/src/libical/pvl.h \
$(top_srcdir)/src/libical/icalcomponent.h \
$(top_srcdir)/src/libical/icalparser.h \
$(top_srcdir)/src/libical/icalmemory.h \
$(top_srcdir)/src/libical/icalerror.h \
- $(top_srcdir)/src/libical/icalrestriction.h \
+ icalrestriction.h \
$(top_srcdir)/src/libical/sspm.h \
$(top_srcdir)/src/libical/icalmime.h \
- $(top_srcdir)/src/libical/icallangbind.h
+ $(top_srcdir)/src/libical/icallangbind.h
+
+GENERATEDHEADERS = \
+ icalparameter.c \
+ icalparameter.h \
+ icalproperty.c \
+ icalproperty.h \
+ icalrestriction.c \
+ icalvalue.c \
+ icalvalue.h
</