aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--a11y/addressbook/ea-addressbook-view.c4
-rw-r--r--a11y/addressbook/ea-addressbook-view.h2
-rw-r--r--a11y/addressbook/ea-minicard-view.c46
-rw-r--r--a11y/addressbook/ea-minicard-view.h2
-rw-r--r--a11y/addressbook/ea-minicard.c20
-rw-r--r--a11y/addressbook/ea-minicard.h4
-rw-r--r--a11y/calendar/ea-cal-view-event.c20
-rw-r--r--a11y/calendar/ea-cal-view.c4
-rw-r--r--a11y/calendar/ea-calendar-helpers.c4
-rw-r--r--a11y/calendar/ea-calendar.c4
-rw-r--r--a11y/calendar/ea-day-view-cell.c8
-rw-r--r--a11y/calendar/ea-day-view-main-item.c62
-rw-r--r--a11y/calendar/ea-day-view.c14
-rw-r--r--a11y/calendar/ea-gnome-calendar.c2
-rw-r--r--a11y/calendar/ea-jump-button.c6
-rw-r--r--a11y/calendar/ea-week-view-cell.c16
-rw-r--r--a11y/calendar/ea-week-view-main-item.c72
-rw-r--r--a11y/calendar/ea-week-view.c4
-rw-r--r--a11y/e-table/gal-a11y-e-cell-popup.c14
-rw-r--r--a11y/e-table/gal-a11y-e-cell-registry.c8
-rw-r--r--a11y/e-table/gal-a11y-e-cell-text.c28
-rw-r--r--a11y/e-table/gal-a11y-e-cell-toggle.c10
-rw-r--r--a11y/e-table/gal-a11y-e-cell-tree.c8
-rw-r--r--a11y/e-table/gal-a11y-e-cell-vbox.c12
-rw-r--r--a11y/e-table/gal-a11y-e-cell-vbox.h6
-rw-r--r--a11y/e-table/gal-a11y-e-cell.c46
-rw-r--r--a11y/e-table/gal-a11y-e-cell.h6
-rw-r--r--a11y/e-table/gal-a11y-e-table-click-to-add-factory.c6
-rw-r--r--a11y/e-table/gal-a11y-e-table-click-to-add.c18
-rw-r--r--a11y/e-table/gal-a11y-e-table-column-header.c6
-rw-r--r--a11y/e-table/gal-a11y-e-table-factory.c8
-rw-r--r--a11y/e-table/gal-a11y-e-table-item-factory.c8
-rw-r--r--a11y/e-table/gal-a11y-e-table-item.c62
-rw-r--r--a11y/e-table/gal-a11y-e-table.c14
-rw-r--r--a11y/e-table/gal-a11y-e-tree-factory.c6
-rw-r--r--a11y/e-table/gal-a11y-e-tree.c6
-rw-r--r--a11y/e-text/gal-a11y-e-text-factory.c8
-rw-r--r--a11y/e-text/gal-a11y-e-text.c20
-rw-r--r--a11y/ea-factory.h2
-rw-r--r--a11y/gal-a11y-factory.h2
-rw-r--r--a11y/gal-a11y-util.c2
-rw-r--r--a11y/widgets/ea-calendar-cell.c12
-rw-r--r--a11y/widgets/ea-calendar-item.c62
-rw-r--r--a11y/widgets/ea-combo-button.c4
-rw-r--r--a11y/widgets/ea-expander.c2
-rw-r--r--addressbook/conduit/address-conduit.c300
-rw-r--r--addressbook/gui/component/addressbook-component.c26
-rw-r--r--addressbook/gui/component/addressbook-config.c34
-rw-r--r--addressbook/gui/component/addressbook-migrate.c70
-rw-r--r--addressbook/gui/component/addressbook-migrate.h2
-rw-r--r--addressbook/gui/component/addressbook-view.c122
-rw-r--r--addressbook/gui/component/addressbook-view.h4
-rw-r--r--addressbook/gui/component/addressbook.c14
-rw-r--r--addressbook/gui/component/autocompletion-config.c4
-rw-r--r--addressbook/gui/component/openldap-extract.h12
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-address.c8
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c10
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.h2
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-im.c10
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-im.h2
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c120
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.h6
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c32
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.h6
-rw-r--r--addressbook/gui/contact-editor/eab-editor.c14
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c48
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.c4
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c32
-rw-r--r--addressbook/gui/merging/eab-contact-compare.h4
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c52
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c8
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c10
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c8
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c100
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.h2
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c18
-rw-r--r--addressbook/gui/widgets/e-minicard-label.h2
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c14
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c32
-rw-r--r--addressbook/gui/widgets/e-minicard-view.h2
-rw-r--r--addressbook/gui/widgets/e-minicard.c70
-rw-r--r--addressbook/gui/widgets/e-minicard.h6
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c60
-rw-r--r--addressbook/gui/widgets/eab-contact-display.h2
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c76
-rw-r--r--addressbook/gui/widgets/eab-menu.c10
-rw-r--r--addressbook/gui/widgets/eab-menu.h2
-rw-r--r--addressbook/gui/widgets/eab-popup-control.c8
-rw-r--r--addressbook/gui/widgets/eab-popup-control.h6
-rw-r--r--addressbook/gui/widgets/eab-popup.c10
-rw-r--r--addressbook/gui/widgets/eab-popup.h14
-rw-r--r--addressbook/gui/widgets/eab-vcard-control.c12
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c2
-rw-r--r--addressbook/gui/widgets/test-reflow.c6
-rw-r--r--addressbook/importers/evolution-csv-importer.c86
-rw-r--r--addressbook/importers/evolution-ldif-importer.c18
-rw-r--r--addressbook/importers/evolution-vcard-importer.c22
-rw-r--r--addressbook/printing/e-contact-print-style-editor.c4
-rw-r--r--addressbook/printing/e-contact-print-style-editor.h2
-rw-r--r--addressbook/printing/e-contact-print-types.h2
-rw-r--r--addressbook/printing/e-contact-print.c18
-rw-r--r--addressbook/printing/e-contact-print.h2
-rw-r--r--addressbook/printing/test-contact-print-style-editor.c10
-rw-r--r--addressbook/printing/test-print.c10
-rw-r--r--addressbook/tools/evolution-addressbook-export-list-cards.c2
-rw-r--r--addressbook/util/eab-book-util.c30
-rw-r--r--addressbook/util/eab-book-util.h4
-rw-r--r--calendar/common/authentication.c10
-rw-r--r--calendar/common/authentication.h8
-rw-r--r--calendar/conduits/calendar/calendar-conduit.c390
-rw-r--r--calendar/conduits/common/libecalendar-common-conduit.c32
-rw-r--r--calendar/conduits/memo/memo-conduit.c230
-rw-r--r--calendar/conduits/todo/todo-conduit.c282
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c90
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.h4
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c76
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.h2
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c248
-rw-r--r--calendar/gui/alarm-notify/alarm.c10
-rw-r--r--calendar/gui/alarm-notify/config-data.c30
-rw-r--r--calendar/gui/alarm-notify/notify-main.c4
-rw-r--r--calendar/gui/cal-search-bar.c92
-rw-r--r--calendar/gui/calendar-commands.c2
-rw-r--r--calendar/gui/calendar-component.c276
-rw-r--r--calendar/gui/calendar-config.c178
-rw-r--r--calendar/gui/calendar-config.h2
-rw-r--r--calendar/gui/calendar-view-factory.c8
-rw-r--r--calendar/gui/calendar-view.c12
-rw-r--r--calendar/gui/comp-editor-factory.c24
-rw-r--r--calendar/gui/comp-util.c38
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c54
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c22
-rw-r--r--calendar/gui/dialogs/cal-attachment-select-file.c38
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c22
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.h8
-rw-r--r--calendar/gui/dialogs/calendar-setup.c22
-rw-r--r--calendar/gui/dialogs/cancel-comp.c14
-rw-r--r--calendar/gui/dialogs/changed-comp.c16
-rw-r--r--calendar/gui/dialogs/comp-editor-page.c48
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c30
-rw-r--r--calendar/gui/dialogs/comp-editor.c348
-rw-r--r--calendar/gui/dialogs/comp-editor.h2
-rw-r--r--calendar/gui/dialogs/delete-comp.c34
-rw-r--r--calendar/gui/dialogs/delete-error.c16
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.c16
-rw-r--r--calendar/gui/dialogs/e-send-options-utils.c84
-rw-r--r--calendar/gui/dialogs/e-send-options-utils.h2
-rw-r--r--calendar/gui/dialogs/event-editor.c156
-rw-r--r--calendar/gui/dialogs/event-page.c518
-rw-r--r--calendar/gui/dialogs/memo-editor.c30
-rw-r--r--calendar/gui/dialogs/memo-page.c146
-rw-r--r--calendar/gui/dialogs/recur-comp.c6
-rw-r--r--calendar/gui/dialogs/recurrence-page.c136
-rw-r--r--calendar/gui/dialogs/save-comp.c4
-rw-r--r--calendar/gui/dialogs/schedule-page.c64
-rw-r--r--calendar/gui/dialogs/select-source-dialog.c4
-rw-r--r--calendar/gui/dialogs/send-comp.c14
-rw-r--r--calendar/gui/dialogs/task-details-page.c42
-rw-r--r--calendar/gui/dialogs/task-editor.c116
-rw-r--r--calendar/gui/dialogs/task-page.c288
-rw-r--r--calendar/gui/e-alarm-list.c22
-rw-r--r--calendar/gui/e-cal-component-memo-preview.c40
-rw-r--r--calendar/gui/e-cal-component-preview.c38
-rw-r--r--calendar/gui/e-cal-list-view-config.c58
-rw-r--r--calendar/gui/e-cal-list-view-config.h10
-rw-r--r--calendar/gui/e-cal-list-view.c14
-rw-r--r--calendar/gui/e-cal-list-view.h8
-rw-r--r--calendar/gui/e-cal-menu.c16
-rw-r--r--calendar/gui/e-cal-menu.h2
-rw-r--r--calendar/gui/e-cal-model-calendar.c8
-rw-r--r--calendar/gui/e-cal-model-memos.c2
-rw-r--r--calendar/gui/e-cal-model-tasks.c42
-rw-r--r--calendar/gui/e-cal-model.c130
-rw-r--r--calendar/gui/e-cal-popup.c124
-rw-r--r--calendar/gui/e-cal-popup.h20
-rw-r--r--calendar/gui/e-calendar-table-config.c60
-rw-r--r--calendar/gui/e-calendar-table-config.h10
-rw-r--r--calendar/gui/e-calendar-table.c82
-rw-r--r--calendar/gui/e-calendar-table.h10
-rw-r--r--calendar/gui/e-calendar-view.c198
-rw-r--r--calendar/gui/e-calendar-view.h16
-rw-r--r--calendar/gui/e-cell-date-edit-config.c76
-rw-r--r--calendar/gui/e-cell-date-edit-config.h10
-rw-r--r--calendar/gui/e-cell-date-edit-text.c4
-rw-r--r--calendar/gui/e-comp-editor-registry.c22
-rw-r--r--calendar/gui/e-date-edit-config.c62
-rw-r--r--calendar/gui/e-date-edit-config.h10
-rw-r--r--calendar/gui/e-day-view-config.c128
-rw-r--r--calendar/gui/e-day-view-config.h10
-rw-r--r--calendar/gui/e-day-view-layout.c4
-rw-r--r--calendar/gui/e-day-view-layout.h8
-rw-r--r--calendar/gui/e-day-view-main-item.c156
-rw-r--r--calendar/gui/e-day-view-main-item.h8
-rw-r--r--calendar/gui/e-day-view-time-item.c22
-rw-r--r--calendar/gui/e-day-view-time-item.h8
-rw-r--r--calendar/gui/e-day-view-top-item.c34
-rw-r--r--calendar/gui/e-day-view-top-item.h8
-rw-r--r--calendar/gui/e-day-view.c328
-rw-r--r--calendar/gui/e-day-view.h10
-rw-r--r--calendar/gui/e-itip-control.c286
-rw-r--r--calendar/gui/e-itip-control.h2
-rw-r--r--calendar/gui/e-meeting-attendee.c226
-rw-r--r--calendar/gui/e-meeting-attendee.h2
-rw-r--r--calendar/gui/e-meeting-list-view.c144
-rw-r--r--calendar/gui/e-meeting-list-view.h2
-rw-r--r--calendar/gui/e-meeting-store.c194
-rw-r--r--calendar/gui/e-meeting-store.h2
-rw-r--r--calendar/gui/e-meeting-time-sel-item.c28
-rw-r--r--calendar/gui/e-meeting-time-sel-item.h8
-rw-r--r--calendar/gui/e-meeting-time-sel.c116
-rw-r--r--calendar/gui/e-meeting-time-sel.h14
-rw-r--r--calendar/gui/e-memo-table-config.c54
-rw-r--r--calendar/gui/e-memo-table-config.h10
-rw-r--r--calendar/gui/e-memo-table.c66
-rw-r--r--calendar/gui/e-memo-table.h8
-rw-r--r--calendar/gui/e-memos.c118
-rw-r--r--calendar/gui/e-mini-calendar-config.c52
-rw-r--r--calendar/gui/e-mini-calendar-config.h10
-rw-r--r--calendar/gui/e-select-names-editable.c26
-rw-r--r--calendar/gui/e-select-names-editable.h2
-rw-r--r--calendar/gui/e-select-names-renderer.c14
-rw-r--r--calendar/gui/e-select-names-renderer.h10
-rw-r--r--calendar/gui/e-tasks.c172
-rw-r--r--calendar/gui/e-timezone-entry.c14
-rw-r--r--calendar/gui/e-timezone-entry.h4
-rw-r--r--calendar/gui/e-week-view-config.c82
-rw-r--r--calendar/gui/e-week-view-config.h10
-rw-r--r--calendar/gui/e-week-view-event-item.c56
-rw-r--r--calendar/gui/e-week-view-event-item.h8
-rw-r--r--calendar/gui/e-week-view-layout.h8
-rw-r--r--calendar/gui/e-week-view-main-item.c38
-rw-r--r--calendar/gui/e-week-view-main-item.h8
-rw-r--r--calendar/gui/e-week-view-titles-item.c10
-rw-r--r--calendar/gui/e-week-view-titles-item.h8
-rw-r--r--calendar/gui/e-week-view.c200
-rw-r--r--calendar/gui/e-week-view.h14
-rw-r--r--calendar/gui/gnome-cal.c346
-rw-r--r--calendar/gui/gnome-cal.h2
-rw-r--r--calendar/gui/goto.c28
-rw-r--r--calendar/gui/itip-bonobo-control.c36
-rw-r--r--calendar/gui/itip-bonobo-control.h2
-rw-r--r--calendar/gui/itip-utils.c320
-rw-r--r--calendar/gui/itip-utils.h4
-rw-r--r--calendar/gui/main.c4
-rw-r--r--calendar/gui/memos-component.c208
-rw-r--r--calendar/gui/migration.c172
-rw-r--r--calendar/gui/misc.c4
-rw-r--r--calendar/gui/print.c126
-rw-r--r--calendar/gui/tag-calendar.c10
-rw-r--r--calendar/gui/tasks-component.c226
-rw-r--r--calendar/gui/tasks-control.c34
-rw-r--r--calendar/gui/weekday-picker.c30
-rw-r--r--calendar/importers/icalendar-importer.c8
-rw-r--r--composer/e-msg-composer-hdrs.c414
-rw-r--r--composer/e-msg-composer-hdrs.h8
-rw-r--r--composer/e-msg-composer-select-file.c26
-rw-r--r--composer/e-msg-composer.c1498
-rw-r--r--composer/e-msg-composer.h4
-rw-r--r--composer/evolution-composer.c30
-rw-r--r--composer/listener.c18
-rw-r--r--composer/listener.h4
-rw-r--r--e-util/e-bconf-map.c116
-rw-r--r--e-util/e-bit-array.c20
-rw-r--r--e-util/e-bit-array.h2
-rw-r--r--e-util/e-categories-config.c10
-rw-r--r--e-util/e-config-listener.c2
-rw-r--r--e-util/e-config.c88
-rw-r--r--e-util/e-config.h40
-rw-r--r--e-util/e-corba-utils.c2
-rw-r--r--e-util/e-corba-utils.h2
-rw-r--r--e-util/e-cursor.c6
-rw-r--r--e-util/e-dialog-utils.c30
-rw-r--r--e-util/e-dialog-widgets.c218
-rw-r--r--e-util/e-error.c32
-rw-r--r--e-util/e-event.c36
-rw-r--r--e-util/e-event.h26
-rw-r--r--e-util/e-folder-map.c54
-rw-r--r--e-util/e-fsutils.c12
-rw-r--r--e-util/e-gui-utils.c2
-rw-r--r--e-util/e-html-utils.h2
-rw-r--r--e-util/e-icon-factory.c20
-rw-r--r--e-util/e-import.c48
-rw-r--r--e-util/e-import.h22
-rw-r--r--e-util/e-menu.c42
-rw-r--r--e-util/e-menu.h38
-rw-r--r--e-util/e-mktemp.c36
-rw-r--r--e-util/e-pilot-map.c86
-rw-r--r--e-util/e-pilot-util.c12
-rw-r--r--e-util/e-plugin.c114
-rw-r--r--e-util/e-plugin.h42
-rw-r--r--e-util/e-popup.c38
-rw-r--r--e-util/e-popup.h24
-rw-r--r--e-util/e-print.c10
-rw-r--r--e-util/e-print.h2
-rw-r--r--e-util/e-profile-event.c12
-rw-r--r--e-util/e-request.c22
-rw-r--r--e-util/e-signature-list.c114
-rw-r--r--e-util/e-signature-list.h4
-rw-r--r--e-util/e-signature.c84
-rw-r--r--e-util/e-signature.h6
-rw-r--r--e-util/e-sorter-array.c2
-rw-r--r--e-util/e-sorter-array.h2
-rw-r--r--e-util/e-sorter.c2
-rw-r--r--e-util/e-sorter.h6
-rw-r--r--e-util/e-text-event-processor-emacs-like.c20
-rw-r--r--e-util/e-text-event-processor-emacs-like.h4
-rw-r--r--e-util/e-text-event-processor-types.h4
-rw-r--r--e-util/e-text-event-processor.c2
-rw-r--r--e-util/e-text-event-processor.h2
-rw-r--r--e-util/e-util-private.h2
-rw-r--r--e-util/e-util.c42
-rw-r--r--e-util/e-util.h2
-rw-r--r--e-util/e-win32-reloc.c6
-rw-r--r--e-util/e-xml-utils.c4
-rw-r--r--e-util/e-xml-utils.h2
-rw-r--r--filter/filter-code.c14
-rw-r--r--filter/filter-code.h4
-rw-r--r--filter/filter-colour.c16
-rw-r--r--filter/filter-colour.h6
-rw-r--r--filter/filter-datespec.c102
-rw-r--r--filter/filter-datespec.h6
-rw-r--r--filter/filter-element.c52
-rw-r--r--filter/filter-element.h10
-rw-r--r--filter/filter-file.c66
-rw-r--r--filter/filter-file.h6
-rw-r--r--filter/filter-input.c90
-rw-r--r--filter/filter-input.h6
-rw-r--r--filter/filter-int.c54
-rw-r--r--filter/filter-int.h6
-rw-r--r--filter/filter-label.c34
-rw-r--r--filter/filter-label.h6
-rw-r--r--filter/filter-option.c78
-rw-r--r--filter/filter-option.h8
-rw-r--r--filter/filter-part.c152
-rw-r--r--filter/filter-part.h6
-rw-r--r--filter/filter-rule.c230
-rw-r--r--filter/filter-rule.h16
-rw-r--r--filter/rule-context.c252
-rw-r--r--filter/rule-context.h8
-rw-r--r--filter/rule-editor.c198
-rw-r--r--filter/rule-editor.h20
-rw-r--r--iconv-detect.c26
-rw-r--r--mail/e-searching-tokenizer.c78
-rw-r--r--mail/e-searching-tokenizer.h8
-rw-r--r--mail/em-account-editor.c88
-rw-r--r--mail/em-account-prefs.c150
-rw-r--r--mail/em-account-prefs.h16
-rw-r--r--mail/em-composer-prefs.c290
-rw-r--r--mail/em-composer-prefs.h26
-rw-r--r--mail/em-composer-utils.c474
-rw-r--r--mail/em-config.c8
-rw-r--r--mail/em-event.c14
-rw-r--r--mail/em-event.h2
-rw-r--r--mail/em-filter-context.c72
-rw-r--r--mail/em-filter-context.h2
-rw-r--r--mail/em-filter-editor.c30
-rw-r--r--mail/em-filter-folder-element.c46
-rw-r--r--mail/em-filter-folder-element.h2
-rw-r--r--mail/em-filter-rule.c136
-rw-r--r--mail/em-filter-rule.h2
-rw-r--r--mail/em-filter-source-element.c88
-rw-r--r--mail/em-folder-browser.c218
-rw-r--r--mail/em-folder-properties.c42
-rw-r--r--mail/em-folder-selection-button.c76
-rw-r--r--mail/em-folder-selection-button.h6
-rw-r--r--mail/em-folder-selection.c8
-rw-r--r--mail/em-folder-selector.c92
-rw-r--r--mail/em-folder-selector.h8
-rw-r--r--mail/em-folder-tree-model.c334
-rw-r--r--mail/em-folder-tree-model.h18
-rw-r--r--mail/em-folder-tree.c490
-rw-r--r--mail/em-folder-tree.h2
-rw-r--r--mail/em-folder-utils.c170
-rw-r--r--mail/em-folder-view.c296
-rw-r--r--mail/em-folder-view.h6
-rw-r--r--mail/em-format-hook.c4
-rw-r--r--mail/em-format-hook.h6
-rw-r--r--mail/em-format-html-display.c176
-rw-r--r--mail/em-format-html.c178
-rw-r--r--mail/em-format-html.h50
-rw-r--r--mail/em-format-quote.c102
-rw-r--r--mail/em-format.c220
-rw-r--r--mail/em-format.h68
-rw-r--r--mail/em-html-stream.c8
-rw-r--r--mail/em-html-stream.h2
-rw-r--r--mail/em-icon-stream.c10
-rw-r--r--mail/em-inline-filter.c26
-rw-r--r--mail/em-junk-hook.c50
-rw-r--r--mail/em-mailer-prefs.c388
-rw-r--r--mail/em-mailer-prefs.h24
-rw-r--r--mail/em-menu.c30
-rw-r--r--mail/em-message-browser.c42
-rw-r--r--mail/em-migrate.c642
-rw-r--r--mail/em-popup.c116
-rw-r--r--mail/em-popup.h38
-rw-r--r--mail/em-search-context.c12
-rw-r--r--mail/em-stripsig-filter.c26
-rw-r--r--mail/em-stripsig-filter.h4
-rw-r--r--mail/em-subscribe-editor.c50
-rw-r--r--mail/em-sync-stream.c12
-rw-r--r--mail/em-sync-stream.h2
-rw-r--r--mail/em-utils.c312
-rw-r--r--mail/em-vfolder-context.c12
-rw-r--r--mail/em-vfolder-context.h2
-rw-r--r--mail/em-vfolder-editor.c22
-rw-r--r--mail/em-vfolder-editor.h2
-rw-r--r--mail/em-vfolder-rule.c142
-rw-r--r--mail/em-vfolder-rule.h2
-rw-r--r--mail/em-vfs-stream.c12
-rw-r--r--mail/importers/elm-importer.c10
-rw-r--r--mail/importers/evolution-mbox-importer.c4
-rw-r--r--mail/importers/mail-importer.c26
-rw-r--r--mail/importers/pine-importer.c16
-rw-r--r--mail/mail-autofilter.c68
-rw-r--r--mail/mail-component-factory.c4
-rw-r--r--mail/mail-component.c178
-rw-r--r--mail/mail-component.h4
-rw-r--r--mail/mail-config-factory.c8
-rw-r--r--mail/mail-config.c340
-rw-r--r--mail/mail-crypto.c4
-rw-r--r--mail/mail-folder-cache.c98
-rw-r--r--mail/mail-folder-cache.h6
-rw-r--r--mail/mail-mt.c52
-rw-r--r--mail/mail-ops.c288
-rw-r--r--mail/mail-ops.h8
-rw-r--r--mail/mail-send-recv.c146
-rw-r--r--mail/mail-session.c110
-rw-r--r--mail/mail-session.h2
-rw-r--r--mail/mail-signature-editor.c104
-rw-r--r--mail/mail-tools.c74
-rw-r--r--mail/mail-tools.h8
-rw-r--r--mail/mail-types.h6
-rw-r--r--mail/mail-vfolder.c78
-rw-r--r--mail/message-list.c566
-rw-r--r--mail/message-list.h20
-rw-r--r--mail/message-tag-editor.c20
-rw-r--r--mail/message-tag-editor.h6
-rw-r--r--mail/message-tag-followup.c86
-rw-r--r--mail/message-tag-followup.h10
-rw-r--r--plugins/addressbook-file/addressbook-file.c12
-rw-r--r--plugins/attachment-reminder/attachment-reminder.c12
-rw-r--r--plugins/audio-inline/audio-inline.c12
-rw-r--r--plugins/backup-restore/backup-restore.c56
-rw-r--r--plugins/backup-restore/backup.c36
-rw-r--r--plugins/bbdb/bbdb.c28
-rw-r--r--plugins/bbdb/bbdb.h2
-rw-r--r--plugins/bbdb/gaimbuddies.c14
-rw-r--r--plugins/bogo-junk-plugin/bf-junk-filter.c4
-rw-r--r--plugins/caldav/caldav-source.c86
-rw-r--r--plugins/calendar-file/calendar-file.c4
-rw-r--r--plugins/calendar-http/calendar-http.c10
-rw-r--r--plugins/copy-tool/copy-tool.c2
-rw-r--r--plugins/default-mailer/default-mailer.c8
-rw-r--r--plugins/default-source/default-source.c26
-rw-r--r--plugins/exchange-operations/exchange-account-setup.c122
-rw-r--r--plugins/exchange-operations/exchange-calendar.c56
-rw-r--r--plugins/exchange-operations/exchange-change-password.c2
-rw-r--r--plugins/exchange-operations/exchange-config-listener.c192
-rw-r--r--plugins/exchange-operations/exchange-config-listener.h4
-rw-r--r--plugins/exchange-operations/exchange-contacts.c64
-rw-r--r--plugins/exchange-operations/exchange-delegates-user.c44
-rw-r--r--plugins/exchange-operations/exchange-delegates-user.h4
-rw-r--r--plugins/exchange-operations/exchange-delegates.c22
-rw-r--r--plugins/exchange-operations/exchange-folder-permission.c8
-rw-r--r--plugins/exchange-operations/exchange-folder-size-display.c10
-rw-r--r--plugins/exchange-operations/exchange-folder-subscription.c14
-rw-r--r--plugins/exchange-operations/exchange-folder.c40
-rw-r--r--plugins/exchange-operations/exchange-mail-send-options.c62
-rw-r--r--plugins/exchange-operations/exchange-operations.c34
-rw-r--r--plugins/exchange-operations/exchange-permissions-dialog.c12
-rw-r--r--plugins/exchange-operations/exchange-send-options.c114
-rw-r--r--plugins/exchange-operations/exchange-send-options.h2
-rw-r--r--plugins/external-editor/external-editor.c8
-rw-r--r--plugins/face/face.c4
-rw-r--r--plugins/folder-unsubscribe/folder-unsubscribe.c20
-rw-r--r--plugins/google-account-setup/google-source.c90
-rw-r--r--plugins/groupwise-account-setup/camel-gw-listener.c264
-rw-r--r--plugins/groupwise-account-setup/camel-gw-listener.h8
-rw-r--r--plugins/groupwise-account-setup/groupwise-account-setup.c8
-rw-r--r--plugins/groupwise-features/addressbook-groupwise.c12
-rw-r--r--plugins/groupwise-features/install-shared.c20
-rw-r--r--plugins/groupwise-features/junk-mail-settings.c34
-rw-r--r--plugins/groupwise-features/junk-settings.c64
-rw-r--r--plugins/groupwise-features/junk-settings.h10
-rw-r--r--plugins/groupwise-features/mail-retract.c12
-rw-r--r--plugins/groupwise-features/mail-send-options.c28
-rw-r--r--plugins/groupwise-features/mail-send-options.h6
-rw-r--r--plugins/groupwise-features/process-meeting.c22
-rw-r--r--plugins/groupwise-features/proxy-login.c98
-rw-r--r--plugins/groupwise-features/proxy-login.h2
-rw-r--r--plugins/groupwise-features/proxy.c190
-rw-r--r--plugins/groupwise-features/proxy.h2
-rw-r--r--plugins/groupwise-features/send-options.c130
-rw-r--r--plugins/groupwise-features/share-folder-common.c120
-rw-r--r--plugins/groupwise-features/share-folder.c102
-rw-r--r--plugins/groupwise-features/share-folder.h12
-rw-r--r--plugins/groupwise-features/status-track.c20
-rw-r--r--plugins/hula-account-setup/camel-hula-listener.c176
-rw-r--r--plugins/hula-account-setup/camel-hula-listener.h8
-rw-r--r--plugins/hula-account-setup/hula-account-setup.c8
-rw-r--r--plugins/imap-features/imap-headers.c40
-rw-r--r--plugins/import-ics-attachments/icsimporter.c30
-rw-r--r--plugins/ipod-sync/evolution-ipod-sync.c8
-rw-r--r--plugins/ipod-sync/ical-format.c6
-rw-r--r--plugins/ipod-sync/ipod-sync.c14
-rw-r--r--plugins/ipod-sync/ipod.c26
-rw-r--r--plugins/ipod-sync/sync.c66
-rw-r--r--plugins/itip-formatter/itip-formatter.c400
-rw-r--r--plugins/itip-formatter/itip-view.c492
-rw-r--r--plugins/itip-formatter/itip-view.h6
-rw-r--r--plugins/mail-account-disable/mail-account-disable.c6
-rw-r--r--plugins/mail-notification/mail-notification.c32
-rw-r--r--plugins/mail-remote/client.c12
-rw-r--r--plugins/mail-remote/em-message-stream.c4
-rw-r--r--plugins/mail-remote/evolution-mail-folder.c4
-rw-r--r--plugins/mail-remote/evolution-mail-folderlistener.c2
-rw-r--r--plugins/mail-remote/evolution-mail-messageiterator.c2
-rw-r--r--plugins/mail-remote/evolution-mail-messagestream.c2
-rw-r--r--plugins/mail-remote/evolution-mail-session.c2
-rw-r--r--plugins/mail-remote/evolution-mail-sessionlistener.c2
-rw-r--r--plugins/mail-remote/evolution-mail-store.c2
-rw-r--r--plugins/mail-remote/evolution-mail-storelistener.c2
-rw-r--r--plugins/mail-to-task/mail-to-task.c42
-rw-r--r--plugins/mailing-list-actions/mailing-list-actions.c14
-rw-r--r--plugins/mark-all-read/mark-all-read.c38
-rw-r--r--plugins/mark-calendar-offline/mark-calendar-offline.c6
-rw-r--r--plugins/mono/mono-plugin.c4
-rw-r--r--plugins/new-mail-notify/new-mail-notify.c38
-rw-r--r--plugins/plugin-manager/plugin-manager.c12
-rw-r--r--plugins/prefer-plain/prefer-plain.c4
-rw-r--r--plugins/print-message/print-message.c8
-rw-r--r--plugins/publish-calendar/publish-calendar.c12
-rw-r--r--plugins/publish-calendar/publish-format-fb.c12
-rw-r--r--plugins/publish-calendar/publish-format-ical.c10
-rw-r--r--plugins/publish-calendar/publish-location.c8
-rw-r--r--plugins/publish-calendar/url-editor-dialog.c4
-rw-r--r--plugins/sa-junk-plugin/em-junk-filter.c100
-rw-r--r--plugins/save-attachments/save-attachments.c10
-rw-r--r--plugins/save-calendar/csv-format.c82
-rw-r--r--plugins/save-calendar/ical-format.c22
-rw-r--r--plugins/save-calendar/rdf-format.c24
-rw-r--r--plugins/save-calendar/save-calendar.c38
-rw-r--r--plugins/select-one-source/mark-calendar-offline.c6
-rw-r--r--plugins/select-one-source/select-one-source.c6
-rw-r--r--plugins/startup-wizard/startup-wizard.c20
-rw-r--r--plugins/subject-thread/subject-thread.c8
-rw-r--r--plugins/tnef-attachments/tnef-plugin.c264
-rw-r--r--shell/e-component-registry.c2
-rw-r--r--shell/e-config-upgrade.c4
-rw-r--r--shell/e-corba-config-page.c6
-rw-r--r--shell/e-history.c2
-rw-r--r--shell/e-shell-folder-title-bar.c36
-rw-r--r--shell/e-shell-importer.c32
-rw-r--r--shell/e-shell-nm-glib.c6
-rw-r--r--shell/e-shell-nm.c46
-rw-r--r--shell/e-shell-settings-dialog.c22
-rw-r--r--shell/e-shell-utils.c6
-rw-r--r--shell/e-shell-window-commands.c14
-rw-r--r--shell/e-shell-window.c26
-rw-r--r--shell/e-shell.c110
-rw-r--r--shell/e-sidebar.c40
-rw-r--r--shell/e-user-creatable-items-handler.c22
-rw-r--r--shell/es-event.c16
-rw-r--r--shell/es-menu.c12
-rw-r--r--shell/evolution-component.c2
-rw-r--r--shell/evolution-config-control.c2
-rw-r--r--shell/evolution-listener.c2
-rw-r--r--shell/evolution-shell-component-utils.c6
-rw-r--r--shell/importer/evolution-importer-client.c20
-rw-r--r--shell/importer/evolution-importer-listener.c8
-rw-r--r--shell/importer/evolution-importer-listener.h2
-rw-r--r--shell/importer/evolution-importer.c4
-rw-r--r--shell/importer/evolution-importer.h4
-rw-r--r--shell/importer/evolution-intelligent-importer.c16
-rw-r--r--shell/importer/intelligent.c54
-rw-r--r--shell/main.c28
-rw-r--r--shell/test/evolution-test-component.c6
-rw-r--r--smime/gui/cert-trust-dialog.c4
-rw-r--r--smime/gui/certificate-manager.c22
-rw-r--r--smime/gui/certificate-viewer.c8
-rw-r--r--smime/gui/e-cert-selector.c12
-rw-r--r--smime/lib/e-asn1-object.c26
-rw-r--r--smime/lib/e-asn1-object.h4
-rw-r--r--smime/lib/e-cert-db.c124
-rw-r--r--smime/lib/e-cert-trust.c52
-rw-r--r--smime/lib/e-cert-trust.h24
-rw-r--r--smime/lib/e-cert.c80
-rw-r--r--smime/lib/e-pkcs12.c44
-rw-r--r--tools/killev.c2
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c34
-rw-r--r--widgets/menus/gal-define-views-dialog.c18
-rw-r--r--widgets/menus/gal-define-views-dialog.h2
-rw-r--r--widgets/menus/gal-define-views-model.c4
-rw-r--r--widgets/menus/gal-define-views-model.h2
-rw-r--r--widgets/menus/gal-view-collection.c4
-rw-r--r--widgets/menus/gal-view-collection.h2
-rw-r--r--widgets/menus/gal-view-etable.c2
-rw-r--r--widgets/menus/gal-view-etable.h2
-rw-r--r--widgets/menus/gal-view-factory-etable.h2
-rw-r--r--widgets/menus/gal-view-factory.c4
-rw-r--r--widgets/menus/gal-view-factory.h2
-rw-r--r--widgets/menus/gal-view-instance-save-as-dialog.c8
-rw-r--r--widgets/menus/gal-view-instance-save-as-dialog.h2
-rw-r--r--widgets/menus/gal-view-instance.c18
-rw-r--r--widgets/menus/gal-view-instance.h2
-rw-r--r--widgets/menus/gal-view-menus.c14
-rw-r--r--widgets/menus/gal-view-new-dialog.c12
-rw-r--r--widgets/menus/gal-view-new-dialog.h4
-rw-r--r--widgets/menus/gal-view.c10
-rw-r--r--widgets/menus/gal-view.h2
-rw-r--r--widgets/misc/e-activity-handler.c2
-rw-r--r--widgets/misc/e-attachment-bar.c352
-rw-r--r--widgets/misc/e-attachment-bar.h4
-rw-r--r--widgets/misc/e-attachment.c156
-rw-r--r--widgets/misc/e-attachment.h2
-rw-r--r--widgets/misc/e-calendar-item.c74
-rw-r--r--widgets/misc/e-calendar-item.h12
-rw-r--r--widgets/misc/e-calendar.h8
-rw-r--r--widgets/misc/e-canvas-background.c14
-rw-r--r--widgets/misc/e-canvas-background.h2
-rw-r--r--widgets/misc/e-canvas-utils.c14
-rw-r--r--widgets/misc/e-canvas-utils.h2
-rw-r--r--widgets/misc/e-canvas-vbox.c20
-rw-r--r--widgets/misc/e-canvas-vbox.h4
-rw-r--r--widgets/misc/e-canvas.c4
-rw-r--r--widgets/misc/e-canvas.h2
-rw-r--r--widgets/misc/e-cell-date-edit.c12
-rw-r--r--widgets/misc/e-cell-percent.c6
-rw-r--r--widgets/misc/e-cell-renderer-combo.c8
-rw-r--r--widgets/misc/e-cell-renderer-combo.h2
-rw-r--r--widgets/misc/e-charset-picker.c100
-rw-r--r--widgets/misc/e-colors.h2
-rw-r--r--widgets/misc/e-combo-button.c36
-rw-r--r--widgets/misc/e-combo-cell-editable.c52
-rw-r--r--widgets/misc/e-combo-cell-editable.h2
-rw-r--r--widgets/misc/e-config-page.h2
-rw-r--r--widgets/misc/e-cursors.h2
-rw-r--r--widgets/misc/e-dateedit.c26
-rw-r--r--widgets/misc/e-dateedit.h4
-rw-r--r--widgets/misc/e-dropdown-button.c8
-rw-r--r--widgets/misc/e-expander.c18
-rw-r--r--widgets/misc/e-filter-bar.c228
-rw-r--r--widgets/misc/e-filter-bar.h10
-rw-r--r--widgets/misc/e-gui-utils.c2
-rw-r--r--widgets/misc/e-gui-utils.h2
-rw-r--r--widgets/misc/e-hsv-utils.c10
-rw-r--r--widgets/misc/e-hsv-utils.h2
-rw-r--r--widgets/misc/e-icon-entry.c10
-rw-r--r--widgets/misc/e-icon-entry.h2
-rw-r--r--widgets/misc/e-image-chooser.c4
-rw-r--r--widgets/misc/e-image-chooser.h2
-rw-r--r--widgets/misc/e-info-label.c20
-rw-r--r--widgets/misc/e-map.c50
-rw-r--r--widgets/misc/e-multi-config-dialog.c16
-rw-r--r--widgets/misc/e-pilot-settings.c20
-rw-r--r--widgets/misc/e-popup-menu.c10
-rw-r--r--widgets/misc/e-popup-menu.h2
-rw-r--r--widgets/misc/e-printable.c10
-rw-r--r--widgets/misc/e-printable.h2
-rw-r--r--widgets/misc/e-reflow-model.c8
-rw-r--r--widgets/misc/e-reflow-model.h4
-rw-r--r--widgets/misc/e-reflow.c78
-rw-r--r--widgets/misc/e-reflow.h6
-rw-r--r--widgets/misc/e-search-bar.c216
-rw-r--r--widgets/misc/e-search-bar.h8
-rw-r--r--widgets/misc/e-selection-model-array.c24
-rw-r--r--widgets/misc/e-selection-model-array.h2
-rw-r--r--widgets/misc/e-selection-model-simple.c2
-rw-r--r--widgets/misc/e-selection-model-simple.h2
-rw-r--r--widgets/misc/e-selection-model.c28
-rw-r--r--widgets/misc/e-selection-model.h2
-rw-r--r--widgets/misc/e-send-options.c138
-rw-r--r--widgets/misc/e-send-options.h4
-rw-r--r--widgets/misc/e-spinner.c12
-rw-r--r--widgets/misc/e-spinner.h2
-rw-r--r--widgets/misc/e-task-bar.c6
-rw-r--r--widgets/misc/e-task-bar.h2
-rw-r--r--widgets/misc/e-task-widget.c6
-rw-r--r--widgets/misc/e-unicode.c14
-rw-r--r--widgets/misc/e-url-entry.c14
-rw-r--r--widgets/misc/test-color.c2
-rw-r--r--widgets/misc/test-dropdown-button.c2
-rw-r--r--widgets/table/e-cell-checkbox.c16
-rw-r--r--widgets/table/e-cell-combo.c18
-rw-r--r--widgets/table/e-cell-combo.h2
-rw-r--r--widgets/table/e-cell-date.c6
-rw-r--r--widgets/table/e-cell-date.h2
-rw-r--r--widgets/table/e-cell-float.c8
-rw-r--r--widgets/table/e-cell-hbox.c20
-rw-r--r--widgets/table/e-cell-hbox.h4
-rw-r--r--widgets/table/e-cell-number.c6
-rw-r--r--widgets/table/e-cell-number.h2
-rw-r--r--widgets/table/e-cell-pixbuf.c16
-rw-r--r--widgets/table/e-cell-popup.c18
-rw-r--r--widgets/table/e-cell-progress.c22
-rw-r--r--widgets/table/e-cell-progress.h2
-rw-r--r--widgets/table/e-cell-size.c6
-rw-r--r--widgets/table/e-cell-spin-button.c274
-rw-r--r--widgets/table/e-cell-spin-button.h12
-rw-r--r--widgets/table/e-cell-text.c172
-rw-r--r--widgets/table/e-cell-text.h4
-rw-r--r--widgets/table/e-cell-toggle.c32
-rw-r--r--widgets/table/e-cell-toggle.h2
-rw-r--r--widgets/table/e-cell-tree.c48
-rw-r--r--widgets/table/e-cell-tree.h2
-rw-r--r--widgets/table/e-cell-vbox.c24
-rw-r--r--widgets/table/e-cell-vbox.h2
-rw-r--r--widgets/table/e-cell.c18
-rw-r--r--widgets/table/e-cell.h6
-rw-r--r--widgets/table/e-table-click-to-add.c26
-rw-r--r--widgets/table/e-table-click-to-add.h4
-rw-r--r--widgets/table/e-table-col-dnd.h2
-rw-r--r--widgets/table/e-table-col.c28
-rw-r--r--widgets/table/e-table-col.h2
-rw-r--r--widgets/table/e-table-column-specification.c4
-rw-r--r--widgets/table/e-table-column-specification.h2
-rw-r--r--widgets/table/e-table-column.c20
-rw-r--r--widgets/table/e-table-config-field.h2
-rw-r--r--widgets/table/e-table-config.c162
-rw-r--r--widgets/table/e-table-config.h4
-rw-r--r--widgets/table/e-table-defines.h2
-rw-r--r--widgets/table/e-table-example-1.c16
-rw-r--r--widgets/table/e-table-example-2.c12
-rw-r--r--widgets/table/e-table-extras.h2
-rw-r--r--widgets/table/e-table-field-chooser-dialog.c6
-rw-r--r--widgets/table/e-table-field-chooser-dialog.h4
-rw-r--r--widgets/table/e-table-field-chooser-item.c32
-rw-r--r--widgets/table/e-table-field-chooser-item.h2
-rw-r--r--widgets/table/e-table-field-chooser.c8
-rw-r--r--widgets/table/e-table-field-chooser.h4
-rw-r--r--widgets/table/e-table-group-container.c76
-rw-r--r--widgets/table/e-table-group-container.h2
-rw-r--r--widgets/table/e-table-group-leaf.c2
-rw-r--r--widgets/table/e-table-group-leaf.h4
-rw-r--r--widgets/table/e-table-group.h6
-rw-r--r--widgets/table/e-table-header-item.c168
-rw-r--r--widgets/table/e-table-header-item.h6
-rw-r--r--widgets/table/e-table-header-utils.c10
-rw-r--r--widgets/table/e-table-header-utils.h2
-rw-r--r--widgets/table/e-table-header.c70
-rw-r--r--widgets/table/e-table-header.h4
-rw-r--r--widgets/table/e-table-item.c242
-rw-r--r--widgets/table/e-table-item.h10
-rw-r--r--widgets/table/e-table-memory-callbacks.c12
-rw-r--r--widgets/table/e-table-memory-callbacks.h2
-rw-r--r--widgets/table/e-table-memory-store.c14
-rw-r--r--widgets/table/e-table-memory-store.h2
-rw-r--r--widgets/table/e-table-memory.c70
-rw-r--r--widgets/table/e-table-memory.h2
-rw-r--r--widgets/table/e-table-model.c48
-rw-r--r--widgets/table/e-table-model.h4
-rw-r--r--widgets/table/e-table-one.c14
-rw-r--r--widgets/table/e-table-one.h4
-rw-r--r--widgets/table/e-table-scrolled.h2
-rw-r--r--widgets/table/e-table-search.c12
-rw-r--r--widgets/table/e-table-search.h2
-rw-r--r--widgets/table/e-table-selection-model.c10
-rw-r--r--widgets/table/e-table-selection-model.h2
-rw-r--r--widgets/table/e-table-simple.c10
-rw-r--r--widgets/table/e-table-simple.h4
-rw-r--r--widgets/table/e-table-size-test.c12
-rw-r--r--widgets/table/e-table-sort-info.c20
-rw-r--r--widgets/table/e-table-sort-info.h6
-rw-r--r--widgets/table/e-table-sorted-variable.h4
-rw-r--r--widgets/table/e-table-sorted.c2
-rw-r--r--widgets/table/e-table-sorted.h4
-rw-r--r--widgets/table/e-table-sorter.c8
-rw-r--r--widgets/table/e-table-sorter.h2
-rw-r--r--widgets/table/e-table-sorting-utils.c2
-rw-r--r--widgets/table/e-table-sorting-utils.h2
-rw-r--r--widgets/table/e-table-specification.c30
-rw-r--r--widgets/table/e-table-specification.h2
-rw-r--r--widgets/table/e-table-state.c18
-rw-r--r--widgets/table/e-table-state.h2
-rw-r--r--widgets/table/e-table-subset-variable.c12
-rw-r--r--widgets/table/e-table-subset-variable.h4
-rw-r--r--widgets/table/e-table-subset.c4
-rw-r--r--widgets/table/e-table-subset.h2
-rw-r--r--widgets/table/e-table-tooltip.h2
-rw-r--r--widgets/table/e-table-tree.h2
-rw-r--r--widgets/table/e-table-utils.h2
-rw-r--r--widgets/table/e-table-without.c4
-rw-r--r--widgets/table/e-table-without.h4
-rw-r--r--widgets/table/e-table.c148
-rw-r--r--widgets/table/e-table.h8
-rw-r--r--widgets/table/e-tree-memory-callbacks.c14
-rw-r--r--widgets/table/e-tree-memory-callbacks.h4
-rw-r--r--widgets/table/e-tree-memory.c86
-rw-r--r--widgets/table/e-tree-memory.h2
-rw-r--r--widgets/table/e-tree-model.c346
-rw-r--r--widgets/table/e-tree-model.h4
-rw-r--r--widgets/table/e-tree-scrolled.h2
-rw-r--r--widgets/table/e-tree-selection-model.c22
-rw-r--r--widgets/table/e-tree-selection-model.h2
-rw-r--r--widgets/table/e-tree-simple.c34
-rw-r--r--widgets/table/e-tree-simple.h2
-rw-r--r--widgets/table/e-tree-sorted-variable.c4
-rw-r--r--widgets/table/e-tree-sorted-variable.h4
-rw-r--r--widgets/table/e-tree-sorted.c18
-rw-r--r--widgets/table/e-tree-sorted.h2
-rw-r--r--widgets/table/e-tree-table-adapter.c34
-rw-r--r--widgets/table/e-tree-table-adapter.h2
-rw-r--r--widgets/table/e-tree.c60
-rw-r--r--widgets/table/e-tree.h6
-rw-r--r--widgets/table/table-test.h2
-rw-r--r--widgets/table/test-check.c12
-rw-r--r--widgets/table/test-cols.c18
-rw-r--r--widgets/text/e-text-model-repos.c4
-rw-r--r--widgets/text/e-text-model-repos.h4
-rw-r--r--widgets/text/e-text-model-test.c6
-rw-r--r--widgets/text/e-text-model.c18
-rw-r--r--widgets/text/e-text-model.h2
-rw-r--r--widgets/text/e-text-test.c4
-rw-r--r--widgets/text/e-text.c186
-rw-r--r--widgets/text/e-text.h4
816 files changed, 18135 insertions, 18131 deletions
diff --git a/ChangeLog b/ChangeLog
index 121b26c70d..70f7fecaca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-14 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Remove trailing whitespace from source code.
+
2007-11-10 Michael Monreal <mmonreal@svn.gnome.org>
** Fix for bug #209425
diff --git a/a11y/addressbook/ea-addressbook-view.c b/a11y/addressbook/ea-addressbook-view.c
index 67b4c6318d..62981ebca1 100644
--- a/a11y/addressbook/ea-addressbook-view.c
+++ b/a11y/addressbook/ea-addressbook-view.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* ea-addressbook-view.c
* Copyright (C) 2000 Ximian, Inc.
*
@@ -103,7 +103,7 @@ ea_ab_view_get_description (AtkObject *accessible)
return _("evolution addressbook");
}
-AtkObject*
+AtkObject*
ea_ab_view_new (GObject *obj)
{
GObject *object;
diff --git a/a11y/addressbook/ea-addressbook-view.h b/a11y/addressbook/ea-addressbook-view.h
index d1498d98c1..2fe13ca2c2 100644
--- a/a11y/addressbook/ea-addressbook-view.h
+++ b/a11y/addressbook/ea-addressbook-view.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* ea-addressbook_view.h
* Copyright (C) 2000 Ximian, Inc.
*
diff --git a/a11y/addressbook/ea-minicard-view.c b/a11y/addressbook/ea-minicard-view.c
index c6b7d4b029..52f923eb24 100644
--- a/a11y/addressbook/ea-minicard-view.c
+++ b/a11y/addressbook/ea-minicard-view.c
@@ -1,8 +1,8 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* ea-minicard-view.c
* Copyright (C) 2000 Ximian, Inc.
- * Author: Leon Zhang < leon.zhang@sun.com>
+ * Author: Leon Zhang < leon.zhang@sun.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
@@ -90,13 +90,13 @@ ea_minicard_view_get_type (void)
(GInterfaceFinalizeFunc) NULL,
NULL
};
-
+
static const GInterfaceInfo atk_action_info = {
(GInterfaceInitFunc) atk_action_interface_init,
(GInterfaceFinalizeFunc) NULL,
NULL
};
-
+
/*
* Figure out the size of the class and instance
* we are run-time deriving from (GailWidget, in this case) */
@@ -115,7 +115,7 @@ ea_minicard_view_get_type (void)
&atk_selection_info);
g_type_add_interface_static (type, ATK_TYPE_ACTION,
&atk_action_info);
-
+
}
return type;
@@ -150,7 +150,7 @@ ea_minicard_view_get_name (AtkObject *accessible)
if (!reflow)
return NULL;
-
+
/* Get the current name of minicard view*/
card_view = E_MINICARD_VIEW (reflow);
g_object_get (card_view->adapter, "book", &book, NULL);
@@ -179,7 +179,7 @@ ea_minicard_view_get_description (AtkObject *accessible)
return _("evolution addressbook");
}
-AtkObject*
+AtkObject*
ea_minicard_view_new (GObject *obj)
{
GObject *object;
@@ -197,18 +197,18 @@ static gint
ea_minicard_view_get_n_children (AtkObject *accessible)
{
EReflow *reflow;
-
+
gint child_num = 0;
-
+
g_return_val_if_fail (EA_IS_MINICARD_VIEW (accessible), -1);
-
+
reflow = E_REFLOW (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE(accessible)));
if (!reflow)
return -1;
-
+
child_num = reflow->count;
-
+
return child_num;
}
@@ -216,7 +216,7 @@ static AtkStateSet *ea_minicard_view_ref_state_set (AtkObject *obj)
{
AtkStateSet *state_set = NULL;
GObject *gobj = NULL;
-
+
state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (obj);
if( !state_set )
state_set = atk_state_set_new ();
@@ -224,7 +224,7 @@ static AtkStateSet *ea_minicard_view_ref_state_set (AtkObject *obj)
gobj = atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (obj));
if( !gobj )
return state_set;
-
+
atk_state_set_add_state (state_set, ATK_STATE_ENABLED);
atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE);
atk_state_set_add_state (state_set, ATK_STATE_SHOWING);
@@ -241,11 +241,11 @@ ea_minicard_view_ref_child (AtkObject *accessible, gint index)
EMinicard *card = NULL;
g_return_val_if_fail (EA_IS_MINICARD_VIEW (accessible), NULL);
-
+
child_num = atk_object_get_n_accessible_children (accessible);
if (child_num <= 0 || index < 0 || index >= child_num)
return NULL;
-
+
reflow = E_REFLOW (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (accessible)));
if (!reflow)
return NULL;
@@ -282,13 +282,13 @@ selection_interface_add_selection (AtkSelection *selection, gint i)
{
AtkGObjectAccessible *atk_gobj= NULL;
EReflow *reflow = NULL;
-
+
atk_gobj = ATK_GOBJECT_ACCESSIBLE (selection);
reflow = E_REFLOW (atk_gobject_accessible_get_object (atk_gobj));
-
+
if (!reflow)
return FALSE;
-
+
selection_interface_clear_selection (selection);
e_selection_model_select_single_row (reflow->selection, i);
@@ -306,9 +306,9 @@ selection_interface_clear_selection (AtkSelection *selection)
if( !reflow )
return FALSE;
-
+
e_selection_model_clear (reflow->selection);
-
+
return TRUE;
}
@@ -329,7 +329,7 @@ selection_interface_get_selection_count (AtkSelection *selection)
if (!reflow )
return FALSE;
-
+
return e_selection_model_selected_count (reflow->selection);
}
@@ -417,4 +417,4 @@ atk_action_interface_get_name (AtkAction *iface, gint i)
return action_name[i];
}
-
+
diff --git a/a11y/addressbook/ea-minicard-view.h b/a11y/addressbook/ea-minicard-view.h
index c0046e0e61..01f73c1494 100644
--- a/a11y/addressbook/ea-minicard-view.h
+++ b/a11y/addressbook/ea-minicard-view.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* ea-minicard-view.h
* Copyright (C) 2000 Ximian, Inc.
* Author: Leon Zhang <leon.zhang@sun.com> Sun Microsystem Inc., 2003
diff --git a/a11y/addressbook/ea-minicard.c b/a11y/addressbook/ea-minicard.c
index 8d4e41082b..888b7423de 100644
--- a/a11y/addressbook/ea-minicard.c
+++ b/a11y/addressbook/ea-minicard.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* ea-minicard.c
* Copyright (C) 2000 Ximian, Inc.
*
@@ -79,7 +79,7 @@ ea_minicard_get_type (void)
/*
* Figure out the size of the class and instance
- * we are run-time deriving from (GailWidget, in this case)
+ * we are run-time deriving from (GailWidget, in this case)
*/
factory = atk_registry_get_factory (atk_get_default_registry (),
@@ -93,7 +93,7 @@ ea_minicard_get_type (void)
type = g_type_register_static ( derived_atk_type,
"EaMinicard", &tinfo, 0);
g_type_add_interface_static (type, ATK_TYPE_ACTION,
- &atk_action_info);
+ &atk_action_info);
}
return type;
@@ -114,14 +114,14 @@ ea_minicard_class_init (EaMinicardClass *klass)
}
/*
- * we access the main content of current minicard, including
+ * we access the main content of current minicard, including
* header text, label(field, field name)
*/
static G_CONST_RETURN gchar*
ea_minicard_get_name (AtkObject *accessible)
{
#define BUFFERSIZE 500
-
+
static gchar name[BUFFERSIZE];
GString *new_str = g_string_new (NULL);
gchar *string;
@@ -130,7 +130,7 @@ ea_minicard_get_name (AtkObject *accessible)
g_return_val_if_fail (EA_IS_MINICARD(accessible), NULL);
memset (name, '\0', BUFFERSIZE);
- card = E_MINICARD(atk_gobject_accessible_get_object
+ card = E_MINICARD(atk_gobject_accessible_get_object
(ATK_GOBJECT_ACCESSIBLE(accessible)));
if (!card)
return NULL;
@@ -140,7 +140,7 @@ ea_minicard_get_name (AtkObject *accessible)
if (e_contact_get (card->contact, E_CONTACT_IS_LIST))
g_string_append (new_str, _("Contact List: "));
else g_string_append (new_str, _("Contact: "));
-
+
/* get header of current card */
g_string_append (new_str, string);
g_free (string);
@@ -168,7 +168,7 @@ ea_minicard_get_description (AtkObject *accessible)
return _("evolution minicard");
}
-AtkObject*
+AtkObject*
ea_minicard_new (GObject *obj)
{
GObject *object;
@@ -267,7 +267,7 @@ atk_action_interface_get_name (AtkAction *iface, gint i)
{
if( i >= G_N_ELEMENTS (action_name) || i < 0)
return NULL;
-
+
return action_name[i];
}
-
+
diff --git a/a11y/addressbook/ea-minicard.h b/a11y/addressbook/ea-minicard.h
index bb184762e4..e745a6acff 100644
--- a/a11y/addressbook/ea-minicard.h
+++ b/a11y/addressbook/ea-minicard.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* ea-minicard.h
* Copyright (C) 2000 Ximian, Inc.
*
@@ -16,7 +16,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
- *
+ *
* Author: Leon Zhang <leon.zhang@sun.com> Sun Microsystem Inc., 2003
*/
#ifndef __EA_MINICARD_H__
diff --git a/a11y/calendar/ea-cal-view-event.c b/a11y/calendar/ea-cal-view-event.c
index 9f7e694597..a85ce348c6 100644
--- a/a11y/calendar/ea-cal-view-event.c
+++ b/a11y/calendar/ea-cal-view-event.c
@@ -114,7 +114,7 @@ ea_cal_view_event_get_type (void)
g_type_add_interface_static (type, ATK_TYPE_ACTION,
&atk_action_info);
-
+
}
return type;
@@ -164,7 +164,7 @@ static void ea_cal_view_finalize (GObject *object)
}
#endif
-AtkObject*
+AtkObject*
ea_cal_view_event_new (GObject *obj)
{
AtkObject *atk_obj = NULL;
@@ -262,21 +262,21 @@ ea_cal_view_event_get_name (AtkObject *accessible)
alarm_string = recur_string = meeting_string = "";
if (event && event->comp_data) {
- if (e_cal_util_component_has_alarms (event->comp_data->icalcomp))
+ if (e_cal_util_component_has_alarms (event->comp_data->icalcomp))
alarm_string = _("It has alarms.");
- if (e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
+ if (e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
recur_string = _("It has recurrences.");
- if (e_cal_util_component_has_organizer (event->comp_data->icalcomp))
+ if (e_cal_util_component_has_organizer (event->comp_data->icalcomp))
meeting_string = _("It is a meeting.");
-
+
}
summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- if (summary)
+ if (summary)
summary_string = g_strdup_printf (_("Calendar Event: Summary is %s."), summary);
- else
+ else
summary_string = g_strdup (_("Calendar Event: It has no summary."));
name_string = g_strdup_printf ("%s %s %s %s", summary_string, alarm_string, recur_string, meeting_string);
@@ -410,7 +410,7 @@ ea_cal_view_event_ref_state_set (AtkObject *accessible)
/* Atk Component Interface */
-static void
+static void
atk_component_interface_init (AtkComponentIface *iface)
{
g_return_if_fail (iface != NULL);
@@ -418,7 +418,7 @@ atk_component_interface_init (AtkComponentIface *iface)
iface->get_extents = ea_cal_view_get_extents;
}
-static void
+static void
ea_cal_view_get_extents (AtkComponent *component,
gint *x,
gint *y,
diff --git a/a11y/calendar/ea-cal-view.c b/a11y/calendar/ea-cal-view.c
index ad52976ca1..9ce7a11fc8 100644
--- a/a11y/calendar/ea-cal-view.c
+++ b/a11y/calendar/ea-cal-view.c
@@ -118,7 +118,7 @@ ea_cal_view_class_init (EaCalViewClass *klass)
class->initialize = ea_cal_view_real_initialize;
}
-AtkObject*
+AtkObject*
ea_cal_view_new (GtkWidget *widget)
{
GObject *object;
@@ -169,7 +169,7 @@ ea_cal_view_real_initialize (AtkObject *accessible, gpointer data)
accessible);
}
-static AtkObject*
+static AtkObject*
ea_cal_view_get_parent (AtkObject *accessible)
{
ECalendarView *cal_view;
diff --git a/a11y/calendar/ea-calendar-helpers.c b/a11y/calendar/ea-calendar-helpers.c
index caf1913829..aff9f0c771 100644
--- a/a11y/calendar/ea-calendar-helpers.c
+++ b/a11y/calendar/ea-calendar-helpers.c
@@ -36,7 +36,7 @@
* ea_calendar_helpers_get_accessible_for
* @canvas_item: the canvas item for a event or a jump button
* @returns: the atk object for the canvas_item
- *
+ *
**/
AtkObject *
ea_calendar_helpers_get_accessible_for (GnomeCanvasItem *canvas_item)
@@ -71,7 +71,7 @@ ea_calendar_helpers_get_accessible_for (GnomeCanvasItem *canvas_item)
* @returns: the cal view widget if exists
*
* Get the cal view widget contains the canvas_item.
- *
+ *
**/
ECalendarView *
ea_calendar_helpers_get_cal_view_from (GnomeCanvasItem *canvas_item)
diff --git a/a11y/calendar/ea-calendar.c b/a11y/calendar/ea-calendar.c
index 8c2167fac5..be9c48d594 100644
--- a/a11y/calendar/ea-calendar.c
+++ b/a11y/calendar/ea-calendar.c
@@ -107,7 +107,7 @@ e_day_view_a11y_init (void)
EA_SET_FACTORY (e_day_view_get_type(), ea_day_view);
}
-void
+void
e_day_view_main_item_a11y_init (void)
{
EA_SET_FACTORY (e_day_view_main_item_get_type (), ea_day_view_main_item);
@@ -119,7 +119,7 @@ e_week_view_a11y_init (void)
EA_SET_FACTORY (e_week_view_get_type(), ea_week_view);
}
-void
+void
e_week_view_main_item_a11y_init (void)
{
EA_SET_FACTORY (e_week_view_main_item_get_type (), ea_week_view_main_item);
diff --git a/a11y/calendar/ea-day-view-cell.c b/a11y/calendar/ea-day-view-cell.c
index b32dc4d0f0..ec1718225a 100644
--- a/a11y/calendar/ea-day-view-cell.c
+++ b/a11y/calendar/ea-day-view-cell.c
@@ -166,7 +166,7 @@ ea_day_view_cell_class_init (EaDayViewCellClass *klass)
class->get_index_in_parent = ea_day_view_cell_get_index_in_parent;
}
-AtkObject*
+AtkObject*
ea_day_view_cell_new (GObject *obj)
{
gpointer object;
@@ -263,7 +263,7 @@ ea_day_view_cell_ref_state_set (AtkObject *obj)
if (x + width < parent_x || x > parent_x + parent_width ||
y + height < parent_y || y > parent_y + parent_height)
- /* the cell is out of the main canvas */
+ /* the cell is out of the main canvas */
;
else
atk_state_set_add_state (state_set, ATK_STATE_VISIBLE);
@@ -312,7 +312,7 @@ ea_day_view_cell_get_index_in_parent (AtkObject *accessible)
/* Atk Component Interface */
-static void
+static void
atk_component_interface_init (AtkComponentIface *iface)
{
g_return_if_fail (iface != NULL);
@@ -321,7 +321,7 @@ atk_component_interface_init (AtkComponentIface *iface)
iface->grab_focus = component_interface_grab_focus;
}
-static void
+static void
component_interface_get_extents (AtkComponent *component,
gint *x, gint *y, gint *width, gint *height,
AtkCoordType coord_type)
diff --git a/a11y/calendar/ea-day-view-main-item.c b/a11y/calendar/ea-day-view-main-item.c
index 1889b9cf17..658df70cd2 100644
--- a/a11y/calendar/ea-day-view-main-item.c
+++ b/a11y/calendar/ea-day-view-main-item.c
@@ -63,7 +63,7 @@ static gint table_interface_get_column_at_index (AtkTable *table,
static gint table_interface_get_row_at_index (AtkTable *table,
gint index);
static AtkObject* table_interface_ref_at (AtkTable *table,
- gint row,
+ gint row,
gint column);
static gint table_interface_get_n_rows (AtkTable *table);
static gint table_interface_get_n_columns (AtkTable *table);
@@ -229,7 +229,7 @@ ea_day_view_main_item_class_init (EaDayViewMainItemClass *klass)
class->get_index_in_parent = ea_day_view_main_item_get_index_in_parent;
}
-AtkObject*
+AtkObject*
ea_day_view_main_item_new (GObject *obj)
{
AtkObject *accessible;
@@ -451,7 +451,7 @@ ea_day_view_main_item_time_change_cb (EDayView *day_view, gpointer data)
"active-descendant-changed",
item_cell);
g_signal_emit_by_name (data, "selection_changed");
-
+
atk_focus_tracker_notify (item_cell);
g_object_unref (item_cell);
}
@@ -618,7 +618,7 @@ ea_day_view_main_item_destory_cell_data (EaDayViewMainItem *ea_main_item)
/* Atk Component Interface */
-static void
+static void
atk_component_interface_init (AtkComponentIface *iface)
{
g_return_if_fail (iface != NULL);
@@ -626,7 +626,7 @@ atk_component_interface_init (AtkComponentIface *iface)
iface->get_extents = component_interface_get_extents;
}
-static void
+static void
component_interface_get_extents (AtkComponent *component,
gint *x, gint *y, gint *width, gint *height,
AtkCoordType coord_type)
@@ -654,7 +654,7 @@ component_interface_get_extents (AtkComponent *component,
/* atk table interface */
-static void
+static void
atk_table_interface_init (AtkTableIface *iface)
{
g_return_if_fail (iface != NULL);
@@ -687,9 +687,9 @@ atk_table_interface_init (AtkTableIface *iface)
iface->get_column_description = table_interface_get_column_description;
}
-static AtkObject*
+static AtkObject*
table_interface_ref_at (AtkTable *table,
- gint row,
+ gint row,
gint column)
{
gint index;
@@ -700,7 +700,7 @@ table_interface_ref_at (AtkTable *table,
return ea_day_view_main_item_ref_child (ATK_OBJECT (ea_main_item), index);
}
-static gint
+static gint
table_interface_get_n_rows (AtkTable *table)
{
AtkGObjectAccessible *atk_gobj;
@@ -720,7 +720,7 @@ table_interface_get_n_rows (AtkTable *table)
return day_view->rows;
}
-static gint
+static gint
table_interface_get_n_columns (AtkTable *table)
{
AtkGObjectAccessible *atk_gobj;
@@ -787,7 +787,7 @@ table_interface_get_column_extent_at (AtkTable *table,
return width;
}
-static gint
+static gint
table_interface_get_row_extent_at (AtkTable *table,
gint row,
gint column)
@@ -808,7 +808,7 @@ table_interface_get_row_extent_at (AtkTable *table,
return height;
}
-static gboolean
+static gboolean
table_interface_is_row_selected (AtkTable *table,
gint row)
{
@@ -838,16 +838,16 @@ table_interface_is_row_selected (AtkTable *table,
return FALSE;
}
-static gboolean
-table_interface_is_selected (AtkTable *table,
- gint row,
+static gboolean
+table_interface_is_selected (AtkTable *table,
+ gint row,
gint column)
{
return table_interface_is_row_selected (table, row) &&
table_interface_is_column_selected (table, column);
}
-static gboolean
+static gboolean
table_interface_is_column_selected (AtkTable *table,
gint column)
{
@@ -871,7 +871,7 @@ table_interface_is_column_selected (AtkTable *table,
return FALSE;
}
-static gint
+static gint
table_interface_get_selected_rows (AtkTable *table,
gint **rows_selected)
{
@@ -912,7 +912,7 @@ table_interface_get_selected_rows (AtkTable *table,
return n_rows;
}
-static gint
+static gint
table_interface_get_selected_columns (AtkTable *table,
gint **columns_selected)
{
@@ -946,8 +946,8 @@ table_interface_get_selected_columns (AtkTable *table,
return n_columns;
}
-static gboolean
-table_interface_add_row_selection (AtkTable *table,
+static gboolean
+table_interface_add_row_selection (AtkTable *table,
gint row)
{
AtkGObjectAccessible *atk_gobj;
@@ -979,15 +979,15 @@ table_interface_add_row_selection (AtkTable *table,
return TRUE;
}
-static gboolean
-table_interface_remove_row_selection (AtkTable *table,
+static gboolean
+table_interface_remove_row_selection (AtkTable *table,
gint row)
{
return FALSE;
}
-static gboolean
-table_interface_add_column_selection (AtkTable *table,
+static gboolean
+table_interface_add_column_selection (AtkTable *table,
gint column)
{
AtkGObjectAccessible *atk_gobj;
@@ -1016,24 +1016,24 @@ table_interface_add_column_selection (AtkTable *table,
return TRUE;
}
-static gboolean
-table_interface_remove_column_selection (AtkTable *table,
+static gboolean
+table_interface_remove_column_selection (AtkTable *table,
gint column)
{
/* FIXME: NOT IMPLEMENTED */
return FALSE;
}
-static AtkObject*
-table_interface_get_row_header (AtkTable *table,
+static AtkObject*
+table_interface_get_row_header (AtkTable *table,
gint row)
{
/* FIXME: NOT IMPLEMENTED */
return NULL;
}
-static AtkObject*
-table_interface_get_column_header (AtkTable *table,
+static AtkObject*
+table_interface_get_column_header (AtkTable *table,
gint in_col)
{
/* FIXME: NOT IMPLEMENTED */
@@ -1202,7 +1202,7 @@ selection_interface_clear_selection (AtkSelection *selection)
return TRUE;
}
-static AtkObject*
+static AtkObject*
selection_interface_ref_selection (AtkSelection *selection, gint i)
{
gint count;
diff --git a/a11y/calendar/ea-day-view.c b/a11y/calendar/ea-day-view.c
index 8a397c8fe2..66537c0f3f 100644
--- a/a11y/calendar/ea-day-view.c
+++ b/a11y/calendar/ea-day-view.c
@@ -100,7 +100,7 @@ ea_day_view_class_init (EaDayViewClass *klass)
class->ref_child = ea_day_view_ref_child;
}
-AtkObject*
+AtkObject*
ea_day_view_new (GtkWidget *widget)
{
GObject *object;
@@ -146,24 +146,24 @@ ea_day_view_get_name (AtkObject *accessible)
/* the child main item is always there */
--n_events;
if (n_events >= 1)
- /* To translators: Here, "It" is either like "Work Week View: July
+ /* To translators: Here, "It" is either like "Work Week View: July
10th - July 14th, 2006." or "Day View: Thursday July 13th, 2006." */
event_str = g_strdup_printf (ngettext ("It has %d event.", "It has %d events.", n_events), n_events);
else
- /* To translators: Here, "It" is either like "Work Week View: July
+ /* To translators: Here, "It" is either like "Work Week View: July
10th - July 14th, 2006." or "Day View: Thursday July 13th, 2006." */
event_str = g_strdup (_("It has no events."));
view_type = gnome_calendar_get_view (gcal);
if (view_type == GNOME_CAL_WORK_WEEK_VIEW)
- /* To translators: First %s is the week, for example "July 10th -
- July 14th, 2006". Second %s is the number of events in this work
+ /* To translators: First %s is the week, for example "July 10th -
+ July 14th, 2006". Second %s is the number of events in this work
week, for example "It has %d event/events." or "It has no events." */
name_str = g_strdup_printf (_("Work Week View: %s. %s"),
label_text, event_str);
else
- /* To translators: First %s is the day, for example "Thursday July
- 13th, 2006". Second %s is the number of events on this day, for
+ /* To translators: First %s is the day, for example "Thursday July
+ 13th, 2006". Second %s is the number of events on this day, for
example "It has %d event/events." or "It has no events." */
name_str = g_strdup_printf (_("Day View: %s. %s"),
label_text, event_str);
diff --git a/a11y/calendar/ea-gnome-calendar.c b/a11y/calendar/ea-gnome-calendar.c
index 509d515f2d..6de483f952 100644
--- a/a11y/calendar/ea-gnome-calendar.c
+++ b/a11y/calendar/ea-gnome-calendar.c
@@ -100,7 +100,7 @@ ea_gnome_calendar_class_init (EaGnomeCalendarClass *klass)
class->ref_child = ea_gnome_calendar_ref_child;
}
-AtkObject*
+AtkObject*
ea_gnome_calendar_new (GtkWidget *widget)
{
GObject *object;
diff --git a/a11y/calendar/ea-jump-button.c b/a11y/calendar/ea-jump-button.c
index 45dcc3fe06..2d239091a9 100644
--- a/a11y/calendar/ea-jump-button.c
+++ b/a11y/calendar/ea-jump-button.c
@@ -110,7 +110,7 @@ ea_jump_button_class_init (EaJumpButtonClass *klass)
class->get_description = ea_jump_button_get_description;
}
-AtkObject*
+AtkObject*
ea_jump_button_new (GObject *obj)
{
AtkObject *atk_obj = NULL;
@@ -197,7 +197,7 @@ jump_button_do_action (AtkAction *action,
return_value = FALSE;
break;
}
- return return_value;
+ return return_value;
}
static gint
@@ -222,5 +222,5 @@ jump_button_get_keybinding (AtkAction *action,
default:
break;
}
- return return_value;
+ return return_value;
}
diff --git a/a11y/calendar/ea-week-view-cell.c b/a11y/calendar/ea-week-view-cell.c
index b557812f4b..0ee410b5f5 100644
--- a/a11y/calendar/ea-week-view-cell.c
+++ b/a11y/calendar/ea-week-view-cell.c
@@ -167,7 +167,7 @@ ea_week_view_cell_class_init (EaWeekViewCellClass *klass)
}
-AtkObject*
+AtkObject*
ea_week_view_cell_new (GObject *obj)
{
gpointer object;
@@ -232,7 +232,7 @@ ea_week_view_cell_get_name (AtkObject *accessible)
new_column = cell->column + start_day;
new_row = cell->row;
}
-
+
column_label = atk_table_get_column_description (ATK_TABLE (ea_main_item),
new_column);
row_label = atk_table_get_row_description (ATK_TABLE (ea_main_item),
@@ -275,7 +275,7 @@ ea_week_view_cell_ref_state_set (AtkObject *obj)
if (x + width < parent_x || x > parent_x + parent_width ||
y + height < parent_y || y > parent_y + parent_height)
- /* the cell is out of the main canvas */
+ /* the cell is out of the main canvas */
;
else
atk_state_set_add_state (state_set, ATK_STATE_VISIBLE);
@@ -324,7 +324,7 @@ ea_week_view_cell_get_index_in_parent (AtkObject *accessible)
/* Atk Component Interface */
-static void
+static void
atk_component_interface_init (AtkComponentIface *iface)
{
g_return_if_fail (iface != NULL);
@@ -333,7 +333,7 @@ atk_component_interface_init (AtkComponentIface *iface)
iface->grab_focus = component_interface_grab_focus;
}
-static void
+static void
component_interface_get_extents (AtkComponent *component,
gint *x, gint *y, gint *width, gint *height,
AtkCoordType coord_type)
@@ -391,7 +391,7 @@ component_interface_get_extents (AtkComponent *component,
*y += week_view->row_offsets[cell->row*2]- scroll_y;
}
} else {
- if (start_day < 3) {
+ if (start_day < 3) {
if (cell->column < 3) {
*height = week_view->row_heights[cell->column*2]*2;
*width = week_view->col_widths[0];
@@ -438,8 +438,8 @@ component_interface_get_extents (AtkComponent *component,
*y += week_view->row_offsets[(cell->column - 1)*2]- scroll_y;
} else {
*height = week_view->row_heights[(cell->column)*2]*2;
- *width = week_view->col_widths[0];
- *x += week_view->col_offsets[0] - scroll_x;
+ *width = week_view->col_widths[0];
+ *x += week_view->col_offsets[0] - scroll_x;
*y += week_view->row_offsets[cell->column*2]- scroll_y;
}
} else {
diff --git a/a11y/calendar/ea-week-view-main-item.c b/a11y/calendar/ea-week-view-main-item.c
index 17220fd185..01c6f0236e 100644
--- a/a11y/calendar/ea-week-view-main-item.c
+++ b/a11y/calendar/ea-week-view-main-item.c
@@ -64,7 +64,7 @@ static gint table_interface_get_column_at_index (AtkTable *table,
static gint table_interface_get_row_at_index (AtkTable *table,
gint index);
static AtkObject* table_interface_ref_at (AtkTable *table,
- gint row,
+ gint row,
gint column);
static gint table_interface_get_n_rows (AtkTable *table);
static gint table_interface_get_n_columns (AtkTable *table);
@@ -183,7 +183,7 @@ ea_week_view_main_item_get_type (void)
(GInterfaceFinalizeFunc) NULL,
NULL
};
-
+
/*
* Figure out the size of the class and instance
@@ -230,7 +230,7 @@ ea_week_view_main_item_class_init (EaWeekViewMainItemClass *klass)
class->get_index_in_parent = ea_week_view_main_item_get_index_in_parent;
}
-AtkObject*
+AtkObject*
ea_week_view_main_item_new (GObject *obj)
{
AtkObject *accessible;
@@ -318,10 +318,10 @@ ea_week_view_main_item_get_n_children (AtkObject *accessible)
main_item = E_WEEK_VIEW_MAIN_ITEM (g_obj);
week_view = main_item->week_view;
-
+
if (week_view->multi_week_view)
return 7 * week_view->weeks_shown;
- else
+ else
return 7;
}
@@ -593,7 +593,7 @@ ea_week_view_main_item_destory_cell_data (EaWeekViewMainItem *ea_main_item)
/* Atk Component Interface */
-static void
+static void
atk_component_interface_init (AtkComponentIface *iface)
{
g_return_if_fail (iface != NULL);
@@ -601,7 +601,7 @@ atk_component_interface_init (AtkComponentIface *iface)
iface->get_extents = component_interface_get_extents;
}
-static void
+static void
component_interface_get_extents (AtkComponent *component,
gint *x, gint *y, gint *width, gint *height,
AtkCoordType coord_type)
@@ -629,7 +629,7 @@ component_interface_get_extents (AtkComponent *component,
/* atk table interface */
-static void
+static void
atk_table_interface_init (AtkTableIface *iface)
{
g_return_if_fail (iface != NULL);
@@ -662,9 +662,9 @@ atk_table_interface_init (AtkTableIface *iface)
iface->get_column_description = table_interface_get_column_description;
}
-static AtkObject*
+static AtkObject*
table_interface_ref_at (AtkTable *table,
- gint row,
+ gint row,
gint column)
{
gint index;
@@ -675,7 +675,7 @@ table_interface_ref_at (AtkTable *table,
return ea_week_view_main_item_ref_child (ATK_OBJECT (ea_main_item), index);
}
-static gint
+static gint
table_interface_get_n_rows (AtkTable *table)
{
AtkGObjectAccessible *atk_gobj;
@@ -695,7 +695,7 @@ table_interface_get_n_rows (AtkTable *table)
return week_view->weeks_shown;
}
-static gint
+static gint
table_interface_get_n_columns (AtkTable *table)
{
AtkGObjectAccessible *atk_gobj;
@@ -757,7 +757,7 @@ table_interface_get_column_extent_at (AtkTable *table,
return width;
}
-static gint
+static gint
table_interface_get_row_extent_at (AtkTable *table,
gint row,
gint column)
@@ -778,7 +778,7 @@ table_interface_get_row_extent_at (AtkTable *table,
return height;
}
-static gboolean
+static gboolean
table_interface_is_row_selected (AtkTable *table,
gint row)
{
@@ -808,15 +808,15 @@ table_interface_is_row_selected (AtkTable *table,
return TRUE;
}
-static gboolean
-table_interface_is_selected (AtkTable *table,
- gint row,
+static gboolean
+table_interface_is_selected (AtkTable *table,
+ gint row,
gint column)
{
return table_interface_is_row_selected (table, row) && table_interface_is_column_selected(table, column);
}
-static gboolean
+static gboolean
table_interface_is_column_selected (AtkTable *table,
gint column)
{
@@ -846,7 +846,7 @@ table_interface_is_column_selected (AtkTable *table,
}
}
-static gint
+static gint
table_interface_get_selected_rows (AtkTable *table,
gint **rows_selected)
{
@@ -881,7 +881,7 @@ table_interface_get_selected_rows (AtkTable *table,
return n_rows;
}
-static gint
+static gint
table_interface_get_selected_columns (AtkTable *table,
gint **columns_selected)
{
@@ -911,7 +911,7 @@ table_interface_get_selected_columns (AtkTable *table,
}
if (n_columns > 0 && start_column != -1 && columns_selected) {
gint index;
-
+
*columns_selected = (gint *) g_malloc (n_columns * sizeof (gint));
for (index = 0; index < n_columns; ++index)
(*columns_selected)[index] = start_column + index;
@@ -919,8 +919,8 @@ table_interface_get_selected_columns (AtkTable *table,
return n_columns;
}
-static gboolean
-table_interface_add_row_selection (AtkTable *table,
+static gboolean
+table_interface_add_row_selection (AtkTable *table,
gint row)
{
AtkGObjectAccessible *atk_gobj;
@@ -946,15 +946,15 @@ table_interface_add_row_selection (AtkTable *table,
return TRUE;
}
-static gboolean
-table_interface_remove_row_selection (AtkTable *table,
+static gboolean
+table_interface_remove_row_selection (AtkTable *table,
gint row)
{
return FALSE;
}
-static gboolean
-table_interface_add_column_selection (AtkTable *table,
+static gboolean
+table_interface_add_column_selection (AtkTable *table,
gint column)
{
AtkGObjectAccessible *atk_gobj;
@@ -980,24 +980,24 @@ table_interface_add_column_selection (AtkTable *table,
return TRUE;
}
-static gboolean
-table_interface_remove_column_selection (AtkTable *table,
+static gboolean
+table_interface_remove_column_selection (AtkTable *table,
gint column)
{
/* FIXME: NOT IMPLEMENTED */
return FALSE;
}
-static AtkObject*
-table_interface_get_row_header (AtkTable *table,
+static AtkObject*
+table_interface_get_row_header (AtkTable *table,
gint row)
{
/* FIXME: NOT IMPLEMENTED */
return NULL;
}
-static AtkObject*
-table_interface_get_column_header (AtkTable *table,
+static AtkObject*
+table_interface_get_column_header (AtkTable *table,
gint in_col)
{
/* FIXME: NOT IMPLEMENTED */
@@ -1061,7 +1061,7 @@ table_interface_get_column_description (AtkTable *table,
default:
break;
}
-
+
ea_cell_table_set_column_label (cell_data, in_col, buffer);
description = ea_cell_table_get_column_label (cell_data, in_col);
}
@@ -1179,7 +1179,7 @@ selection_interface_clear_selection (AtkSelection *selection)
return TRUE;
}
-static AtkObject*
+static AtkObject*
selection_interface_ref_selection (AtkSelection *selection, gint i)
{
gint count;
@@ -1244,7 +1244,7 @@ selection_interface_is_child_selected (AtkSelection *selection, gint i)
if ((week_view->selection_start_day <= i)&&(week_view->selection_end_day >= i))
return TRUE;
- else
+ else
return FALSE;
}
diff --git a/a11y/calendar/ea-week-view.c b/a11y/calendar/ea-week-view.c
index fb2ce7bdab..c1f1debc2b 100644
--- a/a11y/calendar/ea-week-view.c
+++ b/a11y/calendar/ea-week-view.c
@@ -101,7 +101,7 @@ ea_week_view_class_init (EaWeekViewClass *klass)
class->ref_child = ea_week_view_ref_child;
}
-AtkObject*
+AtkObject*
ea_week_view_new (GtkWidget *widget)
{
GObject *object;
@@ -273,7 +273,7 @@ ea_week_view_ref_child (AtkObject *accessible, gint index)
/* index == 0 is the main item */
atk_object = atk_gobject_accessible_for_object (G_OBJECT (week_view->main_canvas_item));
g_object_ref (atk_object);
- } else
+ } else
for (event_index = 0; event_index < max_count; ++event_index) {
EWeekViewEvent *event;
EWeekViewEventSpan *span;
diff --git a/a11y/e-table/gal-a11y-e-cell-popup.c b/a11y/e-table/gal-a11y-e-cell-popup.c
index 64e11bcf98..c0110e9dba 100644
--- a/a11y/e-table/gal-a11y-e-cell-popup.c
+++ b/a11y/e-table/gal-a11y-e-cell-popup.c
@@ -43,11 +43,11 @@ static void popup_cell_action (GalA11yECell *cell);
/**
* gal_a11y_e_cell_popup_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yECellPopup class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yECellPopup class.
**/
GType
@@ -99,7 +99,7 @@ gal_a11y_e_cell_popup_new (ETableItem *item,
if (popupcell && popupcell->popup_cell_view)
child_view = popupcell->popup_cell_view->child_view;
-
+
if (child_view && child_view->ecell) {
a11y = gal_a11y_e_cell_registry_get_object (NULL,
item,
@@ -120,7 +120,7 @@ gal_a11y_e_cell_popup_new (ETableItem *item,
}
g_return_val_if_fail (a11y != NULL, NULL);
cell = GAL_A11Y_E_CELL(a11y);
- gal_a11y_e_cell_add_action (cell,
+ gal_a11y_e_cell_add_action (cell,
_("popup"), /* action name*/
_("popup a child"), /* action description */
"<Alt>Down", /* action keybinding */
@@ -136,12 +136,12 @@ popup_cell_action (GalA11yECell *cell)
gint finished;
GdkEvent event;
- event.key.type = GDK_KEY_PRESS;
+ event.key.type = GDK_KEY_PRESS;
event.key.window = GTK_LAYOUT(GNOME_CANVAS_ITEM(cell->item)->canvas)->bin_window;;
event.key.send_event = TRUE;
event.key.time = GDK_CURRENT_TIME;
event.key.state = GDK_MOD1_MASK;
event.key.keyval = GDK_Down;
-
+
g_signal_emit_by_name (cell->item, "event", &event, &finished);
}
diff --git a/a11y/e-table/gal-a11y-e-cell-registry.c b/a11y/e-table/gal-a11y-e-cell-registry.c
index 9557ec5464..72ff48e33f 100644
--- a/a11y/e-table/gal-a11y-e-cell-registry.c
+++ b/a11y/e-table/gal-a11y-e-cell-registry.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors:
+ * Authors:
* Christopher James Lahey <clahey@ximian.com>
*
* Copyright (C) 2002 Ximian, Inc.
@@ -51,11 +51,11 @@ gal_a11y_e_cell_registry_init (GalA11yECellRegistry *registry)
/**
* gal_a11y_e_cell_registry_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yECellRegistry class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yECellRegistry class.
**/
GType
diff --git a/a11y/e-table/gal-a11y-e-cell-text.c b/a11y/e-table/gal-a11y-e-cell-text.c
index baee1c3cbc..696127ae3b 100644
--- a/a11y/e-table/gal-a11y-e-cell-text.c
+++ b/a11y/e-table/gal-a11y-e-cell-text.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors:
+ * Authors:
* Christopher James Lahey <clahey@ximian.com>
*
* Copyright (C) 2002 Ximian, Inc.
@@ -193,7 +193,7 @@ ect_get_caret_offset (AtkText *text)
gchar *full_text = e_cell_text_get_text_by_view (gaec->cell_view, gaec->model_col, gaec->row);
end = g_utf8_pointer_to_offset (full_text, full_text + end);
g_free (full_text);
-
+
return end;
}
else
@@ -261,7 +261,7 @@ ect_get_offset_at_point (AtkText *text,
}
-static gint
+static gint
ect_get_n_selections (AtkText *text)
{
GalA11yECell *gaec = GAL_A11Y_E_CELL (text);
@@ -344,7 +344,7 @@ ect_add_selection (AtkText *text,
real_start = MIN (start_offset, end_offset);
real_end = MAX (start_offset, end_offset);
-
+
real_start = MIN (MAX (0, real_start), len);
real_end = MIN (MAX (0, real_end), len);
@@ -376,7 +376,7 @@ ect_remove_selection (AtkText *text,
gaec->view_col, gaec->row,
&selection_start,
&selection_end)
- && selection_start != selection_end
+ && selection_start != selection_end
&& e_cell_text_set_selection (gaec->cell_view,
gaec->view_col, gaec->row,
selection_end, selection_end)) {
@@ -418,7 +418,7 @@ ect_set_caret_offset (AtkText *text,
offset = len;
else
offset = MIN (MAX (0, offset), len);
-
+
offset = g_utf8_offset_to_pointer (full_text, offset) - full_text;
g_free (full_text);
@@ -598,7 +598,7 @@ ect_class_init (GalA11yECellTextClass *klass)
{
AtkObjectClass *a11y = ATK_OBJECT_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+
parent_class = g_type_class_ref (PARENT_TYPE);
a11y->get_name = ect_get_name;
object_class->dispose = ect_dispose;
@@ -619,11 +619,11 @@ ect_action_init (GalA11yECellText *a11y)
/**
* gal_a11y_e_cell_text_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yECellText class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yECellText class.
**/
GType
@@ -670,7 +670,7 @@ static void
cell_text_destroyed (gpointer data)
{
g_return_if_fail (GAL_A11Y_IS_E_CELL_TEXT (data));
-
+
g_object_unref (data);
}
@@ -685,7 +685,7 @@ gal_a11y_e_cell_text_new (ETableItem *item,
AtkObject *a11y;
GalA11yECell *gaec;
GalA11yECellText *gaet;
- ECellText *ect;
+ ECellText *ect;
a11y = g_object_new (gal_a11y_e_cell_text_get_type (), NULL);
@@ -701,9 +701,9 @@ gal_a11y_e_cell_text_new (ETableItem *item,
/* will be unrefed in cell_text_destroyed */
g_object_ref (a11y);
- gaet->inserted_id = g_signal_connect (E_CELL_TEXT (((ECellView *)cell_view)->ecell),
+ gaet->inserted_id = g_signal_connect (E_CELL_TEXT (((ECellView *)cell_view)->ecell),
"text_inserted", G_CALLBACK (ect_text_inserted_cb), a11y);
- gaet->deleted_id = g_signal_connect (E_CELL_TEXT (((ECellView *)cell_view)->ecell),
+ gaet->deleted_id = g_signal_connect (E_CELL_TEXT (((ECellView *)cell_view)->ecell),
"text_deleted", G_CALLBACK (ect_text_deleted_cb), a11y);
g_object_weak_ref (G_OBJECT (((ECellView *)cell_view)->ecell),
diff --git a/a11y/e-table/gal-a11y-e-cell-toggle.c b/a11y/e-table/gal-a11y-e-cell-toggle.c
index 6d1bbfd45e..8f994adeae 100644
--- a/a11y/e-table/gal-a11y-e-cell-toggle.c
+++ b/a11y/e-table/gal-a11y-e-cell-toggle.c
@@ -47,18 +47,18 @@ gal_a11y_e_cell_toggle_get_type (void)
NULL, /* instance init */
NULL /* value table */
};
-
+
type = g_type_register_static (GAL_A11Y_TYPE_E_CELL,
"GalA11yECellToggle", &tinfo, 0);
gal_a11y_e_cell_type_add_action_interface (type);
-
+
}
return type;
}
-static void
+static void
gal_a11y_e_cell_toggle_class_init (GalA11yECellToggleClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -118,7 +118,7 @@ model_change_cb (ETableModel *etm,
}
-AtkObject*
+AtkObject*
gal_a11y_e_cell_toggle_new (ETableItem *item,
ECellView *cell_view,
AtkObject *parent,
@@ -147,7 +147,7 @@ gal_a11y_e_cell_toggle_new (ETableItem *item,
view_col,
row);
- gal_a11y_e_cell_add_action (cell,
+ gal_a11y_e_cell_add_action (cell,
_("toggle"), /* action name*/
_("toggle the cell"), /* action description */
NULL, /* action keybinding */
diff --git a/a11y/e-table/gal-a11y-e-cell-tree.c b/a11y/e-table/gal-a11y-e-cell-tree.c
index abc0c67ddb..a4b68b89ab 100644
--- a/a11y/e-table/gal-a11y-e-cell-tree.c
+++ b/a11y/e-table/gal-a11y-e-cell-tree.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors:
+ * Authors:
* Tim Wo <tim.wo@sun.com>, Sun Microsystem Inc. 2003.
*
* Copyright (C) 2002 Ximian, Inc.
@@ -89,7 +89,7 @@ ectr_do_action_expand (AtkAction *action)
ETreePath node;
ETreeModel *tree_model;
ETreeTableAdapter *tree_table_adapter;
-
+
a11y = GAL_A11Y_E_CELL (action);
table_model = a11y->item->table_model;
node = e_table_model_value_at (table_model, -1, a11y->row);
@@ -112,7 +112,7 @@ ectr_do_action_collapse (AtkAction *action)
ETreePath node;
ETreeModel *tree_model;
ETreeTableAdapter *tree_table_adapter;
-
+
a11y = GAL_A11Y_E_CELL (action);
table_model = a11y->item->table_model;
node = e_table_model_value_at (table_model, -1, a11y->row);
@@ -178,7 +178,7 @@ gal_a11y_e_cell_tree_new (ETableItem *item,
ETreePath node;
ETreeModel *tree_model;
ETreeTableAdapter *tree_table_adapter;
-
+
ECellView *subcell_view;
subcell_view = e_cell_tree_view_get_subcell_view (cell_view);
diff --git a/a11y/e-table/gal-a11y-e-cell-vbox.c b/a11y/e-table/gal-a11y-e-cell-vbox.c
index caed5d4fc2..268dc51691 100644
--- a/a11y/e-table/gal-a11y-e-cell-vbox.c
+++ b/a11y/e-table/gal-a11y-e-cell-vbox.c
@@ -46,7 +46,7 @@ subcell_destroyed (gpointer data)
GalA11yECell *cell;
AtkObject *parent;
GalA11yECellVbox *gaev;
-
+
g_return_if_fail (GAL_A11Y_IS_E_CELL (data));
cell = GAL_A11Y_E_CELL (data);
@@ -199,9 +199,9 @@ gal_a11y_e_cell_vbox_get_type (void)
AtkObject *gal_a11y_e_cell_vbox_new (ETableItem *item,
ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
+ AtkObject *parent,
+ int model_col,
+ int view_col,
int row)
{
AtkObject *a11y;
@@ -210,13 +210,13 @@ AtkObject *gal_a11y_e_cell_vbox_new (ETableItem *item,
ECellVboxView *ecvv;
a11y = g_object_new (gal_a11y_e_cell_vbox_get_type (), NULL);
-
+
gal_a11y_e_cell_construct (a11y, item, cell_view, parent, model_col, view_col, row);
gaec = GAL_A11Y_E_CELL (a11y);
gaev = GAL_A11Y_E_CELL_VBOX (a11y);
ecvv = (ECellVboxView *) (gaec->cell_view);
- gaev->a11y_subcell_count = ecvv->subcell_view_count;
+ gaev->a11y_subcell_count = ecvv->subcell_view_count;
gaev->a11y_subcells = g_malloc0 (sizeof(AtkObject *)*gaev->a11y_subcell_count);
return a11y;
}
diff --git a/a11y/e-table/gal-a11y-e-cell-vbox.h b/a11y/e-table/gal-a11y-e-cell-vbox.h
index 121db71671..32a199c05a 100644
--- a/a11y/e-table/gal-a11y-e-cell-vbox.h
+++ b/a11y/e-table/gal-a11y-e-cell-vbox.h
@@ -53,9 +53,9 @@ struct _GalA11yECellVboxClass
GType gal_a11y_e_cell_vbox_get_type (void);
AtkObject *gal_a11y_e_cell_vbox_new (ETableItem *item,
ECellView *cell_view,
- AtkObject *parent,
- int model_col,
- int view_col,
+ AtkObject *parent,
+ int model_col,
+ int view_col,
int row);
#ifdef __cplusplus
diff --git a/a11y/e-table/gal-a11y-e-cell.c b/a11y/e-table/gal-a11y-e-cell.c
index c19622d2b5..f6372eedc4 100644
--- a/a11y/e-table/gal-a11y-e-cell.c
+++ b/a11y/e-table/gal-a11y-e-cell.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors:
+ * Authors:
* Christopher James Lahey <clahey@ximian.com>
*
* Copyright (C) 2002 Ximian, Inc.
@@ -42,9 +42,9 @@ unref_cell (gpointer user_data, GObject *obj_loc)
a11y->cell_view = NULL;
g_object_unref (a11y);
}
-#endif
+#endif
-static gboolean
+static gboolean
is_valid (AtkObject *cell)
{
GalA11yECell *a11y = GAL_A11Y_E_CELL (cell);
@@ -113,7 +113,7 @@ gal_a11y_e_cell_ref_state_set (AtkObject *accessible)
GalA11yECell *cell = GAL_A11Y_E_CELL (accessible);
g_return_val_if_fail (cell->state_set, NULL);
-
+
g_object_ref(cell->state_set);
return cell->state_set;
@@ -193,10 +193,10 @@ gal_a11y_e_cell_grab_focus (AtkComponent *component)
a11yTableItem = GAL_A11Y_E_TABLE_ITEM (a11y->parent);
index = atk_object_get_index_in_parent (ATK_OBJECT (a11y));
-
+
atk_selection_clear_selection (ATK_SELECTION (a11yTableItem));
atk_selection_add_selection (ATK_SELECTION (a11yTableItem), index);
-
+
gtk_widget_grab_focus (GTK_WIDGET (GNOME_CANVAS_ITEM (a11y->item)->canvas));
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (GNOME_CANVAS_ITEM (a11y->item)->canvas));
if (toplevel && GTK_WIDGET_TOPLEVEL (toplevel))
@@ -256,7 +256,7 @@ _gal_a11y_e_cell_get_action_info (GalA11yECell *cell,
gint index)
{
GList *list_node;
-
+
g_return_val_if_fail (GAL_A11Y_IS_E_CELL (cell), NULL);
if (cell->action_list == NULL)
return NULL;
@@ -290,7 +290,7 @@ gal_a11y_e_cell_add_action ( GalA11yECell * cell,
ActionInfo *info;
g_return_val_if_fail (GAL_A11Y_IS_E_CELL (cell), FALSE);
info = g_new (ActionInfo, 1);
-
+
if (action_name != NULL)
info->name = g_strdup (action_name);
else
@@ -333,7 +333,7 @@ gal_a11y_e_cell_remove_action_by_name (GalA11yECell *cell,
{
GList *list_node;
gboolean action_found= FALSE;
-
+
g_return_val_if_fail (GAL_A11Y_IS_E_CELL (cell), FALSE);
for (list_node = cell->action_list; list_node && !action_found;
list_node = list_node->next) {
@@ -366,7 +366,7 @@ gal_a11y_e_cell_action_get_name (AtkAction *action,
{
GalA11yECell *cell = GAL_A11Y_E_CELL(action);
ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
-
+
if (info == NULL)
return NULL;
return info->name;
@@ -391,7 +391,7 @@ gal_a11y_e_cell_action_set_description (AtkAction *action,
{
GalA11yECell *cell = GAL_A11Y_E_CELL(action);
ActionInfo *info = _gal_a11y_e_cell_get_action_info (cell, index);
-
+
if (info == NULL)
return FALSE;
g_free (info->description);
@@ -410,7 +410,7 @@ gal_a11y_e_cell_action_get_keybinding (AtkAction *action,
return info->keybinding;
}
-
+
static gboolean
idle_do_action (gpointer data)
{
@@ -424,7 +424,7 @@ idle_do_action (gpointer data)
cell->action_idle_handler = 0;
cell->action_func (cell);
g_object_unref (cell);
-
+
return FALSE;
}
@@ -454,7 +454,7 @@ static void
gal_a11y_e_cell_atk_action_interface_init (AtkActionIface *iface)
{
g_return_if_fail (iface != NULL);
-
+
iface->get_n_actions = gal_a11y_e_cell_action_get_n_actions;
iface->do_action = gal_a11y_e_cell_action_do_action;
iface->get_name = gal_a11y_e_cell_action_get_name;
@@ -484,17 +484,17 @@ gal_a11y_e_cell_add_state (GalA11yECell *cell,
{
if (!atk_state_set_contains_state (cell->state_set, state_type)) {
gboolean rc;
-
+
rc = atk_state_set_add_state (cell->state_set, state_type);
/*
* The signal should only be generated if the value changed,
* not when the cell is set up. So states that are set
* initially should pass FALSE as the emit_signal argument.
*/
-
+
if (emit_signal) {
atk_object_notify_state_change (ATK_OBJECT (cell), state_type, TRUE);
- /* If state_type is ATK_STATE_VISIBLE, additional
+ /* If state_type is ATK_STATE_VISIBLE, additional
notification */
if (state_type == ATK_STATE_VISIBLE)
g_signal_emit_by_name (cell, "visible_data_changed");
@@ -513,7 +513,7 @@ gal_a11y_e_cell_remove_state (GalA11yECell *cell,
{
if (atk_state_set_contains_state (cell->state_set, state_type)) {
gboolean rc;
-
+
rc = atk_state_set_remove_state (cell->state_set, state_type);
/*
* The signal should only be generated if the value changed,
@@ -536,11 +536,11 @@ gal_a11y_e_cell_remove_state (GalA11yECell *cell,
/**
* gal_a11y_e_cell_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yECell class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yECell class.
**/
GType
@@ -616,14 +616,14 @@ gal_a11y_e_cell_construct (AtkObject *object,
ATK_OBJECT (a11y) ->role = ATK_ROLE_TABLE_CELL;
if (item)
- g_object_ref (G_OBJECT (item));
+ g_object_ref (G_OBJECT (item));
#if 0
if (parent)
g_object_ref (parent);
if (cell_view)
- g_object_ref (G_OBJECT (cell_view));
+ g_object_ref (G_OBJECT (cell_view));
#endif
diff --git a/a11y/e-table/gal-a11y-e-cell.h b/a11y/e-table/gal-a11y-e-cell.h
index b3f5ef3277..48da764102 100644
--- a/a11y/e-table/gal-a11y-e-cell.h
+++ b/a11y/e-table/gal-a11y-e-cell.h
@@ -74,16 +74,16 @@ void gal_a11y_e_cell_construct (AtkObject *object,
int row);
void gal_a11y_e_cell_type_add_action_interface (GType type);
-
+
gboolean gal_a11y_e_cell_add_action (GalA11yECell *cell,
const gchar *action_name,
const gchar *action_description,
const gchar *action_keybinding,
ACTION_FUNC action_func);
-
+
gboolean gal_a11y_e_cell_remove_action (GalA11yECell *cell,
gint action_id);
-
+
gboolean gal_a11y_e_cell_remove_action_by_name (GalA11yECell *cell,
const gchar *action_name);
diff --git a/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c b/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
index ab98b4a10b..2dfa2cb1c4 100644
--- a/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
+++ b/a11y/e-table/gal-a11y-e-table-click-to-add-factory.c
@@ -57,11 +57,11 @@ gal_a11y_e_table_click_to_add_factory_init (GalA11yETableClickToAddFactory *fact
/**
* gal_a11y_e_table_factory_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yETableFactory class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yETableFactory class.
**/
GType
diff --git a/a11y/e-table/gal-a11y-e-table-click-to-add.c b/a11y/e-table/gal-a11y-e-table-click-to-add.c
index 819946cbbb..a4905971de 100644
--- a/a11y/e-table/gal-a11y-e-table-click-to-add.c
+++ b/a11y/e-table/gal-a11y-e-table-click-to-add.c
@@ -70,14 +70,14 @@ idle_do_action (gpointer data)
event.x = 0;
event.y = 0;
-
+
event.type = GDK_BUTTON_PRESS;
event.window = GTK_LAYOUT(GNOME_CANVAS_ITEM(etcta)->canvas)->bin_window;
event.button = 1;
event.send_event = TRUE;
event.time = GDK_CURRENT_TIME;
event.axes = NULL;
-
+
g_signal_emit_by_name (etcta, "event", &event, &finished);
return FALSE;
@@ -97,7 +97,7 @@ static void
atk_action_interface_init (AtkActionIface *iface)
{
g_return_if_fail (iface != NULL);
-
+
iface->do_action = etcta_do_action;
iface->get_n_actions = etcta_get_n_actions;
iface->get_description = etcta_get_description;
@@ -184,11 +184,11 @@ etcta_init (GalA11yETableClickToAdd *a11y)
/**
* gal_a11y_e_table_click_to_add_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yETableClickToAdd class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yETableClickToAdd class.
**/
GType
@@ -222,9 +222,9 @@ gal_a11y_e_table_click_to_add_get_type (void)
parent_type = atk_object_factory_get_accessible_type (factory);
type = gal_a11y_type_register_static_with_private (PARENT_TYPE,
- "GalA11yETableClickToAdd", &info, 0,
+ "GalA11yETableClickToAdd", &info, 0,
sizeof(GalA11yETableClickToAddPrivate), &priv_offset);
-
+
g_type_add_interface_static (type, ATK_TYPE_ACTION, &atk_action_info);
}
@@ -238,7 +238,7 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e, gpointer data)
ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item);
GalA11yETableClickToAdd *a11y;
GalA11yETableClickToAddPrivate *priv;
-
+
g_return_val_if_fail (item, TRUE);
g_return_val_if_fail (GAL_A11Y_IS_E_TABLE_CLICK_TO_ADD(data), FALSE);
diff --git a/a11y/e-table/gal-a11y-e-table-column-header.c b/a11y/e-table/gal-a11y-e-table-column-header.c
index 3303978a65..5f060e9cde 100644
--- a/a11y/e-table/gal-a11y-e-table-column-header.c
+++ b/a11y/e-table/gal-a11y-e-table-column-header.c
@@ -54,7 +54,7 @@ static void
gal_a11y_e_table_column_header_dispose (GObject *object)
{
GalA11yETableColumnHeader *a11y = GAL_A11Y_E_TABLE_COLUMN_HEADER (object);
- GalA11yETableColumnHeaderPrivate *priv = GET_PRIVATE (a11y);
+ GalA11yETableColumnHeaderPrivate *priv = GET_PRIVATE (a11y);
if (priv->state_set) {
g_object_unref (priv->state_set);
@@ -63,7 +63,7 @@ gal_a11y_e_table_column_header_dispose (GObject *object)
if (parent_class->dispose)
parent_class->dispose (object);
-
+
}
static void
@@ -108,7 +108,7 @@ gal_a11y_e_table_column_header_do_action (AtkAction *action,
}
else if (E_IS_TABLE (widget))
ethi = E_TABLE_HEADER_ITEM (E_TABLE (widget)->header_item);
- else
+ else
break;
ethi_change_sort_state (ethi, col);
default:
diff --git a/a11y/e-table/gal-a11y-e-table-factory.c b/a11y/e-table/gal-a11y-e-table-factory.c
index 8e207716ce..384dd40ed4 100644
--- a/a11y/e-table/gal-a11y-e-table-factory.c
+++ b/a11y/e-table/gal-a11y-e-table-factory.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors:
+ * Authors:
* Christopher James Lahey <clahey@ximian.com>
*
* Copyright (C) 2002 Ximian, Inc.
@@ -51,11 +51,11 @@ gal_a11y_e_table_factory_init (GalA11yETableFactory *factory)
/**
* gal_a11y_e_table_factory_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yETableFactory class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yETableFactory class.
**/
GType
diff --git a/a11y/e-table/gal-a11y-e-table-item-factory.c b/a11y/e-table/gal-a11y-e-table-item-factory.c
index 959de7e718..7841490e77 100644
--- a/a11y/e-table/gal-a11y-e-table-item-factory.c
+++ b/a11y/e-table/gal-a11y-e-table-item-factory.c
@@ -34,7 +34,7 @@ gal_a11y_e_table_item_factory_create_accessible (GObject *obj)
g_return_val_if_fail (E_IS_TABLE_ITEM(obj), NULL);
accessible = gal_a11y_e_table_item_new (E_TABLE_ITEM (obj));
-
+
return accessible;
}
@@ -56,11 +56,11 @@ gal_a11y_e_table_item_factory_init (GalA11yETableItemFactory *factory)
/**
* gal_a11y_e_table_factory_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yETableFactory class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yETableFactory class.
**/
GType
diff --git a/a11y/e-table/gal-a11y-e-table-item.c b/a11y/e-table/gal-a11y-e-table-item.c
index c11be59787..65c9b4ba22 100644
--- a/a11y/e-table/gal-a11y-e-table-item.c
+++ b/a11y/e-table/gal-a11y-e-table-item.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors:
+ * Authors:
* Christopher James Lahey <clahey@ximian.com>
* Bolian Yin <bolian.yin@sun.com>
*
@@ -176,7 +176,7 @@ eti_a11y_reset_focus_object (GalA11yETableItem *a11y, ETableItem *item, gboolean
} else
g_object_set_data (G_OBJECT (a11y), "gail-focus-object", NULL);
- if (notify && cell)
+ if (notify && cell)
atk_focus_tracker_notify (cell);
}
@@ -251,7 +251,7 @@ eti_get_extents (AtkComponent *component,
parent = ATK_OBJECT (component)->accessible_parent;
if (parent && ATK_IS_COMPONENT (parent))
- atk_component_get_extents (ATK_COMPONENT (parent), x, y,
+ atk_component_get_extents (ATK_COMPONENT (parent), x, y,
width, height,
coord_type);
@@ -313,7 +313,7 @@ cell_destroyed (gpointer data)
g_return_if_fail (cell->item && G_IS_OBJECT (cell->item));
if (cell->item) {
- g_object_unref (cell->item);
+ g_object_unref (cell->item);
cell->item = NULL;
}
@@ -354,7 +354,7 @@ eti_ref_at (AtkTable *table, gint row, gint column)
(GWeakNotify) cell_destroyed,
ret);
/* if current cell is focused, add FOCUSED state */
- if (e_selection_model_cursor_row (item->selection) == GAL_A11Y_E_CELL (ret)->row &&
+ if (e_selection_model_cursor_row (item->selection) == GAL_A11Y_E_CELL (ret)->row &&
e_selection_model_cursor_col (item->selection) == GAL_A11Y_E_CELL (ret)->model_col)
gal_a11y_e_cell_add_state (GAL_A11Y_E_CELL (ret), ATK_STATE_FOCUSED, FALSE);
} else
@@ -439,7 +439,7 @@ eti_get_column_extent_at (AtkTable *table,
return -1;
e_table_item_get_cell_geometry (item,
- &row,
+ &row,
&column,
NULL,
NULL,
@@ -462,7 +462,7 @@ eti_get_row_extent_at (AtkTable *table,
return -1;
e_table_item_get_cell_geometry (item,
- &row,
+ &row,
&column,
NULL,
NULL,
@@ -537,7 +537,7 @@ eti_get_summary (AtkTable *table)
return NULL;
}
-static gboolean
+static gboolean
table_is_row_selected (AtkTable *table, gint row)
{
ETableItem *item;
@@ -556,7 +556,7 @@ table_is_row_selected (AtkTable *table, gint row)
return e_selection_model_is_row_selected(item->selection, view_to_model_row (item, row));
}
-static gboolean
+static gboolean
table_is_selected (AtkTable *table, gint row, gint column)
{
return table_is_row_selected (table, row);
@@ -591,7 +591,7 @@ table_get_selected_rows (AtkTable *table, gint **rows_selected)
return n_selected;
}
-static gboolean
+static gboolean
table_add_row_selection (AtkTable *table, gint row)
{
ETableItem *item;
@@ -608,7 +608,7 @@ table_add_row_selection (AtkTable *table, gint row)
return TRUE;
}
-static gboolean
+static gboolean
table_remove_row_selection (AtkTable *table, gint row)
{
ETableItem *item;
@@ -662,7 +662,7 @@ eti_atk_component_iface_init (AtkComponentIface *iface)
}
static void
-eti_rows_inserted (ETableModel * model, int row, int count,
+eti_rows_inserted (ETableModel * model, int row, int count,
AtkObject * table_item)
{
gint n_cols,n_rows,i,j;
@@ -676,11 +676,11 @@ eti_rows_inserted (ETableModel * model, int row, int count,
n_rows = atk_table_get_n_rows (ATK_TABLE(table_item));
old_nrows = GET_PRIVATE(item_a11y)->rows;
-
+
g_return_if_fail (n_cols > 0 && n_rows > 0);
g_return_if_fail (old_nrows == n_rows - count);
- GET_PRIVATE(table_item)->rows = n_rows;
+ GET_PRIVATE(table_item)->rows = n_rows;
g_signal_emit_by_name (table_item, "row-inserted", row,
count, NULL);
@@ -697,12 +697,12 @@ eti_rows_inserted (ETableModel * model, int row, int count,
}
static void
-eti_rows_deleted (ETableModel * model, int row, int count,
+eti_rows_deleted (ETableModel * model, int row, int count,
AtkObject * table_item)
{
gint i,j, n_rows, n_cols, old_nrows;
ETableItem *item = E_TABLE_ITEM (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (table_item)));
-
+
n_rows = atk_table_get_n_rows (ATK_TABLE(table_item));
n_cols = atk_table_get_n_columns (ATK_TABLE(table_item));
@@ -748,7 +748,7 @@ enum {
ETI_HEADER_NEW_ADDED,
ETI_HEADER_REMOVED,
};
-
+
/*
* 1. Check what actually happened: column reorder, remove or add
* 2. Update cache
@@ -757,17 +757,17 @@ enum {
static void
eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
{
-
+
gboolean reorder_found=FALSE, added_found=FALSE, removed_found=FALSE;
GalA11yETableItem * a11y_item;
ETableCol ** cols, **prev_cols;
GalA11yETableItemPrivate *priv;
gint *state = NULL, *prev_state = NULL, *reorder = NULL;
gint i,j,n_rows,n_cols, prev_n_cols;
-
+
a11y_item = GAL_A11Y_E_TABLE_ITEM (a11y);
priv = GET_PRIVATE (a11y_item);
-
+
/* Assume rows do not changed. */
n_rows = priv->rows;
@@ -776,9 +776,9 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
cols = e_table_header_get_columns (eth);
n_cols = eth->col_count;
-
+
g_return_if_fail (cols && prev_cols && n_cols > 0);
-
+
/* Init to ETI_HEADER_UNCHANGED. */
state = g_malloc0 (sizeof (gint) * n_cols);
prev_state = g_malloc0 (sizeof (gint) * prev_n_cols);
@@ -799,7 +799,7 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
break;
}
}
-
+
/* cols[i] is new added column. */
if ( j == prev_n_cols ) {
added_found = TRUE;
@@ -812,7 +812,7 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
for (j = 0 ; j < n_cols && cols[j]; j ++)
if ( prev_cols [j] == cols[i] )
break;
-
+
/* Removed columns found. */
if ( j == n_cols ) {
removed_found = TRUE;
@@ -861,7 +861,7 @@ eti_header_structure_changed (ETableHeader *eth, AtkObject *a11y)
static void
-eti_real_initialize (AtkObject *obj,
+eti_real_initialize (AtkObject *obj,
gpointer data)
{
ETableItem * eti;
@@ -940,11 +940,11 @@ static void eti_a11y_cursor_changed_cb (ESelectionModel *selection,
/**
* gal_a11y_e_table_item_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yETableItem class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yETableItem class.
**/
GType
@@ -1029,7 +1029,7 @@ gal_a11y_e_table_item_new (ETableItem *item)
GET_PRIVATE (a11y)->cols = item->cols;
GET_PRIVATE (a11y)->rows = item->rows;
- GET_PRIVATE (a11y)->columns = e_table_header_get_columns (item->header);
+ GET_PRIVATE (a11y)->columns = e_table_header_get_columns (item->header);
if ( GET_PRIVATE (a11y)->columns == NULL)
return NULL;
@@ -1058,7 +1058,7 @@ gal_a11y_e_table_item_new (ETableItem *item)
accessible->role = ATK_ROLE_TREE_TABLE;
} else if (E_IS_TABLE (GET_PRIVATE (a11y)->widget)) {
accessible->role = ATK_ROLE_TABLE;
- }
+ }
}
if (item)
@@ -1181,7 +1181,7 @@ eti_a11y_cursor_changed_cb (ESelectionModel *selection,
g_return_if_fail (GAL_A11Y_IS_E_TABLE_ITEM (a11y));
- if (atk_state_set_contains_state (priv->state_set, ATK_STATE_DEFUNCT))
+ if (atk_state_set_contains_state (priv->state_set, ATK_STATE_DEFUNCT))
return;
item = E_TABLE_ITEM (eti_a11y_get_gobject (ATK_OBJECT (a11y)));
diff --git a/a11y/e-table/gal-a11y-e-table.c b/a11y/e-table/gal-a11y-e-table.c
index 56cfdbd2f0..056b95775f 100644
--- a/a11y/e-table/gal-a11y-e-table.c
+++ b/a11y/e-table/gal-a11y-e-table.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors:
+ * Authors:
* Christopher James Lahey <clahey@ximian.com>
*
* Copyright (C) 2002 Ximian, Inc.
@@ -67,7 +67,7 @@ eti_get_accessible (ETableItem *eti, AtkObject *parent)
return a11y;
}
-static gboolean
+static gboolean
init_child_item (GalA11yETable *a11y)
{
ETable *table;
@@ -123,7 +123,7 @@ et_get_n_children (AtkObject *accessible)
n = g_list_length (etgc->children);
}
}
-
+
if (et && et->use_click_to_add && et->click_to_add) {
n++;
}
@@ -212,11 +212,11 @@ et_init (GalA11yETable *a11y)
/**
* gal_a11y_e_table_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yETable class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yETable class.
**/
GType
@@ -282,7 +282,7 @@ gal_a11y_e_table_new (GObject *widget)
return ATK_OBJECT (a11y);
}
-void
+void
gal_a11y_e_table_init (void)
{
if (atk_get_root ())
diff --git a/a11y/e-table/gal-a11y-e-tree-factory.c b/a11y/e-table/gal-a11y-e-tree-factory.c
index d5c7f80669..031220d46a 100644
--- a/a11y/e-table/gal-a11y-e-tree-factory.c
+++ b/a11y/e-table/gal-a11y-e-tree-factory.c
@@ -49,11 +49,11 @@ gal_a11y_e_tree_factory_init (GalA11yETreeFactory *factory)
/**
* gal_a11y_e_tree_factory_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yETreeFactory class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yETreeFactory class.
**/
GType
diff --git a/a11y/e-table/gal-a11y-e-tree.c b/a11y/e-table/gal-a11y-e-tree.c
index 6ad507a4f3..72738ec011 100644
--- a/a11y/e-table/gal-a11y-e-tree.c
+++ b/a11y/e-table/gal-a11y-e-tree.c
@@ -106,11 +106,11 @@ et_init (GalA11yETree *a11y)
/**
* gal_a11y_e_tree_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yETree class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yETree class.
**/
GType
diff --git a/a11y/e-text/gal-a11y-e-text-factory.c b/a11y/e-text/gal-a11y-e-text-factory.c
index 732bc57af4..e124e6eb72 100644
--- a/a11y/e-text/gal-a11y-e-text-factory.c
+++ b/a11y/e-text/gal-a11y-e-text-factory.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors:
+ * Authors:
* Christopher James Lahey <clahey@ximian.com>
*
* Copyright (C) 2002 Ximian, Inc.
@@ -54,11 +54,11 @@ gal_a11y_e_text_factory_init (GalA11yETextFactory *factory)
/**
* gal_a11y_e_text_factory_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yETextFactory class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yETextFactory class.
**/
GType
diff --git a/a11y/e-text/gal-a11y-e-text.c b/a11y/e-text/gal-a11y-e-text.c
index f1a06b73dc..91628572e2 100644
--- a/a11y/e-text/gal-a11y-e-text.c
+++ b/a11y/e-text/gal-a11y-e-text.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors:
+ * Authors:
* Christopher James Lahey <clahey@ximian.com>
*
* Copyright (C) 2002 Ximian, Inc.
@@ -71,7 +71,7 @@ et_get_extents (AtkComponent *component,
if (width)
*width = real_width;
- if (height)
+ if (height)
*height = real_height;
}
@@ -195,7 +195,7 @@ find_sentence_start (const char *text,
char *at_offset;
gunichar ch;
int i;
-
+
offset = find_word_start (text, begin_offset, step);
len = g_utf8_strlen (text, -1);
@@ -645,7 +645,7 @@ et_get_offset_at_point (AtkText *text,
}
-static gint
+static gint
et_get_n_selections (AtkText *text)
{
EText *etext = E_TEXT (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (text)));
@@ -742,7 +742,7 @@ et_remove_selection (AtkText *text,
g_return_val_if_fail (E_IS_TEXT (obj), FALSE);
etext = E_TEXT (obj);
- if (selection_num == 0
+ if (selection_num == 0
&& etext->selection_start != etext->selection_end) {
etext->selection_end = etext->selection_start;
g_signal_emit_by_name (ATK_OBJECT(text), "text_selection_changed");
@@ -786,7 +786,7 @@ et_set_caret_offset (AtkText *text,
g_return_val_if_fail (E_IS_TEXT (obj), FALSE);
etext = E_TEXT (obj);
-
+
if (offset < -1)
return FALSE;
else {
@@ -1021,7 +1021,7 @@ et_real_initialize (AtkObject *obj,
if (etext->tep)
g_signal_connect_after (etext->tep, "command",
(GCallback) _et_command_cb, obj);
-
+
obj->role = ATK_ROLE_TEXT;
}
@@ -1050,11 +1050,11 @@ et_init (GalA11yEText *a11y)
/**
* gal_a11y_e_text_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the &GalA11yEText class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the &GalA11yEText class.
**/
GType
diff --git a/a11y/ea-factory.h b/a11y/ea-factory.h
index 3ce14976fe..eff20f7f45 100644
--- a/a11y/ea-factory.h
+++ b/a11y/ea-factory.h
@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*
* Author: Bolian Yin <bolian.yin@sun.com> Sun Microsystem Inc., 2003
diff --git a/a11y/gal-a11y-factory.h b/a11y/gal-a11y-factory.h
index 6cbfa99aaf..744af71173 100644
--- a/a11y/gal-a11y-factory.h
+++ b/a11y/gal-a11y-factory.h
@@ -22,7 +22,7 @@
* Authors:
* Gilbert Fang <gilbert.fang@sun.com>, Sun Microsystem Inc. 2003.
*
- * This file is mainly from the gailfactory.h of GAIL.
+ * This file is mainly from the gailfactory.h of GAIL.
*/
#ifndef _GAL_A11Y_FACTORY_H__
diff --git a/a11y/gal-a11y-util.c b/a11y/gal-a11y-util.c
index 29a9dbc37d..0d35653445 100644
--- a/a11y/gal-a11y-util.c
+++ b/a11y/gal-a11y-util.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors:
+ * Authors:
* Christopher James Lahey <clahey@ximian.com>
*
* Copyright (C) 2002 Ximian, Inc.
diff --git a/a11y/widgets/ea-calendar-cell.c b/a11y/widgets/ea-calendar-cell.c
index 0ec6f6ce8b..30a06ef426 100644
--- a/a11y/widgets/ea-calendar-cell.c
+++ b/a11y/widgets/ea-calendar-cell.c
@@ -180,7 +180,7 @@ ea_calendar_cell_init (EaCalendarCell *a11y)
atk_state_set_add_state (a11y->state_set, ATK_STATE_FOCUSABLE);
}
-AtkObject*
+AtkObject*
ea_calendar_cell_new (GObject *obj)
{
gpointer object;
@@ -298,12 +298,12 @@ ea_calendar_cell_ref_state_set (AtkObject *accessible)
g_object_ref(atk_cell->state_set);
return atk_cell->state_set;
-
+
}
/* Atk Component Interface */
-static void
+static void
atk_component_interface_init (AtkComponentIface *iface)
{
g_return_if_fail (iface != NULL);
@@ -312,7 +312,7 @@ atk_component_interface_init (AtkComponentIface *iface)
iface->grab_focus = component_interface_grab_focus;
}
-static void
+static void
component_interface_get_extents (AtkComponent *component,
gint *x, gint *y, gint *width, gint *height,
AtkCoordType coord_type)
@@ -375,10 +375,10 @@ component_interface_grab_focus (AtkComponent *component)
calitem = E_CALENDAR_ITEM (g_obj);
index = atk_object_get_index_in_parent (ATK_OBJECT (a11y));
-
+
atk_selection_clear_selection (ATK_SELECTION (ea_calitem));
atk_selection_add_selection (ATK_SELECTION (ea_calitem), index);
-
+
gtk_widget_grab_focus (GTK_WIDGET (GNOME_CANVAS_ITEM (calitem)->canvas));
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (GNOME_CANVAS_ITEM (calitem)->canvas));
if (toplevel && GTK_WIDGET_TOPLEVEL (toplevel))
diff --git a/a11y/widgets/ea-calendar-item.c b/a11y/widgets/ea-calendar-item.c
index 9def176376..585eba796d 100644
--- a/a11y/widgets/ea-calendar-item.c
+++ b/a11y/widgets/ea-calendar-item.c
@@ -57,7 +57,7 @@ static gint table_interface_get_column_at_index (AtkTable *table,
static gint table_interface_get_row_at_index (AtkTable *table,
gint index);
static AtkObject* table_interface_ref_at (AtkTable *table,
- gint row,
+ gint row,
gint column);
static gint table_interface_get_n_rows (AtkTable *table);
static gint table_interface_get_n_columns (AtkTable *table);
@@ -128,7 +128,7 @@ static gboolean ea_calendar_item_get_row_label (EaCalendarItem *ea_calitem,
static gboolean e_calendar_item_get_offset_for_date (ECalendarItem *calitem,
gint year, gint month, gint day,
gint *offset);
-static void ea_calendar_set_focus_object (EaCalendarItem *ea_calitem,
+static void ea_calendar_set_focus_object (EaCalendarItem *ea_calitem,
AtkObject *item_cell);
#ifdef ACC_DEBUG
@@ -212,7 +212,7 @@ ea_calendar_item_class_init (EaCalendarItemClass *klass)
class->ref_child = ea_calendar_item_ref_child;
}
-AtkObject*
+AtkObject*
ea_calendar_item_new (GObject *obj)
{
gpointer object;
@@ -303,7 +303,7 @@ ea_calendar_item_get_name (AtkObject *accessible)
day_end.tm_isdst = -1;
e_utf8_strftime (buffer_end, sizeof (buffer_end), _("%d %B %Y"), &day_end);
- name_str = g_strdup_printf (_("Calendar: from %s to %s"), buffer_start, buffer_end);
+ name_str = g_strdup_printf (_("Calendar: from %s to %s"), buffer_start, buffer_end);
}
#if 0
@@ -354,7 +354,7 @@ ea_calendar_item_ref_state_set (AtkObject *accessible)
atk_state_set_add_state (state_set, ATK_STATE_ENABLED);
atk_state_set_add_state (state_set, ATK_STATE_SENSITIVE);
-
+
return state_set;
}
@@ -439,7 +439,7 @@ ea_calendar_item_ref_child (AtkObject *accessible, gint index)
/* atk table interface */
-static void
+static void
atk_table_interface_init (AtkTableIface *iface)
{
g_return_if_fail (iface != NULL);
@@ -472,9 +472,9 @@ atk_table_interface_init (AtkTableIface *iface)
iface->get_column_description = table_interface_get_column_description;
}
-static AtkObject*
+static AtkObject*
table_interface_ref_at (AtkTable *table,
- gint row,
+ gint row,
gint column)
{
gint index;
@@ -484,7 +484,7 @@ table_interface_ref_at (AtkTable *table,
return ea_calendar_item_ref_child (ATK_OBJECT (ea_calitem), index);
}
-static gint
+static gint
table_interface_get_n_rows (AtkTable *table)
{
AtkGObjectAccessible *atk_gobj;
@@ -501,7 +501,7 @@ table_interface_get_n_rows (AtkTable *table)
return (n_children - 1) / EA_CALENDAR_COLUMN_NUM + 1;
}
-static gint
+static gint
table_interface_get_n_columns (AtkTable *table)
{
AtkGObjectAccessible *atk_gobj;
@@ -592,7 +592,7 @@ table_interface_get_column_extent_at (AtkTable *table,
return calitem->cell_width;
}
-static gint
+static gint
table_interface_get_row_extent_at (AtkTable *table,
gint row, gint column)
{
@@ -611,7 +611,7 @@ table_interface_get_row_extent_at (AtkTable *table,
}
/* any day in the row is selected, the row is selected */
-static gboolean
+static gboolean
table_interface_is_row_selected (AtkTable *table,
gint row)
{
@@ -661,9 +661,9 @@ table_interface_is_row_selected (AtkTable *table,
return FALSE;
}
-static gboolean
-table_interface_is_selected (AtkTable *table,
- gint row,
+static gboolean
+table_interface_is_selected (AtkTable *table,
+ gint row,
gint column)
{
AtkGObjectAccessible *atk_gobj;
@@ -710,14 +710,14 @@ table_interface_is_selected (AtkTable *table,
return FALSE;
}
-static gboolean
+static gboolean
table_interface_is_column_selected (AtkTable *table,
gint column)
{
return FALSE;
}
-static gint
+static gint
table_interface_get_selected_rows (AtkTable *table,
gint **rows_selected)
{
@@ -725,7 +725,7 @@ table_interface_get_selected_rows (AtkTable *table,
return -1;
}
-static gint
+static gint
table_interface_get_selected_columns (AtkTable *table,
gint **columns_selected)
{
@@ -733,45 +733,45 @@ table_interface_get_selected_columns (AtkTable *table,
return -1;
}
-static gboolean
-table_interface_add_row_selection (AtkTable *table,
+static gboolean
+table_interface_add_row_selection (AtkTable *table,
gint row)
{
return FALSE;
}
-static gboolean
-table_interface_remove_row_selection (AtkTable *table,
+static gboolean
+table_interface_remove_row_selection (AtkTable *table,
gint row)
{
return FALSE;
}
-static gboolean
-table_interface_add_column_selection (AtkTable *table,
+static gboolean
+table_interface_add_column_selection (AtkTable *table,
gint column)
{
return FALSE;
}
-static gboolean
-table_interface_remove_column_selection (AtkTable *table,
+static gboolean
+table_interface_remove_column_selection (AtkTable *table,
gint column)
{
/* FIXME: NOT IMPLEMENTED */
return FALSE;
}
-static AtkObject*
-table_interface_get_row_header (AtkTable *table,
+static AtkObject*
+table_interface_get_row_header (AtkTable *table,
gint row)
{
/* FIXME: NOT IMPLEMENTED */
return NULL;
}
-static AtkObject*
-table_interface_get_column_header (AtkTable *table,
+static AtkObject*
+table_interface_get_column_header (AtkTable *table,
gint in_col)
{
/* FIXME: NOT IMPLEMENTED */
@@ -920,7 +920,7 @@ selection_interface_clear_selection (AtkSelection *selection)
return TRUE;
}
-static AtkObject*
+static AtkObject*
selection_interface_ref_selection (AtkSelection *selection, gint i)
{
GObject *g_obj;
diff --git a/a11y/widgets/ea-combo-button.c b/a11y/widgets/ea-combo-button.c
index aad60c3023..8a90700f41 100644
--- a/a11y/widgets/ea-combo-button.c
+++ b/a11y/widgets/ea-combo-button.c
@@ -16,7 +16,7 @@ static GType parent_type;
/*Action IDs */
enum {
ACTIVATE_DEFAULT,
- POPUP_MENU,
+ POPUP_MENU,
LAST_ACTION
};
@@ -89,7 +89,7 @@ ea_combo_button_get_n_actions (AtkAction *action)
static void
atk_action_interface_init (AtkActionIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != NULL);
iface->do_action = ea_combo_button_do_action;
iface->get_n_actions = ea_combo_button_get_n_actions;
diff --git a/a11y/widgets/ea-expander.c b/a11y/widgets/ea-expander.c
index ebf0b67d1f..db174c37cb 100644
--- a/a11y/widgets/ea-expander.c
+++ b/a11y/widgets/ea-expander.c
@@ -134,7 +134,7 @@ ea_expander_get_type (void)
(GInterfaceFinalizeFunc) NULL,
NULL
};
-
+
factory = atk_registry_get_factory (atk_get_default_registry (), GTK_TYPE_BIN);
parent_type = atk_object_factory_get_accessible_type (factory);
g_type_query (parent_type, &query);
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c
index f430696999..24fe81d644 100644
--- a/addressbook/conduit/address-conduit.c
+++ b/addressbook/conduit/address-conduit.c
@@ -4,7 +4,7 @@
* Copyright (C) 1998 Free Software Foundation
* Copyright (C) 2000 Ximian, Inc.
*
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
+ * Authors: Eskil Heyn Olsen <deity@eskil.dk>
* JP Rosevear <jpr@ximian.com>
*
* This program is free software; you can redistribute it and/or
@@ -58,7 +58,7 @@ void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
#define LOG(x) x
#else
#define LOG(x)
-#endif
+#endif
#define WARN g_warning
#define INFO g_message
@@ -132,7 +132,7 @@ struct _EAddrLocalRecord {
static void
-addrconduit_destroy_record (EAddrLocalRecord *local)
+addrconduit_destroy_record (EAddrLocalRecord *local)
{
g_object_unref (local->contact);
free_Address (local->addr);
@@ -154,7 +154,7 @@ struct _EAddrConduitCfg {
};
static EAddrConduitCfg *
-addrconduit_load_configuration (guint32 pilot_id)
+addrconduit_load_configuration (guint32 pilot_id)
{
EAddrConduitCfg *c;
GnomePilotConduitManagement *management;
@@ -162,7 +162,7 @@ addrconduit_load_configuration (guint32 pilot_id)
gchar *address, prefix[256];
g_snprintf (prefix, 255, "/gnome-pilot.d/e-address-conduit/Pilot_%u/",
pilot_id);
-
+
c = g_new0 (EAddrConduitCfg,1);
g_assert (c != NULL);
@@ -192,7 +192,7 @@ addrconduit_load_configuration (guint32 pilot_id)
c->source_list = NULL;
}
}
-
+
c->secret = gnome_config_get_bool ("secret=FALSE");
address = gnome_config_get_string ("default_address=business");
if (!strcmp (address, "business"))
@@ -210,7 +210,7 @@ addrconduit_load_configuration (guint32 pilot_id)
}
static void
-addrconduit_save_configuration (EAddrConduitCfg *c)
+addrconduit_save_configuration (EAddrConduitCfg *c)
{
gchar prefix[256];
@@ -241,7 +241,7 @@ addrconduit_save_configuration (EAddrConduitCfg *c)
}
static EAddrConduitCfg*
-addrconduit_dupe_configuration (EAddrConduitCfg *c)
+addrconduit_dupe_configuration (EAddrConduitCfg *c)
{
EAddrConduitCfg *retval;
@@ -251,7 +251,7 @@ addrconduit_dupe_configuration (EAddrConduitCfg *c)
retval->sync_type = c->sync_type;
retval->pilot_id = c->pilot_id;
- if (c->source_list)
+ if (c->source_list)
retval->source_list = g_object_ref (c->source_list);
if (c->source)
retval->source = g_object_ref (c->source);
@@ -262,8 +262,8 @@ addrconduit_dupe_configuration (EAddrConduitCfg *c)
return retval;
}
-static void
-addrconduit_destroy_configuration (EAddrConduitCfg *c)
+static void
+addrconduit_destroy_configuration (EAddrConduitCfg *c)
{
g_return_if_fail (c != NULL);
@@ -279,17 +279,17 @@ struct _EAddrConduitGui {
};
static EAddrConduitGui *
-e_addr_gui_new (EPilotSettings *ps)
+e_addr_gui_new (EPilotSettings *ps)
{
EAddrConduitGui *gui;
GtkWidget *lbl, *menu;
gint rows, i;
static const char *items[] = {"Business", "Home", "Other", NULL};
-
+
g_return_val_if_fail (ps != NULL, NULL);
g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), NULL);
- gtk_table_resize (GTK_TABLE (ps), E_PILOT_SETTINGS_TABLE_ROWS + 1,
+ gtk_table_resize (GTK_TABLE (ps), E_PILOT_SETTINGS_TABLE_ROWS + 1,
E_PILOT_SETTINGS_TABLE_COLS);
gui = g_new0 (EAddrConduitGui, 1);
@@ -304,7 +304,7 @@ e_addr_gui_new (EPilotSettings *ps)
item = gtk_menu_item_new_with_label (items[i]);
gtk_widget_show (item);
-
+
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
}
gtk_widget_show (menu);
@@ -313,7 +313,7 @@ e_addr_gui_new (EPilotSettings *ps)
gtk_table_attach_defaults (GTK_TABLE (ps), gui->default_address, 1, 2, rows, rows + 1);
gtk_widget_show (lbl);
gtk_widget_show (gui->default_address);
-
+
return gui;
}
@@ -325,28 +325,28 @@ static const int default_address_map[] = {
};
static void
-e_addr_gui_fill_widgets (EAddrConduitGui *gui, EAddrConduitCfg *cfg)
+e_addr_gui_fill_widgets (EAddrConduitGui *gui, EAddrConduitCfg *cfg)
{
g_return_if_fail (gui != NULL);
g_return_if_fail (cfg != NULL);
- e_dialog_option_menu_set (gui->default_address,
- cfg->default_address,
+ e_dialog_option_menu_set (gui->default_address,
+ cfg->default_address,
default_address_map);
}
static void
-e_addr_gui_fill_config (EAddrConduitGui *gui, EAddrConduitCfg *cfg)
+e_addr_gui_fill_config (EAddrConduitGui *gui, EAddrConduitCfg *cfg)
{
g_return_if_fail (gui != NULL);
g_return_if_fail (cfg != NULL);
- cfg->default_address = e_dialog_option_menu_get (gui->default_address,
+ cfg->default_address = e_dialog_option_menu_get (gui->default_address,
default_address_map);
}
static void
-e_addr_gui_destroy (EAddrConduitGui *gui)
+e_addr_gui_destroy (EAddrConduitGui *gui)
{
g_free (gui);
}
@@ -359,7 +359,7 @@ struct _EAddrConduitContext {
EAddrConduitCfg *new_cfg;
EAddrConduitGui *gui;
GtkWidget *ps;
-
+
struct AddressAppInfo ai;
EBook *ebook;
@@ -372,7 +372,7 @@ struct _EAddrConduitContext {
};
static EAddrConduitContext *
-e_addr_context_new (guint32 pilot_id)
+e_addr_context_new (guint32 pilot_id)
{
EAddrConduitContext *ctxt = g_new0 (EAddrConduitContext, 1);
@@ -394,7 +394,7 @@ static void
e_addr_context_destroy (EAddrConduitContext *ctxt)
{
GList *l;
-
+
g_return_if_fail (ctxt != NULL);
if (ctxt->cfg != NULL)
@@ -403,7 +403,7 @@ e_addr_context_destroy (EAddrConduitContext *ctxt)
addrconduit_destroy_configuration (ctxt->new_cfg);
if (ctxt->gui != NULL)
e_addr_gui_destroy (ctxt->gui);
-
+
if (ctxt->ebook != NULL)
g_object_unref (ctxt->ebook);
@@ -412,13 +412,13 @@ e_addr_context_destroy (EAddrConduitContext *ctxt)
g_object_unref (l->data);
g_list_free (ctxt->cards);
}
-
+
if (ctxt->changed_hash != NULL)
g_hash_table_destroy (ctxt->changed_hash);
-
+
if (ctxt->changed != NULL)
e_book_free_change_list (ctxt->changed);
-
+
if (ctxt->locals != NULL) {
for (l = ctxt->locals; l != NULL; l = l->next)
addrconduit_destroy_record (l->data);
@@ -501,28 +501,28 @@ static char *print_remote (GnomePilotRecord *remote)
/* Utility routines */
static char *
-map_name (EAddrConduitContext *ctxt)
+map_name (EAddrConduitContext *ctxt)
{
char *filename = NULL;
-
+
filename = g_strdup_printf ("%s/.evolution/addressbook/local/system/pilot-map-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id);
-
+
return filename;
}
static GList *
-next_changed_item (EAddrConduitContext *ctxt, GList *changes)
+next_changed_item (EAddrConduitContext *ctxt, GList *changes)
{
EBookChange *ebc;
GList *l;
-
- for (l = changes; l != NULL; l = l->next) {
+
+ for (l = changes; l != NULL; l = l->next) {
ebc = l->data;
-
+
if (g_hash_table_lookup (ctxt->changed_hash, e_contact_get_const (ebc->contact, E_CONTACT_UID)))
return l;
}
-
+
return NULL;
}
@@ -531,7 +531,7 @@ get_next_mail (EContactField *field)
{
if (field == NULL)
return E_CONTACT_EMAIL_1;
-
+
switch (*field) {
case E_CONTACT_EMAIL_1:
return E_CONTACT_EMAIL_2;
@@ -549,7 +549,7 @@ get_next_home (EContactField *field)
{
if (field == NULL)
return E_CONTACT_PHONE_HOME;
-
+
switch (*field) {
case E_CONTACT_PHONE_HOME:
return E_CONTACT_PHONE_HOME_2;
@@ -565,7 +565,7 @@ get_next_work (EContactField *field)
{
if (field == NULL)
return E_CONTACT_PHONE_BUSINESS;
-
+
switch (*field) {
case E_CONTACT_PHONE_BUSINESS:
return E_CONTACT_PHONE_BUSINESS_2;
@@ -581,7 +581,7 @@ get_next_fax (EContactField *field)
{
if (field == NULL)
return E_CONTACT_PHONE_BUSINESS_FAX;
-
+
switch (*field) {
case E_CONTACT_PHONE_BUSINESS_FAX:
return E_CONTACT_PHONE_HOME_FAX;
@@ -639,7 +639,7 @@ get_next_init (EContactField *next_mail,
EContactField *next_main,
EContactField *next_pager,
EContactField *next_mobile)
-{
+{
*next_mail = get_next_mail (NULL);
*next_home = get_next_home (NULL);
*next_work = get_next_work (NULL);
@@ -655,13 +655,13 @@ is_next_done (EContactField field)
{
if (field == E_CONTACT_FIELD_LAST)
return TRUE;
-
+
return FALSE;
}
static gboolean
-is_syncable (EAddrConduitContext *ctxt, EAddrLocalRecord *local)
-{
+is_syncable (EAddrConduitContext *ctxt, EAddrLocalRecord *local)
+{
EContactField next_mail, next_home, next_work, next_fax;
EContactField next_other, next_main, next_pager, next_mobile;
gboolean syncable = TRUE;
@@ -670,15 +670,15 @@ is_syncable (EAddrConduitContext *ctxt, EAddrLocalRecord *local)
/* See if there are fields we can't sync or not in priority order */
get_next_init (&next_mail, &next_home, &next_work, &next_fax,
&next_other, &next_main, &next_pager, &next_mobile);
-
+
for (i = entryPhone1; i <= entryPhone5 && syncable; i++) {
int phonelabel = local->addr->phoneLabel[i - entryPhone1];
const char *phone_str = local->addr->entry[i];
gboolean empty = !(phone_str && *phone_str);
-
+
if (empty)
continue;
-
+
for ( ; priority_label[l] != -1; l++)
if (phonelabel == priority_label[l])
break;
@@ -687,7 +687,7 @@ is_syncable (EAddrConduitContext *ctxt, EAddrLocalRecord *local)
syncable = FALSE;
continue;
}
-
+
if (phonelabel == LABEL_EMAIL) {
if (is_next_done (next_mail) || next_mail != priority[l]) {
syncable = FALSE;
@@ -746,12 +746,12 @@ static void
set_contact_text (EContact *contact, EContactField field, struct Address address, int entry)
{
char *text = NULL;
-
+
if (address.entry[entry])
text = e_pilot_utf8_from_pchar (address.entry[entry]);
e_contact_set (contact, field, text);
-
+
g_free (text);
}
@@ -761,11 +761,11 @@ get_entry_text (struct Address address, int entry)
if (address.entry[entry])
return e_pilot_utf8_from_pchar (address.entry[entry]);
- return NULL;
+ return NULL;
}
static void
-clear_entry_text (struct Address address, int field)
+clear_entry_text (struct Address address, int field)
{
if (address.entry[field]) {
free (address.entry[field]);
@@ -782,16 +782,16 @@ compute_status (EAddrConduitContext *ctxt, EAddrLocalRecord *local, const char *
local->local.secret = FALSE;
ebc = g_hash_table_lookup (ctxt->changed_hash, uid);
-
+
if (ebc == NULL) {
local->local.attr = GnomePilotRecordNothing;
return;
}
-
+
switch (ebc->change_type) {
case E_BOOK_CHANGE_CARD_ADDED:
local->local.attr = GnomePilotRecordNew;
- break;
+ break;
case E_BOOK_CHANGE_CARD_MODIFIED:
local->local.attr = GnomePilotRecordModified;
break;
@@ -811,9 +811,9 @@ local_record_to_pilot_record (EAddrLocalRecord *local,
#else
static char record[0xffff];
#endif
-
+
g_assert (local->addr != NULL );
-
+
LOG (g_message ( "local_record_to_pilot_record\n" ));
memset (&p, 0, sizeof (GnomePilotRecord));
@@ -844,7 +844,7 @@ local_record_to_pilot_record (EAddrLocalRecord *local,
p.record = (unsigned char *)record;
p.length = pack_Address (local->addr, p.record, 0xffff);
#endif
- return p;
+ return p;
}
static void
@@ -855,7 +855,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui
EContactField field;
gboolean syncable;
int i;
-
+
g_return_if_fail (local != NULL);
g_return_if_fail (contact != NULL);
@@ -867,7 +867,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui
local->addr = g_new0 (struct Address, 1);
/* Handle the fields and category we don't sync by making sure
- * we don't overwrite them
+ * we don't overwrite them
*/
if (local->local.ID != 0) {
struct Address addr;
@@ -882,14 +882,14 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui
#else
char record[0xffff];
#endif
-
- if (dlp_ReadRecordById (ctxt->dbi->pilot_socket,
+
+ if (dlp_ReadRecordById (ctxt->dbi->pilot_socket,
ctxt->dbi->db_handle,
#ifdef PILOT_LINK_0_12
- local->local.ID, record,
+ local->local.ID, record,
NULL, NULL, &cat) > 0) {
#else
- local->local.ID, &record,
+ local->local.ID, &record,
NULL, NULL, NULL, &cat) > 0) {
#endif
local->local.category = cat;
@@ -901,14 +901,14 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui
#endif
for (i = 0; i < 5; i++) {
if (addr.entry[entryPhone1 + i])
- local->addr->entry[entryPhone1 + i] =
+ local->addr->entry[entryPhone1 + i] =
strdup (addr.entry[entryPhone1 + i]);
local->addr->phoneLabel[i] = addr.phoneLabel[i];
}
local->addr->showPhone = addr.showPhone;
for (i = 0; i < 4; i++) {
if (addr.entry[entryCustom1 + i])
- local->addr->entry[entryCustom1 + i] =
+ local->addr->entry[entryCustom1 + i] =
strdup (addr.entry[entryCustom1 + i]);
}
free_Address (&addr);
@@ -922,7 +922,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui
local->addr->entry[entryLastname] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_FAMILY_NAME));
local->addr->entry[entryCompany] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_ORG));
local->addr->entry[entryTitle] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_TITLE));
-
+
/* See if the default has something in it */
if ((address = e_contact_get (contact, ctxt->cfg->default_address))) {
field = ctxt->cfg->default_address;
@@ -933,12 +933,12 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui
break;
}
}
-
+
if (address) {
char *add;
-
+
/* If the address has 2 lines, make sure both get added */
- if (address->ext != NULL &&
+ if (address->ext != NULL &&
strlen (address->ext) > 0) {
add = g_strconcat (address->street, "\n", address->ext, NULL);
LOG (g_warning ("Address has two lines: [%s]\n", add));
@@ -949,28 +949,28 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui
}
local->addr->entry[entryAddress] = e_pilot_utf8_to_pchar (add);
g_free (add);
-
+
local->addr->entry[entryCity] = e_pilot_utf8_to_pchar (address->locality);
local->addr->entry[entryState] = e_pilot_utf8_to_pchar (address->region);
local->addr->entry[entryZip] = e_pilot_utf8_to_pchar (address->code);
local->addr->entry[entryCountry] = e_pilot_utf8_to_pchar (address->country);
-
+
e_contact_address_free (address);
}
-
+
/* Phone numbers */
/* See if everything is syncable */
syncable = is_syncable (ctxt, local);
-
+
if (syncable) {
INFO ("Syncable");
/* Sync by priority */
- for (i = 0, phone = entryPhone1;
+ for (i = 0, phone = entryPhone1;
priority[i] != E_CONTACT_FIELD_LAST && phone <= entryPhone5; i++) {
const char *phone_str;
-
+
phone_str = e_contact_get_const (contact, priority[i]);
if (phone_str && *phone_str) {
clear_entry_text (*local->addr, phone);
@@ -994,7 +994,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui
for (i = entryPhone1; i <= entryPhone5; i++) {
int phonelabel = local->addr->phoneLabel[i - entryPhone1];
const char *phone_str = NULL;
-
+
if (phonelabel == LABEL_EMAIL && !is_next_done (next_mail)) {
phone_str = e_contact_get_const (contact, next_mail);
next_mail = get_next_mail (&next_mail);
@@ -1020,19 +1020,19 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui
phone_str = e_contact_get_const (contact, next_mobile);
next_mobile = get_next_mobile (&next_mobile);
}
-
+
if (phone_str && *phone_str) {
clear_entry_text (*local->addr, i);
local->addr->entry[i] = e_pilot_utf8_to_pchar (phone_str);
}
}
}
-
+
/* Note */
local->addr->entry[entryNote] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_NOTE));
}
-static void
+static void
local_record_from_uid (EAddrLocalRecord *local,
const char *uid,
EAddrConduitContext *ctxt)
@@ -1040,12 +1040,12 @@ local_record_from_uid (EAddrLocalRecord *local,
EContact *contact = NULL;
const char *cuid;
GList *l;
-
+
g_assert (local != NULL);
for (l = ctxt->cards; l != NULL; l = l->next) {
contact = l->data;
-
+
/* FIXME Do we need to check for the empty string? */
if ((cuid = e_contact_get_const (contact, E_CONTACT_UID)) && !strcmp (cuid, uid))
break;
@@ -1107,15 +1107,15 @@ ecard_from_remote_record(EAddrConduitContext *ctxt,
name = e_contact_name_new ();
name->given = get_entry_text (address, entryFirstname);
name->family = get_entry_text (address, entryLastname);
-
+
full_name = e_contact_name_to_string (name);
e_contact_set (contact, E_CONTACT_FULL_NAME, full_name);
e_contact_name_free (name);
-
+
/* File As */
if (!full_name || !*full_name)
set_contact_text (contact, E_CONTACT_FILE_AS, address, entryCompany);
-
+
g_free (full_name);
/* Title and Company */
@@ -1136,10 +1136,10 @@ ecard_from_remote_record(EAddrConduitContext *ctxt,
}
}
}
-
+
if (mailing_address == -1)
mailing_address = ctxt->cfg->default_address;
-
+
eaddress = g_new0 (EContactAddress, 1);
txt = get_entry_text (address, entryAddress);
@@ -1149,17 +1149,17 @@ ecard_from_remote_record(EAddrConduitContext *ctxt,
} else {
find = NULL;
}
-
+
eaddress->street = txt;
eaddress->ext = find != NULL ? g_strdup (find) : g_strdup ("");
eaddress->locality = get_entry_text (address, entryCity);
eaddress->region = get_entry_text (address, entryState);
eaddress->country = get_entry_text (address, entryCountry);
eaddress->code = get_entry_text (address, entryZip);
-
+
e_contact_set (contact, mailing_address, eaddress);
e_contact_address_free (eaddress);
-
+
/* Phone numbers */
get_next_init (&next_mail, &next_home, &next_work, &next_fax,
&next_other, &next_main, &next_pager, &next_mobile);
@@ -1167,7 +1167,7 @@ ecard_from_remote_record(EAddrConduitContext *ctxt,
for (i = entryPhone1; i <= entryPhone5; i++) {
int phonelabel = address.phoneLabel[i - entryPhone1];
char *phonenum = get_entry_text (address, i);
-
+
if (phonelabel == LABEL_EMAIL && !is_next_done (next_mail)) {
e_contact_set (contact, next_mail, phonenum);
next_mail = get_next_mail (&next_mail);
@@ -1193,7 +1193,7 @@ ecard_from_remote_record(EAddrConduitContext *ctxt,
e_contact_set (contact, next_mobile, phonenum);
next_mobile = get_next_mobile (&next_mobile);
}
-
+
g_free (phonenum);
}
@@ -1211,8 +1211,8 @@ check_for_slow_setting (GnomePilotConduit *c, EAddrConduitContext *ctxt)
GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c);
int map_count;
const char *uri;
-
- map_count = g_hash_table_size (ctxt->map->pid_map);
+
+ map_count = g_hash_table_size (ctxt->map->pid_map);
if (map_count == 0)
gnome_pilot_conduit_standard_set_slow (conduit, TRUE);
@@ -1233,7 +1233,7 @@ check_for_slow_setting (GnomePilotConduit *c, EAddrConduitContext *ctxt)
}
static void
-addressbook_authenticate (EBook *book,
+addressbook_authenticate (EBook *book,
gpointer data)
{
gchar *auth;
@@ -1253,16 +1253,16 @@ addressbook_authenticate (EBook *book,
if (auth && !strcmp ("plain/password", auth))
user = (gchar *)e_source_get_property (source, "user");
- else
+ else
user = (gchar *)e_source_get_property (source, "email_addr");
if (!user)
- user = "";
+ user = "";
str_uri = e_source_get_uri (source);
- e_uri = e_uri_new (str_uri);
+ e_uri = e_uri_new (str_uri);
pass_key = e_uri_to_string (e_uri, FALSE);
e_uri_free (e_uri);
-
+
passwd = e_passwords_get_password (component_name, pass_key);
if (passwd)
passwd = "";
@@ -1303,7 +1303,7 @@ pre_sync (GnomePilotConduit *conduit,
/* g_message ("Addressbook Conduit v.%s", CONDUIT_VERSION); */
ctxt->dbi = dbi;
-
+
if (ctxt->cfg->source) {
ctxt->ebook = e_book_new (ctxt->cfg->source, NULL);
} else {
@@ -1312,13 +1312,13 @@ pre_sync (GnomePilotConduit *conduit,
auth = (gchar *)e_source_get_property (ctxt->cfg->source, "auth");
if (auth) {
LOG (g_message ("contacts needs authentication\n"));
- g_signal_connect (ctxt->ebook, "auth_required",
+ g_signal_connect (ctxt->ebook, "auth_required",
G_CALLBACK (addressbook_authenticate), ctxt->cfg->source);
}
if (!ctxt->ebook || !e_book_open (ctxt->ebook, TRUE, NULL)) {
WARN(_("Could not load addressbook"));
gnome_pilot_conduit_error (conduit, _("Could not load addressbook"));
-
+
return -1;
}
@@ -1332,26 +1332,26 @@ pre_sync (GnomePilotConduit *conduit,
LOG (g_warning ("Failed to get EBookQuery"));
return -1;
}
-
+
if (!e_book_get_contacts (ctxt->ebook, query, &ctxt->cards, NULL)) {
LOG (g_warning ("Failed to get Contacts"));
e_book_query_unref (query);
return -1;
}
-
+
e_book_query_unref (query);
-
+
/* Count and hash the changes */
change_id = g_strdup_printf ("pilot-sync-evolution-addressbook-%d", ctxt->cfg->pilot_id);
if (!e_book_get_changes (ctxt->ebook, change_id, &ctxt->changed, NULL))
return -1;
ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal);
- g_free (change_id);
+ g_free (change_id);
for (l = ctxt->changed; l != NULL; l = l->next) {
EBookChange *ebc = l->data;
const char *uid;
-
+
uid = e_contact_get_const (ebc->contact, E_CONTACT_UID);
if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) {
@@ -1372,7 +1372,7 @@ pre_sync (GnomePilotConduit *conduit,
e_pilot_map_remove_by_uid (ctxt->map, uid);
}
}
-
+
/* Set the count information */
num_records = g_list_length (ctxt->cards);
gnome_pilot_conduit_sync_abs_set_num_local_records(abs_conduit, num_records);
@@ -1385,14 +1385,14 @@ pre_sync (GnomePilotConduit *conduit,
if(buffer == NULL){
return pi_set_error(dbi->pilot_socket, PI_ERR_GENERIC_MEMORY);
}
-
+
len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0,
DLP_BUF_SIZE, buffer);
#else
buf = (unsigned char*)g_malloc (0xffff);
len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0,
(unsigned char *)buf, 0xffff);
-#endif
+#endif
if (len < 0) {
WARN (_("Could not read pilot's Address application block"));
WARN ("dlp_ReadAppBlock(...) = %d", len);
@@ -1422,7 +1422,7 @@ post_sync (GnomePilotConduit *conduit,
{
GList *changed;
gchar *filename, *change_id;
-
+
LOG (g_message ( "post_sync: Address Conduit v.%s", CONDUIT_VERSION ));
g_free (ctxt->cfg->last_uri);
@@ -1435,14 +1435,14 @@ post_sync (GnomePilotConduit *conduit,
/* FIX ME ugly hack - our changes musn't count, this does introduce
* a race condition if anyone changes a record elsewhere during sycnc
- */
+ */
change_id = g_strdup_printf ("pilot-sync-evolution-addressbook-%d", ctxt->cfg->pilot_id);
if (e_book_get_changes (ctxt->ebook, change_id, &changed, NULL))
e_book_free_change_list (changed);
g_free (change_id);
LOG (g_message ( "---------------------------------------------------------\n" ));
-
+
return 0;
}
@@ -1453,7 +1453,7 @@ set_pilot_id (GnomePilotConduitSyncAbs *conduit,
EAddrConduitContext *ctxt)
{
LOG (g_message ( "set_pilot_id: setting to %d\n", ID ));
-
+
e_pilot_map_insert (ctxt->map, ID, e_contact_get_const (local->contact, E_CONTACT_UID), FALSE);
return 0;
@@ -1465,12 +1465,12 @@ set_status_cleared (GnomePilotConduitSyncAbs *conduit,
EAddrConduitContext *ctxt)
{
const char *uid;
-
+
LOG (g_message ( "set_status_cleared: clearing status\n" ));
-
+
if ((uid = e_contact_get_const (local->contact, E_CONTACT_UID)))
g_hash_table_remove (ctxt->changed_hash, uid);
-
+
return 0;
}
@@ -1489,7 +1489,7 @@ for_each (GnomePilotConduitSyncAbs *conduit,
cards = ctxt->cards;
count = 0;
-
+
if (cards != NULL) {
LOG (g_message ( "iterating over %d records", g_list_length (cards) ));
@@ -1536,17 +1536,17 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit,
if (*local == NULL) {
LOG (g_message ( "for_each_modified beginning\n" ));
-
+
iterator = ctxt->changed;
-
+
count = 0;
-
+
iterator = next_changed_item (ctxt, iterator);
if (iterator != NULL) {
EBookChange *ebc = iterator->data;
-
+
LOG (g_message ( "iterating over %d records", g_hash_table_size (ctxt->changed_hash)));
-
+
*local = g_new0 (EAddrLocalRecord, 1);
local_record_from_ecard (*local, ebc->contact, ctxt);
ctxt->locals = g_list_prepend (ctxt->locals, *local);
@@ -1597,12 +1597,12 @@ compare (GnomePilotConduitSyncAbs *conduit,
if (remote->length != local_pilot.length
|| memcmp (local_pilot.record, remote->record, remote->length))
retval = 1;
-
+
if (retval == 0)
LOG (g_message ( " equal" ));
else
LOG (g_message ( " not equal" ));
-
+
return retval;
}
@@ -1613,18 +1613,18 @@ add_record (GnomePilotConduitSyncAbs *conduit,
{
EContact *contact;
int retval = 0;
-
+
g_return_val_if_fail (remote != NULL, -1);
LOG (g_message ( "add_record: adding %s to desktop\n", print_remote (remote) ));
contact = ecard_from_remote_record (ctxt, remote, NULL);
-
+
/* add the ecard to the server */
if (!e_book_add_contact (ctxt->ebook, contact, NULL)) {
WARN ("add_record: failed to add card to ebook\n");
g_object_unref (contact);
-
+
return -1;
}
@@ -1645,7 +1645,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit,
EBookChange *ebc;
char *old_id;
int retval = 0;
-
+
g_return_val_if_fail (remote != NULL, -1);
LOG (g_message ("replace_record: replace %s with %s\n",
@@ -1653,7 +1653,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit,
old_id = e_contact_get (local->contact, E_CONTACT_UID);
ebc = g_hash_table_lookup (ctxt->changed_hash, old_id);
-
+
new_contact = ecard_from_remote_record (ctxt, remote, local->contact);
g_object_unref (local->contact);
local->contact = new_contact;
@@ -1664,20 +1664,20 @@ replace_record (GnomePilotConduitSyncAbs *conduit,
return -1;
}
-
+
} else {
if (!e_book_commit_contact (ctxt->ebook, local->contact, NULL)) {
WARN (G_STRLOC ": failed to commit card\n");
return -1;
- }
+ }
}
/* Adding a record causes wombat to assign a new uid so we must tidy */
if (ebc && ebc->change_type == E_BOOK_CHANGE_CARD_DELETED) {
const char *uid = e_contact_get_const (local->contact, E_CONTACT_UID);
gboolean arch;
-
+
arch = e_pilot_map_uid_is_archived (ctxt->map, uid);
e_pilot_map_insert (ctxt->map, remote->ID, uid, arch);
@@ -1702,7 +1702,7 @@ delete_record (GnomePilotConduitSyncAbs *conduit,
{
GError *error = NULL;
int retval = 0;
-
+
g_return_val_if_fail (local != NULL, -1);
g_return_val_if_fail (local->contact != NULL, -1);
@@ -1715,7 +1715,7 @@ delete_record (GnomePilotConduitSyncAbs *conduit,
retval = -1;
}
-
+
return retval;
}
@@ -1726,13 +1726,13 @@ archive_record (GnomePilotConduitSyncAbs *conduit,
EAddrConduitContext *ctxt)
{
int retval = 0;
-
+
g_return_val_if_fail (local != NULL, -1);
LOG (g_message ( "archive_record: %s\n", archive ? "yes" : "no" ));
e_pilot_map_insert (ctxt->map, local->local.ID, e_contact_get_const (local->contact, E_CONTACT_UID), archive);
-
+
return retval;
}
@@ -1743,24 +1743,24 @@ match (GnomePilotConduitSyncAbs *conduit,
EAddrConduitContext *ctxt)
{
const char *uid;
-
+
LOG (g_message ("match: looking for local copy of %s\n",
print_remote (remote)));
-
+
g_return_val_if_fail (local != NULL, -1);
g_return_val_if_fail (remote != NULL, -1);
*local = NULL;
uid = e_pilot_map_lookup_uid (ctxt->map, remote->ID, TRUE);
-
+
if (!uid)
return 0;
LOG (g_message ( " matched\n" ));
-
+
*local = g_new0 (EAddrLocalRecord, 1);
local_record_from_uid (*local, uid, ctxt);
-
+
return 0;
}
@@ -1785,9 +1785,9 @@ prepare (GnomePilotConduitSyncAbs *conduit,
EAddrConduitContext *ctxt)
{
LOG (g_message ( "prepare: encoding local %s\n", print_local (local) ));
-
+
*remote = local_record_to_pilot_record (local, ctxt);
-
+
return 0;
}
@@ -1810,7 +1810,7 @@ create_settings_window (GnomePilotConduit *conduit,
EAddrConduitContext *ctxt)
{
LOG (g_message ( "create_settings_window" ));
-
+
if (!ctxt->cfg->source_list)
return -1;
@@ -1821,14 +1821,14 @@ create_settings_window (GnomePilotConduit *conduit,
gtk_widget_show (ctxt->ps);
fill_widgets (ctxt);
-
+
return 0;
}
static void
display_settings (GnomePilotConduit *conduit, EAddrConduitContext *ctxt)
{
LOG (g_message ( "display_settings" ));
-
+
fill_widgets (ctxt);
}
@@ -1903,10 +1903,10 @@ conduit_get_gpilot_conduit (guint32 pilot_id)
void
conduit_destroy_gpilot_conduit (GnomePilotConduit *conduit)
-{
+{
EAddrConduitContext *ctxt;
- ctxt = gtk_object_get_data (GTK_OBJECT (conduit),
+ ctxt = gtk_object_get_data (GTK_OBJECT (conduit),
"addrconduit_context");
e_addr_context_destroy (ctxt);
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index a010fafafb..57de2505c4 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -101,7 +101,7 @@ ensure_sources (AddressbookComponent *component)
group = E_SOURCE_GROUP (g->data);
- /* compare only file:// part. If user home dir name changes we do not want to create
+ /* compare only file:// part. If user home dir name changes we do not want to create
one more group */
if (!on_this_computer && !strncmp (base_uri_proto, e_source_group_peek_base_uri (group), 7))
@@ -132,7 +132,7 @@ ensure_sources (AddressbookComponent *component)
homedir name changes */
if (strcmp (base_uri_proto, e_source_group_peek_base_uri (on_this_computer))) {
e_source_group_set_base_uri (on_this_computer, base_uri_proto);
-
+
/* *sigh* . We shouldn't need this sync call here as set_base_uri
call results in synching to gconf, but that happens in idle loop
and too late to prevent user seeing "Can not Open ... because of invalid uri" error.*/
@@ -176,7 +176,7 @@ view_destroyed_cb (gpointer data, GObject *where_the_object_was)
AddressbookComponent *addressbook_component = data;
AddressbookComponentPrivate *priv;
GList *l;
-
+
priv = addressbook_component->priv;
for (l = priv->views; l; l = l->next) {
@@ -285,7 +285,7 @@ impl_requestCreateItem (PortableServer_Servant servant,
CORBA_Environment *ev)
{
EBook *book;
- GConfClient *gconf_client;
+ GConfClient *gconf_client;
ESourceList *source_list;
char *uid;
@@ -345,9 +345,9 @@ impl_handleURI (PortableServer_Servant servant,
l = g_list_last (priv->views);
if (!l)
return;
-
+
view = l->data;
-
+
if (!strncmp (uri, "contacts:", 9)) {
EUri *euri = e_uri_new (uri);
const char *p;
@@ -358,17 +358,17 @@ impl_handleURI (PortableServer_Servant servant,
if (p) {
while (*p) {
len = strcspn (p, "=&");
-
+
/* If it's malformed, give up. */
if (p[len] != '=')
break;
-
+
header = (char *) p;
header[len] = '\0';
p += len + 1;
-
+
clen = strcspn (p, "&");
-
+
content = g_strndup (p, clen);
if (!g_ascii_strcasecmp (header, "source-uid")) {
@@ -386,15 +386,15 @@ impl_handleURI (PortableServer_Servant servant,
p += 4;
}
}
-
+
addressbook_view_edit_contact (view, src_uid, contact_uid);
-
+
g_free (src_uid);
g_free (contact_uid);
}
e_uri_free (euri);
}
-
+
}
static void
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index c40a32ce0a..2f8b63b76c 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -110,7 +110,7 @@ struct _AddressbookSourceDialog {
/* info page fields */
GtkWidget *host;
GtkWidget *auth_optionmenu;
- AddressbookLDAPAuthType auth;
+ AddressbookLDAPAuthType auth;
GtkWidget *auth_principal;
/* connecting page fields */
@@ -285,7 +285,7 @@ addressbook_ldap_auth (GtkWidget *window, LDAP *ldap)
ldap_error = ldap_simple_bind_s (ldap, NULL, NULL);
if (LDAP_SUCCESS != ldap_error)
e_error_run ((GtkWindow *) window, "addressbook:ldap-auth", NULL);
-
+
return ldap_error;
}
@@ -305,7 +305,7 @@ addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap,
attrs, 0, NULL, NULL, &timeout, LDAP_NO_LIMIT, resp);
if (LDAP_SUCCESS != ldap_error)
e_error_run (GTK_WINDOW (dialog->window), "addressbook:ldap-search-base", NULL);
-
+
return ldap_error;
}
@@ -530,7 +530,7 @@ eabc_general_type(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str
label = gtk_label_new_with_mnemonic(_("_Type:"));
gtk_box_pack_start((GtkBox *)w, label, FALSE, FALSE, 0);
- dropdown = (GtkComboBox *)gtk_combo_box_new();
+ dropdown = (GtkComboBox *)gtk_combo_box_new();
cell = gtk_cell_renderer_text_new();
store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
i = 0;
@@ -567,14 +567,14 @@ name_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
e_source_set_name (sdialog->source, gtk_entry_get_text (GTK_ENTRY (sdialog->display_name)));
}
-static void
+static void
offline_status_changed_cb (GtkWidget *widget, AddressbookSourceDialog *sdialog)
{
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
e_source_set_property (sdialog->source, "offline_sync", "1");
- else
- e_source_set_property (sdialog->source, "offline_sync", "0");
-
+ else
+ e_source_set_property (sdialog->source, "offline_sync", "0");
+
}
static GtkWidget *
@@ -609,7 +609,7 @@ eabc_general_name(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str
gtk_widget_set_sensitive (GTK_WIDGET(sdialog->display_name), FALSE);
}
}
-
+
g_object_unref(gui);
return w;
@@ -623,17 +623,17 @@ eabc_general_offline(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
GtkWidget *offline_setting;
const char *offline_sync;
gboolean is_local_book;
-
+
is_local_book = g_str_has_prefix (e_source_group_peek_base_uri (sdialog->source_group), "file:");
offline_sync = e_source_get_property (sdialog->source, "offline_sync");
- if (old)
+ if (old)
return old;
else {
offline_setting = gtk_check_button_new_with_label (N_("Copy book content locally for offline operation"));
gtk_widget_show (offline_setting);
gtk_container_add (GTK_CONTAINER (parent), offline_setting);
g_signal_connect (offline_setting, "toggled", G_CALLBACK (offline_status_changed_cb), sdialog);
-
+
}
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (offline_setting), (offline_sync && g_str_equal (offline_sync, "1")) ? TRUE : FALSE);
if (is_local_book)
@@ -644,12 +644,12 @@ eabc_general_offline(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
#ifdef HAVE_LDAP
static gchar *
-form_ldap_search_filter (GtkWidget *w)
+form_ldap_search_filter (GtkWidget *w)
{
gchar *filter;
const gchar *search_filter = gtk_entry_get_text ((GtkEntry *) w);
- /* this function can be used to format the search filter entered */
+ /* this function can be used to format the search filter entered */
if ((strlen (search_filter) !=0) && *search_filter != '(' && *(search_filter + (strlen (search_filter-1))) != ')')
filter = g_strdup_printf ("(%s)", search_filter);
else
@@ -657,7 +657,7 @@ form_ldap_search_filter (GtkWidget *w)
return filter;
}
-
+
static void
url_changed(AddressbookSourceDialog *sdialog)
{
@@ -737,7 +737,7 @@ eabc_general_host(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str
gtk_entry_set_text((GtkEntry *)sdialog->host, lud && lud->lud_host ? lud->lud_host : "");
g_signal_connect (sdialog->host, "changed", G_CALLBACK (host_changed_cb), sdialog);
- sdialog->port_combo = glade_xml_get_widget (gui, "port-combo");
+ sdialog->port_combo = glade_xml_get_widget (gui, "port-combo");
sprintf(port, "%u", lud && lud->lud_port? lud->lud_port : LDAP_PORT);
gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (sdialog->port_combo)->entry), port);
g_signal_connect (GTK_COMBO(sdialog->port_combo)->entry, "changed", G_CALLBACK (port_entry_changed_cb), sdialog);
@@ -813,7 +813,7 @@ eabc_general_auth(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, str
sdialog->auth_optionmenu = glade_xml_get_widget (gui, "auth-optionmenu");
tmp = e_source_get_property(sdialog->source, "auth");
sdialog->auth = tmp ? ldap_parse_auth(tmp) : ADDRESSBOOK_LDAP_AUTH_NONE;
- gtk_option_menu_set_history (GTK_OPTION_MENU(sdialog->auth_optionmenu), sdialog->auth);
+ gtk_option_menu_set_history (GTK_OPTION_MENU(sdialog->auth_optionmenu), sdialog->auth);
g_signal_connect(sdialog->auth_optionmenu, "changed", G_CALLBACK(auth_optionmenu_changed_cb), sdialog);
sdialog->auth_principal = glade_xml_get_widget (gui, "auth-entry");
diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c
index 249cdf7a12..1974ada536 100644
--- a/addressbook/gui/component/addressbook-migrate.c
+++ b/addressbook/gui/component/addressbook-migrate.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* Copyright (C) 2004, Novell, Inc.
*
* This program is free software; you can redistribute it and/or
@@ -73,28 +73,28 @@ setup_progress_dialog (MigrationContext *context)
gtk_window_set_title (GTK_WINDOW (context->window), _("Migrating..."));
gtk_window_set_modal (GTK_WINDOW (context->window), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (context->window), 6);
-
+
vbox = gtk_vbox_new (FALSE, 6);
gtk_widget_show (vbox);
gtk_container_add (GTK_CONTAINER (context->window), vbox);
-
+
context->label = gtk_label_new ("");
gtk_label_set_line_wrap (GTK_LABEL (context->label), TRUE);
gtk_widget_show (context->label);
gtk_box_pack_start_defaults (GTK_BOX (vbox), context->label);
-
+
hbox = gtk_hbox_new (FALSE, 6);
gtk_widget_show (hbox);
gtk_box_pack_start_defaults (GTK_BOX (vbox), hbox);
-
+
context->folder_label = gtk_label_new ("");
gtk_widget_show (context->folder_label);
gtk_box_pack_start_defaults (GTK_BOX (hbox), context->folder_label);
-
+
context->progress = gtk_progress_bar_new ();
gtk_widget_show (context->progress);
gtk_box_pack_start_defaults (GTK_BOX (hbox), context->progress);
-
+
gtk_widget_show (context->window);
}
@@ -121,13 +121,13 @@ static void
dialog_set_folder_name (MigrationContext *context, const char *folder_name)
{
char *text;
-
+
text = g_strdup_printf (_("Migrating `%s':"), folder_name);
gtk_label_set_text (GTK_LABEL (context->folder_label), text);
g_free (text);
-
+
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (context->progress), 0.0);
-
+
while (gtk_events_pending ())
gtk_main_iteration ();
@@ -140,12 +140,12 @@ static void
dialog_set_progress (MigrationContext *context, double percent)
{
char text[5];
-
+
snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f));
-
+
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (context->progress), percent);
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (context->progress), text);
-
+
while (gtk_events_pending ())
gtk_main_iteration ();
@@ -229,7 +229,7 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book)
/* both books are loaded, start the actual migration */
e_book_get_contacts (old_book, query, &contacts, NULL);
- e_book_query_unref (query);
+ e_book_query_unref (query);
num_contacts = g_list_length (contacts);
for (l = contacts; l; l = l->next) {
@@ -334,7 +334,7 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book)
params = e_vcard_attribute_get_params (a);
if (!params)
e_vcard_attribute_add_param_with_value (a,
- e_vcard_attribute_param_new (EVC_TYPE),
+ e_vcard_attribute_param_new (EVC_TYPE),
"OTHER");
if (v && v->data) {
@@ -973,7 +973,7 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup
}
attr = next_attr;
-
+
if (converted)
break;
}
@@ -1004,10 +1004,10 @@ migrate_pilot_data (const char *old_path, const char *new_path)
const char *ext;
char *filename;
GDir *dir;
-
+
if (!(dir = g_dir_open (old_path, 0, NULL)))
return;
-
+
while ((dent = g_dir_read_name (dir))) {
if ((!strncmp (dent, "pilot-map-", 10) &&
((ext = strrchr (dent, '.')) && !strcmp (ext, ".xml"))) ||
@@ -1018,13 +1018,13 @@ migrate_pilot_data (const char *old_path, const char *new_path)
size_t nread, nwritten;
int fd0, fd1;
ssize_t n;
-
+
filename = g_build_filename (old_path, dent, NULL);
if ((fd0 = g_open (filename, O_RDONLY | O_BINARY, 0)) == -1) {
g_free (filename);
continue;
}
-
+
g_free (filename);
filename = g_build_filename (new_path, dent, NULL);
if ((fd1 = g_open (filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666)) == -1) {
@@ -1032,30 +1032,30 @@ migrate_pilot_data (const char *old_path, const char *new_path)
close (fd0);
continue;
}
-
+
do {
do {
n = read (fd0, inbuf, sizeof (inbuf));
} while (n == -1 && errno == EINTR);
-
+
if (n < 1)
break;
-
+
nread = n;
nwritten = 0;
do {
do {
n = write (fd1, inbuf + nwritten, nread - nwritten);
} while (n == -1 && errno == EINTR);
-
+
if (n > 0)
nwritten += n;
} while (nwritten < nread && n != -1);
-
+
if (n == -1)
break;
} while (1);
-
+
if (n != -1)
n = fsync (fd1);
@@ -1063,13 +1063,13 @@ migrate_pilot_data (const char *old_path, const char *new_path)
g_warning ("Failed to migrate %s: %s", dent, strerror (errno));
g_unlink (filename);
}
-
+
close (fd0);
close (fd1);
g_free (filename);
}
}
-
+
g_dir_close (dir);
}
@@ -1077,7 +1077,7 @@ static MigrationContext*
migration_context_new (AddressbookComponent *component)
{
MigrationContext *context = g_new (MigrationContext, 1);
-
+
/* set up the mapping from old uris to new uids */
context->folder_uid_map = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)g_free, (GDestroyNotify)g_free);
@@ -1122,12 +1122,12 @@ addressbook_migrate (AddressbookComponent *component, int major, int minor, int
further decomposition will happen below. */
&& (minor < 5 || (minor == 5 && revision <= 10)))
need_dialog = TRUE;
-
+
if (need_dialog)
setup_progress_dialog (context);
if (major == 1) {
-
+
if (minor < 5 || (minor == 5 && revision <= 2)) {
/* initialize our dialog */
dialog_set_label (context,
@@ -1160,13 +1160,13 @@ addressbook_migrate (AddressbookComponent *component, int major, int minor, int
migrate_company_phone_for_local_folders (context, on_this_computer);
}
-
+
if (minor < 5 || (minor == 5 && revision <= 10)) {
char *old_path, *new_path;
-
+
dialog_set_label (context, _("Evolution's Palm Sync changelog and map files have changed.\n\n"
"Please be patient while Evolution migrates your Pilot Sync data..."));
-
+
old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Contacts", NULL);
new_path = g_build_filename (addressbook_component_peek_base_directory (component),
"addressbook", "local", "system", NULL);
@@ -1204,7 +1204,7 @@ addressbook_migrate (AddressbookComponent *component, int major, int minor, int
g_object_unref (on_ldap_servers);
if (personal_source)
g_object_unref (personal_source);
-
+
migration_context_free (context);
diff --git a/addressbook/gui/component/addressbook-migrate.h b/addressbook/gui/component/addressbook-migrate.h
index 07d261a205..0ec738399f 100644
--- a/addressbook/gui/component/addressbook-migrate.h
+++ b/addressbook/gui/component/addressbook-migrate.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* Copyright (C) 2004, Novell, Inc.
*
* This program is free software; you can redistribute it and/or
diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c
index 8fcf39cc29..75c3f2f221 100644
--- a/addressbook/gui/component/addressbook-view.c
+++ b/addressbook/gui/component/addressbook-view.c
@@ -155,11 +155,11 @@ save_all_contacts_cb (BonoboUIComponent *uih, void *user_data, const char *path)
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
-
+
if (v)
eab_view_save_as (v, TRUE);
}
-
+
static void
save_contact_cb (BonoboUIComponent *uih, void *user_data, const char *path)
{
@@ -274,7 +274,7 @@ copy_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *pa
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
- if (v)
+ if (v)
eab_view_copy_to_folder (v, TRUE);
}
@@ -292,7 +292,7 @@ move_all_contacts_to_cb (BonoboUIComponent *uih, void *user_data, const char *pa
{
AddressbookView *view = (AddressbookView *) user_data;
EABView *v = get_current_view (view);
- if (v)
+ if (v)
eab_view_move_to_folder (v, TRUE);
}
@@ -335,11 +335,11 @@ delete_addressbook_folder (AddressbookView *view)
GtkWindow *toplevel;
selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector));
- if (!selected_source)
+ if (!selected_source)
return;
toplevel = (GtkWindow *) gtk_widget_get_toplevel (priv->notebook);
- if (e_error_run (toplevel, "addressbook:ask-delete-addressbook",
+ if (e_error_run (toplevel, "addressbook:ask-delete-addressbook",
e_source_peek_name(selected_source)) != GTK_RESPONSE_YES)
return;
@@ -351,9 +351,9 @@ delete_addressbook_folder (AddressbookView *view)
selected_source))
e_source_selector_unselect_source (E_SOURCE_SELECTOR (priv->selector),
selected_source);
-
+
e_source_group_remove_source (e_source_peek_group (selected_source), selected_source);
-
+
e_source_list_sync (priv->source_list, NULL);
}
else {
@@ -408,7 +408,7 @@ edit_addressbook_folder (AddressbookView *view)
}
gtk_window_present (GTK_WINDOW (closure->editor));
-
+
}
static void
@@ -425,10 +425,10 @@ rename_addressbook_folder (AddressbookView *view)
{
AddressbookViewPrivate *priv = view->priv;
ESource *source;
- const char *old_name;
+ const char *old_name;
char *prompt, *new_name;
gboolean done = FALSE;
-
+
source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector));
old_name = e_source_peek_name(source);
prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), old_name);
@@ -449,7 +449,7 @@ rename_addressbook_folder (AddressbookView *view)
}
}
g_free (new_name);
-
+
}
static void
@@ -466,7 +466,7 @@ folder_can_delete (AddressbookView *view)
AddressbookViewPrivate *priv = view->priv;
ESource *source ;
const char *source_uri;
-
+
source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (priv->selector));
if(source) {
source_uri = e_source_peek_relative_uri (source);
@@ -622,7 +622,7 @@ static EPixmap pixmaps [] = {
E_PIXMAP ("/commands/ContactsPrint", "document-print", E_ICON_SIZE_MENU),
E_PIXMAP ("/commands/ContactsPrintPreview", "document-print-preview", E_ICON_SIZE_MENU),
E_PIXMAP ("/commands/ContactsSaveAsVCard", "document-save-as", E_ICON_SIZE_MENU),
- E_PIXMAP ("/commands/ContactsSendContactToOther", "mail-forward", E_ICON_SIZE_MENU),
+ E_PIXMAP ("/commands/ContactsSendContactToOther", "mail-forward", E_ICON_SIZE_MENU),
E_PIXMAP ("/commands/ContactsSendMessageToContact", "mail-message-new", E_ICON_SIZE_MENU),
E_PIXMAP ("/commands/FolderCopy", "edit-copy", E_ICON_SIZE_MENU),
E_PIXMAP ("/commands/FolderDelete", "edit-delete", E_ICON_SIZE_MENU),
@@ -651,7 +651,7 @@ control_activate (BonoboControl *control,
bonobo_ui_component_add_verb_list_with_data (
uic, verbs, view);
-
+
bonobo_ui_component_freeze (uic, NULL);
xmlfile = g_build_filename (EVOLUTION_UIDIR,
@@ -676,8 +676,8 @@ control_activate (BonoboControl *control,
}
static void
-control_activate_cb (BonoboControl *control,
- gboolean activate,
+control_activate_cb (BonoboControl *control,
+ gboolean activate,
AddressbookView *view)
{
BonoboUIComponent *uic;
@@ -770,7 +770,7 @@ load_uri_for_selection (ESourceSelector *selector,
ESource *selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (selector));
ESource *primary = get_primary_source (view);
- if (selected_source != NULL &&
+ if (selected_source != NULL &&
((primary && (!g_str_equal (e_source_peek_uid (primary),e_source_peek_uid (selected_source) )))||force))
activate_source (view, selected_source);
}
@@ -779,17 +779,17 @@ static ESource *
find_first_source (ESourceList *source_list)
{
GSList *groups, *sources, *l, *m;
-
+
groups = e_source_list_peek_groups (source_list);
for (l = groups; l; l = l->next) {
ESourceGroup *group = l->data;
-
+
sources = e_source_group_peek_sources (group);
for (m = sources; m; m = m->next) {
ESource *source = m->data;
return source;
- }
+ }
}
return NULL;
@@ -869,7 +869,7 @@ book_removed (EBook *book, EBookStatus status, gpointer data)
source))
e_source_selector_unselect_source (E_SOURCE_SELECTOR (priv->selector),
source);
-
+
e_source_group_remove_source (e_source_peek_group (source), source);
e_source_list_sync (priv->source_list, NULL);
@@ -928,7 +928,7 @@ save_addressbook_cb(EPopup *ep, EPopupItem *pitem, void *data)
{
AddressbookView *view = data;
EABView *v = get_current_view (view);
- if (v)
+ if (v)
eab_view_save_as (v, TRUE);
}
@@ -998,11 +998,11 @@ popup_event_callback(ESourceSelector *selector, ESource *source, GdkEventButton
}
static gboolean
-selector_tree_drag_drop (GtkWidget *widget,
- GdkDragContext *context,
- int x,
- int y,
- guint time,
+selector_tree_drag_drop (GtkWidget *widget,
+ GdkDragContext *context,
+ int x,
+ int y,
+ guint time,
AddressbookView *view)
{
GtkTreeViewColumn *column;
@@ -1012,10 +1012,10 @@ selector_tree_drag_drop (GtkWidget *widget,
GtkTreeModel *model;
GtkTreeIter iter;
gpointer data;
-
+
if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, &path, &column, &cell_x, &cell_y))
return FALSE;
-
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
if (!gtk_tree_model_get_iter (model, &iter, path)) {
@@ -1024,17 +1024,17 @@ selector_tree_drag_drop (GtkWidget *widget,
}
gtk_tree_model_get (model, &iter, 0, &data, -1);
-
+
if (E_IS_SOURCE_GROUP (data)) {
g_object_unref (data);
gtk_tree_path_free (path);
return FALSE;
}
-
+
gtk_tree_path_free (path);
return TRUE;
}
-
+
static gboolean
selector_tree_drag_motion (GtkWidget *widget,
GdkDragContext *context,
@@ -1047,21 +1047,21 @@ selector_tree_drag_motion (GtkWidget *widget,
GtkTreeModel *model;
GtkTreeIter iter;
GdkDragAction action = { 0, };
-
+
if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
x, y, &path, &pos))
goto finish;
-
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
-
+
if (!gtk_tree_model_get_iter (model, &iter, path))
goto finish;
-
+
gtk_tree_model_get (model, &iter, 0, &data, -1);
if (E_IS_SOURCE_GROUP (data) || e_source_get_readonly (data))
goto finish;
-
+
gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget), path, GTK_TREE_VIEW_DROP_INTO_OR_BEFORE);
/* Make default action move, not copy */
if (context->actions & GDK_ACTION_MOVE)
@@ -1074,7 +1074,7 @@ selector_tree_drag_motion (GtkWidget *widget,
gtk_tree_path_free (path);
if (data)
g_object_unref (data);
-
+
gdk_drag_status (context, action, GDK_CURRENT_TIME);
return TRUE;
}
@@ -1152,11 +1152,11 @@ merged_contact_cb (EBook *book, EBookStatus status, const char *id, gpointer clo
}
}
-static gboolean
-selector_tree_drag_data_received (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
+static gboolean
+selector_tree_drag_data_received (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
GtkSelectionData *data,
guint info,
guint time,
@@ -1177,17 +1177,17 @@ selector_tree_drag_data_received (GtkWidget *widget,
if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
x, y, &path, &pos))
goto finish;
-
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
-
+
if (!gtk_tree_model_get_iter (model, &iter, path))
goto finish;
-
+
gtk_tree_model_get (model, &iter, 0, &target, -1);
if (E_IS_SOURCE_GROUP (target) || e_source_get_readonly (target))
goto finish;
-
+
target_book = e_book_new (target, NULL);
if (!target_book) {
g_message (G_STRLOC ":Couldn't create EBook.");
@@ -1223,11 +1223,11 @@ selector_tree_drag_data_received (GtkWidget *widget,
gtk_tree_path_free (path);
if (target)
g_object_unref (target);
-
+
gtk_drag_finish (context, success, merge_context->remove_from_source, time);
return TRUE;
-}
+}
static void
selector_tree_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time, gpointer data)
@@ -1277,12 +1277,12 @@ addressbook_view_class_init (AddressbookViewClass *klass)
parent_class = g_type_class_peek_parent (klass);
}
-static gboolean
+static gboolean
source_selector_key_press_event_callback (GtkWidget *widget, GdkEventKey *event, AddressbookView *view)
{
if (event->keyval == GDK_Delete) {
delete_addressbook_folder (view);
- return TRUE;
+ return TRUE;
}
return FALSE;
}
@@ -1294,7 +1294,7 @@ addressbook_view_init (AddressbookView *view)
GtkWidget *selector_scrolled_window;
AtkObject *a11y;
- view->priv =
+ view->priv =
priv = g_new0 (AddressbookViewPrivate, 1);
priv->gconf_client = addressbook_component_peek_gconf_client (addressbook_component_peek ());
@@ -1365,7 +1365,7 @@ addressbook_view_init (AddressbookView *view)
G_CALLBACK (primary_source_selection_changed_callback),
G_OBJECT (view), 0);
g_signal_connect_after (priv->selector, "key_press_event",
- G_CALLBACK (source_selector_key_press_event_callback),
+ G_CALLBACK (source_selector_key_press_event_callback),
G_OBJECT (view));
g_signal_connect_object (priv->selector, "popup_event",
G_CALLBACK (popup_event_callback),
@@ -1397,7 +1397,7 @@ addressbook_view_dispose (GObject *object)
if (view->priv) {
if (priv->book)
g_object_unref (priv->book);
-
+
g_free(priv->passwd);
if (priv->source_list)
@@ -1522,7 +1522,7 @@ activate_source (AddressbookView *view,
gtk_widget_show (uid_view);
gtk_widget_show (label);
-
+
g_object_set (uid_view, "type", EAB_VIEW_TABLE, NULL);
gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook),
@@ -1619,8 +1619,8 @@ addressbook_view_peek_folder_view (AddressbookView *view)
}
void
-addressbook_view_edit_contact (AddressbookView* view,
- const char* source_uid,
+addressbook_view_edit_contact (AddressbookView* view,
+ const char* source_uid,
const char* contact_uid)
{
AddressbookViewPrivate *priv = view->priv;
@@ -1628,7 +1628,7 @@ addressbook_view_edit_contact (AddressbookView* view,
ESource* source = NULL;
EContact* contact = NULL;
EBook* book = NULL;
-
+
if (!source_uid || !contact_uid)
return;
@@ -1637,7 +1637,7 @@ addressbook_view_edit_contact (AddressbookView* view,
return;
/* FIXME: Can I unref this book? */
- book = e_book_new (source, NULL);
+ book = e_book_new (source, NULL);
if (!book)
return;
@@ -1647,7 +1647,7 @@ addressbook_view_edit_contact (AddressbookView* view,
}
e_book_get_contact (book, contact_uid, &contact, NULL);
-
+
if (!contact) {
g_object_unref (book);
return;
diff --git a/addressbook/gui/component/addressbook-view.h b/addressbook/gui/component/addressbook-view.h
index 7e66cc7062..168d46fc81 100644
--- a/addressbook/gui/component/addressbook-view.h
+++ b/addressbook/gui/component/addressbook-view.h
@@ -57,8 +57,8 @@ GtkWidget *addressbook_view_peek_sidebar (AddressbookView *view
GtkWidget *addressbook_view_peek_statusbar (AddressbookView *view);
BonoboControl *addressbook_view_peek_folder_view (AddressbookView *view);
-void addressbook_view_edit_contact (AddressbookView* view,
- const char* source_id,
+void addressbook_view_edit_contact (AddressbookView* view,
+ const char* source_id,
const char* contact_id);
#endif /* _ADDRESSBOOK_VIEW_H_ */
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 2134c1a6b1..898ce692d9 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -89,7 +89,7 @@ load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure)
GtkWidget *dialog;
/* XXX "LDAP" has to be removed from the folowing message
- so that it wil valid for other servers which provide
+ so that it wil valid for other servers which provide
anonymous access*/
dialog = gtk_message_dialog_new (NULL,
@@ -164,7 +164,7 @@ addressbook_authenticate (EBook *book, gboolean previous_failure, ESource *sourc
gchar *uri = remove_parameters_from_uri(e_book_get_uri (book));
const gchar *auth_domain = e_source_get_property (source, "auth-domain");
const gchar *component_name;
-
+
component_name = auth_domain ? auth_domain : "Addressbook";
password = e_passwords_get_password (component_name, uri);
@@ -237,14 +237,14 @@ static void
auth_required_cb (EBook *book, gpointer data)
{
LoadSourceData *load_source_data = g_new0(LoadSourceData, 1);
-
+
load_source_data->source = g_object_ref (g_object_ref (e_book_get_source (book)));
load_source_data->cancelled = FALSE;
addressbook_authenticate (book, FALSE, load_source_data->source,
load_source_auth_cb, load_source_data);
-
-
-
+
+
+
}
static void
load_source_cb (EBook *book, EBookStatus status, gpointer closure)
@@ -262,7 +262,7 @@ load_source_cb (EBook *book, EBookStatus status, gpointer closure)
auth = e_source_get_property (load_source_data->source, "auth");
if (auth && strcmp (auth, "none")) {
g_signal_connect (book, "auth_required", G_CALLBACK(auth_required_cb), NULL);
-
+
if (e_book_is_online (book)) {
addressbook_authenticate (book, FALSE, load_source_data->source,
load_source_auth_cb, closure);
diff --git a/addressbook/gui/component/autocompletion-config.c b/addressbook/gui/component/autocompletion-config.c
index a5604d4b2d..567139025b 100644
--- a/addressbook/gui/component/autocompletion-config.c
+++ b/addressbook/gui/component/autocompletion-config.c
@@ -132,7 +132,7 @@ autocompletion_config_control_new (void)
GTK_SHADOW_IN);
ac->control_widget = e_source_selector_new (ac->source_list);
-
+
gtk_container_add (GTK_CONTAINER (scrolledwin), ac->control_widget);
initialize_selection (ac);
@@ -144,7 +144,7 @@ autocompletion_config_control_new (void)
g_signal_connect (ac->control_widget, "selection_changed",
G_CALLBACK (source_selection_changed), ac);
-
+
g_object_weak_ref (G_OBJECT (ac->config_control), config_control_destroy_notify, ac);
CORBA_exception_free (&ev);
diff --git a/addressbook/gui/component/openldap-extract.h b/addressbook/gui/component/openldap-extract.h
index 25c47df653..f11012ec40 100644
--- a/addressbook/gui/component/openldap-extract.h
+++ b/addressbook/gui/component/openldap-extract.h
@@ -217,7 +217,7 @@ get_token( const char ** sp, char ** token_val )
/* kind = TK_UNEXPCHAR; */
/* break; */
}
-
+
return kind;
}
@@ -746,7 +746,7 @@ static char *ldap_utf8_strchr( const char *str, const char *chr )
for( ; *str != '\0'; LDAP_UTF8_INCR(str) ) {
if( ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr ) ) {
return (char *) str;
- }
+ }
}
return NULL;
@@ -761,7 +761,7 @@ static size_t ldap_utf8_strcspn( const char *str, const char *set )
for( cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset) ) {
if( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) {
return cstr - str;
- }
+ }
}
}
@@ -781,7 +781,7 @@ static size_t ldap_utf8_strspn( const char *str, const char *set )
if( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) {
break;
- }
+ }
}
}
@@ -951,7 +951,7 @@ ldap_free_urldesc( LDAPURLDesc *ludp )
if ( ludp == NULL ) {
return;
}
-
+
if ( ludp->lud_scheme != NULL ) {
LDAP_FREE( ludp->lud_scheme );
}
@@ -1202,7 +1202,7 @@ ldap_url_parse_ext( LDAP_CONST char *url_in, LDAPURLDesc **ludpp )
* anything real.
*/
if( (p == NULL) && (q != NULL) && ((q = strchr( q, '?')) != NULL)) {
- q++;
+ q++;
/* ? immediately followed by question */
if( *q == '?') {
q++;
diff --git a/addressbook/gui/contact-editor/e-contact-editor-address.c b/addressbook/gui/contact-editor/e-contact-editor-address.c
index 06e79d61d6..5877babb49 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-address.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-address.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-contact-editor-address.c
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
@@ -92,14 +92,14 @@ e_contact_editor_address_class_init (EContactEditorAddressClass *klass)
object_class->get_property = e_contact_editor_address_get_property;
object_class->dispose = e_contact_editor_address_dispose;
- g_object_class_install_property (object_class, PROP_ADDRESS,
+ g_object_class_install_property (object_class, PROP_ADDRESS,
g_param_spec_boxed ("address",
_("Address"),
/*_( */"XXX blurb" /*)*/,
e_contact_address_get_type (),
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_EDITABLE,
+ g_object_class_install_property (object_class, PROP_EDITABLE,
g_param_spec_boolean ("editable",
_("Editable"),
/*_( */"XXX blurb" /*)*/,
@@ -501,7 +501,7 @@ e_contact_editor_address_set_property (GObject *object, guint prop_id,
EContactEditorAddress *e_contact_editor_address;
e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (object);
-
+
switch (prop_id){
case PROP_ADDRESS:
if (e_contact_editor_address->address)
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index daaffd01de..bca5f14499 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* eab-contact-editor-phones.c
* Copyright (C) 2003 Ximian, Inc.
* Author: Chris Toshok <toshok@ximian.com>
@@ -85,13 +85,13 @@ e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass)
object_class->get_property = e_contact_editor_fullname_get_property;
object_class->dispose = e_contact_editor_fullname_dispose;
- g_object_class_install_property (object_class, PROP_NAME,
+ g_object_class_install_property (object_class, PROP_NAME,
g_param_spec_pointer ("name",
_("Name"),
/*_( */"XXX blurb" /*)*/,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_EDITABLE,
+ g_object_class_install_property (object_class, PROP_EDITABLE,
g_param_spec_boolean ("editable",
_("Editable"),
/*_( */"XXX blurb" /*)*/,
@@ -157,7 +157,7 @@ e_contact_editor_fullname_dispose (GObject *object)
g_object_unref(e_contact_editor_fullname->gui);
e_contact_editor_fullname->gui = NULL;
}
-
+
if (e_contact_editor_fullname->name) {
e_contact_name_free(e_contact_editor_fullname->name);
e_contact_editor_fullname->name = NULL;
@@ -185,7 +185,7 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id,
EContactEditorFullname *e_contact_editor_fullname;
e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object);
-
+
switch (prop_id){
case PROP_NAME:
e_contact_name_free(e_contact_editor_fullname->name);
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.h b/addressbook/gui/contact-editor/e-contact-editor-fullname.h
index 01374f5c82..d0c9690d59 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.h
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.h
@@ -48,7 +48,7 @@ typedef struct _EContactEditorFullnameClass EContactEditorFullnameClass;
struct _EContactEditorFullname
{
GtkDialog parent;
-
+
/* item specific fields */
EContactName *name;
GladeXML *gui;
diff --git a/addressbook/gui/contact-editor/e-contact-editor-im.c b/addressbook/gui/contact-editor/e-contact-editor-im.c
index 93e6da7cae..9e8aa8d071 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-im.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-im.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-contact-editor-im.c
* Copyright (C) 2003 Ximian, Inc.
* Author: Christian Hammond <chipx86@gnupdate.org>
@@ -116,7 +116,7 @@ e_contact_editor_im_class_init (EContactEditorImClass *klass)
object_class->get_property = e_contact_editor_im_get_property;
object_class->dispose = e_contact_editor_im_dispose;
- g_object_class_install_property (object_class, PROP_SERVICE,
+ g_object_class_install_property (object_class, PROP_SERVICE,
g_param_spec_int ("service",
_("Service"),
/*_( */"XXX blurb" /*)*/,
@@ -125,21 +125,21 @@ e_contact_editor_im_class_init (EContactEditorImClass *klass)
FIRST_IM_TYPE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_LOCATION,
+ g_object_class_install_property (object_class, PROP_LOCATION,
g_param_spec_string ("location",
_("Location"),
/*_( */"XXX blurb" /*)*/,
"HOME",
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_USERNAME,
+ g_object_class_install_property (object_class, PROP_USERNAME,
g_param_spec_string ("username",
_("Username"),
/*_( */"XXX blurb" /*)*/,
NULL,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_EDITABLE,
+ g_object_class_install_property (object_class, PROP_EDITABLE,
g_param_spec_boolean ("editable",
_("Editable"),
/*_( */"XXX blurb" /*)*/,
diff --git a/addressbook/gui/contact-editor/e-contact-editor-im.h b/addressbook/gui/contact-editor/e-contact-editor-im.h
index 56116f7501..9db0d03c80 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-im.h
+++ b/addressbook/gui/contact-editor/e-contact-editor-im.h
@@ -50,7 +50,7 @@ typedef struct _EContactEditorImClass EContactEditorImClass;
struct _EContactEditorIm
{
GtkDialog parent;
-
+
/* item specific fields */
EContactField service;
char *location;
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 91d9e7af66..b1b30f0c33 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-contact-editor.c
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
@@ -254,56 +254,56 @@ e_contact_editor_class_init (EContactEditorClass *klass)
editor_class->is_changed = e_contact_editor_is_changed;
editor_class->get_window = e_contact_editor_get_window;
- g_object_class_install_property (object_class, PROP_SOURCE_BOOK,
+ g_object_class_install_property (object_class, PROP_SOURCE_BOOK,
g_param_spec_object ("source_book",
_("Source Book"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_BOOK,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_TARGET_BOOK,
+ g_object_class_install_property (object_class, PROP_TARGET_BOOK,
g_param_spec_object ("target_book",
_("Target Book"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_BOOK,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_CONTACT,
+ g_object_class_install_property (object_class, PROP_CONTACT,
g_param_spec_object ("contact",
_("Contact"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_CONTACT,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_IS_NEW_CONTACT,
+ g_object_class_install_property (object_class, PROP_IS_NEW_CONTACT,
g_param_spec_boolean ("is_new_contact",
_("Is New Contact"),
/*_( */"XXX blurb" /*)*/,
FALSE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_WRITABLE_FIELDS,
+ g_object_class_install_property (object_class, PROP_WRITABLE_FIELDS,
g_param_spec_object ("writable_fields",
_("Writable Fields"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_LIST,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_REQUIRED_FIELDS,
+ g_object_class_install_property (object_class, PROP_REQUIRED_FIELDS,
g_param_spec_object ("required_fields",
_("Required Fields"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_LIST,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_EDITABLE,
+ g_object_class_install_property (object_class, PROP_EDITABLE,
g_param_spec_boolean ("editable",
_("Editable"),
/*_( */"XXX blurb" /*)*/,
FALSE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_CHANGED,
+ g_object_class_install_property (object_class, PROP_CHANGED,
g_param_spec_boolean ("changed",
_("Changed"),
/*_( */"XXX blurb" /*)*/,
@@ -359,7 +359,7 @@ style_makes_sense (const EContactName *name, const gchar *company, int style)
case 2:
if(name) {
if (name->additional && *name->additional)
- return TRUE;
+ return TRUE;
else
return FALSE;
}
@@ -384,7 +384,7 @@ name_to_style (const EContactName *name, const gchar *company, int style)
{
char *string;
char *strings[4], **stringptr;
- char *midstring[4], **midstrptr;
+ char *midstring[4], **midstrptr;
char *substring;
switch (style) {
case 0:
@@ -410,7 +410,7 @@ name_to_style (const EContactName *name, const gchar *company, int style)
string = g_strjoinv(" ", strings);
break;
case 2:
- midstrptr=midstring;
+ midstrptr=midstring;
if(name){
if (name->family && *name->family)
*(midstrptr++) = name->family;
@@ -426,7 +426,7 @@ name_to_style (const EContactName *name, const gchar *company, int style)
}
*stringptr = NULL;
string = g_strjoinv(" ", strings);
- break;
+ break;
case 3:
string = g_strdup(company);
break;
@@ -1363,13 +1363,13 @@ sensitize_phone (EContactEditor *editor)
static void
init_im_record_location (EContactEditor *editor, gint record)
{
-
+
#ifdef ENABLE_IM_LOCATION
GtkWidget *location_option_menu;
GtkWidget *location_menu;
gint i;
gchar *widget_name;
-
+
widget_name = g_strdup_printf ("optionmenu-im-location-%d", record);
location_option_menu = glade_xml_get_widget (editor->gui, widget_name);
g_free (widget_name);
@@ -1670,13 +1670,13 @@ static void
sensitize_im (EContactEditor *editor)
{
gint i;
- gboolean enabled;
+ gboolean enabled;
gboolean no_ims_supported;
-
+
enabled = editor->target_editable;
no_ims_supported = TRUE;
- for (i = 0; i < G_N_ELEMENTS (im_service); i++)
+ for (i = 0; i < G_N_ELEMENTS (im_service); i++)
if (is_field_supported (editor, im_service[i].field)) {
no_ims_supported = FALSE;
break;
@@ -1684,7 +1684,7 @@ sensitize_im (EContactEditor *editor)
if (no_ims_supported)
enabled = FALSE;
-
+
for (i = 1; i <= IM_SLOTS; i++) {
sensitize_im_record (editor, i, enabled);
}
@@ -1761,7 +1761,7 @@ fill_in_address_textview (EContactEditor *editor, gint record, EContactAddress *
} else {
gtk_text_buffer_insert (text_buffer, &iter_end, "", -1);
}
- gtk_text_buffer_get_iter_at_line (text_buffer, &iter_start, 0);
+ gtk_text_buffer_get_iter_at_line (text_buffer, &iter_start, 0);
gtk_text_buffer_place_cursor (text_buffer, &iter_start);
}
@@ -2025,7 +2025,7 @@ sensitize_address (EContactEditor *editor)
gboolean enabled = TRUE;
if (!editor->target_editable ||
- !(is_field_supported (editor, addresses [i]) ||
+ !(is_field_supported (editor, addresses [i]) ||
is_field_supported (editor, address_labels[i])))
enabled = FALSE;
@@ -2042,7 +2042,7 @@ typedef struct {
FieldMapping;
/* Table of widgets that interact with simple fields. This table is used to:
- *
+ *
* - Fill in data.
* - Extract data.
* - Set sensitivity based on backend capabilities.
@@ -2266,22 +2266,22 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
&img_buff, &photo.data.inlined.length)) {
GdkPixbuf *pixbuf, *new;
GdkPixbufLoader *loader = gdk_pixbuf_loader_new();
-
+
photo.data.inlined.data = (unsigned char *)img_buff;
img_buff = NULL;
gdk_pixbuf_loader_write (loader, photo.data.inlined.data, photo.data.inlined.length, NULL);
gdk_pixbuf_loader_close (loader, NULL);
-
+
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
if (pixbuf) {
int width, height, prompt_response;
g_object_ref (pixbuf);
-
+
height = gdk_pixbuf_get_height (pixbuf);
width = gdk_pixbuf_get_width (pixbuf);
if ((height > 96 || width > 96)) {
-
+
prompt_response = e_error_run (GTK_WINDOW (editor->app), "addressbook:prompt-resize", NULL);
if (prompt_response == GTK_RESPONSE_YES){
@@ -2292,7 +2292,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
width = width *96 / height;
height = 96;
}
-
+
new = gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR);
if (new) {
GdkPixbufFormat *format = gdk_pixbuf_loader_get_format (loader);
@@ -2317,11 +2317,11 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
}
editor->image_changed = FALSE;
g_object_unref (loader);
-
+
e_contact_set (contact, field_id, &photo);
-
+
g_free (photo.data.inlined.data);
-
+
}
else {
editor->image_changed = FALSE;
@@ -2331,7 +2331,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
}
else if (GTK_IS_TOGGLE_BUTTON (widget)) {
gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
-
+
e_contact_set (contact, field_id, val?(void *)1:NULL);
}
else {
@@ -2593,7 +2593,7 @@ full_name_response (GtkDialog *dialog, int response, EContactEditor *editor)
int style = 0;
gboolean editable = FALSE;
- g_object_get (dialog,
+ g_object_get (dialog,
"editable", &editable,
NULL);
@@ -2637,8 +2637,8 @@ full_name_clicked (GtkWidget *button, EContactEditor *editor)
{
GtkDialog *dialog = GTK_DIALOG (e_contact_editor_fullname_new (editor->name));
gboolean fullname_supported;
-
-
+
+
fullname_supported = is_field_supported (editor, E_CONTACT_FULL_NAME);
g_object_set (dialog,
@@ -2647,7 +2647,7 @@ full_name_clicked (GtkWidget *button, EContactEditor *editor)
g_signal_connect(dialog, "response",
G_CALLBACK (full_name_response), editor);
-
+
/* Close the fullname dialog if the editor is closed */
g_signal_connect_swapped (EAB_EDITOR (editor), "editor_closed",
G_CALLBACK (full_name_editor_delete_event_cb), GTK_WIDGET (dialog));
@@ -2661,7 +2661,7 @@ categories_response (GtkDialog *dialog, int response, EContactEditor *editor)
{
const char *categories;
GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories");
-
+
if (response == GTK_RESPONSE_OK) {
categories = e_categories_dialog_get_categories (E_CATEGORIES_DIALOG (dialog));
if (entry && GTK_IS_ENTRY(entry))
@@ -2704,14 +2704,14 @@ categories_clicked (GtkWidget *button, EContactEditor *editor)
g_free (categories);
return;
}
-
+
g_signal_connect(dialog, "response",
G_CALLBACK (categories_response), editor);
-
+
/* Close the category dialog if the editor is closed*/
g_signal_connect_swapped (EAB_EDITOR (editor), "editor_closed",
G_CALLBACK (categories_editor_delete_event_cb), GTK_WIDGET (dialog));
-
+
gtk_widget_show(GTK_WIDGET(dialog));
g_free (categories);
@@ -2789,7 +2789,7 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
gtk_file_chooser_set_preview_widget_active (file_chooser, TRUE);
preview = GTK_WIDGET (data);
filename = gtk_file_chooser_get_preview_filename (file_chooser);
- if (filename == NULL)
+ if (filename == NULL)
return;
pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
@@ -2984,7 +2984,7 @@ save_contact (EContactEditor *ce, gboolean should_close)
if (!ce->target_book)
return;
-
+
if (ce->target_editable && !e_book_is_writable (ce->source_book)) {
if (e_error_run (GTK_WINDOW (ce->app), "addressbook:prompt-move", NULL) == GTK_RESPONSE_NO)
@@ -2999,14 +2999,14 @@ save_contact (EContactEditor *ce, gboolean should_close)
company_name_string = gtk_entry_get_text (GTK_ENTRY (company_name));
if (strcmp (company_name_string , "")) {
- if (!strcmp (name_entry_string, ""))
+ if (!strcmp (name_entry_string, ""))
gtk_entry_set_text (GTK_ENTRY (entry_fullname), company_name_string);
if (!strcmp (file_as_entry_string, ""))
gtk_entry_set_text (GTK_ENTRY (entry_file_as), company_name_string);
}
extract_all (ce);
-
+
if (!e_contact_editor_is_valid (EAB_EDITOR (ce))) {
uid = e_contact_get (ce->contact, E_CONTACT_UID);
g_object_unref (ce->contact);
@@ -3017,7 +3017,7 @@ save_contact (EContactEditor *ce, gboolean should_close)
}
return;
}
-
+
real_save_contact (ce, should_close);
}
@@ -3060,11 +3060,11 @@ static const EContactField non_string_fields [] = {
E_CONTACT_CATEGORY_LIST,
E_CONTACT_BIRTH_DATE,
E_CONTACT_ANNIVERSARY
-
-
+
+
};
-static gboolean
+static gboolean
is_non_string_field (EContactField id)
{
int count = sizeof (non_string_fields) / sizeof (EContactField);
@@ -3075,7 +3075,7 @@ is_non_string_field (EContactField id)
return FALSE;
}
-
+
/* insert checks here (date format, for instance, etc.) */
static gboolean
@@ -3108,7 +3108,7 @@ e_contact_editor_is_valid (EABEditor *editor)
e_iterator_prev (iter)) {
const char *field_name = e_iterator_get (iter);
EContactField field_id = e_contact_field_id (field_name);
-
+
if (is_non_string_field (field_id)) {
if (e_contact_get_const (ce->contact, field_id) == NULL) {
g_string_append_printf (errmsg, _("%s'%s' is empty"),
@@ -3117,7 +3117,7 @@ e_contact_editor_is_valid (EABEditor *editor)
validation_error = TRUE;
break;
}
-
+
} else {
const char *text = e_contact_get_const (ce->contact, field_id);
@@ -3128,12 +3128,12 @@ e_contact_editor_is_valid (EABEditor *editor)
validation_error = TRUE;
break;
}
-
-
+
+
}
}
-
-
+
+
if (validation_error) {
g_string_append (errmsg, ".");
e_error_run (GTK_WINDOW (ce->app), "addressbook:generic-error",
@@ -3181,7 +3181,7 @@ static gint
app_delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
{
EContactEditor *ce;
-
+
ce = E_CONTACT_EDITOR (data);
/* if we're saving, don't allow the dialog to close */
@@ -3411,7 +3411,7 @@ e_contact_editor_dispose (GObject *object)
g_object_unref(e_contact_editor->contact);
e_contact_editor->contact = NULL;
}
-
+
if (e_contact_editor->source_book) {
g_object_unref(e_contact_editor->source_book);
e_contact_editor->source_book = NULL;
@@ -3534,7 +3534,7 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
EContactEditor *editor;
editor = E_CONTACT_EDITOR (object);
-
+
switch (prop_id){
case PROP_SOURCE_BOOK: {
gboolean writable;
@@ -3551,7 +3551,7 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
editor->source_book = source_book;
g_object_ref (editor->source_book);
-
+
if (!editor->target_book) {
editor->target_book = editor->source_book;
g_object_ref (editor->target_book);
@@ -3672,7 +3672,7 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
editor->required_fields = g_value_get_object (value);
if (editor->required_fields)
g_object_ref (editor->required_fields);
- else
+ else
editor->required_fields = e_list_new (NULL, NULL, NULL);
break;
default:
@@ -3804,7 +3804,7 @@ e_contact_editor_create_web(gchar *name,
if (a11y != NULL) {
atk_object_set_name (a11y, string1);
}
-
+
gtk_widget_show (widget);
return widget;
}
diff --git a/addressbook/gui/contact-editor/e-contact-editor.h b/addressbook/gui/contact-editor/e-contact-editor.h
index c93d57301f..10dd305347 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.h
+++ b/addressbook/gui/contact-editor/e-contact-editor.h
@@ -57,7 +57,7 @@ typedef struct _EContactEditorClass EContactEditorClass;
struct _EContactEditor
{
EABEditor object;
-
+
/* item specific fields */
EBook *source_book;
EBook *target_book;
@@ -65,7 +65,7 @@ struct _EContactEditor
/* UI handler */
BonoboUIComponent *uic;
-
+
GladeXML *gui;
GtkWidget *app;
@@ -92,7 +92,7 @@ struct _EContactEditor
guint image_changed : 1;
EList *writable_fields;
-
+
EList *required_fields;
/* ID for async load_source call */
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
index 1fc68734f0..5a89dea03d 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.c
@@ -12,12 +12,12 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -133,7 +133,7 @@ merge_cb (EBook *book, EBookStatus status, gpointer closure)
if (qa->cb)
qa->cb (NULL, qa->closure);
}
-
+
quick_add_unref (qa);
}
@@ -157,7 +157,7 @@ contact_added_cb (EContactEditor *ce, EBookStatus status, EContact *contact, gpo
if (qa->cb)
qa->cb (qa->contact, qa->closure);
-
+
/* We don't need to unref qa because we set_data_full below */
g_object_set_data (G_OBJECT (ce), "quick_add", NULL);
}
@@ -257,7 +257,7 @@ clicked_cb (GtkWidget *w, gint button, gpointer closure)
quick_add_merge_contact (qa);
} else if (button == QUICK_ADD_RESPONSE_EDIT_FULL) {
-
+
/* EDIT FULL */
edit_contact (qa);
@@ -304,9 +304,9 @@ build_quick_add_dialog (QuickAdd *qa)
NULL);
gtk_widget_ensure_style (dialog);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
+ gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
0);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area),
+ gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area),
12);
g_signal_connect (dialog, "response", G_CALLBACK (clicked_cb), qa);
@@ -337,8 +337,8 @@ build_quick_add_dialog (QuickAdd *qa)
g_signal_connect (
qa->option_menu, "changed",
G_CALLBACK (source_changed), qa);
-
- g_object_unref (source_list);
+
+ g_object_unref (source_list);
table = GTK_TABLE (gtk_table_new (3, 2, FALSE));
gtk_table_set_row_spacings (table, 6);
@@ -377,13 +377,13 @@ build_quick_add_dialog (QuickAdd *qa)
1, 2, 2, 3,
GTK_EXPAND | GTK_FILL, 0, xpad, ypad);
- gtk_container_set_border_width (GTK_CONTAINER (table),
+ gtk_container_set_border_width (GTK_CONTAINER (table),
12);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
GTK_WIDGET (table),
FALSE, FALSE, 0);
gtk_widget_show_all (GTK_WIDGET (table));
-
+
return dialog;
}
@@ -452,13 +452,13 @@ e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, g
in_quote = !in_quote;
}
-
+
if (last_at == NULL) {
/* No at sign, so we treat it all as the name */
name = g_strdup (text);
} else {
gboolean bad_char = FALSE;
-
+
/* walk backwards to whitespace or a < or a quote... */
while (last_at >= text && !bad_char
&& !(isspace ((gint) *last_at) || *last_at == '<' || *last_at == '"')) {
@@ -482,9 +482,9 @@ e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, g
}
/* If all else has failed, make it the name. */
- if (name == NULL && email == NULL)
+ if (name == NULL && email == NULL)
name = g_strdup (text);
-
+
/* Clean up email, remove bracketing <>s */
@@ -502,7 +502,7 @@ e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, g
if (changed)
g_strstrip (email);
}
-
+
e_contact_quick_add (name, email, cb, closure);
g_free (name);
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.h b/addressbook/gui/contact-editor/e-contact-quick-add.h
index ebc32ecdb1..cdb539b1b0 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.h
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.h
@@ -12,12 +12,12 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -31,7 +31,7 @@
typedef void (*EContactQuickAddCallback) (EContact *new_contact, gpointer closure);
-void e_contact_quick_add (const gchar *name, const gchar *email,
+void e_contact_quick_add (const gchar *name, const gchar *email,
EContactQuickAddCallback cb, gpointer closure);
void e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, gpointer closure);
diff --git a/addressbook/gui/contact-editor/eab-editor.c b/addressbook/gui/contact-editor/eab-editor.c
index 5c9cd12678..b11c9af657 100644
--- a/addressbook/gui/contact-editor/eab-editor.c
+++ b/addressbook/gui/contact-editor/eab-editor.c
@@ -233,7 +233,7 @@ gboolean
eab_editor_is_valid (EABEditor *editor)
{
g_return_val_if_fail (EAB_IS_EDITOR (editor), FALSE);
-
+
if (EAB_EDITOR_GET_CLASS(editor)->is_valid)
return EAB_EDITOR_GET_CLASS(editor)->is_valid (editor);
else
@@ -244,17 +244,17 @@ GtkWindow*
eab_editor_get_window (EABEditor *editor)
{
g_return_val_if_fail (EAB_IS_EDITOR (editor), NULL);
-
+
if (EAB_EDITOR_GET_CLASS(editor)->get_window)
return EAB_EDITOR_GET_CLASS(editor)->get_window (editor);
else
return NULL;
}
/* This function prompts for saving if editor conents are in changed state and
- save or discards or cancels(just returns with out doing anything) according to user input.
- Editor gets destoryed in case of save and discard case.
+ save or discards or cancels(just returns with out doing anything) according to user input.
+ Editor gets destoryed in case of save and discard case.
*/
-
+
gboolean
eab_editor_prompt_to_save_changes (EABEditor *editor, GtkWindow *window)
{
@@ -319,13 +319,13 @@ eab_editor_confirm_delete (GtkWindow *parent, gboolean plural, gboolean is_list,
if (is_list) {
/* contact list(s) */
if (!plural)
- msg = g_strdup_printf (_("Are you sure you want\nto delete contact list (%s)?"),
+ msg = g_strdup_printf (_("Are you sure you want\nto delete contact list (%s)?"),
name?name:"");
else
msg = g_strdup (_("Are you sure you want\nto delete these contact lists?"));
}
else {
- /* contact(s) */
+ /* contact(s) */
if (!plural)
msg = g_strdup_printf (_("Are you sure you want\nto delete contact (%s)?"),
name?name:"");
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index 67b92c904a..85a7b507d5 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -162,28 +162,28 @@ e_contact_list_editor_class_init (EContactListEditorClass *klass)
object_class->get_property = e_contact_list_editor_get_property;
object_class->dispose = e_contact_list_editor_dispose;
- g_object_class_install_property (object_class, PROP_BOOK,
+ g_object_class_install_property (object_class, PROP_BOOK,
g_param_spec_object ("book",
_("Book"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_BOOK,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_CONTACT,
+ g_object_class_install_property (object_class, PROP_CONTACT,
g_param_spec_object ("contact",
_("Contact"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_CONTACT,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_IS_NEW_LIST,
+ g_object_class_install_property (object_class, PROP_IS_NEW_LIST,
g_param_spec_boolean ("is_new_list",
_("Is New List"),
/*_( */"XXX blurb" /*)*/,
FALSE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_EDITABLE,
+ g_object_class_install_property (object_class, PROP_EDITABLE,
g_param_spec_boolean ("editable",
_("Editable"),
/*_( */"XXX blurb" /*)*/,
@@ -253,7 +253,7 @@ e_contact_list_editor_init (EContactListEditor *editor)
"changed", G_CALLBACK(list_name_changed_cb), editor);
g_signal_connect (editor->visible_addrs_checkbutton,
"toggled", G_CALLBACK(visible_addrs_toggled_cb), editor);
- g_signal_connect (editor->email_entry,
+ g_signal_connect (editor->email_entry,
"key-press-event", G_CALLBACK(email_key_pressed), editor);
e_table_drag_dest_set (e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table)),
@@ -270,7 +270,7 @@ e_contact_list_editor_init (EContactListEditor *editor)
"clicked", G_CALLBACK(save_and_close_cb), editor);
g_signal_connect (editor->cancel_button,
"clicked", G_CALLBACK(close_cb), editor);
-
+
g_signal_connect (editor->list_image,
"changed", G_CALLBACK(list_image_changed_cb), editor);
@@ -425,7 +425,7 @@ save_contact (EContactListEditor *cle, gboolean should_close)
if (cle->book) {
EditorCloseStruct *ecs = g_new(EditorCloseStruct, 1);
-
+
ecs->cle = cle;
g_object_ref (cle);
ecs->should_close = should_close;
@@ -539,7 +539,7 @@ e_contact_list_editor_set_property (GObject *object, guint prop_id,
EContactListEditor *editor;
editor = E_CONTACT_LIST_EDITOR (object);
-
+
switch (prop_id){
case PROP_BOOK: {
gboolean changed;
@@ -574,7 +574,7 @@ e_contact_list_editor_set_property (GObject *object, guint prop_id,
gboolean changed = (editor->is_new_list != new_value);
editor->is_new_list = new_value;
-
+
if (changed)
command_state_changed (editor);
break;
@@ -664,7 +664,7 @@ e_contact_list_editor_create_table(gchar *name,
gchar *string1, gchar *string2,
gint int1, gint int2)
{
-
+
ETableModel *model;
GtkWidget *table;
char *etspecfile;
@@ -685,8 +685,8 @@ e_contact_list_editor_create_table(gchar *name,
return table;
}
-static gboolean
-contact_already_exists (EContactListModel *model, const char *email)
+static gboolean
+contact_already_exists (EContactListModel *model, const char *email)
{
int row_count;
int row;
@@ -840,13 +840,13 @@ e_contact_list_editor_create_name_selector (gchar *name,
name_selector_model = e_name_selector_peek_model (name_selector);
e_name_selector_model_add_section (name_selector_model, "Members", "Members", NULL);
-
+
name_selector_entry = e_name_selector_peek_section_entry (name_selector, "Members");
e_name_selector_entry_set_contact_editor_func (name_selector_entry, e_contact_editor_new);
e_name_selector_entry_set_contact_list_editor_func (name_selector_entry, e_contact_list_editor_new);
gtk_widget_show (GTK_WIDGET (name_selector_entry));
-
+
return (GtkWidget *)name_selector_entry;
}
@@ -862,7 +862,7 @@ add_email_cb (GtkWidget *w, EContactListEditor *editor)
/* Skip to the end of the list */
if (adj->upper - adj->lower > adj->page_size)
gtk_adjustment_set_value (adj, adj->upper);
-
+
editor->changed = TRUE;
}
@@ -877,19 +877,19 @@ email_match_selected (GtkWidget *w, EDestination *destination, EContactListEdito
char *email;
EDestinationStore *store;
GtkAdjustment *adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (editor->table));
-
+
email = g_strdup(e_destination_get_address (destination));
store = e_name_selector_entry_peek_destination_store ((ENameSelectorEntry *)w);
e_destination_store_remove_destination (store, destination);
- gtk_entry_set_text (GTK_ENTRY(editor->email_entry), "");
-
+ gtk_entry_set_text (GTK_ENTRY(editor->email_entry), "");
+
if (email && *email) {
e_contact_list_model_add_email (E_CONTACT_LIST_MODEL(editor->model), email);
/* Skip to the end of the list */
if (adj->upper - adj->lower > adj->page_size)
gtk_adjustment_set_value (adj, adj->upper);
-
+
editor->changed = TRUE;
}
@@ -970,7 +970,7 @@ email_key_pressed (GtkWidget *w, GdkEventKey *event, EContactListEditor *editor)
if (event->keyval == GDK_comma || event->keyval == GDK_Return) {
ENameSelectorEntry *entry = (ENameSelectorEntry *)w;
-
+
g_signal_emit_by_name (entry, "activate", 0);
add_email_cb (w, editor);
@@ -1086,14 +1086,14 @@ table_drag_data_received_cb (ETable *table, int row, int col,
for (c = contact_list; c; c = c->next) {
EContact *contact = c->data;
- if (!e_contact_get (contact, E_CONTACT_IS_LIST)) {
+ if (!e_contact_get (contact, E_CONTACT_IS_LIST)) {
if (e_contact_get (contact, E_CONTACT_EMAIL_1)) {
if (! contact_already_exists (E_CONTACT_LIST_MODEL (editor->model)
, e_contact_get (contact, E_CONTACT_EMAIL_1))) {
e_contact_list_model_add_contact (E_CONTACT_LIST_MODEL (editor->model),
contact,
0 /* Hard-wired for default e-mail */);
-
+
changed = TRUE;
}
}
@@ -1252,7 +1252,7 @@ fill_in_info(EContactListEditor *editor)
if (name) e_destination_set_name (list_dest, name);
if (email) e_destination_set_email (list_dest, email);
e_destination_set_html_mail_pref (list_dest, html_pref);
-
+
e_contact_list_model_add_destination (E_CONTACT_LIST_MODEL (editor->model), list_dest);
}
@@ -1265,7 +1265,7 @@ fill_in_info(EContactListEditor *editor)
e_contact_photo_free (photo);
}
}
-
+
if (editor->book) {
e_source_combo_box_set_active (
E_SOURCE_COMBO_BOX (editor->source_menu),
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c
index d0597e9eea..767e461d87 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-model.c
@@ -208,9 +208,9 @@ e_contact_list_model_add_email (EContactListModel *model,
for (row = 0; row < row_count; row++) {
list_email = (char *) e_table_model_value_at (E_TABLE_MODEL (model), 1, row);
-
+
if (strcmp (list_email, email) == 0) {
- if (e_error_run (NULL, "addressbook:ask-list-add-exists",
+ if (e_error_run (NULL, "addressbook:ask-list-add-exists",
email) != GTK_RESPONSE_YES)
return;
break;
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
index ff6e86eb6d..ae80059eaa 100644
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ b/addressbook/gui/merging/eab-contact-compare.c
@@ -13,12 +13,12 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -91,7 +91,7 @@ name_fragment_match_with_synonyms (const gchar *a, const gchar *b, gboolean stri
if (!(a && b && *a && *b))
return FALSE;
- if(!e_utf8_casefold_collate (a, b))
+ if(!e_utf8_casefold_collate (a, b))
return TRUE;
/* Check for nicknames. Yes, the linear search blows. */
@@ -100,7 +100,7 @@ name_fragment_match_with_synonyms (const gchar *a, const gchar *b, gboolean stri
if (!e_utf8_casefold_collate (name_synonyms[i][0], a)
&& !e_utf8_casefold_collate (name_synonyms[i][1], b))
return TRUE;
-
+
if (!e_utf8_casefold_collate (name_synonyms[i][0], b)
&& !e_utf8_casefold_collate (name_synonyms[i][1], a))
return TRUE;
@@ -165,7 +165,7 @@ eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str, gb
++fragment_count;
for (i = 0; familyv && familyv[i]; ++i)
++fragment_count;
-
+
for (i = 0; namev[i] && this_part_match != EAB_CONTACT_MATCH_PART_NONE; ++i) {
if (*namev[i]) {
@@ -194,7 +194,7 @@ eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str, gb
if (addv && this_part_match == EAB_CONTACT_MATCH_PART_NONE) {
for (j = 0; addv[j]; ++j) {
if (name_fragment_match_with_synonyms (addv[j], namev[i], allow_partial_matches)) {
-
+
this_part_match = EAB_CONTACT_MATCH_PART_ADDITIONAL_NAME;
g_free (addv[j]);
@@ -234,7 +234,7 @@ eab_contact_compare_name_to_string_full (EContact *contact, const gchar *str, gb
if (match_count > 0)
match_type = EAB_CONTACT_MATCH_VAGUE;
-
+
if (fragment_count == match_count) {
match_type = EAB_CONTACT_MATCH_EXACT;
@@ -434,8 +434,8 @@ match_email_hostname (const gchar *addr1, const gchar *addr2)
--addr2;
}
if((*addr1 == '@' && *addr2 != '@' ) || (*addr2 == '@' && *addr1 != '@'))
- return FALSE;
-
+ return FALSE;
+
return TRUE;
}
@@ -446,7 +446,7 @@ compare_email_addresses (const gchar *addr1, const gchar *addr2)
addr2 == NULL || *addr2 == 0)
return EAB_CONTACT_MATCH_NOT_APPLICABLE;
- if (match_email_username (addr1, addr2))
+ if (match_email_username (addr1, addr2))
return match_email_hostname (addr1, addr2) ? EAB_CONTACT_MATCH_EXACT : EAB_CONTACT_MATCH_VAGUE;
return EAB_CONTACT_MATCH_NONE;
@@ -487,7 +487,7 @@ eab_contact_compare_email (EContact *contact1, EContact *contact2)
char *addr2 = (char *) i2->data;
match = combine_comparisons (match, compare_email_addresses (addr1, addr2));
-
+
i2 = i2->next;
}
@@ -666,13 +666,13 @@ use_common_book_cb (EBook *book, gpointer closure)
if (contact_name->additional && *contact_name->additional)
query_parts[p++] = g_strdup_printf ("(contains \"full_name\" \"%s\")", contact_name->additional);
-
+
if (contact_name->family && *contact_name->family)
query_parts[p++] = g_strdup_printf ("(contains \"full_name\" \"%s\")", contact_name->family);
e_contact_name_free (contact_name);
}
-
+
contact_email = e_contact_get (contact, E_CONTACT_EMAIL);
if (contact_email) {
GList *iter;
@@ -695,8 +695,8 @@ use_common_book_cb (EBook *book, gpointer closure)
g_list_foreach (contact_email, (GFunc)g_free, NULL);
g_list_free (contact_email);
}
-
-
+
+
/* Build up our full query from the parts. */
query_parts[p] = NULL;
qj = g_strjoinv (" ", query_parts);
@@ -751,7 +751,7 @@ eab_contact_locate_match (EContact *contact, EABContactMatchQueryCallback cb, gp
* @avoid: A list of contacts to not match. These will not show up in the search.
* @cb: The function to call.
* @closure: The closure to add to the call.
- *
+ *
* Look for the best match and return it using the EABContactMatchQueryCallback.
**/
void
diff --git a/addressbook/gui/merging/eab-contact-compare.h b/addressbook/gui/merging/eab-contact-compare.h
index be835539e2..fe3891fab5 100644
--- a/addressbook/gui/merging/eab-contact-compare.h
+++ b/addressbook/gui/merging/eab-contact-compare.h
@@ -13,12 +13,12 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c
index a37f877fd8..2f6955bb0f 100644
--- a/addressbook/gui/merging/eab-contact-merging.c
+++ b/addressbook/gui/merging/eab-contact-merging.c
@@ -190,7 +190,7 @@ mergeit (EContactMergingLookup *lookup)
dialog = (GtkDialog *)(gtk_dialog_new_with_buttons (_("Merge Contact"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL));
gtk_container_border_width (GTK_CONTAINER(dialog), 5);
- scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+ scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
@@ -218,7 +218,7 @@ mergeit (EContactMergingLookup *lookup)
if (string && *string) {
/*Four email id's present, should be compared with all email id's in duplicate contact */
/*Merge only if number of email id's in existing contact is less than 4 */
- if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2
+ if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2
|| field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email < 4)) {
row++;
str = (char *)e_contact_get_const (lookup->contact, field);
@@ -237,7 +237,7 @@ mergeit (EContactMergingLookup *lookup)
continue;
case 2:
/*New contact has email and it is equal to neither of the 2 emails in the duplicate contact*/
- if((str && *str) &&
+ if((str && *str) &&
(g_ascii_strcasecmp(str,e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1))) &&
(g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str))) {
field = E_CONTACT_EMAIL_3;
@@ -247,9 +247,9 @@ mergeit (EContactMergingLookup *lookup)
continue;
case 3:
/*New contact has email and it is equal to none of the 3 emails in the duplicate contact*/
- if((str && *str) &&
- (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str)) &&
- (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str)) &&
+ if((str && *str) &&
+ (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_1),str)) &&
+ (g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_2),str)) &&
(g_ascii_strcasecmp(e_contact_get_const (lookup->match, E_CONTACT_EMAIL_3),str)))
field = E_CONTACT_EMAIL_4;
else
@@ -260,11 +260,11 @@ mergeit (EContactMergingLookup *lookup)
gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1);
- dropdown = gtk_combo_box_new_text();
+ dropdown = gtk_combo_box_new_text();
gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string);
data = g_new0 (dropdown_data, 1);
-
+
gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), "");
gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0);
@@ -291,26 +291,26 @@ mergeit (EContactMergingLookup *lookup)
gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)label, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget*)hbox, 1, 2, row, row + 1);
continue;
- }
+ }
/*for all string fields except name and email*/
if(!(string1 && *string1) || (g_ascii_strcasecmp(string, string1))) {
row++;
label = gtk_label_new (e_contact_pretty_name(field));
- hbox = gtk_hbox_new (FALSE, 0);
+ hbox = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)label, FALSE, FALSE, 0);
- gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1);
+ gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1);
data = g_new0 (dropdown_data, 1);
- dropdown = gtk_combo_box_new_text();
+ dropdown = gtk_combo_box_new_text();
gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string);
e_contact_set (lookup->match, field, string);
if (string1 && *string1)
gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string1);
- else
+ else
gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), "");
- gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0);
data->field = field;
data->match = lookup->match;
@@ -322,20 +322,20 @@ mergeit (EContactMergingLookup *lookup)
gtk_box_pack_start (GTK_BOX(hbox), (GtkWidget*)dropdown, FALSE, FALSE, 0);
gtk_table_attach_defaults (table, (GtkWidget *)hbox, 1, 2, row, row + 1);
gtk_widget_show_all ((GtkWidget *)dropdown);
- }
+ }
}
}
gtk_window_set_default_size (GTK_WINDOW (dialog), 420, 300);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), GTK_WIDGET (table));
- gtk_box_pack_start (GTK_BOX (dialog->vbox), GTK_WIDGET (scrolled_window), TRUE, TRUE, 0);
- gtk_widget_show (scrolled_window);
- g_signal_connect (dialog, "map-event", G_CALLBACK (dialog_map), table);
+ gtk_box_pack_start (GTK_BOX (dialog->vbox), GTK_WIDGET (scrolled_window), TRUE, TRUE, 0);
+ gtk_widget_show (scrolled_window);
+ g_signal_connect (dialog, "map-event", G_CALLBACK (dialog_map), table);
gtk_widget_show_all ((GtkWidget *)table);
result = gtk_dialog_run (dialog);
switch (result)
- {
+ {
case GTK_RESPONSE_OK:
lookup->contact = lookup->match;
e_book_async_remove_contact (lookup->book, lookup->match, NULL, lookup);
@@ -344,7 +344,7 @@ mergeit (EContactMergingLookup *lookup)
break;
case GTK_RESPONSE_CANCEL:
value = 0;
- break;
+ break;
}
gtk_widget_destroy (GTK_WIDGET (dialog));
g_list_free (email_attr_list);
@@ -353,17 +353,17 @@ mergeit (EContactMergingLookup *lookup)
static gboolean
check_if_same (EContact *contact, EContact *match)
-{
+{
EContactField field;
GList *email_attr_list;
int num_of_email;
- char *str = NULL, *string = NULL, *string1 = NULL;
+ char *str = NULL, *string = NULL, *string1 = NULL;
for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) ; field++) {
email_attr_list = e_contact_get_attributes (match, E_CONTACT_EMAIL);
num_of_email = g_list_length (email_attr_list);
- if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2
+ if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2
|| field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email<4)) {
str = (char *)e_contact_get_const (contact, field);
switch(num_of_email)
@@ -374,17 +374,17 @@ check_if_same (EContact *contact, EContact *match)
if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)))
return FALSE;
case 2:
- if((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) &&
+ if((str && *str) && (g_ascii_strcasecmp(str,e_contact_get_const (match, E_CONTACT_EMAIL_1))) &&
(g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str)))
return FALSE;
case 3:
- if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) &&
+ if((str && *str) && (g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_1),str)) &&
(g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_2),str)) &&
(g_ascii_strcasecmp(e_contact_get_const (match, E_CONTACT_EMAIL_3),str)))
return FALSE;
}
}
- else {
+ else {
string = (char *)e_contact_get_const (contact, field);
string1 = (char *)e_contact_get_const (match, field);
if ((string && *string) && (string1 && *string1) && (g_ascii_strcasecmp(string1,string)))
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index dae9c68745..ae553ad4e6 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -342,7 +342,7 @@ eab_model_class_init (GObjectClass *object_class)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
+
eab_model_signals [SEARCH_RESULT] =
g_signal_new ("search_result",
G_OBJECT_CLASS_TYPE (object_class),
@@ -351,7 +351,7 @@ eab_model_class_init (GObjectClass *object_class)
NULL, NULL,
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
-
+
eab_model_signals [FOLDER_BAR_MESSAGE] =
g_signal_new ("folder_bar_message",
G_OBJECT_CLASS_TYPE (object_class),
@@ -554,7 +554,7 @@ eab_model_set_property (GObject *object, guint prop_id, const GValue *value, GPa
gboolean need_get_book_view = FALSE;
model = EAB_MODEL (object);
-
+
switch (prop_id){
case PROP_BOOK:
if (model->book) {
@@ -673,7 +673,7 @@ eab_model_new (void)
EABModel *et;
et = g_object_new (EAB_TYPE_MODEL, NULL);
-
+
return et;
}
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index 29a9ed35af..06caebedee 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -232,7 +232,7 @@ addressbook_incarnate (EReflowModel *erm, int i, GnomeCanvasGroup *parent)
g_signal_connect (item, "drag_begin",
G_CALLBACK(adapter_drag_begin), adapter);
-
+
return item;
}
@@ -264,12 +264,12 @@ remove_contacts (EABModel *model,
{
GArray *indices = (GArray *) data;
int count = indices->len;
-
+
if (count == 1)
e_reflow_model_item_removed (E_REFLOW_MODEL (adapter), g_array_index (indices, gint, 0));
- else
+ else
e_reflow_model_changed (E_REFLOW_MODEL (adapter));
-
+
}
static void
@@ -378,7 +378,7 @@ e_addressbook_reflow_adapter_class_init (GObjectClass *object_class)
object_class->get_property = addressbook_get_property;
object_class->dispose = addressbook_dispose;
- g_object_class_install_property (object_class, PROP_BOOK,
+ g_object_class_install_property (object_class, PROP_BOOK,
g_param_spec_object ("book",
_("Book"),
/*_( */"XXX blurb" /*)*/,
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c
index 65a82d03c9..b208952245 100644
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c
@@ -152,7 +152,7 @@ addressbook_is_cell_editable (ETableModel *etc, int col, int row)
else if (contact && e_contact_get ((EContact *) contact, E_CONTACT_IS_LIST))
/* we only allow editing of the name and file as for
lists */
- return col == E_CONTACT_FULL_NAME || col == E_CONTACT_FILE_AS;
+ return col == E_CONTACT_FULL_NAME || col == E_CONTACT_FILE_AS;
else
return col < E_CONTACT_LAST_SIMPLE_STRING;
#endif
@@ -265,10 +265,10 @@ remove_contacts (EABModel *model,
{
GArray *indices = (GArray *) data;
int count = indices->len;
-
-
+
+
e_table_model_pre_change (E_TABLE_MODEL (adapter));
- if (count == 1)
+ if (count == 1)
e_table_model_rows_deleted (E_TABLE_MODEL (adapter), g_array_index (indices, gint, 0), 1);
else
e_table_model_changed (E_TABLE_MODEL (adapter));
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 483b3b4162..b591389d7c 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-addressbook-view.c
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
@@ -212,32 +212,32 @@ eab_view_class_init (EABViewClass *klass)
object_class->get_property = eab_view_get_property;
object_class->dispose = eab_view_dispose;
- g_object_class_install_property (object_class, PROP_BOOK,
+ g_object_class_install_property (object_class, PROP_BOOK,
g_param_spec_object ("book",
_("Book"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_BOOK,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_SOURCE,
+ g_object_class_install_property (object_class, PROP_SOURCE,
g_param_spec_object ("source",
_("Source"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_SOURCE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_QUERY,
+ g_object_class_install_property (object_class, PROP_QUERY,
g_param_spec_string ("query",
_("Query"),
/*_( */"XXX blurb" /*)*/,
NULL,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_TYPE,
+ g_object_class_install_property (object_class, PROP_TYPE,
g_param_spec_int ("type",
_("Type"),
/*_( */"XXX blurb" /*)*/,
- EAB_VIEW_NONE,
+ EAB_VIEW_NONE,
EAB_VIEW_TABLE,
EAB_VIEW_NONE,
G_PARAM_READWRITE));
@@ -361,7 +361,7 @@ eab_view_dispose (GObject *object)
gtk_widget_destroy (eav->invisible);
eav->invisible = NULL;
}
-
+
/*
if (eav->search_context) {
g_object_unref (eav->search_context);
@@ -450,13 +450,13 @@ eab_view_new (void)
rule_context_add_part, rule_context_next_part);
rule_context_add_rule_set (eav->search_context, "ruleset", filter_rule_get_type (),
rule_context_add_rule, rule_context_next_rule);
-
+
userfile = g_build_filename ( g_get_home_dir (), ".evolution/addressbook/searches.xml", NULL);
xmlfile = g_build_filename (SEARCH_RULE_DIR, "addresstypes.xml", NULL);
-
+
g_object_set_data_full (G_OBJECT (eav->search_context), "user", userfile, g_free);
g_object_set_data_full (G_OBJECT (eav->search_context), "system", xmlfile, g_free);
-
+
rule_context_load (eav->search_context, xmlfile, userfile);
eav->search_rule = filter_rule_new ();
@@ -468,7 +468,7 @@ eab_view_new (void)
filter_rule_add_part (eav->search_rule, filter_part_clone (part));
eav->search = e_filter_bar_new (eav->search_context, xmlfile, userfile, NULL, eav);
-
+
g_free (xmlfile);
g_free (userfile);
@@ -508,9 +508,9 @@ eab_view_new (void)
clipboard_atom,
GDK_SELECTION_TYPE_STRING,
0);
-
+
g_signal_connect (eav->invisible, "selection_get",
- G_CALLBACK (selection_get),
+ G_CALLBACK (selection_get),
eav);
g_signal_connect (eav->invisible, "selection_clear_event",
G_CALLBACK (selection_clear_event),
@@ -604,7 +604,7 @@ set_view_preview (EABView *view)
state ? "1" : "0", NULL);
eab_view_show_contact_preview (view, state);
-
+
g_object_unref (gconf_client);
}
@@ -1005,7 +1005,7 @@ do_popup_menu(EABView *view, GdkEvent *event)
contact_and_book->closure = cards;
e_selection_model_foreach(selection_model, get_card_1, contact_and_book);
}
-
+
/** @HookPoint-EABPopup:Addressbook view Context Menu
* @Id: org.gnome.evolution.addressbook.view.popup
* @Class: org.gnome.evolution.addresbook.popup:1.0
@@ -1055,7 +1055,7 @@ selection_changed (GObject *o, EABView *view)
eab_contact_display_render (EAB_CONTACT_DISPLAY (view->contact_display), NULL,
EAB_CONTACT_DISPLAY_RENDER_NORMAL);
}
-
+
}
static void
@@ -1069,7 +1069,7 @@ table_double_click(ETableScrolled *table, gint row, gint col, GdkEvent *event, E
g_object_get(model,
"book", &book,
NULL);
-
+
g_return_if_fail (E_IS_BOOK (book));
if (e_contact_get (contact, E_CONTACT_IS_LIST))
@@ -1228,10 +1228,10 @@ contacts_removed (EABModel *model, gpointer data, EABView *eav)
gint i;
for (i = 0; i < count; i ++) {
-
-
+
+
if (eav->displayed_contact == g_array_index (indices, gint, i)) {
-
+
/* if the contact that's presently displayed is changed, clear the display */
eab_contact_display_render (EAB_CONTACT_DISPLAY (eav->contact_display), NULL,
EAB_CONTACT_DISPLAY_RENDER_NORMAL);
@@ -1288,7 +1288,7 @@ create_table_view (EABView *view)
ETableModel *adapter;
GtkWidget *table;
char *etspecfile;
-
+
adapter = eab_table_adapter_new(view->model);
/* Here we create the table. We give it the three pieces of
@@ -1315,7 +1315,7 @@ create_table_view (EABView *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 | GDK_ACTION_COPY);
-
+
g_signal_connect (E_TABLE_SCROLLED(table)->table,
"table_drag_data_get",
G_CALLBACK (table_drag_data_get),
@@ -1396,14 +1396,14 @@ search_activated (ESearchBar *esb, EABView *v)
}
g_string_free (s, TRUE);
- } else
+ } else
search_query = g_strdup ("(contains \"x-evolution-any-field\" \"\")");
/* Merge view and sexp */
subid = e_search_bar_get_viewitem_id (esb);
if (subid) {
- master_list = get_master_list ();
+ master_list = get_master_list ();
category_name = g_list_nth_data (master_list, subid-1);
view_sexp = g_strdup_printf ("(is \"category_list\" \"%s\")", category_name);
search_query = g_strconcat ("(and ", view_sexp, search_query, ")", NULL);
@@ -1460,7 +1460,7 @@ compare_subitems (const void *a, const void *b)
g_free (collate_a);
g_free (collate_b);
-
+
return ret;
}
@@ -1502,7 +1502,7 @@ make_suboptions (EABView *view)
GList *master_list;
gint i, N;
GtkWidget *menu;
-
+
master_list = get_master_list ();
N = g_list_length (master_list);
subitems = g_new (EABSearchBarItem, N+2);
@@ -1521,7 +1521,7 @@ make_suboptions (EABView *view)
subitems[N+1].search.id = -1;
subitems[N+1].search.text = NULL;
subitems[N+1].image = NULL;
-
+
qsort (subitems + 1, N, sizeof (subitems[0]), compare_subitems);
menu = generate_viewoption_menu (subitems);
e_search_bar_set_viewoption_menu ((ESearchBar *)view->search, menu);
@@ -1620,7 +1620,7 @@ eab_view_setup_menus (EABView *view,
/**
* eab_view_discard_menus:
* @view: An addressbook view.
- *
+ *
* Makes an addressbook view discard its GAL view menus and its views instance
* objects. This should be called when the corresponding Bonobo component is
* deactivated.
@@ -1688,8 +1688,8 @@ eab_view_print (EABView *view, GtkPrintOperationAction action)
}
}
-/* callback function to handle removal of contacts for
- * which a user doesnt have write permission
+/* callback function to handle removal of contacts for
+ * which a user doesnt have write permission
*/
static void delete_contacts_cb (EBook *book, EBookStatus status, gpointer closure)
{
@@ -1715,10 +1715,10 @@ eab_view_delete_selection(EABView *view, gboolean is_delete)
EContact *contact;
ETable *etable = NULL;
EMinicardView *card_view;
- ESelectionModel *selection_model = NULL;
+ ESelectionModel *selection_model = NULL;
char *name = NULL;
gint row = 0, select;
-
+
list = get_selected_contacts (view);
contact = list->data;
@@ -1738,11 +1738,11 @@ eab_view_delete_selection(EABView *view, gboolean is_delete)
else if (view->view_type == EAB_VIEW_TABLE) {
etable = e_table_scrolled_get_table(E_TABLE_SCROLLED(view->widget));
- row = e_table_get_cursor_row (E_TABLE (etable));
+ row = e_table_get_cursor_row (E_TABLE (etable));
}
/* confirm delete */
- if (is_delete &&
+ if (is_delete &&
!eab_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(view->widget)),
plural, is_list, name)) {
g_free (name);
@@ -1765,7 +1765,7 @@ eab_view_delete_selection(EABView *view, gboolean is_delete)
ids,
delete_contacts_cb,
NULL);
-
+
g_list_free (ids);
}
else {
@@ -1778,14 +1778,14 @@ eab_view_delete_selection(EABView *view, gboolean is_delete)
NULL);
}
}
-
+
/* Sets the cursor, at the row after the deleted row */
- if (view->view_type == EAB_VIEW_MINICARD && row!=0) {
+ if (view->view_type == EAB_VIEW_MINICARD && row!=0) {
select = e_sorter_model_to_sorted (selection_model->sorter, row);
/* Sets the cursor, before the deleted row if its the last row */
if (select == e_selection_model_row_count (selection_model) - 1)
- select = select - 1;
+ select = select - 1;
else
select = select + 1;
@@ -1795,12 +1795,12 @@ eab_view_delete_selection(EABView *view, gboolean is_delete)
/* Sets the cursor, at the row after the deleted row */
else if (view->view_type == EAB_VIEW_TABLE && row!=0) {
- select = e_table_model_to_view_row (E_TABLE (etable), row);
-
+ select = e_table_model_to_view_row (E_TABLE (etable), row);
+
/* Sets the cursor, before the deleted row if its the last row */
if (select == e_table_model_row_count (E_TABLE(etable)->model) - 1)
select = select - 1;
- else
+ else
select = select + 1;
row = e_table_view_to_model_row (E_TABLE (etable), select);
@@ -1864,7 +1864,7 @@ selection_received (GtkWidget *invisible,
contact_list = eab_contact_list_from_string (str);
} else
contact_list = eab_contact_list_from_string ((char *)selection_data->data);
-
+
for (l = contact_list; l; l = l->next) {
EContact *contact = l->data;
@@ -1907,15 +1907,15 @@ eab_view_save_as (EABView *view, gboolean all)
{
GList *list = NULL;
EBook *book ;
-
- g_object_get(view->model,
+
+ g_object_get(view->model,
"book", &book,
NULL);
if (all) {
EBookQuery *query = e_book_query_any_field_contains("");
e_book_get_contacts(book, query, &list, NULL);
- e_book_query_unref(query);
+ e_book_query_unref(query);
}
else {
list = get_selected_contacts(view);
@@ -1987,7 +1987,7 @@ eab_view_copy (EABView *view)
{
gtk_html_copy (GTK_HTML (view->contact_display));
}
- else
+ else
{
view->clipboard_contacts = get_selected_contacts (view);
@@ -2035,14 +2035,14 @@ view_transfer_contacts (EABView *view, gboolean delete_from_source, gboolean all
GList *contacts = NULL;
GtkWindow *parent_window;
- g_object_get(view->model,
+ g_object_get(view->model,
"book", &book,
NULL);
if (all) {
EBookQuery *query = e_book_query_any_field_contains("");
e_book_get_contacts(book, query, &contacts, NULL);
- e_book_query_unref(query);
+ e_book_query_unref(query);
}
else {
contacts = get_selected_contacts (view);
@@ -2102,13 +2102,13 @@ eab_view_can_view (EABView *view)
return view ? eab_view_selection_nonempty (view) : FALSE;
}
-gboolean
+gboolean
eab_view_can_send (EABView *view)
{
return view ? eab_view_selection_nonempty (view) : FALSE;
}
-gboolean
+gboolean
eab_view_can_send_to (EABView *view)
{
return view ? eab_view_selection_nonempty (view) : FALSE;
diff --git a/addressbook/gui/widgets/e-addressbook-view.h b/addressbook/gui/widgets/e-addressbook-view.h
index 14f16c82f4..3ba45d6302 100644
--- a/addressbook/gui/widgets/e-addressbook-view.h
+++ b/addressbook/gui/widgets/e-addressbook-view.h
@@ -62,7 +62,7 @@ typedef struct _EABViewClass EABViewClass;
struct _EABView
{
GtkVBox parent;
-
+
/* item specific fields */
EABViewType view_type;
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
index 1d4bf307c9..ab6e5471de 100644
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ b/addressbook/gui/widgets/e-minicard-label.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-minicard-label.c
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
@@ -203,7 +203,7 @@ e_minicard_label_set_property (GObject *object, guint prop_id, const GValue *va
GnomeCanvasItem *item;
e_minicard_label = E_MINICARD_LABEL (object);
- item = GNOME_CANVAS_ITEM (object);
+ item = GNOME_CANVAS_ITEM (object);
switch (prop_id){
case PROP_WIDTH:
@@ -344,7 +344,7 @@ static gboolean
e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event)
{
EMinicardLabel *e_minicard_label;
-
+
e_minicard_label = E_MINICARD_LABEL (item);
switch( event->type ) {
@@ -371,7 +371,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event)
break;
}
case GDK_BUTTON_PRESS:
- case GDK_BUTTON_RELEASE:
+ case GDK_BUTTON_RELEASE:
case GDK_MOTION_NOTIFY:
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY: {
@@ -382,7 +382,7 @@ e_minicard_label_event (GnomeCanvasItem *item, GdkEvent *event)
default:
break;
}
-
+
if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event)
return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event);
else
@@ -413,7 +413,7 @@ set_colors (EMinicardLabel *label)
GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (label)->canvas);
GtkStyle *style = gtk_widget_get_style (canvas);
if (label->has_focus) {
- gnome_canvas_item_set (label->rect,
+ gnome_canvas_item_set (label->rect,
"outline_color_gdk", &style->mid[GTK_STATE_SELECTED],
"fill_color_gdk", &style->bg[GTK_STATE_NORMAL],
NULL);
@@ -453,21 +453,21 @@ static void
e_minicard_label_reflow(GnomeCanvasItem *item, int flags)
{
EMinicardLabel *e_minicard_label = E_MINICARD_LABEL(item);
-
+
gint old_height;
gdouble text_height;
gdouble left_width;
old_height = e_minicard_label->height;
- g_object_get(e_minicard_label->fieldname,
+ g_object_get(e_minicard_label->fieldname,
"text_height", &text_height,
NULL);
e_minicard_label->height = text_height;
- g_object_get(e_minicard_label->field,
+ g_object_get(e_minicard_label->field,
"text_height", &text_height,
NULL);
diff --git a/addressbook/gui/widgets/e-minicard-label.h b/addressbook/gui/widgets/e-minicard-label.h
index 30e1a274e7..1b64d6874b 100644
--- a/addressbook/gui/widgets/e-minicard-label.h
+++ b/addressbook/gui/widgets/e-minicard-label.h
@@ -53,7 +53,7 @@ typedef struct _EMinicardLabelClass EMinicardLabelClass;
struct _EMinicardLabel
{
GnomeCanvasGroup parent;
-
+
/* item specific fields */
double width;
double height;
diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c
index 7f4c84d0fd..5c1693dea2 100644
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ b/addressbook/gui/widgets/e-minicard-view-widget.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-minicard-view-widget.c
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
@@ -102,28 +102,28 @@ e_minicard_view_widget_class_init (EMinicardViewWidgetClass *klass)
object_class->get_property = e_minicard_view_widget_get_property;
object_class->dispose = e_minicard_view_widget_dispose;
- g_object_class_install_property (object_class, PROP_BOOK,
+ g_object_class_install_property (object_class, PROP_BOOK,
g_param_spec_object ("book",
_("Book"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_BOOK,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_QUERY,
+ g_object_class_install_property (object_class, PROP_QUERY,
g_param_spec_string ("query",
_("Query"),
/*_( */"XXX blurb" /*)*/,
NULL,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_EDITABLE,
+ g_object_class_install_property (object_class, PROP_EDITABLE,
g_param_spec_boolean ("editable",
_("Editable"),
/*_( */"XXX blurb" /*)*/,
FALSE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_COLUMN_WIDTH,
+ g_object_class_install_property (object_class, PROP_COLUMN_WIDTH,
g_param_spec_double ("column_width",
_("Column Width"),
/*_( */"XXX blurb" /*)*/,
@@ -390,7 +390,7 @@ e_minicard_view_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocatio
{
if (GTK_WIDGET_CLASS(parent_class)->size_allocate)
GTK_WIDGET_CLASS(parent_class)->size_allocate (widget, allocation);
-
+
if (GTK_WIDGET_REALIZED(widget)) {
double width;
EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
@@ -443,7 +443,7 @@ e_minicard_view_widget_get_view (EMinicardViewWidget *view)
return NULL;
}
-static gboolean
+static gboolean
e_minicard_view_widget_real_focus_in_event(GtkWidget *widget, GdkEventFocus *event)
{
GnomeCanvas *canvas;
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index 2b271629b1..772798432f 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-minicard-view.c
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
@@ -88,7 +88,7 @@ e_minicard_view_drag_data_get(GtkWidget *widget,
switch (info) {
case DND_TARGET_TYPE_VCARD_LIST: {
char *value;
-
+
value = eab_contact_list_to_string (view->drag_list);
gtk_selection_data_set (selection_data,
@@ -101,7 +101,7 @@ e_minicard_view_drag_data_get(GtkWidget *widget,
case DND_TARGET_TYPE_SOURCE_VCARD_LIST: {
EBook *book;
char *value;
-
+
g_object_get (view->adapter, "book", &book, NULL);
value = eab_book_and_contact_list_to_string (book, view->drag_list);
@@ -131,7 +131,7 @@ e_minicard_view_drag_begin (EAddressbookReflowAdapter *adapter, GdkEvent *event,
GdkDragAction actions = GDK_ACTION_MOVE | GDK_ACTION_COPY;
clear_drag_data (view);
-
+
view->drag_list = e_minicard_view_get_card_list (view);
g_print ("dragging %d card(s)\n", g_list_length (view->drag_list));
@@ -213,7 +213,7 @@ e_minicard_view_set_property (GObject *object,
EMinicardView *view;
view = E_MINICARD_VIEW (object);
-
+
switch (prop_id){
case PROP_ADAPTER:
if (view->adapter) {
@@ -246,7 +246,7 @@ e_minicard_view_set_property (GObject *object,
g_signal_connect (model, "writable_status",
G_CALLBACK (writable_status_change), view);
}
-
+
}
break;
case PROP_BOOK:
@@ -350,7 +350,7 @@ static gboolean
e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event)
{
EMinicardView *view;
-
+
view = E_MINICARD_VIEW (item);
switch( event->type ) {
@@ -359,11 +359,11 @@ e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event)
gboolean editable;
g_object_get(view->adapter, "editable", &editable, NULL);
-
+
if (editable) {
EBook *book;
g_object_get(view, "book", &book, NULL);
-
+
if (book && E_IS_BOOK (book))
eab_show_contact_editor (book, e_contact_new(), TRUE, editable);
}
@@ -485,39 +485,39 @@ e_minicard_view_class_init (EMinicardViewClass *klass)
GObjectClass *object_class;
GnomeCanvasItemClass *item_class;
EReflowClass *reflow_class;
-
+
object_class = G_OBJECT_CLASS (klass);
item_class = (GnomeCanvasItemClass *) klass;
reflow_class = (EReflowClass *) klass;
-
+
parent_class = g_type_class_peek_parent (klass);
-
+
object_class->set_property = e_minicard_view_set_property;
object_class->get_property = e_minicard_view_get_property;
object_class->dispose = e_minicard_view_dispose;
- g_object_class_install_property (object_class, PROP_ADAPTER,
+ g_object_class_install_property (object_class, PROP_ADAPTER,
g_param_spec_object ("adapter",
_("Adapter"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_ADDRESSBOOK_REFLOW_ADAPTER,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_BOOK,
+ g_object_class_install_property (object_class, PROP_BOOK,
g_param_spec_object ("book",
_("Book"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_BOOK,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_QUERY,
+ g_object_class_install_property (object_class, PROP_QUERY,
g_param_spec_string ("query",
_("Query"),
/*_( */"XXX blurb" /*)*/,
NULL,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_EDITABLE,
+ g_object_class_install_property (object_class, PROP_EDITABLE,
g_param_spec_boolean ("editable",
_("Editable"),
/*_( */"XXX blurb" /*)*/,
diff --git a/addressbook/gui/widgets/e-minicard-view.h b/addressbook/gui/widgets/e-minicard-view.h
index 6950204286..ca706fed70 100644
--- a/addressbook/gui/widgets/e-minicard-view.h
+++ b/addressbook/gui/widgets/e-minicard-view.h
@@ -63,7 +63,7 @@ struct _EMinicardView
EReflow parent;
EAddressbookReflowAdapter *adapter;
-
+
/* item specific fields */
GList *drag_list;
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 7132389379..c0fd0b5994 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-minicard.c
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
@@ -188,14 +188,14 @@ e_minicard_class_init (EMinicardClass *klass)
/*_( */"XXX blurb" /*)*/,
FALSE,
G_PARAM_READWRITE));
-
+
g_object_class_install_property (object_class, PROP_CONTACT,
g_param_spec_object ("contact",
_("Contact"),
/*_( */"XXX blurb" /*)*/,
E_TYPE_CONTACT,
G_PARAM_READWRITE));
-
+
e_minicard_signals [SELECTED] =
g_signal_new ("selected",
G_OBJECT_CLASS_TYPE (object_class),
@@ -264,23 +264,23 @@ set_selected (EMinicard *minicard, gboolean selected)
{
GtkWidget *canvas = GTK_WIDGET(GNOME_CANVAS_ITEM(minicard)->canvas);
if (selected) {
- gnome_canvas_item_set (minicard->rect,
+ gnome_canvas_item_set (minicard->rect,
"outline_color_gdk", &canvas->style->bg[GTK_STATE_ACTIVE],
NULL);
- gnome_canvas_item_set (minicard->header_rect,
+ gnome_canvas_item_set (minicard->header_rect,
"fill_color_gdk", &canvas->style->bg[GTK_STATE_SELECTED],
NULL);
- gnome_canvas_item_set (minicard->header_text,
+ gnome_canvas_item_set (minicard->header_text,
"fill_color_gdk", &canvas->style->text[GTK_STATE_SELECTED],
NULL);
} else {
- gnome_canvas_item_set (minicard->rect,
- "outline_color", NULL,
+ gnome_canvas_item_set (minicard->rect,
+ "outline_color", NULL,
NULL);
- gnome_canvas_item_set (minicard->header_rect,
+ gnome_canvas_item_set (minicard->header_rect,
"fill_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL],
NULL);
- gnome_canvas_item_set (minicard->header_text,
+ gnome_canvas_item_set (minicard->header_text,
"fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL],
NULL);
}
@@ -306,7 +306,7 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G
item = GNOME_CANVAS_ITEM (object);
e_minicard = E_MINICARD (object);
-
+
switch (prop_id){
case PROP_WIDTH:
if (e_minicard->width != g_value_get_double (value)) {
@@ -415,7 +415,7 @@ e_minicard_dispose (GObject *object)
g_return_if_fail (E_IS_MINICARD (object));
e_minicard = E_MINICARD (object);
-
+
if (e_minicard->fields) {
g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL);
g_list_free(e_minicard->fields);
@@ -442,12 +442,12 @@ e_minicard_finalize (GObject *object)
g_return_if_fail (E_IS_MINICARD (object));
e_minicard = E_MINICARD (object);
-
+
if (e_minicard->contact) {
g_object_unref (e_minicard->contact);
e_minicard->contact = NULL;
}
-
+
if (e_minicard->list_icon_pixbuf) {
g_object_unref (e_minicard->list_icon_pixbuf);
e_minicard->list_icon_pixbuf = NULL;
@@ -477,7 +477,7 @@ e_minicard_realize (GnomeCanvasItem *item)
if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize)
(* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item);
-
+
e_minicard->rect =
gnome_canvas_item_new( group,
gnome_canvas_rect_get_type(),
@@ -512,7 +512,7 @@ e_minicard_realize (GnomeCanvasItem *item)
e_canvas_item_move_absolute(e_minicard->header_text, 6, 6);
- e_minicard->list_icon =
+ e_minicard->list_icon =
gnome_canvas_item_new ( group,
gnome_canvas_pixbuf_get_type(),
"pixbuf", e_minicard->list_icon_pixbuf,
@@ -544,7 +544,7 @@ gboolean
e_minicard_activate_editor(EMinicard *minicard)
{
GnomeCanvasItem *item = (GnomeCanvasItem *)minicard;
-
+
if (minicard->editor) {
eab_editor_raise (minicard->editor);
}
@@ -581,7 +581,7 @@ static gboolean
e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
{
EMinicard *e_minicard;
-
+
e_minicard = E_MINICARD (item);
switch( event->type ) {
@@ -608,7 +608,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
GDK_POINTER_MOTION_MASK |
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK);
-
+
e_canvas_item_grab_focus(item, TRUE);
if (gnome_canvas_item_grab (GNOME_CANVAS_ITEM (e_minicard),
@@ -734,7 +734,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
default:
break;
}
-
+
if (GNOME_CANVAS_ITEM_CLASS( parent_class )->event)
return (* GNOME_CANVAS_ITEM_CLASS( parent_class )->event) (item, event);
else
@@ -749,7 +749,7 @@ e_minicard_resize_children( EMinicard *e_minicard )
if (e_minicard->header_text) {
gnome_canvas_item_set( e_minicard->header_text,
- "width", ((double) e_minicard->width - 12
+ "width", ((double) e_minicard->width - 12
- (is_list ? e_minicard->list_icon_size : 0.0)),
NULL );
}
@@ -773,14 +773,14 @@ add_field (EMinicard *e_minicard, EContactField field, gdouble left_width)
EMinicardField *minicard_field;
char *name;
char *string;
-
+
group = GNOME_CANVAS_GROUP( e_minicard );
-
+
name = g_strdup_printf("%s:", e_contact_pretty_name (field));
string = e_contact_get (e_minicard->contact, field);
new_item = e_minicard_label_new(group);
-
+
if (e_minicard->contact && e_contact_get (e_minicard->contact, E_CONTACT_IS_LIST))
gnome_canvas_item_set( new_item,
"width", e_minicard->width - 4.0,
@@ -847,7 +847,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, i
for (l=email_list, le=emails; l!=NULL && count < limit && le!=NULL; l = l->next, le=le->next) {
const gchar *tmp;
-
+
tmp = get_email_location ((EVCardAttribute *) l->data);
if (tmp)
name = g_strdup_printf ("%s:", tmp);
@@ -856,7 +856,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, i
string = e_text_to_html (le->data, 0);
new_item = e_minicard_label_new(group);
-
+
gnome_canvas_item_set( new_item,
"width", e_minicard->width - 4.0,
"fieldname", name,
@@ -954,7 +954,7 @@ remodel( EMinicard *e_minicard )
for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) && count < 5; field++) {
EMinicardField *minicard_field = NULL;
gboolean is_email=FALSE;
-
+
if (field == E_CONTACT_FAMILY_NAME || field == E_CONTACT_GIVEN_NAME)
continue;
@@ -1028,19 +1028,19 @@ e_minicard_reflow(GnomeCanvasItem *item, int flags)
GList *list;
gdouble text_height;
gint old_height;
-
+
old_height = e_minicard->height;
g_object_get(e_minicard->header_text,
"text_height", &text_height,
NULL);
-
+
e_minicard->height = text_height + 10.0;
-
+
gnome_canvas_item_set(e_minicard->header_rect,
"y2", text_height + 9.0,
NULL);
-
+
for(list = e_minicard->fields; list; list = g_list_next(list)) {
EMinicardField *field = E_MINICARD_FIELD(list->data);
/* Why not use the item that is passed in? */
@@ -1052,7 +1052,7 @@ e_minicard_reflow(GnomeCanvasItem *item, int flags)
e_minicard->height += text_height;
}
e_minicard->height += 2;
-
+
gnome_canvas_item_set(e_minicard->rect,
"x2", (double) e_minicard->width - 1.0,
"y2", (double) e_minicard->height - 1.0,
@@ -1083,7 +1083,7 @@ int
e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2)
{
int cmp = 0;
-
+
g_return_val_if_fail(minicard1 != NULL, 0);
g_return_val_if_fail(E_IS_MINICARD(minicard1), 0);
g_return_val_if_fail(minicard2 != NULL, 0);
@@ -1098,13 +1098,13 @@ e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2)
"file_as", &file_as2,
NULL);
- if (file_as1 && file_as2)
+ if (file_as1 && file_as2)
cmp = g_utf8_collate(file_as1, file_as2);
else if (file_as1)
cmp = -1;
else if (file_as2)
cmp = 1;
- else
+ else
cmp = strcmp(e_minicard_get_card_id(minicard1), e_minicard_get_card_id(minicard2));
g_free (file_as1);
diff --git a/addressbook/gui/widgets/e-minicard.h b/addressbook/gui/widgets/e-minicard.h
index 4a5d1c6e77..a1d084869c 100644
--- a/addressbook/gui/widgets/e-minicard.h
+++ b/addressbook/gui/widgets/e-minicard.h
@@ -60,10 +60,10 @@ enum _EMinicardFocusType {
struct _EMinicard
{
GnomeCanvasGroup parent;
-
+
/* item specific fields */
EContact *contact;
-
+
GnomeCanvasItem *rect;
GnomeCanvasItem *header_rect;
GnomeCanvasItem *header_text;
@@ -107,7 +107,7 @@ struct _EMinicardClass
};
typedef struct _EMinicardField EMinicardField;
-
+
struct _EMinicardField {
EContactField field;
GnomeCanvasItem *label;
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index 41e436c07e..639ccf6d04 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -81,7 +81,7 @@ eab_uri_popup_link_open(EPopup *ep, EPopupItem *item, void *data)
{
EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target;
GError *err = NULL;
-
+
gnome_url_show(t->uri, &err);
if (err) {
g_warning("gnome_url_show: %s", err->message);
@@ -96,11 +96,11 @@ eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, void *data)
struct _EABContactDisplayPrivate *p = display->priv;
EABPopupTargetURI *t = (EABPopupTargetURI *)ep->target;
const char *url = t->uri;
- char *html=NULL;
- int i=0;
+ char *html=NULL;
+ int i=0;
GList *email_list, *l;
int email_num = atoi (url + strlen ("internal-mailto:"));
-
+
email_list = e_contact_get (p->contact, E_CONTACT_EMAIL);
for (l = email_list; l; l=l->next) {
if(i==email_num)
@@ -109,9 +109,9 @@ eab_uri_popup_email_address_copy(EPopup *ep, EPopupItem *item, void *data)
}
g_free(p->selection_uri);
- p->selection_uri = g_strdup(html);
+ p->selection_uri = g_strdup(html);
g_free (html);
-
+
gtk_selection_owner_set(p->invisible, GDK_SELECTION_PRIMARY, gtk_get_current_event_time());
gtk_selection_owner_set(p->invisible, GDK_SELECTION_CLIPBOARD, gtk_get_current_event_time());
}
@@ -136,12 +136,12 @@ eab_uri_popup_address_send(EPopup *ep, EPopupItem *item, void *data)
const char *url = t->uri;
EABContactDisplay *display = data;
struct _EABContactDisplayPrivate *p = display->priv;
-
+
int mail_num = atoi (url + strlen ("internal-mailto:"));
-
+
if (mail_num == -1)
- return;
-
+ return;
+
eab_send_contact (p->contact, mail_num, EAB_DISPOSITION_AS_TO);
}
@@ -160,7 +160,7 @@ eab_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint t
static void
eab_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EABContactDisplay *display)
{
-#if 0
+#if 0
struct _EABContactDisplayPrivate *p = display->priv;
g_free(p->selection_uri);
@@ -171,7 +171,7 @@ eab_selection_clear_event(GtkWidget *widget, GdkEventSelection *event, EABContac
static EPopupItem eab_uri_popups[] = {
{ E_POPUP_ITEM, "05.open", N_("_Open Link in Browser"), eab_uri_popup_link_open, NULL, NULL, EAB_POPUP_URI_NOT_MAILTO },
{ E_POPUP_ITEM, "10.copy", N_("_Copy Link Location"), eab_uri_popup_link_copy, NULL, "edit-copy", EAB_POPUP_URI_NOT_MAILTO },
- { E_POPUP_ITEM, "15.send", N_("_Send New Message To..."), eab_uri_popup_address_send, NULL, "mail-message-new", EAB_POPUP_URI_MAILTO},
+ { E_POPUP_ITEM, "15.send", N_("_Send New Message To..."), eab_uri_popup_address_send, NULL, "mail-message-new", EAB_POPUP_URI_MAILTO},
{ E_POPUP_ITEM, "20.copy", N_("Copy _Email Address"), eab_uri_popup_email_address_copy, NULL, "edit-copy", EAB_POPUP_URI_MAILTO},
};
@@ -199,7 +199,7 @@ eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const char *uri
GtkMenu *menu;
GSList *menus = NULL;
int i;
-
+
emp = eab_popup_new("org.gnome.evolution.addressbook.contactdisplay.popup");
t = eab_popup_target_new_uri(emp, uri);
@@ -212,7 +212,7 @@ eab_uri_popup_event(EABContactDisplay *display, GdkEvent *event, const char *uri
e_popup_add_items((EPopup *)emp, menus, NULL, eab_uri_popup_free, display);
menu = e_popup_create_menu_once((EPopup *)emp,(EPopupTarget*)t, 0);
-
+
if (event == NULL) {
gtk_menu_popup(menu, NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time());
} else {
@@ -267,7 +267,7 @@ on_link_clicked (GtkHTML *html, const char *url, EABContactDisplay *display)
if (mail_num == -1)
return;
-
+
eab_send_contact (display->priv->contact, mail_num, EAB_DISPOSITION_AS_TO);
return;
@@ -275,7 +275,7 @@ on_link_clicked (GtkHTML *html, const char *url, EABContactDisplay *display)
#endif
gnome_url_show (url, &err);
-
+
if (err) {
g_warning ("gnome_url_show: %s", err->message);
g_error_free (err);
@@ -417,7 +417,7 @@ accum_time_attribute (GString *gstr, EContact *contact, const char *html_label,
EContactDate *date;
GDate *gdate = NULL;
char sdate[100];
-
+
date = e_contact_get (contact, field);
if (date) {
gdate = g_date_new_dmy ( date->day,
@@ -508,7 +508,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact)
email_list = e_contact_get (contact, E_CONTACT_EMAIL);
email_attr_list = e_contact_get_attributes (contact, E_CONTACT_EMAIL);
-
+
for (l = email_list, al=email_attr_list; l && al; l = l->next, al = al->next) {
#ifdef HANDLE_MAILTO_INTERNALLY
char *html = e_text_to_html (l->data, 0);
@@ -517,7 +517,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact)
email_num ++;
g_free (html);
nl = "<br>";
-
+
#else
g_string_append_printf (accum, "%s%s <font color=" HEADER_COLOR ">(%s)</font>", nl, (char*)l->data, get_email_location ((EVCardAttribute *) al->data));
nl = "\n";
@@ -546,7 +546,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact)
if (accum->len > 0)
gtk_html_stream_printf (html_stream, "%s", accum->str);
}
-
+
g_string_assign (accum, "");
accum_multival_attribute (accum, contact, _("AIM"), E_CONTACT_IM_AIM, AIM_ICON, 0);
accum_multival_attribute (accum, contact, _("GroupWise"), E_CONTACT_IM_GROUPWISE, GROUPWISE_ICON, 0);
@@ -571,7 +571,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact)
accum_attribute (accum, contact, _("Assistant"), E_CONTACT_ASSISTANT, NULL, 0);
accum_attribute (accum, contact, _("Video Chat"), E_CONTACT_VIDEO_URL, VIDEOCONF_ICON, E_TEXT_TO_HTML_CONVERT_URLS);
accum_attribute (accum, contact, _("Calendar"), E_CONTACT_CALENDAR_URI, NULL, E_TEXT_TO_HTML_CONVERT_URLS);
- accum_attribute (accum, contact, _("Free/Busy"), E_CONTACT_FREEBUSY_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS);
+ accum_attribute (accum, contact, _("Free/Busy"), E_CONTACT_FREEBUSY_URL, NULL, E_TEXT_TO_HTML_CONVERT_URLS);
accum_attribute (accum, contact, _("Phone"), E_CONTACT_PHONE_BUSINESS, NULL, 0);
accum_attribute (accum, contact, _("Fax"), E_CONTACT_PHONE_BUSINESS_FAX, NULL, 0);
accum_address (accum, contact, _("Address"), E_CONTACT_ADDRESS_WORK, E_CONTACT_ADDRESS_LABEL_WORK);
@@ -637,7 +637,7 @@ eab_contact_display_render_normal (EABContactDisplay *display, EContact *contact
gtk_html_stream_printf (html_stream, "<img border=\"1\" src=\"internal-contact-photo:\">");
e_contact_photo_free (photo);
}
-
+
gtk_html_stream_printf (html_stream, "</td><td valign=\"top\">\n");
str = e_contact_get_const (contact, E_CONTACT_FILE_AS);
@@ -735,7 +735,7 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac
calced_width, calced_height);
e_contact_photo_free (photo);
}
-
+
gtk_html_stream_printf (html_stream, "</td><td valign=\"top\">\n");
str = e_contact_get_const (contact, E_CONTACT_FILE_AS);
@@ -754,7 +754,7 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac
}
gtk_html_stream_write (html_stream, "<hr>", 4);
-
+
if (e_contact_get (contact, E_CONTACT_IS_LIST)) {
GList *email_list;
GList *l;
@@ -804,7 +804,7 @@ eab_contact_display_render_compact (EABContactDisplay *display, EContact *contac
g_free (html);
}
gtk_html_stream_write (html_stream, "<br>", 4);
-
+
str = e_contact_get_const (contact, E_CONTACT_HOMEPAGE_URL);
if (str) {
html = e_text_to_html (str, E_TEXT_TO_HTML_CONVERT_URLS);
@@ -847,11 +847,11 @@ eab_html_press_event (GtkWidget *widget, GdkEvent *event,EABContactDisplay *disp
{
char *uri;
gboolean res = FALSE;
-
+
if (event->button.button!= 3 )
return FALSE;
-
+
uri = gtk_html_get_url_at (GTK_HTML (widget), event->button.x, event->button.y);
if (uri){
eab_uri_popup_event(display,event,uri);
@@ -873,7 +873,7 @@ eab_contact_display_new (void)
p=display->priv = g_new0 (EABContactDisplayPrivate, 1);
gtk_html_set_default_content_type (GTK_HTML (display), "text/html; charset=utf-8");
-
+
gtk_html_set_editable (GTK_HTML (display), FALSE);
g_signal_connect (display, "url_requested",
@@ -882,7 +882,7 @@ eab_contact_display_new (void)
g_signal_connect (display, "link_clicked",
G_CALLBACK (on_link_clicked),
display);
- g_signal_connect(display, "button_press_event",
+ g_signal_connect(display, "button_press_event",
G_CALLBACK(eab_html_press_event),
display);
p->invisible = gtk_invisible_new();
@@ -890,7 +890,7 @@ eab_contact_display_new (void)
g_signal_connect(p->invisible, "selection_clear_event", G_CALLBACK(eab_selection_clear_event), display);
gtk_selection_add_target(p->invisible, GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 0);
gtk_selection_add_target(p->invisible, GDK_SELECTION_CLIPBOARD, GDK_SELECTION_TYPE_STRING, 1);
-
+
#if 0
g_signal_connect (display, "object_requested",
G_CALLBACK (on_object_requested),
diff --git a/addressbook/gui/widgets/eab-contact-display.h b/addressbook/gui/widgets/eab-contact-display.h
index cc10b0eeac..e1b84346e7 100644
--- a/addressbook/gui/widgets/eab-contact-display.h
+++ b/addressbook/gui/widgets/eab-contact-display.h
@@ -43,7 +43,7 @@ typedef enum {
struct _EABContactDisplay {
GtkHTML parent;
-
+
EABContactDisplayPrivate *priv;
};
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index f7ed275698..731d141a84 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-field-chooser.c
* Copyright (C) 2001 Ximian, Inc.
* Author: Chris Toshok <toshok@ximian.com>
@@ -76,7 +76,7 @@ void
eab_error_dialog (const char *msg, EBookStatus status)
{
const char *status_str = status_to_string [status];
-
+
if (status_str)
e_error_run (NULL, "addressbook:generic-error", msg, _(status_str), NULL);
}
@@ -86,7 +86,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status)
{
char *label_string, *label = NULL, *uri;
GtkWidget *dialog;
-
+
g_return_if_fail (source != NULL);
uri = e_source_get_uri (source);
@@ -97,7 +97,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status)
"for offline usage. Please load the addressbook once in online mode "
"to download its contents");
}
-
+
else if (!strncmp (uri, "file:", 5)) {
char *path = g_filename_from_uri (uri, NULL, NULL);
label = g_strdup_printf (
@@ -109,7 +109,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status)
else if (!strncmp (uri, "ldap:", 5)) {
/* special case for ldap: contact folders so we can tell the user about openldap */
#ifdef HAVE_LDAP
- label_string =
+ label_string =
_("We were unable to open this addressbook. This either "
"means you have entered an incorrect URI, or the LDAP server "
"is unreachable.");
@@ -126,12 +126,12 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status)
"means you have entered an incorrect URI, or the server "
"is unreachable.");
}
-
+
dialog = e_error_new ((GtkWindow *) parent, "addressbook:load-error", label_string, NULL);
g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
-
+
gtk_widget_show (dialog);
- g_free (label);
+ g_free (label);
g_free (uri);
}
@@ -168,7 +168,7 @@ eab_search_result_dialog (GtkWidget *parent,
default:
g_return_if_reached ();
}
-
+
e_error_run ((GtkWindow *) parent, "addressbook:search-error", str, NULL);
}
@@ -340,7 +340,7 @@ file_exists(GtkWindow *window, const char *filename)
typedef struct {
GtkWidget *filesel;
char *vcard;
- gboolean has_multiple_contacts;
+ gboolean has_multiple_contacts;
} SaveAsInfo;
static void
@@ -350,11 +350,11 @@ save_it(GtkWidget *widget, SaveAsInfo *info)
char *uri;
gint error = 0;
gint response = 0;
-
+
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (info->filesel));
- uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (info->filesel));
-
+ uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (info->filesel));
+
if (filename && g_file_test (filename, G_FILE_TEST_EXISTS)) {
response = file_exists(GTK_WINDOW (info->filesel), filename);
switch (response) {
@@ -365,12 +365,12 @@ save_it(GtkWidget *widget, SaveAsInfo *info)
}
}
- error = e_write_file_uri (uri, info->vcard);
+ error = e_write_file_uri (uri, info->vcard);
if (error != 0) {
char *err_str_ext;
if (info->has_multiple_contacts) {
/* more than one, finding the total number of contacts might
- * hit performance while saving large number of contacts
+ * hit performance while saving large number of contacts
*/
err_str_ext = ngettext ("contact", "contacts", 2);
}
@@ -378,16 +378,16 @@ save_it(GtkWidget *widget, SaveAsInfo *info)
err_str_ext = ngettext ("contact", "contacts", 1);
}
- /* translators: Arguments, err_str_ext (item to be saved: "contact"/"contacts"),
- * destination file name, and error code will fill the placeholders
- * {0}, {1} and {2}, respectively in the error message formed
+ /* translators: Arguments, err_str_ext (item to be saved: "contact"/"contacts"),
+ * destination file name, and error code will fill the placeholders
+ * {0}, {1} and {2}, respectively in the error message formed
*/
- e_error_run (GTK_WINDOW (info->filesel), "addressbook:save-error",
+ e_error_run (GTK_WINDOW (info->filesel), "addressbook:save-error",
err_str_ext, filename, g_strerror (errno));
gtk_widget_destroy(GTK_WIDGET(info->filesel));
return;
}
-
+
gtk_widget_destroy(GTK_WIDGET(info->filesel));
}
@@ -430,7 +430,7 @@ make_safe_filename (char *name)
safe = g_strdup (name);
e_filename_make_safe (safe);
-
+
return safe;
}
@@ -523,7 +523,7 @@ eab_contact_save (char *title, EContact *contact, GtkWindow *parent_window)
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filesel), g_get_home_dir ());
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filesel), file);
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (filesel), FALSE);
-
+
info->filesel = filesel;
info->vcard = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
@@ -624,7 +624,7 @@ do_delete (gpointer data, gpointer user_data)
EBook *book = user_data;
EContact *contact = data;
const char *id;
-
+
id = e_contact_get_const (contact, E_CONTACT_UID);
e_book_remove_contact(book, id, NULL);
}
@@ -664,7 +664,7 @@ contact_added_cb (EBook* book, EBookStatus status, const char *id, gpointer user
if (status != E_BOOK_ERROR_OK && status != E_BOOK_ERROR_CANCELLED) {
process->book_status = FALSE;
eab_error_dialog (_("Error adding contact"), status);
- }
+ }
else if (status == E_BOOK_ERROR_CANCELLED) {
process->book_status = FALSE;
}
@@ -786,7 +786,7 @@ eab_send_to_contact_and_email_num_list (GList *c)
return;
CORBA_exception_init (&ev);
-
+
composer_server = bonobo_activation_activate_from_id (COMPOSER_OAFID, 0, NULL, &ev);
/* Figure out how many addresses of each kind we have. */
@@ -819,7 +819,7 @@ eab_send_to_contact_and_email_num_list (GList *c)
cc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
cc_list->_maximum = cc_list->_length = 0;
-
+
bcc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
bcc_list->_maximum = bcc_length;
bcc_list->_length = bcc_length;
@@ -845,7 +845,7 @@ eab_send_to_contact_and_email_num_list (GList *c)
if (is_list) {
for (iterator = emails; iterator; iterator = iterator->next) {
-
+
if (is_hidden) {
recipient = &(bcc_list->_buffer[bcc_i]);
++bcc_i;
@@ -853,7 +853,7 @@ eab_send_to_contact_and_email_num_list (GList *c)
recipient = &(to_list->_buffer[to_i]);
++to_i;
}
-
+
name = NULL;
addr = NULL;
if (iterator && iterator->data) {
@@ -863,7 +863,7 @@ eab_send_to_contact_and_email_num_list (GList *c)
recipient->name = CORBA_string_dup (name ? name : "");
recipient->address = CORBA_string_dup (addr ? addr : "");
-
+
g_free (name);
g_free (addr);
}
@@ -882,7 +882,7 @@ eab_send_to_contact_and_email_num_list (GList *c)
if (nth >= length)
nth = 0;
-
+
if (contact_name) {
name = e_contact_name_to_string (contact_name);
e_contact_name_free (contact_name);
@@ -891,7 +891,7 @@ eab_send_to_contact_and_email_num_list (GList *c)
name = NULL;
addr = g_strdup (g_list_nth_data (emails, nth));
-
+
recipient->name = CORBA_string_dup (name ? name : "");
recipient->address = CORBA_string_dup (addr ? addr : "");
@@ -948,11 +948,11 @@ eab_send_contact_list_as_attachment (GList *contacts)
return;
CORBA_exception_init (&ev);
-
+
composer_server = bonobo_activation_activate_from_id (COMPOSER_OAFID, 0, NULL, &ev);
-
+
content_type = CORBA_string_dup ("text/x-vcard");
filename = CORBA_string_dup ("");
@@ -975,17 +975,17 @@ eab_send_contact_list_as_attachment (GList *contacts)
memcpy (attach_data->_buffer, tempstr, attach_data->_length);
g_free (tempstr);
- GNOME_Evolution_Composer_attachData (composer_server,
+ GNOME_Evolution_Composer_attachData (composer_server,
content_type, filename, description,
show_inline, attach_data,
&ev);
-
+
if (ev._major != CORBA_NO_EXCEPTION) {
g_printerr ("gui/e-meeting-edit.c: I couldn't attach data to the composer via CORBA! Aagh.\n");
CORBA_exception_free (&ev);
return;
}
-
+
CORBA_free (content_type);
CORBA_free (filename);
CORBA_free (description);
@@ -993,7 +993,7 @@ eab_send_contact_list_as_attachment (GList *contacts)
to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
to_list->_maximum = to_list->_length = 0;
-
+
cc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
cc_list->_maximum = cc_list->_length = 0;
@@ -1025,7 +1025,7 @@ eab_send_contact_list_as_attachment (GList *contacts)
subject = CORBA_string_dup (tempstr);
g_free (tempstr);
}
-
+
GNOME_Evolution_Composer_setHeaders (composer_server, "", to_list, cc_list, bcc_list, subject, &ev);
CORBA_free (to_list);
diff --git a/addressbook/gui/widgets/eab-menu.c b/addressbook/gui/widgets/eab-menu.c
index c35cd6ba61..d1c8b4e243 100644
--- a/addressbook/gui/widgets/eab-menu.c
+++ b/addressbook/gui/widgets/eab-menu.c
@@ -115,8 +115,8 @@ EABMenu *eab_menu_new(const char *menuid)
* @cards: Cards selected. This will be freed on completion and the array indices unreferenced.
*
* Create a new selection menu target.
- *
- * Return value:
+ *
+ * Return value:
**/
EABMenuTargetSelect *
eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, int readonly, GPtrArray *cards)
@@ -139,7 +139,7 @@ eab_menu_target_new_select(EABMenu *eabp, struct _EBook *book, int readonly, GPt
email = e_contact_get(E_CONTACT(contact), E_CONTACT_EMAIL);
if (email) {
has_email = TRUE;
-
+
g_list_foreach(email, (GFunc)g_free, NULL);
g_list_free(email);
}
@@ -243,7 +243,7 @@ GType
eab_menu_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EABMenuHookClass), NULL, NULL, (GClassInitFunc) eabmph_class_init, NULL, NULL,
@@ -253,6 +253,6 @@ eab_menu_hook_get_type(void)
eabmph_parent_class = g_type_class_ref(e_menu_hook_get_type());
type = g_type_register_static(e_menu_hook_get_type(), "EABMenuHook", &info, 0);
}
-
+
return type;
}
diff --git a/addressbook/gui/widgets/eab-menu.h b/addressbook/gui/widgets/eab-menu.h
index 9f521cca85..d095ce9e74 100644
--- a/addressbook/gui/widgets/eab-menu.h
+++ b/addressbook/gui/widgets/eab-menu.h
@@ -44,7 +44,7 @@ enum _eab_menu_target_t {
/**
* enum _eab_menu_target_select_t - EABMenuTargetSelect qualifiers.
- *
+ *
* @EAB_MENU_SELECT_ONE: Only one item is selected.
* @EAB_MENU_SELECT_MANY: More than one item selected.
* @EAB_MENU_SELECT_ANY: One or more items selected.
diff --git a/addressbook/gui/widgets/eab-popup-control.c b/addressbook/gui/widgets/eab-popup-control.c
index 81baba6752..94e46e0524 100644
--- a/addressbook/gui/widgets/eab-popup-control.c
+++ b/addressbook/gui/widgets/eab-popup-control.c
@@ -13,12 +13,12 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -213,7 +213,7 @@ eab_popup_control_set_free_form (EABPopupControl *pop, const gchar *txt)
return TRUE;
}
-
+
return FALSE;
}
@@ -326,7 +326,7 @@ emit_event (EABPopupControl *pop, const char *event)
event,
arg, NULL);
bonobo_arg_release (arg);
- }
+ }
}
static void
diff --git a/addressbook/gui/widgets/eab-popup-control.h b/addressbook/gui/widgets/eab-popup-control.h
index 7112c90606..1d7ee36f0a 100644
--- a/addressbook/gui/widgets/eab-popup-control.h
+++ b/addressbook/gui/widgets/eab-popup-control.h
@@ -13,12 +13,12 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -54,7 +54,7 @@ struct _EABPopupControl {
GtkWidget *name_widget;
GtkWidget *email_widget;
GtkWidget *query_msg;
-
+
GtkWidget *main_vbox;
GtkWidget *generic_view;
GtkWidget *contact_display;
diff --git a/addressbook/gui/widgets/eab-popup.c b/addressbook/gui/widgets/eab-popup.c
index d37c1b7b73..ad43bde11e 100644
--- a/addressbook/gui/widgets/eab-popup.c
+++ b/addressbook/gui/widgets/eab-popup.c
@@ -131,8 +131,8 @@ EABPopup *eab_popup_new(const char *menuid)
* @cards: Cards selected. This will be freed on completion.
*
* Create a new selection popup target.
- *
- * Return value:
+ *
+ * Return value:
**/
@@ -180,7 +180,7 @@ eab_popup_target_new_select(EABPopup *eabp, struct _EBook *book, int readonly, G
email = e_contact_get(E_CONTACT(contact), E_CONTACT_EMAIL);
if (email) {
has_email = TRUE;
-
+
g_list_foreach(email, (GFunc)g_free, NULL);
g_list_free(email);
}
@@ -352,7 +352,7 @@ GType
eab_popup_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EABPopupHookClass), NULL, NULL, (GClassInitFunc) eabph_class_init, NULL, NULL,
@@ -362,6 +362,6 @@ eab_popup_hook_get_type(void)
eabph_parent_class = g_type_class_ref(e_popup_hook_get_type());
type = g_type_register_static(e_popup_hook_get_type(), "EABPopupHook", &info, 0);
}
-
+
return type;
}
diff --git a/addressbook/gui/widgets/eab-popup.h b/addressbook/gui/widgets/eab-popup.h
index 3a1fbafd95..2f7b50a30f 100644
--- a/addressbook/gui/widgets/eab-popup.h
+++ b/addressbook/gui/widgets/eab-popup.h
@@ -38,7 +38,7 @@ typedef struct _EABPopupClass EABPopupClass;
/**
* enum _eab_popup_target_t - A list of mail popup target types.
- *
+ *
* @EAB_POPUP_TARGET_SELECT: A selection of cards
* @EAB_POPUP_TARGET_SOURCE: A source selection.
*
@@ -53,7 +53,7 @@ enum _eab_popup_target_t {
/**
* enum _eab_popup_target_select_t - EABPopupTargetSelect qualifiers.
- *
+ *
* @EAB_POPUP_SELECT_ONE: Only one item is selected.
* @EAB_POPUP_SELECT_MANY: Two or more items are selected.
* @EAB_POPUP_SELECT_ANY: One or more items are selected.
@@ -77,10 +77,10 @@ enum _eab_popup_target_uri_t {
};
/**
* enum _eab_popup_target_source_t - EABPopupTargetSource qualifiers.
- *
+ *
* @EAB_POPUP_SOURCE_PRIMARY: Has a primary selection.
* @EAB_POPUP_SOURCE_SYSTEM: Is a 'system' folder.
- *
+ *
**/
enum _eab_popup_target_source_t {
EAB_POPUP_SOURCE_PRIMARY = 1<<0,
@@ -94,7 +94,7 @@ typedef struct _EABPopupTargetSelectNames EABPopupTargetSelectNames;
typedef struct _EABPopupTargetURI EABPopupTargetURI;
/**
* struct _EABPopupTargetSelect - A list of address cards.
- *
+ *
* @target: Superclass.
* @book: Book the cards belong to.
* @cards: All selected cards.
@@ -117,7 +117,7 @@ struct _EABPopupTargetURI {
/**
* struct _EABPopupTargetSource - A source target.
- *
+ *
* @target: Superclass.
* @selector: Selector holding the source selection.
*
@@ -133,7 +133,7 @@ struct _EABPopupTargetSource {
/**
* struct _EABPopupTargetSelectNames - A select names target.
- *
+ *
* @target: Superclass.
* @model: Select names model.
* @row: Row of item selected.
diff --git a/addressbook/gui/widgets/eab-vcard-control.c b/addressbook/gui/widgets/eab-vcard-control.c
index 678a841be9..8922c396c5 100644
--- a/addressbook/gui/widgets/eab-vcard-control.c
+++ b/addressbook/gui/widgets/eab-vcard-control.c
@@ -112,8 +112,8 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream,
char *vcard;
EABVCardControl *vcard_control = data;
- if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 &&
- g_ascii_strcasecmp (type, "text/x-vCard") != 0) {
+ if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 &&
+ g_ascii_strcasecmp (type, "text/x-vCard") != 0) {
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_Bonobo_Persist_WrongDataType, NULL);
return;
@@ -140,8 +140,8 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream,
if (list && list->next) {
char *message;
int length = g_list_length (list) - 1;
- message = g_strdup_printf (ngettext("There is one other contact.",
- "There are %d other contacts.", length),
+ message = g_strdup_printf (ngettext("There is one other contact.",
+ "There are %d other contacts.", length),
length);
gtk_label_set_text (GTK_LABEL (vcard_control->label), message);
g_free (message);
@@ -163,8 +163,8 @@ pstream_save (BonoboPersistStream *ps, const Bonobo_Stream stream,
char *vcard;
int length;
- if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 &&
- g_ascii_strcasecmp (type, "text/x-vCard") != 0) {
+ if (type && g_ascii_strcasecmp (type, "text/vCard") != 0 &&
+ g_ascii_strcasecmp (type, "text/x-vCard") != 0) {
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_Bonobo_Persist_WrongDataType, NULL);
return;
diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c
index dc32f74fc5..cf0833d1fe 100644
--- a/addressbook/gui/widgets/gal-view-minicard.c
+++ b/addressbook/gui/widgets/gal-view-minicard.c
@@ -22,7 +22,7 @@
static GalViewClass *gal_view_minicard_parent_class;
-static void
+static void
gal_view_minicard_load (GalView *view,
const char *filename)
{
diff --git a/addressbook/gui/widgets/test-reflow.c b/addressbook/gui/widgets/test-reflow.c
index 25b9c525a5..a71a052525 100644
--- a/addressbook/gui/widgets/test-reflow.c
+++ b/addressbook/gui/widgets/test-reflow.c
@@ -102,7 +102,7 @@ static void resize(GnomeCanvas *canvas, gpointer data)
gnome_canvas_item_set( rect,
"x2", (double) width,
"y2", (double) last_alloc.height,
- NULL );
+ NULL );
}
int main( int argc, char *argv[] )
@@ -157,7 +157,7 @@ int main( int argc, char *argv[] )
e_scroll_frame_set_policy (E_SCROLL_FRAME (scrollframe),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_NEVER);
-
+
gtk_container_add (GTK_CONTAINER (scrollframe), canvas);
gnome_app_set_contents( GNOME_APP( app ), scrollframe );
@@ -172,7 +172,7 @@ int main( int argc, char *argv[] )
gtk_widget_show_all( app );
gdk_window_set_back_pixmap( GTK_LAYOUT(canvas)->bin_window, NULL, FALSE);
- gtk_main();
+ gtk_main();
/* Not reached. */
return 0;
diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c
index ade0e670db..e77d9067a8 100644
--- a/addressbook/importers/evolution-csv-importer.c
+++ b/addressbook/importers/evolution-csv-importer.c
@@ -50,8 +50,8 @@ typedef struct {
EImportTarget *target;
guint idle_id;
-
- int state;
+
+ int state;
FILE *file;
gulong size;
gint count;
@@ -73,14 +73,14 @@ typedef struct {
#define FLAG_OTHER_ADDRESS 0x04
#define FLAG_STREET 0x08
#define FLAG_CITY 0x10
-#define FLAG_STATE 0x20
+#define FLAG_STATE 0x20
#define FLAG_POSTAL_CODE 0x40
#define FLAG_COUNTRY 0x80
-#define FLAG_POBOX 0x70
+#define FLAG_POBOX 0x70
#define FLAG_DATE_BDAY 0x03
-#define FLAG_BIRTH_DAY 0x05
+#define FLAG_BIRTH_DAY 0x05
#define FLAG_BIRTH_YEAR 0x07
-#define FLAG_BIRTH_MONTH 0x50
+#define FLAG_BIRTH_MONTH 0x50
#define FLAG_DATE_ANNIVERSARY 0x30
#define FLAG_INVALID 0xff
int flags;
@@ -158,7 +158,7 @@ static import_fields csv_fields_outlook[] = {
{"Hobby", NOMAP},
{"Home Address PO Box", NOMAP, FLAG_HOME_ADDRESS|FLAG_POBOX},
{"Initials", NOMAP},
- {"Internet FREE/BUSY", E_CONTACT_FREEBUSY_URL},
+ {"Internet FREE/BUSY", E_CONTACT_FREEBUSY_URL},
{"Keywords", NOMAP},
{"Language", NOMAP},
{"Location", NOMAP},
@@ -218,8 +218,8 @@ static import_fields csv_fields_mozilla[] = {
{"Custom 3", NOMAP},
{"Custom 4", NOMAP},
{"Notes", NOMAP},
-
-
+
+
};
static import_fields csv_fields_evolution[] = {
@@ -265,15 +265,15 @@ add_to_notes(EContact *contact, gint i, char *val) {
const gchar *old_text;
const gchar *field_text = NULL;
GString *new_text;
-
+
old_text = e_contact_get_const(contact, E_CONTACT_NOTE);
if(importer == OUTLOOK_IMPORTER)
field_text = csv_fields_outlook[i].csv_attribute;
else if(importer == MOZILLA_IMPORTER)
field_text = csv_fields_mozilla[i].csv_attribute;
else
- field_text = csv_fields_evolution[i].csv_attribute;
-
+ field_text = csv_fields_evolution[i].csv_attribute;
+
new_text = g_string_new(old_text);
if(strlen(new_text->str) != 0)
new_text = g_string_append_c(new_text, '\n');
@@ -302,7 +302,7 @@ date_from_string (const char *str)
length = t - str;
else
length = strlen(str);
-
+
if (g_ascii_isdigit (str[i]) && g_ascii_isdigit (str[i+1])) {
date->month = str[i] * 10 + str[i+1] - '0' * 11;
i = i+3;
@@ -321,13 +321,13 @@ date_from_string (const char *str)
i = i+2;
}
date->year = str[i] * 1000 + str[i+1] * 100 + str[i+2] * 10 + str[i+3] - '0' * 1111;
-
+
return date;
}
-static gboolean
+static gboolean
parseLine (CSVImporter *gci, EContact *contact, char **buf) {
-
+
char *ptr = *buf;
GString *value;
gint i = 0;
@@ -343,7 +343,7 @@ parseLine (CSVImporter *gci, EContact *contact, char **buf) {
work_address = g_new0(EContactAddress, 1);
other_address = g_new0(EContactAddress, 1);
bday = g_new0(EContactDate, 1);
-
+
while(*ptr != '\n') {
value = g_string_new("");
while(*ptr != delimiter) {
@@ -455,7 +455,7 @@ parseLine (CSVImporter *gci, EContact *contact, char **buf) {
case FLAG_DATE_BDAY:
e_contact_set(contact, E_CONTACT_BIRTH_DATE, date_from_string(value->str));
break;
-
+
case FLAG_DATE_ANNIVERSARY:
e_contact_set(contact, E_CONTACT_ANNIVERSARY, date_from_string(value->str));
break;
@@ -472,9 +472,9 @@ parseLine (CSVImporter *gci, EContact *contact, char **buf) {
case FLAG_INVALID:
break;
-
+
default:
- add_to_notes(contact, i, value->str);
+ add_to_notes(contact, i, value->str);
}
}
@@ -495,13 +495,13 @@ parseLine (CSVImporter *gci, EContact *contact, char **buf) {
g_string_free(other_street, TRUE);
if(home_address->locality || home_address->country ||
- home_address->code || home_address->region || home_address->street)
+ home_address->code || home_address->region || home_address->street)
e_contact_set (contact, E_CONTACT_ADDRESS_HOME, home_address);
if(work_address->locality || work_address->country ||
- work_address->code || work_address->region || work_address->street)
+ work_address->code || work_address->region || work_address->street)
e_contact_set (contact, E_CONTACT_ADDRESS_WORK, work_address);
if(other_address->locality || other_address->country ||
- other_address->code || other_address->region || other_address->street)
+ other_address->code || other_address->region || other_address->street)
e_contact_set (contact, E_CONTACT_ADDRESS_OTHER, other_address);
if(importer != OUTLOOK_IMPORTER) {
@@ -520,12 +520,12 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) {
char *buf;
char c;
- /*
- if(!fgets(line, sizeof(line),f))
+ /*
+ if(!fgets(line, sizeof(line),f))
return NULL;
if(gci->count == 0 && importer != MOZILLA_IMPORTER) {
- if(!fgets(line, sizeof(line),f))
+ if(!fgets(line, sizeof(line),f))
return NULL;
gci->count ++;
}
@@ -552,7 +552,7 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) {
else
g_string_append_unichar(line, c);
}
-
+
if(gci->count == 0 && importer != MOZILLA_IMPORTER) {
g_string_free (line, TRUE);
line = g_string_new("");
@@ -575,7 +575,7 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) {
}
else
g_string_append_unichar(line, c);
- }
+ }
gci->count ++;
}
@@ -583,12 +583,12 @@ getNextCSVEntry(CSVImporter *gci, FILE *f) {
str = g_string_append (str, line->str);
g_string_free (line, TRUE);
-
+
if(strlen(str->str) == 0) {
g_string_free(str, TRUE);
return NULL;
}
-
+
contact = e_contact_new();
buf = str->str;
@@ -639,14 +639,14 @@ csv_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *vbox, *selector;
ESource *primary;
- ESourceList *source_list;
+ ESourceList *source_list;
/* FIXME Better error handling */
if (!e_book_get_addressbooks (&source_list, NULL))
return NULL;
vbox = gtk_vbox_new (FALSE, FALSE);
-
+
selector = e_source_selector_new (source_list);
e_source_selector_show_selection (E_SOURCE_SELECTOR (selector), FALSE);
gtk_box_pack_start (GTK_BOX (vbox), selector, FALSE, TRUE, 6);
@@ -677,7 +677,7 @@ csv_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
char *ext;
int i;
EImportTargetURI *s;
-
+
if (target->type != E_IMPORT_TARGET_URI)
return FALSE;
@@ -759,26 +759,26 @@ csv_import (EImport *ei, EImportTarget *target, EImportImporter *im)
fseek(file, 0, SEEK_SET);
e_book_open(gci->book, FALSE, NULL);
-
+
gci->idle_id = g_idle_add (csv_import_contacts, gci);
}
static void
-outlook_csv_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+outlook_csv_import(EImport *ei, EImportTarget *target, EImportImporter *im)
{
importer = OUTLOOK_IMPORTER;
csv_import(ei, target, im);
}
static void
-mozilla_csv_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+mozilla_csv_import(EImport *ei, EImportTarget *target, EImportImporter *im)
{
importer = MOZILLA_IMPORTER;
csv_import(ei, target, im);
}
static void
-evolution_csv_import(EImport *ei, EImportTarget *target, EImportImporter *im)
+evolution_csv_import(EImport *ei, EImportTarget *target, EImportImporter *im)
{
importer = EVOLUTION_IMPORTER;
csv_import(ei, target, im);
@@ -791,7 +791,7 @@ csv_cancel(EImport *ei, EImportTarget *target, EImportImporter *im) {
if(gci)
gci->state = 1;
}
-
+
static EImportImporter csv_outlook_importer = {
E_IMPORT_TARGET_URI,
@@ -825,7 +825,7 @@ evolution_csv_outlook_importer_peek(void)
{
csv_outlook_importer.name = _("Outlook CSV or Tab (.csv, .tab)");
csv_outlook_importer.description = _("Outlook CSV and Tab Importer");
-
+
return &csv_outlook_importer;
}
@@ -833,8 +833,8 @@ EImportImporter *
evolution_csv_mozilla_importer_peek(void)
{
csv_mozilla_importer.name = _("Mozilla CSV or Tab (.csv, .tab)");
- csv_mozilla_importer.description = _("Mozilla CSV and Tab Importer");
-
+ csv_mozilla_importer.description = _("Mozilla CSV and Tab Importer");
+
return &csv_mozilla_importer;
}
@@ -842,7 +842,7 @@ EImportImporter *
evolution_csv_evolution_importer_peek(void)
{
csv_evolution_importer.name = _("Evolution CSV or Tab (.csv, .tab)");
- csv_evolution_importer.description = _("Evolution CSV and Tab Importer");
-
+ csv_evolution_importer.description = _("Evolution CSV and Tab Importer");
+
return &csv_evolution_importer;
}
diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c
index 1e055db4da..2361c41310 100644
--- a/addressbook/importers/evolution-ldif-importer.c
+++ b/addressbook/importers/evolution-ldif-importer.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* LDIF importer. LDIF is the file format of an exported Netscape
* addressbook.
*
@@ -155,7 +155,7 @@ getValue( char **src )
static void
populate_contact_address (EContactAddress *address, char *attr, char *value)
{
- if (!g_ascii_strcasecmp (attr, "locality") ||
+ if (!g_ascii_strcasecmp (attr, "locality") ||
!g_ascii_strcasecmp (attr, "l") ||
!g_ascii_strcasecmp (attr, "mozillaHomeLocalityName"))
address->locality = g_strdup (value);
@@ -179,7 +179,7 @@ populate_contact_address (EContactAddress *address, char *attr, char *value)
address->ext = g_strconcat (temp, ",\n", value, NULL);
g_free (temp);
}
- else {
+ else {
address->ext = g_strdup (value);
}
}
@@ -209,8 +209,8 @@ populate_contact_address (EContactAddress *address, char *attr, char *value)
}
static gboolean
-parseLine (LDIFImporter *gci, EContact *contact,
- EContactAddress *work_address, EContactAddress *home_address,
+parseLine (LDIFImporter *gci, EContact *contact,
+ EContactAddress *work_address, EContactAddress *home_address,
char **buf)
{
char *ptr;
@@ -371,7 +371,7 @@ getNextLDIFEntry(LDIFImporter *gci, FILE *f )
work_address->code || work_address->region || work_address->street) {
e_contact_set (contact, E_CONTACT_ADDRESS_WORK, work_address);
}
- if (home_address->locality || home_address->country || home_address->ext ||
+ if (home_address->locality || home_address->country || home_address->ext ||
home_address->code || home_address->region || home_address->street) {
e_contact_set (contact, E_CONTACT_ADDRESS_HOME, home_address);
}
@@ -419,7 +419,7 @@ resolve_list_card (LDIFImporter *gci, EContact *contact)
email_attrs = g_list_append (email_attrs, attr);
}
- }
+ }
e_contact_set_attributes (contact, E_CONTACT_EMAIL, email_attrs);
g_list_foreach (email, (GFunc) g_free, NULL);
@@ -514,14 +514,14 @@ ldif_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *vbox, *selector;
ESource *primary;
- ESourceList *source_list;
+ ESourceList *source_list;
/* FIXME Better error handling */
if (!e_book_get_addressbooks (&source_list, NULL))
return NULL;
vbox = gtk_vbox_new (FALSE, FALSE);
-
+
selector = e_source_selector_new (source_list);
e_source_selector_show_selection (E_SOURCE_SELECTOR (selector), FALSE);
gtk_box_pack_start (GTK_BOX (vbox), selector, FALSE, TRUE, 6);
diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c
index 5a7615f924..9afb1b0a47 100644
--- a/addressbook/importers/evolution-vcard-importer.c
+++ b/addressbook/importers/evolution-vcard-importer.c
@@ -54,7 +54,7 @@ typedef struct {
int count;
ESource *primary;
-
+
GList *contactlist;
GList *iterator;
EBook *book;
@@ -258,7 +258,7 @@ vcard_import_contacts(void *data)
static gboolean
has_bom (const gunichar2 *utf16)
{
-
+
if ((utf16 == NULL) || (*utf16 == '\0')) {
return FALSE;
}
@@ -273,7 +273,7 @@ fix_utf16_endianness (gunichar2 *utf16)
if ((utf16 == NULL) || (*utf16 == '\0')) {
- return;
+ return;
}
if (*utf16 != ANTIBOM) {
@@ -285,14 +285,14 @@ fix_utf16_endianness (gunichar2 *utf16)
}
}
-/* Converts an UTF-16 string to an UTF-8 string removing the BOM character
+/* Converts an UTF-16 string to an UTF-8 string removing the BOM character
* WARNING: this may modify the utf16 argument if the function detects the
* string isn't using the local endianness
*/
static gchar *
utf16_to_utf8 (gunichar2 *utf16)
{
-
+
if (utf16 == NULL) {
return NULL;
}
@@ -329,7 +329,7 @@ guess_vcard_encoding (const char *filename)
g_print ("\n");
return VCARD_ENCODING_NONE;
}
-
+
fgets (line, 4096, handle);
if (line == NULL) {
fclose (handle);
@@ -337,7 +337,7 @@ guess_vcard_encoding (const char *filename)
return VCARD_ENCODING_NONE;
}
fclose (handle);
-
+
if (has_bom ((gunichar2*)line)) {
gunichar2 *utf16 = (gunichar2*)line;
/* Check for a BOM to try to detect UTF-16 encoded vcards
@@ -380,7 +380,7 @@ vcard_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *vbox, *selector;
ESource *primary;
- ESourceList *source_list;
+ ESourceList *source_list;
/* FIXME Better error handling */
if (!e_book_get_addressbooks (&source_list, NULL))
@@ -391,7 +391,7 @@ vcard_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
selector = e_source_selector_new (source_list);
e_source_selector_show_selection (E_SOURCE_SELECTOR (selector), FALSE);
gtk_box_pack_start (GTK_BOX (vbox), selector, FALSE, TRUE, 6);
-
+
primary = g_datalist_get_data(&target->data, "vcard-source");
if (primary == NULL) {
primary = e_source_list_peek_source_any (source_list);
@@ -480,7 +480,7 @@ vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im)
e_import_complete(ei, target);
return;
}
-
+
if (!g_file_get_contents (filename, &contents, NULL, NULL)) {
g_message (G_STRLOC ":Couldn't read file.");
g_free (filename);
@@ -522,7 +522,7 @@ vcard_import(EImport *ei, EImportTarget *target, EImportImporter *im)
else
vcard_import_done(gci);
}
-
+
static void
vcard_cancel(EImport *ei, EImportTarget *target, EImportImporter *im)
{
diff --git a/addressbook/printing/e-contact-print-style-editor.c b/addressbook/printing/e-contact-print-style-editor.c
index 0e4c3246b0..7ae6111e06 100644
--- a/addressbook/printing/e-contact-print-style-editor.c
+++ b/addressbook/printing/e-contact-print-style-editor.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-contact-print-style-editor.c
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
@@ -70,7 +70,7 @@ e_contact_print_style_editor_class_init (EContactPrintStyleEditorClass *klass)
object_class = (GtkObjectClass*) klass;
parent_class = gtk_type_class (gtk_vbox_get_type ());
-
+
object_class->set_arg = e_contact_print_style_editor_set_arg;
object_class->get_arg = e_contact_print_style_editor_get_arg;
object_class->destroy = e_contact_print_style_editor_destroy;
diff --git a/addressbook/printing/e-contact-print-style-editor.h b/addressbook/printing/e-contact-print-style-editor.h
index 1925a4a95a..0041c518da 100644
--- a/addressbook/printing/e-contact-print-style-editor.h
+++ b/addressbook/printing/e-contact-print-style-editor.h
@@ -51,7 +51,7 @@ typedef struct _EContactPrintStyleEditorClass EContactPrintStyleEditorClass;
struct _EContactPrintStyleEditor
{
GtkVBox parent;
-
+
/* item specific fields */
GladeXML *gui;
};
diff --git a/addressbook/printing/e-contact-print-types.h b/addressbook/printing/e-contact-print-types.h
index 44448d6796..fe554fff4a 100644
--- a/addressbook/printing/e-contact-print-types.h
+++ b/addressbook/printing/e-contact-print-types.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-contact-print-types.h
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index b8b1aee6f2..d2ca1a6e64 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-contact-print.c
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
@@ -225,10 +225,10 @@ e_contact_print_contact (EContact *contact, EContactPrintContext *ctxt)
cr = gtk_print_context_get_cairo_context (ctxt->context);
cairo_save(cr);
- ctxt->y += get_font_height (ctxt->style->headings_font) * .2;
+ ctxt->y += get_font_height (ctxt->style->headings_font) * .2;
file_as = e_contact_get (contact, E_CONTACT_FILE_AS);
-
+
if (ctxt->style->print_using_grey) {
cairo_save (cr);
cairo_set_source_rgb (cr, .85, .85, .85);
@@ -249,7 +249,7 @@ e_contact_print_contact (EContact *contact, EContactPrintContext *ctxt)
ctxt->y += get_font_height (ctxt->style->headings_font) * .2;
- for (field = E_CONTACT_FILE_AS; field != E_CONTACT_LAST_SIMPLE_STRING; field++)
+ for (field = E_CONTACT_FILE_AS; field != E_CONTACT_LAST_SIMPLE_STRING; field++)
{
const gchar *value;
gchar *text;
@@ -262,7 +262,7 @@ e_contact_print_contact (EContact *contact, EContactPrintContext *ctxt)
e_contact_pretty_name (field), value);
e_contact_output (
- ctxt->context, ctxt->style->body_font,
+ ctxt->context, ctxt->style->body_font,
ctxt->x, ctxt->y, -1, text);
ctxt->y += e_contact_text_height (
@@ -328,7 +328,7 @@ contacts_added (EBookView *book_view, const GList *contact_list,
}
}
-static void
+static void
sequence_complete (EBookView *book_view, const GList *contact_list,
EFlag *book_view_started)
{
@@ -627,9 +627,9 @@ contact_draw (EContact *contact, EContactPrintContext *ctxt)
if (ctxt->style->letter_headings)
e_contact_print_letter_heading (ctxt, ctxt->section);
ctxt->first_section = FALSE;
- }
+ }
- else if (!ctxt->first_contact && (ctxt->y > page_height)) {
+ else if (!ctxt->first_contact && (ctxt->y > page_height)) {
e_contact_start_new_column (ctxt);
if (ctxt->style->letter_headings)
e_contact_print_letter_heading (ctxt, ctxt->section);
@@ -648,7 +648,7 @@ contact_draw_page (GtkPrintOperation *operation,
{
g_list_foreach (ctxt->contact_list, (GFunc) contact_draw, ctxt);
}
-
+
static void
contact_end_print (GtkPrintOperation *operation,
GtkPrintContext *context,
diff --git a/addressbook/printing/e-contact-print.h b/addressbook/printing/e-contact-print.h
index 16fe8b8dcb..fbafb136aa 100644
--- a/addressbook/printing/e-contact-print.h
+++ b/addressbook/printing/e-contact-print.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-contact-print.h
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
diff --git a/addressbook/printing/test-contact-print-style-editor.c b/addressbook/printing/test-contact-print-style-editor.c
index f5d20eea77..b10d1433d0 100644
--- a/addressbook/printing/test-contact-print-style-editor.c
+++ b/addressbook/printing/test-contact-print-style-editor.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* test-contact-print-style-editor.c
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
@@ -42,7 +42,7 @@ static void destroy_callback(GtkWidget *app, gpointer data)
#if 0
static void about_callback( GtkWidget *widget, gpointer data )
{
-
+
const gchar *authors[] =
{
"Christopher James Lahey <clahey@umich.edu>",
@@ -55,7 +55,7 @@ static void about_callback( GtkWidget *widget, gpointer data )
authors,
_( "This should test the contact print style editor widget" ),
NULL);
- gtk_widget_show (about);
+ gtk_widget_show (about);
}
#endif
@@ -76,7 +76,7 @@ int main( int argc, char *argv[] )
app = gnome_app_new("Contact Print Style Editor Test", NULL);
editor = e_contact_print_style_editor_new("");
-
+
gnome_app_set_contents( GNOME_APP( app ), editor );
/* Connect the signals */
@@ -86,7 +86,7 @@ int main( int argc, char *argv[] )
gtk_widget_show_all( app );
- bonobo_main();
+ bonobo_main();
/* Not reached. */
return 0;
diff --git a/addressbook/printing/test-print.c b/addressbook/printing/test-print.c
index d86c33baea..7fc367d24d 100644
--- a/addressbook/printing/test-print.c
+++ b/addressbook/printing/test-print.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* test-print.c
* Copyright (C) 2000 Ximian, Inc.
* Author: Chris Lahey <clahey@ximian.com>
@@ -32,7 +32,7 @@
#if 0
static void about_callback( GtkWidget *widget, gpointer data )
{
-
+
const gchar *authors[] =
{
"Christopher James Lahey <clahey@umich.edu>",
@@ -45,7 +45,7 @@ static void about_callback( GtkWidget *widget, gpointer data )
authors,
_( "This should test the contact print code" ),
NULL);
- gtk_widget_show (about);
+ gtk_widget_show (about);
}
#endif
@@ -62,7 +62,7 @@ int main( int argc, char *argv[] )
NULL);
glade_init ();
-
+
shown_fields = g_list_append(shown_fields, "First field");
shown_fields = g_list_append(shown_fields, "Second field");
shown_fields = g_list_append(shown_fields, "Third field");
@@ -71,7 +71,7 @@ int main( int argc, char *argv[] )
/* does nothing */
e_contact_print (NULL, NULL, NULL, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
- bonobo_main();
+ bonobo_main();
/* Not reached. */
return 0;
diff --git a/addressbook/tools/evolution-addressbook-export-list-cards.c b/addressbook/tools/evolution-addressbook-export-list-cards.c
index f09d481f46..6e8d18e89f 100644
--- a/addressbook/tools/evolution-addressbook-export-list-cards.c
+++ b/addressbook/tools/evolution-addressbook-export-list-cards.c
@@ -728,7 +728,7 @@ action_list_cards (GList *contacts, ActionContext * p_actctx)
#ifdef G_OS_WIN32
/* On Unix the parent exits already in
* fork_to_background(), but without fork() exit only
- * after doing the job. XXX Is this correct?
+ * after doing the job. XXX Is this correct?
*/
if (IsFirstOne == FALSE)
_exit (-1);
diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c
index af73fe074b..07f37e1a05 100644
--- a/addressbook/util/eab-book-util.c
+++ b/addressbook/util/eab-book-util.c
@@ -13,12 +13,12 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -100,8 +100,8 @@ eab_name_and_email_query (EBook *book,
* We only query against the username part of the address, to avoid not matching
* fred@foo.com and fred@mail.foo.com. While their may be namespace collisions
* in the usernames of everyone out there, it shouldn't be that bad. (Famous last words.)
- * But if name is missing we query against complete email id to avoid matching emails like
- * users@foo.org with users@bar.org
+ * But if name is missing we query against complete email id to avoid matching emails like
+ * users@foo.org with users@bar.org
*/
if (escaped_email) {
const gchar *t = escaped_email;
@@ -116,7 +116,7 @@ eab_name_and_email_query (EBook *book,
}
/* Build our name query.*/
-
+
if (escaped_name)
name_query = g_strdup_printf ("(or (beginswith \"file_as\" \"%s\") (beginswith \"full_name\" \"%s\"))", escaped_name, escaped_name);
@@ -185,21 +185,21 @@ eab_strstrcase (const char *haystack, const char *needle)
/* find the needle in the haystack neglecting case */
const char *ptr;
guint len;
-
+
g_return_val_if_fail (haystack != NULL, NULL);
g_return_val_if_fail (needle != NULL, NULL);
-
+
len = strlen (needle);
if (len > strlen (haystack))
return NULL;
-
+
if (len == 0)
return (char *) haystack;
-
+
for (ptr = haystack; *(ptr + len - 1) != '\0'; ptr++)
if (!g_ascii_strncasecmp (ptr, needle, len))
return (char *) ptr;
-
+
return NULL;
}
@@ -227,7 +227,7 @@ eab_contact_list_from_string (const char *str)
while (*p) {
if (*p != '\r') g_string_append_c (gstr, *p);
-
+
p++;
}
@@ -235,7 +235,7 @@ eab_contact_list_from_string (const char *str)
/* Note: The VCard standard says
*
- * vcard = "BEGIN" [ws] ":" [ws] "VCARD" [ws] 1*CRLF
+ * vcard = "BEGIN" [ws] ":" [ws] "VCARD" [ws] 1*CRLF
* items *CRLF "END" [ws] ":" [ws] "VCARD"
*
* which means we can have whitespace (e.g. "BEGIN : VCARD"). So we're not being
@@ -243,7 +243,7 @@ eab_contact_list_from_string (const char *str)
* would be to have a vcard parsing function that returned the end of the vcard
* parsed. Arguably, contact list parsing should all be in libebook's e-vcard.c,
* where we can do proper parsing and validation without code duplication. */
-
+
for (p = eab_strstrcase (p, "BEGIN:VCARD"); p; p = eab_strstrcase (q, "\nBEGIN:VCARD")) {
gchar *card_str;
@@ -361,8 +361,8 @@ static void
have_address_query_cb (EBook *book, EBookSimpleQueryStatus status, const GList *contacts, gpointer closure)
{
HaveAddressInfo *info = (HaveAddressInfo *) closure;
-
- info->cb (book,
+
+ info->cb (book,
info->email,
contacts && (status == E_BOOK_ERROR_OK) ? E_CONTACT (contacts->data) : NULL,
info->closure);
diff --git a/addressbook/util/eab-book-util.h b/addressbook/util/eab-book-util.h
index 5ba3460651..9de1b497be 100644
--- a/addressbook/util/eab-book-util.h
+++ b/addressbook/util/eab-book-util.h
@@ -13,12 +13,12 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
diff --git a/calendar/common/authentication.c b/calendar/common/authentication.c
index f8bce7c86e..f11a0ed1ff 100644
--- a/calendar/common/authentication.c
+++ b/calendar/common/authentication.c
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors :
+/*
+ * Authors :
* Rodrigo Moya <rodrigo@ximian.com>
*
* Copyright 2003, Novell, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -59,7 +59,7 @@ ECal *
auth_new_cal_from_default (ECalSourceType type)
{
ECal *ecal = NULL;
-
+
if (!e_cal_open_default (&ecal, type, auth_func_cb, NULL, NULL))
return NULL;
diff --git a/calendar/common/authentication.h b/calendar/common/authentication.h
index 4cc398f522..2b5804c039 100644
--- a/calendar/common/authentication.h
+++ b/calendar/common/authentication.h
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors :
+/*
+ * Authors :
* Rodrigo Moya <rodrigo@ximian.com>
*
* Copyright 2003, Novell, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c
index b37941aafd..2654477e0f 100644
--- a/calendar/conduits/calendar/calendar-conduit.c
+++ b/calendar/conduits/calendar/calendar-conduit.c
@@ -4,7 +4,7 @@
* Copyright (C) 1998 Free Software Foundation
* Copyright (C) 2000 Ximian, Inc.
*
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
+ * Authors: Eskil Heyn Olsen <deity@eskil.dk>
* JP Rosevear <jpr@ximian.com>
*
* This program is free software; you can redistribute it and/or
@@ -56,7 +56,7 @@ void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
#define LOG(x) x
#else
#define LOG(x)
-#endif
+#endif
#define WARN g_warning
#define INFO g_message
@@ -101,18 +101,18 @@ struct _ECalConduitCfg {
ESource *source;
gboolean secret;
gboolean multi_day_split;
-
+
gchar *last_uri;
};
static ECalConduitCfg *
-calconduit_load_configuration (guint32 pilot_id)
+calconduit_load_configuration (guint32 pilot_id)
{
ECalConduitCfg *c;
GnomePilotConduitManagement *management;
GnomePilotConduitConfig *config;
gchar prefix[256];
-
+
c = g_new0 (ECalConduitCfg, 1);
g_assert (c != NULL);
@@ -152,14 +152,14 @@ calconduit_load_configuration (guint32 pilot_id)
char *filename = g_filename_from_uri (c->last_uri, NULL, NULL);
const char *path = filename;
const char *home;
-
+
home = g_get_home_dir ();
-
+
if (!strncmp (path, home, strlen (home))) {
path += strlen (home);
if (G_IS_DIR_SEPARATOR (*path))
path++;
-
+
if (!strcmp (path, "evolution/local/Calendar/calendar.ics")) {
gchar *new_filename =
g_build_filename (home,
@@ -173,14 +173,14 @@ calconduit_load_configuration (guint32 pilot_id)
}
g_free (filename);
}
-
- gnome_config_pop_prefix ();
+
+ gnome_config_pop_prefix ();
return c;
}
static void
-calconduit_save_configuration (ECalConduitCfg *c)
+calconduit_save_configuration (ECalConduitCfg *c)
{
gchar prefix[256];
@@ -199,7 +199,7 @@ calconduit_save_configuration (ECalConduitCfg *c)
}
static ECalConduitCfg*
-calconduit_dupe_configuration (ECalConduitCfg *c)
+calconduit_dupe_configuration (ECalConduitCfg *c)
{
ECalConduitCfg *retval;
@@ -216,12 +216,12 @@ calconduit_dupe_configuration (ECalConduitCfg *c)
retval->secret = c->secret;
retval->multi_day_split = c->multi_day_split;
retval->last_uri = g_strdup (c->last_uri);
-
+
return retval;
}
-static void
-calconduit_destroy_configuration (ECalConduitCfg *c)
+static void
+calconduit_destroy_configuration (ECalConduitCfg *c)
{
g_return_if_fail (c != NULL);
@@ -237,12 +237,12 @@ struct _ECalConduitGui {
};
static ECalConduitGui *
-e_cal_gui_new (EPilotSettings *ps)
+e_cal_gui_new (EPilotSettings *ps)
{
ECalConduitGui *gui;
GtkWidget *lbl;
gint rows;
-
+
g_return_val_if_fail (ps != NULL, NULL);
g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), NULL);
@@ -257,12 +257,12 @@ e_cal_gui_new (EPilotSettings *ps)
gtk_table_attach_defaults (GTK_TABLE (ps), gui->multi_day_split, 1, 2, rows, rows + 1);
gtk_widget_show (lbl);
gtk_widget_show (gui->multi_day_split);
-
+
return gui;
}
static void
-e_cal_gui_fill_widgets (ECalConduitGui *gui, ECalConduitCfg *cfg)
+e_cal_gui_fill_widgets (ECalConduitGui *gui, ECalConduitCfg *cfg)
{
g_return_if_fail (gui != NULL);
g_return_if_fail (cfg != NULL);
@@ -272,7 +272,7 @@ e_cal_gui_fill_widgets (ECalConduitGui *gui, ECalConduitCfg *cfg)
}
static void
-e_cal_gui_fill_config (ECalConduitGui *gui, ECalConduitCfg *cfg)
+e_cal_gui_fill_config (ECalConduitGui *gui, ECalConduitCfg *cfg)
{
g_return_if_fail (gui != NULL);
g_return_if_fail (cfg != NULL);
@@ -281,7 +281,7 @@ e_cal_gui_fill_config (ECalConduitGui *gui, ECalConduitCfg *cfg)
}
static void
-e_cal_gui_destroy (ECalConduitGui *gui)
+e_cal_gui_destroy (ECalConduitGui *gui)
{
g_free (gui);
}
@@ -294,7 +294,7 @@ struct _ECalConduitContext {
ECalConduitCfg *new_cfg;
ECalConduitGui *gui;
GtkWidget *ps;
-
+
struct AppointmentAppInfo ai;
ECal *client;
@@ -305,18 +305,18 @@ struct _ECalConduitContext {
GList *changed;
GHashTable *changed_hash;
GList *locals;
-
+
EPilotMap *map;
};
static ECalConduitContext *
-e_calendar_context_new (guint32 pilot_id)
+e_calendar_context_new (guint32 pilot_id)
{
ECalConduitContext *ctxt;
ctxt = g_new0 (ECalConduitContext, 1);
g_assert (ctxt != NULL);
-
+
ctxt->cfg = calconduit_load_configuration (pilot_id);
ctxt->new_cfg = calconduit_dupe_configuration (ctxt->cfg);
ctxt->ps = NULL;
@@ -329,12 +329,12 @@ e_calendar_context_new (guint32 pilot_id)
ctxt->changed_hash = NULL;
ctxt->locals = NULL;
ctxt->map = NULL;
-
+
return ctxt;
}
static gboolean
-e_calendar_context_foreach_change (gpointer key, gpointer value, gpointer data)
+e_calendar_context_foreach_change (gpointer key, gpointer value, gpointer data)
{
g_free (key);
@@ -345,7 +345,7 @@ static void
e_calendar_context_destroy (ECalConduitContext *ctxt)
{
GList *l;
-
+
g_return_if_fail (ctxt != NULL);
if (ctxt->cfg != NULL)
@@ -358,27 +358,27 @@ e_calendar_context_destroy (ECalConduitContext *ctxt)
if (ctxt->client != NULL)
g_object_unref (ctxt->client);
if (ctxt->default_comp != NULL)
- g_object_unref (ctxt->default_comp);
+ g_object_unref (ctxt->default_comp);
if (ctxt->comps != NULL) {
for (l = ctxt->comps; l; l = l->next)
g_object_unref (l->data);
g_list_free (ctxt->comps);
}
-
+
if (ctxt->changed != NULL)
e_cal_free_change_list (ctxt->changed);
-
+
if (ctxt->changed_hash != NULL) {
g_hash_table_foreach_remove (ctxt->changed_hash, e_calendar_context_foreach_change, NULL);
g_hash_table_destroy (ctxt->changed_hash);
}
-
+
if (ctxt->locals != NULL) {
for (l = ctxt->locals; l != NULL; l = l->next)
calconduit_destroy_record (l->data);
g_list_free (ctxt->locals);
}
-
+
if (ctxt->map != NULL)
e_pilot_map_destroy (ctxt->map);
}
@@ -432,7 +432,7 @@ static char *print_remote (GnomePilotRecord *remote)
sprintf (buff, "[NULL]");
return buff;
}
-
+
unpack_Appointment (&appt, buffer, datebook_v1);
pi_buffer_free(buffer);
#else
@@ -481,12 +481,12 @@ start_calendar_server (ECalConduitContext *ctxt)
As of Evo. 2.5.x, timezone should be set before
calling e_cal_open.
*/
-
+
if (ctxt->timezone) {
if (!e_cal_set_default_timezone (ctxt->client, ctxt->timezone, NULL))
return -1;
}
-
+
if (e_source_get_property (ctxt->cfg->source, "auth")) {
EUri *e_uri;
@@ -510,14 +510,14 @@ start_calendar_server (ECalConduitContext *ctxt)
/* Utility routines */
static icaltimezone *
-get_timezone (ECal *client, const char *tzid)
+get_timezone (ECal *client, const char *tzid)
{
icaltimezone *timezone = NULL;
timezone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (timezone == NULL)
+ if (timezone == NULL)
e_cal_get_timezone (client, tzid, &timezone, NULL);
-
+
return timezone;
}
@@ -536,29 +536,29 @@ get_default_timezone (void)
g_free (location);
location = g_strdup ("UTC");
}
-
+
timezone = icaltimezone_get_builtin_timezone (location);
g_free (location);
g_object_unref (listener);
- return timezone;
+ return timezone;
}
static char *
-map_name (ECalConduitContext *ctxt)
+map_name (ECalConduitContext *ctxt)
{
char *filename;
-
+
filename = g_strdup_printf ("%s/.evolution/calendar/local/system/pilot-map-calendar-%d.xml",
g_get_home_dir (), ctxt->cfg->pilot_id);
-
+
return filename;
}
static icalrecurrencetype_weekday
-get_ical_day (int day)
+get_ical_day (int day)
{
switch (day) {
case 0:
@@ -581,7 +581,7 @@ get_ical_day (int day)
}
static int
-get_pilot_day (icalrecurrencetype_weekday wd)
+get_pilot_day (icalrecurrencetype_weekday wd)
{
switch (wd) {
case ICAL_SUNDAY_WEEKDAY:
@@ -604,24 +604,24 @@ get_pilot_day (icalrecurrencetype_weekday wd)
}
static gboolean
-is_empty_time (struct tm time)
+is_empty_time (struct tm time)
{
- if (time.tm_sec || time.tm_min || time.tm_hour
- || time.tm_mday || time.tm_mon || time.tm_year)
+ if (time.tm_sec || time.tm_min || time.tm_hour
+ || time.tm_mday || time.tm_mon || time.tm_year)
return FALSE;
-
+
return TRUE;
}
static gboolean
-is_all_day (ECal *client, ECalComponentDateTime *dt_start, ECalComponentDateTime *dt_end)
+is_all_day (ECal *client, ECalComponentDateTime *dt_start, ECalComponentDateTime *dt_end)
{
time_t dt_start_time, dt_end_time;
icaltimezone *timezone;
if (dt_start->value->is_date && dt_end->value->is_date)
return TRUE;
-
+
timezone = get_timezone (client, dt_start->tzid);
dt_start_time = icaltime_as_timet_with_zone (*dt_start->value, timezone);
dt_end_time = icaltime_as_timet_with_zone (*dt_end->value, get_timezone (client, dt_end->tzid));
@@ -646,7 +646,7 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp
*multi_ccc = NULL;
*multi_comp = NULL;
-
+
if (ccc->type == E_CAL_CHANGE_DELETED)
return FALSE;
@@ -665,7 +665,7 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp
tz_end = get_timezone (ctxt->client, dt_end.tzid);
event_end = icaltime_as_timet_with_zone (*dt_end.value, tz_end);
- day_end = time_day_end_with_zone (event_start, ctxt->timezone);
+ day_end = time_day_end_with_zone (event_start, ctxt->timezone);
if (day_end >= event_end) {
ret = FALSE;
goto cleanup;
@@ -676,7 +676,7 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp
if (dt_start.value->is_date && dt_end.value->is_date)
is_date = TRUE;
-
+
old_start_value = dt_start.value;
old_end_value = dt_end.value;
while (!last) {
@@ -685,7 +685,7 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp
char *new_uid = e_cal_component_gen_uid ();
struct icaltimetype start_value, end_value;
ECalChange *c = NULL;
-
+
if (day_end >= event_end) {
day_end = event_end;
last = TRUE;
@@ -696,13 +696,13 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp
start_value = icaltime_from_timet_with_zone (event_start, is_date, tz_start);
dt_start.value = &start_value;
e_cal_component_set_dtstart (clone, &dt_start);
-
+
end_value = icaltime_from_timet_with_zone (day_end, is_date, tz_end);
dt_end.value = &end_value;
e_cal_component_set_dtend (clone, &dt_end);
e_cal_component_commit_sequence (clone);
-
+
/* FIXME Error handling */
ical_comp = e_cal_component_get_icalcomponent (clone);
if (!ical_comp) {
@@ -717,7 +717,7 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp
c = g_new0 (ECalChange, 1);
c->comp = clone;
c->type = E_CAL_CHANGE_ADDED;
-
+
*multi_ccc = g_list_prepend (*multi_ccc, c);
*multi_comp = g_list_prepend (*multi_comp, g_object_ref (c->comp));
@@ -728,7 +728,7 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp
}
dt_start.value = old_start_value;
dt_end.value = old_end_value;
-
+
e_cal_component_get_uid (ccc->comp, &uid);
/* FIXME Error handling */
if (e_cal_component_is_instance (ccc->comp) || e_cal_component_has_recurrences (ccc->comp))
@@ -754,21 +754,21 @@ nth_weekday (int pos, icalrecurrencetype_weekday weekday)
}
static GList *
-next_changed_item (ECalConduitContext *ctxt, GList *changes)
+next_changed_item (ECalConduitContext *ctxt, GList *changes)
{
ECalChange *ccc;
GList *l;
-
+
for (l = changes; l != NULL; l = l->next) {
const char *uid;
ccc = l->data;
-
+
e_cal_component_get_uid (ccc->comp, &uid);
if (g_hash_table_lookup (ctxt->changed_hash, uid))
return l;
}
-
+
return NULL;
}
@@ -781,21 +781,21 @@ compute_status (ECalConduitContext *ctxt, ECalLocalRecord *local, const char *ui
local->local.secret = FALSE;
ccc = g_hash_table_lookup (ctxt->changed_hash, uid);
-
+
if (ccc == NULL) {
local->local.attr = GnomePilotRecordNothing;
return;
}
-
+
switch (ccc->type) {
case E_CAL_CHANGE_ADDED:
local->local.attr = GnomePilotRecordNew;
break;
-
+
case E_CAL_CHANGE_MODIFIED:
local->local.attr = GnomePilotRecordModified;
break;
-
+
case E_CAL_CHANGE_DELETED:
local->local.attr = GnomePilotRecordDeleted;
break;
@@ -806,16 +806,16 @@ static gboolean
rrules_mostly_equal (struct icalrecurrencetype *a, struct icalrecurrencetype *b)
{
struct icalrecurrencetype acopy, bcopy;
-
+
acopy = *a;
bcopy = *b;
-
+
acopy.until = bcopy.until = icaltime_null_time ();
acopy.count = bcopy.count = 0;
-
+
if (!memcmp (&acopy, &bcopy, sizeof (struct icalrecurrencetype)))
return TRUE;
-
+
return FALSE;
}
@@ -823,7 +823,7 @@ static gboolean
find_last_cb (ECalComponent *comp, time_t start, time_t end, gpointer data)
{
time_t *last = data;
-
+
*last = start;
return TRUE;
@@ -858,25 +858,25 @@ local_record_to_pilot_record (ECalLocalRecord *local,
pi_set_error(ctxt->dbi->pilot_socket, PI_ERR_GENERIC_MEMORY);
return p;
}
-
+
pack_Appointment (local->appt, buffer, datebook_v1);
p.record = g_new0(unsigned char, buffer->used);
p.length = buffer->used;
memcpy(p.record, buffer->data, buffer->used);
-
- pi_buffer_free(buffer);
+
+ pi_buffer_free(buffer);
#else
p.record = (unsigned char *)record;
p.length = pack_Appointment (local->appt, p.record, 0xffff);
#endif
- return p;
+ return p;
}
/*
* converts a ECalComponent object to a ECalLocalRecord
*/
static void
-local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduitContext *ctxt)
+local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduitContext *ctxt)
{
const char *uid;
ECalComponentText summary;
@@ -886,13 +886,13 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
ECalComponentClassification classif;
icaltimezone *default_tz = ctxt->timezone;
int i;
-
+
g_return_if_fail (local != NULL);
g_return_if_fail (comp != NULL);
local->comp = comp;
g_object_ref (comp);
-
+
e_cal_component_get_uid (local->comp, &uid);
local->local.ID = e_pilot_map_lookup_pid (ctxt->map, uid, TRUE);
compute_status (ctxt, local, uid);
@@ -900,30 +900,30 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
local->appt = g_new0 (struct Appointment, 1);
/* Handle the fields and category we don't sync by making sure
- * we don't overwrite them
+ * we don't overwrite them
*/
if (local->local.ID != 0) {
int cat = 0;
#ifdef PILOT_LINK_0_12
struct Appointment appt;
pi_buffer_t * record;
-
+
record = pi_buffer_new(DLP_BUF_SIZE);
if(record == NULL){
pi_set_error(ctxt->dbi->pilot_socket, PI_ERR_GENERIC_MEMORY);
return;
}
#else
- struct Appointment appt;
+ struct Appointment appt;
char record[0xffff];
-#endif
- if (dlp_ReadRecordById (ctxt->dbi->pilot_socket,
+#endif
+ if (dlp_ReadRecordById (ctxt->dbi->pilot_socket,
ctxt->dbi->db_handle,
#ifdef PILOT_LINK_0_12
- local->local.ID, record,
+ local->local.ID, record,
NULL, NULL, &cat) > 0) {
#else
- local->local.ID, &record,
+ local->local.ID, &record,
NULL, NULL, NULL, &cat) > 0) {
#endif
local->local.category = cat;
@@ -942,14 +942,14 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
pi_buffer_free (record);
#endif
}
-
+
/*Category support*/
e_pilot_local_category_to_remote(&(local->local.category), comp, &(ctxt->ai.category));
/* STOP: don't replace these with g_strdup, since free_Appointment
uses free to deallocate */
e_cal_component_get_summary (comp, &summary);
- if (summary.value)
+ if (summary.value)
local->appt->description = e_pilot_utf8_to_pchar (summary.value);
e_cal_component_get_description_list (comp, &d_list);
@@ -967,17 +967,17 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
e_cal_component_get_dtstart (comp, &dt_start);
e_cal_component_get_dtend (comp, &dt_end);
if (dt_start.value) {
- icaltimezone_convert_time (dt_start.value,
+ icaltimezone_convert_time (dt_start.value,
get_timezone (ctxt->client, dt_start.tzid),
default_tz);
local->appt->begin = icaltimetype_to_tm (dt_start.value);
}
-
+
if (dt_start.value && dt_end.value) {
if (is_all_day (ctxt->client, &dt_start, &dt_end)) {
local->appt->event = 1;
} else {
- icaltimezone_convert_time (dt_end.value,
+ icaltimezone_convert_time (dt_end.value,
get_timezone (ctxt->client, dt_end.tzid),
default_tz);
local->appt->end = icaltimetype_to_tm (dt_end.value);
@@ -987,7 +987,7 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
local->appt->event = 1;
}
e_cal_component_free_datetime (&dt_start);
- e_cal_component_free_datetime (&dt_end);
+ e_cal_component_free_datetime (&dt_end);
/* Recurrence Rules */
local->appt->repeatType = repeatNone;
@@ -996,10 +996,10 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
if (e_cal_component_has_rrules (comp)) {
GSList *list;
struct icalrecurrencetype *recur;
-
+
e_cal_component_get_rrule_list (comp, &list);
recur = list->data;
-
+
switch (recur->freq) {
case ICAL_DAILY_RECURRENCE:
local->appt->repeatType = repeatDaily;
@@ -1012,18 +1012,18 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
wd = icalrecurrencetype_day_day_of_week (recur->by_day[i]);
local->appt->repeatDays[get_pilot_day (wd)] = 1;
}
-
+
break;
case ICAL_MONTHLY_RECURRENCE:
if (recur->by_month_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
local->appt->repeatType = repeatMonthlyByDate;
break;
}
-
+
/* Not going to work with -ve by_day/by_set_pos other than -1,
* pilot doesn't support that anyhow */
local->appt->repeatType = repeatMonthlyByDay;
- switch (recur->by_set_pos[0] != ICAL_RECURRENCE_ARRAY_MAX ? recur->by_set_pos[0]
+ switch (recur->by_set_pos[0] != ICAL_RECURRENCE_ARRAY_MAX ? recur->by_set_pos[0]
: icalrecurrencetype_day_position (recur->by_day[0])) {
case 1:
local->appt->repeatDay = dom1stSun;
@@ -1054,11 +1054,11 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
if (local->appt->repeatType != repeatNone) {
local->appt->repeatFrequency = recur->interval;
}
-
+
if (!icaltime_is_null_time (recur->until)) {
local->appt->repeatForever = 0;
- local->appt->repeatEnd = icaltimetype_to_tm_with_zone (&recur->until,
- icaltimezone_get_utc_timezone (),
+ local->appt->repeatEnd = icaltimetype_to_tm_with_zone (&recur->until,
+ icaltimezone_get_utc_timezone (),
default_tz);
} else if (recur->count > 0) {
time_t last = -1;
@@ -1066,37 +1066,37 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
/* The palm does not support count recurrences */
local->appt->repeatForever = 0;
- e_cal_recur_generate_instances (comp, -1, -1, find_last_cb, &last,
- e_cal_resolve_tzid_cb, ctxt->client,
+ e_cal_recur_generate_instances (comp, -1, -1, find_last_cb, &last,
+ e_cal_resolve_tzid_cb, ctxt->client,
default_tz);
itt = icaltime_from_timet_with_zone (last, TRUE, default_tz);
local->appt->repeatEnd = icaltimetype_to_tm (&itt);
} else {
local->appt->repeatForever = 1;
}
-
+
e_cal_component_free_recur_list (list);
}
/* Exceptions */
e_cal_component_get_exdate_list (comp, &edl);
local->appt->exceptions = g_slist_length (edl);
- local->appt->exception = g_new0 (struct tm, local->appt->exceptions);
+ local->appt->exception = g_new0 (struct tm, local->appt->exceptions);
for (l = edl, i = 0; l != NULL; l = l->next, i++) {
ECalComponentDateTime *dt = l->data;
- icaltimezone_convert_time (dt->value,
+ icaltimezone_convert_time (dt->value,
icaltimezone_get_utc_timezone (),
default_tz);
local->appt->exception[i] = icaltimetype_to_tm (dt->value);
}
e_cal_component_free_exdate_list (edl);
}
-
+
/* Alarm */
local->appt->alarm = 0;
if (e_cal_component_has_alarms (comp)) {
- GList *uids, *l;
+ GList *uids, *l;
ECalComponentAlarm *alarm;
ECalComponentAlarmTrigger trigger;
@@ -1104,11 +1104,11 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
for (l = uids; l != NULL; l = l->next) {
alarm = e_cal_component_get_alarm (comp, l->data);
e_cal_component_alarm_get_trigger (alarm, &trigger);
-
+
if ((trigger.type == E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START
&& trigger.u.rel_duration.is_neg)) {
local->appt->advanceUnits = advMinutes;
- local->appt->advance =
+ local->appt->advance =
trigger.u.rel_duration.minutes
+ trigger.u.rel_duration.hours * 60
+ trigger.u.rel_duration.days * 60 * 24
@@ -1116,7 +1116,7 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
if (local->appt->advance > PILOT_MAX_ADVANCE) {
local->appt->advanceUnits = advHours;
- local->appt->advance =
+ local->appt->advance =
trigger.u.rel_duration.minutes / 60
+ trigger.u.rel_duration.hours
+ trigger.u.rel_duration.days * 24
@@ -1140,7 +1140,7 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
}
cal_obj_uid_list_free (uids);
}
-
+
e_cal_component_get_classification (comp, &classif);
if (classif == E_CAL_COMPONENT_CLASS_PRIVATE)
@@ -1148,10 +1148,10 @@ local_record_from_comp (ECalLocalRecord *local, ECalComponent *comp, ECalConduit
else
local->local.secret = 0;
- local->local.archived = 0;
+ local->local.archived = 0;
}
-static void
+static void
local_record_from_uid (ECalLocalRecord *local,
const char *uid,
ECalConduitContext *ctxt)
@@ -1199,7 +1199,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
struct icalrecurrencetype recur;
ECalComponentText summary = {NULL, NULL};
ECalComponentDateTime dt = {NULL, NULL};
- GSList *edl = NULL;
+ GSList *edl = NULL;
char *txt;
int pos, i;
#ifdef PILOT_LINK_0_12
@@ -1212,7 +1212,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
if(buffer == NULL){
return NULL;
}
-
+
if(pi_buffer_append(buffer, remote->record, remote->length)==NULL){
return NULL;
}
@@ -1237,7 +1237,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
summary.value = txt = e_pilot_utf8_from_pchar (appt.description);
e_cal_component_set_summary (comp, &summary);
free (txt);
-
+
/*Category support*/
e_pilot_remote_category_to_local(remote->category, comp, category);
@@ -1255,7 +1255,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
e_cal_component_set_description_list (comp, &l);
free (txt);
- }
+ }
if (appt.event && !is_empty_time (appt.begin)) {
it = tm_to_icaltimetype (&appt.begin, TRUE);
@@ -1272,7 +1272,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
e_cal_component_set_dtstart (comp, &dt);
}
- if (!is_empty_time (appt.end)) {
+ if (!is_empty_time (appt.end)) {
it = tm_to_icaltimetype (&appt.end, FALSE);
dt.value = &it;
e_cal_component_set_dtend (comp, &dt);
@@ -1301,19 +1301,19 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
if (appt.repeatDays[i])
recur.by_day[pos++] = get_ical_day (i);
}
-
+
break;
case repeatMonthlyByDay:
recur.freq = ICAL_MONTHLY_RECURRENCE;
recur.interval = appt.repeatFrequency;
if (appt.repeatDay < domLastSun)
- recur.by_day[0] = nth_weekday ((appt.repeatDay / 7) + 1,
+ recur.by_day[0] = nth_weekday ((appt.repeatDay / 7) + 1,
get_ical_day (appt.repeatDay % 7));
else
- recur.by_day[0] = nth_weekday (-1, get_ical_day (appt.repeatDay % 7));
+ recur.by_day[0] = nth_weekday (-1, get_ical_day (appt.repeatDay % 7));
break;
-
+
case repeatMonthlyByDate:
recur.freq = ICAL_MONTHLY_RECURRENCE;
recur.interval = appt.repeatFrequency;
@@ -1324,7 +1324,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
recur.freq = ICAL_YEARLY_RECURRENCE;
recur.interval = appt.repeatFrequency;
break;
-
+
default:
g_assert_not_reached ();
}
@@ -1332,12 +1332,12 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
if (recur.freq != ICAL_NO_RECURRENCE) {
GSList *list = NULL, *existing;
struct icalrecurrencetype *erecur;
-
+
/* recurrence start of week */
recur.week_start = get_ical_day (appt.repeatWeekstart);
if (!appt.repeatForever) {
- recur.until = tm_to_icaltimetype (&appt.repeatEnd, TRUE);
+ recur.until = tm_to_icaltimetype (&appt.repeatEnd, TRUE);
}
list = g_slist_append (list, &recur);
@@ -1348,21 +1348,21 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
if (!appt.repeatForever && e_cal_component_has_rrules (in_comp)) {
e_cal_component_get_rrule_list (in_comp, &existing);
erecur = existing->data;
-
- /* If the rules are otherwise the same and the existing uses count,
+
+ /* If the rules are otherwise the same and the existing uses count,
see if they end at the same point */
- if (rrules_mostly_equal (&recur, erecur) &&
+ if (rrules_mostly_equal (&recur, erecur) &&
icaltime_is_null_time (erecur->until) && erecur->count > 0) {
time_t last, elast;
-
- e_cal_recur_generate_instances (comp, -1, -1, find_last_cb, &last,
+
+ e_cal_recur_generate_instances (comp, -1, -1, find_last_cb, &last,
e_cal_resolve_tzid_cb, client,
timezone);
- e_cal_recur_generate_instances (in_comp, -1, -1, find_last_cb, &elast,
- e_cal_resolve_tzid_cb, client,
+ e_cal_recur_generate_instances (in_comp, -1, -1, find_last_cb, &elast,
+ e_cal_resolve_tzid_cb, client,
timezone);
-
+
if (last == elast) {
recur.until = icaltime_null_time ();
recur.count = erecur->count;
@@ -1373,7 +1373,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
g_slist_free (list);
} else {
- e_cal_component_set_rrule_list (comp, NULL);
+ e_cal_component_set_rrule_list (comp, NULL);
}
/* Exceptions */
@@ -1382,11 +1382,11 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
ECalComponentDateTime *dt = g_new0 (ECalComponentDateTime, 1);
dt->value = g_new0 (struct icaltimetype, 1);
- dt->tzid = NULL;
-
+ dt->tzid = NULL;
+
ex = appt.exception[i];
*dt->value = tm_to_icaltimetype (&ex, TRUE);
-
+
edl = g_slist_prepend (edl, dt);
}
e_cal_component_set_exdate_list (comp, edl);
@@ -1397,10 +1397,10 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
ECalComponentAlarm *alarm = NULL;
ECalComponentAlarmTrigger trigger;
gboolean found = FALSE;
-
+
if (e_cal_component_has_alarms (comp)) {
GList *uids, *l;
-
+
uids = e_cal_component_get_alarm_uids (comp);
for (l = uids; l != NULL; l = l->next) {
alarm = e_cal_component_get_alarm (comp, l->data);
@@ -1438,7 +1438,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
e_cal_component_add_alarm (comp, alarm);
e_cal_component_alarm_free (alarm);
}
-
+
e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_NONE);
if (remote->secret)
@@ -1447,7 +1447,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
e_cal_component_set_classification (comp, E_CAL_COMPONENT_CLASS_PUBLIC);
e_cal_component_commit_sequence (comp);
-
+
free_Appointment (&appt);
return comp;
@@ -1459,7 +1459,7 @@ check_for_slow_setting (GnomePilotConduit *c, ECalConduitContext *ctxt)
GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c);
int map_count;
const char *uri;
-
+
/* If there are objects but no log */
map_count = g_hash_table_size (ctxt->map->pid_map);
if (map_count == 0)
@@ -1472,7 +1472,7 @@ check_for_slow_setting (GnomePilotConduit *c, ECalConduitContext *ctxt)
gnome_pilot_conduit_standard_set_slow (conduit, TRUE);
e_pilot_map_clear (ctxt->map);
}
-
+
if (gnome_pilot_conduit_standard_get_slow (conduit)) {
ctxt->map->write_touched_only = TRUE;
LOG (g_message ( " doing slow sync\n" ));
@@ -1502,7 +1502,7 @@ pre_sync (GnomePilotConduit *conduit,
LOG (g_message ( "---------------------------------------------------------\n" ));
LOG (g_message ( "pre_sync: Calendar Conduit v.%s", CONDUIT_VERSION ));
- ctxt->dbi = dbi;
+ ctxt->dbi = dbi;
ctxt->client = NULL;
/* Get the timezone */
@@ -1510,7 +1510,7 @@ pre_sync (GnomePilotConduit *conduit,
if (ctxt->timezone == NULL)
return -1;
LOG (g_message ( " Using timezone: %s", icaltimezone_get_tzid (ctxt->timezone) ));
-
+
if (start_calendar_server (ctxt) != 0) {
WARN(_("Could not start evolution-data-server"));
gnome_pilot_conduit_error (conduit, _("Could not start evolution-data-server"));
@@ -1543,15 +1543,15 @@ pre_sync (GnomePilotConduit *conduit,
return -1;
ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal);
g_free (change_id);
-
+
/* See if we need to split up any events */
for (l = ctxt->changed; l != NULL; l = l->next) {
ECalChange *ccc = l->data;
GList *multi_comp = NULL, *multi_ccc = NULL;
-
+
if (process_multi_day (ctxt, ccc, &multi_comp, &multi_ccc)) {
ctxt->comps = g_list_concat (ctxt->comps, multi_comp);
-
+
added = g_list_concat (added, multi_ccc);
removed = g_list_prepend (removed, ccc);
}
@@ -1571,11 +1571,11 @@ pre_sync (GnomePilotConduit *conduit,
}
}
g_list_free (removed);
-
+
for (l = ctxt->changed; l != NULL; l = l->next) {
ECalChange *ccc = l->data;
const char *uid;
-
+
e_cal_component_get_uid (ccc->comp, &uid);
if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) {
@@ -1596,7 +1596,7 @@ pre_sync (GnomePilotConduit *conduit,
e_pilot_map_remove_by_uid (ctxt->map, uid);
}
}
-
+
/* Set the count information */
num_records = g_list_length (ctxt->comps);
gnome_pilot_conduit_sync_abs_set_num_local_records(abs_conduit, num_records);
@@ -1639,7 +1639,7 @@ pre_sync (GnomePilotConduit *conduit,
if (ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyToPilot
|| ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyFromPilot)
ctxt->map->write_touched_only = TRUE;
-
+
return 0;
}
@@ -1652,19 +1652,19 @@ post_sync (GnomePilotConduit *conduit,
gchar *filename, *change_id;
unsigned char *buf;
int dlpRetVal, len;
-
+
LOG (g_message ( "post_sync: Calendar Conduit v.%s", CONDUIT_VERSION ));
-
+
/* Write AppBlock to PDA - updates categories */
buf = (unsigned char*)g_malloc (0xffff);
-
+
len = pack_AppointmentAppInfo (&(ctxt->ai), buf, 0xffff);
-
- dlpRetVal = dlp_WriteAppBlock (dbi->pilot_socket, dbi->db_handle,
+
+ dlpRetVal = dlp_WriteAppBlock (dbi->pilot_socket, dbi->db_handle,
(unsigned char *)buf, len);
-
+
g_free (buf);
-
+
if (dlpRetVal < 0) {
WARN ( ("Could not write pilot's Calendar application block"));
WARN ("dlp_WriteAppBlock(...) = %d", dlpRetVal);
@@ -1676,11 +1676,11 @@ post_sync (GnomePilotConduit *conduit,
g_free (ctxt->cfg->last_uri);
ctxt->cfg->last_uri = g_strdup (e_cal_get_uri (ctxt->client));
calconduit_save_configuration (ctxt->cfg);
-
+
filename = map_name (ctxt);
e_pilot_map_write (filename, ctxt->map);
g_free (filename);
-
+
/* FIX ME ugly hack - our changes musn't count, this does introduce
* a race condition if anyone changes a record elsewhere during sycnc
*/
@@ -1688,7 +1688,7 @@ post_sync (GnomePilotConduit *conduit,
if (e_cal_get_changes (ctxt->client, change_id, &changed, NULL))
e_cal_free_change_list (changed);
g_free (change_id);
-
+
LOG (g_message ( "---------------------------------------------------------\n" ));
return 0;
@@ -1703,7 +1703,7 @@ set_pilot_id (GnomePilotConduitSyncAbs *conduit,
const char *uid;
LOG (g_message ( "set_pilot_id: setting to %d\n", ID ));
-
+
e_cal_component_get_uid (local->comp, &uid);
e_pilot_map_insert (ctxt->map, ID, uid, FALSE);
@@ -1716,12 +1716,12 @@ set_status_cleared (GnomePilotConduitSyncAbs *conduit,
ECalConduitContext *ctxt)
{
const char *uid;
-
+
LOG (g_message ( "set_status_cleared: clearing status\n" ));
-
+
e_cal_component_get_uid (local->comp, &uid);
g_hash_table_remove (ctxt->changed_hash, uid);
-
+
return 0;
}
@@ -1741,7 +1741,7 @@ for_each (GnomePilotConduitSyncAbs *conduit,
comps = ctxt->comps;
count = 0;
-
+
if (comps != NULL) {
LOG (g_message ( "iterating over %d records", g_list_length (comps)));
@@ -1797,17 +1797,17 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit,
if (*local == NULL) {
LOG (g_message ( "for_each_modified beginning\n" ));
-
+
iterator = ctxt->changed;
-
+
count = 0;
-
+
LOG (g_message ( "iterating over %d records", g_hash_table_size (ctxt->changed_hash) ));
-
+
iterator = next_changed_item (ctxt, iterator);
if (iterator != NULL) {
ECalChange *ccc = iterator->data;
-
+
*local = g_new0 (ECalLocalRecord, 1);
local_record_from_comp (*local, ccc->comp, ctxt);
@@ -1825,7 +1825,7 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit,
iterator = g_list_next (iterator);
if (iterator && (iterator = next_changed_item (ctxt, iterator))) {
ECalChange *ccc = iterator->data;
-
+
*local = g_new0 (ECalLocalRecord, 1);
local_record_from_comp (*local, ccc->comp, ctxt);
@@ -1870,7 +1870,7 @@ compare (GnomePilotConduitSyncAbs *conduit,
LOG (g_message ( " equal" ));
else
LOG (g_message ( " not equal" ));
-
+
return retval;
}
@@ -1882,7 +1882,7 @@ add_record (GnomePilotConduitSyncAbs *conduit,
ECalComponent *comp;
char *uid;
int retval = 0;
-
+
g_return_val_if_fail (remote != NULL, -1);
LOG (g_message ( "add_record: adding %s to desktop\n", print_remote (remote) ));
@@ -1892,16 +1892,16 @@ add_record (GnomePilotConduitSyncAbs *conduit,
/* Give it a new UID otherwise it will be the uid of the default comp */
uid = e_cal_component_gen_uid ();
e_cal_component_set_uid (comp, uid);
-
+
if (!e_cal_create_object (ctxt->client, e_cal_component_get_icalcomponent (comp), NULL, NULL))
return -1;
e_pilot_map_insert (ctxt->map, remote->ID, uid, FALSE);
- g_free (uid);
+ g_free (uid);
g_object_unref (comp);
-
+
return retval;
}
@@ -1913,7 +1913,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit,
{
ECalComponent *new_comp;
int retval = 0;
-
+
g_return_val_if_fail (remote != NULL, -1);
LOG (g_message ("replace_record: replace %s with %s\n",
@@ -1923,7 +1923,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit,
g_object_unref (local->comp);
local->comp = new_comp;
- if (!e_cal_modify_object (ctxt->client, e_cal_component_get_icalcomponent (new_comp),
+ if (!e_cal_modify_object (ctxt->client, e_cal_component_get_icalcomponent (new_comp),
CALOBJ_MOD_ALL, NULL))
return -1;
@@ -1950,7 +1950,7 @@ delete_record (GnomePilotConduitSyncAbs *conduit,
e_cal_remove_object_with_mod (ctxt->client, uid, NULL, CALOBJ_MOD_ALL, NULL);
else
e_cal_remove_object (ctxt->client, uid, NULL);
-
+
return 0;
}
@@ -1962,14 +1962,14 @@ archive_record (GnomePilotConduitSyncAbs *conduit,
{
const char *uid;
int retval = 0;
-
+
g_return_val_if_fail (local != NULL, -1);
LOG (g_message ( "archive_record: %s\n", archive ? "yes" : "no" ));
e_cal_component_get_uid (local->comp, &uid);
e_pilot_map_insert (ctxt->map, local->local.ID, uid, archive);
-
+
return retval;
}
@@ -1980,24 +1980,24 @@ match (GnomePilotConduitSyncAbs *conduit,
ECalConduitContext *ctxt)
{
const char *uid;
-
+
LOG (g_message ("match: looking for local copy of %s\n",
- print_remote (remote)));
-
+ print_remote (remote)));
+
g_return_val_if_fail (local != NULL, -1);
g_return_val_if_fail (remote != NULL, -1);
*local = NULL;
uid = e_pilot_map_lookup_uid (ctxt->map, remote->ID, TRUE);
-
+
if (!uid)
return 0;
LOG (g_message ( " matched\n" ));
-
+
*local = g_new0 (ECalLocalRecord, 1);
local_record_from_uid (*local, uid, ctxt);
-
+
return 0;
}
@@ -2034,7 +2034,7 @@ fill_widgets (ECalConduitContext *ctxt)
{
if (ctxt->cfg->source)
e_pilot_settings_set_source (E_PILOT_SETTINGS (ctxt->ps),
- ctxt->cfg->source);
+ ctxt->cfg->source);
e_pilot_settings_set_secret (E_PILOT_SETTINGS (ctxt->ps),
ctxt->cfg->secret);
@@ -2047,7 +2047,7 @@ create_settings_window (GnomePilotConduit *conduit,
ECalConduitContext *ctxt)
{
LOG (g_message ( "create_settings_window" ));
-
+
if (!ctxt->cfg->source_list)
return -1;
@@ -2058,14 +2058,14 @@ create_settings_window (GnomePilotConduit *conduit,
gtk_widget_show (ctxt->ps);
fill_widgets (ctxt);
-
+
return 0;
}
static void
display_settings (GnomePilotConduit *conduit, ECalConduitContext *ctxt)
{
LOG (g_message ( "display_settings" ));
-
+
fill_widgets (ctxt);
}
@@ -2141,7 +2141,7 @@ conduit_get_gpilot_conduit (guint32 pilot_id)
void
conduit_destroy_gpilot_conduit (GnomePilotConduit *conduit)
-{
+{
GtkObject *obj = GTK_OBJECT (conduit);
ECalConduitContext *ctxt;
diff --git a/calendar/conduits/common/libecalendar-common-conduit.c b/calendar/conduits/common/libecalendar-common-conduit.c
index 24f6d0b079..534c9ef8fb 100644
--- a/calendar/conduits/common/libecalendar-common-conduit.c
+++ b/calendar/conduits/common/libecalendar-common-conduit.c
@@ -33,23 +33,23 @@
#define LOG(x)
#ifdef DEBUG_CALCONDUIT
#define LOG(x) x
-#endif
+#endif
#ifdef DEBUG_MEMOCONDUIT
#define LOG(x) x
#endif
#ifdef DEBUG_TODOCONDUIT
#define LOG(x) x
-#endif
+#endif
#ifdef DEBUG_CONDUIT
#define LOG(x) x
-#endif
+#endif
/*
* Adds a category to the category app info structure (name and ID),
* sets category->renamed[i] to true if possible to rename.
- *
+ *
* This will be packed and written to the app info block during post_sync.
- *
+ *
* NOTE: cat_to_add MUST be in PCHAR format. Evolution stores categories
* in UTF-8 format. A conversion must take place before calling
* this function (see e_pilot_utf8_to_pchar() in e-pilot-util.c)
@@ -60,14 +60,14 @@ e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *categ
int i, j;
int retval = 0; /* 0 is the Unfiled category */
LOG(g_message("e_pilot_add_category_if_possible\n"));
-
+
for(i=0; i<PILOT_MAX_CATEGORIES; i++){
/* if strlen is 0, then the category is empty
the PalmOS doesn't let 0-length strings for
categories */
if(strlen(category->name[i]) == 0){
int cat_to_add_len;
-
+
cat_to_add_len = strlen(cat_to_add);
retval = i;
@@ -75,7 +75,7 @@ e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *categ
/* Have to truncate the category name */
cat_to_add_len = 15;
}
-
+
/* only 15 characters for category, 16th is
* '\0' can't do direct mem transfer due to
* declaration type
@@ -87,7 +87,7 @@ e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *categ
for(j=cat_to_add_len; j<16; j++) {
category->name[i][j] = '\0';
}
-
+
//find a desktop id that is not in use between 128 and 255
int desktopUniqueID;
for (desktopUniqueID = 128; desktopUniqueID <= 255; desktopUniqueID++) {
@@ -105,17 +105,17 @@ e_pilot_add_category_if_possible(char *cat_to_add, struct CategoryAppInfo *categ
}
}
category->ID[i] = desktopUniqueID;
-
+
category->renamed[i] = TRUE;
-
+
break;
}
}
-
+
if(retval == 0){
LOG (g_warning ("*** not adding category - category list already full ***"));
}
-
+
return retval;
}
@@ -179,8 +179,8 @@ void e_pilot_remote_category_to_local(int pilotCategory, ECalComponent *comp, st
/* store the data on in evolution */
if (category_string == NULL) {
/* note: this space is needed to make sure evolution clears the category */
- e_cal_component_set_categories (comp, " ");
- }
+ e_cal_component_set_categories (comp, " ");
+ }
else {
/* Since only the first category is synced with the PDA, add the PDA's
@@ -189,7 +189,7 @@ void e_pilot_remote_category_to_local(int pilotCategory, ECalComponent *comp, st
GSList *newcat_in_list;
e_cal_component_get_categories_list (comp, &c_list);
- /* remove old item from list so we don't have duplicate entries */
+ /* remove old item from list so we don't have duplicate entries */
newcat_in_list = g_slist_find_custom(c_list, category_string, (GCompareFunc)strcmp);
if(newcat_in_list != NULL)
{
diff --git a/calendar/conduits/memo/memo-conduit.c b/calendar/conduits/memo/memo-conduit.c
index 74f323987d..f84baf7fed 100644
--- a/calendar/conduits/memo/memo-conduit.c
+++ b/calendar/conduits/memo/memo-conduit.c
@@ -4,7 +4,7 @@
* Copyright (C) 1998 Free Software Foundation
* Copyright (C) 2000 Ximian, Inc.
*
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
+ * Authors: Eskil Heyn Olsen <deity@eskil.dk>
* JP Rosevear <jpr@ximian.com>
*
* This program is free software; you can redistribute it and/or
@@ -87,11 +87,11 @@ struct _EMemoLocalRecord {
int lastDesktopUniqueID;
static void
-memoconduit_destroy_record (EMemoLocalRecord *local)
+memoconduit_destroy_record (EMemoLocalRecord *local)
{
g_object_unref (local->comp);
free_Memo (local->memo);
- g_free (local->memo);
+ g_free (local->memo);
g_free (local);
}
@@ -109,7 +109,7 @@ struct _EMemoConduitCfg {
};
static EMemoConduitCfg *
-memoconduit_load_configuration (guint32 pilot_id)
+memoconduit_load_configuration (guint32 pilot_id)
{
EMemoConduitCfg *c;
GnomePilotConduitManagement *management;
@@ -119,7 +119,7 @@ memoconduit_load_configuration (guint32 pilot_id)
g_snprintf (prefix, 255, "/gnome-pilot.d/e-memo-conduit/Pilot_%u/",
pilot_id);
-
+
c = g_new0 (EMemoConduitCfg,1);
g_assert (c != NULL);
@@ -133,10 +133,10 @@ memoconduit_load_configuration (guint32 pilot_id)
c->sync_type = GnomePilotConduitSyncTypeNotSet;
gtk_object_unref (GTK_OBJECT (config));
gtk_object_unref (GTK_OBJECT (management));
-
+
/* Custom settings */
gnome_config_push_prefix (prefix);
-
+
if (!e_cal_get_sources (&c->source_list, E_CAL_SOURCE_TYPE_JOURNAL, NULL))
c->source_list = NULL;
if (c->source_list) {
@@ -150,7 +150,7 @@ memoconduit_load_configuration (guint32 pilot_id)
c->source_list = NULL;
}
}
-
+
c->secret = gnome_config_get_bool ("secret=FALSE");
c->priority = gnome_config_get_int ("priority=3");
c->last_uri = gnome_config_get_string ("last_uri");
@@ -161,7 +161,7 @@ memoconduit_load_configuration (guint32 pilot_id)
}
static void
-memoconduit_save_configuration (EMemoConduitCfg *c)
+memoconduit_save_configuration (EMemoConduitCfg *c)
{
gchar prefix[256];
@@ -180,7 +180,7 @@ memoconduit_save_configuration (EMemoConduitCfg *c)
}
static EMemoConduitCfg*
-memoconduit_dupe_configuration (EMemoConduitCfg *c)
+memoconduit_dupe_configuration (EMemoConduitCfg *c)
{
EMemoConduitCfg *retval;
@@ -201,8 +201,8 @@ memoconduit_dupe_configuration (EMemoConduitCfg *c)
return retval;
}
-static void
-memoconduit_destroy_configuration (EMemoConduitCfg *c)
+static void
+memoconduit_destroy_configuration (EMemoConduitCfg *c)
{
g_return_if_fail (c != NULL);
@@ -219,7 +219,7 @@ struct _EMemoConduitContext {
EMemoConduitCfg *cfg;
EMemoConduitCfg *new_cfg;
GtkWidget *ps;
-
+
struct MemoAppInfo ai;
ECal *client;
@@ -230,15 +230,15 @@ struct _EMemoConduitContext {
GList *changed;
GHashTable *changed_hash;
GList *locals;
-
+
EPilotMap *map;
};
static EMemoConduitContext *
-e_memo_context_new (guint32 pilot_id)
+e_memo_context_new (guint32 pilot_id)
{
EMemoConduitContext *ctxt = g_new0 (EMemoConduitContext, 1);
-
+
ctxt->cfg = memoconduit_load_configuration (pilot_id);
ctxt->new_cfg = memoconduit_dupe_configuration (ctxt->cfg);
ctxt->ps = NULL;
@@ -255,10 +255,10 @@ e_memo_context_new (guint32 pilot_id)
}
static gboolean
-e_memo_context_foreach_change (gpointer key, gpointer value, gpointer data)
+e_memo_context_foreach_change (gpointer key, gpointer value, gpointer data)
{
g_free (key);
-
+
return TRUE;
}
@@ -266,14 +266,14 @@ static void
e_memo_context_destroy (EMemoConduitContext *ctxt)
{
GList *l;
-
+
g_return_if_fail (ctxt != NULL);
if (ctxt->cfg != NULL)
memoconduit_destroy_configuration (ctxt->cfg);
if (ctxt->new_cfg != NULL)
memoconduit_destroy_configuration (ctxt->new_cfg);
-
+
if (ctxt->client != NULL)
g_object_unref (ctxt->client);
@@ -295,10 +295,10 @@ e_memo_context_destroy (EMemoConduitContext *ctxt)
memoconduit_destroy_record (l->data);
g_list_free (ctxt->locals);
}
-
+
if (ctxt->changed != NULL)
e_cal_free_change_list (ctxt->changed);
-
+
if (ctxt->map != NULL)
e_pilot_map_destroy (ctxt->map);
@@ -361,7 +361,7 @@ static char *print_remote (GnomePilotRecord *remote)
memo.text : "");
free_Memo (&memo);
-
+
return buff;
}
@@ -372,7 +372,7 @@ start_calendar_server (EMemoConduitContext *ctxt)
if (ctxt->cfg->source) {
ctxt->client = e_cal_new (ctxt->cfg->source, E_CAL_SOURCE_TYPE_JOURNAL);
- if (!e_cal_open (ctxt->client, TRUE, NULL))
+ if (!e_cal_open (ctxt->client, TRUE, NULL))
return -1;
} else if (!e_cal_open_default (&ctxt->client, E_CAL_SOURCE_TYPE_JOURNAL, NULL, NULL, NULL)) {
return -1;
@@ -396,41 +396,41 @@ get_default_timezone (void)
g_free (location);
location = g_strdup ("UTC");
}
-
+
timezone = icaltimezone_get_builtin_timezone (location);
g_free (location);
g_object_unref (listener);
- return timezone;
+ return timezone;
}
static char *
-map_name (EMemoConduitContext *ctxt)
+map_name (EMemoConduitContext *ctxt)
{
char *filename;
-
+
filename = g_strdup_printf ("%s/.evolution/memos/local/system/pilot-map-memo-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id);
-
+
return filename;
}
static GList *
-next_changed_item (EMemoConduitContext *ctxt, GList *changes)
+next_changed_item (EMemoConduitContext *ctxt, GList *changes)
{
ECalChange *ccc;
GList *l;
-
+
for (l = changes; l != NULL; l = l->next) {
const char *uid;
ccc = l->data;
-
+
e_cal_component_get_uid (ccc->comp, &uid);
if (g_hash_table_lookup (ctxt->changed_hash, uid))
return l;
}
-
+
return NULL;
}
@@ -443,16 +443,16 @@ compute_status (EMemoConduitContext *ctxt, EMemoLocalRecord *local, const char *
local->local.secret = FALSE;
ccc = g_hash_table_lookup (ctxt->changed_hash, uid);
-
+
if (ccc == NULL) {
local->local.attr = GnomePilotRecordNothing;
return;
}
-
+
switch (ccc->type) {
case E_CAL_CHANGE_ADDED:
local->local.attr = GnomePilotRecordNew;
- break;
+ break;
case E_CAL_CHANGE_MODIFIED:
local->local.attr = GnomePilotRecordModified;
break;
@@ -475,7 +475,7 @@ local_record_to_pilot_record (EMemoLocalRecord *local,
g_assert (local->comp != NULL);
g_assert (local->memo != NULL );
-
+
LOG (g_message ( "local_record_to_pilot_record\n" ));
memset (&p, 0, sizeof (GnomePilotRecord));
@@ -504,20 +504,20 @@ local_record_to_pilot_record (EMemoLocalRecord *local,
p.record = (unsigned char *)record;
p.length = pack_Memo (local->memo, p.record, 0xffff);
#endif
- return p;
+ return p;
}
/*
* converts a ECalComponent object to a EMemoLocalRecord
*/
static void
-local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoConduitContext *ctxt)
+local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoConduitContext *ctxt)
{
const char *uid;
GSList *d_list = NULL;
ECalComponentText *description;
ECalComponentClassification classif;
-
+
LOG (g_message ( "local_record_from_comp\n" ));
g_return_if_fail (local != NULL);
@@ -533,7 +533,7 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu
LOG(fprintf(stderr, "local_record_from_comp: local->local.ID == %lu\n", local->local.ID));
compute_status (ctxt, local, uid);
-
+
LOG(fprintf(stderr, "local_record_from_comp: local->local.attr: %d\n", local->local.attr));
local->memo = g_new0 (struct Memo,1);
@@ -547,7 +547,7 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu
char record[0xffff];
#endif
int cat = 0;
-
+
#ifdef PILOT_LINK_0_12
record = pi_buffer_new(DLP_BUF_SIZE);
if(record == NULL){
@@ -557,10 +557,10 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu
#endif
LOG(fprintf(stderr, "local_record_from_comp: calling dlp_ReadRecordById\n"));
- if (dlp_ReadRecordById (ctxt->dbi->pilot_socket,
+ if (dlp_ReadRecordById (ctxt->dbi->pilot_socket,
ctxt->dbi->db_handle,
#ifdef PILOT_LINK_0_12
- local->local.ID, record,
+ local->local.ID, record,
NULL, NULL, &cat) > 0) {
local->local.category = cat;
memset (&memo, 0, sizeof (struct Memo));
@@ -570,14 +570,14 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu
}
pi_buffer_free (record);
#else
- local->local.ID, &record,
+ local->local.ID, &record,
NULL, NULL, NULL, &cat) > 0) {
local->local.category = cat;
- }
+ }
#endif
LOG(fprintf(stderr, "local_record_from_comp: done calling dlp_ReadRecordById\n"));
}
-
+
/*Category support*/
e_pilot_local_category_to_remote(&(local->local.category), comp, &(ctxt->ai.category));
@@ -596,7 +596,7 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu
} else {
local->memo->text = NULL;
}
-
+
e_cal_component_get_classification (comp, &classif);
if (classif == E_CAL_COMPONENT_CLASS_PRIVATE)
@@ -607,7 +607,7 @@ local_record_from_comp (EMemoLocalRecord *local, ECalComponent *comp, EMemoCondu
local->local.archived = 0;
}
-static void
+static void
local_record_from_uid (EMemoLocalRecord *local,
const char *uid,
EMemoConduitContext *ctxt)
@@ -617,7 +617,7 @@ local_record_from_uid (EMemoLocalRecord *local,
GError *error = NULL;
g_assert(local!=NULL);
-
+
LOG(g_message("local_record_from_uid\n"));
if (e_cal_get_object (ctxt->client, uid, NULL, &icalcomp, &error)) {
@@ -667,11 +667,11 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
if(buffer == NULL){
return NULL;
}
-
+
if(pi_buffer_append(buffer, remote->record, remote->length)==NULL){
return NULL;
}
-
+
unpack_Memo (&memo, buffer, memo_v1);
pi_buffer_free(buffer);
#else
@@ -680,7 +680,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
#endif
utc_zone = icaltimezone_get_utc_timezone ();
- now = icaltime_from_timet_with_zone (time (NULL), FALSE,
+ now = icaltime_from_timet_with_zone (time (NULL), FALSE,
utc_zone);
if (in_comp == NULL) {
@@ -692,10 +692,10 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
}
e_cal_component_set_last_modified (comp, &now);
-
+
/*Category support*/
e_pilot_remote_category_to_local(remote->category, comp, &(ai->category));
-
+
/* The iCal description field */
if (!memo.text) {
e_cal_component_set_comment_list (comp, NULL);
@@ -713,19 +713,19 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
break;
}
}
-
+
if(foundNL == FALSE){
if(ntext > 50){
txt2 = g_strndup(memo.text, 50);
}
else{
txt2 = g_strdup(memo.text);
-
+
}
}
else{
txt2 = g_strndup(memo.text, idxToUse); /* cuts off '\n' */
-
+
}
sumText.value = txt3 = e_pilot_utf8_from_pchar(txt2);
@@ -741,7 +741,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
free (txt);
g_free(txt2);
free(txt3);
- }
+ }
e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_NONE);
@@ -752,7 +752,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
e_cal_component_set_classification (comp, E_CAL_COMPONENT_CLASS_PUBLIC);
e_cal_component_commit_sequence (comp);
-
+
free_Memo(&memo);
return comp;
@@ -764,7 +764,7 @@ check_for_slow_setting (GnomePilotConduit *c, EMemoConduitContext *ctxt)
GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c);
int map_count;
const char *uri;
-
+
/* If there are no objects or objects but no log */
map_count = g_hash_table_size (ctxt->map->pid_map);
if (map_count == 0)
@@ -783,7 +783,7 @@ check_for_slow_setting (GnomePilotConduit *c, EMemoConduitContext *ctxt)
LOG (g_message ( " doing slow sync\n" ));
} else {
LOG (g_message ( " doing fast sync\n" ));
- }
+ }
}
/* Pilot syncing callbacks */
@@ -809,9 +809,9 @@ pre_sync (GnomePilotConduit *conduit,
LOG (g_message ( "pre_sync: Memo Conduit v.%s", CONDUIT_VERSION ));
g_message ("Memo Conduit v.%s", CONDUIT_VERSION);
- ctxt->dbi = dbi;
+ ctxt->dbi = dbi;
ctxt->client = NULL;
-
+
if (start_calendar_server (ctxt) != 0) {
WARN(_("Could not start evolution-data-server"));
gnome_pilot_conduit_error (conduit, _("Could not start evolution-data-server"));
@@ -827,18 +827,18 @@ pre_sync (GnomePilotConduit *conduit,
/* Set the default timezone on the backend. */
if (ctxt->timezone && !e_cal_set_default_timezone (ctxt->client, ctxt->timezone, NULL))
return -1;
-
+
/* Get the default component */
if (!e_cal_get_default_object (ctxt->client, &icalcomp, NULL))
return -1;
-
+
ctxt->default_comp = e_cal_component_new ();
if (!e_cal_component_set_icalcomponent (ctxt->default_comp, icalcomp)) {
g_object_unref (ctxt->default_comp);
icalcomponent_free (icalcomp);
return -1;
}
-
+
/* Load the uid <--> pilot id map */
filename = map_name (ctxt);
e_pilot_map_read (filename, &ctxt->map);
@@ -847,24 +847,24 @@ pre_sync (GnomePilotConduit *conduit,
/* Get the local database */
if (!e_cal_get_object_list_as_comp (ctxt->client, "#t", &ctxt->comps, NULL))
return -1;
-
+
/* Count and hash the changes */
change_id = g_strdup_printf ("pilot-sync-evolution-memo-%d", ctxt->cfg->pilot_id);
if (!e_cal_get_changes (ctxt->client, change_id, &ctxt->changed, NULL))
return -1;
-
+
ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal);
g_free (change_id);
-
+
for (l = ctxt->changed; l != NULL; l = l->next) {
ECalChange *ccc = l->data;
const char *uid;
-
+
e_cal_component_get_uid (ccc->comp, &uid);
if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) {
-
+
g_hash_table_insert (ctxt->changed_hash, g_strdup (uid), ccc);
-
+
switch (ccc->type) {
case E_CAL_CHANGE_ADDED:
add_records++;
@@ -887,7 +887,7 @@ pre_sync (GnomePilotConduit *conduit,
gnome_pilot_conduit_sync_abs_set_num_new_local_records (abs_conduit, add_records);
gnome_pilot_conduit_sync_abs_set_num_updated_local_records (abs_conduit, mod_records);
gnome_pilot_conduit_sync_abs_set_num_deleted_local_records(abs_conduit, del_records);
-
+
g_message("num_records: %d\nadd_records: %d\nmod_records: %d\ndel_records: %d\n",
num_records, add_records, mod_records, del_records);
@@ -923,14 +923,14 @@ pre_sync (GnomePilotConduit *conduit,
#endif
g_free (buf);
-
+
lastDesktopUniqueID = 128;
check_for_slow_setting (conduit, ctxt);
if (ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyToPilot
|| ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyFromPilot)
ctxt->map->write_touched_only = TRUE;
-
+
return 0;
}
@@ -945,14 +945,14 @@ post_sync (GnomePilotConduit *conduit,
int dlpRetVal, len;
buf = (unsigned char*)g_malloc (0xffff);
-
+
len = pack_MemoAppInfo (&(ctxt->ai), buf, 0xffff);
-
- dlpRetVal = dlp_WriteAppBlock (dbi->pilot_socket, dbi->db_handle,
+
+ dlpRetVal = dlp_WriteAppBlock (dbi->pilot_socket, dbi->db_handle,
(unsigned char *)buf, len);
-
+
g_free (buf);
-
+
if (dlpRetVal < 0) {
WARN (_("Could not write pilot's Memo application block"));
WARN ("dlp_WriteAppBlock(...) = %d", dlpRetVal);
@@ -960,14 +960,14 @@ post_sync (GnomePilotConduit *conduit,
_("Could not write pilot's Memo application block"));
return -1;
}
-
+
LOG (g_message ( "post_sync: Memo Conduit v.%s", CONDUIT_VERSION ));
g_free (ctxt->cfg->last_uri);
ctxt->cfg->last_uri = g_strdup (e_cal_get_uri (ctxt->client));
memoconduit_save_configuration (ctxt->cfg);
-
+
filename = map_name (ctxt);
e_pilot_map_write (filename, ctxt->map);
g_free (filename);
@@ -979,7 +979,7 @@ post_sync (GnomePilotConduit *conduit,
if (e_cal_get_changes (ctxt->client, change_id, &changed, NULL))
e_cal_free_change_list (changed);
g_free (change_id);
-
+
LOG (g_message ( "---------------------------------------------------------\n" ));
return 0;
@@ -994,7 +994,7 @@ set_pilot_id (GnomePilotConduitSyncAbs *conduit,
const char *uid;
LOG (g_message ( "set_pilot_id: setting to %d\n", ID ));
-
+
e_cal_component_get_uid (local->comp, &uid);
e_pilot_map_insert (ctxt->map, ID, uid, FALSE);
@@ -1007,12 +1007,12 @@ set_status_cleared (GnomePilotConduitSyncAbs *conduit,
EMemoConduitContext *ctxt)
{
const char *uid;
-
+
LOG (g_message ( "set_status_cleared: clearing status\n" ));
-
+
e_cal_component_get_uid (local->comp, &uid);
g_hash_table_remove (ctxt->changed_hash, uid);
-
+
return 0;
}
@@ -1032,7 +1032,7 @@ for_each (GnomePilotConduitSyncAbs *conduit,
comps = ctxt->comps;
count = 0;
-
+
if (comps != NULL) {
LOG (g_message ( "for_each: iterating over %d records", g_list_length (comps)));
@@ -1089,13 +1089,13 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit,
if (*local == NULL) {
LOG (g_message ( "for_each_modified beginning\n" ));
-
+
iterator = ctxt->changed;
-
+
count = 0;
-
+
LOG (g_message ( "iterating over %d records", g_hash_table_size (ctxt->changed_hash) ));
-
+
iterator = next_changed_item (ctxt, iterator);
if (iterator != NULL) {
ECalChange *ccc = iterator->data;
@@ -1163,7 +1163,7 @@ compare (GnomePilotConduitSyncAbs *conduit,
LOG (g_message ( " equal" ));
else
LOG (g_message ( " not equal" ));
-
+
return retval;
}
@@ -1175,7 +1175,7 @@ add_record (GnomePilotConduitSyncAbs *conduit,
ECalComponent *comp;
char *uid;
int retval = 0;
-
+
g_return_val_if_fail (remote != NULL, -1);
LOG (g_message ( "add_record: adding %s to desktop\n", print_remote (remote) ));
@@ -1204,7 +1204,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit,
{
ECalComponent *new_comp;
int retval = 0;
-
+
g_return_val_if_fail (remote != NULL, -1);
LOG (g_message ("replace_record: replace %s with %s\n",
@@ -1214,7 +1214,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit,
g_object_unref (local->comp);
local->comp = new_comp;
- if (!e_cal_modify_object (ctxt->client, e_cal_component_get_icalcomponent (new_comp),
+ if (!e_cal_modify_object (ctxt->client, e_cal_component_get_icalcomponent (new_comp),
CALOBJ_MOD_ALL, NULL))
return -1;
@@ -1238,7 +1238,7 @@ delete_record (GnomePilotConduitSyncAbs *conduit,
e_pilot_map_remove_by_uid (ctxt->map, uid);
/* FIXME Error handling */
e_cal_remove_object (ctxt->client, uid, NULL);
-
+
return 0;
}
@@ -1250,14 +1250,14 @@ archive_record (GnomePilotConduitSyncAbs *conduit,
{
const char *uid;
int retval = 0;
-
+
g_return_val_if_fail (local != NULL, -1);
LOG (g_message ( "archive_record: %s\n", archive ? "yes" : "no" ));
e_cal_component_get_uid (local->comp, &uid);
e_pilot_map_insert (ctxt->map, local->local.ID, uid, archive);
-
+
return retval;
}
@@ -1268,24 +1268,24 @@ match (GnomePilotConduitSyncAbs *conduit,
EMemoConduitContext *ctxt)
{
const char *uid;
-
+
LOG (g_message ("match: looking for local copy of %s\n",
- print_remote (remote)));
-
+ print_remote (remote)));
+
g_return_val_if_fail (local != NULL, -1);
g_return_val_if_fail (remote != NULL, -1);
*local = NULL;
uid = e_pilot_map_lookup_uid (ctxt->map, remote->ID, TRUE);
-
+
if (!uid)
return 0;
LOG (g_message ( " matched\n" ));
-
+
*local = g_new0 (EMemoLocalRecord, 1);
local_record_from_uid (*local, uid, ctxt);
-
+
return 0;
}
@@ -1321,7 +1321,7 @@ static void
fill_widgets (EMemoConduitContext *ctxt)
{
if (ctxt->cfg->source)
- e_pilot_settings_set_source (E_PILOT_SETTINGS (ctxt->ps),
+ e_pilot_settings_set_source (E_PILOT_SETTINGS (ctxt->ps),
ctxt->cfg->source);
e_pilot_settings_set_secret (E_PILOT_SETTINGS (ctxt->ps),
ctxt->cfg->secret);
@@ -1333,8 +1333,8 @@ create_settings_window (GnomePilotConduit *conduit,
EMemoConduitContext *ctxt)
{
LOG (g_message ( "create_settings_window" ));
-
- if (!ctxt->cfg->source_list)
+
+ if (!ctxt->cfg->source_list)
return -1;
ctxt->ps = e_pilot_settings_new (ctxt->cfg->source_list);
@@ -1343,7 +1343,7 @@ create_settings_window (GnomePilotConduit *conduit,
gtk_widget_show (ctxt->ps);
fill_widgets (ctxt);
-
+
return 0;
}
@@ -1351,7 +1351,7 @@ static void
display_settings (GnomePilotConduit *conduit, EMemoConduitContext *ctxt)
{
LOG (g_message ( "display_settings" ));
-
+
fill_widgets (ctxt);
}
@@ -1365,7 +1365,7 @@ save_settings (GnomePilotConduit *conduit, EMemoConduitContext *ctxt)
ctxt->new_cfg->source = e_pilot_settings_get_source (E_PILOT_SETTINGS (ctxt->ps));
g_object_ref (ctxt->new_cfg->source);
ctxt->new_cfg->secret = e_pilot_settings_get_secret (E_PILOT_SETTINGS (ctxt->ps));
-
+
memoconduit_save_configuration (ctxt->new_cfg);
}
@@ -1389,7 +1389,7 @@ conduit_get_gpilot_conduit (guint32 pilot_id)
retval = gnome_pilot_conduit_sync_abs_new ("MemoDB", 0x6D656D6F);
g_assert (retval != NULL);
-
+
ctxt = e_memo_context_new (pilot_id);
gtk_object_set_data (GTK_OBJECT (retval), "memoconduit_context", ctxt);
@@ -1424,10 +1424,10 @@ conduit_get_gpilot_conduit (guint32 pilot_id)
void
conduit_destroy_gpilot_conduit (GnomePilotConduit *conduit)
-{
+{
GtkObject *obj = GTK_OBJECT (conduit);
EMemoConduitContext *ctxt;
-
+
ctxt = gtk_object_get_data (obj, "memoconduit_context");
e_memo_context_destroy (ctxt);
diff --git a/calendar/conduits/todo/todo-conduit.c b/calendar/conduits/todo/todo-conduit.c
index 0594d53298..e321940386 100644
--- a/calendar/conduits/todo/todo-conduit.c
+++ b/calendar/conduits/todo/todo-conduit.c
@@ -4,7 +4,7 @@
* Copyright (C) 1998 Free Software Foundation
* Copyright (C) 2000 Ximian, Inc.
*
- * Authors: Eskil Heyn Olsen <deity@eskil.dk>
+ * Authors: Eskil Heyn Olsen <deity@eskil.dk>
* JP Rosevear <jpr@ximian.com>
*
* This program is free software; you can redistribute it and/or
@@ -61,7 +61,7 @@ void conduit_destroy_gpilot_conduit (GnomePilotConduit*);
#define LOG(x) x
#else
#define LOG(x)
-#endif
+#endif
#define WARN g_warning
#define INFO g_message
@@ -89,11 +89,11 @@ struct _EToDoLocalRecord {
int lastDesktopUniqueID;
static void
-todoconduit_destroy_record (EToDoLocalRecord *local)
+todoconduit_destroy_record (EToDoLocalRecord *local)
{
g_object_unref (local->comp);
free_ToDo (local->todo);
- g_free (local->todo);
+ g_free (local->todo);
g_free (local);
}
@@ -111,7 +111,7 @@ struct _EToDoConduitCfg {
};
static EToDoConduitCfg *
-todoconduit_load_configuration (guint32 pilot_id)
+todoconduit_load_configuration (guint32 pilot_id)
{
EToDoConduitCfg *c;
GnomePilotConduitManagement *management;
@@ -121,7 +121,7 @@ todoconduit_load_configuration (guint32 pilot_id)
g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/",
pilot_id);
-
+
c = g_new0 (EToDoConduitCfg,1);
g_assert (c != NULL);
@@ -135,10 +135,10 @@ todoconduit_load_configuration (guint32 pilot_id)
c->sync_type = GnomePilotConduitSyncTypeNotSet;
gtk_object_unref (GTK_OBJECT (config));
gtk_object_unref (GTK_OBJECT (management));
-
+
/* Custom settings */
gnome_config_push_prefix (prefix);
-
+
if (!e_cal_get_sources (&c->source_list, E_CAL_SOURCE_TYPE_TODO, NULL))
c->source_list = NULL;
if (c->source_list) {
@@ -152,7 +152,7 @@ todoconduit_load_configuration (guint32 pilot_id)
c->source_list = NULL;
}
}
-
+
c->secret = gnome_config_get_bool ("secret=FALSE");
c->priority = gnome_config_get_int ("priority=3");
c->last_uri = gnome_config_get_string ("last_uri");
@@ -163,7 +163,7 @@ todoconduit_load_configuration (guint32 pilot_id)
}
static void
-todoconduit_save_configuration (EToDoConduitCfg *c)
+todoconduit_save_configuration (EToDoConduitCfg *c)
{
gchar prefix[256];
@@ -182,7 +182,7 @@ todoconduit_save_configuration (EToDoConduitCfg *c)
}
static EToDoConduitCfg*
-todoconduit_dupe_configuration (EToDoConduitCfg *c)
+todoconduit_dupe_configuration (EToDoConduitCfg *c)
{
EToDoConduitCfg *retval;
@@ -203,8 +203,8 @@ todoconduit_dupe_configuration (EToDoConduitCfg *c)
return retval;
}
-static void
-todoconduit_destroy_configuration (EToDoConduitCfg *c)
+static void
+todoconduit_destroy_configuration (EToDoConduitCfg *c)
{
g_return_if_fail (c != NULL);
@@ -220,13 +220,13 @@ struct _EToDoConduitGui {
};
static EToDoConduitGui *
-e_todo_gui_new (EPilotSettings *ps)
+e_todo_gui_new (EPilotSettings *ps)
{
EToDoConduitGui *gui;
GtkWidget *lbl;
GtkObject *adj;
gint rows;
-
+
g_return_val_if_fail (ps != NULL, NULL);
g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), NULL);
@@ -244,12 +244,12 @@ e_todo_gui_new (EPilotSettings *ps)
gtk_table_attach_defaults (GTK_TABLE (ps), gui->priority, 1, 2, rows, rows + 1);
gtk_widget_show (lbl);
gtk_widget_show (gui->priority);
-
+
return gui;
}
static void
-e_todo_gui_fill_widgets (EToDoConduitGui *gui, EToDoConduitCfg *cfg)
+e_todo_gui_fill_widgets (EToDoConduitGui *gui, EToDoConduitCfg *cfg)
{
g_return_if_fail (gui != NULL);
g_return_if_fail (cfg != NULL);
@@ -258,7 +258,7 @@ e_todo_gui_fill_widgets (EToDoConduitGui *gui, EToDoConduitCfg *cfg)
}
static void
-e_todo_gui_fill_config (EToDoConduitGui *gui, EToDoConduitCfg *cfg)
+e_todo_gui_fill_config (EToDoConduitGui *gui, EToDoConduitCfg *cfg)
{
g_return_if_fail (gui != NULL);
g_return_if_fail (cfg != NULL);
@@ -267,7 +267,7 @@ e_todo_gui_fill_config (EToDoConduitGui *gui, EToDoConduitCfg *cfg)
}
static void
-e_todo_gui_destroy (EToDoConduitGui *gui)
+e_todo_gui_destroy (EToDoConduitGui *gui)
{
g_free (gui);
}
@@ -280,7 +280,7 @@ struct _EToDoConduitContext {
EToDoConduitCfg *new_cfg;
EToDoConduitGui *gui;
GtkWidget *ps;
-
+
struct ToDoAppInfo ai;
ECal *client;
@@ -291,15 +291,15 @@ struct _EToDoConduitContext {
GList *changed;
GHashTable *changed_hash;
GList *locals;
-
+
EPilotMap *map;
};
static EToDoConduitContext *
-e_todo_context_new (guint32 pilot_id)
+e_todo_context_new (guint32 pilot_id)
{
EToDoConduitContext *ctxt = g_new0 (EToDoConduitContext, 1);
-
+
ctxt->cfg = todoconduit_load_configuration (pilot_id);
ctxt->new_cfg = todoconduit_dupe_configuration (ctxt->cfg);
ctxt->gui = NULL;
@@ -317,10 +317,10 @@ e_todo_context_new (guint32 pilot_id)
}
static gboolean
-e_todo_context_foreach_change (gpointer key, gpointer value, gpointer data)
+e_todo_context_foreach_change (gpointer key, gpointer value, gpointer data)
{
g_free (key);
-
+
return TRUE;
}
@@ -328,7 +328,7 @@ static void
e_todo_context_destroy (EToDoConduitContext *ctxt)
{
GList *l;
-
+
g_return_if_fail (ctxt != NULL);
if (ctxt->cfg != NULL)
@@ -337,7 +337,7 @@ e_todo_context_destroy (EToDoConduitContext *ctxt)
todoconduit_destroy_configuration (ctxt->new_cfg);
if (ctxt->gui != NULL)
e_todo_gui_destroy (ctxt->gui);
-
+
if (ctxt->client != NULL)
g_object_unref (ctxt->client);
@@ -359,10 +359,10 @@ e_todo_context_destroy (EToDoConduitContext *ctxt)
todoconduit_destroy_record (l->data);
g_list_free (ctxt->locals);
}
-
+
if (ctxt->changed != NULL)
e_cal_free_change_list (ctxt->changed);
-
+
if (ctxt->map != NULL)
e_pilot_map_destroy (ctxt->map);
@@ -437,7 +437,7 @@ static char *print_remote (GnomePilotRecord *remote)
remote->category);
free_ToDo (&todo);
-
+
return buff;
}
@@ -475,7 +475,7 @@ start_calendar_server (EToDoConduitContext *ctxt)
if (ctxt->timezone && !e_cal_set_default_timezone (ctxt->client, ctxt->timezone, NULL))
return -1;
- LOG (g_message ( " timezone set to : %s", icaltimezone_get_tzid (ctxt->timezone) ));
+ LOG (g_message ( " timezone set to : %s", icaltimezone_get_tzid (ctxt->timezone) ));
if (e_source_get_property (ctxt->cfg->source, "auth")) {
EUri *e_uri;
@@ -488,7 +488,7 @@ start_calendar_server (EToDoConduitContext *ctxt)
if (ctxt->client)
e_cal_set_auth_func (ctxt->client, (ECalAuthFunc) auth_func_cb, NULL);
}
- if (!e_cal_open (ctxt->client, TRUE, NULL))
+ if (!e_cal_open (ctxt->client, TRUE, NULL))
retval = -1;
} else if (!e_cal_open_default (&ctxt->client, E_CAL_SOURCE_TYPE_TODO, NULL, NULL, NULL)) {
retval = -1;
@@ -501,14 +501,14 @@ start_calendar_server (EToDoConduitContext *ctxt)
/* Utility routines */
static icaltimezone *
-get_timezone (ECal *client, const char *tzid)
+get_timezone (ECal *client, const char *tzid)
{
icaltimezone *timezone = NULL;
timezone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
if (timezone == NULL)
e_cal_get_timezone (client, tzid, &timezone, NULL);
-
+
return timezone;
}
@@ -527,51 +527,51 @@ get_default_timezone (void)
g_free (location);
location = g_strdup ("UTC");
}
-
+
timezone = icaltimezone_get_builtin_timezone (location);
g_free (location);
g_object_unref (listener);
- return timezone;
+ return timezone;
}
static char *
-map_name (EToDoConduitContext *ctxt)
+map_name (EToDoConduitContext *ctxt)
{
char *filename;
-
+
filename = g_strdup_printf ("%s/.evolution/tasks/local/system/pilot-map-todo-%d.xml", g_get_home_dir (), ctxt->cfg->pilot_id);
-
+
return filename;
}
static gboolean
-is_empty_time (struct tm time)
+is_empty_time (struct tm time)
{
- if (time.tm_sec || time.tm_min || time.tm_hour
- || time.tm_mday || time.tm_mon || time.tm_year)
+ if (time.tm_sec || time.tm_min || time.tm_hour
+ || time.tm_mday || time.tm_mon || time.tm_year)
return FALSE;
-
+
return TRUE;
}
static GList *
-next_changed_item (EToDoConduitContext *ctxt, GList *changes)
+next_changed_item (EToDoConduitContext *ctxt, GList *changes)
{
ECalChange *ccc;
GList *l;
-
+
for (l = changes; l != NULL; l = l->next) {
const char *uid;
ccc = l->data;
-
+
e_cal_component_get_uid (ccc->comp, &uid);
if (g_hash_table_lookup (ctxt->changed_hash, uid))
return l;
}
-
+
return NULL;
}
@@ -584,16 +584,16 @@ compute_status (EToDoConduitContext *ctxt, EToDoLocalRecord *local, const char *
local->local.secret = FALSE;
ccc = g_hash_table_lookup (ctxt->changed_hash, uid);
-
+
if (ccc == NULL) {
local->local.attr = GnomePilotRecordNothing;
return;
}
-
+
switch (ccc->type) {
case E_CAL_CHANGE_ADDED:
local->local.attr = GnomePilotRecordNew;
- break;
+ break;
case E_CAL_CHANGE_MODIFIED:
local->local.attr = GnomePilotRecordModified;
break;
@@ -616,7 +616,7 @@ local_record_to_pilot_record (EToDoLocalRecord *local,
g_assert (local->comp != NULL);
g_assert (local->todo != NULL );
-
+
LOG (g_message ( "local_record_to_pilot_record\n" ));
memset (&p, 0, sizeof (GnomePilotRecord));
@@ -640,19 +640,19 @@ local_record_to_pilot_record (EToDoLocalRecord *local,
p.length = buffer->used;
memcpy(p.record, buffer->data, buffer->used);
- pi_buffer_free(buffer);
+ pi_buffer_free(buffer);
#else
p.record = (unsigned char *)record;
p.length = pack_ToDo (local->todo, p.record, 0xffff);
#endif
- return p;
+ return p;
}
/*
* converts a ECalComponent object to a EToDoLocalRecord
*/
static void
-local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoConduitContext *ctxt)
+local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoConduitContext *ctxt)
{
const char *uid;
int *priority;
@@ -663,7 +663,7 @@ local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoCondu
ECalComponentDateTime due;
ECalComponentClassification classif;
icaltimezone *default_tz = get_default_timezone ();
-
+
LOG (g_message ( "local_record_from_comp\n" ));
g_return_if_fail (local != NULL);
@@ -692,14 +692,14 @@ local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoCondu
#else
char record[0xffff];
#endif
-
- if (dlp_ReadRecordById (ctxt->dbi->pilot_socket,
+
+ if (dlp_ReadRecordById (ctxt->dbi->pilot_socket,
ctxt->dbi->db_handle,
#ifdef PILOT_LINK_0_12
- local->local.ID, record,
+ local->local.ID, record,
NULL, NULL, &cat) > 0) {
#else
- local->local.ID, &record,
+ local->local.ID, &record,
NULL, NULL, NULL, &cat) > 0) {
#endif
local->local.category = cat;
@@ -708,14 +708,14 @@ local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoCondu
pi_buffer_free(record);
#endif
}
-
+
/*Category support*/
e_pilot_local_category_to_remote(&(local->local.category), comp, &(ctxt->ai.category));
/* STOP: don't replace these with g_strdup, since free_ToDo
uses free to deallocate */
e_cal_component_get_summary (comp, &summary);
- if (summary.value)
+ if (summary.value)
local->todo->description = e_pilot_utf8_to_pchar (summary.value);
e_cal_component_get_description_list (comp, &d_list);
@@ -729,7 +729,7 @@ local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoCondu
local->todo->note = NULL;
}
- e_cal_component_get_due (comp, &due);
+ e_cal_component_get_due (comp, &due);
if (due.value) {
icaltimezone_convert_time (due.value,
get_timezone (ctxt->client, due.tzid),
@@ -739,14 +739,14 @@ local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoCondu
} else {
local->todo->indefinite = 1;
}
- e_cal_component_free_datetime (&due);
+ e_cal_component_free_datetime (&due);
- e_cal_component_get_status (comp, &status);
+ e_cal_component_get_status (comp, &status);
if (status == ICAL_STATUS_COMPLETED)
local->todo->complete = 1;
else
local->todo->complete = 0;
-
+
e_cal_component_get_priority (comp, &priority);
if (priority && *priority != 0) {
if (*priority <= 3)
@@ -759,12 +759,12 @@ local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoCondu
local->todo->priority = 4;
else
local->todo->priority = 5;
-
+
e_cal_component_free_priority (priority);
} else {
local->todo->priority = ctxt->cfg->priority;
- }
-
+ }
+
e_cal_component_get_classification (comp, &classif);
if (classif == E_CAL_COMPONENT_CLASS_PRIVATE)
@@ -775,7 +775,7 @@ local_record_from_comp (EToDoLocalRecord *local, ECalComponent *comp, EToDoCondu
local->local.archived = 0;
}
-static void
+static void
local_record_from_uid (EToDoLocalRecord *local,
const char *uid,
EToDoConduitContext *ctxt)
@@ -785,7 +785,7 @@ local_record_from_uid (EToDoLocalRecord *local,
GError *error = NULL;
g_assert(local!=NULL);
-
+
LOG(g_message("local_record_from_uid\n"));
if (e_cal_get_object (ctxt->client, uid, NULL, &icalcomp, &error)) {
@@ -830,7 +830,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
#ifdef PILOT_LINK_0_12
pi_buffer_t * buffer;
#endif
-
+
g_return_val_if_fail (remote != NULL, NULL);
#ifdef PILOT_LINK_0_12
@@ -851,7 +851,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
#endif
utc_zone = icaltimezone_get_utc_timezone ();
- now = icaltime_from_timet_with_zone (time (NULL), FALSE,
+ now = icaltime_from_timet_with_zone (time (NULL), FALSE,
utc_zone);
if (in_comp == NULL) {
@@ -867,10 +867,10 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
summary.value = txt = e_pilot_utf8_from_pchar (todo.description);
e_cal_component_set_summary (comp, &summary);
free (txt);
-
+
/*Category support*/
e_pilot_remote_category_to_local(remote->category, comp, &(ai->category));
-
+
/* The iCal description field */
if (!todo.note) {
e_cal_component_set_comment_list (comp, NULL);
@@ -885,7 +885,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
e_cal_component_set_description_list (comp, &l);
free (txt);
- }
+ }
if (todo.complete) {
int percent = 100;
@@ -896,9 +896,9 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
} else {
int *percent = NULL;
icalproperty_status status;
-
+
e_cal_component_set_completed (comp, NULL);
-
+
e_cal_component_get_percent (comp, &percent);
if (percent == NULL || *percent == 100) {
int p = 0;
@@ -934,7 +934,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
default:
priority = 9;
}
-
+
e_cal_component_set_priority (comp, &priority);
e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_NONE);
@@ -944,7 +944,7 @@ comp_from_remote_record (GnomePilotConduitSyncAbs *conduit,
e_cal_component_set_classification (comp, E_CAL_COMPONENT_CLASS_PUBLIC);
e_cal_component_commit_sequence (comp);
-
+
free_ToDo(&todo);
return comp;
@@ -956,7 +956,7 @@ check_for_slow_setting (GnomePilotConduit *c, EToDoConduitContext *ctxt)
GnomePilotConduitStandard *conduit = GNOME_PILOT_CONDUIT_STANDARD (c);
int map_count;
const char *uri;
-
+
/* If there are no objects or objects but no log */
map_count = g_hash_table_size (ctxt->map->pid_map);
if (map_count == 0)
@@ -975,7 +975,7 @@ check_for_slow_setting (GnomePilotConduit *c, EToDoConduitContext *ctxt)
LOG (g_message ( " doing slow sync\n" ));
} else {
LOG (g_message ( " doing fast sync\n" ));
- }
+ }
}
/* Pilot syncing callbacks */
@@ -1001,7 +1001,7 @@ pre_sync (GnomePilotConduit *conduit,
LOG (g_message ( "pre_sync: ToDo Conduit v.%s", CONDUIT_VERSION ));
g_message ("ToDo Conduit v.%s", CONDUIT_VERSION);
- ctxt->dbi = dbi;
+ ctxt->dbi = dbi;
ctxt->client = NULL;
/* Get the timezone */
@@ -1015,19 +1015,19 @@ pre_sync (GnomePilotConduit *conduit,
gnome_pilot_conduit_error (conduit, _("Could not start evolution-data-server"));
return -1;
}
-
+
/* Get the default component */
if (!e_cal_get_default_object (ctxt->client, &icalcomp, NULL))
return -1;
LOG (g_message ( " Got default component: %p", icalcomp));
-
+
ctxt->default_comp = e_cal_component_new ();
if (!e_cal_component_set_icalcomponent (ctxt->default_comp, icalcomp)) {
g_object_unref (ctxt->default_comp);
icalcomponent_free (icalcomp);
return -1;
}
-
+
/* Load the uid <--> pilot id map */
filename = map_name (ctxt);
e_pilot_map_read (filename, &ctxt->map);
@@ -1036,24 +1036,24 @@ pre_sync (GnomePilotConduit *conduit,
/* Get the local database */
if (!e_cal_get_object_list_as_comp (ctxt->client, "#t", &ctxt->comps, NULL))
return -1;
-
+
/* Count and hash the changes */
change_id = g_strdup_printf ("pilot-sync-evolution-todo-%d", ctxt->cfg->pilot_id);
if (!e_cal_get_changes (ctxt->client, change_id, &ctxt->changed, NULL))
return -1;
-
+
ctxt->changed_hash = g_hash_table_new (g_str_hash, g_str_equal);
g_free (change_id);
-
+
for (l = ctxt->changed; l != NULL; l = l->next) {
ECalChange *ccc = l->data;
const char *uid;
-
+
e_cal_component_get_uid (ccc->comp, &uid);
if (!e_pilot_map_uid_is_archived (ctxt->map, uid)) {
-
+
g_hash_table_insert (ctxt->changed_hash, g_strdup (uid), ccc);
-
+
switch (ccc->type) {
case E_CAL_CHANGE_ADDED:
add_records++;
@@ -1076,7 +1076,7 @@ pre_sync (GnomePilotConduit *conduit,
gnome_pilot_conduit_sync_abs_set_num_new_local_records (abs_conduit, add_records);
gnome_pilot_conduit_sync_abs_set_num_updated_local_records (abs_conduit, mod_records);
gnome_pilot_conduit_sync_abs_set_num_deleted_local_records(abs_conduit, del_records);
-
+
g_message("num_records: %d\nadd_records: %d\nmod_records: %d\ndel_records: %d\n",
num_records, add_records, mod_records, del_records);
@@ -1093,7 +1093,7 @@ pre_sync (GnomePilotConduit *conduit,
buf = (unsigned char*)g_malloc (0xffff);
len = dlp_ReadAppBlock (dbi->pilot_socket, dbi->db_handle, 0,
(unsigned char *)buf, 0xffff);
-#endif
+#endif
if (len < 0) {
WARN (_("Could not read pilot's ToDo application block"));
WARN ("dlp_ReadAppBlock(...) = %d", len);
@@ -1109,14 +1109,14 @@ pre_sync (GnomePilotConduit *conduit,
#endif
unpack_ToDoAppInfo (&(ctxt->ai), buf, len);
g_free (buf);
-
+
lastDesktopUniqueID = 128;
check_for_slow_setting (conduit, ctxt);
if (ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyToPilot
|| ctxt->cfg->sync_type == GnomePilotConduitSyncTypeCopyFromPilot)
ctxt->map->write_touched_only = TRUE;
-
+
return 0;
}
@@ -1131,14 +1131,14 @@ post_sync (GnomePilotConduit *conduit,
int dlpRetVal, len;
buf = (unsigned char*)g_malloc (0xffff);
-
+
len = pack_ToDoAppInfo (&(ctxt->ai), buf, 0xffff);
-
- dlpRetVal = dlp_WriteAppBlock (dbi->pilot_socket, dbi->db_handle,
+
+ dlpRetVal = dlp_WriteAppBlock (dbi->pilot_socket, dbi->db_handle,
(unsigned char *)buf, len);
-
+
g_free (buf);
-
+
if (dlpRetVal < 0) {
WARN (_("Could not write pilot's ToDo application block"));
WARN ("dlp_WriteAppBlock(...) = %d", dlpRetVal);
@@ -1146,14 +1146,14 @@ post_sync (GnomePilotConduit *conduit,
_("Could not write pilot's ToDo application block"));
return -1;
}
-
+
LOG (g_message ( "post_sync: ToDo Conduit v.%s", CONDUIT_VERSION ));
g_free (ctxt->cfg->last_uri);
ctxt->cfg->last_uri = g_strdup (e_cal_get_uri (ctxt->client));
todoconduit_save_configuration (ctxt->cfg);
-
+
filename = map_name (ctxt);
e_pilot_map_write (filename, ctxt->map);
g_free (filename);
@@ -1165,7 +1165,7 @@ post_sync (GnomePilotConduit *conduit,
if (e_cal_get_changes (ctxt->client, change_id, &changed, NULL))
e_cal_free_change_list (changed);
g_free (change_id);
-
+
LOG (g_message ( "---------------------------------------------------------\n" ));
return 0;
@@ -1180,7 +1180,7 @@ set_pilot_id (GnomePilotConduitSyncAbs *conduit,
const char *uid;
LOG (g_message ( "set_pilot_id: setting to %d\n", ID ));
-
+
e_cal_component_get_uid (local->comp, &uid);
e_pilot_map_insert (ctxt->map, ID, uid, FALSE);
@@ -1193,12 +1193,12 @@ set_status_cleared (GnomePilotConduitSyncAbs *conduit,
EToDoConduitContext *ctxt)
{
const char *uid;
-
+
LOG (g_message ( "set_status_cleared: clearing status\n" ));
-
+
e_cal_component_get_uid (local->comp, &uid);
g_hash_table_remove (ctxt->changed_hash, uid);
-
+
return 0;
}
@@ -1218,7 +1218,7 @@ for_each (GnomePilotConduitSyncAbs *conduit,
comps = ctxt->comps;
count = 0;
-
+
if (comps != NULL) {
LOG (g_message ( "iterating over %d records", g_list_length (comps)));
@@ -1229,7 +1229,7 @@ for_each (GnomePilotConduitSyncAbs *conduit,
* gets messed up. The calling function keeps track of
* the *local variable */
unused = g_list_prepend (ctxt->locals, *local);
-
+
iterator = comps;
} else {
LOG (g_message ( "no events" ));
@@ -1243,7 +1243,7 @@ for_each (GnomePilotConduitSyncAbs *conduit,
*local = g_new0 (EToDoLocalRecord, 1);
local_record_from_comp (*local, iterator->data, ctxt);
-
+
/* NOTE: ignore the return value, otherwise ctxt->locals
* gets messed up. The calling function keeps track of
* the *local variable */
@@ -1274,20 +1274,20 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit,
if (*local == NULL) {
LOG (g_message ( "for_each_modified beginning\n" ));
-
+
iterator = ctxt->changed;
-
+
count = 0;
-
+
LOG (g_message ( "iterating over %d records", g_hash_table_size (ctxt->changed_hash) ));
-
+
iterator = next_changed_item (ctxt, iterator);
if (iterator != NULL) {
ECalChange *ccc = iterator->data;
-
+
*local = g_new0 (EToDoLocalRecord, 1);
local_record_from_comp (*local, ccc->comp, ctxt);
-
+
/* NOTE: ignore the return value, otherwise ctxt->locals
* gets messed up. The calling function keeps track of
* the *local variable */
@@ -1302,10 +1302,10 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit,
iterator = g_list_next (iterator);
if (iterator && (iterator = next_changed_item (ctxt, iterator))) {
ECalChange *ccc = iterator->data;
-
+
*local = g_new0 (EToDoLocalRecord, 1);
- local_record_from_comp (*local, ccc->comp, ctxt);
-
+ local_record_from_comp (*local, ccc->comp, ctxt);
+
/* NOTE: ignore the return value, otherwise ctxt->locals
* gets messed up. The calling function keeps track of
* the *local variable */
@@ -1347,7 +1347,7 @@ compare (GnomePilotConduitSyncAbs *conduit,
LOG (g_message ( " equal" ));
else
LOG (g_message ( " not equal" ));
-
+
return retval;
}
@@ -1359,7 +1359,7 @@ add_record (GnomePilotConduitSyncAbs *conduit,
ECalComponent *comp;
char *uid;
int retval = 0;
-
+
g_return_val_if_fail (remote != NULL, -1);
LOG (g_message ( "add_record: adding %s to desktop\n", print_remote (remote) ));
@@ -1389,7 +1389,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit,
{
ECalComponent *new_comp;
int retval = 0;
-
+
g_return_val_if_fail (remote != NULL, -1);
LOG (g_message ("replace_record: replace %s with %s\n",
@@ -1399,7 +1399,7 @@ replace_record (GnomePilotConduitSyncAbs *conduit,
g_object_unref (local->comp);
local->comp = new_comp;
- if (!e_cal_modify_object (ctxt->client, e_cal_component_get_icalcomponent (new_comp),
+ if (!e_cal_modify_object (ctxt->client, e_cal_component_get_icalcomponent (new_comp),
CALOBJ_MOD_ALL, NULL))
return -1;
@@ -1423,7 +1423,7 @@ delete_record (GnomePilotConduitSyncAbs *conduit,
e_pilot_map_remove_by_uid (ctxt->map, uid);
/* FIXME Error handling */
e_cal_remove_object (ctxt->client, uid, NULL);
-
+
return 0;
}
@@ -1435,14 +1435,14 @@ archive_record (GnomePilotConduitSyncAbs *conduit,
{
const char *uid;
int retval = 0;
-
+
g_return_val_if_fail (local != NULL, -1);
LOG (g_message ( "archive_record: %s\n", archive ? "yes" : "no" ));
e_cal_component_get_uid (local->comp, &uid);
e_pilot_map_insert (ctxt->map, local->local.ID, uid, archive);
-
+
return retval;
}
@@ -1453,24 +1453,24 @@ match (GnomePilotConduitSyncAbs *conduit,
EToDoConduitContext *ctxt)
{
const char *uid;
-
+
LOG (g_message ("match: looking for local copy of %s\n",
- print_remote (remote)));
-
+ print_remote (remote)));
+
g_return_val_if_fail (local != NULL, -1);
g_return_val_if_fail (remote != NULL, -1);
*local = NULL;
uid = e_pilot_map_lookup_uid (ctxt->map, remote->ID, TRUE);
-
+
if (!uid)
return 0;
LOG (g_message ( " matched\n" ));
-
+
*local = g_new0 (EToDoLocalRecord, 1);
local_record_from_uid (*local, uid, ctxt);
-
+
return 0;
}
@@ -1506,7 +1506,7 @@ static void
fill_widgets (EToDoConduitContext *ctxt)
{
if (ctxt->cfg->source)
- e_pilot_settings_set_source (E_PILOT_SETTINGS (ctxt->ps),
+ e_pilot_settings_set_source (E_PILOT_SETTINGS (ctxt->ps),
ctxt->cfg->source);
e_pilot_settings_set_secret (E_PILOT_SETTINGS (ctxt->ps),
ctxt->cfg->secret);
@@ -1520,8 +1520,8 @@ create_settings_window (GnomePilotConduit *conduit,
EToDoConduitContext *ctxt)
{
LOG (g_message ( "create_settings_window" ));
-
- if (!ctxt->cfg->source_list)
+
+ if (!ctxt->cfg->source_list)
return -1;
ctxt->ps = e_pilot_settings_new (ctxt->cfg->source_list);
@@ -1531,7 +1531,7 @@ create_settings_window (GnomePilotConduit *conduit,
gtk_widget_show (ctxt->ps);
fill_widgets (ctxt);
-
+
return 0;
}
@@ -1539,7 +1539,7 @@ static void
display_settings (GnomePilotConduit *conduit, EToDoConduitContext *ctxt)
{
LOG (g_message ( "display_settings" ));
-
+
fill_widgets (ctxt);
}
@@ -1554,7 +1554,7 @@ save_settings (GnomePilotConduit *conduit, EToDoConduitContext *ctxt)
g_object_ref (ctxt->new_cfg->source);
ctxt->new_cfg->secret = e_pilot_settings_get_secret (E_PILOT_SETTINGS (ctxt->ps));
e_todo_gui_fill_config (ctxt->gui, ctxt->new_cfg);
-
+
todoconduit_save_configuration (ctxt->new_cfg);
}
@@ -1578,7 +1578,7 @@ conduit_get_gpilot_conduit (guint32 pilot_id)
retval = gnome_pilot_conduit_sync_abs_new ("ToDoDB", 0x746F646F);
g_assert (retval != NULL);
-
+
ctxt = e_todo_context_new (pilot_id);
gtk_object_set_data (GTK_OBJECT (retval), "todoconduit_context", ctxt);
@@ -1613,10 +1613,10 @@ conduit_get_gpilot_conduit (guint32 pilot_id)
void
conduit_destroy_gpilot_conduit (GnomePilotConduit *conduit)
-{
+{
GtkObject *obj = GTK_OBJECT (conduit);
EToDoConduitContext *ctxt;
-
+
ctxt = gtk_object_get_data (obj, "todoconduit_context");
e_todo_context_destroy (ctxt);
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
index eab6b95606..7022c389be 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c
@@ -34,7 +34,7 @@
#include <gtk/gtkwindow.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#if 0
+#if 0
# include <libgnomeui/gnome-winhints.h>
#endif
#include <glade/glade.h>
@@ -46,7 +46,7 @@
#include <e-util/e-icon-factory.h>
-
+
enum {
ALARM_DISPLAY_COLUMN,
ALARM_SUMMARY_COLUMN,
@@ -55,7 +55,7 @@ enum {
ALARM_START_COLUMN,
ALARM_END_COLUMN,
-
+
ALARM_FUNCINFO_COLUMN,
N_ALARM_COLUMNS
@@ -74,16 +74,16 @@ typedef struct {
GtkWidget *dialog;
GtkWidget *snooze_time_min;
GtkWidget *snooze_time_hrs;
- GtkWidget *snooze_btn;
+ GtkWidget *snooze_btn;
GtkWidget *minutes_label;
GtkWidget *hrs_label;
GtkWidget *description;
GtkWidget *location;
GtkWidget *treeview;
GtkWidget *scrolledwindow;
-
+
AlarmFuncInfo *cur_funcinfo;
-
+
} AlarmNotify;
@@ -91,9 +91,9 @@ static void
tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data);
static void
-fill_in_labels (AlarmNotify *an, const gchar *summary, const gchar *description,
+fill_in_labels (AlarmNotify *an, const gchar *summary, const gchar *description,
const gchar *location, time_t occur_start, time_t occur_end);
-static void
+static void
edit_pressed_cb (GtkButton *button, gpointer user_data);
static void
@@ -137,7 +137,7 @@ dialog_response_cb (GtkDialog *dialog, guint response_id, gpointer user_data)
GtkTreeModel *model = NULL;
AlarmFuncInfo *funcinfo = NULL;
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (an->treeview));
-
+
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
}
@@ -158,7 +158,7 @@ dialog_response_cb (GtkDialog *dialog, guint response_id, gpointer user_data)
return;
}
-static void
+static void
edit_pressed_cb (GtkButton *button, gpointer user_data)
{
AlarmNotify *an = user_data;
@@ -168,14 +168,14 @@ edit_pressed_cb (GtkButton *button, gpointer user_data)
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (an->treeview));
if (gtk_tree_selection_get_selected (selection, &model, &iter))
- gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
+ gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
g_return_if_fail (funcinfo);
-
+
(* funcinfo->func) (ALARM_NOTIFY_EDIT, -1, funcinfo->func_data);
}
-static void
+static void
snooze_pressed_cb (GtkButton *button, gpointer user_data)
{
int snooze_timeout;
@@ -188,7 +188,7 @@ snooze_pressed_cb (GtkButton *button, gpointer user_data)
gtk_widget_grab_focus ((GtkWidget *) button);
if (gtk_tree_selection_get_selected (selection, &model, &iter))
- gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
+ gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
g_return_if_fail (funcinfo);
@@ -226,25 +226,25 @@ notified_alarms_dialog_new (void)
GtkTreeViewColumn *column = NULL;
GtkTreeSelection *selection = NULL;
GtkTreeModel *model = GTK_TREE_MODEL (gtk_list_store_new (
- N_ALARM_COLUMNS,
-
+ N_ALARM_COLUMNS,
+
G_TYPE_STRING, /* Display */
G_TYPE_STRING, /* Summary */
G_TYPE_STRING, /* Description */
G_TYPE_STRING, /* Location */
-
+
G_TYPE_POINTER, /* Start */
G_TYPE_POINTER, /* End */
-
+
G_TYPE_POINTER /* FuncInfo*/));
-
+
an->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-notify.glade", NULL, NULL);
if (!an->xml) {
g_message ("alarm_notify_dialog(): Could not load the Glade XML file!");
g_free (an);
return NULL;
}
-
+
an->dialog = glade_xml_get_widget (an->xml, "alarm-notify");
an->snooze_time_min = glade_xml_get_widget (an->xml, "snooze-time-min");
an->minutes_label = glade_xml_get_widget (an->xml, "minutes-label");
@@ -258,7 +258,7 @@ notified_alarms_dialog_new (void)
an->snooze_btn = snooze_btn;
edit_btn = glade_xml_get_widget (an->xml, "edit-button");
- if (!(an->dialog && an->scrolledwindow && an->treeview && an->snooze_time_min && an->snooze_time_hrs
+ if (!(an->dialog && an->scrolledwindow && an->treeview && an->snooze_time_min && an->snooze_time_hrs
&& an->description && an->location && edit_btn && snooze_btn)) {
g_message ("alarm_notify_dialog(): Could not find all widgets in Glade file!");
g_object_unref (an->xml);
@@ -275,14 +275,14 @@ notified_alarms_dialog_new (void)
gtk_tree_view_column_set_attributes (column, renderer,
"markup", ALARM_DISPLAY_COLUMN, NULL);
-
+
gtk_tree_view_append_column (GTK_TREE_VIEW (an->treeview), column);
-
+
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (an->treeview));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
g_signal_connect (G_OBJECT (selection), "changed",
G_CALLBACK (tree_selection_changed_cb), an);
-
+
gtk_widget_realize (an->dialog);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->action_area), 12);
@@ -295,7 +295,7 @@ notified_alarms_dialog_new (void)
g_signal_connect (snooze_btn, "clicked", G_CALLBACK (snooze_pressed_cb), an);
g_signal_connect (G_OBJECT (an->dialog), "response", G_CALLBACK (dialog_response_cb), an);
g_signal_connect (G_OBJECT (an->dialog), "destroy", G_CALLBACK (dialog_destroyed_cb), an);
-
+
if (!GTK_WIDGET_REALIZED (an->dialog))
gtk_widget_realize (an->dialog);
icon_list = e_icon_factory_get_icon_list ("stock_alarm");
@@ -304,25 +304,25 @@ notified_alarms_dialog_new (void)
g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
g_list_free (icon_list);
}
-
+
/* Set callback for updating the snooze "minutes" label */
g_signal_connect (G_OBJECT (an->snooze_time_min), "value_changed",
G_CALLBACK (an_update_minutes_label), an);
-
+
/* Set callback for updating the snooze "hours" label */
g_signal_connect (G_OBJECT (an->snooze_time_hrs), "value_changed",
G_CALLBACK (an_update_hrs_label), an);
-
-
+
+
na = g_new0 (AlarmNotificationsDialog, 1);
na->treeview = an->treeview;
na->dialog = an->dialog;
-
+
return na;
}
-
-
+
+
/**
* add_alarm_to_notified_alarms_dialog:
* @na: Pointer to the dialog-info
@@ -341,9 +341,9 @@ notified_alarms_dialog_new (void)
*
* Return value: the iter in the treeview of the dialog
**/
-
-GtkTreeIter
-add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger,
+
+GtkTreeIter
+add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger,
time_t occur_start, time_t occur_end,
ECalComponentVType vtype, const char *summary,
const char *description, const char *location,
@@ -368,29 +368,29 @@ add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigge
funcinfo = g_new0 (AlarmFuncInfo, 1);
funcinfo->func = func;
funcinfo->func_data = func_data;
-
+
gtk_list_store_append (GTK_LIST_STORE(model), &iter);
current_zone = config_data_get_timezone ();
start = timet_to_str_with_zone (occur_start, current_zone);
end = timet_to_str_with_zone (occur_end, current_zone);
str_time = calculate_time (occur_start, occur_end);
- to_display = g_strdup_printf ("<big><b>%s</b></big>\n%s %s",
+ to_display = g_strdup_printf ("<big><b>%s</b></big>\n%s %s",
summary, start, str_time);
g_free (start);
g_free (end);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter,
+ gtk_list_store_set (GTK_LIST_STORE(model), &iter,
ALARM_DISPLAY_COLUMN, to_display, -1);
g_free (to_display);
g_free (str_time);
-
+
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_SUMMARY_COLUMN, summary, -1);
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_DESCRIPTION_COLUMN, description, -1);
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_LOCATION_COLUMN, location, -1);
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_START_COLUMN, occur_start, -1);
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_END_COLUMN, occur_end, -1);
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_FUNCINFO_COLUMN, funcinfo, -1);
-
+
return iter;
}
@@ -400,7 +400,7 @@ tree_selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
GtkTreeModel *model;
GtkTreeIter iter;
AlarmNotify *an = user_data;
-
+
if (gtk_tree_selection_get_selected (selection, &model, &iter))
{
gchar *summary, *description, *location;
@@ -413,17 +413,17 @@ tree_selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
gtk_tree_model_get (model, &iter, ALARM_START_COLUMN, &occur_start, -1);
gtk_tree_model_get (model, &iter, ALARM_END_COLUMN, &occur_end, -1);\
gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &an->cur_funcinfo, -1);
-
+
fill_in_labels (an, summary, description, location, occur_start, occur_end);
} else {
- gtk_widget_set_sensitive (an->snooze_btn, FALSE);
+ gtk_widget_set_sensitive (an->snooze_btn, FALSE);
}
}
-static void
-fill_in_labels (AlarmNotify *an, const gchar *summary, const gchar *description,
+static void
+fill_in_labels (AlarmNotify *an, const gchar *summary, const gchar *description,
const gchar *location, time_t occur_start, time_t occur_end)
{
GtkTextTagTable *table = gtk_text_tag_table_new ();
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.h b/calendar/gui/alarm-notify/alarm-notify-dialog.h
index fbfc64adc6..43bfb2c523 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.h
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.h
@@ -49,8 +49,8 @@ typedef void (* AlarmNotifyFunc) (AlarmNotifyResult result, int snooze_mins, gpo
AlarmNotificationsDialog *
notified_alarms_dialog_new (void);
-GtkTreeIter
-add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger,
+GtkTreeIter
+add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger,
time_t occur_start, time_t occur_end,
ECalComponentVType vtype, const char *summary,
const char *description, const char *location,
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index 9044f2d5d6..4d287c8cd2 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -40,7 +40,7 @@ struct _AlarmNotifyPrivate {
/* FIXME do we need per source type uri hashes? or perhaps we
just need to hash based on source */
GHashTable *uri_client_hash [E_CAL_SOURCE_TYPE_LAST];
- ESourceList *source_lists [E_CAL_SOURCE_TYPE_LAST];
+ ESourceList *source_lists [E_CAL_SOURCE_TYPE_LAST];
ESourceList *selected_calendars;
GMutex *mutex;
};
@@ -88,23 +88,23 @@ process_removal_in_hash (gpointer key, gpointer value, gpointer data)
ProcessRemovalsData *prd = data;
GSList *groups, *sources, *p, *q;
gboolean found = FALSE;
-
+
/* search the list of selected calendars */
groups = e_source_list_peek_groups (prd->source_list);
for (p = groups; p != NULL; p = p->next) {
ESourceGroup *group = E_SOURCE_GROUP (p->data);
-
+
sources = e_source_group_peek_sources (group);
for (q = sources; q != NULL; q = q->next) {
ESource *source = E_SOURCE (q->data);
char *source_uri;
const char *completion = e_source_get_property (source, "alarm");
-
+
source_uri = e_source_get_uri (source);
if (strcmp (source_uri, uri) == 0)
if (!completion || !g_ascii_strcasecmp (completion, "true"))
found = TRUE;
-
+
g_free (source_uri);
if (found)
@@ -128,7 +128,7 @@ list_changed_cb (ESourceList *source_list, gpointer data)
int i;
g_signal_handlers_block_by_func(source_list, list_changed_cb, data);
-
+
priv = an->priv;
/* Figure out the source type */
@@ -140,25 +140,25 @@ list_changed_cb (ESourceList *source_list, gpointer data)
}
if (source_type == E_CAL_SOURCE_TYPE_LAST)
return;
-
+
/* process the additions */
groups = e_source_list_peek_groups (source_list);
for (p = groups; p != NULL; p = p->next) {
ESourceGroup *group = E_SOURCE_GROUP (p->data);
-
+
sources = e_source_group_peek_sources (group);
for (q = sources; q != NULL; q = q->next) {
ESource *source = E_SOURCE (q->data);
char *uri;
const char *completion = e_source_get_property (source, "alarm");
-
- if (completion && (!g_ascii_strcasecmp (completion, "false") ||
+
+ if (completion && (!g_ascii_strcasecmp (completion, "false") ||
!g_ascii_strcasecmp (completion, "never")))
continue;
-
+
uri = e_source_get_uri (source);
if (!g_hash_table_lookup (priv->uri_client_hash[source_type], uri)) {
- d (printf("%s:%d (list_changed_cb) - Adding Calendar %s\n", __FILE__, __LINE__, uri));
+ d (printf("%s:%d (list_changed_cb) - Adding Calendar %s\n", __FILE__, __LINE__, uri));
alarm_notify_add_calendar (an, source_type, source, FALSE);
}
g_free (uri);
@@ -177,7 +177,7 @@ list_changed_cb (ESourceList *source_list, gpointer data)
}
g_list_free (prd.removals);
g_signal_handlers_unblock_by_func(source_list, list_changed_cb, data);
-
+
}
ESourceList *
@@ -194,7 +194,7 @@ load_calendars (AlarmNotify *an, ECalSourceType source_type)
GSList *groups, *sources, *p, *q;
priv = an->priv;
-
+
if (!e_cal_get_sources (&source_list, source_type, NULL)) {
d (printf("%s:%d (load_calendars) - Cannont get sources\n ", __FILE__, __LINE__));
priv->source_lists[source_type] = NULL;
@@ -205,22 +205,22 @@ load_calendars (AlarmNotify *an, ECalSourceType source_type)
groups = e_source_list_peek_groups (source_list);
for (p = groups; p != NULL; p = p->next) {
ESourceGroup *group = E_SOURCE_GROUP (p->data);
-
+
sources = e_source_group_peek_sources (group);
for (q = sources; q != NULL; q = q->next) {
ESource *source = E_SOURCE (q->data);
char *uri;
const char *completion = e_source_get_property (source, "alarm");
-
+
if (completion && (!g_ascii_strcasecmp (completion, "false") ||
- !g_ascii_strcasecmp (completion, "never")))
+ !g_ascii_strcasecmp (completion, "never")))
continue;
-
+
uri = e_source_get_uri (source);
- d (printf("%s:%d (load_calendars) - Loading Calendar %s \n", __FILE__, __LINE__, uri));
+ d (printf("%s:%d (load_calendars) - Loading Calendar %s \n", __FILE__, __LINE__, uri));
alarm_notify_add_calendar (an, source_type, source, FALSE);
g_free (uri);
-
+
}
}
@@ -241,7 +241,7 @@ alarm_notify_init (AlarmNotify *an, AlarmNotifyClass *klass)
priv->selected_calendars = config_data_get_calendars ("/apps/evolution/calendar/sources");
d (printf("%s:%d (alarm_notify_init) - Initing Alarm Notify\n", __FILE__, __LINE__));
-
+
for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++)
priv->uri_client_hash[i] = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
@@ -267,12 +267,12 @@ alarm_notify_finalize (GObject *object)
AlarmNotify *an;
AlarmNotifyPrivate *priv;
int i;
-
+
g_return_if_fail (object != NULL);
g_return_if_fail (IS_ALARM_NOTIFY (object));
-
+
d (printf("%s:%d (alarm_notify_finalize) - Finalize \n ", __FILE__, __LINE__));
-
+
an = ALARM_NOTIFY (object);
priv = an->priv;
@@ -345,8 +345,8 @@ static void
alarm_msg_received(EThread *e, EMsg *msg, void *data)
{
AlarmMsg *m = (AlarmMsg *)msg;
-
- d(printf("%s:%d (alarm_msg_received) - %p: Received at thread %" G_GINT64_MODIFIER "x\n", __FILE__, __LINE__, m, e_util_pthread_id(pthread_self())));
+
+ d(printf("%s:%d (alarm_msg_received) - %p: Received at thread %" G_GINT64_MODIFIER "x\n", __FILE__, __LINE__, m, e_util_pthread_id(pthread_self())));
if (m->receive_msg) {
m->receive_msg (e, m, data);
}
@@ -354,9 +354,9 @@ alarm_msg_received(EThread *e, EMsg *msg, void *data)
/**
* alarm_notify_new:
- *
+ *
* Creates a new #AlarmNotify object.
- *
+ *
* Return value: A newly-created #AlarmNotify, or NULL if its corresponding
* CORBA object could not be created.
**/
@@ -364,10 +364,10 @@ AlarmNotify *
alarm_notify_new (void)
{
AlarmNotify *an;
-
+
d (printf("%s:%d (alarm_notify_new) - Alarm Notify New \n ", __FILE__, __LINE__));
- /* Create a thread for alarm queue operation*/
+ /* Create a thread for alarm queue operation*/
alarm_channel_setup(&alarm_reply_port, &alarm_reply_channel, alarm_msgport_replied);
alarm_operation_thread = e_thread_new(E_THREAD_QUEUE);
@@ -378,7 +378,7 @@ alarm_notify_new (void)
an = g_object_new (TYPE_ALARM_NOTIFY,
"poa", bonobo_poa_get_threaded (ORBIT_THREAD_HINT_PER_REQUEST, NULL),
NULL);
-
+
return an;
}
@@ -389,9 +389,9 @@ cal_opened_cb (ECal *client, ECalendarStatus status, gpointer user_data)
AlarmNotify *an = ALARM_NOTIFY (user_data);
priv = an->priv;
-
+
d (printf("%s:%d (cal_opened_cb) %s - Calendar Status %d\n", __FILE__, __LINE__, e_cal_get_uri (client), status));
-
+
if (status == E_CALENDAR_STATUS_OK)
alarm_queue_add_client (client);
else {
@@ -408,7 +408,7 @@ cal_opened_cb (ECal *client, ECalendarStatus status, gpointer user_data)
* @uri: URI of the calendar to load.
* @load_afterwards: Whether this calendar should be loaded in the future
* when the alarm daemon starts up.
- *
+ *
* Tells the alarm notification service to load a calendar and start monitoring
* its alarms. It can optionally be made to save the URI of this calendar so
* that it can be loaded in the future when the alarm daemon starts up.
@@ -430,7 +430,7 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource
e_uri = e_uri_new (str_uri);
pass_key = e_uri_to_string (e_uri, FALSE);
e_uri_free (e_uri);
-
+
g_mutex_lock (an->priv->mutex);
/* See if we already know about this uri */
if (g_hash_table_lookup (priv->uri_client_hash[source_type], str_uri)) {
@@ -455,11 +455,11 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource
return;
}
}
-
+
client = auth_new_cal_from_source (source, source_type);
if (client) {
- d (printf("%s:%d (alarm_notify_add_calendar) %s - Calendar Open Async... %p\n", __FILE__, __LINE__, str_uri, client));
+ d (printf("%s:%d (alarm_notify_add_calendar) %s - Calendar Open Async... %p\n", __FILE__, __LINE__, str_uri, client));
g_hash_table_insert (priv->uri_client_hash[source_type], g_strdup (str_uri), client);
g_signal_connect (G_OBJECT (client), "cal_opened", G_CALLBACK (cal_opened_cb), an);
e_cal_open_async (client, FALSE);
@@ -474,7 +474,7 @@ alarm_notify_remove_calendar (AlarmNotify *an, ECalSourceType source_type, const
{
AlarmNotifyPrivate *priv;
ECal *client;
-
+
priv = an->priv;
client = g_hash_table_lookup (priv->uri_client_hash[source_type], str_uri);
diff --git a/calendar/gui/alarm-notify/alarm-notify.h b/calendar/gui/alarm-notify/alarm-notify.h
index 342dd1dba1..8d11367bca 100644
--- a/calendar/gui/alarm-notify/alarm-notify.h
+++ b/calendar/gui/alarm-notify/alarm-notify.h
@@ -47,7 +47,7 @@ struct _AlarmMsg {
void (*receive_msg)(EThread *e, struct _AlarmMsg *msg, void *data); /* message received */
void *data;
-
+
/* Private Usage */
struct _AlarmMsgPrivate *priv;
};
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 5a086266b8..e166791ade 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -173,7 +173,7 @@ static void query_objects_removed_cb (ECal *client, GList *objects, gpointer dat
static void remove_client_alarms (ClientAlarms *ca);
static void update_cqa (CompQueuedAlarms *cqa, ECalComponent *comp);
-static void update_qa (ECalComponentAlarms *alarms, QueuedAlarm *qa);
+static void update_qa (ECalComponentAlarms *alarms, QueuedAlarm *qa);
static void tray_list_remove_cqa (CompQueuedAlarms *cqa);
static void on_dialog_objs_removed_cb (ECal *client, GList *objects, gpointer data);
@@ -199,7 +199,7 @@ queue_midnight_refresh (void)
midnight = time_day_end_with_zone (time (NULL), zone);
d(printf("%s:%d (queue_midnight_refresh) - Refresh at %s \n",__FILE__, __LINE__, ctime(&midnight)));
-
+
midnight_refresh_id = alarm_add (midnight, midnight_refresh_cb, NULL, NULL);
if (!midnight_refresh_id) {
d(printf("%s:%d (queue_midnight_refresh) - Could not setup the midnight refresh alarm\n",__FILE__, __LINE__));
@@ -212,9 +212,9 @@ static void
add_client_alarms_cb (gpointer key, gpointer value, gpointer data)
{
ClientAlarms *ca = (ClientAlarms *)data;
-
+
d(printf("%s:%d (add_client_alarms_cb) - Adding %p\n",__FILE__, __LINE__, ca));
-
+
ca = value;
load_alarms_for_today (ca);
}
@@ -230,13 +230,13 @@ midnight_refresh_async (EThread *e, AlarmMsg *msg, void *data)
struct _midnight_refresh_msg *list = msg->data;
d(printf("%s:%d (midnight_refresh_async) \n",__FILE__, __LINE__));
-
+
/* Re-load the alarms for all clients */
g_hash_table_foreach (client_alarms_hash, add_client_alarms_cb, NULL);
/* Re-schedule the midnight update */
if (list->remove && midnight_refresh_id != NULL) {
- d(printf("%s:%d (midnight_refresh_async) - Reschedule the midnight update \n",__FILE__, __LINE__));
+ d(printf("%s:%d (midnight_refresh_async) - Reschedule the midnight update \n",__FILE__, __LINE__));
alarm_remove (midnight_refresh_id);
midnight_refresh_id = NULL;
}
@@ -249,7 +249,7 @@ midnight_refresh_cb (gpointer alarm_id, time_t trigger, gpointer data)
{
AlarmMsg *msg;
struct _midnight_refresh_msg *list;
-
+
/* These two structures will be freed by the msg destroy function*/
msg = malloc (sizeof (AlarmMsg));
msg->receive_msg = midnight_refresh_async;
@@ -420,7 +420,7 @@ alarm_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data)
#ifdef HAVE_LIBNOTIFY
popup_notification (trigger, cqa, alarm_id, TRUE);
#endif
- display_notification (trigger, cqa, alarm_id, TRUE);
+ display_notification (trigger, cqa, alarm_id, TRUE);
break;
case E_CAL_COMPONENT_ALARM_EMAIL:
@@ -462,13 +462,13 @@ add_component_alarms (ClientAlarms *ca, ECalComponentAlarms *alarms)
cqa->queued_alarms = NULL;
d(printf("%s:%d (add_component_alarms) - Creating CQA %p\n",__FILE__, __LINE__, cqa));
-
+
for (l = alarms->alarms; l; l = l->next) {
ECalComponentAlarmInstance *instance;
gpointer alarm_id;
QueuedAlarm *qa;
time_t tnow = time(NULL);
-
+
instance = l->data;
if (!has_known_notification (cqa->alarms->comp, instance->auid)) {
@@ -517,11 +517,11 @@ load_alarms (ClientAlarms *ca, time_t start, time_t end)
char *str_query, *iso_start, *iso_end;
d(printf("%s:%d (load_alarms) \n",__FILE__, __LINE__));
-
+
iso_start = isodate_from_time_t (start);
if (!iso_start)
return;
-
+
iso_end = isodate_from_time_t (end);
if (!iso_end) {
g_free (iso_start);
@@ -535,7 +535,7 @@ load_alarms (ClientAlarms *ca, time_t start, time_t end)
/* create the live query */
if (ca->query) {
- d(printf("%s:%d (load_alarms) - Disconnecting old queries \n",__FILE__, __LINE__));
+ d(printf("%s:%d (load_alarms) - Disconnecting old queries \n",__FILE__, __LINE__));
g_signal_handlers_disconnect_matched (ca->query, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, ca);
g_object_unref (ca->query);
ca->query = NULL;
@@ -546,7 +546,7 @@ load_alarms (ClientAlarms *ca, time_t start, time_t end)
g_warning (G_STRLOC ": Could not get query for client");
} else {
d(printf("%s:%d (load_alarms) - Setting Call backs \n",__FILE__, __LINE__));
-
+
g_signal_connect (G_OBJECT (ca->query), "objects_added",
G_CALLBACK (query_objects_changed_cb), ca);
g_signal_connect (G_OBJECT (ca->query), "objects_modified",
@@ -579,7 +579,7 @@ load_alarms_for_today (ClientAlarms *ca)
from = MAX (config_data_get_last_notification_time () + 1, day_start);
day_end = time_day_end_with_zone (now, zone);
- d(printf("%s:%d (load_alarms_for_today) - From %s to %s\n",__FILE__, __LINE__, ctime (&from), ctime(&day_end)));
+ d(printf("%s:%d (load_alarms_for_today) - From %s to %s\n",__FILE__, __LINE__, ctime (&from), ctime(&day_end)));
load_alarms (ca, from, day_end);
}
@@ -640,16 +640,16 @@ remove_comp (ClientAlarms *ca, ECalComponentId *id)
g_free (id->rid);
id->rid = NULL;
}
-
+
cqa = lookup_comp_queued_alarms (ca, id);
- if (!cqa)
+ if (!cqa)
return;
/* If a component is present, then it means we must have alarms queued
* for it.
*/
g_return_if_fail (cqa->queued_alarms != NULL);
-
+
d(printf("%s:%d (remove_comp) - Removing CQA %p\n",__FILE__, __LINE__, cqa));
remove_alarms (cqa, TRUE);
}
@@ -663,18 +663,18 @@ struct _query_msg {
gpointer data;
};
-static GList *
+static GList *
duplicate_ical (GList *in_list)
{
GList *l, *out_list = NULL;
for (l = in_list; l; l = l->next) {
out_list = g_list_prepend (out_list, icalcomponent_new_clone (l->data));
}
-
+
return g_list_reverse (out_list);
}
-static GList *
+static GList *
duplicate_ecal (GList *in_list)
{
GList *l, *out_list = NULL;
@@ -686,7 +686,7 @@ duplicate_ecal (GList *in_list)
id->rid = g_strdup (old->rid);
out_list = g_list_prepend (out_list, id);
}
-
+
return g_list_reverse (out_list);
}
@@ -703,11 +703,11 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
struct _query_msg *list = msg->data;
ECal *client;
GList *objects;
-
+
client = list->client;
ca = list->data;
objects = list->objects;
-
+
from = config_data_get_last_notification_time ();
if (from == -1)
from = time (NULL);
@@ -717,9 +717,9 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
zone = config_data_get_timezone ();
day_end = time_day_end_with_zone (time (NULL), zone);
-
+
d(printf("%s:%d (query_objects_changed_async) - Querying for object between %s to %s\n",__FILE__, __LINE__, ctime(&from), ctime(&day_end)));
-
+
for (l = objects; l != NULL; l = l->next) {
ECalComponentId *id;
GSList *sl;
@@ -753,7 +753,7 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
d(printf("%s:%d (query_objects_changed_async) - Alarm Already Exist for %s\n",__FILE__, __LINE__, id->uid));
/* if the alarms or the alarms list is empty remove it after updating the cqa structure */
if (alarms == NULL || alarms->alarms == NULL) {
-
+
/* update the cqa and its queued alarms for changes in summary and alarm_uid */
update_cqa (cqa, comp);
@@ -766,7 +766,7 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
remove_alarms (cqa, FALSE);
cqa->alarms = alarms;
cqa->queued_alarms = NULL;
-
+
/* add the new alarms */
for (sl = cqa->alarms->alarms; sl; sl = sl->next) {
ECalComponentAlarmInstance *instance;
@@ -782,7 +782,7 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
alarm_id = alarm_add (instance->trigger, alarm_trigger_cb, cqa, NULL);
if (!alarm_id) {
- d(printf("%s:%d (query_objects_changed_async) -Unable to schedule trigger for %s \n",__FILE__, __LINE__, ctime(&(instance->trigger))));
+ d(printf("%s:%d (query_objects_changed_async) -Unable to schedule trigger for %s \n",__FILE__, __LINE__, ctime(&(instance->trigger))));
continue;
}
@@ -790,11 +790,11 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
qa->alarm_id = alarm_id;
qa->instance = instance;
qa->snooze = FALSE;
- qa->orig_trigger = instance->trigger;
+ qa->orig_trigger = instance->trigger;
cqa->queued_alarms = g_slist_prepend (cqa->queued_alarms, qa);
d(printf("%s:%d (query_objects_changed_async) - Adding %p to queue \n",__FILE__, __LINE__, qa));
}
-
+
cqa->queued_alarms = g_slist_reverse (cqa->queued_alarms);
g_object_unref (comp);
comp = NULL;
@@ -817,7 +817,7 @@ query_objects_changed_cb (ECal *client, GList *objects, gpointer data)
list->data = data;
msg->data = list;
- d(printf("%s:%d (query_objects_changed_cb) - Posting a task\n",__FILE__, __LINE__));
+ d(printf("%s:%d (query_objects_changed_cb) - Posting a task\n",__FILE__, __LINE__));
e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
@@ -833,18 +833,18 @@ query_objects_removed_async (EThread *e, AlarmMsg *msg, void *data)
struct _query_msg *list = msg->data;
ECal *client;
GList *objects;
-
+
client = list->client;
ca = list->data;
objects = list->objects;
-
+
d(printf("%s:%d (query_objects_removed_async) - Removing %d objects\n",__FILE__, __LINE__, g_list_length(objects)));
-
- for (l = objects; l != NULL; l = l->next) {
+
+ for (l = objects; l != NULL; l = l->next) {
/* If the alarm is already triggered remove it. */
tray_list_remove_cqa (lookup_comp_queued_alarms (ca, l->data));
remove_comp (ca, l->data);
- g_hash_table_remove (ca->uid_alarms_hash, l->data);
+ g_hash_table_remove (ca->uid_alarms_hash, l->data);
e_cal_component_free_id (l->data);
}
@@ -864,10 +864,10 @@ query_objects_removed_cb (ECal *client, GList *objects, gpointer data)
list = malloc (sizeof (struct _query_msg));
list->client = client;
list->objects = duplicate_ecal (objects);
- list->data = data;
+ list->data = data;
msg->data = list;
- d(printf("%s:%d (query_objects_removed_cb) - Posting a task\n",__FILE__, __LINE__));
+ d(printf("%s:%d (query_objects_removed_cb) - Posting a task\n",__FILE__, __LINE__));
e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
@@ -916,7 +916,7 @@ edit_component (ECal *client, ECalComponent *comp)
GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode corba_type;
d(printf("%s:%d (edit_component) - Client %p\n",__FILE__, __LINE__, client));
-
+
e_cal_component_get_uid (comp, &uid);
uri = e_cal_get_uri (client);
@@ -939,9 +939,9 @@ edit_component (ECal *client, ECalComponent *comp)
corba_type = GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO;
break;
default:
- corba_type = GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT;
+ corba_type = GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT;
}
-
+
GNOME_Evolution_Calendar_CompEditorFactory_editExisting (factory, uri, (char *) uid, corba_type, &ev);
if (BONOBO_EX (&ev))
@@ -1001,7 +1001,7 @@ free_tray_icon_data (TrayIconData *tray_data)
g_object_unref (tray_data->comp);
tray_data->comp = NULL;
-
+
tray_data->cqa = NULL;
tray_data->alarm_id = NULL;
tray_data->tray_icon = NULL;
@@ -1021,11 +1021,11 @@ on_dialog_objs_removed_async (EThread *e, AlarmMsg *msg, void *data)
GList *objects;
d(printf("%s:%d (on_dialog_objs_removed_async)\n",__FILE__, __LINE__));
-
+
client = list->client;
tray_data = list->data;
objects = list->objects;
-
+
e_cal_component_get_uid (tray_data->comp, &our_uid);
g_return_if_fail (our_uid && *our_uid);
@@ -1061,7 +1061,7 @@ on_dialog_objs_removed_cb (ECal *client, GList *objects, gpointer data)
msg->data = list;
d(printf("%s:%d (on_dialog_objs_removed_cb) - Posting a task \n",__FILE__, __LINE__));
- e_thread_put(alarm_operation_thread, (EMsg *)msg);
+ e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
struct _tray_cqa_msg {
@@ -1076,12 +1076,12 @@ tray_list_remove_cqa_async(EThread *e, AlarmMsg *msg, void *data)
GList *list = tray_icons_list;
d(printf("%s:%d (tray_list_remove_cqa_async) - Removing CQA %p from tray list\n",__FILE__, __LINE__, cqa));
-
+
while (list) {
TrayIconData *tray_data = list->data;
GList *tmp = list;
GtkTreeModel *model;
-
+
list = list->next;
if (tray_data->cqa == cqa) {
d(printf("%s:%d (tray_list_remove_cqa_async) - Found.\n", __FILE__, __LINE__));
@@ -1093,9 +1093,9 @@ tray_list_remove_cqa_async(EThread *e, AlarmMsg *msg, void *data)
free_tray_icon_data (tray_data);
}
}
-
+
d(printf("%s:%d (tray_list_remove_cqa_async) - %d alarms left.\n", __FILE__, __LINE__, g_list_length (tray_icons_list)));
-
+
if (alarm_notifications_dialog) {
if (!g_list_length (tray_icons_list)) {
gtk_widget_destroy (alarm_notifications_dialog->dialog);
@@ -1140,11 +1140,11 @@ tray_list_remove_async(EThread *e, AlarmMsg *msg, void *data)
while (list != NULL) {
TrayIconData *tray_data = list->data;
-
+
if (!tray_data->snooze_set){
GList *temp = list->next;
gboolean status;
-
+
tray_icons_list = g_list_remove_link (tray_icons_list, list);
status = remove_queued_alarm (tray_data->cqa, tray_data->alarm_id, FALSE, TRUE);
if (status) {
@@ -1157,11 +1157,11 @@ tray_list_remove_async(EThread *e, AlarmMsg *msg, void *data)
g_list_free_1 (list);
if (tray_icons_list != list) /* List head is modified */
list = tray_icons_list;
- else
+ else
list = temp;
} else
list = list->next;
- }
+ }
}
static void
@@ -1190,7 +1190,7 @@ tray_list_remove_data_async(EThread *e, AlarmMsg *msg, void *data)
TrayIconData *tray_data = tmsg->data;
d(printf("%s:%d (tray_list_remove_data_async) - Removing %p from tray list\n",__FILE__, __LINE__, tray_data));
-
+
tray_icons_list = g_list_remove_all (tray_icons_list, tray_data);
free_tray_icon_data (tray_data);
tray_data = NULL;
@@ -1219,23 +1219,23 @@ notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data)
TrayIconData *tray_data = data;
d(printf("%s:%d (notify_dialog_cb) - Received from dialog\n",__FILE__, __LINE__));
-
+
g_signal_handlers_disconnect_matched (tray_data->query, G_SIGNAL_MATCH_FUNC,
0, 0, NULL, on_dialog_objs_removed_cb, NULL);
switch (result) {
case ALARM_NOTIFY_SNOOZE:
- d(printf("%s:%d (notify_dialog_cb) - Creating a snooze\n",__FILE__, __LINE__));
+ d(printf("%s:%d (notify_dialog_cb) - Creating a snooze\n",__FILE__, __LINE__));
create_snooze (tray_data->cqa, tray_data->alarm_id, snooze_mins);
tray_data->snooze_set = TRUE;
tray_list_remove_data (tray_data);
if (alarm_notifications_dialog) {
- GtkTreeSelection *selection =
+ GtkTreeSelection *selection =
gtk_tree_view_get_selection (
GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
GtkTreeIter iter;
GtkTreeModel *model = NULL;
-
+
/* We can` also use tray_data->iter */
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
@@ -1249,9 +1249,9 @@ notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data)
gtk_tree_selection_select_iter (selection, &iter);
}
}
-
+
}
-
+
break;
case ALARM_NOTIFY_EDIT:
@@ -1263,20 +1263,20 @@ notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data)
d(printf("%s:%d (notify_dialog_cb) - Dialog close\n",__FILE__, __LINE__));
if (alarm_notifications_dialog) {
GtkTreeIter iter;
- GtkTreeModel *model =
+ GtkTreeModel *model =
gtk_tree_view_get_model (
GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
gboolean valid = gtk_tree_model_get_iter_first (model, &iter);
-
- /* Maybe we should warn about this first? */
+
+ /* Maybe we should warn about this first? */
while (valid) {
valid = gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
}
-
+
gtk_widget_destroy (alarm_notifications_dialog->dialog);
g_free (alarm_notifications_dialog);
alarm_notifications_dialog = NULL;
-
+
/* Task to remove the tray icons */
tray_list_remove_icons ();
}
@@ -1309,14 +1309,14 @@ open_alarm_dialog (TrayIconData *tray_data)
if (!alarm_notifications_dialog)
alarm_notifications_dialog = notified_alarms_dialog_new ();
-
+
if (alarm_notifications_dialog) {
GtkTreeSelection *selection = NULL;
-
+
selection = gtk_tree_view_get_selection (
GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
-
+
tray_data->iter = add_alarm_to_notified_alarms_dialog (
alarm_notifications_dialog,
tray_data->trigger,
@@ -1327,11 +1327,11 @@ open_alarm_dialog (TrayIconData *tray_data)
tray_data->description,
tray_data->location,
notify_dialog_cb, tray_data);
-
+
gtk_tree_selection_select_iter (selection, &tray_data->iter);
}
-
+
}
return TRUE;
@@ -1341,25 +1341,25 @@ static gint
tray_icon_clicked_cb (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
{
if (event->type == GDK_BUTTON_PRESS) {
- d(printf("%s:%d (tray_icon_clicked_cb) - left click and %d alarms\n",__FILE__, __LINE__, g_list_length (tray_icons_list)));
+ d(printf("%s:%d (tray_icon_clicked_cb) - left click and %d alarms\n",__FILE__, __LINE__, g_list_length (tray_icons_list)));
if (event->button == 1 && g_list_length (tray_icons_list) > 0) {
GList *tmp;
for (tmp = tray_icons_list; tmp; tmp = tmp->next) {
open_alarm_dialog (tmp->data);
}
-
+
return TRUE;
} else if (event->button == 3) {
- d(printf("%s:%d (tray_icon_clicked_cb) - right click\n",__FILE__, __LINE__));
+ d(printf("%s:%d (tray_icon_clicked_cb) - right click\n",__FILE__, __LINE__));
if (tray_blink_id > -1)
g_source_remove (tray_blink_id);
tray_blink_id = -1;
-
-
+
+
gtk_status_icon_set_visible (tray_icon, FALSE);
g_object_unref (tray_icon);
- tray_icon = NULL;
+ tray_icon = NULL;
return TRUE;
}
}
@@ -1400,7 +1400,7 @@ tray_icon_blink_cb (gpointer data)
GdkPixbuf *pixbuf;
tray_blink_state = tray_blink_state == TRUE ? FALSE: TRUE;
-
+
pixbuf = e_icon_factory_get_icon (tray_blink_state == TRUE?
"stock_appointment-reminder-excl" :
"stock_appointment-reminder",
@@ -1420,7 +1420,7 @@ static void
tray_list_add_async (EThread *e, AlarmMsg *msg, void *data)
{
struct _tray_msg *list = msg->data;
- d(printf("%s:%d (tray_list_add_async) - Add %p\n",__FILE__, __LINE__, list->data));
+ d(printf("%s:%d (tray_list_add_async) - Add %p\n",__FILE__, __LINE__, list->data));
tray_icons_list = g_list_prepend (tray_icons_list, list->data);
}
@@ -1437,8 +1437,8 @@ tray_list_add_new (TrayIconData *data)
list = malloc (sizeof (struct _tray_msg));
list->data = data;
msg->data = list;
-
- d(printf("%s:%d (tray_list_add_new) - Posting a task\n",__FILE__, __LINE__));
+
+ d(printf("%s:%d (tray_list_add_new) - Posting a task\n",__FILE__, __LINE__));
e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
@@ -1458,15 +1458,15 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
ECalComponentOrganizer organiser;
d(printf("%s:%d (display_notification)\n",__FILE__, __LINE__));
-
+
comp = cqa->alarms->comp;
qa = lookup_queued_alarm (cqa, alarm_id);
if (!qa)
return;
-
+
/* get a sensible description for the event */
e_cal_component_get_summary (comp, &text);
- e_cal_component_get_organizer (comp, &organiser);
+ e_cal_component_get_organizer (comp, &organiser);
if (text.value)
summary = text.value;
@@ -1502,7 +1502,7 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
G_CALLBACK (popup_menu), NULL);
}
-
+
current_zone = config_data_get_timezone ();
alarm_str = timet_to_str_with_zone (trigger, current_zone);
start_str = timet_to_str_with_zone (qa->instance->occur_start, current_zone);
@@ -1578,17 +1578,17 @@ popup_notification (time_t trigger, CompQueuedAlarms *cqa,
char *body;
d(printf("%s:%d (popup_notification)\n",__FILE__, __LINE__));
-
+
comp = cqa->alarms->comp;
qa = lookup_queued_alarm (cqa, alarm_id);
if (!qa)
return;
if (!notify_is_initted ())
notify_init("Evolution Alarm Notify");
-
+
/* get a sensible description for the event */
e_cal_component_get_summary (comp, &text);
- e_cal_component_get_organizer (comp, &organiser);
+ e_cal_component_get_organizer (comp, &organiser);
if (text.value)
@@ -1620,12 +1620,12 @@ popup_notification (time_t trigger, CompQueuedAlarms *cqa,
if (location)
body = g_strdup_printf ("%s %s\n%s %s", _("Location:"), location, start_str, time_str);
else
- body = g_strdup_printf ("%s %s", start_str, time_str);
+ body = g_strdup_printf ("%s %s", start_str, time_str);
}
n = notify_notification_new (summary, body, "stock_appointment-reminder", NULL);
if (!notify_notification_show(n, NULL))
- g_warning ("Could not send notification to daemon\n");
+ g_warning ("Could not send notification to daemon\n");
/* create the private structure */
g_free (start_str);
@@ -1650,7 +1650,7 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa,
int flag = 0;
d(printf("%s:%d (audio_notification)\n",__FILE__, __LINE__));
-
+
comp = cqa->alarms->comp;
qa = lookup_queued_alarm (cqa, alarm_id);
if (!qa)
@@ -1691,7 +1691,7 @@ mail_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id)
/* FIXME */
d(printf("%s:%d (mail_notification)\n",__FILE__, __LINE__));
-
+
if (!e_cal_get_static_capability (cqa->parent_client->client,
CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS))
return;
@@ -1713,17 +1713,17 @@ mail_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id)
/* Performs notification of a procedure alarm */
static gboolean
-procedure_notification_dialog (const char *cmd, const char *url)
+procedure_notification_dialog (const char *cmd, const char *url)
{
GtkWidget *dialog, *label, *checkbox;
char *str;
int btn;
d(printf("%s:%d (procedure_notification_dialog)\n",__FILE__, __LINE__));
-
+
if (config_data_is_blessed_program (url))
return TRUE;
-
+
dialog = gtk_dialog_new_with_buttons (_("Warning"),
NULL, 0,
GTK_STOCK_NO, GTK_RESPONSE_CANCEL,
@@ -1746,7 +1746,7 @@ procedure_notification_dialog (const char *cmd, const char *url)
checkbox = gtk_check_button_new_with_label
(_("Do not ask me about this program again."));
gtk_widget_show (checkbox);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
checkbox, TRUE, TRUE, 4);
/* Run the dialog */
@@ -1771,7 +1771,7 @@ procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id
int result;
d(printf("%s:%d (procedure_notification)\n",__FILE__, __LINE__));
-
+
comp = cqa->alarms->comp;
qa = lookup_queued_alarm (cqa, alarm_id);
if (!qa)
@@ -1805,7 +1805,7 @@ procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id
result = 0;
if (procedure_notification_dialog (cmd, url))
result = gnome_execute_shell (NULL, cmd);
-
+
if (cmd != (char *) url)
g_free (cmd);
@@ -1831,14 +1831,14 @@ check_midnight_refresh (gpointer user_data)
icaltimezone *zone;
d(printf("%s:%d (check_midnight_refresh)\n",__FILE__, __LINE__));
-
+
zone = config_data_get_timezone ();
new_midnight = time_day_end_with_zone (time (NULL), zone);
if (new_midnight > midnight) {
AlarmMsg *msg;
struct _midnight_refresh_msg *list;
-
+
/* These two structures will be freed by the msg destroy function*/
msg = malloc (sizeof (AlarmMsg));
msg->receive_msg = midnight_refresh_async;
@@ -1850,7 +1850,7 @@ check_midnight_refresh (gpointer user_data)
msg->data = list;
d(printf("%s:%d (check_midnight_refresh) - Posting a task to refresh\n",__FILE__, __LINE__));
- e_thread_put(alarm_operation_thread, (EMsg *)msg);
+ e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
return TRUE;
@@ -1869,7 +1869,7 @@ alarm_queue_init (gpointer data)
g_return_if_fail (alarm_queue_inited == FALSE);
d(printf("%s:%d (alarm_queue_init)\n",__FILE__, __LINE__));
-
+
client_alarms_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
queue_midnight_refresh ();
@@ -1896,12 +1896,12 @@ free_client_alarms_cb (gpointer key, gpointer value, gpointer user_data)
ClientAlarms *ca = value;
d(printf("%s:%d (free_client_alarms_cb) - %p\n",__FILE__, __LINE__, ca));
-
+
if (ca) {
remove_client_alarms (ca);
if (ca->client) {
d(printf("%s:%d (free_client_alarms_cb) - Disconnecting Client \n",__FILE__, __LINE__));
-
+
g_signal_handlers_disconnect_matched (ca->client, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, ca);
g_object_unref (ca->client);
@@ -1909,7 +1909,7 @@ free_client_alarms_cb (gpointer key, gpointer value, gpointer user_data)
if (ca->query) {
d(printf("%s:%d (free_client_alarms_cb) - Disconnecting Query \n",__FILE__, __LINE__));
-
+
g_signal_handlers_disconnect_matched (ca->query, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, ca);
g_object_unref (ca->query);
@@ -1940,7 +1940,7 @@ alarm_queue_done (void)
g_return_if_fail (g_hash_table_size (client_alarms_hash) == 0);
d(printf("%s:%d (alarm_queue_done)\n",__FILE__, __LINE__));
-
+
g_hash_table_foreach_remove (client_alarms_hash, (GHRFunc) free_client_alarms_cb, NULL);
g_hash_table_destroy (client_alarms_hash);
client_alarms_hash = NULL;
@@ -1953,7 +1953,7 @@ alarm_queue_done (void)
alarm_queue_inited = FALSE;
}
-static gboolean
+static gboolean
compare_ids (gpointer a, gpointer b)
{
ECalComponentId *id, *id1;
@@ -1967,12 +1967,12 @@ compare_ids (gpointer a, gpointer b)
return g_str_equal (id->rid, id1->rid);
else if (!(id->rid && id1->rid))
return TRUE;
- }
+ }
}
return FALSE;
}
-static guint
+static guint
hash_ids (gpointer a)
{
ECalComponentId *id =a;
@@ -2002,7 +2002,7 @@ static void alarm_queue_add_async (EThread *e, AlarmMsg *msg, void *data)
}
d(printf("%s:%d (alarm_queue_add_async) - %p\n",__FILE__, __LINE__, client));
-
+
ca = g_new (ClientAlarms, 1);
ca->client = client;
@@ -2018,7 +2018,7 @@ static void alarm_queue_add_async (EThread *e, AlarmMsg *msg, void *data)
g_signal_connect (client, "cal_opened",
G_CALLBACK (cal_opened_cb),
ca);
- }
+ }
}
/**
@@ -2072,12 +2072,12 @@ static gboolean
remove_comp_by_id (gpointer key, gpointer value, gpointer userdata) {
ClientAlarms *ca = (ClientAlarms *)userdata;
-
+
d(printf("%s:%d (remove_comp_by_id)\n",__FILE__, __LINE__));
-
+
/* if (!g_hash_table_size (ca->uid_alarms_hash)) */
/* return; */
-
+
remove_cqa (ca, (ECalComponentId *)key, (CompQueuedAlarms *) value);
return TRUE;
@@ -2088,10 +2088,10 @@ remove_comp_by_id (gpointer key, gpointer value, gpointer userdata) {
static void
remove_client_alarms (ClientAlarms *ca)
{
- d(printf("%s:%d (remove_client_alarms) - size %d \n",__FILE__, __LINE__, g_hash_table_size (ca->uid_alarms_hash)));
+ d(printf("%s:%d (remove_client_alarms) - size %d \n",__FILE__, __LINE__, g_hash_table_size (ca->uid_alarms_hash)));
g_hash_table_foreach_remove (ca->uid_alarms_hash, (GHRFunc)remove_comp_by_id, ca);
-
+
/* The hash table should be empty now */
g_return_if_fail (g_hash_table_size (ca->uid_alarms_hash) == 0);
}
@@ -2122,7 +2122,7 @@ alarm_queue_remove_async (EThread *e, AlarmMsg *msg, void *data)
/* Clean up */
if (ca->client) {
d(printf("%s:%d (alarm_queue_remove_async) - Disconnecting Client \n",__FILE__, __LINE__));
-
+
g_signal_handlers_disconnect_matched (ca->client, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, ca);
g_object_unref (ca->client);
@@ -2131,7 +2131,7 @@ alarm_queue_remove_async (EThread *e, AlarmMsg *msg, void *data)
if (ca->query) {
d(printf("%s:%d (alarm_queue_remove_async) - Disconnecting Query \n",__FILE__, __LINE__));
-
+
g_signal_handlers_disconnect_matched (ca->query, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, ca);
g_object_unref (ca->query);
@@ -2176,9 +2176,9 @@ alarm_queue_remove_client (ECal *client, gboolean immediately)
e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
-/* Update non-time related variables for various structures on modification of an existing component
+/* Update non-time related variables for various structures on modification of an existing component
to be called only from query_objects_changed_cb */
-static void
+static void
update_cqa (CompQueuedAlarms *cqa, ECalComponent *newcomp)
{
ECalComponent *oldcomp;
@@ -2195,7 +2195,7 @@ update_cqa (CompQueuedAlarms *cqa, ECalComponent *newcomp)
to = time_day_end_with_zone (time (NULL), zone);
d(printf("%s:%d (update_cqa) - Generating alarms between %s and %s\n",__FILE__, __LINE__, ctime(&from), ctime(&to)));
- alarms = e_cal_util_generate_alarms_for_comp (newcomp, from, to, omit,
+ alarms = e_cal_util_generate_alarms_for_comp (newcomp, from, to, omit,
e_cal_resolve_tzid_cb, cqa->parent_client->client, zone);
/* Update auids in Queued Alarms*/
@@ -2208,14 +2208,14 @@ update_cqa (CompQueuedAlarms *cqa, ECalComponent *newcomp)
else {
if (e_cal_component_get_alarm (oldcomp, check_auid)) { /* Need to update QueuedAlarms */
if (alarms == NULL) {
- d(printf("%s:%d (update_cqa) - No alarms found in the modified component\n",__FILE__, __LINE__));
+ d(printf("%s:%d (update_cqa) - No alarms found in the modified component\n",__FILE__, __LINE__));
break;
}
update_qa (alarms, qa);
}
else
g_warning ("Failed in auid lookup for old component also\n");
- }
+ }
}
/* Update the actual component stored in CompQueuedAlarms structure */
@@ -2240,4 +2240,4 @@ update_qa (ECalComponentAlarms *alarms, QueuedAlarm *qa)
break;
}
}
-}
+}
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
index 38e0638ec8..5239812c99 100644
--- a/calendar/gui/alarm-notify/alarm.c
+++ b/calendar/gui/alarm-notify/alarm.c
@@ -145,13 +145,13 @@ setup_timeout (void)
* current time we timeout immediately */
diff = MAX (0, ar->trigger - time (NULL));
now = time (NULL);
-
+
/* Add the time out */
g_message ("Setting timeout for %d %lu %lu", diff, ar->trigger, now);
g_message (" %s", ctime (&ar->trigger));
g_message (" %s", ctime (&now));
timeout_id = g_timeout_add (diff * 1000, alarm_ready_cb, NULL);
-
+
}
/* Used from g_list_insert_sorted(); compares the trigger times of two AlarmRecord structures. */
@@ -175,7 +175,7 @@ queue_alarm (AlarmRecord *ar)
/* Track the current head of the list in case there are changes */
old_head = alarms;
- /* Insert the new alarm in order if the alarm's trigger time is
+ /* Insert the new alarm in order if the alarm's trigger time is
after the current time */
alarms = g_list_insert_sorted (alarms, ar, compare_alarm_by_time);
@@ -226,7 +226,7 @@ alarm_add (time_t trigger, AlarmFunction alarm_fn, gpointer data,
/**
* alarm_remove:
* @alarm: A queued alarm identifier.
- *
+ *
* Removes an alarm from the alarm queue.
**/
void
@@ -274,7 +274,7 @@ alarm_remove (gpointer alarm)
/**
* alarm_done:
- *
+ *
* Terminates the alarm timer mechanism. This should be called at the end of
* the program.
**/
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c
index c35d2b4a6c..e7120d4b38 100644
--- a/calendar/gui/alarm-notify/config-data.c
+++ b/calendar/gui/alarm-notify/config-data.c
@@ -101,10 +101,10 @@ config_data_get_calendars (const char *key)
ESourceList *cal_sources;
gboolean state;
GSList *gconf_list;
-
+
if (!inited)
conf_client = gconf_client_get_default ();
-
+
gconf_list = gconf_client_get_list (conf_client,
key,
GCONF_VALUE_STRING,
@@ -117,12 +117,12 @@ config_data_get_calendars (const char *key)
return cal_sources;
}
- state = gconf_client_get_bool (conf_client,
+ state = gconf_client_get_bool (conf_client,
"/apps/evolution/calendar/notify/notify_with_tray",
NULL);
if (!state) /* Should be old client*/ {
GSList *source;
- gconf_client_set_bool (conf_client,
+ gconf_client_set_bool (conf_client,
"/apps/evolution/calendar/notify/notify_with_tray",
TRUE,
NULL);
@@ -149,11 +149,11 @@ config_data_get_calendars (const char *key)
}
return cal_sources;
-
+
}
void
-config_data_replace_string_list (const char *key,
+config_data_replace_string_list (const char *key,
const char *old,
const char *new)
{
@@ -166,9 +166,9 @@ config_data_replace_string_list (const char *key,
key,
GCONF_VALUE_STRING,
NULL);
-
+
for (tmp = source; tmp; tmp = tmp->next) {
-
+
if (strcmp (tmp->data, old) == 0) {
gboolean state;
@@ -205,7 +205,7 @@ config_data_get_timezone (void)
ensure_inited ();
- location = gconf_client_get_string (conf_client,
+ location = gconf_client_get_string (conf_client,
"/apps/evolution/calendar/display/timezone",
NULL);
if (location && location[0]) {
@@ -246,7 +246,7 @@ config_data_get_notify_with_tray (void)
/**
* config_data_set_last_notification_time:
* @t: A time value.
- *
+ *
* Saves the last notification time so that it can be fetched the next time the
* alarm daemon is run. This way the daemon can show alarms that should have
* triggered while it was not running.
@@ -271,9 +271,9 @@ config_data_set_last_notification_time (time_t t)
/**
* config_data_get_last_notification_time:
- *
+ *
* Queries the last saved value for alarm notification times.
- *
+ *
* Return value: The last saved value, or -1 if no value had been saved before.
**/
time_t
@@ -295,7 +295,7 @@ config_data_get_last_notification_time (void)
/**
* config_data_save_blessed_program:
* @program: a program name
- *
+ *
* Saves a program name as "blessed"
**/
void
@@ -317,9 +317,9 @@ config_data_save_blessed_program (const char *program)
/**
* config_data_is_blessed_program:
* @program: a program name
- *
+ *
* Checks to see if a program is blessed
- *
+ *
* Return value: TRUE if program is blessed, FALSE otherwise
**/
gboolean
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c
index 3a87002c65..83c2421d38 100644
--- a/calendar/gui/alarm-notify/notify-main.c
+++ b/calendar/gui/alarm-notify/notify-main.c
@@ -78,7 +78,7 @@ save_session_cb (GnomeClient *client, GnomeSaveStyle save_style, gint shutdown,
args[1] = NULL;
gnome_client_set_restart_command (client, 1, args);
g_free (args[0]);
-
+
return TRUE;
}
@@ -157,7 +157,7 @@ main (int argc, char **argv)
init_session ();
/* FIXME Ideally we should not use camel libraries in calendar, though it is the case
- currently for attachments. Remove this once that is fixed.
+ currently for attachments. Remove this once that is fixed.
Initialise global camel_object_type */
camel_object_get_type();
diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c
index 7c498b79ef..d82d0e7ce6 100644
--- a/calendar/gui/cal-search-bar.c
+++ b/calendar/gui/cal-search-bar.c
@@ -65,7 +65,7 @@ enum {
SEARCH_COMMENT_CONTAINS,
SEARCH_LOCATION_CONTAINS,
SEARCH_ATTENDEE_CONTAINS
-
+
};
/* Comments are disabled because they are kind of useless right now, see bug 33247 */
@@ -164,7 +164,7 @@ cal_search_bar_class_init (CalSearchBarClass *klass)
klass->sexp_changed = NULL;
klass->category_changed = NULL;
- search_bar_class->search_activated = cal_search_bar_search_activated;
+ search_bar_class->search_activated = cal_search_bar_search_activated;
object_class->destroy = cal_search_bar_destroy;
}
@@ -217,13 +217,13 @@ cal_search_bar_destroy (GtkObject *object)
free_categories (priv->categories);
priv->categories = NULL;
}
-
+
if (priv->search_rule) {
g_object_unref (priv->search_rule);
priv->search_rule = NULL;
}
-
- /* FIXME
+
+ /* FIXME
if (priv->search_context) {
g_object_unref (priv->search_context);
priv->search_context = NULL;
@@ -232,7 +232,7 @@ cal_search_bar_destroy (GtkObject *object)
g_free (priv);
cal_search->priv = NULL;
}
-
+
if (GTK_OBJECT_CLASS (cal_search_bar_parent_class)->destroy)
(* GTK_OBJECT_CLASS (cal_search_bar_parent_class)->destroy) (object);
}
@@ -266,11 +266,11 @@ get_current_category (CalSearchBar *cal_search)
if (priv->view_flag == CAL_SEARCH_TASKS_DEFAULT)
i = viewid - CATEGORIES_TASKS_OFFSET;
- else if (priv->view_flag == CAL_SEARCH_MEMOS_DEFAULT)
+ else if (priv->view_flag == CAL_SEARCH_MEMOS_DEFAULT)
i = viewid - CATEGORIES_MEMOS_OFFSET;
else if (priv->view_flag == CAL_SEARCH_CALENDAR_DEFAULT)
i = viewid - CATEGORIES_CALENDAR_OFFSET;
-
+
if (i >= 0 && i < priv->categories->len)
return priv->categories->pdata[i];
else
@@ -296,7 +296,7 @@ get_show_option_sexp (CalSearchBar *cal_search)
if (viewid == CATEGORIES_UNMATCHED)
return g_strdup ("(has-categories? #f)"); /* Unfiled items */
- else if (viewid == CATEGORIES_ALL)
+ else if (viewid == CATEGORIES_ALL)
return NULL; /* All items */
switch (priv->view_flag) {
@@ -345,9 +345,9 @@ get_show_option_sexp (CalSearchBar *cal_search)
g_free (due);
return ret;
- } else if (viewid == COMPLETED_TASK)
+ } else if (viewid == COMPLETED_TASK)
return g_strdup ("(is-completed?)");
- else if (viewid == TASK_WITH_ATTACHMENT)
+ else if (viewid == TASK_WITH_ATTACHMENT)
return g_strdup ("(has-attachments?)");
break;
case CAL_SEARCH_CALENDAR_DEFAULT:
@@ -369,7 +369,7 @@ get_show_option_sexp (CalSearchBar *cal_search)
g_free (end);
return ret;
- } else if (viewid == N_DAY_APPOINTMENT) {
+ } else if (viewid == N_DAY_APPOINTMENT) {
start_range = time (NULL);
end_range = time_add_day (start_range, 7);
start = isodate_from_time_t (start_range);
@@ -415,17 +415,17 @@ notify_e_cal_view_contains (CalSearchBar *cal_search, const char *field, const c
if (text && *text) {
sexp = g_strdup_printf ("(contains? \"%s\" \"%s\")", field, text);
g_free (text);
- } else
+ } else
sexp = g_strdup ("(contains? \"summary\" \"\")"); /* Show all */
/* Apply the selected view on search */
- if (view && *view){
+ if (view && *view){
sexp = g_strconcat ("(and ",sexp, view, ")", NULL);
}
-
+
notify_sexp_changed (cal_search, sexp);
-
+
g_free (sexp);
}
@@ -463,7 +463,7 @@ regen_query (CalSearchBar *cal_search)
cal_search->priv->start = -1;
cal_search->priv->end = -1;
-
+
/* Get the selected view */
show_option_sexp = get_show_option_sexp (cal_search);
@@ -495,11 +495,11 @@ regen_query (CalSearchBar *cal_search)
out = g_string_new ("");
filter_rule_build_code (efb->current_query, out);
- if (show_option_sexp && *show_option_sexp)
+ if (show_option_sexp && *show_option_sexp)
sexp = g_strconcat ("(and ", out->str, show_option_sexp, ")", NULL);
-
+
notify_sexp_changed (cal_search, sexp ? sexp : out->str);
-
+
g_string_free (out, TRUE);
g_free(sexp);
break;
@@ -590,7 +590,7 @@ setup_category_options (CalSearchBar *cal_search, CALSearchBarItem *subitems, gi
}
index = i + offset;
}
-
+
subitems[index].search.id = -1; /* terminator */
subitems[index].search.text = NULL;
subitems[index].image = NULL;
@@ -604,7 +604,7 @@ make_suboptions (CalSearchBar *cal_search)
CalSearchBarPrivate *priv;
CALSearchBarItem *subitems = NULL;
GtkWidget *menu;
-
+
priv = cal_search->priv;
g_return_if_fail (priv->categories != NULL);
@@ -624,7 +624,7 @@ make_suboptions (CalSearchBar *cal_search)
subitems[1].search.id = CATEGORIES_UNMATCHED;
subitems[1].image = NULL;
- subitems[2].search.text = NULL;
+ subitems[2].search.text = NULL;
subitems[2].search.id = 0;
subitems[2].image = NULL;
@@ -650,7 +650,7 @@ make_suboptions (CalSearchBar *cal_search)
/* All the other items */
setup_category_options (cal_search, subitems, 8, CATEGORIES_TASKS_OFFSET);
-
+
menu = generate_viewoption_menu (subitems);
e_search_bar_set_viewoption_menu ((ESearchBar *)cal_search, menu);
@@ -686,15 +686,15 @@ make_suboptions (CalSearchBar *cal_search)
subitems[1].search.id = CATEGORIES_UNMATCHED;
subitems[1].image = NULL;
- subitems[2].search.text = NULL;
+ subitems[2].search.text = NULL;
subitems[2].search.id = 0;
subitems[2].image = NULL;
- subitems[3].search.text = _("Active Appointments");
+ subitems[3].search.text = _("Active Appointments");
subitems[3].search.id = ACTIVE_APPONTMENT;
subitems[3].image = NULL;
- subitems[4].search.text = _("Next 7 Days' Appointments");
+ subitems[4].search.text = _("Next 7 Days' Appointments");
subitems[4].search.id = N_DAY_APPOINTMENT;
subitems[4].image = NULL;
@@ -705,7 +705,7 @@ make_suboptions (CalSearchBar *cal_search)
e_search_bar_set_viewoption_menu ((ESearchBar *)cal_search, menu);
}
- if(subitems != NULL)
+ if(subitems != NULL)
g_free (subitems);
}
@@ -720,9 +720,9 @@ search_menu_activated (ESearchBar *esb, int id)
* cal_search_bar_construct:
* @cal_search: A calendar search bar.
* @flags: bitfield of items to appear in the search menu
- *
+ *
* Constructs a calendar search bar by binding its menu and option items.
- *
+ *
* Return value: The same value as @cal_search.
**/
CalSearchBar *
@@ -733,12 +733,12 @@ cal_search_bar_construct (CalSearchBar *cal_search, guint32 flags)
int i, j;
char *xmlfile = NULL;
char *userfile = NULL;
- FilterPart *part;
+ FilterPart *part;
RuleContext *search_context;
FilterRule *search_rule;
-
+
g_return_val_if_fail (IS_CAL_SEARCH_BAR (cal_search), NULL);
-
+
items = g_alloca ((G_N_ELEMENTS (search_option_items) + 1) * sizeof (ESearchBarItem));
for (i = 0, j = 0; i < G_N_ELEMENTS (search_option_items); i++, bit <<= 1) {
if ((flags & bit) != 0) {
@@ -748,7 +748,7 @@ cal_search_bar_construct (CalSearchBar *cal_search, guint32 flags)
j++;
}
}
-
+
items[j].text = NULL;
items[j].id = -1;
search_context = rule_context_new ();
@@ -773,16 +773,16 @@ cal_search_bar_construct (CalSearchBar *cal_search, guint32 flags)
g_object_set_data_full (G_OBJECT (search_context), "user", userfile, g_free);
g_object_set_data_full (G_OBJECT (search_context), "system", xmlfile, g_free);
- rule_context_load (search_context, xmlfile, userfile);
+ rule_context_load (search_context, xmlfile, userfile);
search_rule = filter_rule_new ();
part = rule_context_next_part (search_context, NULL);
-
+
if (part == NULL)
g_warning ("Could not load calendar search; no parts.");
- else
+ else
filter_rule_add_part (search_rule, filter_part_clone (part));
- e_filter_bar_new_construct (search_context, xmlfile, userfile, NULL, cal_search,
+ e_filter_bar_new_construct (search_context, xmlfile, userfile, NULL, cal_search,
(EFilterBar*) cal_search );
e_search_bar_set_menu ((ESearchBar *) cal_search, calendar_search_items);
@@ -795,16 +795,16 @@ cal_search_bar_construct (CalSearchBar *cal_search, guint32 flags)
g_free (xmlfile);
g_free (userfile);
-
+
return cal_search;
}
/**
* cal_search_bar_new:
* flags: bitfield of items to appear in the search menu
- *
+ *
* creates a new calendar search bar.
- *
+ *
* return value: a newly-created calendar search bar. you should connect to the
* "sexp_changed" signal to monitor changes in the generated sexps.
**/
@@ -854,7 +854,7 @@ sort_categories (GPtrArray *categories)
* cal_search_bar_set_categories:
* @cal_search: A calendar search bar.
* @categories: Array of pointers to strings for the category names.
- *
+ *
* Sets the list of categories that are to be shown in the drop-down list
* of a calendar search bar. The search bar will automatically add an item
* for "unfiled" components, that is, those that have no categories assigned
@@ -880,10 +880,10 @@ cal_search_bar_set_categories (CalSearchBar *cal_search, GPtrArray *categories)
/**
* cal_search_bar_get_category:
* @cal_search: A calendar search bar.
- *
+ *
* Queries the currently selected category name in a calendar search bar.
* If "All" or "Unfiled" are selected, this function will return NULL.
- *
+ *
* Return value: Name of the selected category, or NULL if there is no
* selected category.
**/
@@ -897,13 +897,13 @@ cal_search_bar_get_category (CalSearchBar *cal_search)
return category;
}
-void
+void
cal_search_bar_get_time_range (CalSearchBar *cal_search, time_t *start, time_t *end)
{
CalSearchBarPrivate *priv;
g_return_if_fail (IS_CAL_SEARCH_BAR (cal_search));
-
+
priv = cal_search->priv;
*start = priv->start;
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 7c6576bf2a..b4d46d358e 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -409,7 +409,7 @@ calendar_control_sensitize_calendar_commands (BonoboControl *control, GnomeCalen
if (bonobo_ui_component_get_container (uic) == CORBA_OBJECT_NIL)
return;
-
+
view = gnome_calendar_get_current_view_widget (gcal);
menu = gnome_calendar_get_calendar_menu (gcal);
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 6168988aad..607e199f81 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -82,16 +82,16 @@ static gint num_drag_types = sizeof(drag_types) / sizeof(drag_types[0]);
#define PARENT_TYPE bonobo_object_get_type ()
static BonoboObjectClass *parent_class = NULL;
-typedef struct
+typedef struct
{
ESourceList *source_list;
ESourceList *task_source_list;
ESourceList *memo_source_list;
-
+
GSList *source_selection;
GSList *task_source_selection;
GSList *memo_source_selection;
-
+
GnomeCalendar *calendar;
EInfoLabel *info_label;
@@ -106,7 +106,7 @@ typedef struct
EUserCreatableItemsHandler *creatable_items_handler;
EActivityHandler *activity_handler;
-
+
float vpane_pos;
} CalendarComponentView;
@@ -135,7 +135,7 @@ static void
calcomp_vpane_realized (GtkWidget *vpane, CalendarComponentView *view)
{
gtk_paned_set_position (GTK_PANED (vpane), (int)(view->vpane_pos*vpane->allocation.height));
-
+
}
static gboolean
@@ -190,7 +190,7 @@ ensure_sources (CalendarComponent *component)
group = E_SOURCE_GROUP (g->data);
- /* compare only file:// part. If user home dir name changes we do not want to create
+ /* compare only file:// part. If user home dir name changes we do not want to create
one more group */
if (!on_this_computer && !strncmp (base_uri_proto, e_source_group_peek_base_uri (group), 7))
@@ -225,11 +225,11 @@ ensure_sources (CalendarComponent *component)
homedir name changes */
if (strcmp (base_uri_proto, e_source_group_peek_base_uri (on_this_computer))) {
e_source_group_set_base_uri (on_this_computer, base_uri_proto);
-
+
/* *sigh* . We shouldn't need this sync call here as set_base_uri
call results in synching to gconf, but that happens in idle loop
and too late to prevent user seeing "Can not Open ... because of invalid uri" error.*/
- e_source_list_sync (source_list,NULL);
+ e_source_list_sync (source_list,NULL);
}
}
else {
@@ -247,7 +247,7 @@ ensure_sources (CalendarComponent *component)
/* Create the default Person addressbook */
personal_source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (on_this_computer, personal_source, -1);
-
+
calendars_selected = calendar_config_get_calendars_selected ();
if (!primary_calendar && !calendars_selected) {
GSList selected;
@@ -277,7 +277,7 @@ ensure_sources (CalendarComponent *component)
}
if (contacts) {
GSList *sources = e_source_group_peek_sources (contacts);
- if (sources)
+ if (sources)
birthdays_source = E_SOURCE (sources->data); /* There is only one source under Contacts Group*/
}
else {
@@ -299,7 +299,7 @@ ensure_sources (CalendarComponent *component)
if (!e_source_get_property (birthdays_source, "delete"))
e_source_set_property(birthdays_source, "delete", "no");
-
+
if (e_source_peek_color_spec (birthdays_source) == NULL)
e_source_set_color_spec (birthdays_source, "#DDBECE");
@@ -316,7 +316,7 @@ ensure_sources (CalendarComponent *component)
g_object_unref (personal_source);
if (birthdays_source)
g_object_unref (birthdays_source);
-
+
g_free (base_uri_proto);
g_free (base_uri);
}
@@ -328,10 +328,10 @@ static gboolean
is_in_selection (GSList *selection, ESource *source)
{
GSList *l;
-
+
for (l = selection; l; l = l->next) {
ESource *selected_source = l->data;
-
+
if (!strcmp (e_source_peek_uid (selected_source), e_source_peek_uid (source)))
return TRUE;
}
@@ -343,10 +343,10 @@ static gboolean
is_in_uids (GSList *uids, ESource *source)
{
GSList *l;
-
+
for (l = uids; l; l = l->next) {
const char *uid = l->data;
-
+
if (!strcmp (uid, e_source_peek_uid (source)))
return TRUE;
}
@@ -358,7 +358,7 @@ static void
update_uris_for_selection (CalendarComponentView *component_view)
{
GSList *selection, *l, *uids_selected = NULL;
-
+
selection = e_source_selector_get_selection (E_SOURCE_SELECTOR (component_view->source_selector));
for (l = component_view->source_selection; l; l = l->next) {
@@ -370,11 +370,11 @@ update_uris_for_selection (CalendarComponentView *component_view)
for (l = selection; l; l = l->next) {
ESource *selected_source = l->data;
-
+
if (gnome_calendar_add_source (component_view->calendar, E_CAL_SOURCE_TYPE_EVENT, selected_source))
uids_selected = g_slist_append (uids_selected, (char *) e_source_peek_uid (selected_source));
}
-
+
e_source_selector_free_selection (component_view->source_selection);
component_view->source_selection = selection;
@@ -416,10 +416,10 @@ update_selection (CalendarComponentView *component_view)
for (l = selection; l; l = l->next) {
ESource *source = l->data;
- if (!is_in_uids (uids_selected, source))
+ if (!is_in_uids (uids_selected, source))
e_source_selector_unselect_source (E_SOURCE_SELECTOR (component_view->source_selector), source);
}
-
+
e_source_selector_free_selection (selection);
/* Make sure the whole selection is there */
@@ -428,9 +428,9 @@ update_selection (CalendarComponentView *component_view)
ESource *source;
source = e_source_list_peek_source_by_uid (component_view->source_list, uid);
- if (source)
+ if (source)
e_source_selector_select_source (E_SOURCE_SELECTOR (component_view->source_selector), source);
-
+
g_free (uid);
}
g_slist_free (uids_selected);
@@ -463,7 +463,7 @@ update_task_memo_selection (CalendarComponentView *component_view, ECalSourceTyp
gnome_calendar_remove_source_by_uid (component_view->calendar, type, uid);
else if (!is_in_uids (uids_selected, source))
gnome_calendar_remove_source (component_view->calendar, type, source);
-
+
g_free (uid);
}
g_slist_free (source_selection);
@@ -495,7 +495,7 @@ update_primary_selection (CalendarComponentView *component_view)
source = e_source_list_peek_source_by_uid (component_view->source_list, uid);
g_free (uid);
}
-
+
if (source) {
e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector), source);
} else {
@@ -526,7 +526,7 @@ update_primary_task_memo_selection (CalendarComponentView *component_view, ECalS
g_free (uid);
}
-
+
if (source)
gnome_calendar_set_default_source (component_view->calendar, type, source);
}
@@ -537,7 +537,7 @@ copy_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data)
{
CalendarComponentView *component_view = data;
ESource *selected_source;
-
+
selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector));
if (!selected_source)
return;
@@ -575,7 +575,7 @@ delete_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data)
e_source_selector_unselect_source (E_SOURCE_SELECTOR (component_view->source_selector),
selected_source);
}
-
+
e_source_group_remove_source (e_source_peek_group (selected_source), selected_source);
e_source_list_sync (component_view->source_list, NULL);
}
@@ -622,7 +622,7 @@ popup_event_cb(ESourceSelector *selector, ESource *insource, GdkEventButton *eve
GSList *menus = NULL;
int i;
GtkMenu *menu;
-
+
/** @HookPoint-ECalPopup: Calendar Source Selector Context Menu
* @Id: org.gnome.evolution.calendar.source.popup
* @Class: org.gnome.evolution.calendar.popup:1.0
@@ -633,10 +633,10 @@ popup_event_cb(ESourceSelector *selector, ESource *insource, GdkEventButton *eve
ep = e_cal_popup_new("org.gnome.evolution.calendar.source.popup");
t = e_cal_popup_target_new_source(ep, selector);
t->target.widget = (GtkWidget *)component_view->calendar;
-
+
for (i=0;i<sizeof(ecc_source_popups)/sizeof(ecc_source_popups[0]);i++)
menus = g_slist_prepend(menus, &ecc_source_popups[i]);
-
+
e_popup_add_items((EPopup *)ep, menus, NULL, ecc_source_popup_free, component_view);
menu = e_popup_create_menu_once((EPopup *)ep, (EPopupTarget *)t, 0);
@@ -802,7 +802,7 @@ config_primary_selection_changed_cb (GConfClient *client, guint id, GConfEntry *
{
CalendarComponent *calendar_component = data;
CalendarComponentPrivate *priv = calendar_component->priv;
-
+
if (priv->create_ecal) {
g_object_unref (priv->create_ecal);
priv->create_ecal = NULL;
@@ -848,13 +848,13 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme
char *rid = NULL;
priv = calendar_component->priv;
-
+
l = g_list_last (priv->views);
if (!l)
return;
view = l->data;
-
+
if (!strncmp (uri, "calendar:", 9)) {
EUri *euri = e_uri_new (uri);
const char *p;
@@ -866,17 +866,17 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme
if (p) {
while (*p) {
len = strcspn (p, "=&");
-
+
/* If it's malformed, give up. */
if (p[len] != '=')
break;
-
+
header = (char *) p;
header[len] = '\0';
p += len + 1;
-
+
clen = strcspn (p, "&");
-
+
content = g_strndup (p, clen);
if (!g_ascii_strcasecmp (header, "startdate")) {
@@ -902,14 +902,14 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme
}
if (start != -1) {
-
+
if (end == -1)
end = start;
gnome_calendar_set_selected_time_range (view->calendar, start, end);
}
if (src_uid && uid)
gnome_calendar_edit_appointment (view->calendar, src_uid, uid, rid);
-
+
g_free (src_uid);
g_free (uid);
g_free (rid);
@@ -942,11 +942,11 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
}
static gboolean
-selector_tree_drag_drop (GtkWidget *widget,
- GdkDragContext *context,
- int x,
- int y,
- guint time,
+selector_tree_drag_drop (GtkWidget *widget,
+ GdkDragContext *context,
+ int x,
+ int y,
+ guint time,
CalendarComponent *component)
{
GtkTreeViewColumn *column;
@@ -956,12 +956,12 @@ selector_tree_drag_drop (GtkWidget *widget,
GtkTreeModel *model;
GtkTreeIter iter;
gpointer data;
-
- if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, &path,
+
+ if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, &path,
&column, &cell_x, &cell_y))
return FALSE;
-
-
+
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
if (!gtk_tree_model_get_iter (model, &iter, path)) {
@@ -970,17 +970,17 @@ selector_tree_drag_drop (GtkWidget *widget,
}
gtk_tree_model_get (model, &iter, 0, &data, -1);
-
+
if (E_IS_SOURCE_GROUP (data)) {
g_object_unref (data);
gtk_tree_path_free (path);
return FALSE;
}
-
+
gtk_tree_path_free (path);
return TRUE;
}
-
+
static gboolean
selector_tree_drag_motion (GtkWidget *widget,
GdkDragContext *context,
@@ -995,21 +995,21 @@ selector_tree_drag_motion (GtkWidget *widget,
GtkTreeModel *model;
GtkTreeIter iter;
GdkDragAction action = GDK_ACTION_DEFAULT;
-
+
if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
x, y, &path, &pos))
goto finish;
-
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
-
+
if (!gtk_tree_model_get_iter (model, &iter, path))
goto finish;
-
+
gtk_tree_model_get (model, &iter, 0, &data, -1);
if (E_IS_SOURCE_GROUP (data) || e_source_get_readonly (data))
goto finish;
-
+
gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget), path, GTK_TREE_VIEW_DROP_INTO_OR_BEFORE);
action = context->suggested_action;
@@ -1030,11 +1030,11 @@ update_single_object (ECal *client, icalcomponent *icalcomp)
icalcomponent *tmp_icalcomp;
uid = (char *) icalcomponent_get_uid (icalcomp);
-
+
if (e_cal_get_object (client, uid, NULL, &tmp_icalcomp, NULL))
return e_cal_modify_object (client, icalcomp, CALOBJ_MOD_ALL, NULL);
- return e_cal_create_object (client, icalcomp, &uid, NULL);
+ return e_cal_create_object (client, icalcomp, &uid, NULL);
}
static gboolean
@@ -1052,7 +1052,7 @@ update_objects (ECal *client, icalcomponent *icalcomp)
subcomp = icalcomponent_get_first_component (icalcomp, ICAL_ANY_COMPONENT);
while (subcomp) {
gboolean success;
-
+
kind = icalcomponent_isa (subcomp);
if (kind == ICAL_VTIMEZONE_COMPONENT) {
icaltimezone *zone;
@@ -1078,10 +1078,10 @@ update_objects (ECal *client, icalcomponent *icalcomp)
}
static void
-selector_tree_drag_data_received (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
+selector_tree_drag_data_received (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
GtkSelectionData *data,
guint info,
guint time,
@@ -1099,20 +1099,20 @@ selector_tree_drag_data_received (GtkWidget *widget,
if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
x, y, &path, &pos))
goto finish;
-
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
-
+
if (!gtk_tree_model_get_iter (model, &iter, path))
goto finish;
-
-
+
+
gtk_tree_model_get (model, &iter, 0, &source, -1);
if (E_IS_SOURCE_GROUP (source) || e_source_get_readonly (source))
goto finish;
icalcomp = icalparser_parse_string ((char *)data->data);
-
+
if (icalcomp) {
char * uid;
@@ -1122,18 +1122,18 @@ selector_tree_drag_data_received (GtkWidget *widget,
icalcomponent_set_uid (icalcomp, uid);
}
- client = auth_new_cal_from_source (source,
+ client = auth_new_cal_from_source (source,
E_CAL_SOURCE_TYPE_EVENT);
-
+
if (client) {
if (e_cal_open (client, TRUE, NULL)) {
success = TRUE;
update_objects (client, icalcomp);
}
-
+
g_object_unref (client);
}
-
+
icalcomponent_free (icalcomp);
}
@@ -1144,12 +1144,12 @@ selector_tree_drag_data_received (GtkWidget *widget,
gtk_tree_path_free (path);
gtk_drag_finish (context, success, context->action == GDK_ACTION_MOVE, time);
-}
+}
static void
selector_tree_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time, gpointer data)
{
- gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget),
+ gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget),
NULL, GTK_TREE_VIEW_DROP_BEFORE);
}
@@ -1161,57 +1161,57 @@ control_activate_cb (BonoboControl *control, gboolean activate, gpointer data)
if (activate) {
BonoboUIComponent *uic;
uic = bonobo_control_get_ui_component (component_view->view_control);
-
+
e_user_creatable_items_handler_activate (component_view->creatable_items_handler, uic);
- }
+ }
}
static void
config_create_ecal_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
+{
CalendarComponent *calendar_component = data;
CalendarComponentPrivate *priv;
-
+
priv = calendar_component->priv;
g_object_unref (priv->create_ecal);
priv->create_ecal = NULL;
-
+
priv->notifications = g_list_remove (priv->notifications, GUINT_TO_POINTER (id));
}
static ECal *
-setup_create_ecal (CalendarComponent *calendar_component, CalendarComponentView *component_view)
+setup_create_ecal (CalendarComponent *calendar_component, CalendarComponentView *component_view)
{
CalendarComponentPrivate *priv;
ESource *source = NULL;
char *uid;
guint not;
-
+
priv = calendar_component->priv;
/* Try to use the client from the calendar first to avoid re-opening things */
if (component_view) {
ECal *default_ecal;
-
+
default_ecal = gnome_calendar_get_default_client (component_view->calendar);
if (default_ecal)
return default_ecal;
}
-
+
/* If there is an existing fall back, use that */
if (priv->create_ecal)
- return priv->create_ecal;
+ return priv->create_ecal;
- /* Get the current primary calendar, or try to set one if it doesn't already exist */
+ /* Get the current primary calendar, or try to set one if it doesn't already exist */
uid = calendar_config_get_primary_calendar ();
if (uid) {
source = e_source_list_peek_source_by_uid (priv->source_list, uid);
g_free (uid);
priv->create_ecal = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT);
- }
+ }
if (!priv->create_ecal) {
/* Try to create a default if there isn't one */
@@ -1219,19 +1219,19 @@ setup_create_ecal (CalendarComponent *calendar_component, CalendarComponentView
if (source)
priv->create_ecal = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT);
}
-
+
if (priv->create_ecal) {
icaltimezone *zone;
-
+
zone = calendar_config_get_icaltimezone ();
e_cal_set_default_timezone (priv->create_ecal, zone, NULL);
if (!e_cal_open (priv->create_ecal, FALSE, NULL)) {
GtkWidget *dialog;
-
+
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
- _("Unable to open the calendar '%s' for creating events and meetings"),
+ _("Unable to open the calendar '%s' for creating events and meetings"),
e_source_peek_name (source));
gtk_dialog_run (GTK_DIALOG (dialog));
@@ -1244,7 +1244,7 @@ setup_create_ecal (CalendarComponent *calendar_component, CalendarComponentView
} else {
GtkWidget *dialog;
-
+
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
_("There is no calendar available for creating events and meetings"));
@@ -1252,10 +1252,10 @@ setup_create_ecal (CalendarComponent *calendar_component, CalendarComponentView
gtk_widget_destroy (dialog);
return NULL;
- }
+ }
/* Handle the fact it may change on us */
- not = calendar_config_add_notification_primary_calendar (config_create_ecal_changed_cb,
+ not = calendar_config_add_notification_primary_calendar (config_create_ecal_changed_cb,
calendar_component);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
@@ -1297,7 +1297,7 @@ create_new_event (CalendarComponent *calendar_component, CalendarComponentView *
e_comp_editor_registry_add (comp_editor_registry, COMP_EDITOR (editor), TRUE);
}
- return TRUE;
+ return TRUE;
}
static void
@@ -1307,18 +1307,18 @@ create_local_item_cb (EUserCreatableItemsHandler *handler, const char *item_type
CalendarComponentPrivate *priv;
CalendarComponentView *component_view = NULL;
GList *l;
-
+
priv = calendar_component->priv;
-
+
for (l = priv->views; l; l = l->next) {
component_view = l->data;
if (component_view->creatable_items_handler == handler)
break;
-
+
component_view = NULL;
}
-
+
if (strcmp (item_type_name, CREATE_EVENT_ID) == 0)
create_new_event (calendar_component, component_view, FALSE, FALSE);
else if (strcmp (item_type_name, CREATE_ALLDAY_EVENT_ID) == 0)
@@ -1338,12 +1338,12 @@ create_component_view (CalendarComponent *calendar_component)
GtkWidget *statusbar_widget;
guint not;
AtkObject *a11y;
-
+
priv = calendar_component->priv;
/* Create the calendar component view */
component_view = g_new0 (CalendarComponentView, 1);
-
+
vpane = gtk_vpaned_new ();
g_signal_connect_after (vpane, "realize",
G_CALLBACK(calcomp_vpane_realized), component_view);
@@ -1355,20 +1355,20 @@ create_component_view (CalendarComponent *calendar_component)
component_view->task_source_list = g_object_ref (priv->task_source_list);
component_view->memo_source_list = g_object_ref (priv->memo_source_list);
component_view->vpane_pos = calendar_config_get_tag_vpane_pos ();
-
+
/* Create sidebar selector */
component_view->source_selector = e_source_selector_new (calendar_component->priv->source_list);
e_source_selector_set_select_new ((ESourceSelector *)component_view->source_selector, TRUE);
a11y = gtk_widget_get_accessible (GTK_WIDGET (component_view->source_selector));
atk_object_set_name (a11y, _("Calendar Source Selector"));
- g_signal_connect (component_view->source_selector, "drag-motion", G_CALLBACK (selector_tree_drag_motion),
+ g_signal_connect (component_view->source_selector, "drag-motion", G_CALLBACK (selector_tree_drag_motion),
calendar_component);
- g_signal_connect (component_view->source_selector, "drag-leave", G_CALLBACK (selector_tree_drag_leave),
+ g_signal_connect (component_view->source_selector, "drag-leave", G_CALLBACK (selector_tree_drag_leave),
calendar_component);
- g_signal_connect (component_view->source_selector, "drag-drop", G_CALLBACK (selector_tree_drag_drop),
+ g_signal_connect (component_view->source_selector, "drag-drop", G_CALLBACK (selector_tree_drag_drop),
calendar_component);
- g_signal_connect (component_view->source_selector, "drag-data-received",
+ g_signal_connect (component_view->source_selector, "drag-data-received",
G_CALLBACK (selector_tree_drag_data_received), calendar_component);
gtk_drag_dest_set(component_view->source_selector, GTK_DEST_DEFAULT_ALL, drag_types,
@@ -1392,9 +1392,9 @@ create_component_view (CalendarComponent *calendar_component)
gtk_box_pack_start(GTK_BOX (vbox), GTK_WIDGET (component_view->info_label), FALSE, TRUE, 0);
gtk_box_pack_start(GTK_BOX (vbox), selector_scrolled_window, TRUE, TRUE, 0);
gtk_widget_show (vbox);
-
- gtk_paned_pack1 (GTK_PANED (vpane), vbox, FALSE, FALSE);
-
+
+ gtk_paned_pack1 (GTK_PANED (vpane), vbox, FALSE, FALSE);
+
component_view->sidebar_control = bonobo_control_new (vpane);
/* Create main view */
@@ -1404,15 +1404,15 @@ create_component_view (CalendarComponent *calendar_component)
return NULL;
}
-
+
component_view->calendar = (GnomeCalendar *) bonobo_control_get_widget (component_view->view_control);
- gtk_paned_pack2 (GTK_PANED (vpane), gnome_calendar_get_tag (component_view->calendar), FALSE, FALSE);
+ gtk_paned_pack2 (GTK_PANED (vpane), gnome_calendar_get_tag (component_view->calendar), FALSE, FALSE);
/* This signal is thrown if backends die - we update the selector */
- g_signal_connect (component_view->calendar, "source_added",
+ g_signal_connect (component_view->calendar, "source_added",
G_CALLBACK (source_added_cb), component_view);
- g_signal_connect (component_view->calendar, "source_removed",
+ g_signal_connect (component_view->calendar, "source_removed",
G_CALLBACK (source_removed_cb), component_view);
/* Create status bar */
@@ -1422,9 +1422,9 @@ create_component_view (CalendarComponent *calendar_component)
gtk_widget_show (statusbar_widget);
component_view->statusbar_control = bonobo_control_new (statusbar_widget);
-
+
gnome_calendar_set_activity_handler (component_view->calendar, component_view->activity_handler);
-
+
/* connect after setting the initial selections, or we'll get unwanted calls
to calendar_control_sensitize_calendar_commands */
g_signal_connect (component_view->source_selector, "selection_changed",
@@ -1444,7 +1444,7 @@ create_component_view (CalendarComponent *calendar_component)
G_CALLBACK (calendar_dates_changed_cb), component_view);
/* Load the selection from the last run */
- update_selection (component_view);
+ update_selection (component_view);
update_primary_selection (component_view);
update_task_memo_selection (component_view, E_CAL_SOURCE_TYPE_TODO);
update_primary_task_memo_selection (component_view, E_CAL_SOURCE_TYPE_TODO);
@@ -1453,19 +1453,19 @@ create_component_view (CalendarComponent *calendar_component)
/* If the tasks/memos selection changes elsewhere, update it for the mini
mini tasks view sidebar */
- not = calendar_config_add_notification_tasks_selected (config_tasks_selection_changed_cb,
+ not = calendar_config_add_notification_tasks_selected (config_tasks_selection_changed_cb,
component_view);
component_view->notifications = g_list_prepend (component_view->notifications, GUINT_TO_POINTER (not));
- not = calendar_config_add_notification_memos_selected (config_memos_selection_changed_cb,
+ not = calendar_config_add_notification_memos_selected (config_memos_selection_changed_cb,
component_view);
component_view->notifications = g_list_prepend (component_view->notifications, GUINT_TO_POINTER (not));
- not = calendar_config_add_notification_primary_tasks (config_primary_tasks_selection_changed_cb,
+ not = calendar_config_add_notification_primary_tasks (config_primary_tasks_selection_changed_cb,
component_view);
component_view->notifications = g_list_prepend (component_view->notifications, GUINT_TO_POINTER (not));
-
- not = calendar_config_add_notification_primary_memos (config_primary_memos_selection_changed_cb,
+
+ not = calendar_config_add_notification_primary_memos (config_primary_memos_selection_changed_cb,
component_view);
component_view->notifications = g_list_prepend (component_view->notifications, GUINT_TO_POINTER (not));
@@ -1474,21 +1474,21 @@ create_component_view (CalendarComponent *calendar_component)
static void
destroy_component_view (CalendarComponentView *component_view)
-{
+{
GList *l;
-
+
if (component_view->source_list)
g_object_unref (component_view->source_list);
if (component_view->task_source_list)
g_object_unref (component_view->task_source_list);
-
+
if (component_view->memo_source_list)
g_object_unref (component_view->memo_source_list);
if (component_view->source_selection)
e_source_selector_free_selection (component_view->source_selection);
-
+
for (l = component_view->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
g_list_free (component_view->notifications);
@@ -1518,12 +1518,12 @@ view_destroyed_cb (gpointer data, GObject *where_the_object_was)
CalendarComponent *calendar_component = data;
CalendarComponentPrivate *priv;
GList *l;
-
+
priv = calendar_component->priv;
for (l = priv->views; l; l = l->next) {
CalendarComponentView *component_view = l->data;
-
+
if (G_OBJECT (component_view->view_control) == where_the_object_was) {
priv->views = g_list_remove (priv->views, component_view);
destroy_component_view (component_view);
@@ -1542,7 +1542,7 @@ impl_createView (PortableServer_Servant servant,
CalendarComponentPrivate *priv;
CalendarComponentView *component_view;
EComponentView *ecv;
-
+
priv = calendar_component->priv;
/* Create the calendar component view */
@@ -1556,7 +1556,7 @@ impl_createView (PortableServer_Servant servant,
g_object_weak_ref (G_OBJECT (component_view->view_control), view_destroyed_cb, calendar_component);
priv->views = g_list_append (priv->views, component_view);
-
+
/* TODO: Make CalendarComponentView just subclass EComponentView */
ecv = e_component_view_new_controls (parent, "calendar", component_view->sidebar_control,
component_view->view_control, component_view->statusbar_control);
@@ -1619,7 +1619,7 @@ impl_requestCreateItem (PortableServer_Servant servant,
{
CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant));
gboolean result = FALSE;
-
+
if (strcmp (item_type_name, CREATE_EVENT_ID) == 0)
result = create_new_event (calendar_component, NULL, FALSE, FALSE);
else if (strcmp (item_type_name, CREATE_ALLDAY_EVENT_ID) == 0)
@@ -1644,7 +1644,7 @@ impl_dispose (GObject *object)
CalendarComponent *calendar_component = CALENDAR_COMPONENT (object);
CalendarComponentPrivate *priv = calendar_component->priv;
GList *l;
-
+
if (priv->source_list != NULL) {
g_object_unref (priv->source_list);
priv->source_list = NULL;
@@ -1662,12 +1662,12 @@ impl_dispose (GObject *object)
for (l = priv->views; l; l = l->next) {
CalendarComponentView *component_view = l->data;
-
+
g_object_weak_unref (G_OBJECT (component_view->view_control), view_destroyed_cb, calendar_component);
}
g_list_free (priv->views);
priv->views = NULL;
-
+
for (l = priv->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
g_list_free (priv->notifications);
@@ -1681,14 +1681,14 @@ impl_finalize (GObject *object)
{
CalendarComponentPrivate *priv = CALENDAR_COMPONENT (object)->priv;
GList *l;
-
+
for (l = priv->views; l; l = l->next) {
CalendarComponentView *component_view = l->data;
-
+
destroy_component_view (component_view);
}
g_list_free (priv->views);
-
+
g_free (priv->base_directory);
g_free (priv->config_directory);
g_free (priv);
@@ -1719,7 +1719,7 @@ calendar_component_init (CalendarComponent *component)
{
CalendarComponentPrivate *priv;
guint not;
-
+
priv = g_new0 (CalendarComponentPrivate, 1);
priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
@@ -1731,7 +1731,7 @@ calendar_component_init (CalendarComponent *component)
* calendar_component_peek_gconf_client(). */
priv->gconf_client = gconf_client_get_default ();
- not = calendar_config_add_notification_primary_calendar (config_primary_selection_changed_cb,
+ not = calendar_config_add_notification_primary_calendar (config_primary_selection_changed_cb,
component);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 46714ec324..e8cc126f5d 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -77,7 +77,7 @@ void
calendar_config_remove_notification (guint id)
{
calendar_config_init ();
-
+
gconf_client_notify_remove (config, id);
}
@@ -141,9 +141,9 @@ calendar_config_add_notification_calendars_selected (GConfClientNotifyFunc func,
guint id;
calendar_config_init ();
-
+
id = gconf_client_notify_add (config, CALENDAR_CONFIG_SELECTED_CALENDARS, func, data, NULL, NULL);
-
+
return id;
}
@@ -171,9 +171,9 @@ calendar_config_add_notification_primary_calendar (GConfClientNotifyFunc func, g
guint id;
calendar_config_init ();
-
+
id = gconf_client_notify_add (config, CALENDAR_CONFIG_PRIMARY_CALENDAR, func, data, NULL, NULL);
-
+
return id;
}
@@ -192,7 +192,7 @@ calendar_config_get_timezone (void)
static void
set_standard_offsets (icalcomponent *zone_comp, int offset)
{
- icalcomponent *dl_comp, *s_comp;
+ icalcomponent *dl_comp, *s_comp;
icalproperty *offset_from, *offset_to;
/* Set the offset of the standard component to all the daylight components also */
@@ -217,19 +217,19 @@ calendar_config_get_icaltimezone (void)
icaltimezone *zone = NULL;
calendar_config_init ();
-
+
location = calendar_config_get_timezone ();
if (location) {
icalcomponent *icalcomp, *dl_comp;
-
+
zone = icaltimezone_get_builtin_timezone (location);
icalcomp = icaltimezone_get_component (zone);
-
+
if (!(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT))) {
g_free (location);
return zone;
- }
+ }
if (!calendar_config_get_daylight_saving () && zone) {
icalcomponent *zone_comp, *s_comp;
@@ -237,7 +237,7 @@ calendar_config_get_icaltimezone (void)
icaltimezone *st_zone = NULL;
int offset;
char *n_tzid, *tzid;
-
+
tzid = icaltimezone_get_tzid (zone);
n_tzid = g_strconcat (tzid, "-(Standard)", NULL);
@@ -255,10 +255,10 @@ calendar_config_get_icaltimezone (void)
if (!s_comp) {
g_free (n_tzid);
icalcomponent_free (zone_comp);
- g_free (location);
+ g_free (location);
return zone;
}
-
+
offset_to = icalcomponent_get_first_property (s_comp, ICAL_TZOFFSETTO_PROPERTY);
offset = icalproperty_get_tzoffsetto (offset_to);
@@ -274,10 +274,10 @@ calendar_config_get_icaltimezone (void)
st_zone = icaltimezone_new ();
icaltimezone_set_component (st_zone, zone_comp);
-
+
zone = st_zone;
g_hash_table_insert (custom_zones, n_tzid, zone);
- }
+ }
g_free (location);
}
@@ -304,9 +304,9 @@ calendar_config_add_notification_timezone (GConfClientNotifyFunc func, gpointer
guint id;
calendar_config_init ();
-
+
id = gconf_client_notify_add (config, CALENDAR_CONFIG_TIMEZONE, func, data, NULL, NULL);
-
+
return id;
}
@@ -314,16 +314,16 @@ gboolean
calendar_config_get_daylight_saving (void)
{
calendar_config_init ();
-
+
return gconf_client_get_bool (config, CALENDAR_CONFIG_DAYLIGHT_SAVING, NULL);
-
+
}
void
calendar_config_set_daylight_saving (gboolean daylight_saving)
{
calendar_config_init ();
-
+
gconf_client_set_bool (config, CALENDAR_CONFIG_DAYLIGHT_SAVING, daylight_saving, NULL);
}
@@ -333,9 +333,9 @@ calendar_config_add_notification_daylight_saving (GConfClientNotifyFunc func, gp
guint id;
calendar_config_init ();
-
+
id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAYLIGHT_SAVING, func, data, NULL, NULL);
-
+
return id;
}
@@ -370,9 +370,9 @@ calendar_config_add_notification_24_hour_format (GConfClientNotifyFunc func, gpo
guint id;
calendar_config_init ();
-
+
id = gconf_client_notify_add (config, CALENDAR_CONFIG_24HOUR, func, data, NULL, NULL);
-
+
return id;
}
@@ -445,7 +445,7 @@ calendar_config_set_show_status (gboolean state)
}
/* Show timezone */
-gboolean
+gboolean
calendar_config_get_show_timezone (void)
{
calendar_config_init ();
@@ -453,22 +453,22 @@ calendar_config_get_show_timezone (void)
return gconf_client_get_bool (config, CALENDAR_CONFIG_SHOW_TIMEZONE, NULL);
}
-void
+void
calendar_config_set_show_timezone (gboolean status)
{
calendar_config_init ();
- gconf_client_set_bool (config, CALENDAR_CONFIG_SHOW_TIMEZONE, status, NULL);
+ gconf_client_set_bool (config, CALENDAR_CONFIG_SHOW_TIMEZONE, status, NULL);
}
-gboolean
+gboolean
calendar_config_get_show_categories (void)
{
calendar_config_init ();
return gconf_client_get_bool (config, CALENDAR_CONFIG_SHOW_CATEGORIES, NULL);
}
-void
+void
calendar_config_set_show_categories (gboolean status)
{
calendar_config_init ();
@@ -495,16 +495,16 @@ calendar_config_set_week_start_day (gint week_start_day)
gconf_client_set_int (config, CALENDAR_CONFIG_WEEK_START, week_start_day, NULL);
}
-guint
+guint
calendar_config_add_notification_week_start_day (GConfClientNotifyFunc func, gpointer data)
{
guint id;
calendar_config_init ();
-
+
id = gconf_client_notify_add (config, CALENDAR_CONFIG_WEEK_START, func, data, NULL, NULL);
-
- return id;
+
+ return id;
}
/* The start and end times of the work-day. */
@@ -525,16 +525,16 @@ calendar_config_set_day_start_hour (gint day_start_hour)
gconf_client_set_int (config, CALENDAR_CONFIG_DAY_START_HOUR, day_start_hour, NULL);
}
-guint
+guint
calendar_config_add_notification_day_start_hour (GConfClientNotifyFunc func, gpointer data)
{
guint id;
calendar_config_init ();
-
+
id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_START_HOUR, func, data, NULL, NULL);
-
- return id;
+
+ return id;
}
gint
@@ -554,16 +554,16 @@ calendar_config_set_day_start_minute (gint day_start_min)
gconf_client_set_int (config, CALENDAR_CONFIG_DAY_START_MINUTE, day_start_min, NULL);
}
-guint
+guint
calendar_config_add_notification_day_start_minute (GConfClientNotifyFunc func, gpointer data)
{
guint id;
calendar_config_init ();
-
+
id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_START_MINUTE, func, data, NULL, NULL);
-
- return id;
+
+ return id;
}
gint
@@ -583,16 +583,16 @@ calendar_config_set_day_end_hour (gint day_end_hour)
gconf_client_set_int (config, CALENDAR_CONFIG_DAY_END_HOUR, day_end_hour, NULL);
}
-guint
+guint
calendar_config_add_notification_day_end_hour (GConfClientNotifyFunc func, gpointer data)
{
guint id;
calendar_config_init ();
-
+
id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_END_HOUR, func, data, NULL, NULL);
-
- return id;
+
+ return id;
}
gint
@@ -612,16 +612,16 @@ calendar_config_set_day_end_minute (gint day_end_min)
gconf_client_set_int (config, CALENDAR_CONFIG_DAY_END_MINUTE, day_end_min, NULL);
}
-guint
+guint
calendar_config_add_notification_day_end_minute (GConfClientNotifyFunc func, gpointer data)
{
guint id;
-
+
calendar_config_init ();
id = gconf_client_notify_add (config, CALENDAR_CONFIG_DAY_END_MINUTE, func, data, NULL, NULL);
-
- return id;
+
+ return id;
}
/* The time divisions in the Day/Work-Week view in minutes (5/10/15/30/60). */
@@ -648,9 +648,9 @@ calendar_config_add_notification_time_divisions (GConfClientNotifyFunc func, gpo
guint id;
calendar_config_init ();
-
+
id = gconf_client_notify_add (config, CALENDAR_CONFIG_TIME_DIVISIONS, func, data, NULL, NULL);
-
+
return id;
}
@@ -704,15 +704,15 @@ calendar_config_set_dnav_show_week_no (gboolean show_week_no)
gconf_client_set_bool (config, CALENDAR_CONFIG_DN_SHOW_WEEK_NUMBERS, show_week_no, NULL);
}
-guint
+guint
calendar_config_add_notification_dnav_show_week_no (GConfClientNotifyFunc func, gpointer data)
{
guint id;
calendar_config_init ();
-
+
id = gconf_client_notify_add (config, CALENDAR_CONFIG_DN_SHOW_WEEK_NUMBERS, func, data, NULL, NULL);
-
+
return id;
}
@@ -854,11 +854,11 @@ guint
calendar_config_add_notification_tasks_selected (GConfClientNotifyFunc func, gpointer data)
{
guint id;
-
+
calendar_config_init ();
id = gconf_client_notify_add (config, CALENDAR_CONFIG_TASKS_SELECTED_TASKS, func, data, NULL, NULL);
-
+
return id;
}
@@ -884,11 +884,11 @@ guint
calendar_config_add_notification_primary_tasks (GConfClientNotifyFunc func, gpointer data)
{
guint id;
-
+
calendar_config_init ();
id = gconf_client_notify_add (config, CALENDAR_CONFIG_PRIMARY_TASKS, func, data, NULL, NULL);
-
+
return id;
}
@@ -932,11 +932,11 @@ guint
calendar_config_add_notification_memos_selected (GConfClientNotifyFunc func, gpointer data)
{
guint id;
-
+
calendar_config_init ();
id = gconf_client_notify_add (config, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, func, data, NULL, NULL);
-
+
return id;
}
@@ -962,11 +962,11 @@ guint
calendar_config_add_notification_primary_memos (GConfClientNotifyFunc func, gpointer data)
{
guint id;
-
+
calendar_config_init ();
id = gconf_client_notify_add (config, CALENDAR_CONFIG_PRIMARY_MEMOS, func, data, NULL, NULL);
-
+
return id;
}
/***************************************/
@@ -993,11 +993,11 @@ guint
calendar_config_add_notification_compress_weekend (GConfClientNotifyFunc func, gpointer data)
{
guint id;
-
+
calendar_config_init ();
id = gconf_client_notify_add (config, CALENDAR_CONFIG_COMPRESS_WEEKEND, func, data, NULL, NULL);
-
+
return id;
}
@@ -1023,11 +1023,11 @@ guint
calendar_config_add_notification_show_event_end (GConfClientNotifyFunc func, gpointer data)
{
guint id;
-
+
calendar_config_init ();
id = gconf_client_notify_add (config, CALENDAR_CONFIG_SHOW_EVENT_END, func, data, NULL, NULL);
-
+
return id;
}
@@ -1049,16 +1049,16 @@ calendar_config_set_working_days (CalWeekdays days)
gconf_client_set_int (config, CALENDAR_CONFIG_WORKING_DAYS, days, NULL);
}
-guint
+guint
calendar_config_add_notification_working_days (GConfClientNotifyFunc func, gpointer data)
{
guint id;
-
+
calendar_config_init ();
id = gconf_client_notify_add (config, CALENDAR_CONFIG_WORKING_DAYS , func, data, NULL, NULL);
-
- return id;
+
+ return id;
}
/* Settings to hide completed tasks. */
@@ -1079,16 +1079,16 @@ calendar_config_set_hide_completed_tasks (gboolean hide)
gconf_client_set_bool (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED, hide, NULL);
}
-guint
+guint
calendar_config_add_notification_hide_completed_tasks (GConfClientNotifyFunc func, gpointer data)
{
guint id;
-
+
calendar_config_init ();
id = gconf_client_notify_add (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED , func, data, NULL, NULL);
-
- return id;
+
+ return id;
}
CalUnits
@@ -1137,16 +1137,16 @@ calendar_config_set_hide_completed_tasks_units (CalUnits cu)
g_free (units);
}
-guint
+guint
calendar_config_add_notification_hide_completed_tasks_units (GConfClientNotifyFunc func, gpointer data)
{
guint id;
-
+
calendar_config_init ();
id = gconf_client_notify_add (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_UNITS , func, data, NULL, NULL);
-
- return id;
+
+ return id;
}
gint
@@ -1166,16 +1166,16 @@ calendar_config_set_hide_completed_tasks_value (gint value)
gconf_client_set_int (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_VALUE, value, NULL);
}
-guint
+guint
calendar_config_add_notification_hide_completed_tasks_value (GConfClientNotifyFunc func, gpointer data)
{
guint id;
-
+
calendar_config_init ();
id = gconf_client_notify_add (config, CALENDAR_CONFIG_TASKS_HIDE_COMPLETED_VALUE , func, data, NULL, NULL);
-
- return id;
+
+ return id;
}
/**
@@ -1514,7 +1514,7 @@ calendar_config_set_default_reminder_units (CalUnits units)
/**
* calendar_config_get_hide_completed_tasks_sexp:
*
- * @get_completed: Whether to form subexpression that
+ * @get_completed: Whether to form subexpression that
* gets completed or not completed tasks.
* Returns the subexpression to use to filter out completed tasks according
* to the config settings. The returned sexp should be freed.
@@ -1594,18 +1594,18 @@ calendar_config_set_free_busy_template (const gchar *template)
gconf_client_set_string (config, CALENDAR_CONFIG_TEMPLATE, template, NULL);
}
-guint
-calendar_config_add_notification_free_busy_template (GConfClientNotifyFunc func,
+guint
+calendar_config_add_notification_free_busy_template (GConfClientNotifyFunc func,
gpointer data)
{
guint id;
-
+
calendar_config_init ();
- id = gconf_client_notify_add (config, CALENDAR_CONFIG_TEMPLATE, func, data,
+ id = gconf_client_notify_add (config, CALENDAR_CONFIG_TEMPLATE, func, data,
NULL, NULL);
-
- return id;
+
+ return id;
}
void
diff --git a/calendar/gui/calendar-config.h b/calendar/gui/calendar-config.h
index ec7d3dee16..5e0dbc9059 100644
--- a/calendar/gui/calendar-config.h
+++ b/calendar/gui/calendar-config.h
@@ -246,7 +246,7 @@ void calendar_config_set_free_busy (GSList * url_list);
gchar *calendar_config_get_free_busy_template (void);
void calendar_config_set_free_busy_template (const gchar *template);
-guint calendar_config_add_notification_free_busy_template (GConfClientNotifyFunc func,
+guint calendar_config_add_notification_free_busy_template (GConfClientNotifyFunc func,
gpointer data);
/* Shows the timezone dialog if the user hasn't set a default timezone. */
diff --git a/calendar/gui/calendar-view-factory.c b/calendar/gui/calendar-view-factory.c
index 563803ae5d..262fe3dd00 100644
--- a/calendar/gui/calendar-view-factory.c
+++ b/calendar/gui/calendar-view-factory.c
@@ -171,10 +171,10 @@ calendar_view_factory_new_view (GalViewFactory *factory, const char *name)
* calendar_view_factory_construct:
* @cal_view_factory: A calendar view factory.
* @view_type: Type of calendar views that the factory will create.
- *
+ *
* Constructs a calendar view factory by setting the type of views it will
* create.
- *
+ *
* Return value: The same value as @cal_view_factory.
**/
CalendarViewFactory *
@@ -196,9 +196,9 @@ calendar_view_factory_construct (CalendarViewFactory *cal_view_factory,
/**
* calendar_view_factory_new:
* @view_type: Type of calendar views that the factory will create.
- *
+ *
* Creates a new factory for calendar views.
- *
+ *
* Return value: A newly-created calendar view factory.
**/
CalendarViewFactory *
diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c
index e75a81052b..ea59c70fd1 100644
--- a/calendar/gui/calendar-view.c
+++ b/calendar/gui/calendar-view.c
@@ -207,9 +207,9 @@ calendar_view_clone (GalView *view)
* @cal_view: A calendar view.
* @view_type: The type of calendar view that this object will represent.
* @title: Title for the view.
- *
+ *
* Constructs a calendar view by setting its view type and title.
- *
+ *
* Return value: The same value as @cal_view.
**/
CalendarView *
@@ -235,9 +235,9 @@ calendar_view_construct (CalendarView *cal_view,
* calendar_view_new:
* @view_type: The type of calendar view that this object will represent.
* @title: Title for the view.
- *
+ *
* Creates a new calendar view object.
- *
+ *
* Return value: A newly-created calendar view.
**/
CalendarView *
@@ -252,9 +252,9 @@ calendar_view_new (GnomeCalendarViewType view_type, const char *title)
/**
* calendar_view_get_view_type:
* @cal_view: A calendar view.
- *
+ *
* Queries the calendar view type of a calendar view.
- *
+ *
* Return value: Type of calendar view.
**/
GnomeCalendarViewType
diff --git a/calendar/gui/comp-editor-factory.c b/calendar/gui/comp-editor-factory.c
index dd508987d4..a7f6a3b493 100644
--- a/calendar/gui/comp-editor-factory.c
+++ b/calendar/gui/comp-editor-factory.c
@@ -71,7 +71,7 @@ typedef struct {
/* Client of the calendar */
ECal *client;
-
+
/* Count editors using this client */
int editor_count;
@@ -245,16 +245,16 @@ edit_existing (OpenClient *oc, const char *uid)
return;
}
-
+
comp = e_cal_component_new ();
if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
g_object_unref (comp);
icalcomponent_free (icalcomp);
return;
}
-
+
/* Create the appropriate type of editor */
-
+
vtype = e_cal_component_get_vtype (comp);
if (itip_organizer_is_user (comp, oc->client))
flags |= COMP_EDITOR_USER_ORG;
@@ -264,7 +264,7 @@ edit_existing (OpenClient *oc, const char *uid)
case E_CAL_COMPONENT_EVENT:
if (e_cal_component_has_attendees (comp))
flags |= COMP_EDITOR_MEETING;
-
+
editor = COMP_EDITOR (event_editor_new (oc->client, flags));
break;
@@ -292,7 +292,7 @@ static ECalComponent *
get_default_task (ECal *client)
{
ECalComponent *comp;
-
+
comp = cal_comp_task_new_with_defaults (client);
return comp;
@@ -304,7 +304,7 @@ edit_new (OpenClient *oc, const GNOME_Evolution_Calendar_CompEditorFactory_CompE
{
ECalComponent *comp;
CompEditor *editor;
-
+
switch (type) {
case GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT:
editor = COMP_EDITOR (event_editor_new (oc->client, FALSE));
@@ -540,7 +540,7 @@ impl_editExisting (PortableServer_Servant servant,
OpenClient *oc;
CompEditor *editor;
ECalSourceType source_type;
-
+
factory = COMP_EDITOR_FACTORY (bonobo_object_from_servant (servant));
switch (corba_type) {
@@ -550,7 +550,7 @@ impl_editExisting (PortableServer_Servant servant,
default:
source_type = E_CAL_SOURCE_TYPE_EVENT;
}
-
+
oc = lookup_open_client (factory, source_type, str_uri, ev);
if (!oc)
return;
@@ -594,7 +594,7 @@ impl_editNew (PortableServer_Servant servant,
CompEditorFactory *factory;
OpenClient *oc;
ECalSourceType source_type;
-
+
factory = COMP_EDITOR_FACTORY (bonobo_object_from_servant (servant));
switch (corba_type) {
@@ -619,9 +619,9 @@ impl_editNew (PortableServer_Servant servant,
/**
* comp_editor_factory_new:
- *
+ *
* Creates a new calendar component editor factory.
- *
+ *
* Return value: A newly-created component editor factory.
**/
CompEditorFactory *
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index 0be96dbefa..07d06a8f19 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -37,7 +37,7 @@
* cal_comp_util_add_exdate:
* @comp: A calendar component object.
* @itt: Time for the exception.
- *
+ *
* Adds an exception date to the current list of EXDATE properties in a calendar
* component object.
**/
@@ -85,7 +85,7 @@ e_cal_component_compare_tzid (const char *tzid1, const char *tzid2)
* cal_comp_util_compare_event_timezones:
* @comp: A calendar component object.
* @client: A #ECal.
- *
+ *
* Checks if the component uses the given timezone for both the start and
* the end time, or if the UTC offsets of the start and end times are the same
* as in the given zone.
@@ -191,14 +191,14 @@ cal_comp_util_compare_event_timezones (ECalComponent *comp,
* @comp: A calendar component.
* @client: Calendar client where the component purportedly lives.
* @widget: Widget to be used as the basis for UTF8 conversion.
- *
+ *
* Assumming a calendar component with an empty SUMMARY property (as per
* string_is_empty()), asks whether the user wants to delete it based on
* whether the appointment is on the calendar server or not. If the
* component is on the server, this function will present a confirmation
* dialog and delete the component if the user tells it to. If the component
* is not on the server it will just return TRUE.
- *
+ *
* Return value: A result code indicating whether the component
* was not on the server and is to be deleted locally, whether it
* was on the server and the user deleted it, or whether the
@@ -223,7 +223,7 @@ cal_comp_is_on_server (ECalComponent *comp, ECal *client)
* the user.
*/
e_cal_component_get_uid (comp, &uid);
-
+
/*TODO We should not be checking for this here. But since e_cal_util_construct_instance does not
create the instances of all day events, so we dafault to old behaviour */
if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) {
@@ -246,10 +246,10 @@ cal_comp_is_on_server (ECalComponent *comp, ECal *client)
/**
* cal_comp_event_new_with_defaults:
- *
+ *
* Creates a new VEVENT component and adds any default alarms to it as set in
* the program's configuration values.
- *
+ *
* Return value: A newly-created calendar component.
**/
ECalComponent *
@@ -272,7 +272,7 @@ cal_comp_event_new_with_defaults (ECal *client)
e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_EVENT);
}
-
+
if (!calendar_config_get_use_default_reminder ())
return comp;
@@ -303,11 +303,11 @@ cal_comp_event_new_with_defaults (ECal *client)
trigger.u.rel_duration.minutes = interval;
break;
- case CAL_HOURS:
+ case CAL_HOURS:
trigger.u.rel_duration.hours = interval;
break;
- case CAL_DAYS:
+ case CAL_DAYS:
trigger.u.rel_duration.days = interval;
break;
@@ -324,7 +324,7 @@ cal_comp_event_new_with_defaults (ECal *client)
}
ECalComponent *
-cal_comp_event_new_with_current_time (ECal *client, gboolean all_day)
+cal_comp_event_new_with_current_time (ECal *client, gboolean all_day)
{
ECalComponent *comp;
struct icaltimetype itt;
@@ -334,23 +334,23 @@ cal_comp_event_new_with_current_time (ECal *client, gboolean all_day)
comp = cal_comp_event_new_with_defaults (client);
g_return_val_if_fail (comp, NULL);
-
+
zone = calendar_config_get_icaltimezone ();
if (all_day) {
itt = icaltime_from_timet_with_zone (time (NULL), 1, zone);
dt.value = &itt;
dt.tzid = icaltimezone_get_tzid (zone);
-
+
e_cal_component_set_dtstart (comp, &dt);
- e_cal_component_set_dtend (comp, &dt);
+ e_cal_component_set_dtend (comp, &dt);
} else {
itt = icaltime_current_time_with_zone (zone);
icaltime_adjust (&itt, 0, 1, -itt.minute, -itt.second);
-
+
dt.value = &itt;
dt.tzid = icaltimezone_get_tzid (zone);
-
+
e_cal_component_set_dtstart (comp, &dt);
icaltime_adjust (&itt, 0, 1, 0, 0);
e_cal_component_set_dtend (comp, &dt);
@@ -367,7 +367,7 @@ cal_comp_task_new_with_defaults (ECal *client)
if (!e_cal_get_default_object (client, &icalcomp, NULL))
icalcomp = icalcomponent_new (ICAL_VTODO_COMPONENT);
-
+
comp = e_cal_component_new ();
if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
icalcomponent_free (icalcomp);
@@ -386,7 +386,7 @@ cal_comp_memo_new_with_defaults (ECal *client)
if (!e_cal_get_default_object (client, &icalcomp, NULL))
icalcomp = icalcomponent_new (ICAL_VJOURNAL_COMPONENT);
-
+
comp = e_cal_component_new ();
if (!e_cal_component_set_icalcomponent (comp, icalcomp)) {
icalcomponent_free (icalcomp);
@@ -400,7 +400,7 @@ cal_comp_memo_new_with_defaults (ECal *client)
/**
* cal_comp_util_get_n_icons:
* @comp: A calendar component object.
- *
+ *
* Get the number of icons owned by the component.
*
* Returns: the number of icons owned by the component.
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index 342f8be472..7267c29380 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -71,7 +71,7 @@ typedef struct {
/* The client */
ECal *ecal;
-
+
/* Toplevel */
GtkWidget *toplevel;
@@ -89,7 +89,7 @@ typedef struct {
GtkWidget *repeat_unit;
GtkWidget *option_notebook;
-
+
/* Display alarm widgets */
GtkWidget *dalarm_group;
GtkWidget *dalarm_message;
@@ -212,7 +212,7 @@ alarm_to_dialog (Dialog *dialog)
gboolean repeat;
ECalComponentAlarmAction action;
char *email;
- int i;
+ int i;
/* Clean the page */
clear_widgets (dialog);
@@ -232,7 +232,7 @@ alarm_to_dialog (Dialog *dialog)
&& e_cal_get_alarm_email_address (dialog->ecal, &email, NULL)) {
ECalComponentAttendee *a;
GSList attendee_list;
-
+
a = g_new0 (ECalComponentAttendee, 1);
a->value = email;
attendee_list.data = a;
@@ -429,7 +429,7 @@ malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
icalcomponent *icalcomp;
icalproperty *icalprop;
GList *l;
-
+
/* Attendees */
name_selector_model = e_name_selector_peek_model (dialog->name_selector);
e_name_selector_model_peek_section (name_selector_model, section_name, NULL, &destination_store);
@@ -440,7 +440,7 @@ malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
ECalComponentAttendee *a;
dest = l->data;
-
+
a = g_new0 (ECalComponentAttendee, 1);
a->value = e_destination_get_email (dest);
a->cn = e_destination_get_name (dest);
@@ -455,7 +455,7 @@ malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->malarm_message)))
return;
-
+
/* Description */
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->malarm_description));
gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start);
@@ -574,11 +574,11 @@ palarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
description.value = str;
description.altrep = NULL;
-
+
e_cal_component_alarm_set_description (alarm, &description);
g_free (str);
-
+
/* remove the X-EVOLUTION-NEEDS-DESCRIPTION property, so that
* we don't re-set the alarm's description */
icalcomp = e_cal_component_alarm_get_icalcomponent (alarm);
@@ -621,7 +621,7 @@ populate_widgets_from_alarm (Dialog *dialog)
e_dialog_option_menu_set (dialog->time, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START, time_map);
break;
- case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END:
+ case E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END:
e_dialog_option_menu_set (dialog->time, E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_END, time_map);
break;
default:
@@ -790,7 +790,7 @@ get_widgets (Dialog *dialog)
dialog->malarm_addressbook = GW ("malarm-addressbook");
dialog->malarm_message = GW ("malarm-message");
dialog->malarm_description = GW ("malarm-description");
-
+
dialog->palarm_group = GW ("palarm-group");
dialog->palarm_program = GW ("palarm-program");
dialog->palarm_args = GW ("palarm-args");
@@ -821,7 +821,7 @@ get_widgets (Dialog *dialog)
&& dialog->malarm_description
&& dialog->palarm_group
&& dialog->palarm_program
- && dialog->palarm_args);
+ && dialog->palarm_args);
}
#if 0
@@ -910,7 +910,7 @@ check_custom_sound (Dialog *dialog)
{
char *str, *dir;
gboolean sens;
-
+
str = gtk_file_chooser_get_filename (
GTK_FILE_CHOOSER (dialog->aalarm_file_chooser));
@@ -943,7 +943,7 @@ static void
aalarm_attach_changed_cb (GtkWidget *widget, gpointer data)
{
Dialog *dialog = data;
-
+
check_custom_sound (dialog);
}
@@ -954,7 +954,7 @@ check_custom_message (Dialog *dialog)
GtkTextBuffer *text_buffer;
GtkTextIter text_iter_start, text_iter_end;
gboolean sens;
-
+
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->dalarm_description));
gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start);
gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end);
@@ -982,7 +982,7 @@ static void
dalarm_description_changed_cb (GtkWidget *widget, gpointer data)
{
Dialog *dialog = data;
-
+
check_custom_message (dialog);
}
@@ -991,7 +991,7 @@ check_custom_program (Dialog *dialog)
{
char *str;
gboolean sens;
-
+
str = e_dialog_editable_get (dialog->palarm_program);
sens = str && *str;
@@ -1002,7 +1002,7 @@ static void
palarm_program_changed_cb (GtkWidget *widget, gpointer data)
{
Dialog *dialog = data;
-
+
check_custom_program (dialog);
}
@@ -1037,7 +1037,7 @@ malarm_addresses_changed_cb (GtkWidget *editable,
gpointer data)
{
Dialog *dialog = data;
-
+
check_custom_email (dialog);
}
@@ -1057,7 +1057,7 @@ static void
malarm_description_changed_cb (GtkWidget *widget, gpointer data)
{
Dialog *dialog = data;
-
+
check_custom_email (dialog);
}
@@ -1068,7 +1068,7 @@ action_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
char *dir;
ECalComponentAlarmAction action;
int page = 0, i;
-
+
action = e_dialog_option_menu_get (dialog->action, action_map);
for (i = 0; action_map[i] != -1 ; i++) {
if (action == action_map[i]) {
@@ -1076,11 +1076,11 @@ action_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
break;
}
}
-
+
gtk_notebook_set_current_page (
GTK_NOTEBOOK (dialog->option_notebook), page);
- switch (action) {
+ switch (action) {
case E_CAL_COMPONENT_ALARM_AUDIO:
dir = calendar_config_get_dir_path ();
if ( dir && *dir )
@@ -1114,7 +1114,7 @@ init_widgets (Dialog *dialog)
{
GtkWidget *menu;
GtkTextBuffer *text_buffer;
-
+
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dialog->action));
g_signal_connect (menu, "selection_done",
G_CALLBACK (action_selection_done_cb),
@@ -1158,12 +1158,12 @@ alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm)
int response_id;
GList *icon_list;
char *gladefile;
-
+
g_return_val_if_fail (alarm != NULL, FALSE);
dialog.alarm = alarm;
dialog.ecal = ecal;
-
+
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"alarm-dialog.glade",
NULL);
@@ -1201,7 +1201,7 @@ alarm_dialog_run (GtkWidget *parent, ECal *ecal, ECalComponentAlarm *alarm)
gtk_window_set_transient_for (GTK_WINDOW (dialog.toplevel),
GTK_WINDOW (parent));
-
+
response_id = gtk_dialog_run (GTK_DIALOG (dialog.toplevel));
if (response_id == GTK_RESPONSE_OK)
diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c
index de59361519..4b2be10d48 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.c
+++ b/calendar/gui/dialogs/alarm-list-dialog.c
@@ -59,7 +59,7 @@ typedef struct {
/* The list store */
EAlarmList *list_store;
-
+
/* Toplevel */
GtkWidget *toplevel;
@@ -68,7 +68,7 @@ typedef struct {
GtkWidget *edit;
GtkWidget *delete;
GtkWidget *box;
-
+
} Dialog;
/* Gets the widgets from the XML file and returns TRUE if they are all available. */
@@ -83,7 +83,7 @@ get_widgets (Dialog *dialog)
dialog->box = GW ("vbox53");
dialog->list = GW ("list");
- dialog->add = GW ("add");
+ dialog->add = GW ("add");
dialog->edit = GW ("edit");
dialog->delete = GW ("delete");
@@ -130,7 +130,7 @@ add_clicked_cb (GtkButton *button, gpointer data)
GtkTreeIter iter;
icalcomponent *icalcomp;
icalproperty *icalprop;
-
+
view = GTK_TREE_VIEW (dialog->list);
alarm = e_cal_component_alarm_new ();
@@ -139,7 +139,7 @@ add_clicked_cb (GtkButton *button, gpointer data)
icalprop = icalproperty_new_x ("1");
icalproperty_set_x_name (icalprop, "X-EVOLUTION-NEEDS-DESCRIPTION");
icalcomponent_add_property (icalcomp, icalprop);
-
+
if (alarm_dialog_run (dialog->toplevel, dialog->ecal, alarm)) {
e_alarm_list_append (dialog->list_store, &iter, alarm);
gtk_tree_selection_select_iter (gtk_tree_view_get_selection (view), &iter);
@@ -271,9 +271,9 @@ alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store)
int response_id;
GList *icon_list;
char *gladefile;
-
+
dialog.ecal = ecal;
- dialog.list_store = list_store;
+ dialog.list_store = list_store;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"alarm-list-dialog.glade",
@@ -294,7 +294,7 @@ alarm_list_dialog_run (GtkWidget *parent, ECal *ecal, EAlarmList *list_store)
init_widgets (&dialog);
sensitize_buttons (&dialog);
-
+
gtk_widget_ensure_style (dialog.toplevel);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog.toplevel)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog.toplevel)->action_area), 12);
@@ -323,10 +323,10 @@ alarm_list_dialog_peek (ECal *ecal, EAlarmList *list_store)
{
Dialog *dialog;
char *gladefile;
-
+
dialog = (Dialog *)g_new (Dialog, 1);
dialog->ecal = ecal;
- dialog->list_store = list_store;
+ dialog->list_store = list_store;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"alarm-list-dialog.glade",
@@ -347,7 +347,7 @@ alarm_list_dialog_peek (ECal *ecal, EAlarmList *list_store)
init_widgets (dialog);
sensitize_buttons (dialog);
-
+
g_object_unref (dialog->xml);
/* Free the other stuff when the parent really gets destroyed. */
diff --git a/calendar/gui/dialogs/cal-attachment-select-file.c b/calendar/gui/dialogs/cal-attachment-select-file.c
index aa57f95dc7..c8f5e89057 100644
--- a/calendar/gui/dialogs/cal-attachment-select-file.c
+++ b/calendar/gui/dialogs/cal-attachment-select-file.c
@@ -58,9 +58,9 @@ run_selector(CompEditor *editor, const char *title, guint32 flags, gboolean *sho
GtkWidget *showinline = NULL;
char *path;
GList *icon_list;
-
+
path = g_object_get_data ((GObject *) editor, "attach_path");
-
+
if (flags & SELECTOR_MODE_SAVE)
selection = gtk_file_chooser_dialog_new (title,
NULL,
@@ -75,49 +75,49 @@ run_selector(CompEditor *editor, const char *title, guint32 flags, gboolean *sho
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_OK,
NULL);
-
+
gtk_dialog_set_default_response (GTK_DIALOG (selection), GTK_RESPONSE_OK);
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (selection), FALSE);
-
+
if ((flags & SELECTOR_MODE_SAVE) == 0)
gtk_file_chooser_set_select_multiple ((GtkFileChooser *) selection, (flags & SELECTOR_MODE_MULTI));
-
+
/* restore last path used */
if (!path)
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (selection), g_get_home_dir ());
else
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (selection), path);
-
+
if (showinline_p) {
showinline = gtk_check_button_new_with_mnemonic (_("_Suggest automatic display of attachment"));
gtk_widget_show (showinline);
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (selection), showinline);
}
-
+
gtk_window_set_transient_for ((GtkWindow *) selection, (GtkWindow *) editor);
gtk_window_set_wmclass ((GtkWindow *) selection, "fileselection", "Evolution:editor");
gtk_window_set_modal ((GtkWindow *) selection, TRUE);
-
+
icon_list = e_icon_factory_get_icon_list ("mail-message-new");
if (icon_list) {
gtk_window_set_icon_list (GTK_WINDOW (selection), icon_list);
g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
g_list_free (icon_list);
}
-
+
if (gtk_dialog_run ((GtkDialog *) selection) == GTK_RESPONSE_OK) {
if (showinline_p)
*showinline_p = gtk_toggle_button_get_active ((GtkToggleButton *) showinline);
-
+
path = g_path_get_dirname (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selection)));
-
+
g_object_set_data_full ((GObject *) editor, "attach_path", g_strdup_printf ("%s/", path), g_free);
g_free (path);
} else {
gtk_widget_destroy (selection);
selection = NULL;
}
-
+
return selection;
}
@@ -139,7 +139,7 @@ comp_editor_select_file (CompEditor *editor, const char *title, gboolean save_mo
guint32 flags = save_mode ? SELECTOR_MODE_SAVE : SELECTOR_MODE_MULTI;
GtkWidget *selection;
char *name = NULL;
-
+
selection = run_selector (editor, title, flags, NULL);
if (selection) {
name = g_strdup (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selection)));
@@ -154,15 +154,15 @@ comp_editor_select_file_attachments (CompEditor *editor, gboolean *showinline_p)
{
GtkWidget *selection;
GPtrArray *list = NULL;
-
+
selection = run_selector (editor, _("Attach file(s)"), SELECTOR_MODE_MULTI, showinline_p);
-
+
if (selection) {
GSList *l, *n;
-
+
if ((l = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (selection)))) {
list = g_ptr_array_new ();
-
+
while (l) {
n = l->next;
g_ptr_array_add (list, l->data);
@@ -170,10 +170,10 @@ comp_editor_select_file_attachments (CompEditor *editor, gboolean *showinline_p)
l = n;
}
}
-
+
gtk_widget_destroy (selection);
}
-
+
return list;
}
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index afea9a8df2..a916359b2b 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -124,11 +124,11 @@ timezone_changed (GtkWidget *widget, CalendarPrefsDialog *prefs)
zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (prefs->timezone));
icalcomp = icaltimezone_get_component (zone);
- if (!(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT)))
+ if (!(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT)))
gtk_widget_set_sensitive ((GtkWidget *) prefs->daylight_saving, FALSE);
- else
+ else
gtk_widget_set_sensitive ((GtkWidget *) prefs->daylight_saving, TRUE);
-
+
calendar_config_set_timezone (icaltimezone_get_location (zone));
}
@@ -334,7 +334,7 @@ alarms_selection_changed (ESourceSelector *selector, CalendarPrefsDialog *prefs)
alarm = e_source_get_property (source, "alarm");
if (alarm && !g_ascii_strcasecmp (alarm, "never"))
continue;
-
+
g_message ("Unsetting for %s", e_source_peek_name (source));
e_source_set_property (source, "alarm", "false");
}
@@ -356,7 +356,7 @@ alarms_selection_changed (ESourceSelector *selector, CalendarPrefsDialog *prefs)
e_source_selector_free_selection (selection);
/* FIXME show an error if this fails? */
- e_source_list_sync (source_list, NULL);
+ e_source_list_sync (source_list, NULL);
}
static void
@@ -406,7 +406,7 @@ setup_changes (CalendarPrefsDialog *prefs)
g_signal_connect (G_OBJECT (prefs->default_reminder_units), "changed", G_CALLBACK (default_reminder_units_changed), prefs);
g_signal_connect (G_OBJECT (prefs->alarm_list_widget), "selection_changed", G_CALLBACK (alarms_selection_changed), prefs);
-
+
g_signal_connect (G_OBJECT (prefs->template_url), "changed", G_CALLBACK (template_url_changed), prefs);
}
@@ -506,14 +506,14 @@ show_config (CalendarPrefsDialog *prefs)
g_free (location);
icalcomp = icaltimezone_get_component (zone);
- if (!(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT)))
+ if (!(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT)))
gtk_widget_set_sensitive ((GtkWidget *) prefs->daylight_saving, FALSE);
- else
+ else
gtk_widget_set_sensitive ((GtkWidget *) prefs->daylight_saving, TRUE);
-
+
set = calendar_config_get_daylight_saving ();
gtk_toggle_button_set_active ((GtkToggleButton *) prefs->daylight_saving, set);
-
+
/* Working Days. */
working_days = calendar_config_get_working_days ();
mask = 1 << 0;
@@ -665,7 +665,7 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs)
/* Alarms tab */
prefs->scrolled_window = glade_xml_get_widget (gui, "calendar-source-scrolled-window");
-
+
/* Free/Busy tab */
prefs->template_url = glade_xml_get_widget (gui, "template_url");
target = e_cal_config_target_new_prefs (ec, prefs->gconf);
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.h b/calendar/gui/dialogs/cal-prefs-dialog.h
index d6f84aae4d..d0df6e4a12 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.h
+++ b/calendar/gui/dialogs/cal-prefs-dialog.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* David Trowbridge <trowbrds cs colorado edu>
* Damon Chaplin <damon@ximian.com>
*
* Copyright (C) 2005 Novell, Inc. (www.novell.com)
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c
index a7b2e15b80..3f6bcf4e45 100644
--- a/calendar/gui/dialogs/calendar-setup.c
+++ b/calendar/gui/dialogs/calendar-setup.c
@@ -243,15 +243,15 @@ eccp_get_source_name (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
return entry;
}
-static void
+static void
offline_status_changed_cb (GtkWidget *widget, CalendarSourceDialog *sdialog)
{
-
+
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
e_source_set_property (sdialog->source, "offline_sync", "1");
- else
- e_source_set_property (sdialog->source, "offline_sync", "0");
-
+ else
+ e_source_set_property (sdialog->source, "offline_sync", "0");
+
}
static GtkWidget *
@@ -268,9 +268,9 @@ eccp_general_offline (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
else {
row = ((GtkTable*)parent)->nrows;
- if (sdialog->source_type == E_CAL_SOURCE_TYPE_EVENT)
+ if (sdialog->source_type == E_CAL_SOURCE_TYPE_EVENT)
offline_setting = gtk_check_button_new_with_mnemonic (_("Cop_y calendar contents locally for offline operation"));
- else if (sdialog->source_type == E_CAL_SOURCE_TYPE_TODO)
+ else if (sdialog->source_type == E_CAL_SOURCE_TYPE_TODO)
offline_setting = gtk_check_button_new_with_mnemonic (_("Cop_y task list contents locally for offline operation"));
else if(sdialog->source_type == E_CAL_SOURCE_TYPE_JOURNAL)
offline_setting = gtk_check_button_new_with_mnemonic (_("Cop_y memo list contents locally for offline operation"));
@@ -280,7 +280,7 @@ eccp_general_offline (EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
gtk_table_attach (GTK_TABLE (parent), offline_setting, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
}
-
+
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (offline_setting), (offline_sync && g_str_equal (offline_sync, "1")) ? TRUE : FALSE);
if (is_local)
gtk_widget_hide (offline_setting);
@@ -397,7 +397,7 @@ static ECalConfigItem ecmp_items[] = {
{ 0 },
};
-/**
+/**
* cs_load_sources:
* @sdialog: dialog where to load sources list
* @conf_key: configuration key where to get sources' list
@@ -463,7 +463,7 @@ calendar_setup_edit_calendar (struct _GtkWindow *parent, ESource *source, ESourc
e_source_set_absolute_uri (sdialog->source, NULL);
e_source_set_group (sdialog->source, sdialog->source_group);
- sdialog->source_type = E_CAL_SOURCE_TYPE_EVENT;
+ sdialog->source_type = E_CAL_SOURCE_TYPE_EVENT;
sdialog->config = ec = e_cal_config_new (E_CONFIG_BOOK, "org.gnome.evolution.calendar.calendarProperties");
for (i = 0; eccp_items[i].path; i++)
items = g_slist_prepend (items, &eccp_items[i]);
@@ -478,7 +478,7 @@ calendar_setup_edit_calendar (struct _GtkWindow *parent, ESource *source, ESourc
sdialog->window = e_config_create_window ((EConfig *)ec, NULL, _("Calendar Properties"));
else
sdialog->window = e_config_create_window ((EConfig *)ec, NULL, _("New Calendar"));
-
+
/* forces initial validation */
if (!sdialog->original_source)
e_config_target_changed ((EConfig *)ec, E_CONFIG_TARGET_CHANGED_STATE);
diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c
index ffecf671c8..93dfc1d4b1 100644
--- a/calendar/gui/dialogs/cancel-comp.c
+++ b/calendar/gui/dialogs/cancel-comp.c
@@ -33,7 +33,7 @@
/* is_past_event:
- *
+ *
* returns TRUE if @comp is in the past, FALSE otherwise.
* Comparision is based only on date part, time part is ignored.
*/
@@ -56,10 +56,10 @@ is_past_event (ECalComponent *comp)
/**
* cancel_component_dialog:
- *
+ *
* Pops up a dialog box asking the user whether he wants to send a
* cancel and delete an iTip/iMip message
- *
+ *
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
@@ -67,12 +67,12 @@ cancel_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, g
{
ECalComponentVType vtype;
const char *id;
-
+
if (deleting && e_cal_get_save_schedules (client))
return TRUE;
-
+
vtype = e_cal_component_get_vtype (comp);
-
+
switch (vtype) {
case E_CAL_COMPONENT_EVENT:
if (is_past_event (comp)) {
@@ -103,7 +103,7 @@ cancel_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, g
g_message (G_STRLOC ": Cannot handle object of type %d", vtype);
return FALSE;
}
-
+
if (e_error_run (parent, id, NULL) == GTK_RESPONSE_YES)
return TRUE;
else
diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c
index 6afae1a6b3..bfc89604e3 100644
--- a/calendar/gui/dialogs/changed-comp.c
+++ b/calendar/gui/dialogs/changed-comp.c
@@ -37,10 +37,10 @@
* @comp: A calendar component
* @deleted: Whether the object is being deleted or updated
* @changed: Whether or not the user has made changes
- *
+ *
* Pops up a dialog box asking the user whether changes made (if any)
* should be thrown away because the item has been updated elsewhere
- *
+ *
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
@@ -51,7 +51,7 @@ changed_component_dialog (GtkWindow *parent, ECalComponent *comp, gboolean delet
char *str;
gint response;
GList *icon_list;
-
+
vtype = e_cal_component_get_vtype (comp);
if (deleted) {
@@ -76,7 +76,7 @@ changed_component_dialog (GtkWindow *parent, ECalComponent *comp, gboolean delet
if (changed)
str = g_strdup_printf (_("%s You have made changes. Forget those changes and close the editor?"), str);
else
- str = g_strdup_printf (_("%s You have made no changes, close the editor?"), str);
+ str = g_strdup_printf (_("%s You have made no changes, close the editor?"), str);
} else {
switch (vtype) {
@@ -100,20 +100,20 @@ changed_component_dialog (GtkWindow *parent, ECalComponent *comp, gboolean delet
if (changed)
str = g_strdup_printf (_("%s You have made changes. Forget those changes and update the editor?"), str);
else
- str = g_strdup_printf (_("%s You have made no changes, update the editor?"), str);
+ str = g_strdup_printf (_("%s You have made no changes, update the editor?"), str);
}
-
+
dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO, str);
-
+
icon_list = e_icon_factory_get_icon_list ("stock_calendar");
if (icon_list) {
gtk_window_set_icon_list (GTK_WINDOW (dialog), icon_list);
g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
g_list_free (icon_list);
}
-
+
response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c
index 897764dfa8..174f7eb50d 100644
--- a/calendar/gui/dialogs/comp-editor-page.c
+++ b/calendar/gui/dialogs/comp-editor-page.c
@@ -58,10 +58,10 @@ static guint comp_editor_page_signals[LAST_SIGNAL];
/**
* comp_editor_page_get_type:
- *
+ *
* Registers the #CompEditorPage class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the #CompEditorPage class.
**/
GtkType
@@ -143,23 +143,23 @@ comp_editor_page_class_init (CompEditorPageClass *class)
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, G_TYPE_OBJECT);
- comp_editor_page_signals[FOCUS_IN] =
+ comp_editor_page_signals[FOCUS_IN] =
g_signal_new ("focus_in",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (CompEditorPageClass, focus_in),
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
- comp_editor_page_signals[FOCUS_OUT] =
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+ comp_editor_page_signals[FOCUS_OUT] =
g_signal_new ("focus_out",
G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (CompEditorPageClass, focus_out),
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+
class->changed = NULL;
class->summary_changed = NULL;
class->dates_changed = NULL;
@@ -213,9 +213,9 @@ comp_editor_page_destroy (GtkObject *object)
/**
* comp_editor_page_get_widget:
* @page: An editor page.
- *
+ *
* Queries the main widget of an editor page.
- *
+ *
* Return value: The widget that is the page's upper container. It should
* normally be inserted in a notebook widget.
**/
@@ -232,7 +232,7 @@ comp_editor_page_get_widget (CompEditorPage *page)
/**
* comp_editor_page_focus_main_widget:
* @page: An editor page.
- *
+ *
* Makes an editor page focus its main widget. This is used by the component
* editor when it first pops up so that it can focus the main widget in the
* first page.
@@ -251,7 +251,7 @@ comp_editor_page_focus_main_widget (CompEditorPage *page)
* comp_editor_page_fill_widgets:
* @page: An editor page.
* @comp: A calendar component.
- *
+ *
* Fills the widgets of an editor page with the data from a calendar component.
**/
gboolean
@@ -268,7 +268,7 @@ comp_editor_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
* comp_editor_page_fill_component:
* @page: An editor page.
* @comp: A calendar component.
- *
+ *
* Takes the data from the widgets of an editor page and sets it on a calendar
* component, replacing the contents of the properties that the editor page
* knows how to manipulate.
@@ -338,7 +338,7 @@ comp_editor_page_set_e_cal (CompEditorPage *page, ECal *client)
* comp_editor_page_set_summary:
* @page: An editor page
* @summary: The text of the new summary value
- *
+ *
* Sets the summary value for this group of widgets
**/
void
@@ -373,7 +373,7 @@ comp_editor_page_unset_focused_widget (CompEditorPage *page, GtkWidget *widget)
* @page: An editor page
* @widget: The widget that has the current focus
**/
-void
+void
comp_editor_page_set_focused_widget (CompEditorPage *page, GtkWidget *widget)
{
g_return_if_fail (page!= NULL);
@@ -388,7 +388,7 @@ comp_editor_page_set_focused_widget (CompEditorPage *page, GtkWidget *widget)
* comp_editor_page_set_dates:
* @page: An editor page
* @dates: A collection of various dates in time_t format
- *
+ *
* Sets the date values for this group of widgets
**/
void
@@ -404,7 +404,7 @@ comp_editor_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
/**
* comp_editor_page_notify_changed:
* @page: An editor page.
- *
+ *
* Makes an editor page emit the "changed" signal. This is meant to be
* used only by page implementations.
**/
@@ -419,9 +419,9 @@ comp_editor_page_notify_changed (CompEditorPage *page)
/**
* comp_editor_page_notify_needs_send:
- * @page:
- *
- *
+ * @page:
+ *
+ *
**/
void
comp_editor_page_notify_needs_send (CompEditorPage *page)
@@ -429,13 +429,13 @@ comp_editor_page_notify_needs_send (CompEditorPage *page)
g_return_if_fail (page != NULL);
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- gtk_signal_emit (GTK_OBJECT (page), comp_editor_page_signals[NEEDS_SEND]);
+ gtk_signal_emit (GTK_OBJECT (page), comp_editor_page_signals[NEEDS_SEND]);
}
/**
* comp_editor_page_notify_summary_changed:
* @page: An editor page.
- *
+ *
* Makes an editor page emit the "summary_changed" signal. This is meant to be
* used only by page implementations.
**/
@@ -446,7 +446,7 @@ comp_editor_page_notify_summary_changed (CompEditorPage *page,
g_return_if_fail (page != NULL);
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
-
+
gtk_signal_emit (GTK_OBJECT (page),
comp_editor_page_signals[SUMMARY_CHANGED],
summary);
@@ -455,7 +455,7 @@ comp_editor_page_notify_summary_changed (CompEditorPage *page,
/**
* comp_editor_page_notify_dates_changed:
* @page: An editor page.
- *
+ *
* Makes an editor page emit the "dates_changed" signal. This is meant to be
* used only by page implementations.
**/
@@ -474,7 +474,7 @@ comp_editor_page_notify_dates_changed (CompEditorPage *page,
/**
* comp_editor_page_notify_client_changed:
* @page: An editor page.
- *
+ *
* Makes an editor page emit the "client_changed" signal. This is meant to be
* used only by page implementations.
**/
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c
index 8aa7bbd734..dabf01745e 100644
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ b/calendar/gui/dialogs/comp-editor-util.c
@@ -43,7 +43,7 @@
* comp_editor_dates:
* @dates: A structure to be filled out with dates of a component
* @comp: The component to extract the dates from
- *
+ *
* Extracts the dates from the calendar component into the
* CompEditorPageDates structure. Call comp_editor_free_dates() to free the
* results.
@@ -57,7 +57,7 @@ comp_editor_dates (CompEditorPageDates *dates, ECalComponent *comp)
dates->end = NULL;
dates->due = NULL;
dates->complete = NULL;
-
+
/* Note that the ECalComponentDateTime's returned contain allocated
icaltimetype and tzid values, so we just take over ownership of
those. */
@@ -119,7 +119,7 @@ write_label_piece (struct icaltimetype *tt, char *buffer, int size,
struct tm tmp_tm = { 0 };
struct icaltimetype tt_copy = *tt;
int len;
-
+
/* FIXME: May want to convert the time to an appropriate zone. */
if (stext != NULL)
@@ -145,7 +145,7 @@ write_label_piece (struct icaltimetype *tt, char *buffer, int size,
len = strlen (buffer);
e_time_format_date_and_time (&tmp_tm,
- calendar_config_get_24_hour_format (),
+ calendar_config_get_24_hour_format (),
!tt_copy.is_date, FALSE,
&buffer[len], size - len);
if (etext != NULL)
@@ -156,7 +156,7 @@ write_label_piece (struct icaltimetype *tt, char *buffer, int size,
* comp_editor_date_label:
* @dates: The dates to use in constructing a label
* @label: The label whose text is to be set
- *
+ *
* Set the text of a label based on the dates available and the user's
* formatting preferences
**/
@@ -192,7 +192,7 @@ comp_editor_date_label (CompEditorPageDates *dates, GtkWidget *label)
else
write_label_piece (dates->complete, buffer, 1024, _("Completed "), NULL, NULL);
}
-
+
if (due_set && dates->complete == NULL) {
if (start_set)
write_label_piece (dates->due->value, buffer, 1024, _(" (Due "), ")", NULL);
@@ -207,7 +207,7 @@ static void
date_edit_destroy_cb (EDateEdit *date_edit, gpointer data)
{
EDateEditConfig *config = data;
-
+
g_object_unref (config);
}
@@ -218,9 +218,9 @@ date_edit_destroy_cb (EDateEdit *date_edit, gpointer data)
* @make_time_insensitive: Whether the time field is made insensitive rather
* than hiding it. This is useful if you want to preserve the layout of the
* widgets.
- *
+ *
* Creates a new #EDateEdit widget, configured using the calendar's preferences.
- *
+ *
* Return value: A newly-created #EDateEdit widget.
**/
GtkWidget *
@@ -229,7 +229,7 @@ comp_editor_new_date_edit (gboolean show_date, gboolean show_time,
{
EDateEdit *dedit;
EDateEditConfig *config;
-
+
dedit = E_DATE_EDIT (e_date_edit_new ());
e_date_edit_set_show_date (dedit, show_date);
@@ -239,10 +239,10 @@ comp_editor_new_date_edit (gboolean show_date, gboolean show_time,
#else
e_date_edit_set_make_time_insensitive (dedit, FALSE);
#endif
-
+
config = e_date_edit_config_new (dedit);
g_signal_connect (G_OBJECT (dedit), "destroy", G_CALLBACK (date_edit_destroy_cb), config);
-
+
return GTK_WIDGET (dedit);
}
@@ -280,10 +280,10 @@ comp_editor_get_current_time (GtkObject *object, gpointer data)
/**
* comp_editor_strip_categories:
* @categories: A string of category names entered by the user.
- *
+ *
* Takes a string of the form "categ, categ, categ, ..." and removes the
* whitespace between categories to result in "categ,categ,categ,..."
- *
+ *
* Return value: The category names stripped of surrounding whitespace
* and separated with commas.
**/
@@ -329,7 +329,7 @@ comp_editor_strip_categories (const char *categories)
start = p;
end = p;
} else
- end = g_utf8_next_char(p) - 1;
+ end = g_utf8_next_char(p) - 1;
}
}
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index e2ca1b5730..2b2b797775 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -81,7 +81,7 @@
struct _CompEditorPrivate {
/* Client to use */
ECal *client;
-
+
/* Source client (where comp lives currently) */
ECal *source_client;
@@ -98,7 +98,7 @@ struct _CompEditorPrivate {
GtkNotebook *notebook;
/* Focussed Widget*/
- GtkWidget *focused_entry;
+ GtkWidget *focused_entry;
/* Attachment handling */
GtkWidget *attachment_bar;
@@ -109,20 +109,20 @@ struct _CompEditorPrivate {
GtkWidget *attachment_expander_num;
guint32 attachment_bar_visible : 1;
-
- /* TODO use this flags for setting all the boolean variables
+
+ /* TODO use this flags for setting all the boolean variables
below */
CompEditorFlags flags;
-
+
gboolean changed;
gboolean needs_send;
CalObjModType mod;
-
+
gboolean existing_org;
gboolean user_org;
gboolean is_group_item;
-
+
gboolean warned;
char *help_section;
@@ -212,12 +212,12 @@ attach_message(CompEditor *editor, CamelMimeMessage *msg)
g_free(desc);
} else
camel_mime_part_set_description(mime_part, _("Attached message"));
-
+
i = e_attachment_bar_get_num_attachments (E_ATTACHMENT_BAR (editor->priv->attachment_bar));
i++;
filename = g_strdup_printf ("email%d",i);
camel_mime_part_set_filename (mime_part, filename);
-
+
camel_medium_set_content_object((CamelMedium *)mime_part, (CamelDataWrapper *)msg);
camel_mime_part_set_content_type(mime_part, "message/rfc822");
e_attachment_bar_attach_mime_part(E_ATTACHMENT_BAR(editor->priv->attachment_bar), mime_part);
@@ -259,7 +259,7 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
stream = camel_stream_mem_new ();
camel_stream_write (stream, (char *)selection->data, selection->length);
camel_stream_reset (stream);
-
+
msg = camel_mime_message_new ();
if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg, stream) != -1) {
attach_message(editor, msg);
@@ -276,7 +276,7 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
tmp = g_strndup ((char *)selection->data, selection->length);
urls = g_strsplit (tmp, "\n", 0);
g_free (tmp);
-
+
for (i = 0; urls[i] != NULL; i++) {
str = g_strstrip (urls[i]);
if (urls[i][0] == '#') {
@@ -309,7 +309,7 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
g_free (str);
}
}
-
+
g_free (urls);
success = TRUE;
break;
@@ -317,15 +317,15 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
case DND_TYPE_TEXT_CALENDAR:
content_type = gdk_atom_name (selection->type);
d(printf ("dropping a %s\n", content_type));
-
+
mime_part = camel_mime_part_new ();
camel_mime_part_set_content (mime_part, (char *)selection->data, selection->length, content_type);
camel_mime_part_set_disposition (mime_part, "inline");
-
+
e_attachment_bar_attach_mime_part
(E_ATTACHMENT_BAR (editor->priv->attachment_bar),
mime_part);
-
+
camel_object_unref (mime_part);
g_free (content_type);
@@ -393,7 +393,7 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
desc = g_strdup_printf(ngettext("Attached message", "%d attached messages", uids->len), uids->len);
camel_mime_part_set_description(mime_part, desc);
g_free(desc);
-
+
num = e_attachment_bar_get_num_attachments (E_ATTACHMENT_BAR (editor->priv->attachment_bar));
num++;
filename = g_strdup_printf ("email%d", num);
@@ -591,23 +591,23 @@ listen_for_changes (CompEditor *editor)
G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL,
editor);
-
+
g_object_unref (priv->view);
priv->view = NULL;
}
-
+
/* Listen for changes */
if (priv->comp)
e_cal_component_get_uid (priv->comp, &uid);
if (uid) {
char *query;
-
+
query = g_strdup_printf ("(uid? \"%s\")", uid);
e_cal_get_query (priv->source_client, query, &priv->view, NULL);
g_free (query);
}
-
+
if (priv->view) {
g_signal_connect (priv->view, "objects_modified",
G_CALLBACK (obj_modified_cb), editor);
@@ -654,9 +654,9 @@ get_attachment_list (CompEditor *editor)
char *attach_file_url;
char *safe_fname, *utf8_safe_fname;
char *filename;
-
+
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (p->data));
-
+
/* Extract the content from the stream and write it down
* as a mime part file into the directory denoting the
* calendar source */
@@ -682,7 +682,7 @@ get_attachment_list (CompEditor *editor)
g_free (filename);
continue;
}
-
+
if (camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) stream) == -1) {
g_free (attach_file_url);
camel_stream_close (stream);
@@ -747,7 +747,7 @@ save_comp (CompEditor *editor)
/* retrieve all timezones */
comp_editor_page_fill_timezones (l->data, timezones);
}
-
+
/* If we are not the organizer, we don't update the sequence number */
if (!e_cal_component_has_organizer (clone) || itip_organizer_is_user (clone, priv->client) || itip_sentby_is_user (clone))
e_cal_component_commit_sequence (clone);
@@ -762,11 +762,11 @@ save_comp (CompEditor *editor)
/* send timezones */
g_hash_table_foreach (timezones, (GHFunc) send_timezone, editor);
g_hash_table_destroy (timezones);
-
+
/* Attachments*/
-
+
e_cal_component_set_attachment_list (priv->comp,
- get_attachment_list (editor));
+ get_attachment_list (editor));
icalcomp = e_cal_component_get_icalcomponent (priv->comp);
/* send the component to the server */
if (!cal_comp_is_on_server (priv->comp, priv->client)) {
@@ -812,7 +812,7 @@ save_comp (CompEditor *editor)
if (delay_set)
return TRUE;
}
-
+
if (!result) {
GtkWidget *dialog;
@@ -835,7 +835,7 @@ save_comp (CompEditor *editor)
e_cal_get_source (priv->source_client)) &&
cal_comp_is_on_server (priv->comp, priv->source_client)) {
/* Comp found a new home. Remove it from old one. */
-
+
if (e_cal_component_is_instance (priv->comp) || e_cal_component_has_recurrences (priv->comp))
e_cal_remove_object_with_mod (priv->source_client, orig_uid, NULL,
CALOBJ_MOD_ALL, NULL);
@@ -846,7 +846,7 @@ save_comp (CompEditor *editor)
* again this session. */
g_object_unref (priv->source_client);
priv->source_client = g_object_ref (priv->client);
-
+
listen_for_changes (editor);
}
@@ -864,19 +864,19 @@ save_comp_with_send (CompEditor *editor)
gboolean delegate;
priv = editor->priv;
-
+
send = priv->changed && priv->needs_send;
delegate = priv->flags & COMP_EDITOR_DELEGATE;
-
+
if (delegate) {
icalcomponent *icalcomp = e_cal_component_get_icalcomponent (priv->comp);
icalproperty *icalprop;
-
+
icalprop = icalproperty_new_x ("1");
icalproperty_set_x_name (icalprop, "X-EVOLUTION-DELEGATED");
icalcomponent_add_property (icalcomp, icalprop);
}
-
+
if (!save_comp (editor))
return FALSE;
@@ -889,7 +889,7 @@ save_comp_with_send (CompEditor *editor)
} else {
if (!comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST))
return FALSE;
-
+
if (delegate)
return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REPLY);
}
@@ -933,7 +933,7 @@ prompt_and_save_changes (CompEditor *editor, gboolean send)
if (e_cal_component_is_instance (priv->comp))
if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor), FALSE))
return FALSE;
-
+
if (send && save_comp_with_send (editor))
return TRUE;
else if (!send && save_comp (editor))
@@ -954,7 +954,7 @@ delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
CompEditor *editor = COMP_EDITOR (data);
commit_all_fields (editor);
-
+
if (prompt_and_save_changes (editor, TRUE))
close_dialog (editor);
@@ -966,7 +966,7 @@ attachment_bar_changed_cb (EAttachmentBar *bar,
void *data)
{
CompEditor *editor = COMP_EDITOR (data);
-
+
guint attachment_num = e_attachment_bar_get_num_attachments (
E_ATTACHMENT_BAR (editor->priv->attachment_bar));
if (attachment_num) {
@@ -979,37 +979,37 @@ attachment_bar_changed_cb (EAttachmentBar *bar,
gtk_widget_show (editor->priv->attachment_expander_icon);
e_expander_set_expanded(E_EXPANDER(editor->priv->attachment_expander),TRUE);
-
+
} else {
gtk_label_set_text (GTK_LABEL (editor->priv->attachment_expander_num), "");
gtk_widget_hide (editor->priv->attachment_expander_icon);
e_expander_set_expanded(E_EXPANDER(editor->priv->attachment_expander),FALSE);
}
-
-
+
+
/* Mark the editor as changed so it prompts about unsaved
changes on close */
comp_editor_set_changed (editor, TRUE);
}
-static void
-attachment_expander_activate_cb (EExpander *expander,
- void *data)
-{
- CompEditor *editor = COMP_EDITOR (data);
- gboolean show = e_expander_get_expanded (expander);
-
- /* Update the expander label */
- if (show)
- gtk_label_set_text_with_mnemonic (GTK_LABEL (editor->priv->attachment_expander_label),
- _("Hide Attachment _Bar"));
- else
- gtk_label_set_text_with_mnemonic (GTK_LABEL (editor->priv->attachment_expander_label),
- _("Show Attachment _Bar"));
+static void
+attachment_expander_activate_cb (EExpander *expander,
+ void *data)
+{
+ CompEditor *editor = COMP_EDITOR (data);
+ gboolean show = e_expander_get_expanded (expander);
+
+ /* Update the expander label */
+ if (show)
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (editor->priv->attachment_expander_label),
+ _("Hide Attachment _Bar"));
+ else
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (editor->priv->attachment_expander_label),
+ _("Show Attachment _Bar"));
}
-static gboolean
+static gboolean
open_attachment (EAttachmentBar *bar, CompEditor *editor)
{
GnomeIconList *icon_list;
@@ -1017,7 +1017,7 @@ open_attachment (EAttachmentBar *bar, CompEditor *editor)
int num;
char *attach_file_url;
GError *error = NULL;
-
+
if (E_IS_ATTACHMENT_BAR (bar)) {
icon_list = GNOME_ICON_LIST (bar);
p = gnome_icon_list_get_selection (icon_list);
@@ -1028,7 +1028,7 @@ open_attachment (EAttachmentBar *bar, CompEditor *editor)
char *filename = NULL;
const char *local_store = e_cal_get_local_attachment_store (editor->priv->client);
- e_cal_component_get_uid (editor->priv->comp, &comp_uid);
+ e_cal_component_get_uid (editor->priv->comp, &comp_uid);
num = GPOINTER_TO_INT (p->data);
list = e_attachment_bar_get_attachment (bar, num);
attachment = list->data;
@@ -1039,7 +1039,7 @@ open_attachment (EAttachmentBar *bar, CompEditor *editor)
camel_mime_part_get_filename(attachment->body));
attach_file_url = g_build_path ("/", local_store, filename, NULL);
-
+
/* launch the url now */
/* TODO should send GError and handle error conditions
* here */
@@ -1050,14 +1050,14 @@ open_attachment (EAttachmentBar *bar, CompEditor *editor)
g_free (filename);
g_free (attach_file_url); }
return TRUE;
- } else
+ } else
return FALSE;
}
-static gboolean
+static gboolean
attachment_bar_icon_clicked_cb (EAttachmentBar *bar, GdkEvent *event, CompEditor *editor)
{
- if (E_IS_ATTACHMENT_BAR (bar) && event->type == GDK_2BUTTON_PRESS)
+ if (E_IS_ATTACHMENT_BAR (bar) && event->type == GDK_2BUTTON_PRESS)
if (open_attachment (bar, editor))
return TRUE;
return FALSE;
@@ -1070,7 +1070,7 @@ cab_open(EPopup *ep, EPopupItem *item, void *data)
{
EAttachmentBar *bar = data;
CompEditor *editor = COMP_EDITOR (gtk_widget_get_toplevel (GTK_WIDGET (bar)));
-
+
if (!open_attachment (bar, editor))
g_message ("\n Open failed");
}
@@ -1097,20 +1097,20 @@ cab_add(EPopup *ep, EPopupItem *item, void *data)
if (!g_ascii_strcasecmp (url->protocol, "file"))
e_attachment_bar_attach (bar, url->path, is_inline ? "inline" : "attachment");
- else
+ else
e_attachment_bar_attach_remote_file (bar, file_list->pdata[i], is_inline ? "inline" : "attachment");
g_free (file_list->pdata[i]);
camel_url_free (url);
}
-
- g_ptr_array_free (file_list, TRUE);
+
+ g_ptr_array_free (file_list, TRUE);
}
static void
cab_properties(EPopup *ep, EPopupItem *item, void *data)
{
EAttachmentBar *bar = data;
-
+
e_attachment_bar_edit_selected(bar);
}
@@ -1138,17 +1138,17 @@ cab_popup_position(GtkMenu *menu, int *x, int *y, gboolean *push_in, gpointer us
GnomeIconList *icon_list = user_data;
GList *selection;
GnomeCanvasPixbuf *image;
-
+
gdk_window_get_origin (((GtkWidget*) bar)->window, x, y);
-
+
selection = gnome_icon_list_get_selection (icon_list);
if (selection == NULL)
return;
-
+
image = gnome_icon_list_get_icon_pixbuf_item (icon_list, GPOINTER_TO_INT(selection->data));
if (image == NULL)
return;
-
+
/* Put menu to the center of icon. */
*x += (int)(image->item.x1 + image->item.x2) / 2;
*y += (int)(image->item.y1 + image->item.y2) / 2;
@@ -1197,7 +1197,7 @@ cab_popup(EAttachmentBar *bar, GdkEventButton *event, int id)
/* GtkWidget methods. */
-static gboolean
+static gboolean
popup_menu_event (GtkWidget *widget)
{
cab_popup((EAttachmentBar *)widget, NULL, -1);
@@ -1211,10 +1211,10 @@ button_press_event (GtkWidget *widget, GdkEventButton *event)
EAttachmentBar *bar = (EAttachmentBar *)widget;
GnomeIconList *icon_list = GNOME_ICON_LIST(widget);
int icon_number = -1;
-
+
if (event->button != 3)
return FALSE;
-
+
if (!gnome_icon_list_get_selection (icon_list)) {
icon_number = gnome_icon_list_get_icon_at (icon_list, event->x, event->y);
if (icon_number >= 0) {
@@ -1224,7 +1224,7 @@ button_press_event (GtkWidget *widget, GdkEventButton *event)
}
cab_popup(bar, event, icon_number);
-
+
return TRUE;
}
@@ -1236,7 +1236,7 @@ key_press_event(GtkWidget *widget, GdkEventKey *event)
e_attachment_bar_remove_selected (bar);
return TRUE;
}
-
+
return FALSE;
}
@@ -1245,13 +1245,13 @@ editor_key_press_event(GtkWidget *widget, GdkEventKey *event, CompEditor *editor
{
if (event->keyval == GDK_Escape) {
commit_all_fields (editor);
-
+
if (prompt_and_save_changes (editor, TRUE))
close_dialog (editor);
return TRUE;
}
-
+
return FALSE;
}
/* Menu callbacks */
@@ -1270,23 +1270,23 @@ menu_file_save_cb (BonoboUIComponent *uic,
if (e_attachment_bar_get_download_count (E_ATTACHMENT_BAR (editor->priv->attachment_bar)) ){
gboolean response = 1;
/*FIXME: Cannot use mail functions from calendar!!!! */
-#if 0
+#if 0
ECalComponentVType vtype = e_cal_component_get_vtype(editor->priv->comp);
if (vtype == E_CAL_COMPONENT_EVENT)
- response = em_utils_prompt_user((GtkWindow *)widget,
- NULL,
- "calendar:ask-send-event-pending-download",
+ response = em_utils_prompt_user((GtkWindow *)widget,
+ NULL,
+ "calendar:ask-send-event-pending-download",
NULL);
else
- response = em_utils_prompt_user((GtkWindow *)widget,
- NULL,
- "calendar:ask-send-task-pending-download",
+ response = em_utils_prompt_user((GtkWindow *)widget,
+ NULL,
+ "calendar:ask-send-task-pending-download",
NULL);
#endif
- if (!response)
+ if (!response)
return;
- }
+ }
if (!e_cal_is_read_only (priv->client, &read_only, NULL) || read_only) {
e_error_run ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (editor)), "calendar:prompt-read-only-cal", NULL);
@@ -1305,10 +1305,10 @@ menu_file_save_cb (BonoboUIComponent *uic,
if (!correct)
return;
- if (!text.value)
+ if (!text.value)
if (!send_component_prompt_subject ((GtkWindow *) editor, priv->client, priv->comp))
return;
- if (save_comp_with_send (editor))
+ if (save_comp_with_send (editor))
close_dialog (editor);
}
@@ -1323,16 +1323,16 @@ menu_file_print_cb (BonoboUIComponent *uic,
ECalComponent *comp;
GList *l;
icalcomponent *icalcomp = e_cal_component_get_icalcomponent (priv->comp);
-
+
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
for (l = priv->pages; l != NULL; l = l->next)
comp_editor_page_fill_component (l->data, comp);
-
+
print_comp (comp, priv->client, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
- g_object_unref (comp);
+ g_object_unref (comp);
}
static void
@@ -1345,14 +1345,14 @@ menu_file_print_preview_cb (BonoboUIComponent *uic,
ECalComponent *comp;
GList *l;
icalcomponent *icalcomp = e_cal_component_get_icalcomponent (priv->comp);
-
+
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
for (l = priv->pages; l != NULL; l = l->next)
- comp_editor_page_fill_component (l->data, comp);
+ comp_editor_page_fill_component (l->data, comp);
print_comp (comp, priv->client, TRUE);
- g_object_unref (comp);
+ g_object_unref (comp);
}
static void
@@ -1361,7 +1361,7 @@ menu_file_close_cb (BonoboUIComponent *uic,
const char *path)
{
CompEditor *editor = (CompEditor *) data;
-
+
commit_all_fields (editor);
if (prompt_and_save_changes (editor, TRUE))
@@ -1409,8 +1409,8 @@ menu_edit_selectall_cb (BonoboUIComponent *uic,
if (GTK_IS_ENTRY (priv->focused_entry)) {
gtk_editable_set_position (GTK_EDITABLE (priv->focused_entry), -1);
gtk_editable_select_region (GTK_EDITABLE (priv->focused_entry), 0, -1);
- }
- if (GTK_IS_TEXT_VIEW (priv->focused_entry))
+ }
+ if (GTK_IS_TEXT_VIEW (priv->focused_entry))
g_signal_emit_by_name (priv->focused_entry, "select-all", TRUE);
}
@@ -1421,7 +1421,7 @@ menu_edit_cut_cb (BonoboUIComponent *uic,
{
CompEditor *editor = data;
CompEditorPrivate *priv = editor->priv;
-
+
if (GTK_IS_ENTRY (priv->focused_entry))
gtk_editable_cut_clipboard (GTK_EDITABLE (priv->focused_entry));
if (GTK_IS_TEXT_VIEW (priv->focused_entry))
@@ -1454,13 +1454,13 @@ menu_insert_attachment_cb (BonoboUIComponent *uic,
if (!g_ascii_strcasecmp (url->protocol, "file"))
e_attachment_bar_attach (bar, url->path, is_inline ? "inline" : "attachment");
- else
+ else
e_attachment_bar_attach_remote_file (bar, file_list->pdata[i], is_inline ? "inline" : "attachment");
g_free (file_list->pdata[i]);
camel_url_free (url);
}
-
- g_ptr_array_free (file_list, TRUE);
+
+ g_ptr_array_free (file_list, TRUE);
}
static void
@@ -1469,7 +1469,7 @@ menu_help_cb (BonoboUIComponent *uic,
const char *path)
{
CompEditor *editor = (CompEditor *) data;
-
+
comp_editor_show_help (editor);
}
@@ -1477,17 +1477,17 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("FileSave", menu_file_save_cb),
BONOBO_UI_VERB ("CalendarPrint", menu_file_print_cb),
- BONOBO_UI_VERB ("CalendarPrintPreview", menu_file_print_preview_cb),
+ BONOBO_UI_VERB ("CalendarPrintPreview", menu_file_print_preview_cb),
BONOBO_UI_VERB ("FileClose", menu_file_close_cb),
BONOBO_UI_VERB ("EditCopy", menu_edit_copy_cb),
BONOBO_UI_VERB ("EditPaste", menu_edit_paste_cb),
BONOBO_UI_VERB ("EditCut", menu_edit_cut_cb),
- BONOBO_UI_VERB ("EditSelectAll", menu_edit_selectall_cb),
+ BONOBO_UI_VERB ("EditSelectAll", menu_edit_selectall_cb),
BONOBO_UI_VERB ("InsertAttachments", menu_insert_attachment_cb),
-
+
BONOBO_UI_VERB ("Help", menu_help_cb),
-
+
BONOBO_UI_VERB_END
};
@@ -1530,7 +1530,7 @@ setup_widgets (CompEditor *editor)
gtk_notebook_set_show_tabs (priv->notebook, FALSE);
g_signal_connect (editor, "delete_event", G_CALLBACK (delete_event_cb), editor);
- g_signal_connect (editor, "key_press_event", G_CALLBACK (editor_key_press_event), editor);
+ g_signal_connect (editor, "key_press_event", G_CALLBACK (editor_key_press_event), editor);
/*Attachments */
priv->attachment_scrolled_window = gtk_scrolled_window_new (NULL, NULL);
@@ -1538,7 +1538,7 @@ setup_widgets (CompEditor *editor)
GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->attachment_scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
+
priv->attachment_bar = e_attachment_bar_new (NULL);
g_signal_connect (priv->attachment_bar, "button_press_event", G_CALLBACK (button_press_event), NULL);
@@ -1552,7 +1552,7 @@ setup_widgets (CompEditor *editor)
g_signal_connect (priv->attachment_bar, "changed",
G_CALLBACK (attachment_bar_changed_cb), editor);
g_signal_connect (GNOME_ICON_LIST (priv->attachment_bar), "event",
- G_CALLBACK (attachment_bar_icon_clicked_cb), editor);
+ G_CALLBACK (attachment_bar_icon_clicked_cb), editor);
priv->attachment_expander_label =
gtk_label_new_with_mnemonic (_("Show Attachment _Bar"));
priv->attachment_expander_num = gtk_label_new ("");
@@ -1560,12 +1560,12 @@ setup_widgets (CompEditor *editor)
gtk_misc_set_alignment (GTK_MISC (priv->attachment_expander_label), 0.0, 0.5);
gtk_misc_set_alignment (GTK_MISC (priv->attachment_expander_num), 1.0, 0.5);
expander_hbox = gtk_hbox_new (FALSE, 0);
-
+
attachment_pixbuf = e_icon_factory_get_icon ("mail-attachment", E_ICON_SIZE_MENU);
priv->attachment_expander_icon = gtk_image_new_from_pixbuf (attachment_pixbuf);
gtk_misc_set_alignment (GTK_MISC (priv->attachment_expander_icon), 1, 0.5);
gtk_widget_set_size_request (priv->attachment_expander_icon, 100, -1);
- g_object_unref (attachment_pixbuf);
+ g_object_unref (attachment_pixbuf);
gtk_box_pack_start (GTK_BOX (expander_hbox), priv->attachment_expander_label,
TRUE, TRUE, 0);
@@ -1584,8 +1584,8 @@ setup_widgets (CompEditor *editor)
gtk_box_pack_start (GTK_BOX (vbox), priv->attachment_expander, FALSE, FALSE, GNOME_PAD_SMALL);
gtk_widget_show (priv->attachment_expander);
- e_expander_set_expanded (E_EXPANDER (priv->attachment_expander), FALSE);
- g_signal_connect_after (priv->attachment_expander, "activate",
+ e_expander_set_expanded (E_EXPANDER (priv->attachment_expander), FALSE);
+ g_signal_connect_after (priv->attachment_expander, "activate",
G_CALLBACK (attachment_expander_activate_cb), editor);
}
@@ -1617,7 +1617,7 @@ comp_editor_init (CompEditor *editor)
editor->uic = bonobo_ui_component_new_default ();
/* FIXME: handle bonobo exceptions */
bonobo_ui_component_set_container (editor->uic, bonobo_object_corba_objref (BONOBO_OBJECT (container)), NULL);
-
+
bonobo_ui_component_add_verb_list_with_data (editor->uic, verbs, editor);
bonobo_ui_component_freeze (editor->uic, NULL);
@@ -1678,7 +1678,7 @@ comp_editor_finalize (GObject *object)
g_object_unref (priv->client);
priv->client = NULL;
}
-
+
if (priv->source_client) {
g_object_unref (priv->source_client);
priv->source_client = NULL;
@@ -1759,8 +1759,8 @@ close_dialog (CompEditor *editor)
notification back when we are in an inconsistent state */
if (priv->view)
g_signal_handlers_disconnect_matched (G_OBJECT (priv->view),
- G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
-
+ G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
+
gtk_widget_destroy (GTK_WIDGET (editor));
}
@@ -1883,10 +1883,10 @@ comp_editor_get_changed (CompEditor *editor)
return priv->changed;
}
-void
+void
comp_editor_set_flags (CompEditor *editor, CompEditorFlags flags)
{
-
+
CompEditorPrivate *priv;
g_return_if_fail (editor != NULL);
@@ -1898,10 +1898,10 @@ comp_editor_set_flags (CompEditor *editor, CompEditorFlags flags)
}
-CompEditorFlags
+CompEditorFlags
comp_editor_get_flags (CompEditor *editor)
{
-
+
CompEditorPrivate *priv;
g_return_val_if_fail (editor != NULL, FALSE);
@@ -1982,11 +1982,11 @@ static void page_unmapped_cb (GtkWidget *page_widget,
* comp_editor_append_page:
* @editor: A component editor
* @page: A component editor page
- * @label: Label of the page. Should be NULL if add is FALSE.
+ * @label: Label of the page. Should be NULL if add is FALSE.
* @add: Add's the page into the notebook if TRUE
*
* Appends a page to the notebook if add is TRUE else
- * just adds it to the list of pages.
+ * just adds it to the list of pages.
**/
void
comp_editor_append_page (CompEditor *editor,
@@ -2029,7 +2029,7 @@ comp_editor_append_page (CompEditor *editor,
is_first_page = (priv->pages == NULL);
priv->pages = g_list_append (priv->pages, page);
-
+
if (add)
gtk_notebook_append_page (priv->notebook, page_widget, label_widget);
@@ -2085,7 +2085,7 @@ comp_editor_remove_page (CompEditor *editor, CompEditorPage *page)
page_num = gtk_notebook_page_num (priv->notebook, page_widget);
if (page_num == -1)
return;
-
+
/* Disconnect all the signals added in append_page(). */
g_signal_handlers_disconnect_matched (page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
g_signal_handlers_disconnect_matched (page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page);
@@ -2240,7 +2240,7 @@ make_title_from_string (ECalComponent *comp, const char *str, gboolean is_group_
break;
case E_CAL_COMPONENT_TODO:
if (is_group_item)
- type_string = _("Assigned Task - %s");
+ type_string = _("Assigned Task - %s");
else
type_string = _("Task - %s");
break;
@@ -2345,7 +2345,7 @@ attachment_guess_mime_type (const char *file_name)
return type;
}
-static void
+static void
set_attachment_list (CompEditor *editor, GSList *attach_list)
{
GSList *p = NULL;
@@ -2355,10 +2355,10 @@ set_attachment_list (CompEditor *editor, GSList *attach_list)
if (e_attachment_bar_get_num_attachments (E_ATTACHMENT_BAR (editor->priv->attachment_bar))) {
/* To prevent repopulating the
- * bar due to redraw functions in fill_widget.
+ * bar due to redraw functions in fill_widget.
* Assumes it can be set only once.
- */
- return;
+ */
+ return;
}
for (p = attach_list; p != NULL; p = p->next) {
@@ -2367,32 +2367,32 @@ set_attachment_list (CompEditor *editor, GSList *attach_list)
CamelDataWrapper *wrapper;
CamelStream *stream;
struct stat statbuf;
- char *mime_type, *file_name;
+ char *mime_type, *file_name;
char *ptr;
attach_filename = (char *) p->data;
- /* should we assert if g_str_has_prefix (attach_filename, "file://"))
+ /* should we assert if g_str_has_prefix (attach_filename, "file://"))
* here
*/
/* get url sans protocol and add it to the bar.
- * how to set the filename properly */
+ * how to set the filename properly */
file_name = g_filename_from_uri (attach_filename, NULL, NULL);
if (!file_name)
continue;
-
+
if (g_stat (file_name, &statbuf) < 0) {
g_warning ("Cannot attach file %s: %s", file_name, g_strerror (errno));
g_free (file_name);
continue;
}
-
+
/* return if it's not a regular file */
if (!S_ISREG (statbuf.st_mode)) {
g_warning ("Cannot attach file %s: not a regular file", file_name);
g_free (file_name);
return;
}
-
+
stream = camel_stream_fs_new_with_name (file_name, O_RDONLY, 0);
if (!stream) {
g_warning ("Cannot attach file %s: %s", file_name, g_strerror (errno));
@@ -2407,7 +2407,7 @@ set_attachment_list (CompEditor *editor, GSList *attach_list)
} else {
wrapper = camel_data_wrapper_new ();
}
-
+
camel_data_wrapper_construct_from_stream (wrapper, stream);
camel_data_wrapper_set_mime_type (wrapper, mime_type);
g_free (mime_type);
@@ -2418,18 +2418,18 @@ set_attachment_list (CompEditor *editor, GSList *attach_list)
}
camel_object_unref (stream);
-
+
part = camel_mime_part_new ();
camel_medium_set_content_object (CAMEL_MEDIUM (part), wrapper);
camel_object_unref (wrapper);
-
+
camel_mime_part_set_disposition (part, "attachment");
ptr = strstr (file_name, comp_uid);
if (ptr) {
ptr += strlen(comp_uid);
if (*ptr++ == '-')
- camel_mime_part_set_filename (part, ptr);
+ camel_mime_part_set_filename (part, ptr);
}
g_free (file_name);
@@ -2437,7 +2437,7 @@ set_attachment_list (CompEditor *editor, GSList *attach_list)
e_expander_set_expanded (E_EXPANDER (editor->priv->attachment_expander), TRUE);
camel_object_unref (part);
- }
+ }
}
static void
@@ -2455,7 +2455,7 @@ fill_widgets (CompEditor *editor)
set_attachment_list (editor, attachment_list);
g_slist_foreach (attachment_list, (GFunc)g_free, NULL);
g_slist_free (attachment_list);
- }
+ }
for (l = priv->pages; l != NULL; l = l->next)
comp_editor_page_fill_widgets (l->data, priv->comp);
@@ -2499,7 +2499,7 @@ real_edit_comp (CompEditor *editor, ECalComponent *comp)
{
CompEditorPrivate *priv;
const char *uid;
-
+
g_return_if_fail (editor != NULL);
g_return_if_fail (IS_COMP_EDITOR (editor));
@@ -2512,11 +2512,11 @@ real_edit_comp (CompEditor *editor, ECalComponent *comp)
if (comp)
priv->comp = e_cal_component_clone (comp);
-
+
priv->existing_org = e_cal_component_has_organizer (comp);
priv->user_org = (itip_organizer_is_user (comp, priv->client) || itip_sentby_is_user (comp));
priv->warned = FALSE;
-
+
set_title_from_comp (editor);
set_icon_from_comp (editor);
e_cal_component_get_uid (comp, &uid);
@@ -2532,10 +2532,10 @@ real_edit_comp (CompEditor *editor, ECalComponent *comp)
static void
set_attendees_for_delegation (ECalComponent *comp, const char *address, ECalComponentItipMethod method)
{
- icalproperty *prop;
+ icalproperty *prop;
icalparameter *param;
icalcomponent *icalcomp;
-
+
icalcomp = e_cal_component_get_icalcomponent (comp);
for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
@@ -2550,7 +2550,7 @@ set_attendees_for_delegation (ECalComponent *comp, const char *address, ECalComp
((delfrom && *delfrom) &&
g_str_equal (itip_strip_mailto (delfrom), address)))) {
icalcomponent_remove_property (icalcomp, prop);
- }
+ }
}
@@ -2565,8 +2565,8 @@ get_users_from_memo_comp (ECalComponent *comp, GList **users)
char **emails, **iter;
icalcomp = e_cal_component_get_icalcomponent (comp);
-
- for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); icalprop;
+
+ for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY); icalprop;
icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
if (g_str_equal (icalproperty_get_x_name (icalprop), "X-EVOLUTION-RECIPIENTS")) {
break;
@@ -2593,7 +2593,7 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method)
ECalComponent *send_comp;
char *address = NULL;
GList *users = NULL;
-
+
g_return_val_if_fail (editor != NULL, FALSE);
g_return_val_if_fail (IS_COMP_EDITOR (editor), FALSE);
@@ -2601,9 +2601,9 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method)
send_comp = e_cal_component_clone (priv->comp);
- if (e_cal_component_get_vtype (send_comp) == E_CAL_COMPONENT_JOURNAL)
+ if (e_cal_component_get_vtype (send_comp) == E_CAL_COMPONENT_JOURNAL)
get_users_from_memo_comp (send_comp, &users);
-
+
/* The user updates the delegated status to the Organizer, so remove all other attendees */
if ((priv->flags & COMP_EDITOR_DELEGATE)) {
address = itip_get_comp_attendee (send_comp, priv->client);
@@ -2611,7 +2611,7 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method)
if (address)
set_attendees_for_delegation (send_comp, address, method);
}
-
+
if (!e_cal_component_has_attachments (priv->comp)) {
if (itip_send_comp (method, send_comp, priv->client,
NULL, NULL, users)) {
@@ -2624,7 +2624,7 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method)
int num_attachments, i;
GSList *attach_list = NULL;
GSList *mime_attach_list;
-
+
num_attachments = e_cal_component_get_num_attachments (send_comp);
for (i = 0; i < num_attachments ; i++) {
@@ -2645,7 +2645,7 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method)
g_object_unref (send_comp);
g_free (address);
comp_editor_set_changed (editor, TRUE);
-
+
return FALSE;
}
@@ -2689,7 +2689,7 @@ comp_editor_get_comp (CompEditor *editor)
/**
* comp_editor_get_current_comp
- *
+ *
* @param editor
* @param correct Set this no non-NULL if you are interested to know if
* all pages reported success when filling component.
@@ -2771,12 +2771,12 @@ gboolean
comp_editor_close (CompEditor *editor)
{
gboolean close;
-
+
g_return_val_if_fail (editor != NULL, FALSE);
g_return_val_if_fail (IS_COMP_EDITOR (editor), FALSE);
commit_all_fields (editor);
-
+
close = prompt_and_save_changes (editor, TRUE);
if (close)
close_dialog (editor);
@@ -2790,7 +2790,7 @@ comp_editor_close (CompEditor *editor)
* be freed by the caller.
*/
GSList *
-comp_editor_get_mime_attach_list (CompEditor *editor)
+comp_editor_get_mime_attach_list (CompEditor *editor)
{
struct CalMimeAttach *cal_mime_attach;
GSList *attach_list = NULL, *l, *parts;
@@ -2798,7 +2798,7 @@ comp_editor_get_mime_attach_list (CompEditor *editor)
/* TODO assert sanity of bar */
parts = e_attachment_bar_get_parts (E_ATTACHMENT_BAR (editor->priv->attachment_bar));
for (l = parts; l ; l = l->next) {
-
+
CamelDataWrapper *wrapper;
CamelStreamMem *mstream;
unsigned char *buffer = NULL;
@@ -2807,10 +2807,10 @@ comp_editor_get_mime_attach_list (CompEditor *editor)
cal_mime_attach = g_malloc0 (sizeof (struct CalMimeAttach));
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (l->data));
mstream = (CamelStreamMem *) camel_stream_mem_new ();
-
+
camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) mstream);
buffer = g_memdup (mstream->buffer->data, mstream->buffer->len);
-
+
cal_mime_attach->encoded_data = (char *)buffer;
cal_mime_attach->length = mstream->buffer->len;
cal_mime_attach->filename = g_strdup (camel_mime_part_get_filename
@@ -2820,15 +2820,15 @@ comp_editor_get_mime_attach_list (CompEditor *editor)
desc = _("attachment");
cal_mime_attach->description = g_strdup (desc);
cal_mime_attach->content_type = g_strdup (camel_data_wrapper_get_mime_type (wrapper));
-
+
disp = camel_mime_part_get_disposition ((CamelMimePart *)l->data);
- if (disp && !g_ascii_strcasecmp(disp, "inline"))
+ if (disp && !g_ascii_strcasecmp(disp, "inline"))
cal_mime_attach->disposition = TRUE;
-
+
attach_list = g_slist_append (attach_list, cal_mime_attach);
camel_object_unref (mstream);
-
+
}
g_slist_free (parts);
@@ -2864,7 +2864,7 @@ comp_editor_focus (CompEditor *editor)
/**
* comp_editor_notify_client_changed:
* @editor: A component editor.
- *
+ *
* Makes an editor emit the "client_changed" signal.
**/
void
@@ -2880,7 +2880,7 @@ comp_editor_notify_client_changed (CompEditor *editor, ECal *client)
priv = editor->priv;
priv->changed = TRUE;
-
+
g_object_unref (priv->client);
priv->client = client;
@@ -2909,7 +2909,7 @@ page_changed_cb (GtkObject *obj, gpointer data)
_("Changes made to this item may be discarded if an update arrives"));
priv->warned = TRUE;
}
-
+
}
static void
@@ -2921,7 +2921,7 @@ needs_send_cb (GtkObject *obj, gpointer data)
}
/* Focus out widget callback */
-static void
+static void
page_focus_out_widget_cb (GtkObject *obj, GtkWidget *widget, gpointer data)
{
CompEditor *editor = COMP_EDITOR (data);
@@ -2936,7 +2936,7 @@ page_focus_out_widget_cb (GtkObject *obj, GtkWidget *widget, gpointer data)
static void
page_focus_in_widget_cb (GtkObject *obj, GtkWidget *widget, gpointer data)
{
-
+
CompEditor *editor = COMP_EDITOR (data);
CompEditorPrivate *priv;
@@ -3016,7 +3016,7 @@ obj_modified_cb (ECal *client, GList *objects, gpointer data)
_("Unable to use current version!"));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
-
+
icalcomponent_free (icalcomp);
}
diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h
index e761061939..7243808386 100644
--- a/calendar/gui/dialogs/comp-editor.h
+++ b/calendar/gui/dialogs/comp-editor.h
@@ -107,7 +107,7 @@ gboolean comp_editor_save_comp (CompEditor *editor,
void comp_editor_delete_comp (CompEditor *editor);
gboolean comp_editor_send_comp (CompEditor *editor,
ECalComponentItipMethod method);
-GSList *comp_editor_get_mime_attach_list (CompEditor *editor);
+GSList *comp_editor_get_mime_attach_list (CompEditor *editor);
gboolean comp_editor_close (CompEditor *editor);
void comp_editor_focus (CompEditor *editor);
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
index 2644f18c13..8446608222 100644
--- a/calendar/gui/dialogs/delete-comp.c
+++ b/calendar/gui/dialogs/delete-comp.c
@@ -47,11 +47,11 @@
* the component instead.
* @widget: A widget to use as a basis for conversion from UTF8 into font
* encoding.
- *
+ *
* Pops up a dialog box asking the user whether he wants to delete a number of
* calendar components. The dialog will not appear, however, if the
* configuration option for confirmation is turned off.
- *
+ *
* Return value: TRUE if the user clicked Yes, FALSE otherwise. If the
* configuration option for confirmation is turned off, this function will
* unconditionally return TRUE.
@@ -65,7 +65,7 @@ delete_component_dialog (ECalComponent *comp,
const char *id;
char *arg0 = NULL;
int response;
-
+
if (comp) {
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), FALSE);
g_return_val_if_fail (n_comps == 1, FALSE);
@@ -82,14 +82,14 @@ delete_component_dialog (ECalComponent *comp,
if (comp) {
ECalComponentText summary;
-
+
vtype = e_cal_component_get_vtype (comp);
-
+
if (!consider_as_untitled) {
e_cal_component_get_summary (comp, &summary);
arg0 = g_strdup (summary.value);
}
-
+
switch (vtype) {
case E_CAL_COMPONENT_EVENT:
if (arg0)
@@ -146,14 +146,14 @@ delete_component_dialog (ECalComponent *comp,
vtype);
return FALSE;
}
-
+
if (n_comps > 1)
arg0 = g_strdup_printf ("%d", n_comps);
}
-
+
response = e_error_run ((GtkWindow *) gtk_widget_get_toplevel (widget), id, arg0, NULL);
g_free (arg0);
-
+
return response == GTK_RESPONSE_YES;
}
@@ -167,7 +167,7 @@ cb_toggled_cb (GtkWidget *toggle, gpointer data)
gtk_widget_set_sensitive (entry, active);
}
-gboolean
+gboolean
prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *parent)
{
char *message = NULL;
@@ -175,7 +175,7 @@ prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *pare
GtkMessageDialog *dialog = NULL;
GtkWidget *cb, *label, *entry, *vbox, *sw, *frame;
gboolean ret_val = FALSE;
-
+
type = e_cal_component_get_vtype (comp);
switch (type) {
@@ -193,13 +193,13 @@ prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *pare
return FALSE;
}
- dialog = (GtkMessageDialog *) gtk_message_dialog_new_with_markup
- ((GtkWindow *) gtk_widget_get_toplevel (parent), GTK_DIALOG_MODAL,
+ dialog = (GtkMessageDialog *) gtk_message_dialog_new_with_markup
+ ((GtkWindow *) gtk_widget_get_toplevel (parent), GTK_DIALOG_MODAL,
GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, "<b>%s</b>", message);
g_free (message);
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
-
+
gtk_box_set_spacing ((GtkBox *) (GTK_DIALOG (dialog)->vbox), 12);
vbox = GTK_WIDGET (GTK_DIALOG (dialog)->vbox);
@@ -207,7 +207,7 @@ prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *pare
gtk_container_add (GTK_CONTAINER (vbox), cb);
label = gtk_label_new_with_mnemonic ("_Retract comment");
-
+
frame = gtk_frame_new (NULL);
gtk_frame_set_label_widget ((GtkFrame *) frame, label);
gtk_frame_set_label_align ((GtkFrame *) frame, 0, 0);
@@ -216,7 +216,7 @@ prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *pare
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy ((GtkScrolledWindow *)sw, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
+
entry = gtk_text_view_new ();
gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *)sw, entry);
gtk_label_set_mnemonic_widget ((GtkLabel *)label, entry);
@@ -237,7 +237,7 @@ prompt_retract_dialog (ECalComponent *comp, char **retract_text, GtkWidget *pare
gtk_text_buffer_get_start_iter (text_buffer, &text_iter_start);
gtk_text_buffer_get_end_iter (text_buffer, &text_iter_end);
- *retract_text = gtk_text_buffer_get_text (text_buffer, &text_iter_start,
+ *retract_text = gtk_text_buffer_get_text (text_buffer, &text_iter_start,
&text_iter_end, FALSE);
}
}
diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c
index a3bcfb76ee..d8f4df3cfc 100644
--- a/calendar/gui/dialogs/delete-error.c
+++ b/calendar/gui/dialogs/delete-error.c
@@ -33,9 +33,9 @@
/**
* delete_error_dialog:
- *
+ *
* Shows any applicable error messages as the result of deleting and object
- *
+ *
**/
void
delete_error_dialog (GError *error, ECalComponentVType vtype)
@@ -43,10 +43,10 @@ delete_error_dialog (GError *error, ECalComponentVType vtype)
GList *icon_list = NULL;
GtkWidget *dialog;
const char *str;
-
+
if (!error)
return;
-
+
switch (error->code) {
case E_CALENDAR_STATUS_CORBA_EXCEPTION:
switch (vtype) {
@@ -98,11 +98,11 @@ delete_error_dialog (GError *error, ECalComponentVType vtype)
break;
case E_CALENDAR_STATUS_OK:
case E_CALENDAR_STATUS_OBJECT_NOT_FOUND:
- default:
+ default:
/* If not found, we don't care - its gone anyhow */
return;
}
-
+
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK, str);
@@ -110,13 +110,13 @@ delete_error_dialog (GError *error, ECalComponentVType vtype)
icon_list = e_icon_factory_get_icon_list ("stock_calendar");
else if (vtype == E_CAL_COMPONENT_TODO)
icon_list = e_icon_factory_get_icon_list ("stock_todo");
-
+
if (icon_list) {
gtk_window_set_icon_list (GTK_WINDOW (dialog), icon_list);
g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
g_list_free (icon_list);
}
-
+
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c
index 0340194b22..8f2fbb4ed7 100644
--- a/calendar/gui/dialogs/e-delegate-dialog.c
+++ b/calendar/gui/dialogs/e-delegate-dialog.c
@@ -49,7 +49,7 @@ struct _EDelegateDialogPrivate {
GtkWidget *addressbook;
ENameSelector *name_selector;
- GtkWidget *entry;
+ GtkWidget *entry;
};
static const char *section_name = "Delegate To";
@@ -167,7 +167,7 @@ e_delegate_dialog_construct (EDelegateDialog *edd, const char *name, const char
e_name_selector_model_peek_section (name_selector_model, section_name, NULL, &destination_store);
e_destination_store_append_destination (destination_store, dest);
g_object_unref (dest);
-
+
g_signal_connect((priv->addressbook), "clicked",
G_CALLBACK (addressbook_clicked_cb), edd);
@@ -193,7 +193,7 @@ get_widgets (EDelegateDialog *edd)
priv->app = GW ("delegate-dialog");
priv->hbox = GW ("delegate-hbox");
- priv->addressbook = GW ("addressbook");
+ priv->addressbook = GW ("addressbook");
return (priv->app
&& priv->hbox
@@ -206,7 +206,7 @@ addressbook_clicked_cb (GtkWidget *widget, gpointer data)
EDelegateDialog *edd = data;
EDelegateDialogPrivate *priv;
ENameSelectorDialog *name_selector_dialog;
-
+
priv = edd->priv;
name_selector_dialog = e_name_selector_peek_dialog (priv->name_selector);
@@ -251,7 +251,7 @@ e_delegate_dialog_get_delegate (EDelegateDialog *edd)
EDestinationStore *destination_store;
GList *destinations;
EDestination *destination;
-
+
g_return_val_if_fail (edd != NULL, NULL);
g_return_val_if_fail (E_IS_DELEGATE_DIALOG (edd), NULL);
@@ -269,7 +269,7 @@ e_delegate_dialog_get_delegate (EDelegateDialog *edd)
g_free (priv->address);
priv->address = g_strdup (e_destination_get_email (destination));
}
-
+
g_list_free (destinations);
return g_strdup (priv->address);
}
@@ -283,7 +283,7 @@ e_delegate_dialog_get_delegate_name (EDelegateDialog *edd)
EDestinationStore *destination_store;
GList *destinations;
EDestination *destination;
-
+
g_return_val_if_fail (edd != NULL, NULL);
g_return_val_if_fail (E_IS_DELEGATE_DIALOG (edd), NULL);
@@ -301,7 +301,7 @@ e_delegate_dialog_get_delegate_name (EDelegateDialog *edd)
g_free (priv->name);
priv->name = g_strdup (e_destination_get_name (destination));
}
-
+
g_list_free (destinations);
return g_strdup (priv->name);
}
diff --git a/calendar/gui/dialogs/e-send-options-utils.c b/calendar/gui/dialogs/e-send-options-utils.c
index 01fe01529e..2d776c1df6 100644
--- a/calendar/gui/dialogs/e-send-options-utils.c
+++ b/calendar/gui/dialogs/e-send-options-utils.c
@@ -23,8 +23,8 @@
#include <glib.h>
#include <string.h>
-void
-e_sendoptions_utils_set_default_data (ESendOptionsDialog *sod, ESource *source, char * type)
+void
+e_sendoptions_utils_set_default_data (ESendOptionsDialog *sod, ESource *source, char * type)
{
ESendOptionsGeneral *gopts = NULL;
ESendOptionsStatusTracking *sopts;
@@ -32,20 +32,20 @@ e_sendoptions_utils_set_default_data (ESendOptionsDialog *sod, ESource *source,
ESourceList *source_list;
const char *uid;
const char *value;
-
+
gopts = sod->data->gopts;
sopts = sod->data->sopts;
-
+
if (!strcmp (type, "calendar"))
source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources");
- else
+ else
source_list = e_source_list_new_for_gconf (gconf, "/apps/evolution/tasks/sources");
-
+
uid = e_source_peek_uid (source);
source = e_source_list_peek_source_by_uid (source_list, uid);
/* priority */
- value = e_source_get_property (source, "priority");
+ value = e_source_get_property (source, "priority");
if (value) {
if (!strcmp (value, "high"))
gopts->priority = E_PRIORITY_HIGH;
@@ -57,20 +57,20 @@ e_sendoptions_utils_set_default_data (ESendOptionsDialog *sod, ESource *source,
gopts->priority = E_PRIORITY_UNDEFINED;
}
/* Reply requested */
- value = e_source_get_property (source, "reply-requested");
+ value = e_source_get_property (source, "reply-requested");
if (value) {
if (!strcmp (value, "none"))
gopts->reply_enabled = FALSE;
else if (!strcmp (value, "convinient")) {
gopts->reply_enabled = TRUE;
- gopts->reply_convenient = TRUE;
+ gopts->reply_convenient = TRUE;
} else {
gint i = atoi (value);
gopts->reply_within = i;
}
}
/* Delay delivery */
- value = e_source_get_property (source, "delay-delivery");
+ value = e_source_get_property (source, "delay-delivery");
if (value) {
if (!strcmp (value, "none"))
gopts->delay_enabled = FALSE;
@@ -78,9 +78,9 @@ e_sendoptions_utils_set_default_data (ESendOptionsDialog *sod, ESource *source,
gopts->delay_enabled = TRUE;
gopts->delay_until = icaltime_as_timet (icaltime_from_string (value));
}
- }
+ }
/* Expiration Date */
- value = e_source_get_property (source, "expiration");
+ value = e_source_get_property (source, "expiration");
if (value) {
if (!strcmp (value, "none"))
gopts->expiration_enabled = FALSE;
@@ -94,7 +94,7 @@ e_sendoptions_utils_set_default_data (ESendOptionsDialog *sod, ESource *source,
}
}
/* status tracking */
- value = e_source_get_property (source, "status-tracking");
+ value = e_source_get_property (source, "status-tracking");
if (value) {
if (!strcmp (value, "none"))
sopts->tracking_enabled = FALSE;
@@ -110,44 +110,44 @@ e_sendoptions_utils_set_default_data (ESendOptionsDialog *sod, ESource *source,
}
/* Return Notifications */
-
- value = e_source_get_property (source, "return-open");
+
+ value = e_source_get_property (source, "return-open");
if (value) {
if (!strcmp (value, "none"))
sopts->opened = E_RETURN_NOTIFY_NONE;
- else
+ else
sopts->opened = E_RETURN_NOTIFY_MAIL;
}
-
- value = e_source_get_property (source, "return-accept");
+
+ value = e_source_get_property (source, "return-accept");
if (value) {
if (!strcmp (value, "none"))
sopts->accepted = E_RETURN_NOTIFY_NONE;
- else
+ else
sopts->accepted = E_RETURN_NOTIFY_MAIL;
}
- value = e_source_get_property (source, "return-decline");
+ value = e_source_get_property (source, "return-decline");
if (value) {
if (!strcmp (value, "none"))
sopts->declined = E_RETURN_NOTIFY_NONE;
- else
+ else
sopts->declined = E_RETURN_NOTIFY_MAIL;
}
-
- value = e_source_get_property (source, "return-complete");
+
+ value = e_source_get_property (source, "return-complete");
if (value) {
if (!strcmp (value, "none"))
sopts->completed = E_RETURN_NOTIFY_NONE;
- else
+ else
sopts->completed = E_RETURN_NOTIFY_MAIL;
}
g_object_unref (gconf);
}
-void
-e_sendoptions_utils_fill_component (ESendOptionsDialog *sod, ECalComponent *comp)
+void
+e_sendoptions_utils_fill_component (ESendOptionsDialog *sod, ECalComponent *comp)
{
int i = 1;
icalproperty *prop;
@@ -164,19 +164,19 @@ e_sendoptions_utils_fill_component (ESendOptionsDialog *sod, ECalComponent *comp
if (e_sendoptions_get_need_general_options (sod)) {
prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", gopts->priority));
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-PRIORITY");
- icalcomponent_add_property (icalcomp, prop);
+ icalcomponent_add_property (icalcomp, prop);
if (gopts->reply_enabled) {
- if (gopts->reply_convenient)
- prop = icalproperty_new_x ("convenient");
- else
+ if (gopts->reply_convenient)
+ prop = icalproperty_new_x ("convenient");
+ else
prop = icalproperty_new_x ((const char *) g_strdup_printf ( "%d", gopts->reply_within));
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-REPLY");
icalcomponent_add_property (icalcomp, prop);
}
if (gopts->expiration_enabled && gopts->expire_after) {
- prop = icalproperty_new_x ((const char *) g_strdup_printf ( "%d", gopts->expire_after));
+ prop = icalproperty_new_x ((const char *) g_strdup_printf ( "%d", gopts->expire_after));
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-EXPIRE");
icalcomponent_add_property (icalcomp, prop);
}
@@ -184,35 +184,35 @@ e_sendoptions_utils_fill_component (ESendOptionsDialog *sod, ECalComponent *comp
if (gopts->delay_enabled) {
struct icaltimetype temp;
icaltimezone *zone = calendar_config_get_icaltimezone ();
- temp = icaltime_from_timet_with_zone (gopts->delay_until, FALSE, zone);
+ temp = icaltime_from_timet_with_zone (gopts->delay_until, FALSE, zone);
prop = icalproperty_new_x (icaltime_as_ical_string (temp));
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-DELAY");
icalcomponent_add_property (icalcomp, prop);
}
}
-
- if (sopts->tracking_enabled)
- prop = icalproperty_new_x ((const char *) g_strdup_printf ( "%d", sopts->track_when));
+
+ if (sopts->tracking_enabled)
+ prop = icalproperty_new_x ((const char *) g_strdup_printf ( "%d", sopts->track_when));
else
prop = icalproperty_new_x ("0");
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-TRACKINFO");
icalcomponent_add_property (icalcomp, prop);
-
-
- prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->opened));
+
+
+ prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->opened));
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-OPENED");
icalcomponent_add_property (icalcomp, prop);
-
- prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->accepted));
+
+ prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->accepted));
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-ACCEPTED");
icalcomponent_add_property (icalcomp, prop);
- prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->declined));
+ prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->declined));
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-DECLINED");
icalcomponent_add_property (icalcomp, prop);
- prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->completed));
+ prop = icalproperty_new_x ((const char *) g_strdup_printf ("%d", sopts->completed));
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-COMPLETED");
icalcomponent_add_property (icalcomp, prop);
}
diff --git a/calendar/gui/dialogs/e-send-options-utils.h b/calendar/gui/dialogs/e-send-options-utils.h
index a1a2b99842..560a37ea9d 100644
--- a/calendar/gui/dialogs/e-send-options-utils.h
+++ b/calendar/gui/dialogs/e-send-options-utils.h
@@ -26,6 +26,6 @@
#include <libecal/e-cal-component.h>
#include <libedataserver/e-source-list.h>
-void e_sendoptions_utils_set_default_data (ESendOptionsDialog *sod, ESource *source, char* type);
+void e_sendoptions_utils_set_default_data (ESendOptionsDialog *sod, ESource *source, char* type);
void e_sendoptions_utils_fill_component (ESendOptionsDialog *sod, ECalComponent *comp);
#endif
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index eb86ea07b4..e5081f8a34 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -51,7 +51,7 @@ struct _EventEditorPrivate {
EMeetingStore *model;
gboolean is_meeting;
gboolean meeting_shown;
- gboolean updating;
+ gboolean updating;
};
@@ -74,14 +74,14 @@ event_editor_class_init (EventEditorClass *klass)
{
GObjectClass *gobject_class;
CompEditorClass *editor_class;
-
+
gobject_class = (GObjectClass *) klass;
editor_class = (CompEditorClass *) klass;
editor_class->set_e_cal = event_editor_set_e_cal;
editor_class->edit_comp = event_editor_edit_comp;
editor_class->send_comp = event_editor_send_comp;
-
+
gobject_class->finalize = event_editor_finalize;
}
@@ -114,11 +114,11 @@ menu_view_role_cb (BonoboUIComponent *component,
gpointer user_data)
{
EventEditor *ee = (EventEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- event_page_set_view_role (ee->priv->event_page, atoi(state));
- calendar_config_set_show_role (atoi(state));
+ event_page_set_view_role (ee->priv->event_page, atoi(state));
+ calendar_config_set_show_role (atoi(state));
}
static void
@@ -129,12 +129,12 @@ menu_view_status_cb (BonoboUIComponent *component,
gpointer user_data)
{
EventEditor *ee = (EventEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
event_page_set_view_status (ee->priv->event_page, atoi(state));
- calendar_config_set_show_status (atoi(state));
+ calendar_config_set_show_status (atoi(state));
}
static void
@@ -145,11 +145,11 @@ menu_view_type_cb (BonoboUIComponent *component,
gpointer user_data)
{
EventEditor *ee = (EventEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- event_page_set_view_type (ee->priv->event_page, atoi(state));
- calendar_config_set_show_type (atoi(state));
+ event_page_set_view_type (ee->priv->event_page, atoi(state));
+ calendar_config_set_show_type (atoi(state));
}
static void
@@ -160,11 +160,11 @@ menu_view_rsvp_cb (BonoboUIComponent *component,
gpointer user_data)
{
EventEditor *ee = (EventEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- event_page_set_view_rsvp (ee->priv->event_page, atoi(state));
- calendar_config_set_show_rsvp (atoi(state));
+ event_page_set_view_rsvp (ee->priv->event_page, atoi(state));
+ calendar_config_set_show_rsvp (atoi(state));
}
static void
@@ -187,11 +187,11 @@ menu_show_time_busy_cb (BonoboUIComponent *component,
gpointer user_data)
{
EventEditor *ee = (EventEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- event_page_set_show_time_busy (ee->priv->event_page, atoi(state));
+ event_page_set_show_time_busy (ee->priv->event_page, atoi(state));
}
static void
@@ -202,10 +202,10 @@ menu_all_day_event_cb (BonoboUIComponent *component,
gpointer user_data)
{
EventEditor *ee = (EventEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- event_page_set_all_day_event (ee->priv->event_page, atoi(state));
+ event_page_set_all_day_event (ee->priv->event_page, atoi(state));
}
static void
@@ -216,10 +216,10 @@ menu_show_time_zone_cb (BonoboUIComponent *component,
gpointer user_data)
{
EventEditor *ee = (EventEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- event_page_set_show_timezone (ee->priv->event_page, atoi(state));
+ event_page_set_show_timezone (ee->priv->event_page, atoi(state));
calendar_config_set_show_timezone (atoi(state));
}
@@ -231,11 +231,11 @@ menu_show_categories_cb (BonoboUIComponent *component,
gpointer user_data)
{
EventEditor *ee = (EventEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- event_page_set_show_categories (ee->priv->event_page, atoi(state));
+ event_page_set_show_categories (ee->priv->event_page, atoi(state));
calendar_config_set_show_categories (atoi(state));
}
@@ -251,7 +251,7 @@ menu_class_public_cb (BonoboUIComponent *ui_component,
return;
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (ee->priv->event_page));
-
+
event_page_set_classification (ee->priv->event_page, E_CAL_COMPONENT_CLASS_PUBLIC);
}
@@ -265,7 +265,7 @@ menu_class_private_cb (BonoboUIComponent *ui_component,
EventEditor *ee = (EventEditor *) user_data;
if (state[0] == '0')
return;
-
+
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (ee->priv->event_page));
event_page_set_classification (ee->priv->event_page, E_CAL_COMPONENT_CLASS_PRIVATE);
@@ -295,7 +295,7 @@ menu_action_recurrence_cb (BonoboUIComponent *ui_component,
gpointer user_data)
{
EventEditor *ee = (EventEditor *) user_data;
-
+
gtk_widget_show (ee->priv->recur_window);
}
@@ -304,13 +304,13 @@ menu_action_freebusy_cb (BonoboUIComponent *ui_component,
const char *path,
Bonobo_UIComponent_EventType type,
const char *state,
- gpointer user_data)
+ gpointer user_data)
{
EventEditor *ee = (EventEditor *) user_data;
-
- if (!ee->priv->sched_window)
+
+ if (!ee->priv->sched_window)
create_schedule_page (ee);
- else
+ else
gtk_widget_show (ee->priv->sched_window);
}
@@ -329,7 +329,7 @@ menu_all_day_event_cmd (BonoboUIComponent *uic,
void *data,
const char *path)
{
- /* TODO
+ /* TODO
EventEditor *ee = (EventEditor *) data;
event_page_set_all_day_event (ee->priv->event_page, atoi(state));*/
@@ -340,10 +340,10 @@ menu_show_time_zone_cmd (BonoboUIComponent *uic,
void *data,
const char *path)
{
- /* TODO
+ /* TODO
EventEditor *ee = (EventEditor *) data;
-
- event_page_set_show_timezone (ee->priv->event_page, atoi(state));
+
+ event_page_set_show_timezone (ee->priv->event_page, atoi(state));
calendar_config_set_show_timezone (atoi(state)); */
}
@@ -353,7 +353,7 @@ menu_action_recurrence_cmd (BonoboUIComponent *uic,
const char *path)
{
EventEditor *ee = (EventEditor *) data;
-
+
gtk_widget_show (ee->priv->recur_window);
}
@@ -395,9 +395,9 @@ menu_action_freebusy_cmd (BonoboUIComponent *uic,
{
EventEditor *ee = (EventEditor *) data;
- if (!ee->priv->sched_window)
+ if (!ee->priv->sched_window)
create_schedule_page (ee);
- else
+ else
gtk_widget_show (ee->priv->sched_window);
}
@@ -407,18 +407,18 @@ menu_insert_send_options_cmd (BonoboUIComponent *uic,
const char *path)
{
EventEditor *ee = (EventEditor *) data;
-
+
event_page_sendoptions_clicked_cb (ee->priv->event_page);
}
static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("ActionAlarm", menu_action_alarm_cmd),
BONOBO_UI_VERB ("ActionAllDayEvent", menu_all_day_event_cmd),
- BONOBO_UI_VERB ("ViewTimeZone", menu_show_time_zone_cmd),
+ BONOBO_UI_VERB ("ViewTimeZone", menu_show_time_zone_cmd),
BONOBO_UI_VERB ("ActionRecurrence", menu_action_recurrence_cmd),
BONOBO_UI_VERB ("ActionFreeBusy", menu_action_freebusy_cmd),
BONOBO_UI_VERB ("InsertSendOptions", menu_insert_send_options_cmd),
-
+
BONOBO_UI_VERB_END
};
@@ -433,14 +433,14 @@ static EPixmap pixmaps[] = {
E_PIXMAP ("/Toolbar/ActionAlarm", "stock_alarm", E_ICON_SIZE_LARGE_TOOLBAR),
E_PIXMAP ("/Toolbar/ActionAllDayEvent", "stock_new-24h-appointment", E_ICON_SIZE_LARGE_TOOLBAR),
- E_PIXMAP ("/Toolbar/ViewTimeZone", "stock_timezone", E_ICON_SIZE_LARGE_TOOLBAR),
- E_PIXMAP ("/Toolbar/ActionRecurrence", "stock_task-recurring", E_ICON_SIZE_LARGE_TOOLBAR),
+ E_PIXMAP ("/Toolbar/ViewTimeZone", "stock_timezone", E_ICON_SIZE_LARGE_TOOLBAR),
+ E_PIXMAP ("/Toolbar/ActionRecurrence", "stock_task-recurring", E_ICON_SIZE_LARGE_TOOLBAR),
/* These two will have an absolute path to the png file filled
* in at run-time, see event_editor_init().
*/
E_PIXMAP ("/Toolbar/ActionFreeBusy", NULL, E_ICON_SIZE_LARGE_TOOLBAR),
- E_PIXMAP ("/commands/ActionFreeBusy", NULL, E_ICON_SIZE_MENU),
+ E_PIXMAP ("/commands/ActionFreeBusy", NULL, E_ICON_SIZE_MENU),
E_PIXMAP_END
};
@@ -458,7 +458,7 @@ event_editor_init (EventEditor *ee)
priv->model = E_MEETING_STORE (e_meeting_store_new ());
priv->meeting_shown = TRUE;
- priv->updating = FALSE;
+ priv->updating = FALSE;
priv->is_meeting = FALSE;
bonobo_ui_component_freeze (editor->uic, NULL);
@@ -486,7 +486,7 @@ event_editor_init (EventEditor *ee)
bonobo_ui_component_add_listener (
editor->uic, "ViewStatus",
menu_view_status_cb, editor);
-
+
/* Show hide the type fields */
status = calendar_config_get_show_type ();
bonobo_ui_component_set_prop (
@@ -517,15 +517,15 @@ event_editor_init (EventEditor *ee)
bonobo_ui_component_add_listener (
editor->uic, "ActionAlarm",
menu_action_alarm_cb, editor);
-
+
bonobo_ui_component_add_listener (
- editor->uic, "ActionAllDayEvent",
+ editor->uic, "ActionAllDayEvent",
menu_all_day_event_cb, editor);
-
+
bonobo_ui_component_add_listener (
- editor->uic, "ActionShowTimeBusy",
+ editor->uic, "ActionShowTimeBusy",
menu_show_time_busy_cb, editor);
-
+
status = calendar_config_get_show_timezone ();
bonobo_ui_component_set_prop (
editor->uic, "/commands/ViewTimeZone",
@@ -556,10 +556,10 @@ event_editor_init (EventEditor *ee)
menu_class_confidential_cb, editor);
bonobo_ui_component_add_listener (
- editor->uic, "ActionRecurrence",
+ editor->uic, "ActionRecurrence",
menu_action_recurrence_cb, editor);
bonobo_ui_component_add_listener (
- editor->uic, "ActionFreeBusy",
+ editor->uic, "ActionFreeBusy",
menu_action_freebusy_cb, editor);
/* NOTE: Make sure the 6 and 7 below correspond to the correct
@@ -571,14 +571,14 @@ event_editor_init (EventEditor *ee)
}
e_pixmaps_update (editor->uic, pixmaps);
- bonobo_ui_component_thaw (editor->uic, NULL);
+ bonobo_ui_component_thaw (editor->uic, NULL);
comp_editor_set_help_section (COMP_EDITOR (ee), "usage-calendar-apts");
}
/* Handler for the delete event. It hides the window without destroying it.
Connected to the recur dialog and Free busy dialog */
-static gboolean
+static gboolean
window_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
gtk_widget_hide (widget);
@@ -597,7 +597,7 @@ event_editor_construct (EventEditor *ee, ECal *client)
priv->event_page = event_page_new (priv->model, client, COMP_EDITOR(ee)->uic);
g_object_ref_sink (priv->event_page);
- comp_editor_append_page (COMP_EDITOR (ee),
+ comp_editor_append_page (COMP_EDITOR (ee),
COMP_EDITOR_PAGE (priv->event_page),
_("Appoint_ment"), TRUE);
g_signal_connect (G_OBJECT (priv->event_page), "client_changed",
@@ -611,7 +611,7 @@ event_editor_construct (EventEditor *ee, ECal *client)
g_signal_connect ((GtkWidget *) priv->recur_window, "delete-event", G_CALLBACK(window_delete_event), NULL);
priv->recur_page = recurrence_page_new ();
g_object_ref_sink (priv->recur_page);
- gtk_container_add ((GtkContainer *) (GTK_DIALOG (priv->recur_window)->vbox),
+ gtk_container_add ((GtkContainer *) (GTK_DIALOG (priv->recur_window)->vbox),
comp_editor_page_get_widget (COMP_EDITOR_PAGE (priv->recur_page)));
gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (priv->recur_window)));
comp_editor_append_page (COMP_EDITOR (ee), COMP_EDITOR_PAGE (priv->recur_page), NULL, FALSE);
@@ -621,9 +621,9 @@ event_editor_construct (EventEditor *ee, ECal *client)
event_page_show_options (priv->event_page);
comp_editor_set_group_item (COMP_EDITOR (ee), TRUE);
- if (!((flags & COMP_EDITOR_USER_ORG) || (flags & COMP_EDITOR_DELEGATE)|| (flags & COMP_EDITOR_NEW_ITEM)))
+ if (!((flags & COMP_EDITOR_USER_ORG) || (flags & COMP_EDITOR_DELEGATE)|| (flags & COMP_EDITOR_NEW_ITEM)))
bonobo_ui_component_set_prop (editor->uic, "/commands/ActionFreeBusy", "hidden", "1", NULL);
-
+
event_page_set_meeting (priv->event_page, TRUE);
priv->meeting_shown=TRUE;
} else {
@@ -649,14 +649,14 @@ event_editor_set_e_cal (CompEditor *editor, ECal *client)
{
EventEditor *ee;
EventEditorPrivate *priv;
-
+
ee = EVENT_EDITOR (editor);
priv = ee->priv;
e_meeting_store_set_e_cal (priv->model, client);
-
+
if (COMP_EDITOR_CLASS (event_editor_parent_class)->set_e_cal)
- COMP_EDITOR_CLASS (event_editor_parent_class)->set_e_cal (editor, client);
+ COMP_EDITOR_CLASS (event_editor_parent_class)->set_e_cal (editor, client);
}
static void
@@ -669,10 +669,10 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
ECalComponentDateTime dtstart, dtend;
ECal *client;
GSList *attendees = NULL;
-
+
ee = EVENT_EDITOR (editor);
priv = ee->priv;
-
+
priv->updating = TRUE;
delegate = (comp_editor_get_flags (COMP_EDITOR (editor)) & COMP_EDITOR_DELEGATE);
@@ -694,26 +694,26 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
/* Get meeting related stuff */
e_cal_component_get_organizer (comp, &organizer);
e_cal_component_get_attendee_list (comp, &attendees);
-
+
/* Set up the attendees */
if (attendees != NULL) {
GSList *l;
int row;
char *user_email;
- user_email = itip_get_comp_attendee (comp, client);
-
+ user_email = itip_get_comp_attendee (comp, client);
+
if (!priv->meeting_shown) {
bonobo_ui_component_set_prop (editor->uic, "/commands/ActionFreeBusy", "hidden", "0", NULL);
}
-
+
if (!(delegate && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY))) {
for (l = attendees; l != NULL; l = l->next) {
ECalComponentAttendee *ca = l->data;
EMeetingAttendee *ia;
-
+
if (delegate && !g_str_equal (itip_strip_mailto (ca->value), user_email))
continue;
-
+
ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca));
/* If we aren't the organizer or the attendee is just delegated, don't allow editing */
@@ -751,10 +751,10 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
}
}
-
- event_page_set_meeting (priv->event_page, TRUE);
+
+ event_page_set_meeting (priv->event_page, TRUE);
priv->meeting_shown = TRUE;
- }
+ }
e_cal_component_free_attendee_list (attendees);
comp_editor_set_needs_send (COMP_EDITOR (ee), priv->meeting_shown && (itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp)));
@@ -775,12 +775,12 @@ event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method)
if (method == E_CAL_COMPONENT_METHOD_PUBLISH ||
method == E_CAL_COMPONENT_METHOD_CANCEL)
goto parent;
-
+
comp = event_page_get_cancel_comp (priv->event_page);
if (comp != NULL) {
ECal *client;
gboolean result;
-
+
client = e_meeting_store_get_e_cal (priv->model);
result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
client, NULL, NULL, NULL);
@@ -788,7 +788,7 @@ event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method)
if (!result)
return FALSE;
- else
+ else
return TRUE;
}
@@ -816,7 +816,7 @@ event_editor_finalize (GObject *object)
g_object_unref (priv->event_page);
priv->event_page = NULL;
}
-
+
if (priv->recur_page) {
g_object_unref (priv->recur_page);
priv->recur_page = NULL;
@@ -864,13 +864,13 @@ show_meeting (EventEditor *ee)
EventEditorPrivate *priv;
CompEditor *editor = COMP_EDITOR (ee);
CompEditorFlags flags = comp_editor_get_flags (editor);
-
+
priv = ee->priv;
event_page_set_meeting (priv->event_page, TRUE);
if (!priv->meeting_shown) {
bonobo_ui_component_set_prop (editor->uic, "/commands/ActionFreeBusy", "hidden", "0", NULL);
-
+
priv->meeting_shown = TRUE;
comp_editor_set_changed (COMP_EDITOR (ee), FALSE);
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index b9b354f017..a60b87c4c9 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -82,7 +82,7 @@ struct _EventPagePrivate {
EAccountList *accounts;
GList *address_strings;
- EMeetingAttendee *ia;
+ EMeetingAttendee *ia;
char *default_address;
char *user_add;
ECalComponent *comp;
@@ -94,7 +94,7 @@ struct _EventPagePrivate {
/* Lists of attendees */
GPtrArray *deleted_attendees;
-
+
GtkWidget *start_time;
GtkWidget *end_time;
GtkWidget *end_time_selector;
@@ -112,7 +112,7 @@ struct _EventPagePrivate {
GtkWidget *description;
ECalComponentClassification classification;
-
+
gboolean show_time_as_busy;
GtkWidget *alarm_dialog;
@@ -124,7 +124,7 @@ struct _EventPagePrivate {
GtkWidget *categories;
GtkWidget *source_selector;
-
+
/* Meeting related items */
GtkWidget *list_box;
GtkWidget *organizer_table;
@@ -147,14 +147,14 @@ struct _EventPagePrivate {
gboolean updating;
EAlarmList *alarm_list_store;
-
+
gboolean sendoptions_shown;
ESendOptionsDialog *sod;
char *old_summary;
CalUnits alarm_units;
int alarm_interval;
-
+
/* This is TRUE if both the start & end timezone are the same. If the
start timezone is then changed, we updated the end timezone to the
same value, since 99% of events start and end in one timezone. */
@@ -176,7 +176,7 @@ static gboolean event_page_fill_timezones (CompEditorPage *page, GHashTable *tim
static void event_page_set_summary (CompEditorPage *page, const char *summary);
static void event_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates);
static void notify_dates_changed (EventPage *epage, struct icaltimetype *start_tt, struct icaltimetype *end_tt);
-static gboolean check_start_before_end (struct icaltimetype *start_tt, icaltimezone *start_zone,
+static gboolean check_start_before_end (struct icaltimetype *start_tt, icaltimezone *start_zone,
struct icaltimetype *end_tt, icaltimezone *end_zone, gboolean adjust_end_time);
static void set_attendees (ECalComponent *comp, const GPtrArray *attendees);
static void hour_sel_changed ( GtkSpinButton *widget, EventPage *epage);
@@ -258,14 +258,14 @@ event_page_init (EventPage *epage)
priv->ia = NULL;
priv->default_address = NULL;
priv->invite = NULL;
-
+
priv->model = NULL;
priv->list_view = NULL;
-
+
priv->updating = FALSE;
-
+
priv->alarm_interval = -1;
-
+
priv->sendoptions_shown = FALSE;
priv->is_meeting = FALSE;
priv->sync_timezones = FALSE;
@@ -277,7 +277,7 @@ static void
cleanup_attendees (GPtrArray *attendees)
{
int i;
-
+
for (i = 0; i < attendees->len; i++)
g_object_unref (g_ptr_array_index (attendees, i));
}
@@ -295,7 +295,7 @@ event_page_finalize (GObject *object)
epage = EVENT_PAGE (object);
priv = epage->priv;
-
+
for (l = priv->address_strings; l != NULL; l = l->next)
g_free (l->data);
g_list_free (priv->address_strings);
@@ -305,7 +305,7 @@ event_page_finalize (GObject *object)
cleanup_attendees (priv->deleted_attendees);
g_ptr_array_free (priv->deleted_attendees, TRUE);
-
+
if (priv->main)
g_object_unref (priv->main);
@@ -446,7 +446,7 @@ set_all_day (EventPage *epage, gboolean all_day)
priv = epage->priv;
set_all_day_event_menu (epage, all_day);
-
+
/* TODO implement for in end time selector */
if (all_day)
gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 1);
@@ -476,7 +476,7 @@ update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentD
if (!e_cal_get_timezone (COMP_EDITOR_PAGE (epage)->client,
start_date->tzid, &start_zone, NULL)) {
g_warning ("Couldn't get timezone from server: %s",
- start_date->tzid ? start_date->tzid : "");
+ start_date->tzid ? start_date->tzid : "");
}
}
@@ -490,7 +490,7 @@ update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentD
*end_tt = *start_tt;
icaltime_adjust (end_tt, 1, 0, 0, 0);
}
-
+
if (start_tt->is_date && end_tt->is_date) {
all_day_event = TRUE;
if (icaltime_compare_date_only (*end_tt, *start_tt) > 0) {
@@ -527,23 +527,23 @@ update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentD
are the same. */
g_signal_handlers_block_matched (priv->start_timezone, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
g_signal_handlers_block_matched (priv->end_timezone, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
-
+
if (start_zone)
e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->start_timezone),
start_zone);
def_zone = calendar_config_get_icaltimezone ();
if (!def_zone || !start_zone || strcmp (icaltimezone_get_tzid(def_zone), icaltimezone_get_tzid (start_zone)))
homezone = FALSE;
-
+
event_page_set_show_timezone (epage, (calendar_config_get_show_timezone()|| !homezone) & !all_day_event);
-
+
/*unblock the endtimezone widget*/
g_signal_handlers_unblock_matched (priv->end_timezone, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
g_signal_handlers_unblock_matched (priv->start_timezone, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
- priv->sync_timezones = TRUE;
+ priv->sync_timezones = TRUE;
- update_end_time_selector (epage);
+ update_end_time_selector (epage);
}
/* Fills the widgets with default values */
@@ -582,13 +582,13 @@ clear_widgets (EventPage *epage)
/* Alarm */
e_dialog_option_menu_set (priv->alarm_time, ALARM_NONE, alarm_map);
-
+
/* Categories */
e_dialog_editable_set (priv->categories, NULL);
}
static gboolean
-is_custom_alarm (ECalComponentAlarm *ca, char *old_summary, CalUnits user_units, int user_interval, int *alarm_type)
+is_custom_alarm (ECalComponentAlarm *ca, char *old_summary, CalUnits user_units, int user_interval, int *alarm_type)
{
ECalComponentAlarmTrigger trigger;
ECalComponentAlarmRepeat repeat;
@@ -598,7 +598,7 @@ is_custom_alarm (ECalComponentAlarm *ca, char *old_summary, CalUnits user_units,
icalproperty *icalprop;
icalattach *attach;
gboolean needs_desc = FALSE;
-
+
e_cal_component_alarm_get_action (ca, &action);
if (action != E_CAL_COMPONENT_ALARM_DISPLAY)
return TRUE;
@@ -619,7 +619,7 @@ is_custom_alarm (ECalComponentAlarm *ca, char *old_summary, CalUnits user_units,
icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY);
}
- if (!needs_desc) {
+ if (!needs_desc) {
e_cal_component_alarm_get_description (ca, &desc);
if (!desc.value || !old_summary || strcmp (desc.value, old_summary))
return TRUE;
@@ -628,14 +628,14 @@ is_custom_alarm (ECalComponentAlarm *ca, char *old_summary, CalUnits user_units,
e_cal_component_alarm_get_repeat (ca, &repeat);
if (repeat.repetitions != 0)
return TRUE;
-
+
if (e_cal_component_alarm_has_attendees (ca))
return TRUE;
-
+
e_cal_component_alarm_get_trigger (ca, &trigger);
if (trigger.type != E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START)
return TRUE;
-
+
if (trigger.u.rel_duration.is_neg != 1)
return TRUE;
@@ -652,7 +652,7 @@ is_custom_alarm (ECalComponentAlarm *ca, char *old_summary, CalUnits user_units,
*alarm_type = ALARM_1_DAY;
return FALSE;
}
-
+
if (trigger.u.rel_duration.days == 0
&& trigger.u.rel_duration.hours == 1
&& trigger.u.rel_duration.minutes == 0) {
@@ -660,47 +660,47 @@ is_custom_alarm (ECalComponentAlarm *ca, char *old_summary, CalUnits user_units,
*alarm_type = ALARM_1_HOUR;
return FALSE;
}
-
+
if (trigger.u.rel_duration.days == 0
&& trigger.u.rel_duration.hours == 0
&& trigger.u.rel_duration.minutes == 15) {
if (alarm_type)
- *alarm_type = ALARM_15_MINUTES;
+ *alarm_type = ALARM_15_MINUTES;
return FALSE;
}
if (user_interval != -1) {
switch (user_units) {
- case CAL_DAYS:
+ case CAL_DAYS:
if (trigger.u.rel_duration.days == user_interval
&& trigger.u.rel_duration.hours == 0
&& trigger.u.rel_duration.minutes == 0) {
if (alarm_type)
- *alarm_type = ALARM_USER_TIME;
+ *alarm_type = ALARM_USER_TIME;
return FALSE;
}
break;
-
+
case CAL_HOURS:
if (trigger.u.rel_duration.days == 0
&& trigger.u.rel_duration.hours == user_interval
&& trigger.u.rel_duration.minutes == 0) {
if (alarm_type)
- *alarm_type = ALARM_USER_TIME;
+ *alarm_type = ALARM_USER_TIME;
return FALSE;
}
break;
-
+
case CAL_MINUTES:
if (trigger.u.rel_duration.days == 0
&& trigger.u.rel_duration.hours == 0
&& trigger.u.rel_duration.minutes == user_interval) {
if (alarm_type)
- *alarm_type = ALARM_USER_TIME;
+ *alarm_type = ALARM_USER_TIME;
return FALSE;
}
break;
- }
+ }
}
return TRUE;
@@ -711,7 +711,7 @@ is_custom_alarm_uid_list (ECalComponent *comp, GList *alarms, char *old_summary,
{
ECalComponentAlarm *ca;
gboolean result;
-
+
if (g_list_length (alarms) > 1)
return TRUE;
@@ -723,13 +723,13 @@ is_custom_alarm_uid_list (ECalComponent *comp, GList *alarms, char *old_summary,
}
static gboolean
-is_custom_alarm_store (EAlarmList *alarm_list_store, char *old_summary, CalUnits user_units, int user_interval, int *alarm_type)
+is_custom_alarm_store (EAlarmList *alarm_list_store, char *old_summary, CalUnits user_units, int user_interval, int *alarm_type)
{
const ECalComponentAlarm *alarm;
GtkTreeModel *model;
GtkTreeIter iter;
gboolean valid_iter;
-
+
model = GTK_TREE_MODEL (alarm_list_store);
valid_iter = gtk_tree_model_get_iter_first (model, &iter);
@@ -743,7 +743,7 @@ is_custom_alarm_store (EAlarmList *alarm_list_store, char *old_summary, CalUnit
valid_iter = gtk_tree_model_iter_next (model, &iter);
if (valid_iter)
return TRUE;
-
+
return FALSE;
}
@@ -779,7 +779,7 @@ event_page_set_view_rsvp (EventPage *epage, gboolean state)
e_meeting_list_view_column_set_visible (priv->list_view, "RSVP", state);
}
-void
+void
event_page_set_classification (EventPage *epage, ECalComponentClassification class)
{
epage->priv->classification = class;
@@ -790,7 +790,7 @@ create_image_event_box (const char *image_text, const char *tip_text)
{
GtkWidget *image, *box;
GtkTooltips *tip;
-
+
box = gtk_event_box_new ();
tip = gtk_tooltips_new ();
image = e_icon_factory_get_image (image_text, E_ICON_SIZE_MENU);
@@ -799,7 +799,7 @@ create_image_event_box (const char *image_text, const char *tip_text)
gtk_widget_show_all (box);
gtk_tooltips_set_tip (tip, box, tip_text, NULL);
- return box;
+ return box;
}
static void
@@ -807,36 +807,36 @@ sensitize_widgets (EventPage *epage)
{
gboolean read_only, custom, alarm, sens = TRUE, sensitize;
EventPagePrivate *priv;
- gboolean delegate;
-
+ gboolean delegate;
+
priv = epage->priv;
if (COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_MEETING)
sens = COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_USER_ORG;
if (!e_cal_is_read_only (COMP_EDITOR_PAGE (epage)->client, &read_only, NULL))
read_only = TRUE;
-
+
delegate = COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_DELEGATE;
-
+
sensitize = !read_only && sens;
alarm = e_dialog_option_menu_get (priv->alarm_time, alarm_map) != ALARM_NONE;
- custom = is_custom_alarm_store (priv->alarm_list_store, priv->old_summary, priv->alarm_units, priv->alarm_interval, NULL) ||
+ custom = is_custom_alarm_store (priv->alarm_list_store, priv->old_summary, priv->alarm_units, priv->alarm_interval, NULL) ||
e_dialog_option_menu_get (priv->alarm_time, alarm_map) == ALARM_CUSTOM ? TRUE:FALSE;
if (alarm && !priv->alarm_icon) {
priv->alarm_icon = create_image_event_box ("stock_bell", _("This event has alarms"));
gtk_box_pack_start ((GtkBox *)priv->status_icons, priv->alarm_icon, FALSE, FALSE, 6);
}
-
- /* The list of organizers is set to be non-editable. Otherwise any
- * change in the displayed list causes an 'Account not found' error.
+
+ /* The list of organizers is set to be non-editable. Otherwise any
+ * change in the displayed list causes an 'Account not found' error.
*/
gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->organizer)->entry), FALSE);
gtk_editable_set_editable (GTK_EDITABLE (priv->summary), !read_only);
gtk_editable_set_editable (GTK_EDITABLE (priv->location), sensitize);
- gtk_widget_set_sensitive (priv->alarm_box, custom);
+ gtk_widget_set_sensitive (priv->alarm_box, custom);
gtk_widget_set_sensitive (priv->start_time, sensitize);
gtk_widget_set_sensitive (priv->start_timezone, sensitize);
gtk_widget_set_sensitive (priv->end_time, sensitize);
@@ -848,9 +848,9 @@ sensitize_widgets (EventPage *epage)
if ( (COMP_EDITOR_PAGE(epage)->flags) & COMP_EDITOR_PAGE_NEW_ITEM ) {
if (priv->all_day_event)
gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 1);
- else
+ else
gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 0);
- } else
+ } else
gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 1);
gtk_widget_set_sensitive (priv->hour_selector, sensitize);
@@ -868,7 +868,7 @@ sensitize_widgets (EventPage *epage)
e_meeting_list_view_set_editable (priv->list_view, (!read_only && sens) || delegate);
gtk_widget_set_sensitive (priv->remove, (!read_only && sens) || delegate);
gtk_widget_set_sensitive (priv->invite, (!read_only && sens) || delegate);
- gtk_widget_set_sensitive (GTK_WIDGET (priv->list_view), !read_only);
+ gtk_widget_set_sensitive (GTK_WIDGET (priv->list_view), !read_only);
bonobo_ui_component_set_prop (priv->uic, "/commands/InsertAttachments", "sensitive", sensitize ? "1" : "0"
, NULL);
@@ -905,9 +905,9 @@ sensitize_widgets (EventPage *epage)
gtk_widget_show (priv->list_box);
gtk_widget_show (priv->attendee_box);
gtk_widget_show (priv->organizer);
- gtk_label_set_text_with_mnemonic ((GtkLabel *) priv->org_cal_label, _("Or_ganizer:"));
+ gtk_label_set_text_with_mnemonic ((GtkLabel *) priv->org_cal_label, _("Or_ganizer:"));
}
-
+
}
void
@@ -928,7 +928,7 @@ event_page_show_options (EventPage *page)
page->priv->sendoptions_shown = TRUE;
}
-void
+void
event_page_set_meeting (EventPage *page, gboolean set)
{
g_return_if_fail (IS_EVENT_PAGE (page));
@@ -937,7 +937,7 @@ event_page_set_meeting (EventPage *page, gboolean set)
sensitize_widgets (page);
}
-void
+void
event_page_set_delegate (EventPage *page, gboolean set)
{
g_return_if_fail (IS_EVENT_PAGE (page));
@@ -950,17 +950,17 @@ event_page_set_delegate (EventPage *page, gboolean set)
static EAccount *
get_current_account (EventPage *epage)
-{
+{
EventPagePrivate *priv;
EIterator *it;
const char *str;
-
+
priv = epage->priv;
str = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry));
if (!str)
return NULL;
-
+
for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) {
EAccount *a = (EAccount *)e_iterator_get(it);
char *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
@@ -971,12 +971,12 @@ get_current_account (EventPage *epage)
return a;
}
-
+
g_free (full);
}
g_object_unref (it);
-
- return NULL;
+
+ return NULL;
}
/* fill_widgets handler for the event page */
@@ -994,7 +994,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
gchar *backend_addr = NULL;
GSList *l;
gboolean validated = TRUE;
-
+
g_return_val_if_fail (page->client != NULL, FALSE);
epage = EVENT_PAGE (page);
@@ -1005,15 +1005,15 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* Don't send off changes during this time */
priv->updating = TRUE;
-
+
/* Clean out old data */
if (priv->comp != NULL)
g_object_unref (priv->comp);
priv->comp = NULL;
-
+
cleanup_attendees (priv->deleted_attendees);
g_ptr_array_set_size (priv->deleted_attendees, 0);
-
+
/* Clean the page */
clear_widgets (epage);
@@ -1021,18 +1021,18 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* Component for cancellation */
priv->comp = e_cal_component_clone (comp);
-
+
e_cal_component_get_summary (comp, &text);
e_dialog_editable_set (priv->summary, text.value);
priv->old_summary = g_strdup (text.value);
-
+
e_cal_component_get_location (comp, &location);
e_dialog_editable_set (priv->location, location);
e_cal_component_get_description_list (comp, &l);
if (l && l->data) {
ECalComponentText *dtext;
-
+
dtext = l->data;
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
dtext->value ? dtext->value : "", -1);
@@ -1043,9 +1043,9 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
set_subscriber_info_string (epage, backend_addr);
if (priv->is_meeting) {
- ECalComponentOrganizer organizer;
+ ECalComponentOrganizer organizer;
- priv->user_add = itip_get_comp_attendee (comp, COMP_EDITOR_PAGE (epage)->client);
+ priv->user_add = itip_get_comp_attendee (comp, COMP_EDITOR_PAGE (epage)->client);
/* Organizer strings */
event_page_select_organizer (epage, backend_addr);
@@ -1057,7 +1057,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
const gchar *strip = itip_strip_mailto (organizer.value);
gchar *string;
GList *list = NULL;
-
+
if (itip_organizer_is_user (comp, page->client) || itip_sentby_is_user (comp)) {
if (e_cal_get_static_capability (
page->client,
@@ -1105,7 +1105,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
if (!(backend_addr && *backend_addr) || !g_ascii_strcasecmp (backend_addr, a->id->address)) {
e_meeting_attendee_set_address (priv->ia, g_strdup_printf ("MAILTO:%s", a->id->address));
e_meeting_attendee_set_cn (priv->ia, g_strdup (a->id->name));
- } else {
+ } else {
e_meeting_attendee_set_address (priv->ia, g_strdup_printf ("MAILTO:%s", backend_addr));
e_meeting_attendee_set_sentby (priv->ia, g_strdup_printf ("MAILTO:%s", a->id->address));
}
@@ -1120,7 +1120,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
}
}
- if (backend_addr)
+ if (backend_addr)
g_free (backend_addr);
/* Start and end times */
@@ -1134,7 +1134,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
validated = FALSE;
} else
update_time (epage, &start_date, &end_date);
-
+
e_cal_component_free_datetime (&start_date);
e_cal_component_free_datetime (&end_date);
@@ -1175,22 +1175,22 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* Alarms */
g_signal_handlers_block_matched (priv->alarm_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
g_signal_handlers_block_matched (priv->alarm_list_store, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
-
+
if (e_cal_component_has_alarms (comp)) {
GList *alarms, *list;
int alarm_type;
-
+
alarms = e_cal_component_get_alarm_uids (comp);
if (!is_custom_alarm_uid_list (comp, alarms, priv->old_summary, priv->alarm_units, priv->alarm_interval, &alarm_type))
e_dialog_option_menu_set (priv->alarm_time, alarm_type, alarm_map);
- else
+ else
e_dialog_option_menu_set (priv->alarm_time, ALARM_CUSTOM, alarm_map);
-
+
for (list = alarms; list != NULL; list = list->next) {
ECalComponentAlarm *ca;
-
+
ca = e_cal_component_get_alarm (comp, list->data);
- e_alarm_list_append (priv->alarm_list_store, NULL, ca);
+ e_alarm_list_append (priv->alarm_list_store, NULL, ca);
e_cal_component_alarm_free (ca);
}
@@ -1204,14 +1204,14 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* Categories */
e_cal_component_get_categories (comp, &categories);
e_dialog_editable_set (priv->categories, categories);
-
+
/* Source */
e_source_combo_box_set_active (
E_SOURCE_COMBO_BOX (priv->source_selector),
e_cal_get_source (page->client));
e_cal_component_get_uid (comp, &uid);
- if (!(COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_DELEGATE)
+ if (!(COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_DELEGATE)
&& !(COMP_EDITOR_PAGE (epage)->flags && COMP_EDITOR_PAGE_NEW_ITEM)) {
event_page_hide_options (epage);
}
@@ -1377,7 +1377,7 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
e_cal_component_set_transparency (comp, busy ? E_CAL_COMPONENT_TRANSP_OPAQUE : E_CAL_COMPONENT_TRANSP_TRANSPARENT);
/* send options */
- if (priv->sendoptions_shown && priv->sod)
+ if (priv->sendoptions_shown && priv->sod)
e_sendoptions_utils_fill_component (priv->sod, comp);
/* Alarm */
@@ -1389,19 +1389,19 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
gboolean valid_iter;
model = GTK_TREE_MODEL (priv->alarm_list_store);
-
+
for (valid_iter = gtk_tree_model_get_iter_first (model, &iter); valid_iter;
valid_iter = gtk_tree_model_iter_next (model, &iter)) {
ECalComponentAlarm *alarm, *alarm_copy;
icalcomponent *icalcomp;
icalproperty *icalprop;
-
+
alarm = (ECalComponentAlarm *) e_alarm_list_get_alarm (priv->alarm_list_store, &iter);
if (!alarm) {
g_warning ("alarm is NULL\n");
continue;
}
-
+
/* We set the description of the alarm if it's got
* the X-EVOLUTION-NEEDS-DESCRIPTION property.
*/
@@ -1438,51 +1438,51 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
int alarm_type;
ca = e_cal_component_alarm_new ();
-
+
e_cal_component_get_summary (comp, &summary);
-
+
if (summary.value)
e_cal_component_alarm_set_description (ca, &summary);
-
+
e_cal_component_alarm_set_action (ca, E_CAL_COMPONENT_ALARM_DISPLAY);
memset (&trigger, 0, sizeof (ECalComponentAlarmTrigger));
- trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
+ trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
trigger.u.rel_duration.is_neg = 1;
-
+
alarm_type = e_dialog_option_menu_get (priv->alarm_time, alarm_map);
switch (alarm_type) {
case ALARM_15_MINUTES:
trigger.u.rel_duration.minutes = 15;
break;
-
+
case ALARM_1_HOUR:
trigger.u.rel_duration.hours = 1;
break;
-
+
case ALARM_1_DAY:
trigger.u.rel_duration.days = 1;
break;
case ALARM_USER_TIME:
switch (calendar_config_get_default_reminder_units ()) {
- case CAL_DAYS:
+ case CAL_DAYS:
trigger.u.rel_duration.days = priv->alarm_interval;
break;
-
+
case CAL_HOURS:
trigger.u.rel_duration.hours = priv->alarm_interval;
break;
-
+
case CAL_MINUTES:
trigger.u.rel_duration.minutes = priv->alarm_interval;
break;
}
break;
-
+
default:
break;
- }
+ }
e_cal_component_alarm_set_trigger (ca, trigger);
e_cal_component_add_alarm (comp, ca);
@@ -1495,9 +1495,9 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
if (!priv->existing) {
EAccount *a;
gchar *backend_addr = NULL, *org_addr = NULL, *sentby = NULL;
-
+
e_cal_get_cal_address (priv->client, &backend_addr, NULL);
-
+
/* Find the identity for the organizer or sentby field */
a = get_current_account (epage);
@@ -1505,14 +1505,14 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
if (a == NULL) {
e_notice (page, GTK_MESSAGE_ERROR,
_("The organizer selected no longer has an account."));
- return FALSE;
+ return FALSE;
}
if (a->id->address == NULL || strlen (a->id->address) == 0) {
e_notice (page, GTK_MESSAGE_ERROR,
_("An organizer is required."));
return FALSE;
- }
+ }
if (!(backend_addr && *backend_addr) || !g_ascii_strcasecmp (backend_addr, a->id->address)) {
org_addr = g_strdup_printf ("MAILTO:%s", a->id->address);
@@ -1569,7 +1569,7 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
}
e_cal_component_set_attendee_list (comp, attendee_list);
e_cal_component_free_attendee_list (attendee_list);
- } else
+ } else
set_attendees (comp, e_meeting_store_get_attendees (priv->model));
}
@@ -1613,7 +1613,7 @@ event_page_set_summary (CompEditorPage *page, const char *summary)
static void
event_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
-{
+{
update_time (EVENT_PAGE (page), dates->start, dates->end);
}
@@ -1665,7 +1665,7 @@ void update_end_time_selector (EventPage *epage)
e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
&end_tt.hour,
&end_tt.minute);
-
+
end_timet = icaltime_as_timet (end_tt);
start_timet = icaltime_as_timet (start_tt);
@@ -1726,7 +1726,7 @@ edit_clicked_cb (GtkButton *btn, EventPage *epage)
GtkTreePath *path = NULL;
GtkTreeViewColumn *focus_col;
gint row = 0;
-
+
priv = epage->priv;
gtk_tree_view_get_cursor (GTK_TREE_VIEW (priv->list_view), &path, NULL);
@@ -1754,16 +1754,16 @@ add_clicked_cb (GtkButton *btn, EventPage *epage)
}
static gboolean
-existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
+existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
{
GSList *attendees, *l;
const gchar *ia_address;
const gchar *ia_sentby = NULL;
-
+
ia_address = itip_strip_mailto (e_meeting_attendee_get_address (ia));
if (!ia_address)
return FALSE;
-
+
if (e_meeting_attendee_is_set_sentby (ia))
ia_sentby = itip_strip_mailto (e_meeting_attendee_get_sentby (ia));
@@ -1773,7 +1773,7 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
ECalComponentAttendee *attendee = l->data;
const char *address;
const char *sentby = NULL;
-
+
address = itip_strip_mailto (attendee->value);
if (attendee->sentby)
sentby = itip_strip_mailto (attendee->sentby);
@@ -1783,19 +1783,19 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
return TRUE;
}
}
-
+
e_cal_component_free_attendee_list (attendees);
-
+
return FALSE;
}
static void
-remove_attendee (EventPage *epage, EMeetingAttendee *ia)
+remove_attendee (EventPage *epage, EMeetingAttendee *ia)
{
EventPagePrivate *priv;
int pos = 0;
gboolean delegate = (COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_DELEGATE);
-
+
priv = epage->priv;
/* If the user deletes the organizer attendee explicitly,
@@ -1803,22 +1803,22 @@ remove_attendee (EventPage *epage, EMeetingAttendee *ia)
if (ia == priv->ia) {
g_object_unref (priv->ia);
priv->ia = NULL;
- }
-
+ }
+
/* If this was a delegatee, no longer delegate */
if (e_meeting_attendee_is_set_delfrom (ia)) {
EMeetingAttendee *ib;
-
+
ib = e_meeting_store_find_attendee (priv->model, e_meeting_attendee_get_delfrom (ia), &pos);
if (ib != NULL) {
e_meeting_attendee_set_delto (ib, NULL);
-
- if (!delegate)
+
+ if (!delegate)
e_meeting_attendee_set_edit_level (ib, E_MEETING_ATTENDEE_EDIT_FULL);
- }
+ }
}
-
- /* Handle deleting all attendees in the delegation chain */
+
+ /* Handle deleting all attendees in the delegation chain */
while (ia != NULL) {
EMeetingAttendee *ib = NULL;
@@ -1826,16 +1826,16 @@ remove_attendee (EventPage *epage, EMeetingAttendee *ia)
g_object_ref (ia);
g_ptr_array_add (priv->deleted_attendees, ia);
}
-
+
if (e_meeting_attendee_get_delto (ia) != NULL)
ib = e_meeting_store_find_attendee (priv->model, e_meeting_attendee_get_delto (ia), NULL);
-
+
e_meeting_list_view_remove_attendee_from_name_selector (priv->list_view, ia);
e_meeting_store_remove_attendee (priv->model, ia);
ia = ib;
}
-
+
sensitize_widgets (epage);
}
@@ -1851,7 +1851,7 @@ remove_clicked_cb (GtkButton *btn, EventPage *epage)
GtkTreeModel *model = NULL;
gboolean valid_iter;
char *address;
-
+
priv = epage->priv;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list_view));
@@ -1861,10 +1861,10 @@ remove_clicked_cb (GtkButton *btn, EventPage *epage)
return;
}
paths = g_list_reverse (paths);
-
+
for (tmp = paths; tmp; tmp=tmp->next) {
path = tmp->data;
-
+
gtk_tree_model_get_iter (GTK_TREE_MODEL(priv->model), &iter, path);
gtk_tree_model_get (GTK_TREE_MODEL (priv->model), &iter, E_MEETING_STORE_ADDRESS_COL, &address, -1);
@@ -1874,35 +1874,35 @@ remove_clicked_cb (GtkButton *btn, EventPage *epage)
g_warning ("Cannot delete attendee\n");
continue;
} else if (e_meeting_attendee_get_edit_level (ia) != E_MEETING_ATTENDEE_EDIT_FULL) {
- g_warning("Not enough rights to delete attendee: %s\n", e_meeting_attendee_get_address(ia));
+ g_warning("Not enough rights to delete attendee: %s\n", e_meeting_attendee_get_address(ia));
continue;
}
-
+
remove_attendee (epage, ia);
}
-
+
/* Select closest item after removal */
valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path);
if (!valid_iter) {
gtk_tree_path_prev (path);
valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path);
}
-
+
if (valid_iter) {
gtk_tree_selection_unselect_all (selection);
gtk_tree_selection_select_iter (selection, &iter);
}
-
+
g_list_foreach (paths, (GFunc) gtk_tree_path_free, NULL);
g_list_free (paths);
}
static void
-invite_cb (GtkWidget *widget, gpointer data)
+invite_cb (GtkWidget *widget, gpointer data)
{
EventPage *page;
EventPagePrivate *priv;
-
+
page = EVENT_PAGE (data);
priv = page->priv;
@@ -1912,7 +1912,7 @@ invite_cb (GtkWidget *widget, gpointer data)
static void
attendee_added_cb (EMeetingListView *emlv, EMeetingAttendee *ia, gpointer user_data)
{
- EventPage *epage = EVENT_PAGE (user_data);
+ EventPage *epage = EVENT_PAGE (user_data);
EventPagePrivate *priv;
gboolean delegate = (COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_DELEGATE);
@@ -1922,15 +1922,15 @@ attendee_added_cb (EMeetingListView *emlv, EMeetingAttendee *ia, gpointer user_d
if (existing_attendee (ia, priv->comp))
e_meeting_store_remove_attendee (priv->model, ia);
else {
- if (!e_cal_get_static_capability (COMP_EDITOR_PAGE(epage)->client,
+ if (!e_cal_get_static_capability (COMP_EDITOR_PAGE(epage)->client,
CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) {
const char *delegator_id = e_meeting_attendee_get_delfrom (ia);
EMeetingAttendee *delegator;
delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL);
- e_meeting_attendee_set_delto (delegator,
+ e_meeting_attendee_set_delto (delegator,
g_strdup (e_meeting_attendee_get_address (ia)));
-
+
e_meeting_attendee_set_delfrom (ia, g_strdup_printf ("MAILTO:%s", delegator_id));
gtk_widget_set_sensitive (priv->invite, FALSE);
gtk_widget_set_sensitive (priv->add, FALSE);
@@ -1954,7 +1954,7 @@ static void
popup_delete_cb (EPopup *ep, EPopupItem *pitem, void *data)
{
EventPage *epage = data;
-
+
remove_clicked_cb (NULL, epage);
}
@@ -1967,7 +1967,7 @@ enum {
static EPopupItem context_menu_items[] = {
{ E_POPUP_ITEM, "10.delete", N_("_Remove"), popup_delete_cb, NULL, GTK_STOCK_REMOVE, ATTENDEE_CAN_DELETE },
- { E_POPUP_ITEM, "15.add", N_("_Add "), popup_add_cb, NULL, GTK_STOCK_ADD, ATTENDEE_CAN_ADD },
+ { E_POPUP_ITEM, "15.add", N_("_Add "), popup_add_cb, NULL, GTK_STOCK_ADD, ATTENDEE_CAN_ADD },
};
static void
@@ -2000,7 +2000,7 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, EventPage *epage)
GtkTreeSelection *selection;
if (gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path)) {
-
+
gtk_tree_model_get (GTK_TREE_MODEL (priv->model), &iter, E_MEETING_STORE_ADDRESS_COL, &address, -1);
ia = e_meeting_store_find_attendee (priv->model, address, &priv->row);
g_free (address);
@@ -2009,7 +2009,7 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, EventPage *epage)
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list_view));
gtk_tree_selection_unselect_all (selection);
gtk_tree_selection_select_path (selection, path);
-
+
if (e_meeting_attendee_get_edit_level (ia) == E_MEETING_ATTENDEE_EDIT_FULL)
disable_mask &= ~ATTENDEE_CAN_DELETE;
}
@@ -2025,7 +2025,7 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, EventPage *epage)
for (i=0;i<sizeof(context_menu_items)/sizeof(context_menu_items[0]);i++)
menus = g_slist_prepend(menus, &context_menu_items[i]);
-
+
e_popup_add_items((EPopup *)ep, menus, NULL, context_popup_free, epage);
menu = e_popup_create_menu_once((EPopup *)ep, NULL, disable_mask);
gtk_menu_popup (menu, NULL, NULL, NULL, NULL, event->button, event->time);
@@ -2035,9 +2035,9 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, EventPage *epage)
static gboolean
list_view_event (EMeetingListView *list_view, GdkEvent *event, EventPage *epage) {
-
+
EventPagePrivate *priv= epage->priv;
-
+
if (event->type == GDK_2BUTTON_PRESS && COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_USER_ORG) {
EMeetingAttendee *attendee;
@@ -2051,7 +2051,7 @@ list_view_event (EMeetingListView *list_view, GdkEvent *event, EventPage *epage)
return TRUE;
}
- return FALSE;
+ return FALSE;
}
@@ -2059,7 +2059,7 @@ static gboolean
list_key_press (EMeetingListView *list_view, GdkEventKey *event, EventPage *epage)
{
if (event->keyval == GDK_Delete) {
-
+
remove_clicked_cb (NULL, epage);
return TRUE;
@@ -2104,14 +2104,14 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day)
/* TODO implement the for portion in end time selector */
gtk_widget_set_sensitive (priv->end_time_selector, !all_day);
- if (all_day)
+ if (all_day)
gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 1);
- else
+ else
gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 0);
-
+
if (all_day) {
bonobo_ui_component_set_prop (epage->priv->uic, "/commands/ViewTimeZone", "sensitive", "0", NULL);
-
+
/* Round down to the start of the day. */
start_tt.hour = 0;
start_tt.minute = 0;
@@ -2129,7 +2129,7 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day)
icaltimezone *start_zone;
bonobo_ui_component_set_prop (epage->priv->uic, "/commands/ViewTimeZone", "sensitive", "1", NULL);
-
+
if (end_tt.year == start_tt.year
&& end_tt.month == start_tt.month
&& end_tt.day == start_tt.day) {
@@ -2155,7 +2155,7 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day)
&end_tt, start_zone,
TRUE);
}
-
+
event_page_set_show_timezone (epage, calendar_config_get_show_timezone() & !all_day);
g_signal_handlers_block_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
g_signal_handlers_block_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
@@ -2196,17 +2196,17 @@ event_page_show_alarm (EventPage *epage)
gtk_widget_show (epage->priv->alarm_dialog);
}
-void
+void
event_page_set_show_timezone (EventPage *epage, gboolean state)
{
if (state) {
gtk_widget_show_all (epage->priv->start_timezone);
- gtk_widget_show (epage->priv->timezone_label);
+ gtk_widget_show (epage->priv->timezone_label);
} else {
gtk_widget_hide (epage->priv->start_timezone);
gtk_widget_hide (epage->priv->timezone_label);
}
-
+
}
void
@@ -2214,7 +2214,7 @@ event_page_set_show_categories (EventPage *epage, gboolean state)
{
if (state) {
gtk_widget_show (epage->priv->categories_btn);
- gtk_widget_show (epage->priv->categories);
+ gtk_widget_show (epage->priv->categories);
} else {
gtk_widget_hide (epage->priv->categories_btn);
gtk_widget_hide (epage->priv->categories);
@@ -2222,7 +2222,7 @@ event_page_set_show_categories (EventPage *epage, gboolean state)
}
/*If the msg has some value set, the icon should always be set */
-void
+void
event_page_set_info_string (EventPage *epage, const gchar *icon, const gchar *msg)
{
EventPagePrivate *priv;
@@ -2232,10 +2232,10 @@ event_page_set_info_string (EventPage *epage, const gchar *icon, const gchar *ms
gtk_image_set_from_stock (GTK_IMAGE (priv->info_icon), icon, GTK_ICON_SIZE_BUTTON);
gtk_label_set_text (GTK_LABEL(priv->info_string), msg);
- if (msg && icon)
- gtk_widget_show (priv->info_hbox);
- else
- gtk_widget_hide (priv->info_hbox);
+ if (msg && icon)
+ gtk_widget_show (priv->info_hbox);
+ else
+ gtk_widget_hide (priv->info_hbox);
}
/* Gets the widgets from the XML file and returns if they are all available. */
@@ -2285,7 +2285,7 @@ get_widgets (EventPage *epage)
g_object_ref (priv->main);
gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
- priv->categories = GW ("categories");
+ priv->categories = GW ("categories");
priv->categories_btn = GW ("categories-button");
priv->organizer = GW ("organizer");
priv->summary = GW ("summary");
@@ -2302,30 +2302,30 @@ get_widgets (EventPage *epage)
priv->remove = GW ("remove-attendee");
priv->edit = GW ("edit-attendee");
priv->list_box = GW ("list-box");
-
+
priv->calendar_label = GW ("calendar-label");
priv->attendee_box = GW ("attendee-box");
priv->org_cal_label = GW ("org-cal-label");
priv->list_view = e_meeting_list_view_new (priv->model);
-
+
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
gtk_widget_show (sw);
gtk_container_add (GTK_CONTAINER (sw), GTK_WIDGET (priv->list_view));
gtk_box_pack_start (GTK_BOX (priv->list_box), sw, TRUE, TRUE, 0);
-
+
/* Glade's visibility flag doesn't seem to work for custom widgets */
priv->start_time = GW ("start-time");
gtk_widget_show (priv->start_time);
-
+
priv->time_hour = GW ("time-hour");
priv->hour_selector = GW ("hour_selector");
priv->minute_selector = GW ("minute_selector");
priv->end_time_selector = GW ("end-time-selector");
-
+
priv->end_time = GW ("end-time");
gtk_widget_show_all (priv->time_hour);
gtk_widget_hide (priv->end_time);
@@ -2374,13 +2374,13 @@ summary_changed_cb (GtkEditable *editable, gpointer data)
EventPage *epage;
EventPagePrivate *priv;
gchar *summary;
-
+
epage = EVENT_PAGE (data);
priv = epage->priv;
-
+
if (priv->updating)
return;
-
+
summary = e_dialog_editable_get (GTK_WIDGET (editable));
comp_editor_page_notify_summary_changed (COMP_EDITOR_PAGE (epage),
summary);
@@ -2401,7 +2401,7 @@ notify_dates_changed (EventPage *epage, struct icaltimetype *start_tt,
gboolean all_day_event;
icaltimezone *start_zone = NULL;
priv = epage->priv;
-
+
all_day_event = priv->all_day_event;
start_dt.value = start_tt;
@@ -2485,7 +2485,7 @@ times_updated (EventPage *epage, gboolean adjust_end_time)
gboolean date_set, all_day_event;
gboolean set_start_date = FALSE, set_end_date = FALSE;
icaltimezone *start_zone;
-
+
priv = epage->priv;
if (priv->updating)
@@ -2575,7 +2575,7 @@ static void
start_date_changed_cb (GtkWidget *dedit, gpointer data)
{
EventPage *epage;
-
+
epage = EVENT_PAGE (data);
hour_minute_changed (epage);
@@ -2590,7 +2590,7 @@ static void
end_date_changed_cb (GtkWidget *dedit, gpointer data)
{
EventPage *epage;
-
+
epage = EVENT_PAGE (data);
times_updated (epage, FALSE);
@@ -2654,9 +2654,9 @@ event_page_sendoptions_clicked_cb (EventPage *epage)
E_SOURCE_COMBO_BOX (priv->source_selector));
e_sendoptions_utils_set_default_data (priv->sod, source, "calendar");
priv->sod->data->initialized = TRUE;
- }
+ }
- if (e_cal_get_static_capability (COMP_EDITOR_PAGE (epage)->client,
+ if (e_cal_get_static_capability (COMP_EDITOR_PAGE (epage)->client,
CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS)) {
e_sendoptions_set_need_general_options (priv->sod, FALSE);
}
@@ -2671,10 +2671,10 @@ field_changed_cb (GtkWidget *widget, gpointer data)
{
EventPage *epage;
EventPagePrivate *priv;
-
+
epage = EVENT_PAGE (data);
priv = epage->priv;
-
+
if (!priv->updating)
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (epage));
}
@@ -2693,7 +2693,7 @@ source_changed_cb (ESourceComboBox *source_combo_box, EventPage *epage)
client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_EVENT);
if (client) {
icaltimezone *zone;
-
+
zone = calendar_config_get_icaltimezone ();
e_cal_set_default_timezone (client, zone, NULL);
}
@@ -2727,7 +2727,7 @@ source_changed_cb (ESourceComboBox *source_combo_box, EventPage *epage)
gchar *backend_addr = NULL;
e_cal_get_cal_address(client, &backend_addr, NULL);
-
+
if (priv->is_meeting)
event_page_select_organizer (epage, backend_addr);
@@ -2747,13 +2747,13 @@ set_subscriber_info_string (EventPage *epage, const char *backend_address)
{
ECal *client = COMP_EDITOR_PAGE (epage)->client;
ESource *source;
-
+
source = e_cal_get_source (client);
-
+
if (e_source_get_property (source, "subscriber"))
- /* Translators: This string is used when we are creating an Event
+ /* Translators: This string is used when we are creating an Event
(meeting or appointment) on behalf of some other user */
- event_page_set_info_string (epage, GTK_STOCK_DIALOG_INFO,
+ event_page_set_info_string (epage, GTK_STOCK_DIALOG_INFO,
g_strdup_printf(_("You are acting on behalf of %s"), backend_address));
else
event_page_set_info_string (epage, NULL, NULL);
@@ -2764,7 +2764,7 @@ alarm_changed_cb (GtkWidget *widget, gpointer data)
{
EventPage *epage;
EventPagePrivate *priv;
-
+
epage = EVENT_PAGE (data);
priv = epage->priv;
@@ -2774,43 +2774,43 @@ alarm_changed_cb (GtkWidget *widget, gpointer data)
icalcomponent *icalcomp;
icalproperty *icalprop;
int alarm_type;
-
- ca = e_cal_component_alarm_new ();
-
+
+ ca = e_cal_component_alarm_new ();
+
e_cal_component_alarm_set_action (ca, E_CAL_COMPONENT_ALARM_DISPLAY);
memset (&trigger, 0, sizeof (ECalComponentAlarmTrigger));
- trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
+ trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
trigger.u.rel_duration.is_neg = 1;
-
+
alarm_type = e_dialog_option_menu_get (priv->alarm_time, alarm_map);
switch (alarm_type) {
case ALARM_15_MINUTES:
e_alarm_list_clear (priv->alarm_list_store);
trigger.u.rel_duration.minutes = 15;
break;
-
+
case ALARM_1_HOUR:
e_alarm_list_clear (priv->alarm_list_store);
trigger.u.rel_duration.hours = 1;
break;
-
+
case ALARM_1_DAY:
- e_alarm_list_clear (priv->alarm_list_store);
+ e_alarm_list_clear (priv->alarm_list_store);
trigger.u.rel_duration.days = 1;
break;
case ALARM_USER_TIME:
- e_alarm_list_clear (priv->alarm_list_store);
+ e_alarm_list_clear (priv->alarm_list_store);
switch (calendar_config_get_default_reminder_units ()) {
- case CAL_DAYS:
+ case CAL_DAYS:
trigger.u.rel_duration.days = priv->alarm_interval;
break;
-
+
case CAL_HOURS:
trigger.u.rel_duration.hours = priv->alarm_interval;
break;
-
+
case CAL_MINUTES:
trigger.u.rel_duration.minutes = priv->alarm_interval;
break;
@@ -2818,14 +2818,14 @@ alarm_changed_cb (GtkWidget *widget, gpointer data)
break;
case ALARM_CUSTOM:
gtk_widget_set_sensitive (priv->alarm_box, TRUE);
-
+
default:
break;
}
-
+
if (alarm_type != ALARM_CUSTOM) {
e_cal_component_alarm_set_trigger (ca, trigger);
-
+
icalcomp = e_cal_component_alarm_get_icalcomponent (ca);
icalprop = icalproperty_new_x ("1");
icalproperty_set_x_name (icalprop, "X-EVOLUTION-NEEDS-DESCRIPTION");
@@ -2843,24 +2843,24 @@ alarm_changed_cb (GtkWidget *widget, gpointer data)
gtk_container_remove (GTK_CONTAINER (priv->status_icons), priv->alarm_icon);
priv->alarm_icon = NULL;
}
- }
-
- sensitize_widgets (epage);
+ }
+
+ sensitize_widgets (epage);
}
-static void
+static void
alarm_store_inserted_cb (EAlarmList *alarm_list_store, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
{
field_changed_cb (NULL, data);
}
-static void
+static void
alarm_store_deleted_cb (EAlarmList *alarm_list_store, GtkTreePath *path, gpointer data)
{
field_changed_cb (NULL, data);
}
-static void
+static void
alarm_store_changed_cb (EAlarmList *alarm_list_store, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
{
field_changed_cb (NULL, data);
@@ -2877,18 +2877,18 @@ alarm_custom_clicked_cb (GtkWidget *widget, gpointer data)
GtkTreeIter iter;
gboolean valid_iter;
GtkWidget *toplevel;
-
+
epage = EVENT_PAGE (data);
priv = epage->priv;
/* Make a copy of the list store in case the user cancels */
temp_list_store = e_alarm_list_new ();
model = GTK_TREE_MODEL (priv->alarm_list_store);
-
+
for (valid_iter = gtk_tree_model_get_iter_first (model, &iter); valid_iter;
valid_iter = gtk_tree_model_iter_next (model, &iter)) {
ECalComponentAlarm *alarm;
-
+
alarm = (ECalComponentAlarm *) e_alarm_list_get_alarm (priv->alarm_list_store, &iter);
if (alarm == NULL) {
g_warning ("alarm is NULL\n");
@@ -2896,18 +2896,18 @@ alarm_custom_clicked_cb (GtkWidget *widget, gpointer data)
}
e_alarm_list_append (temp_list_store, NULL, alarm);
- }
-
+ }
+
toplevel = gtk_widget_get_toplevel (priv->main);
if (alarm_list_dialog_run (toplevel, COMP_EDITOR_PAGE (epage)->client, temp_list_store)) {
g_object_unref (priv->alarm_list_store);
priv->alarm_list_store = temp_list_store;
- comp_editor_page_notify_changed (COMP_EDITOR_PAGE (epage));
+ comp_editor_page_notify_changed (COMP_EDITOR_PAGE (epage));
} else {
g_object_unref (temp_list_store);
- }
-
+ }
+
/* If the user erases everything, uncheck the alarm toggle */
valid_iter = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (priv->alarm_list_store), &iter);
@@ -2925,7 +2925,7 @@ init_widgets (EventPage *epage)
char *menu_label = NULL;
GtkTreeSelection *selection;
GtkWidget *cus_item, *menu;
-
+
priv = epage->priv;
/* Make sure the EDateEdit widgets use our timezones to get the
@@ -2967,7 +2967,7 @@ init_widgets (EventPage *epage)
/* Categories */
g_signal_connect((priv->categories_btn), "clicked",
G_CALLBACK (categories_clicked_cb), epage);
-
+
/* Source selector */
g_signal_connect((priv->source_selector), "changed",
G_CALLBACK (source_changed_cb), epage);
@@ -2984,19 +2984,19 @@ init_widgets (EventPage *epage)
g_signal_connect((priv->start_timezone), "changed",
G_CALLBACK (start_timezone_changed_cb), epage);
- e_meeting_list_view_column_set_visible (priv->list_view, "Attendee ",
+ e_meeting_list_view_column_set_visible (priv->list_view, "Attendee ",
TRUE);
e_meeting_list_view_column_set_visible (priv->list_view, "Role", calendar_config_get_show_role());
e_meeting_list_view_column_set_visible (priv->list_view, "RSVP", calendar_config_get_show_rsvp());
e_meeting_list_view_column_set_visible (priv->list_view, "Status", calendar_config_get_show_status());
e_meeting_list_view_column_set_visible (priv->list_view, "Type", calendar_config_get_show_type());
-
+
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list_view));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
g_signal_connect (G_OBJECT (priv->list_view), "button_press_event", G_CALLBACK (button_press_event), epage);
g_signal_connect (G_OBJECT (priv->list_view), "event", G_CALLBACK (list_view_event), epage);
- g_signal_connect (priv->list_view, "key_press_event", G_CALLBACK (list_key_press), epage);
+ g_signal_connect (priv->list_view, "key_press_event", G_CALLBACK (list_key_press), epage);
/* Add attendee button */
g_signal_connect (priv->add, "clicked", G_CALLBACK (add_clicked_cb), epage);
@@ -3008,7 +3008,7 @@ init_widgets (EventPage *epage)
g_signal_connect (priv->edit, "clicked", G_CALLBACK (edit_clicked_cb), epage);
/* Contacts button */
- g_signal_connect(priv->invite, "clicked", G_CALLBACK (invite_cb), epage);
+ g_signal_connect(priv->invite, "clicked", G_CALLBACK (invite_cb), epage);
/* Alarm dialog */
g_signal_connect (GTK_DIALOG (priv->alarm_dialog), "response", G_CALLBACK (gtk_widget_hide), priv->alarm_dialog);
@@ -3020,7 +3020,7 @@ init_widgets (EventPage *epage)
gtk_window_set_modal (GTK_WINDOW (priv->alarm_dialog), TRUE);
/* Meeting List View */
- g_signal_connect (priv->list_view, "attendee_added", G_CALLBACK (attendee_added_cb), epage);
+ g_signal_connect (priv->list_view, "attendee_added", G_CALLBACK (attendee_added_cb), epage);
gtk_widget_show (GTK_WIDGET (priv->list_view));
@@ -3031,7 +3031,7 @@ init_widgets (EventPage *epage)
} else {
gtk_widget_show (priv->categories_btn);
gtk_widget_show (priv->categories);
- }
+ }
/* End time selector */
gtk_option_menu_set_history (GTK_OPTION_MENU (priv->end_time_selector), 1);
@@ -3049,24 +3049,24 @@ init_widgets (EventPage *epage)
priv->alarm_units = calendar_config_get_default_reminder_units ();
priv->alarm_interval = calendar_config_get_default_reminder_interval ();
- menu_label = "";
+ menu_label = "";
switch (priv->alarm_units) {
case CAL_DAYS:
if (priv->alarm_interval != 1) {
menu_label = g_strdup_printf (ngettext("%d day before appointment", "%d days before appointment", priv->alarm_interval), priv->alarm_interval);
- }
+ }
break;
-
+
case CAL_HOURS:
if (priv->alarm_interval != 1) {
menu_label = g_strdup_printf (ngettext("%d hour before appointment", "%d hours before appointment", priv->alarm_interval), priv->alarm_interval);
- }
+ }
break;
-
+
case CAL_MINUTES:
if (priv->alarm_interval != 15) {
menu_label = g_strdup_printf (ngettext("%d minute before appointment", "%d minutes before appointment", priv->alarm_interval), priv->alarm_interval);
- }
+ }
break;
}
@@ -3076,23 +3076,23 @@ init_widgets (EventPage *epage)
}
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->alarm_time));
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), cus_item);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), cus_item);
cus_item = gtk_menu_item_new_with_label (_("Customize"));
gtk_widget_show (cus_item);
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->alarm_time));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), cus_item);
-
+
cus_item = gtk_menu_item_new_with_label (_("None"));
gtk_widget_show (cus_item);
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->alarm_time));
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), cus_item);
-
+
g_signal_connect (priv->alarm_time, "changed",
G_CALLBACK (field_changed_cb), epage);
g_signal_connect (priv->alarm_time, "changed",
G_CALLBACK (alarm_changed_cb), epage);
-
+
/* Belongs to priv->description */
g_signal_connect((text_buffer), "changed",
G_CALLBACK (field_changed_cb), epage);
@@ -3180,9 +3180,9 @@ event_page_select_organizer (EventPage *epage, const char *backend_address)
/**
* event_page_construct:
* @epage: An event page.
- *
+ *
* Constructs an event page by loading its Glade data.
- *
+ *
* Return value: The same object as @epage, or NULL if the widgets could not be
* created.
**/
@@ -3206,13 +3206,13 @@ event_page_construct (EventPage *epage, EMeetingStore *model, ECal *client)
g_free (gladefile);
if (!priv->xml) {
- g_message ("event_page_construct(): "
+ g_message ("event_page_construct(): "
"Could not load the Glade XML file!");
return NULL;
}
if (!get_widgets (epage)) {
- g_message ("event_page_construct(): "
+ g_message ("event_page_construct(): "
"Could not find all widgets in the XML file!");
return NULL;
}
@@ -3222,10 +3222,10 @@ event_page_construct (EventPage *epage, EMeetingStore *model, ECal *client)
e_iterator_is_valid(it);
e_iterator_next(it)) {
gchar *full = NULL;
-
+
a = (EAccount *)e_iterator_get(it);
-
+
/* skip disabled accounts */
if (!a->enabled)
continue;
@@ -3234,7 +3234,7 @@ event_page_construct (EventPage *epage, EMeetingStore *model, ECal *client)
priv->address_strings = g_list_append(priv->address_strings, full);
}
-
+
g_object_unref(it);
if (priv->address_strings)
@@ -3243,7 +3243,7 @@ event_page_construct (EventPage *epage, EMeetingStore *model, ECal *client)
g_warning ("No potential organizers!");
if (!init_widgets (epage)) {
- g_message ("event_page_construct(): "
+ g_message ("event_page_construct(): "
"Could not initialize the widgets!");
return NULL;
}
@@ -3253,9 +3253,9 @@ event_page_construct (EventPage *epage, EMeetingStore *model, ECal *client)
/**
* event_page_new:
- *
+ *
* Creates a new event page.
- *
+ *
* Return value: A newly-created event page, or NULL if the page could
* not be created.
**/
@@ -3329,22 +3329,22 @@ set_attendees (ECalComponent *comp, const GPtrArray *attendees)
{
GSList *comp_attendees = NULL, *l;
int i;
-
+
for (i = 0; i < attendees->len; i++) {
EMeetingAttendee *ia = g_ptr_array_index (attendees, i);
ECalComponentAttendee *ca;
-
+
ca = e_meeting_attendee_as_e_cal_component_attendee (ia);
-
+
comp_attendees = g_slist_prepend (comp_attendees, ca);
-
+
}
comp_attendees = g_slist_reverse (comp_attendees);
-
+
e_cal_component_set_attendee_list (comp, comp_attendees);
for (l = comp_attendees; l != NULL; l = l->next)
- g_free (l->data);
+ g_free (l->data);
g_slist_free (comp_attendees);
}
@@ -3360,9 +3360,9 @@ event_page_get_cancel_comp (EventPage *page)
if (priv->deleted_attendees->len == 0)
return NULL;
-
+
set_attendees (priv->comp, priv->deleted_attendees);
-
+
return e_cal_component_clone (priv->comp);
}
diff --git a/calendar/gui/dialogs/memo-editor.c b/calendar/gui/dialogs/memo-editor.c
index b6a7de8cf1..1c5b28c512 100644
--- a/calendar/gui/dialogs/memo-editor.c
+++ b/calendar/gui/dialogs/memo-editor.c
@@ -41,8 +41,8 @@
struct _MemoEditorPrivate {
MemoPage *memo_page;
-
- gboolean updating;
+
+ gboolean updating;
};
static void memo_editor_set_e_cal (CompEditor *editor, ECal *client);
@@ -99,11 +99,11 @@ menu_show_categories_cb (BonoboUIComponent *component,
gpointer user_data)
{
MemoEditor *me = (MemoEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- memo_page_set_show_categories (me->priv->memo_page, atoi(state));
+ memo_page_set_show_categories (me->priv->memo_page, atoi(state));
calendar_config_set_show_categories (atoi(state));
}
@@ -133,7 +133,7 @@ menu_class_private_cb (BonoboUIComponent *ui_component,
MemoEditor *me = (MemoEditor *) user_data;
if (state[0] == '0')
return;
-
+
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (me->priv->memo_page));
memo_page_set_classification (me->priv->memo_page, E_CAL_COMPONENT_CLASS_PRIVATE);
}
@@ -161,11 +161,11 @@ memo_editor_init (MemoEditor *me)
CompEditor *editor = COMP_EDITOR(me);
gboolean status;
char *xmlfile;
-
+
priv = g_new0 (MemoEditorPrivate, 1);
me->priv = priv;
- priv->updating = FALSE;
+ priv->updating = FALSE;
bonobo_ui_component_freeze (editor->uic, NULL);
@@ -174,7 +174,7 @@ memo_editor_init (MemoEditor *me)
xmlfile,
"evolution-memo-editor", NULL);
g_free (xmlfile);
-
+
status = calendar_config_get_show_categories ();
bonobo_ui_component_set_prop (
editor->uic, "/commands/ViewCategories",
@@ -196,7 +196,7 @@ memo_editor_init (MemoEditor *me)
editor->uic, "ActionClassConfidential",
menu_class_confidential_cb, editor);
- bonobo_ui_component_thaw (editor->uic, NULL);
+ bonobo_ui_component_thaw (editor->uic, NULL);
/* TODO add help stuff */
/* comp_editor_set_help_section (COMP_EDITOR (me), "usage-calendar-memo"); */
@@ -209,12 +209,12 @@ memo_editor_construct (MemoEditor *me, ECal *client)
CompEditor *editor = COMP_EDITOR (me);
gboolean read_only = FALSE;
guint32 flags = comp_editor_get_flags (editor);
-
+
priv = me->priv;
priv->memo_page = memo_page_new (editor->uic, flags);
g_object_ref_sink (priv->memo_page);
- comp_editor_append_page (COMP_EDITOR (me),
+ comp_editor_append_page (COMP_EDITOR (me),
COMP_EDITOR_PAGE (priv->memo_page),
_("Memo"), TRUE);
g_signal_connect (G_OBJECT (priv->memo_page), "client_changed",
@@ -222,11 +222,11 @@ memo_editor_construct (MemoEditor *me, ECal *client)
if (!e_cal_is_read_only (client, &read_only, NULL))
read_only = TRUE;
-
+
bonobo_ui_component_set_prop (editor->uic, "/Toolbar/ecal3", "hidden", "1", NULL);
comp_editor_set_e_cal (COMP_EDITOR (me), client);
-
-
+
+
init_widgets (me);
@@ -273,7 +273,7 @@ memo_editor_finalize (GObject *object)
g_object_unref (priv->memo_page);
priv->memo_page = NULL;
}
-
+
g_free (priv);
if (G_OBJECT_CLASS (memo_editor_parent_class)->finalize)
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 6255b7aef6..d89e7a4049 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -83,7 +83,7 @@ struct _MemoPagePrivate {
GtkWidget *to_button;
GtkWidget *to_hbox;
GtkWidget *to_entry;
-
+
/* Summary */
GtkWidget *summary_label;
GtkWidget *summary_entry;
@@ -91,7 +91,7 @@ struct _MemoPagePrivate {
/* Start date */
GtkWidget *start_label;
GtkWidget *start_date;
-
+
GtkWidget *categories_btn;
GtkWidget *categories;
@@ -129,10 +129,10 @@ G_DEFINE_TYPE (MemoPage, memo_page, TYPE_COMP_EDITOR_PAGE)
/**
* memo_page_get_type:
- *
+ *
* Registers the #TaskPage class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the #TaskPage class.
**/
@@ -150,7 +150,7 @@ memo_page_class_init (MemoPageClass *klass)
editor_page_class->focus_main_widget = memo_page_focus_main_widget;
editor_page_class->fill_widgets = memo_page_fill_widgets;
editor_page_class->fill_component = memo_page_fill_component;
-
+
object_class->finalize = memo_page_finalize;
}
@@ -194,7 +194,7 @@ memo_page_finalize (GObject *object)
mpage = MEMO_PAGE (object);
priv = mpage->priv;
-
+
for (l = priv->address_strings; l != NULL; l = l->next)
g_free (l->data);
g_list_free (priv->address_strings);
@@ -286,7 +286,7 @@ clear_widgets (MemoPage *mpage)
e_dialog_editable_set (priv->categories, NULL);
}
-void
+void
memo_page_set_classification (MemoPage *page, ECalComponentClassification class)
{
page->priv->classification = class;
@@ -297,32 +297,32 @@ sensitize_widgets (MemoPage *mpage)
{
gboolean read_only, sens = FALSE, sensitize;
MemoPagePrivate *priv;
-
+
priv = mpage->priv;
if (!e_cal_is_read_only (COMP_EDITOR_PAGE (mpage)->client, &read_only, NULL))
read_only = TRUE;
-
+
if (COMP_EDITOR_PAGE (mpage)->flags & COMP_EDITOR_IS_SHARED)
sens = COMP_EDITOR_PAGE (mpage)->flags & COMP_EDITOR_PAGE_USER_ORG;
else
sens = TRUE;
sensitize = (!read_only && sens);
-
+
priv = mpage->priv;
- /* The list of organizers is set to be non-editable. Otherwise any
- * change in the displayed list causes an 'Account not found' error.
+ /* The list of organizers is set to be non-editable. Otherwise any
+ * change in the displayed list causes an 'Account not found' error.
*/
gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->org_combo)->entry), FALSE);
-
+
gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->memo_content), sensitize);
gtk_widget_set_sensitive (priv->start_date, sensitize);
gtk_widget_set_sensitive (priv->categories_btn, !read_only);
gtk_editable_set_editable (GTK_EDITABLE (priv->categories), !read_only);
gtk_editable_set_editable (GTK_EDITABLE (priv->summary_entry), sensitize);
-
+
if (COMP_EDITOR_PAGE (mpage)->flags & COMP_EDITOR_IS_SHARED) {
if (priv->to_entry) {
gtk_editable_set_editable (GTK_EDITABLE (priv->to_entry), !read_only);
@@ -357,18 +357,18 @@ memo_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
priv = mpage->priv;
priv->updating = TRUE;
-
+
/* Clean the screen */
clear_widgets (mpage);
/* Summary */
e_cal_component_get_summary (comp, &text);
e_dialog_editable_set (priv->summary_entry, text.value);
-
+
e_cal_component_get_description_list (comp, &l);
if (l && l->data) {
ECalComponentText *dtext;
-
+
dtext = l->data;
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->memo_content)),
dtext->value ? dtext->value : "", -1);
@@ -398,7 +398,7 @@ memo_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
break;
}
case E_CAL_COMPONENT_CLASS_PRIVATE:
- {
+ {
cl = E_CAL_COMPONENT_CLASS_PRIVATE;
break;
}
@@ -446,7 +446,7 @@ memo_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
}
}
- if (backend_addr)
+ if (backend_addr)
g_free (backend_addr);
/* Source */
@@ -461,7 +461,7 @@ memo_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
return TRUE;
}
-static gboolean
+static gboolean
fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp)
{
EDestinationStore *destination_store;
@@ -504,16 +504,16 @@ fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp)
break;
}
}
-
+
if (book) {
GList *contacts = NULL;
EContact *n_con = NULL;
char *qu;
EBookQuery *query;
- qu = g_strdup_printf ("(is \"full_name\" \"%s\")",
+ qu = g_strdup_printf ("(is \"full_name\" \"%s\")",
(char *) e_contact_get (contact, E_CONTACT_FULL_NAME));
- query = e_book_query_from_string (qu);
+ query = e_book_query_from_string (qu);
if (!e_book_get_contacts (book, query, &contacts, NULL)) {
g_warning ("Could not get contact from the book \n");
@@ -524,7 +524,7 @@ fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp)
e_destination_set_contact (des, n_con, 0);
list_dests = e_destination_list_get_dests (des);
- g_list_foreach (contacts, (GFunc) g_object_unref, NULL);
+ g_list_foreach (contacts, (GFunc) g_object_unref, NULL);
g_list_free (contacts);
}
@@ -538,22 +538,22 @@ fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp)
card_dest.data = destination;
list_dests = &card_dest;
}
- }
-
+ }
+
for (l = list_dests; l; l = l->next) {
EDestination *dest = l->data;
const char *name, *attendee = NULL;
-
+
name = e_destination_get_name (dest);
/* If we couldn't get the attendee prior, get the email address as the default */
if (attendee == NULL || *attendee == '\0') {
attendee = e_destination_get_email (dest);
}
-
+
if (attendee == NULL || *attendee == '\0')
continue;
-
+
if (!str) {
str = g_string_new (NULL);
g_string_prepend (str, attendee);
@@ -571,7 +571,7 @@ fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp)
icalprop = icalproperty_new_x (str->str);
icalproperty_set_x_name (icalprop, "X-EVOLUTION-RECIPIENTS");
icalcomponent_add_property (icalcomp, icalprop);
-
+
g_string_free (str, FALSE);
return TRUE;
} else
@@ -580,17 +580,17 @@ fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp)
static EAccount *
get_current_account (MemoPage *page)
-{
+{
MemoPagePrivate *priv;
EIterator *it;
const char *str;
-
+
priv = page->priv;
str = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (priv->org_combo)->entry));
if (!str)
return NULL;
-
+
for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) {
EAccount *a = (EAccount *)e_iterator_get(it);
char *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
@@ -601,12 +601,12 @@ get_current_account (MemoPage *page)
return a;
}
-
+
g_free (full);
}
g_object_unref (it);
-
- return NULL;
+
+ return NULL;
}
/* fill_component handler for the memo page */
@@ -686,7 +686,7 @@ memo_page_fill_component (CompEditorPage *page, ECalComponent *comp)
l.next = NULL;
e_cal_component_set_description_list (comp, &l);
-
+
g_free(txt);
}
@@ -708,7 +708,7 @@ memo_page_fill_component (CompEditorPage *page, ECalComponent *comp)
&start_tt.month,
&start_tt.day))
e_cal_component_set_dtstart (comp, &start_date);
- else
+ else
e_cal_component_set_dtstart (comp, NULL);
/* Classification. */
@@ -730,7 +730,7 @@ memo_page_fill_component (CompEditorPage *page, ECalComponent *comp)
EAccount *a;
gchar *backend_addr = NULL, *org_addr = NULL, *sentby = NULL;
-
+
e_cal_get_cal_address (page->client, &backend_addr, NULL);
/* Find the identity for the organizer or sentby field */
@@ -740,14 +740,14 @@ memo_page_fill_component (CompEditorPage *page, ECalComponent *comp)
if (a == NULL) {
e_notice (page, GTK_MESSAGE_ERROR,
_("The organizer selected no longer has an account."));
- return FALSE;
+ return FALSE;
}
if (a->id->address == NULL || strlen (a->id->address) == 0) {
e_notice (page, GTK_MESSAGE_ERROR,
_("An organizer is required."));
return FALSE;
- }
+ }
if (!(backend_addr && *backend_addr) || !g_ascii_strcasecmp (backend_addr, a->id->address)) {
org_addr = g_strdup_printf ("MAILTO:%s", a->id->address);
@@ -778,7 +778,7 @@ memo_page_set_show_categories (MemoPage *page, gboolean state)
{
if (state) {
gtk_widget_show (page->priv->categories_btn);
- gtk_widget_show (page->priv->categories);
+ gtk_widget_show (page->priv->categories);
} else {
gtk_widget_hide (page->priv->categories_btn);
gtk_widget_hide (page->priv->categories);
@@ -786,7 +786,7 @@ memo_page_set_show_categories (MemoPage *page, gboolean state)
}
/*If the msg has some value set, the icon should always be set */
-void
+void
memo_page_set_info_string (MemoPage *mpage, const gchar *icon, const gchar *msg)
{
MemoPagePrivate *priv;
@@ -797,9 +797,9 @@ memo_page_set_info_string (MemoPage *mpage, const gchar *icon, const gchar *msg)
gtk_label_set_text (GTK_LABEL(priv->info_string), msg);
if (msg && icon)
- gtk_widget_show (priv->info_hbox);
+ gtk_widget_show (priv->info_hbox);
else
- gtk_widget_hide (priv->info_hbox);
+ gtk_widget_hide (priv->info_hbox);
}
/* Gets the widgets from the XML file and returns if they are all available. */
@@ -837,7 +837,7 @@ get_widgets (MemoPage *mpage)
priv->org_label = GW ("org-label");
priv->org_combo = GW ("org-combo");
-
+
priv->to_button = GW ("to-button");
priv->to_hbox = GW ("to-hbox");
@@ -846,7 +846,7 @@ get_widgets (MemoPage *mpage)
priv->start_label = GW ("start-label");
priv->start_date = GW ("start-date");
-
+
priv->memo_content = GW ("memo_content");
priv->categories_btn = GW ("categories-button");
@@ -885,10 +885,10 @@ field_changed_cb (GtkWidget *widget, gpointer data)
{
MemoPage *mpage;
MemoPagePrivate *priv;
-
+
mpage = MEMO_PAGE (data);
priv = mpage->priv;
-
+
if (!priv->updating)
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (mpage));
}
@@ -948,13 +948,13 @@ set_subscriber_info_string (MemoPage *mpage, const char *backend_address)
{
ECal *client = COMP_EDITOR_PAGE (mpage)->client;
ESource *source;
-
+
source = e_cal_get_source (client);
-
+
if (e_source_get_property (source, "subscriber"))
- /* Translators: This string is used when we are creating a Memo
+ /* Translators: This string is used when we are creating a Memo
on behalf of some other user */
- memo_page_set_info_string (mpage, GTK_STOCK_DIALOG_INFO,
+ memo_page_set_info_string (mpage, GTK_STOCK_DIALOG_INFO,
g_strdup_printf(_("You are acting on behalf of %s"), backend_address));
else
memo_page_set_info_string (mpage, NULL, NULL);
@@ -991,13 +991,13 @@ summary_changed_cb (GtkEditable *editable, gpointer data)
MemoPage *mpage;
MemoPagePrivate *priv;
gchar *summary;
-
+
mpage = MEMO_PAGE (data);
priv = mpage->priv;
-
+
if (priv->updating)
return;
-
+
summary = e_dialog_editable_get (GTK_WIDGET (editable));
comp_editor_page_notify_summary_changed (COMP_EDITOR_PAGE (mpage),
summary);
@@ -1005,12 +1005,12 @@ summary_changed_cb (GtkEditable *editable, gpointer data)
}
static void
-to_button_clicked_cb (GtkButton *button, gpointer data)
+to_button_clicked_cb (GtkButton *button, gpointer data)
{
MemoPage *page = data;
MemoPagePrivate *priv = page->priv;
ENameSelectorDialog *name_selector_dialog;
-
+
name_selector_dialog = e_name_selector_peek_dialog (priv->name_selector);
gtk_widget_show (GTK_WIDGET (name_selector_dialog));
}
@@ -1058,7 +1058,7 @@ init_widgets (MemoPage *mpage)
/* Source selector */
g_signal_connect((priv->source_selector), "changed",
G_CALLBACK (source_changed_cb), mpage);
-
+
/* Connect the default signal handler to use to make sure the "changed"
field gets set whenever a field is changed. */
@@ -1068,13 +1068,13 @@ init_widgets (MemoPage *mpage)
g_signal_connect((priv->categories), "changed",
G_CALLBACK (field_changed_cb), mpage);
-
+
g_signal_connect((priv->summary_entry), "changed",
G_CALLBACK (field_changed_cb), mpage);
-
+
g_signal_connect((priv->source_selector), "changed",
G_CALLBACK (field_changed_cb), mpage);
-
+
g_signal_connect((priv->start_date), "changed",
G_CALLBACK (field_changed_cb), mpage);
@@ -1082,13 +1082,13 @@ init_widgets (MemoPage *mpage)
ENameSelectorDialog *name_selector_dialog;
name_selector_dialog = e_name_selector_peek_dialog (priv->name_selector);
-
+
g_signal_connect (name_selector_dialog, "response",
G_CALLBACK (response_cb), mpage);
g_signal_connect ((priv->to_button), "clicked", G_CALLBACK (to_button_clicked_cb), mpage);
g_signal_connect ((priv->to_entry), "changed", G_CALLBACK (field_changed_cb), mpage);
}
-
+
memo_page_set_show_categories (mpage, calendar_config_get_show_categories());
return TRUE;
@@ -1099,7 +1099,7 @@ get_to_entry (ENameSelector *name_selector)
{
ENameSelectorModel *name_selector_model;
ENameSelectorEntry *name_selector_entry;
-
+
name_selector_model = e_name_selector_peek_model (name_selector);
e_name_selector_model_add_section (name_selector_model, "To", _("To"), NULL);
name_selector_entry = (ENameSelectorEntry *)e_name_selector_peek_section_list (name_selector, "To");
@@ -1128,9 +1128,9 @@ memo_page_select_organizer (MemoPage *mpage, const char *backend_address)
if (source)
user_addr = e_source_get_property (source, "subscriber");
- if (user_addr)
+ if (user_addr)
subscribed_cal = TRUE;
- else
+ else
user_addr = backend_address;
priv->default_address = NULL;
@@ -1156,9 +1156,9 @@ memo_page_select_organizer (MemoPage *mpage, const char *backend_address)
/**
* memo_page_construct:
* @mpage: An memo page.
- *
+ *
* Constructs an memo page by loading its Glade data.
- *
+ *
* Return value: The same object as @mpage, or NULL if the widgets could not be
* created.
**/
@@ -1213,7 +1213,7 @@ memo_page_construct (MemoPage *mpage)
gtk_widget_show (priv->org_label);
gtk_widget_show (priv->org_combo);
-
+
if (flags & COMP_EDITOR_PAGE_NEW_ITEM) {
priv->name_selector = e_name_selector_new ();
priv->to_entry = get_to_entry (priv->name_selector);
@@ -1225,7 +1225,7 @@ memo_page_construct (MemoPage *mpage)
}
if (!init_widgets (mpage)) {
- g_message ("memo_page_construct(): "
+ g_message ("memo_page_construct(): "
"Could not initialize the widgets!");
return NULL;
}
@@ -1235,9 +1235,9 @@ memo_page_construct (MemoPage *mpage)
/**
* memo_page_new:
- *
+ *
* Creates a new memo page.
- *
+ *
* Return value: A newly-created task page, or NULL if the page could
* not be created.
**/
diff --git a/calendar/gui/dialogs/recur-comp.c b/calendar/gui/dialogs/recur-comp.c
index 4f11f9536d..ecf1436abc 100644
--- a/calendar/gui/dialogs/recur-comp.c
+++ b/calendar/gui/dialogs/recur-comp.c
@@ -41,16 +41,16 @@ recur_component_dialog (ECal *client,
GtkWidget *placeholder, *vbox;
ECalComponentVType vtype;
gboolean ret;
-
+
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), FALSE);
vtype = e_cal_component_get_vtype (comp);
-
+
switch (vtype) {
case E_CAL_COMPONENT_EVENT:
if (!delegated)
str = g_strdup_printf (_("You are modifying a recurring event. What would you like to modify?"));
- else
+ else
str = g_strdup_printf (_("You are delegating a recurring event. What would you like to delegate?"));
break;
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 93a9fd05ba..c86137a5a5 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -148,7 +148,7 @@ struct _RecurrencePagePrivate {
GtkWidget *recurs;
gboolean custom;
-
+
GtkWidget *params;
GtkWidget *interval_value;
GtkWidget *interval_unit;
@@ -170,7 +170,7 @@ struct _RecurrencePagePrivate {
GtkWidget *month_num_menu;
enum month_num_options month_num;
-
+
/* For ending date, created by hand */
GtkWidget *ending_date_edit;
struct icaltimetype ending_date_tt;
@@ -193,7 +193,7 @@ struct _RecurrencePagePrivate {
/* For the recurrence preview, the actual widget */
GtkWidget *preview_calendar;
EMiniCalendarConfig *preview_calendar_config;
-
+
gboolean updating;
};
@@ -354,7 +354,7 @@ clear_widgets (RecurrencePage *rpage)
priv = rpage->priv;
priv->custom = FALSE;
-
+
priv->weekday_day_mask = 0;
priv->month_index = 1;
@@ -382,7 +382,7 @@ clear_widgets (RecurrencePage *rpage)
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (priv->ending_menu));
g_signal_handlers_block_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_option_menu_set (priv->ending_menu,
+ e_dialog_option_menu_set (priv->ending_menu,
ENDING_FOR,
ending_types_map);
g_signal_handlers_unblock_matched (menu, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
@@ -476,12 +476,12 @@ sensitize_recur_widgets (RecurrencePage *rpage)
GtkWidget *label;
priv = rpage->priv;
-
+
if (COMP_EDITOR_PAGE (rpage)->flags & COMP_EDITOR_PAGE_MEETING)
sens = COMP_EDITOR_PAGE (rpage)->flags & COMP_EDITOR_PAGE_USER_ORG;
recurs = e_dialog_toggle_get (priv->recurs);
-
+
/* We can't preview that well for instances right now */
if (e_cal_component_is_instance (priv->comp))
gtk_widget_set_sensitive (priv->preview_calendar, FALSE);
@@ -524,13 +524,13 @@ sensitize_buttons (RecurrencePage *rpage)
priv = rpage->priv;
if (COMP_EDITOR_PAGE (rpage)->flags & COMP_EDITOR_PAGE_MEETING)
sensitize = COMP_EDITOR_PAGE (rpage)->flags & COMP_EDITOR_PAGE_USER_ORG;
-
+
selected_rows = gtk_tree_selection_count_selected_rows (
gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->exception_list)));
if (!e_cal_is_read_only (COMP_EDITOR_PAGE (rpage)->client, &read_only, NULL))
read_only = TRUE;
-
+
if (!read_only) {
e_cal_component_get_uid (priv->comp, &uid);
@@ -646,7 +646,7 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
case ICAL_MONTHLY_RECURRENCE: {
enum month_num_options month_num;
enum month_day_options month_day;
-
+
g_return_if_fail (GTK_BIN (priv->special)->child != NULL);
g_return_if_fail (priv->month_day_menu != NULL);
g_return_if_fail (GTK_IS_OPTION_MENU (priv->month_day_menu));
@@ -662,7 +662,7 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
month_num = -1;
else
month_num++;
-
+
switch (month_day) {
case MONTH_DAY_NTH:
if (month_num == -1)
@@ -786,7 +786,7 @@ fill_component (RecurrencePage *rpage, ECalComponent *comp)
model = GTK_TREE_MODEL (priv->exception_list_store);
recurs = e_dialog_toggle_get (priv->recurs);
-
+
if (recurs && priv->custom) {
/* We just keep whatever the component has currently */
} else if (recurs) {
@@ -844,7 +844,7 @@ preview_recur (RecurrencePage *rpage)
ECalComponentDateTime cdt;
GSList *l;
icaltimezone *zone = NULL;
-
+
priv = rpage->priv;
/* If our component has not been set yet through ::fill_widgets(), we
@@ -955,7 +955,7 @@ month_num_submenu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
{
GtkWidget *item;
int month_index;
-
+
item = gtk_menu_get_active (GTK_MENU (menu_shell));
item = gtk_menu_get_active (GTK_MENU (gtk_menu_item_get_submenu (GTK_MENU_ITEM (item))));
@@ -969,14 +969,14 @@ make_recur_month_num_submenu (const char *title, int start, int end)
{
GtkWidget *submenu, *item;
int i;
-
+
submenu = gtk_menu_new ();
for (i = start; i < end; i++) {
item = gtk_menu_item_new_with_label (_(e_cal_recur_nth[i]));
gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item);
gtk_object_set_user_data (GTK_OBJECT (item), GINT_TO_POINTER (i + 1));
gtk_widget_show (item);
- }
+ }
item = gtk_menu_item_new_with_label (_(title));
gtk_widget_show (item);
@@ -990,28 +990,28 @@ make_recur_month_num_menu (int month_index)
{
static const char *options[] = {
/* TRANSLATORS: Entire string is for example: This appointment recurs/Every [x] month(s) on the [first] [Monday] [forever]'
- * (dropdown menu options are in [square brackets]). This means that after 'first', either the string 'day' or
+ * (dropdown menu options are in [square brackets]). This means that after 'first', either the string 'day' or
* the name of a week day (like 'Monday' or 'Friday') always follow.
*/
N_("first"),
/* TRANSLATORS: here, "second" is the ordinal number (like "third"), not the time division (like "minute")
* Entire string is for example: This appointment recurs/Every [x] month(s) on the [second] [Monday] [forever]'
- * (dropdown menu options are in [square brackets]). This means that after 'second', either the string 'day' or
+ * (dropdown menu options are in [square brackets]). This means that after 'second', either the string 'day' or
* the name of a week day (like 'Monday' or 'Friday') always follow.
*/
N_("second"),
/* TRANSLATORS: Entire string is for example: This appointment recurs/Every [x] month(s) on the [third] [Monday] [forever]'
- * (dropdown menu options are in [square brackets]). This means that after 'third', either the string 'day' or
+ * (dropdown menu options are in [square brackets]). This means that after 'third', either the string 'day' or
* the name of a week day (like 'Monday' or 'Friday') always follow.
*/
N_("third"),
/* TRANSLATORS: Entire string is for example: This appointment recurs/Every [x] month(s) on the [fourth] [Monday] [forever]'
- * (dropdown menu options are in [square brackets]). This means that after 'fourth', either the string 'day' or
+ * (dropdown menu options are in [square brackets]). This means that after 'fourth', either the string 'day' or
* the name of a week day (like 'Monday' or 'Friday') always follow.
*/
N_("fourth"),
/* TRANSLATORS: Entire string is for example: This appointment recurs/Every [x] month(s) on the [last] [Monday] [forever]'
- * (dropdown menu options are in [square brackets]). This means that after 'last', either the string 'day' or
+ * (dropdown menu options are in [square brackets]). This means that after 'last', either the string 'day' or
* the name of a week day (like 'Monday' or 'Friday') always follow.
*/
N_("last")
@@ -1044,20 +1044,20 @@ make_recur_month_num_menu (int month_index)
gtk_menu_shell_append(GTK_MENU_SHELL(menu), submenu_item);
gtk_widget_show (submenu_item);
- /* TRANSLATORS: This is a submenu option string to split the date range into three submenus to choose the exact day of
- * the month to setup an appointment recurrence. The entire string is for example: This appointment recurs/Every [x] month(s)
+ /* TRANSLATORS: This is a submenu option string to split the date range into three submenus to choose the exact day of
+ * the month to setup an appointment recurrence. The entire string is for example: This appointment recurs/Every [x] month(s)
* on the [Other date] [1st to 10th] [7th] [forever]' (dropdown menu options are in [square brackets]).
*/
item = make_recur_month_num_submenu (_("1st to 10th"), 0, 10);
gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item);
- /* TRANSLATORS: This is a submenu option string to split the date range into three submenus to choose the exact day of
- * the month to setup an appointment recurrence. The entire string is for example: This appointment recurs/Every [x] month(s)
+ /* TRANSLATORS: This is a submenu option string to split the date range into three submenus to choose the exact day of
+ * the month to setup an appointment recurrence. The entire string is for example: This appointment recurs/Every [x] month(s)
* on the [Other date] [11th to 20th] [17th] [forever]' (dropdown menu options are in [square brackets]).
*/
item = make_recur_month_num_submenu (_("11th to 20th"), 10, 20);
gtk_menu_shell_append(GTK_MENU_SHELL(submenu), item);
- /* TRANSLATORS: This is a submenu option string to split the date range into three submenus to choose the exact day of
- * the month to setup an appointment recurrence. The entire string is for example: This appointment recurs/Every [x] month(s)
+ /* TRANSLATORS: This is a submenu option string to split the date range into three submenus to choose the exact day of
+ * the month to setup an appointment recurrence. The entire string is for example: This appointment recurs/Every [x] month(s)
* on the [Other date] [21th to 31th] [27th] [forever]' (dropdown menu options are in [square brackets]).
*/
item = make_recur_month_num_submenu (_("21st to 31st"), 20, 31);
@@ -1081,7 +1081,7 @@ make_recur_month_menu (void)
{
static const char *options[] = {
/* For Translator : 'day' is part of the sentence of the form 'appointment recurs/Every [x] month(s) on the [first] [day] [forever]'
- (dropdown menu options are in [square brackets]). This means that after 'first', either the string 'day' or
+ (dropdown menu options are in [square brackets]). This means that after 'first', either the string 'day' or
the name of a week day (like 'Monday' or 'Friday') always follow. */
N_("day"),
N_("Monday"),
@@ -1144,7 +1144,7 @@ month_num_menu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
e_dialog_option_menu_set (priv->month_num_menu, 0, month_num_options_map);
e_dialog_option_menu_set (priv->month_num_menu, month_num, month_num_options_map);
}
-
+
if (month_num == MONTH_NUM_DAY && month_day != MONTH_DAY_NTH)
e_dialog_option_menu_set (priv->month_day_menu,
MONTH_DAY_NTH,
@@ -1171,7 +1171,7 @@ month_day_menu_selection_done_cb (GtkMenuShell *menu_shell, gpointer data)
rpage = RECURRENCE_PAGE (data);
priv = rpage->priv;
-
+
month_num = e_dialog_option_menu_get (priv->month_num_menu,
month_num_options_map);
month_day = e_dialog_option_menu_get (priv->month_day_menu,
@@ -1220,7 +1220,7 @@ make_monthly_special (RecurrencePage *rpage)
hbox = gtk_hbox_new (FALSE, 2);
gtk_container_add (GTK_CONTAINER (priv->special), hbox);
- /* TRANSLATORS: Entire string is for example: 'This appointment recurs/Every [x] month(s) on the [second] [Tuesday] [forever]'
+ /* TRANSLATORS: Entire string is for example: 'This appointment recurs/Every [x] month(s) on the [second] [Tuesday] [forever]'
* (dropdown menu options are in [square brackets])."
*/
label = gtk_label_new (_("on the"));
@@ -1359,11 +1359,11 @@ make_ending_until_special (RecurrencePage *rpage)
gtk_widget_show_all (GTK_WIDGET (de));
/* Set the value */
-
+
if (COMP_EDITOR_PAGE (rpage)->flags & COMP_EDITOR_PAGE_NEW_ITEM) {
e_cal_component_get_dtstart (priv->comp, &dt_start);
/* Setting the default until time to 2 weeks */
- icaltime_adjust (dt_start.value, 14, 0, 0, 0);
+ icaltime_adjust (dt_start.value, 14, 0, 0, 0);
e_date_edit_set_date (de, dt_start.value->year, dt_start.value->month, dt_start.value->day);
e_cal_component_free_datetime (&dt_start);
} else {
@@ -1502,7 +1502,7 @@ fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r)
ECal *client = COMP_EDITOR_PAGE (rpage)->client;
ECalComponentDateTime dt;
icaltimezone *from_zone, *to_zone;
-
+
e_cal_component_get_dtstart (priv->comp, &dt);
if (dt.value->is_date)
@@ -1566,7 +1566,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
rpage = RECURRENCE_PAGE (page);
priv = rpage->priv;
- /* Keep a copy of the component so that we can expand the recurrence
+ /* Keep a copy of the component so that we can expand the recurrence
* set for the preview.
*/
@@ -1577,7 +1577,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
if (!e_cal_component_has_organizer (comp))
page->flags |= COMP_EDITOR_PAGE_USER_ORG;
-
+
/* Don't send off changes during this time */
priv->updating = TRUE;
@@ -1763,7 +1763,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
if (nth == -1) {
ECalComponentDateTime dt;
-
+
e_cal_component_get_dtstart (comp, &dt);
priv->month_index = dt.value->day;
priv->month_num = MONTH_NUM_LAST;
@@ -1772,7 +1772,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
priv->month_num = MONTH_NUM_DAY;
}
priv->month_day = MONTH_DAY_NTH;
-
+
} else if (n_by_day == 1) {
enum icalrecurrencetype_weekday weekday;
int pos;
@@ -1828,7 +1828,7 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
if (pos == -1)
priv->month_num = MONTH_NUM_LAST;
- else
+ else
priv->month_num = pos - 1;
priv->month_day = month_day;
} else
@@ -1936,7 +1936,7 @@ recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
dt.tzid = dates->start->tzid;
e_cal_component_set_dtstart (priv->comp, &dt);
}
-
+
if (dates->end) {
icaltime = *dates->end->value;
dt.tzid = dates->end->tzid;
@@ -1948,7 +1948,7 @@ recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
if (mask != priv->weekday_blocked_day_mask) {
priv->weekday_day_mask = priv->weekday_day_mask | mask;
priv->weekday_blocked_day_mask = mask;
-
+
if (priv->weekday_picker != NULL) {
weekday_picker_set_days (WEEKDAY_PICKER (priv->weekday_picker),
priv->weekday_day_mask);
@@ -1972,7 +1972,7 @@ recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
g_date_free (start);
g_date_free (end);
}
-
+
/* Make sure the preview gets updated. */
preview_recur (rpage);
}
@@ -2005,26 +2005,26 @@ get_widgets (RecurrencePage *rpage)
g_object_ref (priv->main);
gtk_container_remove (GTK_CONTAINER (priv->main->parent), priv->main);
-
+
priv->recurs = GW ("recurs");
priv->params = GW ("params");
-
+
priv->interval_value = GW ("interval-value");
priv->interval_unit = GW ("interval-unit");
priv->special = GW ("special");
priv->ending_menu = GW ("ending-menu");
priv->ending_special = GW ("ending-special");
priv->custom_warning_bin = GW ("custom-warning-bin");
-
+
priv->exception_list = GW ("exception-list");
priv->exception_add = GW ("exception-add");
priv->exception_modify = GW ("exception-modify");
priv->exception_delete = GW ("exception-delete");
-
+
priv->preview_bin = GW ("preview-bin");
#undef GW
-
+
return (priv->recurs
&& priv->params
&& priv->interval_value
@@ -2077,7 +2077,7 @@ type_toggled_cb (GtkToggleButton *toggle, gpointer data)
if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->recurs)) || read_only)
gtk_widget_set_sensitive (priv->exception_add, FALSE);
- else
+ else
gtk_widget_set_sensitive (priv->exception_add, TRUE);
}
@@ -2127,7 +2127,7 @@ create_exception_dialog (RecurrencePage *rpage, const char *title, GtkWidget **d
{
RecurrencePagePrivate *priv;
GtkWidget *dialog, *toplevel;
-
+
priv = rpage->priv;
toplevel = gtk_widget_get_toplevel (priv->main);
@@ -2140,7 +2140,7 @@ create_exception_dialog (RecurrencePage *rpage, const char *title, GtkWidget **d
*date_edit = comp_editor_new_date_edit (TRUE, FALSE, TRUE);
gtk_widget_show (*date_edit);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), *date_edit, FALSE, TRUE, 6);
-
+
return dialog;
}
@@ -2151,33 +2151,33 @@ exception_add_cb (GtkWidget *widget, gpointer data)
RecurrencePage *rpage;
GtkWidget *dialog, *date_edit;
gboolean date_set;
-
+
rpage = RECURRENCE_PAGE (data);
dialog = create_exception_dialog (rpage, _("Add exception"), &date_edit);
-
+
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
ECalComponentDateTime dt;
struct icaltimetype icaltime = icaltime_null_time ();
field_changed (rpage);
-
+
dt.value = &icaltime;
-
+
/* We use DATE values for exceptions, so we don't need a TZID. */
dt.tzid = NULL;
icaltime.is_date = 1;
-
+
date_set = e_date_edit_get_date (E_DATE_EDIT (date_edit),
&icaltime.year,
&icaltime.month,
&icaltime.day);
g_return_if_fail (date_set);
-
+
append_exception (rpage, &dt);
preview_recur (rpage);
}
-
+
gtk_widget_destroy (dialog);
}
@@ -2202,34 +2202,34 @@ exception_modify_cb (GtkWidget *widget, gpointer data)
}
current_dt = e_date_time_list_get_date_time (priv->exception_list_store, &iter);
-
+
dialog = create_exception_dialog (rpage, _("Modify exception"), &date_edit);
- e_date_edit_set_date (E_DATE_EDIT (date_edit),
+ e_date_edit_set_date (E_DATE_EDIT (date_edit),
current_dt->value->year, current_dt->value->month, current_dt->value->day);
-
+
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
ECalComponentDateTime dt;
struct icaltimetype icaltime = icaltime_null_time ();
struct icaltimetype *tt;
field_changed (rpage);
-
+
dt.value = &icaltime;
tt = dt.value;
- e_date_edit_get_date (E_DATE_EDIT (date_edit),
+ e_date_edit_get_date (E_DATE_EDIT (date_edit),
&tt->year, &tt->month, &tt->day);
tt->hour = 0;
tt->minute = 0;
tt->second = 0;
tt->is_date = 1;
-
+
/* No TZID, since we are using a DATE value now. */
dt.tzid = NULL;
-
+
e_date_time_list_set_date_time (priv->exception_list_store, &iter, &dt);
preview_recur (rpage);
}
-
+
gtk_widget_destroy (dialog);
}
@@ -2303,7 +2303,7 @@ field_changed (RecurrencePage *rpage)
RecurrencePagePrivate *priv;
priv = rpage->priv;
-
+
if (!priv->updating)
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (rpage));
}
@@ -2349,13 +2349,13 @@ init_widgets (RecurrencePage *rpage)
rpage);
/* Recurrence units */
-
+
g_signal_connect(GTK_OPTION_MENU (priv->interval_unit), "changed",
G_CALLBACK (interval_selection_done_cb),
rpage);
/* Recurrence ending */
-
+
g_signal_connect(GTK_OPTION_MENU (priv->ending_menu), "changed",
G_CALLBACK (ending_selection_done_cb), rpage);
diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c
index 08736ff7b1..7ea90d5a7b 100644
--- a/calendar/gui/dialogs/save-comp.c
+++ b/calendar/gui/dialogs/save-comp.c
@@ -30,11 +30,11 @@
/**
* save_component_dialog:
* @parent: Window to use as the transient dialog's parent.
- * @comp: Pointer to the EcalComponent
+ * @comp: Pointer to the EcalComponent
*
* Pops up a dialog box asking the user whether he wants to save changes for
* a calendar component.
- *
+ *
* Return value: the response_id of the button selected.
**/
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index e7e4e0ad31..36afc0ba7a 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -46,7 +46,7 @@
/* Private part of the SchedulePage structure */
-struct _SchedulePagePrivate {
+struct _SchedulePagePrivate {
/* Glade XML data */
GladeXML *xml;
@@ -55,10 +55,10 @@ struct _SchedulePagePrivate {
/* Model */
EMeetingStore *model;
-
+
/* Selector */
EMeetingTimeSelector *sel;
-
+
/* The timezone we use. Note that we use the same timezone for the
start and end date. We convert the end date if it is passed in in
another timezone. */
@@ -125,7 +125,7 @@ schedule_page_finalize (GObject *object)
{
SchedulePage *spage;
SchedulePagePrivate *priv;
-
+
g_return_if_fail (object != NULL);
g_return_if_fail (IS_SCHEDULE_PAGE (object));
@@ -199,7 +199,7 @@ client_changed_cb (CompEditorPage *page, ECal *client, gpointer user_data)
/* Set date/time */
static void
-update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalComponentDateTime *end_date)
+update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalComponentDateTime *end_date)
{
SchedulePagePrivate *priv;
struct icaltimetype start_tt, end_tt;
@@ -228,7 +228,7 @@ update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalCompone
/* FIXME: Handle error better. */
g_warning ("Couldn't get timezone from server: %s",
end_date->tzid ? end_date->tzid : "");
- }
+ }
}
start_tt = *start_date->value;
@@ -237,15 +237,15 @@ update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalCompone
icaltime_adjust (&end_tt, 1, 0, 0, 0);
} else {
end_tt = *end_date->value;
- }
-
+ }
+
/* If the end zone is not the same as the start zone, we convert it. */
priv->zone = start_zone;
if (start_zone != end_zone) {
icaltimezone_convert_time (&end_tt, end_zone, start_zone);
}
e_meeting_store_set_zone (priv->model, priv->zone);
-
+
all_day = (start_tt.is_date && end_tt.is_date) ? TRUE : FALSE;
/* For All Day Events, if DTEND is after DTSTART, we subtract 1 day
@@ -268,7 +268,7 @@ update_time (SchedulePage *spage, ECalComponentDateTime *start_date, ECalCompone
}
-
+
/* Fills the widgets with default values */
static void
clear_widgets (SchedulePage *spage)
@@ -301,10 +301,10 @@ schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
validated = FALSE;
else
update_time (spage, &start_date, &end_date);
-
+
e_cal_component_free_datetime (&start_date);
e_cal_component_free_datetime (&end_date);
-
+
priv->updating = FALSE;
sensitize_widgets (spage);
@@ -324,12 +324,12 @@ schedule_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
{
SchedulePage *spage;
SchedulePagePrivate *priv;
-
+
spage = SCHEDULE_PAGE (page);
priv = spage->priv;
priv->updating = TRUE;
-
+
update_time (spage, dates->start, dates->end);
priv->updating = FALSE;
@@ -370,7 +370,7 @@ get_widgets (SchedulePage *spage)
}
static gboolean
-init_widgets (SchedulePage *spage)
+init_widgets (SchedulePage *spage)
{
SchedulePagePrivate *priv;
@@ -398,20 +398,20 @@ schedule_page_set_meeting_time (SchedulePage *spage, icaltimetype *start_tt, ica
}
}
- e_meeting_time_selector_set_meeting_time (priv->sel, start_tt->year, start_tt->month, start_tt->day,
+ e_meeting_time_selector_set_meeting_time (priv->sel, start_tt->year, start_tt->month, start_tt->day,
start_tt->hour, start_tt->minute, end_tt->year, end_tt->month, end_tt->day, end_tt->hour,
end_tt->minute);
e_meeting_time_selector_set_all_day (priv->sel, all_day);
-
+
}
/**
* schedule_page_construct:
* @spage: An schedule page.
- *
+ *
* Constructs an schedule page by loading its Glade data.
- *
- * Return value: The same object as @spage, or NULL if the widgets could not
+ *
+ * Return value: The same object as @spage, or NULL if the widgets could not
* be created.
**/
SchedulePage *
@@ -419,7 +419,7 @@ schedule_page_construct (SchedulePage *spage, EMeetingStore *ems)
{
SchedulePagePrivate *priv;
char *gladefile;
-
+
priv = spage->priv;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
@@ -443,7 +443,7 @@ schedule_page_construct (SchedulePage *spage, EMeetingStore *ems)
/* Model */
g_object_ref (ems);
priv->model = ems;
-
+
/* Selector */
priv->sel = E_MEETING_TIME_SELECTOR (e_meeting_time_selector_new (ems));
gtk_widget_set_size_request ((GtkWidget *) priv->sel, -1, 400);
@@ -456,7 +456,7 @@ schedule_page_construct (SchedulePage *spage, EMeetingStore *ems)
gtk_box_pack_start (GTK_BOX (priv->main), GTK_WIDGET (priv->sel), TRUE, TRUE, 6);
if (!init_widgets (spage)) {
- g_message ("schedule_page_construct(): "
+ g_message ("schedule_page_construct(): "
"Could not initialize the widgets!");
return NULL;
}
@@ -468,9 +468,9 @@ schedule_page_construct (SchedulePage *spage, EMeetingStore *ems)
/**
* schedule_page_new:
- *
+ *
* Creates a new schedule page.
- *
+ *
* Return value: A newly-created schedule page, or NULL if the page could
* not be created.
**/
@@ -492,12 +492,12 @@ void
schedule_page_update_free_busy (SchedulePage *spage)
{
SchedulePagePrivate *priv;
-
+
g_return_if_fail (spage != NULL);
g_return_if_fail (IS_SCHEDULE_PAGE (spage));
-
+
priv = spage->priv;
-
+
e_meeting_time_selector_refresh_free_busy (priv->sel, 0, TRUE);
}
@@ -508,7 +508,7 @@ schedule_page_set_name_selector (SchedulePage *spage, ENameSelector *name_select
g_return_if_fail (spage != NULL);
g_return_if_fail (IS_SCHEDULE_PAGE (spage));
-
+
priv = spage->priv;
e_meeting_list_view_set_name_selector (priv->sel->list_view, name_selector);
@@ -523,12 +523,12 @@ times_changed_cb (GtkWidget *widget, gpointer data)
ECalComponentDateTime start_dt, end_dt;
struct icaltimetype start_tt = icaltime_null_time ();
struct icaltimetype end_tt = icaltime_null_time ();
-
+
priv = spage->priv;
if (priv->updating)
return;
-
+
e_date_edit_get_date (E_DATE_EDIT (priv->sel->start_date_edit),
&start_tt.year,
&start_tt.month,
@@ -562,7 +562,7 @@ times_changed_cb (GtkWidget *widget, gpointer data)
}
dates.start = &start_dt;
- dates.end = &end_dt;
+ dates.end = &end_dt;
dates.due = NULL;
dates.complete = NULL;
diff --git a/calendar/gui/dialogs/select-source-dialog.c b/calendar/gui/dialogs/select-source-dialog.c
index db15963717..7fef786e0f 100644
--- a/calendar/gui/dialogs/select-source-dialog.c
+++ b/calendar/gui/dialogs/select-source-dialog.c
@@ -64,13 +64,13 @@ select_source_dialog (GtkWindow *parent, ECalSourceType obj_type)
icon_list = e_icon_factory_get_icon_list ("stock_todo");
else if (obj_type == E_CAL_SOURCE_TYPE_JOURNAL)
icon_list = e_icon_factory_get_icon_list ("stock_journal");
-
+
if (icon_list) {
gtk_window_set_icon_list (GTK_WINDOW (dialog), icon_list);
g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
g_list_free (icon_list);
}
-
+
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
selected_source = e_source_selector_dialog_peek_primary_selection (E_SOURCE_SELECTOR_DIALOG (dialog));
if (selected_source) {
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
index 4be26333a4..0db1be872a 100644
--- a/calendar/gui/dialogs/send-comp.c
+++ b/calendar/gui/dialogs/send-comp.c
@@ -30,10 +30,10 @@
/**
* send_component_dialog:
- *
+ *
* Pops up a dialog box asking the user whether he wants to send a
* iTip/iMip message
- *
+ *
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
@@ -41,10 +41,10 @@ send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gbo
{
ECalComponentVType vtype;
const char *id;
-
+
if (e_cal_get_save_schedules (client))
return FALSE;
-
+
vtype = e_cal_component_get_vtype (comp);
switch (vtype) {
@@ -68,7 +68,7 @@ send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gbo
"Cannot handle object of type %d", vtype);
return FALSE;
}
-
+
if (e_error_run (parent, id, NULL) == GTK_RESPONSE_YES)
return TRUE;
else
@@ -80,7 +80,7 @@ send_component_prompt_subject (GtkWindow *parent, ECal *client, ECalComponent *c
{
ECalComponentVType vtype;
const char *id;
-
+
vtype = e_cal_component_get_vtype (comp);
switch (vtype) {
@@ -100,7 +100,7 @@ send_component_prompt_subject (GtkWindow *parent, ECal *client, ECalComponent *c
"Cannot handle object of type %d", vtype);
return FALSE;
}
-
+
if (e_error_run (parent, id, NULL) == GTK_RESPONSE_YES)
return TRUE;
else
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index 572e2909d2..b9d5ace108 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -133,7 +133,7 @@ task_details_page_init (TaskDetailsPage *tdpage)
priv->status = NULL;
priv->priority = NULL;
priv->percent_complete = NULL;
-
+
priv->date_completed_label = NULL;
priv->completed_date = NULL;
@@ -264,12 +264,12 @@ sensitize_widgets (TaskDetailsPage *tdpage)
{
gboolean read_only;
TaskDetailsPagePrivate *priv;
-
+
priv = tdpage->priv;
if (!e_cal_is_read_only (COMP_EDITOR_PAGE (tdpage)->client, &read_only, NULL))
read_only = TRUE;
-
+
gtk_widget_set_sensitive (priv->status, !read_only);
gtk_widget_set_sensitive (priv->priority, !read_only);
gtk_widget_set_sensitive (priv->percent_complete, !read_only);
@@ -294,10 +294,10 @@ task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
priv = tdpage->priv;
priv->updating = TRUE;
-
+
/* Clean the screen */
clear_widgets (tdpage);
-
+
/* Percent Complete. */
e_cal_component_get_percent (comp, &percent);
if (percent) {
@@ -361,7 +361,7 @@ task_details_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* URL */
e_cal_component_get_url (comp, &url);
e_dialog_editable_set (priv->url, url);
-
+
priv->updating = FALSE;
sensitize_widgets (tdpage);
@@ -382,7 +382,7 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp)
char *url;
gboolean date_set;
icaltimezone *zone = calendar_config_get_icaltimezone ();
-
+
tdpage = TASK_DETAILS_PAGE (page);
priv = tdpage->priv;
@@ -426,7 +426,7 @@ task_details_page_fill_component (CompEditorPage *page, ECalComponent *comp)
icaltimezone_convert_time (&icaltoday, zone,
icaltimezone_get_utc_timezone());
- if (icaltime_compare_date_only (icalcomplete, icaltoday) > 0) {
+ if (icaltime_compare_date_only (icalcomplete, icaltoday) > 0) {
comp_editor_page_display_validation_error (page, _("Completed date is wrong"), priv->completed_date);
return FALSE;
}
@@ -513,7 +513,7 @@ get_widgets (TaskDetailsPage *tdpage)
gtk_widget_show (priv->url_entry);
priv->url = e_url_entry_get_entry (E_URL_ENTRY (priv->url_entry));
atk_object_set_name (gtk_widget_get_accessible (priv->url), _("Web Page"));
-
+
#undef GW
return (priv->status
@@ -540,10 +540,10 @@ complete_date_changed (TaskDetailsPage *tdpage, time_t ctime, gboolean complete)
dates.start = NULL;
dates.end = NULL;
- dates.due = NULL;
+ dates.due = NULL;
if (complete)
dates.complete = &completed_tt;
-
+
/* Notify upstream */
comp_editor_page_notify_dates_changed (COMP_EDITOR_PAGE (tdpage),
&dates);
@@ -593,7 +593,7 @@ date_changed_cb (EDateEdit *dedit, gpointer data)
}
e_dialog_spin_set (priv->percent_complete, 100);
}
-
+
priv->updating = FALSE;
/* Notify upstream */
@@ -607,7 +607,7 @@ status_changed (GtkMenu *menu, TaskDetailsPage *tdpage)
TaskDetailsPagePrivate *priv;
icalproperty_status status;
time_t ctime = -1;
-
+
priv = tdpage->priv;
if (priv->updating)
@@ -647,12 +647,12 @@ percent_complete_changed (GtkAdjustment *adj, TaskDetailsPage *tdpage)
icalproperty_status status;
gboolean complete;
time_t ctime = -1;
-
+
priv = tdpage->priv;
if (priv->updating)
return;
-
+
priv->updating = TRUE;
percent = e_dialog_spin_get_int (priv->percent_complete);
@@ -684,7 +684,7 @@ field_changed_cb (GtkWidget *widget, gpointer data)
{
TaskDetailsPage *tdpage;
TaskDetailsPagePrivate *priv;
-
+
tdpage = TASK_DETAILS_PAGE (data);
priv = tdpage->priv;
@@ -748,10 +748,10 @@ client_changed_cb (CompEditorPage *page, ECal *client, gpointer user_data)
/**
* task_details_page_construct:
* @tdpage: An task details page.
- *
+ *
* Constructs an task page by loading its Glade data.
- *
- * Return value: The same object as @tdpage, or NULL if the widgets could not
+ *
+ * Return value: The same object as @tdpage, or NULL if the widgets could not
* be created.
**/
TaskDetailsPage *
@@ -790,9 +790,9 @@ task_details_page_construct (TaskDetailsPage *tdpage)
/**
* task_details_page_new:
- *
+ *
* Creates a new task details page.
- *
+ *
* Return value: A newly-created task details page, or NULL if the page could
* not be created.
**/
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 84512eaba1..8c9ee465e6 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -44,13 +44,13 @@
struct _TaskEditorPrivate {
TaskPage *task_page;
TaskDetailsPage *task_details_page;
-
+
GtkWidget *task_details_window;
EMeetingStore *model;
-
+
gboolean assignment_shown;
gboolean is_assigned;
- gboolean updating;
+ gboolean updating;
};
@@ -111,11 +111,11 @@ menu_view_role_cb (BonoboUIComponent *component,
gpointer user_data)
{
TaskEditor *te = (TaskEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- task_page_set_view_role (te->priv->task_page, atoi(state));
- calendar_config_set_show_role (atoi(state));
+ task_page_set_view_role (te->priv->task_page, atoi(state));
+ calendar_config_set_show_role (atoi(state));
}
static void
@@ -126,12 +126,12 @@ menu_view_status_cb (BonoboUIComponent *component,
gpointer user_data)
{
TaskEditor *te = (TaskEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
task_page_set_view_status (te->priv->task_page, atoi(state));
- calendar_config_set_show_status (atoi(state));
+ calendar_config_set_show_status (atoi(state));
}
static void
@@ -142,11 +142,11 @@ menu_view_type_cb (BonoboUIComponent *component,
gpointer user_data)
{
TaskEditor *te = (TaskEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- task_page_set_view_type (te->priv->task_page, atoi(state));
- calendar_config_set_show_type (atoi(state));
+ task_page_set_view_type (te->priv->task_page, atoi(state));
+ calendar_config_set_show_type (atoi(state));
}
static void
@@ -157,11 +157,11 @@ menu_view_rsvp_cb (BonoboUIComponent *component,
gpointer user_data)
{
TaskEditor *te = (TaskEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- task_page_set_view_rsvp (te->priv->task_page, atoi(state));
- calendar_config_set_show_rsvp (atoi(state));
+ task_page_set_view_rsvp (te->priv->task_page, atoi(state));
+ calendar_config_set_show_rsvp (atoi(state));
}
static void
@@ -172,10 +172,10 @@ menu_show_time_zone_cb (BonoboUIComponent *component,
gpointer user_data)
{
TaskEditor *te = (TaskEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- task_page_set_show_timezone (te->priv->task_page, atoi(state));
+ task_page_set_show_timezone (te->priv->task_page, atoi(state));
calendar_config_set_show_timezone (atoi(state));
}
@@ -187,11 +187,11 @@ menu_show_categories_cb (BonoboUIComponent *component,
gpointer user_data)
{
TaskEditor *te = (TaskEditor *) user_data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
- task_page_set_show_categories (te->priv->task_page, atoi(state));
+ task_page_set_show_categories (te->priv->task_page, atoi(state));
calendar_config_set_show_categories (atoi(state));
}
@@ -221,7 +221,7 @@ menu_class_private_cb (BonoboUIComponent *ui_component,
TaskEditor *te = (TaskEditor *) user_data;
if (state[0] == '0')
return;
-
+
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (te->priv->task_page));
task_page_set_classification (te->priv->task_page, E_CAL_COMPONENT_CLASS_PRIVATE);
}
@@ -236,7 +236,7 @@ menu_class_confidential_cb (BonoboUIComponent *ui_component,
TaskEditor *te = (TaskEditor *) user_data;
if (state[0] == '0')
return;
-
+
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (te->priv->task_page));
task_page_set_classification (te->priv->task_page, E_CAL_COMPONENT_CLASS_CONFIDENTIAL);
}
@@ -250,7 +250,7 @@ menu_option_status_cb (BonoboUIComponent *ui_component,
gpointer user_data)
{
TaskEditor *te = (TaskEditor *) user_data;
-
+
gtk_widget_show (te->priv->task_details_window);
}
@@ -260,7 +260,7 @@ menu_insert_send_options_cmd (BonoboUIComponent *uic,
const char *path)
{
TaskEditor *te = (TaskEditor *) data;
-
+
task_page_sendoptions_clicked_cb (te->priv->task_page);
}
@@ -270,8 +270,8 @@ menu_show_time_zone_cmd (BonoboUIComponent *uic,
const char *path)
{ /* TODO implement it
TaskEditor *te = (TaskEditor *) data;
-
- task_page_set_show_timezone (te->priv->task_page, atoi(state));
+
+ task_page_set_show_timezone (te->priv->task_page, atoi(state));
calendar_config_set_show_timezone (atoi(state)); */
}
@@ -281,25 +281,25 @@ menu_option_status_cmd (BonoboUIComponent *uic,
const char *path)
{
TaskEditor *te = (TaskEditor *) data;
-
+
gtk_widget_show (te->priv->task_details_window);
}
static BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("ViewTimeZone", menu_show_time_zone_cmd),
+ BONOBO_UI_VERB ("ViewTimeZone", menu_show_time_zone_cmd),
BONOBO_UI_VERB ("OptionStatus", menu_option_status_cmd),
BONOBO_UI_VERB ("InsertSendOptions", menu_insert_send_options_cmd),
BONOBO_UI_VERB_END
};
static EPixmap pixmaps[] = {
- E_PIXMAP ("/commands/OptionStatus", "stock_view-details", E_ICON_SIZE_MENU),
+ E_PIXMAP ("/commands/OptionStatus", "stock_view-details", E_ICON_SIZE_MENU),
E_PIXMAP ("/commands/ViewTimeZone", "stock_timezone", E_ICON_SIZE_MENU),
- E_PIXMAP ("/Toolbar/ViewTimeZone", "stock_timezone", E_ICON_SIZE_LARGE_TOOLBAR),
- E_PIXMAP ("/Toolbar/OptionStatus", "stock_view-details", E_ICON_SIZE_LARGE_TOOLBAR),
-
+ E_PIXMAP ("/Toolbar/ViewTimeZone", "stock_timezone", E_ICON_SIZE_LARGE_TOOLBAR),
+ E_PIXMAP ("/Toolbar/OptionStatus", "stock_view-details", E_ICON_SIZE_LARGE_TOOLBAR),
+
E_PIXMAP_END
};
@@ -312,13 +312,13 @@ task_editor_init (TaskEditor *te)
CompEditor *editor = COMP_EDITOR(te);
gboolean status;
char *xmlfile;
-
+
priv = g_new0 (TaskEditorPrivate, 1);
te->priv = priv;
priv->model = E_MEETING_STORE (e_meeting_store_new ());
priv->assignment_shown = TRUE;
- priv->updating = FALSE;
+ priv->updating = FALSE;
priv->is_assigned = FALSE;
bonobo_ui_component_freeze (editor->uic, NULL);
@@ -341,7 +341,7 @@ task_editor_init (TaskEditor *te)
bonobo_ui_component_add_listener (
editor->uic, "ViewStatus",
menu_view_status_cb, editor);
-
+
/* Show hide the type fields */
status = calendar_config_get_show_type ();
bonobo_ui_component_set_prop (
@@ -399,14 +399,14 @@ task_editor_init (TaskEditor *te)
menu_class_confidential_cb, editor);
bonobo_ui_component_add_listener (
- editor->uic, "OptionStatus",
+ editor->uic, "OptionStatus",
menu_option_status_cb, editor);
-
+
e_pixmaps_update (editor->uic, pixmaps);
- bonobo_ui_component_thaw (editor->uic, NULL);
+ bonobo_ui_component_thaw (editor->uic, NULL);
+
-
comp_editor_set_help_section (COMP_EDITOR (te), "usage-calendar-todo");
}
@@ -416,12 +416,12 @@ task_editor_construct (TaskEditor *te, ECal *client)
TaskEditorPrivate *priv;
gboolean read_only = FALSE;
CompEditor *editor = COMP_EDITOR (te);
-
+
priv = te->priv;
priv->task_page = task_page_new (priv->model, client, editor->uic);
g_object_ref_sink (priv->task_page);
- comp_editor_append_page (COMP_EDITOR (te),
+ comp_editor_append_page (COMP_EDITOR (te),
COMP_EDITOR_PAGE (priv->task_page),
_("_Task"), TRUE);
g_signal_connect (G_OBJECT (priv->task_page), "client_changed",
@@ -433,27 +433,27 @@ task_editor_construct (TaskEditor *te, ECal *client)
NULL);
g_signal_connect (priv->task_details_window, "response", G_CALLBACK(gtk_widget_hide), NULL);
g_signal_connect (priv->task_details_window, "delete-event", G_CALLBACK(gtk_widget_hide), NULL);
-
+
priv->task_details_page = task_details_page_new ();
g_object_ref_sink (priv->task_details_page);
- gtk_container_add ((GtkContainer *) GTK_DIALOG(priv->task_details_window)->vbox,
+ gtk_container_add ((GtkContainer *) GTK_DIALOG(priv->task_details_window)->vbox,
comp_editor_page_get_widget ((CompEditorPage *)priv->task_details_page));
gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (priv->task_details_window) ) );
/* gtk_widget_hide (priv->task_details_window); */
comp_editor_append_page (editor, COMP_EDITOR_PAGE (priv->task_details_page), NULL, FALSE);
-
+
if (!e_cal_is_read_only (client, &read_only, NULL))
read_only = TRUE;
if (priv->is_assigned) {
if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
task_page_show_options (priv->task_page);
-
+
task_page_set_assignment (priv->task_page, TRUE);
comp_editor_set_group_item (COMP_EDITOR (te), TRUE);
} else {
task_page_set_assignment (priv->task_page, FALSE);
-
+
bonobo_ui_component_set_prop (editor->uic, "/commands/InsertSendOptions", "hidden", "1", NULL);
bonobo_ui_component_set_prop (editor->uic, "/commands/ViewRole", "hidden", "1", NULL);
bonobo_ui_component_set_prop (editor->uic, "/commands/ViewRSVP", "hidden", "1", NULL);
@@ -492,7 +492,7 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
ECalComponentOrganizer organizer;
ECal *client;
GSList *attendees = NULL;
-
+
te = TASK_EDITOR (editor);
priv = te->priv;
@@ -506,12 +506,12 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
/* Get meeting related stuff */
e_cal_component_get_organizer (comp, &organizer);
e_cal_component_get_attendee_list (comp, &attendees);
-
+
if (attendees != NULL) {
GSList *l;
int row;
-
- task_page_hide_options (priv->task_page);
+
+ task_page_hide_options (priv->task_page);
task_page_set_assignment (priv->task_page, TRUE);
for (l = attendees; l != NULL; l = l->next) {
@@ -522,7 +522,7 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
/* If we aren't the organizer or the attendee is just delegating, don't allow editing */
if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia))
e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
- e_meeting_store_add_attendee (priv->model, ia);
+ e_meeting_store_add_attendee (priv->model, ia);
g_object_unref(ia);
}
@@ -551,10 +551,10 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
if (ia != NULL)
e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
}
-
-
+
+
comp_editor_set_group_item (COMP_EDITOR (te), TRUE);
- priv->assignment_shown = TRUE;
+ priv->assignment_shown = TRUE;
}
e_cal_component_free_attendee_list (attendees);
@@ -576,12 +576,12 @@ task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method)
if (method == E_CAL_COMPONENT_METHOD_PUBLISH ||
method == E_CAL_COMPONENT_METHOD_CANCEL)
goto parent;
-
+
comp = task_page_get_cancel_comp (priv->task_page);
if (comp != NULL) {
ECal *client;
gboolean result;
-
+
client = e_meeting_store_get_e_cal (priv->model);
result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
client, NULL, NULL, NULL);
@@ -620,12 +620,12 @@ task_editor_finalize (GObject *object)
g_object_unref (priv->task_details_page);
priv->task_details_page = NULL;
}
-
+
if (priv->model) {
g_object_unref (priv->model);
priv->model = NULL;
}
-
+
g_free (priv);
if (G_OBJECT_CLASS (task_editor_parent_class)->finalize)
@@ -685,7 +685,7 @@ model_changed (TaskEditor *te)
if (!te->priv->updating) {
comp_editor_set_changed (COMP_EDITOR (te), TRUE);
comp_editor_set_needs_send (COMP_EDITOR (te), TRUE);
- }
+ }
}
static void
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index e6db2e932e..c929d32ea3 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -63,13 +63,13 @@ struct _TaskPagePrivate {
/* Bonobo Controller for the menu/toolbar */
BonoboUIComponent *uic;
-
+
/* Widgets from the Glade file */
GtkWidget *main;
EAccountList *accounts;
GList *address_strings;
- EMeetingAttendee *ia;
+ EMeetingAttendee *ia;
char *default_address;
char *user_add;
ECalComponent *comp;
@@ -81,7 +81,7 @@ struct _TaskPagePrivate {
/* Lists of attendees */
GPtrArray *deleted_attendees;
-
+
/* Generic informative messages placeholder */
GtkWidget *info_hbox;
GtkWidget *info_icon;
@@ -94,7 +94,7 @@ struct _TaskPagePrivate {
GtkWidget *start_date;
GtkWidget *timezone;
GtkWidget *timezone_label;
-
+
GtkWidget *description;
ECalComponentClassification classification;
@@ -123,7 +123,7 @@ struct _TaskPagePrivate {
/* For handling who the organizer is */
gboolean user_org;
gboolean existing;
-
+
gboolean updating;
gboolean sendoptions_shown;
gboolean is_assignment;
@@ -207,7 +207,7 @@ task_page_init (TaskPage *tpage)
priv->updating = FALSE;
priv->sendoptions_shown = FALSE;
priv->is_assignment = FALSE;
-
+
priv->deleted_attendees = g_ptr_array_new ();
priv->comp = NULL;
@@ -217,16 +217,16 @@ task_page_init (TaskPage *tpage)
priv->ia = NULL;
priv->default_address = NULL;
priv->invite = NULL;
-
+
priv->model = NULL;
- priv->list_view = NULL;
+ priv->list_view = NULL;
}
static void
cleanup_attendees (GPtrArray *attendees)
{
int i;
-
+
for (i = 0; i < attendees->len; i++)
g_object_unref (g_ptr_array_index (attendees, i));
}
@@ -256,7 +256,7 @@ task_page_finalize (GObject *object)
g_object_unref (priv->xml);
priv->xml = NULL;
}
-
+
if (priv->sod) {
g_object_unref (priv->sod);
priv->sod = NULL;
@@ -264,7 +264,7 @@ task_page_finalize (GObject *object)
if (priv->comp != NULL)
g_object_unref (priv->comp);
-
+
cleanup_attendees (priv->deleted_attendees);
g_ptr_array_free (priv->deleted_attendees, TRUE);
@@ -383,7 +383,7 @@ task_page_set_view_rsvp (TaskPage *page, gboolean state)
e_meeting_list_view_column_set_visible (priv->list_view, "RSVP", state);
}
-void
+void
task_page_set_classification (TaskPage *page, ECalComponentClassification class)
{
page->priv->classification = class;
@@ -394,19 +394,19 @@ sensitize_widgets (TaskPage *tpage)
{
gboolean read_only, sens = TRUE, sensitize;
TaskPagePrivate *priv;
-
+
priv = tpage->priv;
if (!e_cal_is_read_only (COMP_EDITOR_PAGE (tpage)->client, &read_only, NULL))
read_only = TRUE;
-
+
if (COMP_EDITOR_PAGE (tpage)->flags & COMP_EDITOR_IS_ASSIGNED)
sens = COMP_EDITOR_PAGE (tpage)->flags & COMP_EDITOR_PAGE_USER_ORG;
sensitize = (!read_only && sens);
- /* The list of organizers is set to be non-editable. Otherwise any
- * change in the displayed list causes an 'Account not found' error.
+ /* The list of organizers is set to be non-editable. Otherwise any
+ * change in the displayed list causes an 'Account not found' error.
*/
gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (priv->organizer)->entry), FALSE);
@@ -424,7 +424,7 @@ sensitize_widgets (TaskPage *tpage)
e_meeting_list_view_set_editable (priv->list_view, (!read_only && sens));
gtk_widget_set_sensitive (priv->remove, (!read_only && sens));
gtk_widget_set_sensitive (priv->invite, (!read_only && sens));
- gtk_widget_set_sensitive (GTK_WIDGET (priv->list_view), !read_only);
+ gtk_widget_set_sensitive (GTK_WIDGET (priv->list_view), !read_only);
bonobo_ui_component_set_prop (priv->uic, "/commands/InsertAttachments", "sensitive", sensitize ? "1" : "0"
, NULL);
@@ -443,7 +443,7 @@ sensitize_widgets (TaskPage *tpage)
bonobo_ui_component_set_prop (priv->uic, "/commands/OptionStatus", "sensitive", sensitize ? "1" : "0"
, NULL);
-
+
if (!priv->is_assignment) {
gtk_widget_hide (priv->calendar_label);
gtk_widget_hide (priv->list_box);
@@ -452,12 +452,12 @@ sensitize_widgets (TaskPage *tpage)
gtk_widget_hide (priv->invite);
gtk_label_set_text_with_mnemonic ((GtkLabel *) priv->org_cal_label, _("_Group:"));
} else {
- gtk_widget_show (priv->invite);
+ gtk_widget_show (priv->invite);
gtk_widget_show (priv->calendar_label);
gtk_widget_show (priv->list_box);
gtk_widget_show (priv->attendee_box);
gtk_widget_show (priv->organizer);
- gtk_label_set_text_with_mnemonic ((GtkLabel *) priv->org_cal_label, _("Or_ganizer:"));
+ gtk_label_set_text_with_mnemonic ((GtkLabel *) priv->org_cal_label, _("Or_ganizer:"));
}
}
void
@@ -468,13 +468,13 @@ task_page_hide_options (TaskPage *page)
bonobo_ui_component_set_prop (page->priv->uic, "/commands/InsertSendOptions", "hidden", "1", NULL);
page->priv->sendoptions_shown = FALSE;
-
+
}
void
task_page_show_options (TaskPage *page)
{
g_return_if_fail (IS_TASK_PAGE (page));
-
+
bonobo_ui_component_set_prop (page->priv->uic, "/commands/InsertSendOptions", "hidden", "0", NULL);
page->priv->sendoptions_shown = TRUE;
}
@@ -490,17 +490,17 @@ task_page_set_assignment (TaskPage *page, gboolean set)
static EAccount *
get_current_account (TaskPage *page)
-{
+{
TaskPagePrivate *priv;
EIterator *it;
const char *str;
-
+
priv = page->priv;
str = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (priv->organizer)->entry));
if (!str)
return NULL;
-
+
for (it = e_list_get_iterator((EList *)priv->accounts); e_iterator_is_valid(it); e_iterator_next(it)) {
EAccount *a = (EAccount *)e_iterator_get(it);
char *full = g_strdup_printf("%s <%s>", a->id->name, a->id->address);
@@ -511,12 +511,12 @@ get_current_account (TaskPage *page)
return a;
}
-
+
g_free (full);
}
g_object_unref (it);
-
- return NULL;
+
+ return NULL;
}
/* fill_widgets handler for the task page */
@@ -543,10 +543,10 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
if (priv->comp != NULL)
g_object_unref (priv->comp);
priv->comp = NULL;
-
+
cleanup_attendees (priv->deleted_attendees);
g_ptr_array_set_size (priv->deleted_attendees, 0);
-
+
/* Component for cancellation */
priv->comp = e_cal_component_clone (comp);
@@ -554,7 +554,7 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
clear_widgets (tpage);
priv->user_add = itip_get_comp_attendee (comp, page->client);
-
+
/* Summary, description(s) */
e_cal_component_get_summary (comp, &text);
e_dialog_editable_set (priv->summary, text.value);
@@ -562,7 +562,7 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
e_cal_component_get_description_list (comp, &l);
if (l && l->data) {
ECalComponentText *dtext;
-
+
dtext = l->data;
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
dtext->value ? dtext->value : "", -1);
@@ -608,14 +608,14 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
g_warning ("Couldn't get timezone from server: %s",
d.tzid ? d.tzid : "");
}
-
+
e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->timezone),
zone ? zone : default_zone);
task_page_set_show_timezone (tpage, calendar_config_get_show_timezone());
if (!(COMP_EDITOR_PAGE (tpage)->flags & COMP_EDITOR_PAGE_NEW_ITEM) && !zone) {
task_page_set_show_timezone (tpage, FALSE);
- bonobo_ui_component_set_prop (priv->uic, "/commands/ViewTimeZone",
+ bonobo_ui_component_set_prop (priv->uic, "/commands/ViewTimeZone",
"state", "0", NULL);
}
@@ -684,9 +684,9 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
set_subscriber_info_string (tpage, backend_addr);
if (priv->is_assignment) {
- ECalComponentOrganizer organizer;
-
- priv->user_add = itip_get_comp_attendee (comp, COMP_EDITOR_PAGE (tpage)->client);
+ ECalComponentOrganizer organizer;
+
+ priv->user_add = itip_get_comp_attendee (comp, COMP_EDITOR_PAGE (tpage)->client);
/* Organizer strings */
task_page_select_organizer (tpage, backend_addr);
@@ -737,7 +737,7 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
if (!(backend_addr && *backend_addr) || !g_ascii_strcasecmp (backend_addr, a->id->address)) {
e_meeting_attendee_set_address (priv->ia, g_strdup_printf ("MAILTO:%s", a->id->address));
e_meeting_attendee_set_cn (priv->ia, g_strdup (a->id->name));
- } else {
+ } else {
e_meeting_attendee_set_address (priv->ia, g_strdup_printf ("MAILTO:%s", backend_addr));
e_meeting_attendee_set_sentby (priv->ia, g_strdup_printf ("MAILTO:%s", a->id->address));
}
@@ -751,7 +751,7 @@ task_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
}
}
- if (backend_addr)
+ if (backend_addr)
g_free (backend_addr);
priv->updating = FALSE;
@@ -766,22 +766,22 @@ set_attendees (ECalComponent *comp, const GPtrArray *attendees)
{
GSList *comp_attendees = NULL, *l;
int i;
-
+
for (i = 0; i < attendees->len; i++) {
EMeetingAttendee *ia = g_ptr_array_index (attendees, i);
ECalComponentAttendee *ca;
-
+
ca = e_meeting_attendee_as_e_cal_component_attendee (ia);
-
+
comp_attendees = g_slist_prepend (comp_attendees, ca);
-
+
}
comp_attendees = g_slist_reverse (comp_attendees);
-
+
e_cal_component_set_attendee_list (comp, comp_attendees);
-
+
for (l = comp_attendees; l != NULL; l = l->next)
- g_free (l->data);
+ g_free (l->data);
g_slist_free (comp_attendees);
}
@@ -906,12 +906,12 @@ task_page_fill_component (CompEditorPage *page, ECalComponent *comp)
} else {
e_cal_component_set_dtstart (comp, NULL);
}
-
+
/* Classification. */
e_cal_component_set_classification (comp, priv->classification);
-
+
/* send options */
- if (priv->sendoptions_shown && priv->sod)
+ if (priv->sendoptions_shown && priv->sod)
e_sendoptions_utils_fill_component (priv->sod, comp);
/* Categories */
@@ -941,14 +941,14 @@ task_page_fill_component (CompEditorPage *page, ECalComponent *comp)
if (a == NULL) {
e_notice (page, GTK_MESSAGE_ERROR,
_("The organizer selected no longer has an account."));
- return FALSE;
+ return FALSE;
}
if (a->id->address == NULL || strlen (a->id->address) == 0) {
e_notice (page, GTK_MESSAGE_ERROR,
_("An organizer is required."));
return FALSE;
- }
+ }
if (!(backend_addr && *backend_addr) || !g_ascii_strcasecmp (backend_addr, a->id->address)) {
org_addr = g_strdup_printf ("MAILTO:%s", a->id->address);
@@ -1004,7 +1004,7 @@ task_page_fill_component (CompEditorPage *page, ECalComponent *comp)
}
e_cal_component_set_attendee_list (comp, attendee_list);
e_cal_component_free_attendee_list (attendee_list);
- } else
+ } else
set_attendees (comp, e_meeting_store_get_attendees (priv->model));
}
@@ -1043,16 +1043,16 @@ static void edit_clicked_cb (GtkButton *btn, TaskPage *tpage)
static gboolean
-existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
+existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
{
GSList *attendees, *l;
const gchar *ia_address;
const gchar *ia_sentby = NULL;
-
+
ia_address = itip_strip_mailto (e_meeting_attendee_get_address (ia));
if (!ia_address)
return FALSE;
-
+
if (e_meeting_attendee_is_set_sentby (ia))
ia_sentby = itip_strip_mailto (e_meeting_attendee_get_sentby (ia));
@@ -1062,7 +1062,7 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
ECalComponentAttendee *attendee = l->data;
const char *address;
const char *sentby = NULL;
-
+
address = itip_strip_mailto (attendee->value);
if (attendee->sentby)
sentby = itip_strip_mailto (attendee->sentby);
@@ -1072,19 +1072,19 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
return TRUE;
}
}
-
+
e_cal_component_free_attendee_list (attendees);
-
+
return FALSE;
}
static void
-remove_attendee (TaskPage *page, EMeetingAttendee *ia)
+remove_attendee (TaskPage *page, EMeetingAttendee *ia)
{
TaskPagePrivate *priv;
int pos = 0;
gboolean delegate = (COMP_EDITOR_PAGE (page)->flags & COMP_EDITOR_PAGE_DELEGATE);
-
+
priv = page->priv;
/* If the user deletes the organizer attendee explicitly,
@@ -1092,22 +1092,22 @@ remove_attendee (TaskPage *page, EMeetingAttendee *ia)
if (ia == priv->ia) {
g_object_unref (priv->ia);
priv->ia = NULL;
- }
-
+ }
+
/* If this was a delegatee, no longer delegate */
if (e_meeting_attendee_is_set_delfrom (ia)) {
EMeetingAttendee *ib;
-
+
ib = e_meeting_store_find_attendee (priv->model, e_meeting_attendee_get_delfrom (ia), &pos);
if (ib != NULL) {
e_meeting_attendee_set_delto (ib, NULL);
-
- if (!delegate)
+
+ if (!delegate)
e_meeting_attendee_set_edit_level (ib, E_MEETING_ATTENDEE_EDIT_FULL);
- }
+ }
}
-
- /* Handle deleting all attendees in the delegation chain */
+
+ /* Handle deleting all attendees in the delegation chain */
while (ia != NULL) {
EMeetingAttendee *ib = NULL;
@@ -1115,14 +1115,14 @@ remove_attendee (TaskPage *page, EMeetingAttendee *ia)
g_object_ref (ia);
g_ptr_array_add (priv->deleted_attendees, ia);
}
-
+
if (e_meeting_attendee_get_delto (ia) != NULL)
ib = e_meeting_store_find_attendee (priv->model, e_meeting_attendee_get_delto (ia), NULL);
e_meeting_store_remove_attendee (priv->model, ia);
ia = ib;
}
-
+
sensitize_widgets (page);
}
@@ -1138,7 +1138,7 @@ remove_clicked_cb (GtkButton *btn, TaskPage *page)
GtkTreeModel *model = NULL;
gboolean valid_iter;
char *address;
-
+
priv = page->priv;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list_view));
@@ -1148,10 +1148,10 @@ remove_clicked_cb (GtkButton *btn, TaskPage *page)
return;
}
paths = g_list_reverse (paths);
-
+
for (tmp = paths; tmp; tmp=tmp->next) {
path = tmp->data;
-
+
gtk_tree_model_get_iter (GTK_TREE_MODEL(priv->model), &iter, path);
gtk_tree_model_get (GTK_TREE_MODEL (priv->model), &iter, E_MEETING_STORE_ADDRESS_COL, &address, -1);
@@ -1161,35 +1161,35 @@ remove_clicked_cb (GtkButton *btn, TaskPage *page)
g_warning ("Cannot delete attendee\n");
continue;
} else if (e_meeting_attendee_get_edit_level (ia) != E_MEETING_ATTENDEE_EDIT_FULL) {
- g_warning("Not enough rights to delete attendee: %s\n", e_meeting_attendee_get_address(ia));
+ g_warning("Not enough rights to delete attendee: %s\n", e_meeting_attendee_get_address(ia));
continue;
}
-
+
remove_attendee (page, ia);
}
-
+
/* Select closest item after removal */
valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path);
if (!valid_iter) {
gtk_tree_path_prev (path);
valid_iter = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path);
}
-
+
if (valid_iter) {
gtk_tree_selection_unselect_all (selection);
gtk_tree_selection_select_iter (selection, &iter);
}
-
+
g_list_foreach (paths, (GFunc) gtk_tree_path_free, NULL);
g_list_free (paths);
}
static void
-invite_cb (GtkWidget *widget, gpointer data)
+invite_cb (GtkWidget *widget, gpointer data)
{
TaskPage *page;
TaskPagePrivate *priv;
-
+
page = TASK_PAGE (data);
priv = page->priv;
@@ -1199,7 +1199,7 @@ invite_cb (GtkWidget *widget, gpointer data)
static void
attendee_added_cb (EMeetingListView *emlv, EMeetingAttendee *ia, gpointer user_data)
{
- TaskPage *page = TASK_PAGE (user_data);
+ TaskPage *page = TASK_PAGE (user_data);
TaskPagePrivate *priv;
gboolean delegate = (COMP_EDITOR_PAGE (page)->flags & COMP_EDITOR_PAGE_DELEGATE);
@@ -1209,13 +1209,13 @@ attendee_added_cb (EMeetingListView *emlv, EMeetingAttendee *ia, gpointer user_d
if (existing_attendee (ia, priv->comp))
e_meeting_store_remove_attendee (priv->model, ia);
else {
- if (!e_cal_get_static_capability (COMP_EDITOR_PAGE(page)->client,
+ if (!e_cal_get_static_capability (COMP_EDITOR_PAGE(page)->client,
CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY)) {
const char *delegator_id = e_meeting_attendee_get_delfrom (ia);
EMeetingAttendee *delegator;
delegator = e_meeting_store_find_attendee (priv->model, delegator_id, NULL);
- e_meeting_attendee_set_delto (delegator,
+ e_meeting_attendee_set_delto (delegator,
g_strdup (e_meeting_attendee_get_address (ia)));
gtk_widget_set_sensitive (priv->invite, FALSE);
@@ -1253,7 +1253,7 @@ enum {
static EPopupItem context_menu_items[] = {
{ E_POPUP_ITEM, "10.delete", N_("_Remove"), popup_delete_cb, NULL, GTK_STOCK_REMOVE, ATTENDEE_CAN_DELETE },
- { E_POPUP_ITEM, "15.add", N_("_Add "), popup_add_cb, NULL, GTK_STOCK_ADD, ATTENDEE_CAN_ADD },
+ { E_POPUP_ITEM, "15.add", N_("_Add "), popup_add_cb, NULL, GTK_STOCK_ADD, ATTENDEE_CAN_ADD },
};
static void
@@ -1287,7 +1287,7 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, TaskPage *page)
GtkTreeSelection *selection;
if (gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->model), &iter, path)) {
-
+
gtk_tree_model_get (GTK_TREE_MODEL (priv->model), &iter, E_MEETING_STORE_ADDRESS_COL, &address, -1);
ia = e_meeting_store_find_attendee (priv->model, address, &priv->row);
g_free (address);
@@ -1296,7 +1296,7 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, TaskPage *page)
selection = gtk_tree_view_get_selection ((GtkTreeView *) priv->list_view);
gtk_tree_selection_unselect_all (selection);
gtk_tree_selection_select_path (selection, path);
-
+
if (e_meeting_attendee_get_edit_level (ia) == E_MEETING_ATTENDEE_EDIT_FULL)
disable_mask &= ~ATTENDEE_CAN_DELETE;
}
@@ -1312,7 +1312,7 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, TaskPage *page)
for (i=0;i<sizeof(context_menu_items)/sizeof(context_menu_items[0]);i++)
menus = g_slist_prepend(menus, &context_menu_items[i]);
-
+
e_popup_add_items((EPopup *)ep, menus, NULL, context_popup_free, page);
menu = e_popup_create_menu_once((EPopup *)ep, NULL, disable_mask);
gtk_menu_popup (menu, NULL, NULL, NULL, NULL, event->button, event->time);
@@ -1322,9 +1322,9 @@ button_press_event (GtkWidget *widget, GdkEventButton *event, TaskPage *page)
static gboolean
list_view_event (EMeetingListView *list_view, GdkEvent *event, TaskPage *page) {
-
+
TaskPagePrivate *priv= page->priv;
-
+
if (event->type == GDK_2BUTTON_PRESS && COMP_EDITOR_PAGE (page)->flags & COMP_EDITOR_PAGE_USER_ORG) {
EMeetingAttendee *attendee;
@@ -1338,7 +1338,7 @@ list_view_event (EMeetingListView *list_view, GdkEvent *event, TaskPage *page) {
return TRUE;
}
- return FALSE;
+ return FALSE;
}
@@ -1346,7 +1346,7 @@ static gboolean
list_key_press (EMeetingListView *list_view, GdkEventKey *event, TaskPage *page)
{
if (event->keyval == GDK_Delete) {
-
+
remove_clicked_cb (NULL, page);
return TRUE;
@@ -1359,17 +1359,17 @@ list_key_press (EMeetingListView *list_view, GdkEventKey *event, TaskPage *page)
return FALSE;
}
-void
+void
task_page_set_show_timezone (TaskPage *page, gboolean state)
{
if (state) {
gtk_widget_show_all (page->priv->timezone);
- gtk_widget_show (page->priv->timezone_label);
+ gtk_widget_show (page->priv->timezone_label);
} else {
gtk_widget_hide (page->priv->timezone);
gtk_widget_hide (page->priv->timezone_label);
}
-
+
}
void
@@ -1377,7 +1377,7 @@ task_page_set_show_categories (TaskPage *page, gboolean state)
{
if (state) {
gtk_widget_show (page->priv->categories_btn);
- gtk_widget_show (page->priv->categories);
+ gtk_widget_show (page->priv->categories);
} else {
gtk_widget_hide (page->priv->categories_btn);
gtk_widget_hide (page->priv->categories);
@@ -1406,7 +1406,7 @@ task_page_fill_timezones (CompEditorPage *page, GHashTable *timezones)
}
/*If the msg has some value set, the icon should always be set */
-void
+void
task_page_set_info_string (TaskPage *tpage, const gchar *icon, const gchar *msg)
{
TaskPagePrivate *priv;
@@ -1417,9 +1417,9 @@ task_page_set_info_string (TaskPage *tpage, const gchar *icon, const gchar *msg)
gtk_label_set_text (GTK_LABEL(priv->info_string), msg);
if (msg && icon)
- gtk_widget_show (priv->info_hbox);
+ gtk_widget_show (priv->info_hbox);
else
- gtk_widget_hide (priv->info_hbox);
+ gtk_widget_hide (priv->info_hbox);
}
/* set_summary handler for the task page */
@@ -1503,7 +1503,7 @@ get_widgets (TaskPage *tpage)
priv->org_cal_label = GW ("org-task-label");
priv->list_view = e_meeting_list_view_new (priv->model);
-
+
selection = gtk_tree_view_get_selection ((GtkTreeView *) priv->list_view);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
gtk_widget_show (GTK_WIDGET (priv->list_view));
@@ -1516,7 +1516,7 @@ get_widgets (TaskPage *tpage)
gtk_box_pack_start (GTK_BOX (priv->list_box), sw, TRUE, TRUE, 0);
priv->source_selector = GW ("source");
-
+
#undef GW
return (priv->summary
@@ -1537,21 +1537,21 @@ summary_changed_cb (GtkEditable *editable, gpointer data)
TaskPage *tpage;
TaskPagePrivate *priv;
gchar *summary;
-
+
tpage = TASK_PAGE (data);
priv = tpage->priv;
-
+
if (priv->updating)
return;
-
+
summary = e_dialog_editable_get (GTK_WIDGET (editable));
- comp_editor_page_notify_summary_changed (COMP_EDITOR_PAGE (tpage),
+ comp_editor_page_notify_summary_changed (COMP_EDITOR_PAGE (tpage),
summary);
g_free (summary);
}
/* Callback used when the start or due date widgets change. We notify the
- * other pages in the task editor, so they can update any labels.
+ * other pages in the task editor, so they can update any labels.
*/
static void
date_changed_cb (EDateEdit *dedit, gpointer data)
@@ -1616,7 +1616,7 @@ date_changed_cb (EDateEdit *dedit, gpointer data)
due_dt.value = &due_tt;
dates.due = &due_dt;
dates.complete = NULL;
-
+
/* Notify upstream */
comp_editor_page_notify_dates_changed (COMP_EDITOR_PAGE (tpage),
&dates);
@@ -1627,7 +1627,7 @@ timezone_changed_cb (EDateEdit *dedit, gpointer data)
{
TaskPage *tpage;
TaskPagePrivate *priv;
-
+
tpage = TASK_PAGE (data);
priv = tpage->priv;
@@ -1652,7 +1652,7 @@ categories_clicked_cb (GtkWidget *button, gpointer data)
e_categories_config_open_dialog_for_entry (GTK_ENTRY (entry));
}
/* sets the current focused widget */
-static gboolean
+static gboolean
widget_focus_in_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data)
{
TaskPage *tpage;
@@ -1679,10 +1679,10 @@ field_changed_cb (GtkWidget *widget, gpointer data)
{
TaskPage *tpage;
TaskPagePrivate *priv;
-
+
tpage = TASK_PAGE (data);
priv = tpage->priv;
-
+
if (!priv->updating)
comp_editor_page_notify_changed (COMP_EDITOR_PAGE (tpage));
}
@@ -1746,7 +1746,7 @@ times_updated (TaskPage *tpage, gboolean adjust_end_time)
gboolean date_set;
gboolean set_start_date = FALSE, set_end_date = FALSE, adjust_by_hour;
icaltimezone *zone;
-
+
priv = tpage->priv;
if (priv->updating)
@@ -1851,11 +1851,11 @@ source_changed_cb (ESourceComboBox *source_combo_box, TaskPage *tpage)
client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_TODO);
if (client) {
icaltimezone *zone;
-
+
zone = calendar_config_get_icaltimezone ();
e_cal_set_default_timezone (client, zone, NULL);
}
-
+
if (!client || !e_cal_open (client, FALSE, NULL)) {
GtkWidget *dialog;
@@ -1886,7 +1886,7 @@ source_changed_cb (ESourceComboBox *source_combo_box, TaskPage *tpage)
gchar *backend_addr = NULL;
e_cal_get_cal_address(client, &backend_addr, NULL);
-
+
if (priv->is_assignment)
task_page_select_organizer (tpage, backend_addr);
@@ -1904,13 +1904,13 @@ set_subscriber_info_string (TaskPage *tpage, const char *backend_address)
{
ECal *client = COMP_EDITOR_PAGE (tpage)->client;
ESource *source;
-
+
source = e_cal_get_source (client);
-
+
if (e_source_get_property (source, "subscriber"))
- /* Translators: This string is used when we are creating a Task
+ /* Translators: This string is used when we are creating a Task
on behalf of some other user */
- task_page_set_info_string (tpage, GTK_STOCK_DIALOG_INFO,
+ task_page_set_info_string (tpage, GTK_STOCK_DIALOG_INFO,
g_strdup_printf(_("You are acting on behalf of %s"), backend_address));
else
task_page_set_info_string (tpage, NULL, NULL);
@@ -1924,7 +1924,7 @@ task_page_sendoptions_clicked_cb (TaskPage *tpage)
ESource *source;
priv = tpage->priv;
-
+
if (!priv->sod) {
priv->sod = e_sendoptions_dialog_new ();
priv->sod->data->initialized = TRUE;
@@ -1932,12 +1932,12 @@ task_page_sendoptions_clicked_cb (TaskPage *tpage)
E_SOURCE_COMBO_BOX (priv->source_selector));
e_sendoptions_utils_set_default_data (priv->sod, source, "task");
}
-
- if (e_cal_get_static_capability (COMP_EDITOR_PAGE (tpage)->client,
+
+ if (e_cal_get_static_capability (COMP_EDITOR_PAGE (tpage)->client,
CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS)) {
e_sendoptions_set_need_general_options (priv->sod, FALSE);
}
-
+
toplevel = gtk_widget_get_toplevel (priv->main);
e_sendoptions_dialog_run (priv->sod, toplevel, E_ITEM_TASK);
}
@@ -1960,7 +1960,7 @@ init_widgets (TaskPage *tpage)
e_date_edit_set_get_time_callback (E_DATE_EDIT (priv->due_date),
(EDateEditGetTimeCallback) comp_editor_get_current_time,
tpage, NULL);
-
+
/* Generic informative messages */
gtk_widget_hide (priv->info_hbox);
@@ -1985,7 +1985,7 @@ init_widgets (TaskPage *tpage)
/* Categories button */
g_signal_connect((priv->categories_btn), "clicked",
G_CALLBACK (categories_clicked_cb), tpage);
-
+
/* Source selector */
g_signal_connect (priv->source_selector, "changed", G_CALLBACK (source_changed_cb), tpage);
@@ -2020,8 +2020,8 @@ init_widgets (TaskPage *tpage)
G_CALLBACK (field_changed_cb), tpage);
g_signal_connect (G_OBJECT (priv->list_view), "button_press_event", G_CALLBACK (button_press_event), tpage);
g_signal_connect (G_OBJECT (priv->list_view), "event", G_CALLBACK (list_view_event), tpage);
- g_signal_connect (priv->list_view, "key_press_event", G_CALLBACK (list_key_press), tpage);
-
+ g_signal_connect (priv->list_view, "key_press_event", G_CALLBACK (list_key_press), tpage);
+
/* Add attendee button */
g_signal_connect (priv->add, "clicked", G_CALLBACK (add_clicked_cb), tpage);
@@ -2032,24 +2032,24 @@ init_widgets (TaskPage *tpage)
g_signal_connect (priv->remove, "clicked", G_CALLBACK (remove_clicked_cb), tpage);
/* Contacts button */
- g_signal_connect(priv->invite, "clicked", G_CALLBACK (invite_cb), tpage);
+ g_signal_connect(priv->invite, "clicked", G_CALLBACK (invite_cb), tpage);
/* Meeting List View */
- g_signal_connect (priv->list_view, "attendee_added", G_CALLBACK (attendee_added_cb), tpage);
-
+ g_signal_connect (priv->list_view, "attendee_added", G_CALLBACK (attendee_added_cb), tpage);
+
/* Set the default timezone, so the timezone entry may be hidden. */
zone = calendar_config_get_icaltimezone ();
e_timezone_entry_set_default_timezone (E_TIMEZONE_ENTRY (priv->timezone), zone);
-
+
task_page_set_show_timezone (tpage, calendar_config_get_show_timezone());
- e_meeting_list_view_column_set_visible (priv->list_view, "Attendee ",
+ e_meeting_list_view_column_set_visible (priv->list_view, "Attendee ",
TRUE);
e_meeting_list_view_column_set_visible (priv->list_view, "Role", calendar_config_get_show_role());
e_meeting_list_view_column_set_visible (priv->list_view, "RSVP", calendar_config_get_show_rsvp());
e_meeting_list_view_column_set_visible (priv->list_view, "Status", calendar_config_get_show_status());
e_meeting_list_view_column_set_visible (priv->list_view, "Type", calendar_config_get_show_type());
-
+
task_page_set_show_categories (tpage, calendar_config_get_show_categories());
return TRUE;
@@ -2080,7 +2080,7 @@ task_page_select_organizer (TaskPage *tpage, const char *backend_address)
if (user_addr)
subscribed_cal = TRUE;
- else
+ else
user_addr = (backend_address && *backend_address) ? backend_address : NULL;
priv->default_address = NULL;
@@ -2107,9 +2107,9 @@ task_page_select_organizer (TaskPage *tpage, const char *backend_address)
/**
* task_page_construct:
* @tpage: An task page.
- *
+ *
* Constructs an task page by loading its Glade data.
- *
+ *
* Return value: The same object as @tpage, or NULL if the widgets could not be
* created.
**/
@@ -2120,7 +2120,7 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client)
EIterator *it;
EAccount *a;
char *gladefile;
-
+
priv = tpage->priv;
g_object_ref (model);
priv->model = model;
@@ -2149,7 +2149,7 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client)
e_iterator_is_valid(it);
e_iterator_next(it)) {
gchar *full = NULL;
-
+
a = (EAccount *)e_iterator_get(it);
if (!a->enabled)
@@ -2159,7 +2159,7 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client)
priv->address_strings = g_list_append(priv->address_strings, full);
}
-
+
g_object_unref(it);
if (priv->address_strings)
@@ -2168,7 +2168,7 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client)
g_warning ("No potential organizers!");
if (!init_widgets (tpage)) {
- g_message ("task_page_construct(): "
+ g_message ("task_page_construct(): "
"Could not initialize the widgets!");
return NULL;
}
@@ -2178,9 +2178,9 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client)
/**
* task_page_new:
- *
+ *
* Creates a new task page.
- *
+ *
* Return value: A newly-created task page, or NULL if the page could
* not be created.
**/
@@ -2194,7 +2194,7 @@ task_page_new (EMeetingStore *model, ECal *client, BonoboUIComponent *uic)
g_object_unref (tpage);
return NULL;
}
-
+
tpage->priv->uic = uic;
return tpage;
@@ -2212,9 +2212,9 @@ task_page_get_cancel_comp (TaskPage *page)
if (priv->deleted_attendees->len == 0)
return NULL;
-
+
set_attendees (priv->comp, priv->deleted_attendees);
-
+
return e_cal_component_clone (priv->comp);
}
diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c
index e3d9ece911..1a3dd3dc08 100644
--- a/calendar/gui/e-alarm-list.c
+++ b/calendar/gui/e-alarm-list.c
@@ -229,7 +229,7 @@ e_alarm_list_finalize (GObject *object)
}
/* Fulfill the GtkTreeModel requirements */
-static GtkTreeModelFlags
+static GtkTreeModelFlags
e_alarm_list_get_flags (GtkTreeModel *tree_model)
{
g_return_val_if_fail (E_IS_ALARM_LIST (tree_model), 0);
@@ -473,20 +473,20 @@ get_alarm_string (ECalComponentAlarm *alarm)
if (dur) {
if (trigger.u.rel_duration.is_neg)
- /*Translator: The first %s refers to the base, which would be actions like
+ /*Translator: The first %s refers to the base, which would be actions like
* "Play a Sound". Second %s refers to the duration string e.g:"15 minutes"*/
str = g_strdup_printf (_("%s %s before the start of the appointment"),
base, dur);
else
- /*Translator: The first %s refers to the base, which would be actions like
+ /*Translator: The first %s refers to the base, which would be actions like
* "Play a Sound". Second %s refers to the duration string e.g:"15 minutes"*/
str = g_strdup_printf (_("%s %s after the start of the appointment"),
base, dur);
g_free (dur);
} else
- /*Translator: The %s refers to the base, which would be actions like
- * "Play a sound" */
+ /*Translator: The %s refers to the base, which would be actions like
+ * "Play a sound" */
str = g_strdup_printf (_("%s at the start of the appointment"), base);
break;
@@ -496,20 +496,20 @@ get_alarm_string (ECalComponentAlarm *alarm)
if (dur) {
if (trigger.u.rel_duration.is_neg)
- /* Translator: The first %s refers to the base, which would be actions like
+ /* Translator: The first %s refers to the base, which would be actions like
* "Play a Sound". Second %s refers to the duration string e.g:"15 minutes" */
str = g_strdup_printf (_("%s %s before the end of the appointment"),
base, dur);
else
- /* Translator: The first %s refers to the base, which would be actions like
+ /* Translator: The first %s refers to the base, which would be actions like
* "Play a Sound". Second %s refers to the duration string e.g:"15 minutes" */
str = g_strdup_printf (_("%s %s after the end of the appointment"),
base, dur);
g_free (dur);
} else
- /* Translator: The %s refers to the base, which would be actions like
- * "Play a sound" */
+ /* Translator: The %s refers to the base, which would be actions like
+ * "Play a sound" */
str = g_strdup_printf (_("%s at the end of the appointment"), base);
break;
@@ -532,7 +532,7 @@ get_alarm_string (ECalComponentAlarm *alarm)
e_time_format_date_and_time (&tm, calendar_config_get_24_hour_format (),
FALSE, FALSE, buf, sizeof (buf));
- /* Translator: The first %s refers to the base, which would be actions like
+ /* Translator: The first %s refers to the base, which would be actions like
* "Play a Sound". Second %s is an absolute time, e.g. "10:00AM" */
str = g_strdup_printf (_("%s at %s"), base, buf);
@@ -540,7 +540,7 @@ get_alarm_string (ECalComponentAlarm *alarm)
case E_CAL_COMPONENT_ALARM_TRIGGER_NONE:
default:
- /* Translator: The %s refers to the base, which would be actions like
+ /* Translator: The %s refers to the base, which would be actions like
* "Play a sound". "Trigger types" are absolute or relative dates */
str = g_strdup_printf (_("%s for an unknown trigger type"), base);
break;
diff --git a/calendar/gui/e-cal-component-memo-preview.c b/calendar/gui/e-cal-component-memo-preview.c
index 7469a37070..90a96f0c9e 100644
--- a/calendar/gui/e-cal-component-memo-preview.c
+++ b/calendar/gui/e-cal-component-memo-preview.c
@@ -112,7 +112,7 @@ timet_to_str_with_zone (ECalComponentDateTime *dt, ECal *ecal, icaltimezone *def
struct icaltimetype itt;
icaltimezone *zone;
struct tm tm;
- char buf[256];
+ char buf[256];
if (dt->tzid) {
/* If we can't find the zone, we'll guess its "local" */
@@ -123,13 +123,13 @@ timet_to_str_with_zone (ECalComponentDateTime *dt, ECal *ecal, icaltimezone *def
} else {
zone = NULL;
}
-
-
+
+
itt = *dt->value;
if (zone)
icaltimezone_convert_time (&itt, zone, default_zone);
tm = icaltimetype_to_tm (&itt);
-
+
e_time_format_date_and_time (&tm, calendar_config_get_24_hour_format (),
FALSE, FALSE, buf, sizeof (buf));
@@ -164,8 +164,8 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone
if (l) {
GSList *node;
GString *string = g_string_new (NULL);
-
-
+
+
gtk_html_stream_printf(stream, "<H3>%s: ", _("Categories"));
for (node = l; node != NULL; node = node->next) {
@@ -189,12 +189,12 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone
}
}
}
-
+
if (string->len > 0)
gtk_html_stream_printf(stream, "%s", string->str);
g_string_free (string, TRUE);
-
+
gtk_html_stream_printf(stream, "</H3>");
e_cal_component_free_categories_list (l);
@@ -202,7 +202,7 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone
/* Start table */
gtk_html_stream_printf (stream, "<TABLE BORDER=\"0\" WIDTH=\"80%%\">"
- "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\" WIDTH=\"15%%\"></TD></TR>");
+ "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\" WIDTH=\"15%%\"></TD></TR>");
/* write start date */
e_cal_component_get_dtstart (comp, &dt);
@@ -261,7 +261,7 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone
gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Web Page:"));
gtk_html_stream_printf (stream, "<TD><A HREF=\"%s\">%s</A></TD></TR>", str, str);
}
-
+
gtk_html_stream_printf (stream, "</TABLE>");
/* close document */
@@ -273,7 +273,7 @@ e_cal_component_memo_preview_init (ECalComponentMemoPreview *preview)
{
ECalComponentMemoPreviewPrivate *priv;
GtkWidget *scroll;
-
+
priv = g_new0 (ECalComponentMemoPreviewPrivate, 1);
preview->priv = priv;
@@ -297,7 +297,7 @@ e_cal_component_memo_preview_init (ECalComponentMemoPreview *preview)
gtk_container_add (GTK_CONTAINER (scroll), priv->html);
gtk_container_add (GTK_CONTAINER (preview), scroll);
gtk_widget_show_all (scroll);
-
+
priv->zone = icaltimezone_get_utc_timezone ();
}
@@ -327,9 +327,9 @@ static void
e_cal_component_memo_preview_class_init (ECalComponentMemoPreviewClass *klass)
{
GtkObjectClass *object_class;
-
+
object_class = (GtkObjectClass *) klass;
-
+
object_class->destroy = e_cal_component_memo_preview_destroy;
}
@@ -347,7 +347,7 @@ icaltimezone *
e_cal_component_memo_preview_get_default_timezone (ECalComponentMemoPreview *preview)
{
ECalComponentMemoPreviewPrivate *priv;
-
+
g_return_val_if_fail (preview != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_COMPONENT_MEMO_PREVIEW (preview), NULL);
@@ -360,13 +360,13 @@ void
e_cal_component_memo_preview_set_default_timezone (ECalComponentMemoPreview *preview, icaltimezone *zone)
{
ECalComponentMemoPreviewPrivate *priv;
-
+
g_return_if_fail (preview != NULL);
g_return_if_fail (E_IS_CAL_COMPONENT_MEMO_PREVIEW (preview));
g_return_if_fail (zone != NULL);
priv = preview->priv;
-
+
priv->zone = zone;
}
@@ -382,7 +382,7 @@ e_cal_component_memo_preview_display (ECalComponentMemoPreview *preview, ECal *e
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
priv = preview->priv;
-
+
stream = gtk_html_begin (GTK_HTML (priv->html));
write_html (stream, ecal, comp, priv->zone);
gtk_html_stream_close (stream, GTK_HTML_STREAM_OK);
@@ -395,9 +395,9 @@ e_cal_component_memo_preview_clear (ECalComponentMemoPreview *preview)
g_return_if_fail (preview != NULL);
g_return_if_fail (E_IS_CAL_COMPONENT_MEMO_PREVIEW (preview));
-
+
priv = preview->priv;
-
+
gtk_html_load_empty (GTK_HTML (priv->html));
}
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c
index f48d6198fb..b46069917c 100644
--- a/calendar/gui/e-cal-component-preview.c
+++ b/calendar/gui/e-cal-component-preview.c
@@ -110,7 +110,7 @@ timet_to_str_with_zone (ECalComponentDateTime *dt, ECal *ecal, icaltimezone *def
struct icaltimetype itt;
icaltimezone *zone;
struct tm tm;
- char buf[256];
+ char buf[256];
if (dt->tzid) {
/* If we can't find the zone, we'll guess its "local" */
@@ -121,13 +121,13 @@ timet_to_str_with_zone (ECalComponentDateTime *dt, ECal *ecal, icaltimezone *def
} else {
zone = NULL;
}
-
-
+
+
itt = *dt->value;
if (zone)
icaltimezone_convert_time (&itt, zone, default_zone);
tm = icaltimetype_to_tm (&itt);
-
+
e_time_format_date_and_time (&tm, calendar_config_get_24_hour_format (),
FALSE, FALSE, buf, sizeof (buf));
@@ -184,7 +184,7 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone
/* Start table */
gtk_html_stream_printf (stream, "<TABLE BORDER=\"0\" WIDTH=\"80%%\">"
- "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\" WIDTH=\"15%%\"></TD></TR>");
+ "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\" WIDTH=\"15%%\"></TD></TR>");
/* write location */
e_cal_component_get_location (comp, &location);
@@ -213,7 +213,7 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone
e_cal_component_free_datetime (&dt);
g_free (str);
}
-
+
/* write Due Date */
e_cal_component_get_due (comp, &dt);
if (dt.value != NULL) {
@@ -224,7 +224,7 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone
e_cal_component_free_datetime (&dt);
g_free (str);
}
-
+
/* write status */
gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Status:"));
e_cal_component_get_status (comp, &status);
@@ -307,7 +307,7 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone
gtk_html_stream_printf (stream, "<TR><TD VALIGN=\"TOP\" ALIGN=\"RIGHT\"><B>%s</B></TD>", _("Web Page:"));
gtk_html_stream_printf (stream, "<TD><A HREF=\"%s\">%s</A></TD></TR>", str, str);
}
-
+
gtk_html_stream_printf (stream, "</TABLE>");
/* close document */
@@ -319,7 +319,7 @@ e_cal_component_preview_init (ECalComponentPreview *preview)
{
ECalComponentPreviewPrivate *priv;
GtkWidget *scroll;
-
+
priv = g_new0 (ECalComponentPreviewPrivate, 1);
preview->priv = priv;
@@ -343,7 +343,7 @@ e_cal_component_preview_init (ECalComponentPreview *preview)
gtk_container_add (GTK_CONTAINER (scroll), priv->html);
gtk_container_add (GTK_CONTAINER (preview), scroll);
gtk_widget_show_all (scroll);
-
+
priv->zone = icaltimezone_get_utc_timezone ();
}
@@ -373,9 +373,9 @@ static void
e_cal_component_preview_class_init (ECalComponentPreviewClass *klass)
{
GtkObjectClass *object_class;
-
+
object_class = (GtkObjectClass *) klass;
-
+
object_class->destroy = e_cal_component_preview_destroy;
}
@@ -393,7 +393,7 @@ icaltimezone *
e_cal_component_preview_get_default_timezone (ECalComponentPreview *preview)
{
ECalComponentPreviewPrivate *priv;
-
+
g_return_val_if_fail (preview != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_COMPONENT_PREVIEW (preview), NULL);
@@ -406,13 +406,13 @@ void
e_cal_component_preview_set_default_timezone (ECalComponentPreview *preview, icaltimezone *zone)
{
ECalComponentPreviewPrivate *priv;
-
+
g_return_if_fail (preview != NULL);
g_return_if_fail (E_IS_CAL_COMPONENT_PREVIEW (preview));
g_return_if_fail (zone != NULL);
priv = preview->priv;
-
+
priv->zone = zone;
}
@@ -428,8 +428,8 @@ e_cal_component_preview_display (ECalComponentPreview *preview, ECal *ecal, ECal
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
priv = preview->priv;
-
- stream = gtk_html_begin (GTK_HTML (priv->html));
+
+ stream = gtk_html_begin (GTK_HTML (priv->html));
write_html (stream, ecal, comp, priv->zone);
gtk_html_stream_close (stream, GTK_HTML_STREAM_OK);
}
@@ -441,9 +441,9 @@ e_cal_component_preview_clear (ECalComponentPreview *preview)
g_return_if_fail (preview != NULL);
g_return_if_fail (E_IS_CAL_COMPONENT_PREVIEW (preview));
-
+
priv = preview->priv;
-
+
gtk_html_load_empty (GTK_HTML (priv->html));
}
diff --git a/calendar/gui/e-cal-list-view-config.c b/calendar/gui/e-cal-list-view-config.c
index 13e9bf174c..be8128a14d 100644
--- a/calendar/gui/e-cal-list-view-config.c
+++ b/calendar/gui/e-cal-list-view-config.c
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Rodrigo Moya <rodrigo@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -44,7 +44,7 @@ e_cal_list_view_config_set_property (GObject *object, guint property_id, const G
ECalListViewConfig *view_config;
view_config = E_CAL_LIST_VIEW_CONFIG (object);
-
+
switch (property_id) {
case PROP_VIEW:
e_cal_list_view_config_set_view (view_config, g_value_get_object (value));
@@ -61,7 +61,7 @@ e_cal_list_view_config_get_property (GObject *object, guint property_id, GValue
ECalListViewConfig *view_config;
view_config = E_CAL_LIST_VIEW_CONFIG (object);
-
+
switch (property_id) {
case PROP_VIEW:
g_value_set_object (value, e_cal_list_view_config_get_view (view_config));
@@ -76,9 +76,9 @@ static void
e_cal_list_view_config_dispose (GObject *object)
{
ECalListViewConfig *view_config = E_CAL_LIST_VIEW_CONFIG (object);
-
+
e_cal_list_view_config_set_view (view_config, NULL);
-
+
if (G_OBJECT_CLASS (e_cal_list_view_config_parent_class)->dispose)
G_OBJECT_CLASS (e_cal_list_view_config_parent_class)->dispose (object);
}
@@ -88,11 +88,11 @@ e_cal_list_view_config_finalize (GObject *object)
{
ECalListViewConfig *view_config = E_CAL_LIST_VIEW_CONFIG (object);
ECalListViewConfigPrivate *priv;
-
+
priv = view_config->priv;
g_free (priv);
-
+
if (G_OBJECT_CLASS (e_cal_list_view_config_parent_class)->finalize)
G_OBJECT_CLASS (e_cal_list_view_config_parent_class)->finalize (object);
}
@@ -102,7 +102,7 @@ e_cal_list_view_config_class_init (ECalListViewConfigClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *spec;
-
+
/* Method override */
gobject_class->set_property = e_cal_list_view_config_set_property;
gobject_class->get_property = e_cal_list_view_config_get_property;
@@ -125,14 +125,14 @@ ECalListViewConfig *
e_cal_list_view_config_new (ECalListView *list_view)
{
ECalListViewConfig *view_config;
-
+
view_config = g_object_new (e_cal_list_view_config_get_type (), "view", list_view, NULL);
return view_config;
}
ECalListView *
-e_cal_list_view_config_get_view (ECalListViewConfig *view_config)
+e_cal_list_view_config_get_view (ECalListViewConfig *view_config)
{
ECalListViewConfigPrivate *priv;
@@ -140,16 +140,16 @@ e_cal_list_view_config_get_view (ECalListViewConfig *view_config)
g_return_val_if_fail (E_IS_CAL_LIST_VIEW_CONFIG (view_config), NULL);
priv = view_config->priv;
-
+
return priv->view;
}
static void
-set_timezone (ECalListView *list_view)
+set_timezone (ECalListView *list_view)
{
icaltimezone *zone;
-
- zone = calendar_config_get_icaltimezone ();
+
+ zone = calendar_config_get_icaltimezone ();
e_calendar_view_set_timezone (E_CALENDAR_VIEW (list_view), zone);
}
@@ -158,14 +158,14 @@ timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer
{
ECalListViewConfig *view_config = data;
ECalListViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_timezone (priv->view);
}
static void
-set_twentyfour_hour (ECalListView *list_view)
+set_twentyfour_hour (ECalListView *list_view)
{
gboolean use_24_hour;
@@ -179,29 +179,29 @@ twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gp
{
ECalListViewConfig *view_config = data;
ECalListViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_twentyfour_hour (priv->view);
}
void
-e_cal_list_view_config_set_view (ECalListViewConfig *view_config, ECalListView *list_view)
+e_cal_list_view_config_set_view (ECalListViewConfig *view_config, ECalListView *list_view)
{
ECalListViewConfigPrivate *priv;
guint not;
GList *l;
-
+
g_return_if_fail (view_config != NULL);
g_return_if_fail (E_IS_CAL_LIST_VIEW_CONFIG (view_config));
priv = view_config->priv;
-
+
if (priv->view) {
g_object_unref (priv->view);
priv->view = NULL;
}
-
+
for (l = priv->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
@@ -211,17 +211,17 @@ e_cal_list_view_config_set_view (ECalListViewConfig *view_config, ECalListView *
/* If the new view is NULL, return right now */
if (!list_view)
return;
-
+
priv->view = g_object_ref (list_view);
/* Time zone */
set_timezone (list_view);
-
+
not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* 24 Hour format */
- set_twentyfour_hour (list_view);
+ set_twentyfour_hour (list_view);
not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, view_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
diff --git a/calendar/gui/e-cal-list-view-config.h b/calendar/gui/e-cal-list-view-config.h
index 2ecef1ebff..e3c7f54a2c 100644
--- a/calendar/gui/e-cal-list-view-config.h
+++ b/calendar/gui/e-cal-list-view-config.h
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
#define E_CAL_LIST_VIEW_CONFIG(obj) GTK_CHECK_CAST (obj, e_cal_list_view_config_get_type (), ECalListViewConfig)
#define E_CAL_LIST_VIEW_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_cal_list_view_config_get_type (), ECalListViewConfigClass)
#define E_IS_CAL_LIST_VIEW_CONFIG(obj) GTK_CHECK_TYPE (obj, e_cal_list_view_config_get_type ())
-
+
typedef struct _ECalListViewConfig ECalListViewConfig;
typedef struct _ECalListViewConfigClass ECalListViewConfigClass;
typedef struct _ECalListViewConfigPrivate ECalListViewConfigPrivate;
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
index 7d67db489f..89ea2cd56a 100644
--- a/calendar/gui/e-cal-list-view.c
+++ b/calendar/gui/e-cal-list-view.c
@@ -293,7 +293,7 @@ setup_e_table (ECalListView *cal_list_view)
"double_click", G_CALLBACK (e_cal_list_view_on_table_double_click), cal_list_view);
g_signal_connect (e_table_scrolled_get_table (cal_list_view->table_scrolled),
"right-click", G_CALLBACK (e_cal_list_view_on_table_right_click), cal_list_view);
- g_signal_connect_after (e_table_scrolled_get_table (cal_list_view->table_scrolled),
+ g_signal_connect_after (e_table_scrolled_get_table (cal_list_view->table_scrolled),
"cursor_change", G_CALLBACK (e_cal_list_view_cursor_change_cb), cal_list_view);
/* Attach and show widget */
@@ -322,7 +322,7 @@ e_cal_list_view_new (void)
{
ECalListView *cal_list_view;
ECalModel *model;
-
+
model = E_CAL_MODEL (e_cal_model_calendar_new ());
e_cal_model_set_flags (model, E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES);
@@ -388,16 +388,16 @@ e_cal_list_view_popup_menu (GtkWidget *widget)
return TRUE;
}
-static gboolean
-find_meeting (icalcomponent *icalcomp)
+static gboolean
+find_meeting (icalcomponent *icalcomp)
{
icalproperty *prop = NULL;
prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
-
+
return prop ? TRUE: FALSE;
}
-
+
static gboolean
e_cal_list_view_on_table_double_click (GtkWidget *table, gint row, gint col, GdkEvent *event,
@@ -408,7 +408,7 @@ e_cal_list_view_on_table_double_click (GtkWidget *table, gint row, gint col, Gdk
comp_data = e_cal_model_get_component_at (e_calendar_view_get_model (E_CALENDAR_VIEW (cal_list_view)), row);
e_calendar_view_edit_appointment (E_CALENDAR_VIEW (cal_list_view), comp_data->client,
- comp_data->icalcomp, find_meeting (comp_data->icalcomp));
+ comp_data->icalcomp, find_meeting (comp_data->icalcomp));
return TRUE;
}
diff --git a/calendar/gui/e-cal-list-view.h b/calendar/gui/e-cal-list-view.h
index d70271e24e..82af6480e9 100644
--- a/calendar/gui/e-cal-list-view.h
+++ b/calendar/gui/e-cal-list-view.h
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
+/*
+ * Authors:
* Hans Petter Jansson <hpj@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-cal-menu.c b/calendar/gui/e-cal-menu.c
index 554500a0a7..3fa178f569 100644
--- a/calendar/gui/e-cal-menu.c
+++ b/calendar/gui/e-cal-menu.c
@@ -109,12 +109,12 @@ ECalMenu *e_cal_menu_new(const char *menuid)
/**
* e_cal_menu_target_new_select:
* @folder: The selection will ref this for the life of it.
- * @folder_uri:
+ * @folder_uri:
* @uids: The selection will free this when done with it.
- *
+ *
* Create a new selection popup target.
- *
- * Return value:
+ *
+ * Return value:
**/
ECalMenuTargetSelect *
e_cal_menu_target_new_select(ECalMenu *eabp, struct _ECalModel *model, GPtrArray *events)
@@ -146,9 +146,9 @@ e_cal_menu_target_new_select(ECalMenu *eabp, struct _ECalModel *model, GPtrArray
if (!e_cal_get_static_capability (comp_data->client, CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)
&& !e_cal_get_static_capability (comp_data->client, CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK)
- && !icalcomponent_get_first_property (comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY))
+ && !icalcomponent_get_first_property (comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY))
mask &= ~E_CAL_MENU_SELECT_ASSIGNABLE;
-
+
if (!icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY))
mask &= ~ E_CAL_MENU_SELECT_NOTCOMPLETE;
@@ -278,7 +278,7 @@ GType
e_cal_menu_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(ECalMenuHookClass), NULL, NULL, (GClassInitFunc) ecalph_class_init, NULL, NULL,
@@ -288,6 +288,6 @@ e_cal_menu_hook_get_type(void)
ecalph_parent_class = g_type_class_ref(e_menu_hook_get_type());
type = g_type_register_static(e_menu_hook_get_type(), "ECalMenuHook", &info, 0);
}
-
+
return type;
}
diff --git a/calendar/gui/e-cal-menu.h b/calendar/gui/e-cal-menu.h
index d7298da5b1..b915ac3b19 100644
--- a/calendar/gui/e-cal-menu.h
+++ b/calendar/gui/e-cal-menu.h
@@ -43,7 +43,7 @@ enum _e_cal_menu_target_t {
/**
* enum _e_cal_menu_target_select_t - ECalPopupTargetSelect qualifiers.
- *
+ *
* @E_CAL_MENU_SELECT_ONE: Only one item is selected.
* @E_CAL_MENU_SELECT_MANY: More than one item selected.
* @E_CAL_MENU_SELECT_ANY: One or more items selected.
diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c
index 19e257523a..0a91d29a16 100644
--- a/calendar/gui/e-cal-model-calendar.c
+++ b/calendar/gui/e-cal-model-calendar.c
@@ -137,7 +137,7 @@ get_dtend (ECalModelCalendar *model, ECalModelComponent *comp_data)
if (model_zone)
icaltimezone_convert_time (&tt_end, zone, model_zone);
} else
- tt_end = icaltime_from_timet_with_zone (comp_data->instance_end, tt_end.is_date,
+ tt_end = icaltime_from_timet_with_zone (comp_data->instance_end, tt_end.is_date,
model_zone);
}
@@ -226,7 +226,7 @@ set_dtend (ECalModelComponent *comp_data, const void *value)
icalproperty *prop;
icalparameter *param;
const char *tzid;
-
+
prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTEND_PROPERTY);
if (prop)
param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER);
@@ -243,7 +243,7 @@ set_dtend (ECalModelComponent *comp_data, const void *value)
return;
}
-
+
/* If the TZID is set to "UTC", we set the is_utc flag. */
tzid = dv->zone ? icaltimezone_get_tzid (dv->zone) : "UTC";
if (tzid && !strcmp (tzid, "UTC"))
@@ -384,7 +384,7 @@ ecmc_set_value_at (ETableModel *etm, int col, int row, const void *value)
comp_data->client, NULL, NULL, NULL);
} else {
g_warning (G_STRLOC ": Could not modify the object!");
-
+
/* FIXME Show error dialog */
}
diff --git a/calendar/gui/e-cal-model-memos.c b/calendar/gui/e-cal-model-memos.c
index 877e3fb8ec..b5821823de 100644
--- a/calendar/gui/e-cal-model-memos.c
+++ b/calendar/gui/e-cal-model-memos.c
@@ -157,7 +157,7 @@ ecmm_set_value_at (ETableModel *etm, int col, int row, const void *value)
/* TODO ask about mod type */
if (!e_cal_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
g_warning (G_STRLOC ": Could not modify the object!");
-
+
/* TODO Show error dialog */
}
}
diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c
index 66e7c536d5..b74283e328 100644
--- a/calendar/gui/e-cal-model-tasks.c
+++ b/calendar/gui/e-cal-model-tasks.c
@@ -246,7 +246,7 @@ get_completed (ECalModelComponent *comp_data)
comp_data->completed->tt = tt_completed;
if (icaltime_get_tzid (tt_completed)
- && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_completed), &zone, NULL))
+ && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_completed), &zone, NULL))
comp_data->completed->zone = zone;
else
comp_data->completed->zone = NULL;
@@ -276,7 +276,7 @@ get_due (ECalModelComponent *comp_data)
comp_data->due->tt = tt_due;
if (icaltime_get_tzid (tt_due)
- && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_due), &zone, NULL))
+ && e_cal_get_timezone (comp_data->client, icaltime_get_tzid (tt_due), &zone, NULL))
comp_data->due->zone = zone;
else
comp_data->due->zone = NULL;
@@ -384,7 +384,7 @@ is_complete (ECalModelComponent *comp_data)
prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_STATUS_PROPERTY);
if (prop && icalproperty_get_status (prop) == ICAL_STATUS_COMPLETED)
return TRUE;
-
+
return FALSE;
}
@@ -418,10 +418,10 @@ get_due_status (ECalModelTasks *model, ECalModelComponent *comp_data)
due_tt = icalproperty_get_due (prop);
if (due_tt.is_date) {
int cmp;
-
+
now_tt = icaltime_current_time_with_zone (e_cal_model_get_timezone (E_CAL_MODEL (model)));
cmp = icaltime_compare_date_only (due_tt, now_tt);
-
+
if (cmp < 0)
return E_CAL_MODEL_TASKS_DUE_OVERDUE;
else if (cmp == 0)
@@ -442,7 +442,7 @@ get_due_status (ECalModelTasks *model, ECalModelComponent *comp_data)
now_tt = icaltime_current_time_with_zone (zone);
- if (icaltime_compare (due_tt, now_tt) <= 0)
+ if (icaltime_compare (due_tt, now_tt) <= 0)
return E_CAL_MODEL_TASKS_DUE_OVERDUE;
else
if (icaltime_compare_date_only (due_tt, now_tt) == 0)
@@ -554,7 +554,7 @@ set_due (ECalModelComponent *comp_data, const void *value)
icalproperty *prop;
icalparameter *param;
const char *tzid;
-
+
prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DUE_PROPERTY);
if (prop)
param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER);
@@ -571,7 +571,7 @@ set_due (ECalModelComponent *comp_data, const void *value)
return;
}
-
+
/* If the TZID is set to "UTC", we set the is_utc flag. */
tzid = dv->zone ? icaltimezone_get_tzid (dv->zone) : "UTC";
if (tzid && !strcmp (tzid, "UTC"))
@@ -641,7 +641,7 @@ set_geo (ECalModelComponent *comp_data, const char *value)
prop = icalproperty_new_geo (geo);
icalcomponent_add_property (comp_data->icalcomp, prop);
}
-
+
}
}
@@ -691,7 +691,7 @@ set_status (ECalModelComponent *comp_data, const char *value)
case ICAL_STATUS_COMPLETED:
ensure_task_complete (comp_data, -1);
- break;
+ break;
default:
break;
}
@@ -731,12 +731,12 @@ set_percent (ECalModelComponent *comp_data, const void *value)
icalcomponent_remove_property (comp_data->icalcomp, prop);
icalproperty_free (prop);
}
-
+
if (percent > 0)
set_status (comp_data, _("In Progress"));
}
}
-
+
}
static void
@@ -904,7 +904,7 @@ static void
ecmt_free_value (ETableModel *etm, int col, void *value)
{
g_return_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST);
-
+
if (col < E_CAL_MODEL_FIELD_LAST) {
E_TABLE_MODEL_CLASS (e_cal_model_tasks_parent_class)->free_value (etm, col, value);
return;
@@ -1060,7 +1060,7 @@ ecmt_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data,
ETableModel *source_model, gint row)
{
void *value;
-
+
g_return_if_fail (E_IS_CAL_MODEL_TASKS (model));
g_return_if_fail (comp_data != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (source_model));
@@ -1076,7 +1076,7 @@ ecmt_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data,
if (GPOINTER_TO_INT (value) != 100 && GPOINTER_TO_INT (value) != 0)
set_status (comp_data, e_table_model_value_at (source_model, E_CAL_MODEL_TASKS_FIELD_STATUS, row));
}
-
+
set_due (comp_data,
e_table_model_value_at (source_model, E_CAL_MODEL_TASKS_FIELD_DUE, row));
set_geo (comp_data,
@@ -1114,7 +1114,7 @@ void e_cal_model_tasks_mark_comp_complete (ECalModelTasks *model, ECalModelCompo
ensure_task_complete (comp_data, -1);
/*e_table_model_row_changed (E_TABLE_MODEL (model), model_row);*/
-
+
commit_component_changes (comp_data);
}
@@ -1131,15 +1131,15 @@ void e_cal_model_tasks_mark_comp_incomplete (ECalModelTasks *model, ECalModelCom
g_return_if_fail (model != NULL);
g_return_if_fail (comp_data != NULL);
-
+
/* we will receive changes when committed, so don't do this */
/*e_table_model_pre_change (E_TABLE_MODEL (model));*/
/* Status */
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_STATUS_PROPERTY);
- if (prop)
+ prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_STATUS_PROPERTY);
+ if (prop)
icalproperty_set_status (prop, ICAL_STATUS_NEEDSACTION);
- else
+ else
icalcomponent_add_property (comp_data->icalcomp, icalproperty_new_status (ICAL_STATUS_NEEDSACTION));
/*complete property*/
@@ -1198,7 +1198,7 @@ e_cal_model_tasks_update_due_tasks (ECalModelTasks *model)
{
comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), row);
status = get_due_status (E_CAL_MODEL_TASKS (model), comp_data);
- if((status == E_CAL_MODEL_TASKS_DUE_TODAY) || (status == E_CAL_MODEL_TASKS_DUE_OVERDUE))
+ if((status == E_CAL_MODEL_TASKS_DUE_TODAY) || (status == E_CAL_MODEL_TASKS_DUE_OVERDUE))
{
e_table_model_pre_change (E_TABLE_MODEL (model));
e_table_model_row_changed (E_TABLE_MODEL (model), row);
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 36466c1ac1..ec387e43eb 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -47,7 +47,7 @@ struct _ECalModelPrivate {
/* The default client in the list */
ECal *default_client;
-
+
/* Array for storing the objects. Each element is of type ECalModelComponent */
GPtrArray *objects;
@@ -58,7 +58,7 @@ struct _ECalModelPrivate {
/* The time range to display */
time_t start;
time_t end;
-
+
/* The search regular expression */
gchar *search_sexp;
@@ -141,7 +141,7 @@ e_cal_model_class_init (ECalModelClass *klass)
G_STRUCT_OFFSET (ECalModelClass, time_range_changed),
NULL, NULL,
e_calendar_marshal_VOID__LONG_LONG,
- G_TYPE_NONE, 2, G_TYPE_LONG, G_TYPE_LONG);
+ G_TYPE_NONE, 2, G_TYPE_LONG, G_TYPE_LONG);
signals[ROW_APPENDED] =
g_signal_new ("row_appended",
@@ -225,13 +225,13 @@ e_cal_model_dispose (GObject *object)
if (priv->clients) {
while (priv->clients != NULL) {
ECalModelClient *client_data = (ECalModelClient *) priv->clients->data;
-
+
g_signal_handlers_disconnect_matched (client_data->client, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, model);
if (client_data->query)
g_signal_handlers_disconnect_matched (client_data->query, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, model);
-
+
priv->clients = g_list_remove (priv->clients, client_data);
@@ -349,7 +349,7 @@ get_description (ECalModelComponent *comp_data)
g_string_free (str, TRUE);
str = NULL;
}
-
+
prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DESCRIPTION_PROPERTY);
if (prop) {
str = g_string_new (NULL);
@@ -475,7 +475,7 @@ ecm_value_at (ETableModel *etm, int col, int row)
g_object_unref (comp);
return GINT_TO_POINTER (retval);
}
-
+
if (e_cal_component_has_recurrences (comp))
retval = 1;
else if (itip_organizer_is_user (comp, comp_data->client))
@@ -600,7 +600,7 @@ set_dtstart (ECalModel *model, ECalModelComponent *comp_data, const void *value)
icalproperty *prop;
icalparameter *param;
const char *tzid;
-
+
prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTSTART_PROPERTY);
if (prop)
param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER);
@@ -617,7 +617,7 @@ set_dtstart (ECalModel *model, ECalModelComponent *comp_data, const void *value)
return;
}
-
+
/* If the TZID is set to "UTC", we set the is_utc flag. */
tzid = dv->zone ? icaltimezone_get_tzid (dv->zone) : "UTC";
if (tzid && !strcmp (tzid, "UTC"))
@@ -705,7 +705,7 @@ ecm_set_value_at (ETableModel *etm, int col, int row, const void *value)
/* FIXME ask about mod type */
if (!e_cal_modify_object (comp_data->client, comp_data->icalcomp, CALOBJ_MOD_ALL, NULL)) {
g_warning (G_STRLOC ": Could not modify the object!");
-
+
/* FIXME Show error dialog */
}
}
@@ -723,7 +723,7 @@ e_cal_model_test_row_editable (ECalModel *model, int row)
{
gboolean readonly;
ECal *cal = NULL;
-
+
if (row != -1) {
ECalModelComponent *comp_data;
@@ -815,7 +815,7 @@ ecm_append_row (ETableModel *etm, ETableModel *source, int row)
icalcomponent_free (comp_data.icalcomp);
- g_signal_emit (G_OBJECT (model), signals[ROW_APPENDED], 0);
+ g_signal_emit (G_OBJECT (model), signals[ROW_APPENDED], 0);
}
static void *
@@ -1012,7 +1012,7 @@ ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data)
comp_data->color = g_strdup (color_spec);
return comp_data->color;
}
-
+
for (i = 0; i < G_N_ELEMENTS (assigned_colors); i++) {
GList *l;
@@ -1111,7 +1111,7 @@ e_cal_model_set_timezone (ECalModel *model, icaltimezone *zone)
{
ECalModelPrivate *priv;
GList *l;
-
+
g_return_if_fail (E_IS_CAL_MODEL (model));
priv = model->priv;
@@ -1121,7 +1121,7 @@ e_cal_model_set_timezone (ECalModel *model, icaltimezone *zone)
for (l = priv->clients; l; l = l->next)
e_cal_set_default_timezone (((ECalModelClient *)l->data)->client, priv->zone, NULL);
-
+
/* the timezone affects the times shown for date fields,
so we need to redisplay everything */
e_table_model_changed (E_TABLE_MODEL (model));
@@ -1180,7 +1180,7 @@ e_cal_model_get_default_client (ECalModel *model)
g_return_val_if_fail (model != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
-
+
priv = model->priv;
/* FIXME Should we force the client to be open? */
@@ -1202,7 +1202,7 @@ e_cal_model_set_default_client (ECalModel *model, ECal *client)
{
ECalModelPrivate *priv;
ECalModelClient *client_data;
-
+
g_return_if_fail (model != NULL);
g_return_if_fail (E_IS_CAL_MODEL (model));
g_return_if_fail (client != NULL);
@@ -1219,12 +1219,12 @@ e_cal_model_set_default_client (ECalModel *model, ECal *client)
remove_client (model, client_data);
}
}
-
+
/* Make sure its in the model */
client_data = add_new_client (model, client, FALSE);
- /* Store the default client */
- priv->default_client = client_data->client;
+ /* Store the default client */
+ priv->default_client = client_data->client;
}
/**
@@ -1274,7 +1274,7 @@ find_client_data (ECalModel *model, ECal *client)
{
ECalModelPrivate *priv;
GList *l;
-
+
priv = model->priv;
for (l = priv->clients; l != NULL; l = l->next) {
@@ -1282,7 +1282,7 @@ find_client_data (ECalModel *model, ECal *client)
if (client_data->client == client)
return client_data;
- }
+ }
return NULL;
}
@@ -1305,7 +1305,7 @@ search_by_id_and_client (ECalModelPrivate *priv, ECal *client, const ECalCompone
if (uid && *uid) {
if ((!client || comp_data->client == client) && !strcmp (id->uid, uid)) {
if (has_rid) {
- if (!(rid && *rid && !strcmp (rid, id->rid)))
+ if (!(rid && *rid && !strcmp (rid, id->rid)))
continue;
}
return comp_data;
@@ -1316,7 +1316,7 @@ search_by_id_and_client (ECalModelPrivate *priv, ECal *client, const ECalCompone
return NULL;
}
-
+
typedef struct {
ECal *client;
ECalView *query;
@@ -1345,15 +1345,15 @@ add_instance_cb (ECalComponent *comp, time_t instance_start, time_t instance_end
e_cal_get_timezone (rdata->client, datetime.tzid, &zone, NULL);
time = icaltime_from_timet_with_zone (instance_start, FALSE, zone ? zone : priv->zone);
to_set.value = &time;
- to_set.tzid = datetime.tzid;
+ to_set.tzid = datetime.tzid;
e_cal_component_set_dtstart (comp, &to_set);
-
+
/* set the right instance end date to component*/
e_cal_component_get_dtend (comp, &datetime);
e_cal_get_timezone (rdata->client, datetime.tzid, &zone, NULL);
time = icaltime_from_timet_with_zone (instance_end, FALSE, zone ? zone : priv->zone);
to_set.value = &time;
- to_set.tzid = datetime.tzid;
+ to_set.tzid = datetime.tzid;
e_cal_component_set_dtend (comp, &to_set);
comp_data = g_new0 (ECalModelComponent, 1);
@@ -1476,16 +1476,16 @@ e_cal_view_objects_removed_cb (ECalView *query, GList *ids, gpointer user_data)
ECalModelPrivate *priv;
ECalModel *model = (ECalModel *) user_data;
GList *l;
-
+
priv = model->priv;
-
+
for (l = ids; l; l = l->next) {
ECalModelComponent *comp_data = NULL;
ECalComponentId *id = l->data;
int pos;
e_table_model_pre_change (E_TABLE_MODEL (model));
-
+
/* make sure we remove all objects with this UID */
while ((comp_data = search_by_id_and_client (priv, e_cal_view_get_client (query), id))) {
pos = get_position_in_array (priv->objects, comp_data);
@@ -1505,7 +1505,7 @@ e_cal_view_progress_cb (ECalView *query, const char *message, int percent, gpoin
g_return_if_fail (E_IS_CAL_MODEL (model));
- g_signal_emit (G_OBJECT (model), signals[CAL_VIEW_PROGRESS], 0, message,
+ g_signal_emit (G_OBJECT (model), signals[CAL_VIEW_PROGRESS], 0, message,
percent, e_cal_get_source_type (client));
}
@@ -1532,7 +1532,7 @@ update_e_cal_view_for_client (ECalModel *model, ECalModelClient *client_data)
/* Skip if this client has not finished loading yet */
if (e_cal_get_load_state (client_data->client) != E_CAL_LOAD_LOADED)
return;
-
+
/* free the previous query, if any */
if (client_data->query) {
g_signal_handlers_disconnect_matched (client_data->query, G_SIGNAL_MATCH_DATA,
@@ -1547,12 +1547,12 @@ update_e_cal_view_for_client (ECalModel *model, ECalModelClient *client_data)
/* Don't create the new query if we won't use it */
if (!client_data->do_query)
return;
-
+
if (!e_cal_get_query (client_data->client, priv->full_sexp, &client_data->query, NULL)) {
g_warning (G_STRLOC ": Unable to get query");
return;
- }
+ }
g_signal_connect (client_data->query, "objects_added", G_CALLBACK (e_cal_view_objects_added_cb), model);
g_signal_connect (client_data->query, "objects_modified", G_CALLBACK (e_cal_view_objects_modified_cb), model);
@@ -1583,19 +1583,19 @@ cal_opened_cb (ECal *client, ECalendarStatus status, gpointer user_data)
e_cal_open_async (client, FALSE);
return;
}
-
+
if (status != E_CALENDAR_STATUS_OK) {
e_cal_model_remove_client (model, client);
return;
}
-
+
/* Stop listening for this calendar to be opened */
g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, cal_opened_cb, model);
client_data = find_client_data (model, client);
g_return_if_fail (client_data);
-
+
update_e_cal_view_for_client (model, client_data);
}
@@ -1605,20 +1605,20 @@ add_new_client (ECalModel *model, ECal *client, gboolean do_query)
{
ECalModelPrivate *priv;
ECalModelClient *client_data;
-
+
priv = model->priv;
/* Look to see if we already have this client */
- client_data = find_client_data (model, client);
+ client_data = find_client_data (model, client);
if (client_data) {
if (client_data->do_query)
return client_data;
else
client_data->do_query = do_query;
-
+
goto load;
}
-
+
client_data = g_new0 (ECalModelClient, 1);
client_data->client = g_object_ref (client);
client_data->query = NULL;
@@ -1651,14 +1651,14 @@ e_cal_model_add_client (ECalModel *model, ECal *client)
g_return_if_fail (E_IS_CAL_MODEL (model));
g_return_if_fail (E_IS_CAL (client));
/* Check this return value or drop the assignment? */
- client_data = add_new_client (model, client, TRUE);
+ client_data = add_new_client (model, client, TRUE);
}
static void
remove_client_objects (ECalModel *model, ECalModelClient *client_data)
{
int i;
-
+
/* remove all objects belonging to this client */
for (i = model->priv->objects->len; i > 0; i--) {
ECalModelComponent *comp_data = (ECalModelComponent *) g_ptr_array_index (model->priv->objects, i - 1);
@@ -1689,7 +1689,7 @@ remove_client (ECalModel *model, ECalModelClient *client_data)
* was also a source), keep it around but don't query it */
if (model->priv->default_client == client_data->client && client_data->do_query) {
client_data->do_query = FALSE;
-
+
return;
}
@@ -1710,7 +1710,7 @@ void
e_cal_model_remove_client (ECalModel *model, ECal *client)
{
ECalModelClient *client_data;
-
+
g_return_if_fail (E_IS_CAL_MODEL (model));
g_return_if_fail (E_IS_CAL (client));
@@ -1743,7 +1743,7 @@ redo_queries (ECalModel *model)
char *iso_start, *iso_end;
GList *l;
int len;
-
+
priv = model->priv;
if (priv->full_sexp)
@@ -1752,28 +1752,28 @@ redo_queries (ECalModel *model)
if (priv->start != -1 && priv->end != -1) {
iso_start = isodate_from_time_t (priv->start);
iso_end = isodate_from_time_t (priv->end);
-
+
priv->full_sexp = g_strdup_printf ("(and (occur-in-time-range? (make-time \"%s\")"
" (make-time \"%s\"))"
" %s)",
- iso_start, iso_end,
+ iso_start, iso_end,
priv->search_sexp ? priv->search_sexp : "");
} else if (priv->search_sexp) {
priv->full_sexp = g_strdup (priv->search_sexp);
} else {
priv->full_sexp = g_strdup ("#f");
- }
-
+ }
+
/* clean up the current contents */
e_table_model_pre_change (E_TABLE_MODEL (model));
len = priv->objects->len;
e_table_model_rows_deleted (E_TABLE_MODEL (model), 0, len);
clear_objects_array (priv);
-
+
/* update the query for all clients */
for (l = priv->clients; l != NULL; l = l->next) {
ECalModelClient *client_data;
-
+
client_data = (ECalModelClient *) l->data;
update_e_cal_view_for_client (model, client_data);
}
@@ -1783,15 +1783,15 @@ void
e_cal_model_get_time_range (ECalModel *model, time_t *start, time_t *end)
{
ECalModelPrivate *priv;
-
+
g_return_if_fail (model != NULL);
g_return_if_fail (E_IS_CAL_MODEL (model));
priv = model->priv;
-
+
if (start)
*start = priv->start;
-
+
if (end)
*end = priv->end;
}
@@ -1800,7 +1800,7 @@ void
e_cal_model_set_time_range (ECalModel *model, time_t start, time_t end)
{
ECalModelPrivate *priv;
-
+
g_return_if_fail (model != NULL);
g_return_if_fail (E_IS_CAL_MODEL (model));
g_return_if_fail (start >= 0 && end >= 0);
@@ -1810,7 +1810,7 @@ e_cal_model_set_time_range (ECalModel *model, time_t start, time_t end)
if (priv->start == start && priv->end == end)
return;
-
+
priv->start = start;
priv->end = end;
@@ -1822,12 +1822,12 @@ const char *
e_cal_model_get_search_query (ECalModel *model)
{
ECalModelPrivate *priv;
-
+
g_return_val_if_fail (model != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
priv = model->priv;
-
+
return priv->search_sexp;
}
@@ -1874,7 +1874,7 @@ e_cal_model_set_search_query_with_time_range (ECalModel *model, const char *sexp
priv->search_sexp = g_strdup (sexp);
do_query = TRUE;
}
-
+
if (!(priv->start == start && priv->end == end)) {
priv->start = start;
priv->end = end;
@@ -2013,7 +2013,7 @@ e_cal_model_get_component_for_uid (ECalModel *model, const ECalComponentId *id)
priv = model->priv;
return search_by_id_and_client (priv, NULL, id);
-}
+}
/**
* e_cal_model_date_value_to_string
@@ -2059,7 +2059,7 @@ static ECellDateEditValue *
copy_ecdv (ECellDateEditValue *ecdv)
{
ECellDateEditValue *new_ecdv;
-
+
new_ecdv = g_new0 (ECellDateEditValue, 1);
new_ecdv->tt = ecdv ? ecdv->tt : icaltime_null_time ();
new_ecdv->zone = ecdv ? ecdv->zone : NULL;
@@ -2207,7 +2207,7 @@ e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezon
else {
icalparameter *param = NULL;
icalproperty *prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTSTART_PROPERTY);
-
+
if (prop) {
param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER);
@@ -2223,7 +2223,7 @@ e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezon
}
}
}
-
+
comp_data->instance_start = icaltime_as_timet_with_zone (start_time, zone);
if (end_time.zone)
@@ -2231,7 +2231,7 @@ e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezon
else {
icalparameter *param = NULL;
icalproperty *prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_DTSTART_PROPERTY);
-
+
if (prop) {
param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER);
diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c
index 983f922958..caa69f015a 100644
--- a/calendar/gui/e-cal-popup.c
+++ b/calendar/gui/e-cal-popup.c
@@ -129,7 +129,7 @@ temp_save_part(CamelMimePart *part, char *path, gboolean file)
g_free (utf8_mfilename);
filename = (const char *) mfilename;
}
-
+
path = g_build_filename(tmpdir, filename, NULL);
g_free(mfilename);
}
@@ -173,12 +173,12 @@ ecalp_part_popup_saveas(EPopup *ep, EPopupItem *item, void *data)
mfilename = g_strdup(filename);
e_filename_make_safe(mfilename);
filename = mfilename;
- }
+ }
file = e_file_dialog_save (_("Save As..."), filename);
-
+
if (file)
temp_save_part (part, file, TRUE);
-
+
g_free (file);
g_free (mfilename);
}
@@ -189,10 +189,10 @@ ecalp_part_popup_save_selected(EPopup *ep, EPopupItem *item, void *data)
GSList *parts;
EPopupTarget *t = ep->target;
char *dir, *path;
-
+
dir = e_file_dialog_save_folder (_("Select folder to save selected attachments..."));
parts = ((ECalPopupTargetAttachments *) t)->attachments;
-
+
for (;parts; parts=parts->next) {
path = temp_save_part (((EAttachment *)parts->data)->body, dir, FALSE);
/* Probably we 'll do some reporting in next release, like listing the saved files and locations */
@@ -215,7 +215,7 @@ ecalp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
return;
filename = g_strdup(camel_mime_part_get_filename(part));
-
+
/* if filename is blank, create a default filename based on MIME type */
if (!filename || !filename[0]) {
CamelContentType *ct;
@@ -226,13 +226,13 @@ ecalp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
}
e_filename_make_safe(filename);
-
+
path = g_build_filename(g_get_home_dir(), ".gnome2", "wallpapers", filename, NULL);
-
+
extension = strrchr(filename, '.');
if (extension)
*extension++ = 0;
-
+
/* if file exists, stick a (number) on the end */
while (g_file_test(path, G_FILE_TEST_EXISTS)) {
char *name;
@@ -241,35 +241,35 @@ ecalp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
path = g_build_filename(g_get_home_dir(), ".gnome2", "wallpapers", name, NULL);
g_free(name);
}
-
+
g_free(filename);
-
+
if (temp_save_part(part, path, TRUE)) {
gconf = gconf_client_get_default();
-
- /* if the filename hasn't changed, blank the filename before
+
+ /* if the filename hasn't changed, blank the filename before
* setting it so that gconf detects a change and updates it */
- if ((str = gconf_client_get_string(gconf, "/desktop/gnome/background/picture_filename", NULL)) != NULL
+ if ((str = gconf_client_get_string(gconf, "/desktop/gnome/background/picture_filename", NULL)) != NULL
&& strcmp (str, path) == 0) {
gconf_client_set_string(gconf, "/desktop/gnome/background/picture_filename", "", NULL);
}
-
+
g_free (str);
gconf_client_set_string(gconf, "/desktop/gnome/background/picture_filename", path, NULL);
-
+
/* if GNOME currently doesn't display a picture, set to "wallpaper"
* display mode, otherwise leave it alone */
- if ((str = gconf_client_get_string(gconf, "/desktop/gnome/background/picture_options", NULL)) == NULL
+ if ((str = gconf_client_get_string(gconf, "/desktop/gnome/background/picture_options", NULL)) == NULL
|| strcmp(str, "none") == 0) {
gconf_client_set_string(gconf, "/desktop/gnome/background/picture_options", "wallpaper", NULL);
}
-
+
gconf_client_suggest_sync(gconf, NULL);
-
+
g_free(str);
g_object_unref(gconf);
}
-
+
g_free(path);
}
@@ -296,7 +296,7 @@ ecalp_apps_open_in(EPopup *ep, EPopupItem *item, void *data)
GnomeVFSMimeApplication *app = item->user_data;
char *uri;
GList *uris = NULL;
-
+
uri = gnome_vfs_get_uri_from_local_path(path);
uris = g_list_append(uris, uri);
@@ -330,7 +330,7 @@ ecalp_standard_items_free(EPopup *ep, GSList *items, void *data)
g_slist_free(items);
}
-static void
+static void
ecalp_standard_menu_factory (EPopup *ecalp, void *data)
{
int i, len;
@@ -359,18 +359,18 @@ ecalp_standard_menu_factory (EPopup *ecalp, void *data)
filename = camel_mime_part_get_filename(attachment->body);
- break; }
+ break; }
default:
items = NULL;
- len = 0;
+ len = 0;
}
if (mime_type) {
apps = gnome_vfs_mime_get_all_applications(mime_type);
-
+
if (apps == NULL && strcmp(mime_type, "application/octet-stream") == 0) {
const char *name_type;
-
+
if (filename) {
/* GNOME-VFS will misidentify TNEF attachments as MPEG */
if (!strcmp (filename, "winmail.dat"))
@@ -464,12 +464,12 @@ ECalPopup *e_cal_popup_new(const char *menuid)
static icalproperty *
get_attendee_prop (icalcomponent *icalcomp, const char *address)
{
-
+
icalproperty *prop;
if (!(address && *address))
return NULL;
-
+
for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
prop;
prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) {
@@ -481,14 +481,14 @@ get_attendee_prop (icalcomponent *icalcomp, const char *address)
}
return NULL;
}
-
-static gboolean
+
+static gboolean
is_delegated (icalcomponent *icalcomp, char *user_email)
{
icalproperty *prop;
icalparameter *param;
const char *delto = NULL;
-
+
prop = get_attendee_prop (icalcomp, user_email);
if (prop) {
@@ -496,8 +496,8 @@ is_delegated (icalcomponent *icalcomp, char *user_email)
delto = icalparameter_get_delegatedto (param);
} else
return FALSE;
-
- prop = get_attendee_prop (icalcomp, itip_strip_mailto (delto));
+
+ prop = get_attendee_prop (icalcomp, itip_strip_mailto (delto));
if (prop) {
const char *delfrom;
@@ -512,20 +512,20 @@ is_delegated (icalcomponent *icalcomp, char *user_email)
return TRUE;
}
- return FALSE;
+ return FALSE;
}
static gboolean
-needs_to_accept (icalcomponent *icalcomp, char *user_email)
+needs_to_accept (icalcomponent *icalcomp, char *user_email)
{
icalproperty *prop;
icalparameter *param;
icalparameter_partstat status;
-
+
prop = get_attendee_prop (icalcomp, user_email);
/* It might be a mailing list */
- if (!prop)
+ if (!prop)
return TRUE;
param = icalproperty_get_first_parameter (prop, ICAL_PARTSTAT_PARAMETER);
status = icalparameter_get_partstat (param);
@@ -543,10 +543,10 @@ needs_to_accept (icalcomponent *icalcomp, char *user_email)
* @events: An array of pointers to ECalModelComponent items. These
* items must be copied. They, and the @events array will be freed by
* the popup menu automatically.
- *
+ *
* Create a new selection popup target.
- *
- * Return value:
+ *
+ * Return value:
**/
ECalPopupTargetSelect *
e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArray *events)
@@ -555,13 +555,13 @@ e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArr
guint32 mask = ~0;
ECal *client;
gboolean read_only, user_org = FALSE;
-
+
/* FIXME: This is duplicated in e-cal-menu */
t->model = model;
g_object_ref(t->model);
t->events = events;
-
+
if (t->events->len == 0) {
client = e_cal_model_get_default_client(t->model);
} else {
@@ -583,7 +583,7 @@ e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArr
/* Now check for any incomplete tasks and set the flags*/
for (; i < t->events->len; i++) {
ECalModelComponent *comp_data = (ECalModelComponent *)t->events->pdata[i];
- if (!icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY))
+ if (!icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY))
mask &= ~E_CAL_POPUP_SELECT_NOTCOMPLETE;
else
mask &= ~E_CAL_POPUP_SELECT_COMPLETE;
@@ -640,7 +640,7 @@ e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArr
if (icalcomponent_get_first_property (comp_data->icalcomp, ICAL_COMPLETED_PROPERTY))
mask &= ~E_CAL_POPUP_SELECT_COMPLETE;
-
+
g_object_unref (comp);
g_free (user_email);
}
@@ -649,8 +649,8 @@ e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArr
if (!read_only)
mask &= ~E_CAL_POPUP_SELECT_EDITABLE;
-
-
+
+
if (!e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT)
&& !e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK))
mask &= ~E_CAL_POPUP_SELECT_ASSIGNABLE;
@@ -697,7 +697,7 @@ e_cal_popup_target_new_source(ECalPopup *eabp, ESourceSelector *selector)
/* check for e_target_selector's offline_status property here */
offline = e_source_get_property (source, "offline");
- if (offline && strcmp (offline,"1") == 0) {
+ if (offline && strcmp (offline,"1") == 0) {
/* set the menu item to Mark Offline - */
mask &= ~E_CAL_POPUP_SOURCE_NO_OFFLINE;
} else {
@@ -708,7 +708,7 @@ e_cal_popup_target_new_source(ECalPopup *eabp, ESourceSelector *selector)
mask |= E_CAL_POPUP_SOURCE_OFFLINE;
}
g_free (uri);
-
+
source = e_source_selector_peek_primary_selection (selector);
/*check for delete_status property here*/
delete = e_source_get_property (source, "delete");
@@ -729,13 +729,13 @@ e_cal_popup_target_new_source(ECalPopup *eabp, ESourceSelector *selector)
/**
* e_cal_popup_target_new_attachments:
- * @ecp:
+ * @ecp:
* @attachments: A list of CalAttachment objects, reffed for
* the list. Will be unreff'd once finished with.
- *
+ *
* Owns the list @attachments and their items after they're passed in.
- *
- * Return value:
+ *
+ * Return value:
**/
ECalPopupTargetAttachments *
e_cal_popup_target_new_attachments(ECalPopup *ecp, CompEditor *editor, GSList *attachments)
@@ -752,10 +752,10 @@ e_cal_popup_target_new_attachments(ECalPopup *ecp, CompEditor *editor, GSList *a
if (error->code != E_CALENDAR_STATUS_BUSY)
read_only = TRUE;
g_error_free (error);
- }
+ }
- if (!read_only && (!(flags & COMP_EDITOR_MEETING) ||
- (flags & COMP_EDITOR_NEW_ITEM) ||
+ if (!read_only && (!(flags & COMP_EDITOR_MEETING) ||
+ (flags & COMP_EDITOR_NEW_ITEM) ||
(flags & COMP_EDITOR_USER_ORG)))
mask &= ~ E_CAL_POPUP_ATTACHMENTS_MODIFY;
@@ -771,7 +771,7 @@ e_cal_popup_target_new_attachments(ECalPopup *ecp, CompEditor *editor, GSList *a
if (len > 1)
mask &= ~ E_CAL_POPUP_ATTACHMENTS_MULTIPLE;
-
+
t->target.mask = mask;
return t;
@@ -820,7 +820,7 @@ static const EPopupHookTargetMask ecalph_select_masks[] = {
{ "meeting", E_CAL_POPUP_SELECT_MEETING },
{ "assignable", E_CAL_POPUP_SELECT_ASSIGNABLE },
{ "hasurl", E_CAL_POPUP_SELECT_HASURL },
- { "delegate", E_CAL_POPUP_SELECT_DELEGATABLE },
+ { "delegate", E_CAL_POPUP_SELECT_DELEGATABLE },
{ "accept", E_CAL_POPUP_SELECT_ACCEPTABLE },
{ "not-complete", E_CAL_POPUP_SELECT_NOTCOMPLETE },
{ "no-save-schedules", E_CAL_POPUP_SELECT_NOSAVESCHEDULES },
@@ -833,9 +833,9 @@ static const EPopupHookTargetMask ecalph_source_masks[] = {
{ "system", E_CAL_POPUP_SOURCE_SYSTEM },
{ "user", E_CAL_POPUP_SOURCE_USER },
{ "offline", E_CAL_POPUP_SOURCE_OFFLINE},
- { "no-offline", E_CAL_POPUP_SOURCE_NO_OFFLINE},
+ { "no-offline", E_CAL_POPUP_SOURCE_NO_OFFLINE},
{ "delete", E_CAL_POPUP_SOURCE_DELETE},
- { "no-delete", E_CAL_POPUP_SOURCE_NO_DELETE},
+ { "no-delete", E_CAL_POPUP_SOURCE_NO_DELETE},
{ NULL }
};
@@ -882,7 +882,7 @@ GType
e_cal_popup_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(ECalPopupHookClass), NULL, NULL, (GClassInitFunc) ecalph_class_init, NULL, NULL,
@@ -892,6 +892,6 @@ e_cal_popup_hook_get_type(void)
ecalph_parent_class = g_type_class_ref(e_popup_hook_get_type());
type = g_type_register_static(e_popup_hook_get_type(), "ECalPopupHook", &info, 0);
}
-
+
return type;
}
diff --git a/calendar/gui/e-cal-popup.h b/calendar/gui/e-cal-popup.h
index 70e61fefa6..ee3e94413f 100644
--- a/calendar/gui/e-cal-popup.h
+++ b/calendar/gui/e-cal-popup.h
@@ -39,7 +39,7 @@ struct _ECalendarView;
/**
* enum _e_cal_popup_target_t - A list of mail popup target types.
- *
+ *
* @E_CAL_POPUP_TARGET_SELECT: A selection of cards
* @E_CAL_POPUP_TARGET_SOURCE: A source selection.
*
@@ -53,7 +53,7 @@ enum _e_cal_popup_target_t {
/**
* enum _e_cal_popup_target_select_t - ECalPopupTargetSelect qualifiers.
- *
+ *
* @E_CAL_POPUP_SELECT_ONE: Only one item is selected.
* @E_CAL_POPUP_SELECT_MANY: More than one item selected.
* @E_CAL_POPUP_SELECT_ANY: One ore more items are selected.
@@ -92,10 +92,10 @@ enum _e_cal_popup_target_select_t {
/**
* enum _e_cal_popup_target_source_t - ECalPopupTargetSource qualifiers.
- *
+ *
* @E_CAL_POPUP_SOURCE_PRIMARY: Has a primary selection.
* @E_CAL_POPUP_SOURCE_SYSTEM: Is a 'system' folder.
- *
+ *
**/
enum _e_cal_popup_target_source_t {
E_CAL_POPUP_SOURCE_PRIMARY = 1<<0,
@@ -109,10 +109,10 @@ enum _e_cal_popup_target_source_t {
/**
* enum _e_cal_popup_target_attachments_t - ECalPopupTargetAttachments qualifiers.
- *
+ *
* @E_CAL_POPUP_ATTACHMENTS_ONE: There is one and only one attachment selected.
* @E_CAL_POPUP_ATTACHMENTS_MANY: There is one or more attachments selected.
- *
+ *
**/
enum _e_cal_popup_target_attachments_t {
E_CAL_POPUP_ATTACHMENTS_ONE = 1<<0, /* only 1 selected */
@@ -128,7 +128,7 @@ typedef struct _ECalPopupTargetAttachments ECalPopupTargetAttachments;
/**
* struct _ECalPopupTargetSelect - A list of address cards.
- *
+ *
* @target: Superclass. target.widget is an ECalendarView.
* @model: The ECalModel.
* @events: The selected events. These are ECalModelComponent's.
@@ -148,7 +148,7 @@ struct _ECalPopupTargetSelect {
/**
* struct _ECalPopupTargetSource - A source target.
- *
+ *
* @target: Superclass.
* @selector: Selector holding the source selection.
*
@@ -162,7 +162,7 @@ struct _ECalPopupTargetSource {
/**
* struct _ECalPopupTargetAttachments - A list of calendar attachments.
- *
+ *
* @target: Superclass.
* @attachments: A GSList list of CalAttachments.
*
@@ -193,7 +193,7 @@ ECalPopup *e_cal_popup_new(const char *menuid);
ECalPopupTargetSelect *e_cal_popup_target_new_select(ECalPopup *eabp, struct _ECalModel *model, GPtrArray *events);
ECalPopupTargetSource *e_cal_popup_target_new_source(ECalPopup *eabp, struct _ESourceSelector *selector);
-ECalPopupTargetAttachments * e_cal_popup_target_new_attachments (ECalPopup *ecp,
+ECalPopupTargetAttachments * e_cal_popup_target_new_attachments (ECalPopup *ecp,
CompEditor *editor, GSList *attachments);
/* ********************************************************************** */
diff --git a/calendar/gui/e-calendar-table-config.c b/calendar/gui/e-calendar-table-config.c
index 588098950b..5750ceb8c9 100644
--- a/calendar/gui/e-calendar-table-config.c
+++ b/calendar/gui/e-calendar-table-config.c
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -28,7 +28,7 @@ struct _ECalendarTableConfigPrivate {
ECalendarTable *table;
ECellDateEditConfig *cell_config;
-
+
GList *notifications;
};
@@ -46,7 +46,7 @@ e_calendar_table_config_set_property (GObject *object, guint property_id, const
ECalendarTableConfig *table_config;
table_config = E_CALENDAR_TABLE_CONFIG (object);
-
+
switch (property_id) {
case PROP_TABLE:
e_calendar_table_config_set_table (table_config, g_value_get_object (value));
@@ -63,7 +63,7 @@ e_calendar_table_config_get_property (GObject *object, guint property_id, GValue
ECalendarTableConfig *table_config;
table_config = E_CALENDAR_TABLE_CONFIG (object);
-
+
switch (property_id) {
case PROP_TABLE:
g_value_set_object (value, e_calendar_table_config_get_table (table_config));
@@ -78,9 +78,9 @@ static void
e_calendar_table_config_dispose (GObject *object)
{
ECalendarTableConfig *table_config = E_CALENDAR_TABLE_CONFIG (object);
-
+
e_calendar_table_config_set_table (table_config, NULL);
-
+
if (G_OBJECT_CLASS (e_calendar_table_config_parent_class)->dispose)
G_OBJECT_CLASS (e_calendar_table_config_parent_class)->dispose (object);
}
@@ -90,11 +90,11 @@ e_calendar_table_config_finalize (GObject *object)
{
ECalendarTableConfig *table_config = E_CALENDAR_TABLE_CONFIG (object);
ECalendarTableConfigPrivate *priv;
-
+
priv = table_config->priv;
g_free (priv);
-
+
if (G_OBJECT_CLASS (e_calendar_table_config_parent_class)->finalize)
G_OBJECT_CLASS (e_calendar_table_config_parent_class)->finalize (object);
}
@@ -104,7 +104,7 @@ e_calendar_table_config_class_init (ECalendarTableConfigClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *spec;
-
+
/* Method override */
gobject_class->set_property = e_calendar_table_config_set_property;
gobject_class->get_property = e_calendar_table_config_get_property;
@@ -127,14 +127,14 @@ ECalendarTableConfig *
e_calendar_table_config_new (ECalendarTable *table)
{
ECalendarTableConfig *table_config;
-
+
table_config = g_object_new (e_calendar_table_config_get_type (), "table", table, NULL);
return table_config;
}
ECalendarTable *
-e_calendar_table_config_get_table (ECalendarTableConfig *table_config)
+e_calendar_table_config_get_table (ECalendarTableConfig *table_config)
{
ECalendarTableConfigPrivate *priv;
@@ -142,17 +142,17 @@ e_calendar_table_config_get_table (ECalendarTableConfig *table_config)
g_return_val_if_fail (E_IS_CALENDAR_TABLE_CONFIG (table_config), NULL);
priv = table_config->priv;
-
+
return priv->table;
}
static void
-set_timezone (ECalendarTable *table)
+set_timezone (ECalendarTable *table)
{
ECalModel *model;
icaltimezone *zone;
-
- zone = calendar_config_get_icaltimezone ();
+
+ zone = calendar_config_get_icaltimezone ();
model = e_calendar_table_get_model (table);
if (model)
e_cal_model_set_timezone (model, zone);
@@ -163,14 +163,14 @@ timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer
{
ECalendarTableConfig *table_config = data;
ECalendarTableConfigPrivate *priv;
-
+
priv = table_config->priv;
-
+
set_timezone (priv->table);
}
static void
-set_twentyfour_hour (ECalendarTable *table)
+set_twentyfour_hour (ECalendarTable *table)
{
ECalModel *model;
gboolean use_24_hour;
@@ -187,24 +187,24 @@ twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gp
{
ECalendarTableConfig *table_config = data;
ECalendarTableConfigPrivate *priv;
-
+
priv = table_config->priv;
-
+
set_twentyfour_hour (priv->table);
}
void
-e_calendar_table_config_set_table (ECalendarTableConfig *table_config, ECalendarTable *table)
+e_calendar_table_config_set_table (ECalendarTableConfig *table_config, ECalendarTable *table)
{
ECalendarTableConfigPrivate *priv;
guint not;
GList *l;
-
+
g_return_if_fail (table_config != NULL);
g_return_if_fail (E_IS_CALENDAR_TABLE_CONFIG (table_config));
priv = table_config->priv;
-
+
if (priv->table) {
g_object_unref (priv->table);
priv->table = NULL;
@@ -214,7 +214,7 @@ e_calendar_table_config_set_table (ECalendarTableConfig *table_config, ECalendar
g_object_unref (priv->cell_config);
priv->cell_config = NULL;
}
-
+
for (l = priv->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
@@ -224,17 +224,17 @@ e_calendar_table_config_set_table (ECalendarTableConfig *table_config, ECalendar
/* If the new view is NULL, return right now */
if (!table)
return;
-
+
priv->table = g_object_ref (table);
/* Time zone */
set_timezone (table);
-
+
not = calendar_config_add_notification_timezone (timezone_changed_cb, table_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* 24 Hour format */
- set_twentyfour_hour (table);
+ set_twentyfour_hour (table);
not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, table_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
diff --git a/calendar/gui/e-calendar-table-config.h b/calendar/gui/e-calendar-table-config.h
index c11f3a0681..93b1dadf9b 100644
--- a/calendar/gui/e-calendar-table-config.h
+++ b/calendar/gui/e-calendar-table-config.h
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
#define E_CALENDAR_TABLE_CONFIG(obj) GTK_CHECK_CAST (obj, e_calendar_table_config_get_type (), ECalendarTableConfig)
#define E_CALENDAR_TABLE_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_calendar_table_config_get_type (), ECalendarTableConfigClass)
#define E_IS_CALENDAR_TABLE_CONFIG(obj) GTK_CHECK_TYPE (obj, e_calendar_table_config_get_type ())
-
+
typedef struct _ECalendarTableConfig ECalendarTableConfig;
typedef struct _ECalendarTableConfigClass ECalendarTableConfigClass;
typedef struct _ECalendarTableConfigPrivate ECalendarTableConfigPrivate;
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index 1d8d48ab13..60d4dba6e4 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -221,7 +221,7 @@ priority_compare_cb (gconstpointer a, gconstpointer b)
}
static void
-row_appended_cb (ECalModel *model, ECalendarTable *cal_table)
+row_appended_cb (ECalModel *model, ECalendarTable *cal_table)
{
g_signal_emit (cal_table, signals[USER_CREATED], 0);
}
@@ -481,9 +481,9 @@ e_calendar_table_new (void)
/**
* e_calendar_table_get_model:
* @cal_table: A calendar table.
- *
+ *
* Queries the calendar data model that a calendar table is using.
- *
+ *
* Return value: A calendar model.
**/
ECalModel *
@@ -514,9 +514,9 @@ e_calendar_table_destroy (GtkObject *object)
/**
* e_calendar_table_get_table:
* @cal_table: A calendar table.
- *
+ *
* Queries the #ETable widget that the calendar table is using.
- *
+ *
* Return value: The #ETable widget that the calendar table uses to display its
* data.
**/
@@ -544,7 +544,7 @@ e_calendar_table_open_selected (ECalendarTable *cal_table)
/**
* e_calendar_table_complete_selected:
* @cal_table: A calendar table
- *
+ *
* Marks the selected items as completed
**/
void
@@ -637,8 +637,8 @@ delete_selected_components (ECalendarTable *cal_table)
for (l = objs; l; l = l->next) {
ECalModelComponent *comp_data = (ECalModelComponent *) l->data;
GError *error = NULL;
-
- e_cal_remove_object (comp_data->client,
+
+ e_cal_remove_object (comp_data->client,
icalcomponent_get_uid (comp_data->icalcomp), &error);
delete_error_dialog (error, E_CAL_COMPONENT_TODO);
g_clear_error (&error);
@@ -663,7 +663,7 @@ add_retract_data (ECalComponent *comp, const char *retract_comment)
icalcomponent_add_property (icalcomp, icalprop);
}
-static gboolean
+static gboolean
check_for_retract (ECalComponent *comp, ECal *client)
{
ECalComponentOrganizer org;
@@ -671,13 +671,13 @@ check_for_retract (ECalComponent *comp, ECal *client)
const char *strip = NULL;
gboolean ret_val = FALSE;
- if (!(e_cal_component_has_attendees (comp) &&
+ if (!(e_cal_component_has_attendees (comp) &&
e_cal_get_save_schedules (client)))
return ret_val;
e_cal_component_get_organizer (comp, &org);
strip = itip_strip_mailto (org.value);
-
+
if (e_cal_get_cal_address (client, &email, NULL) && !g_ascii_strcasecmp (email, strip)) {
ret_val = TRUE;
}
@@ -692,7 +692,7 @@ check_for_retract (ECalComponent *comp, ECal *client)
/**
* e_calendar_table_delete_selected:
* @cal_table: A calendar table.
- *
+ *
* Deletes the selected components in the table; asks the user first.
**/
void
@@ -725,7 +725,7 @@ e_calendar_table_delete_selected (ECalendarTable *cal_table)
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
}
-
+
if ((n_selected == 1) && comp && check_for_retract (comp, comp_data->client)) {
char *retract_comment = NULL;
gboolean retract = FALSE;
@@ -739,7 +739,7 @@ e_calendar_table_delete_selected (ECalendarTable *cal_table)
add_retract_data (comp, retract_comment);
icalcomp = e_cal_component_get_icalcomponent (comp);
icalcomponent_set_method (icalcomp, ICAL_METHOD_CANCEL);
- if (!e_cal_send_objects (comp_data->client, icalcomp, &users,
+ if (!e_cal_send_objects (comp_data->client, icalcomp, &users,
&mod_comp, &error)) {
delete_error_dialog (error, E_CAL_COMPONENT_TODO);
g_clear_error (&error);
@@ -770,10 +770,10 @@ e_calendar_table_delete_selected (ECalendarTable *cal_table)
/**
* e_calendar_table_get_selected:
- * @cal_table:
- *
+ * @cal_table:
+ *
* Get the currently selected ECalModelComponent's on the table.
- *
+ *
* Return value: A GSList of the components, which should be
* g_slist_free'd when finished with.
**/
@@ -860,7 +860,7 @@ e_calendar_table_copy_clipboard (ECalendarTable *cal_table)
ETable *etable;
GtkClipboard *clipboard;
char *comp_str;
-
+
g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
/* create temporary VCALENDAR object */
@@ -877,7 +877,7 @@ e_calendar_table_copy_clipboard (ECalendarTable *cal_table)
} else {
gtk_clipboard_set_can_store (clipboard, target_types + 1, n_target_types - 1);
}
-
+
/* free memory */
icalcomponent_free (cal_table->tmp_vcal);
cal_table->tmp_vcal = NULL;
@@ -911,7 +911,7 @@ clipboard_get_calendar_data (ECalendarTable *cal_table, const gchar *text)
}
client = e_cal_model_get_default_client (cal_table->model);
-
+
e_calendar_table_set_status_message (cal_table, _("Updating objects"), -1);
if (kind == ICAL_VCALENDAR_COMPONENT) {
@@ -965,7 +965,7 @@ clipboard_paste_received_cb (GtkClipboard *clipboard,
GtkSelectionData *selection_data,
gpointer data)
{
- ECalendarTable *cal_table = E_CALENDAR_TABLE (data);
+ ECalendarTable *cal_table = E_CALENDAR_TABLE (data);
ETable *e_table = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable));
GnomeCanvas *canvas = e_table->table_canvas;
GnomeCanvasItem *item = GNOME_CANVAS (canvas)->focused_item;
@@ -1018,7 +1018,7 @@ e_calendar_table_open_task (ECalendarTable *cal_table, ECal *client, icalcompone
CompEditor *tedit;
const char *uid;
guint32 flags = 0;
-
+
uid = icalcomponent_get_uid (icalcomp);
tedit = e_comp_editor_registry_find (comp_editor_registry, uid);
@@ -1031,17 +1031,17 @@ e_calendar_table_open_task (ECalendarTable *cal_table, ECal *client, icalcompone
if (assign) {
flags |= COMP_EDITOR_IS_ASSIGNED;
- if (itip_organizer_is_user (comp, client) ||
+ if (itip_organizer_is_user (comp, client) ||
!e_cal_component_has_attendees (comp))
flags |= COMP_EDITOR_USER_ORG;
}
tedit = COMP_EDITOR (task_editor_new (client, flags));
comp_editor_edit_comp (tedit, comp);
-
+
if (flags & COMP_EDITOR_IS_ASSIGNED)
task_editor_show_assignment (TASK_EDITOR (tedit));
-
+
e_comp_editor_registry_add (comp_editor_registry, tedit, FALSE);
}
comp_editor_focus (tedit);
@@ -1061,7 +1061,7 @@ open_task_by_row (ECalendarTable *cal_table, int row)
static void
e_calendar_table_on_double_click (ETable *table,
- gint row,
+ gint row,
gint col,
GdkEvent *event,
ECalendarTable *cal_table)
@@ -1091,15 +1091,15 @@ e_calendar_table_on_save_as (EPopup *ep, EPopupItem *pitem, void *data)
ECalModelComponent *comp_data;
char *filename;
char *ical_string;
-
+
comp_data = e_calendar_table_get_selected_comp (cal_table);
if (comp_data == NULL)
return;
-
+
filename = e_file_dialog_save (_("Save as..."), NULL);
if (filename == NULL)
return;
-
+
ical_string = e_cal_get_component_as_string (comp_data->client, comp_data->icalcomp);
if (ical_string == NULL) {
g_warning ("Couldn't convert item to a string");
@@ -1107,7 +1107,7 @@ e_calendar_table_on_save_as (EPopup *ep, EPopupItem *pitem, void *data)
}
e_write_file_uri (filename, ical_string);
-
+
g_free (ical_string);
}
@@ -1121,7 +1121,7 @@ e_calendar_table_on_print_task (EPopup *ep, EPopupItem *pitem, void *data)
comp_data = e_calendar_table_get_selected_comp (cal_table);
if (comp_data == NULL)
return;
-
+
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
print_comp (comp, comp_data->client, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
@@ -1306,7 +1306,7 @@ on_new_task (EPopup *ep, EPopupItem *pitem, void *data)
return;
e_tasks_new_task (tasks);
-
+
}
/* Callback for the "delete tasks" menu item */
@@ -1321,14 +1321,14 @@ delete_cb (EPopup *ep, EPopupItem *pitem, void *data)
static EPopupItem tasks_popup_items [] = {
{ E_POPUP_ITEM, "00.newtask", N_("New _Task"), on_new_task, NULL, "stock_task", 0, 0},
{ E_POPUP_BAR, "01.bar" },
-
+
{ E_POPUP_ITEM, "03.open", N_("_Open"), e_calendar_table_on_open_task, NULL, GTK_STOCK_OPEN, E_CAL_POPUP_SELECT_ONE },
{ E_POPUP_ITEM, "05.openweb", N_("Open _Web Page"), open_url_cb, NULL, NULL, E_CAL_POPUP_SELECT_ONE, E_CAL_POPUP_SELECT_HASURL },
{ E_POPUP_ITEM, "10.saveas", N_("_Save As..."), e_calendar_table_on_save_as, NULL, GTK_STOCK_SAVE_AS, E_CAL_POPUP_SELECT_ONE },
{ E_POPUP_ITEM, "20.print", N_("_Print..."), e_calendar_table_on_print_task, NULL, GTK_STOCK_PRINT, E_CAL_POPUP_SELECT_ONE },
{ E_POPUP_BAR, "30.bar" },
-
+
{ E_POPUP_ITEM, "40.cut", N_("C_ut"), e_calendar_table_on_cut, NULL, GTK_STOCK_CUT, 0, E_CAL_POPUP_SELECT_EDITABLE },
{ E_POPUP_ITEM, "50.copy", N_("_Copy"), e_calendar_table_on_copy, NULL, GTK_STOCK_COPY, 0, 0 },
{ E_POPUP_ITEM, "60.paste", N_("_Paste"), e_calendar_table_on_paste, NULL, GTK_STOCK_PASTE, 0, E_CAL_POPUP_SELECT_EDITABLE },
@@ -1432,7 +1432,7 @@ e_calendar_table_on_key_press (ETable *table,
} else if ((event->keyval == GDK_o)
&&(event->state & GDK_CONTROL_MASK)) {
open_task_by_row (cal_table, row);
- return TRUE;
+ return TRUE;
}
return FALSE;
@@ -1514,7 +1514,7 @@ show_completed_rows (ECalModel *model, GList *clients_list, char *show_sexp, GPt
g_ptr_array_add (comp_objects, comp_data);
e_table_model_row_inserted (E_TABLE_MODEL (model), comp_objects->len - 1);
- }
+ }
e_cal_component_free_id (id);
g_object_unref (comp);
}
@@ -1603,7 +1603,7 @@ e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *mes
if (!cal_table->activity_handler)
return;
-
+
if (!message || !*message) {
if (cal_table->activity_id != 0) {
e_activity_handler_operation_finished (cal_table->activity_handler, cal_table->activity_id);
@@ -1611,7 +1611,7 @@ e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *mes
}
} else if (cal_table->activity_id == 0) {
char *client_id = g_strdup_printf ("%p", cal_table);
-
+
if (progress_icon == NULL)
progress_icon = e_icon_factory_get_icon (EVOLUTION_TASKS_PROGRESS_IMAGE, E_ICON_SIZE_STATUS);
@@ -1620,9 +1620,9 @@ e_calendar_table_set_status_message (ECalendarTable *cal_table, const gchar *mes
g_free (client_id);
} else {
-
+
double progress;
-
+
if (percent < 0)
progress = -1.0;
else {
@@ -1653,7 +1653,7 @@ e_calendar_table_process_completed_tasks (ECalendarTable *table, GList *clients_
g_mutex_lock (mutex);
- model = e_calendar_table_get_model (table);
+ model = e_calendar_table_get_model (table);
comp_objects = e_cal_model_get_object_array (model);
hide_sexp = calendar_config_get_hide_completed_tasks_sexp (TRUE);
diff --git a/calendar/gui/e-calendar-table.h b/calendar/gui/e-calendar-table.h
index a769cf54dd..b9ebf872a2 100644
--- a/calendar/gui/e-calendar-table.h
+++ b/calendar/gui/e-calendar-table.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 2000, Ximian, Inc.
* Copyright 2000, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -108,7 +108,7 @@ void e_calendar_table_set_activity_handler (ECalendarTable *cal_table,
void e_calendar_table_set_status_message (ECalendarTable *cal_table,
const gchar *message,
int percent);
-void e_calendar_table_open_task (ECalendarTable *cal_table,
+void e_calendar_table_open_task (ECalendarTable *cal_table,
ECal *client,
icalcomponent *icalcomp,
gboolean assign);
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 7f84d6e540..c4f4117bba 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Rodrigo Moya <rodrigo@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -124,7 +124,7 @@ e_calendar_view_set_property (GObject *object, guint property_id, const GValue *
ECalendarView *cal_view;
cal_view = E_CALENDAR_VIEW (object);
-
+
switch (property_id) {
case PROP_MODEL:
e_calendar_view_set_model (cal_view, E_CAL_MODEL (g_value_get_object (value)));
@@ -178,7 +178,7 @@ e_calendar_view_class_init (ECalendarViewClass *klass)
klass->update_query = NULL;
klass->open_event = e_calendar_view_open_event;
- g_object_class_install_property (gobject_class, PROP_MODEL,
+ g_object_class_install_property (gobject_class, PROP_MODEL,
g_param_spec_object ("model", NULL, NULL, E_TYPE_CAL_MODEL,
G_PARAM_READABLE | G_PARAM_WRITABLE));
@@ -260,15 +260,15 @@ e_calendar_view_class_init (ECalendarViewClass *klass)
gtk_binding_entry_add_signal (binding_set, GDK_o,
GDK_CONTROL_MASK,
"open_event", 0);
-
+
/* init the accessibility support for e_day_view */
e_cal_view_a11y_init ();
}
void
-e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
- icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas)
+e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
+ icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas)
{
ECalComponent *comp;
struct icaltimetype itime, old_dtstart, old_dtend;
@@ -305,7 +305,7 @@ e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart
case GNOME_CAL_WORK_WEEK_VIEW:
if (start_offset == 0 && end_offset == 0 && in_top_canvas)
all_day_event = TRUE;
-
+
if (all_day_event) {
ic_dur = ic_oneday;
} else if (icaldurationtype_as_int (ic_dur) >= 60*60*24
@@ -341,7 +341,7 @@ e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart
default:
g_return_if_reached ();
}
-
+
itime = icaltime_from_timet_with_zone (new_dtstart, FALSE, default_zone);
if (all_day_event)
@@ -554,7 +554,7 @@ void
e_calendar_view_set_activity_handler (ECalendarView *cal_view, EActivityHandler *activity_handler)
{
ECalendarViewPrivate *priv;
-
+
g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
priv = cal_view->priv;
@@ -566,14 +566,14 @@ void
e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *message, int percent)
{
ECalendarViewPrivate *priv;
-
+
g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
priv = cal_view->priv;
if (!priv->activity_handler)
return;
-
+
if (!message || !*message) {
if (priv->activity_id != 0) {
e_activity_handler_operation_finished (priv->activity_handler, priv->activity_id);
@@ -590,7 +590,7 @@ e_calendar_view_set_status_message (ECalendarView *cal_view, const gchar *messag
g_free (client_id);
} else {
double progress;
-
+
if (percent < 0)
progress = -1.0;
else {
@@ -678,7 +678,7 @@ e_calendar_view_cut_clipboard (ECalendarView *cal_view)
ECalComponent *comp;
ECalendarViewEvent *event = (ECalendarViewEvent *) l->data;
GError *error = NULL;
-
+
if (!event)
continue;
@@ -704,14 +704,14 @@ e_calendar_view_cut_clipboard (ECalendarView *cal_view)
&error);
icalcomponent_free (icalcomp);
} else
- e_cal_remove_object_with_mod (event->comp_data->client, uid, NULL,
+ e_cal_remove_object_with_mod (event->comp_data->client, uid, NULL,
CALOBJ_MOD_ALL, &error);
} else
e_cal_remove_object (event->comp_data->client, uid, &error);
delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
-
+
g_object_unref (comp);
}
@@ -819,11 +819,11 @@ clipboard_get_text_cb (GtkClipboard *clipboard, const gchar *text, ECalendarView
if (e_cal_util_component_has_recurrences (subcomp)) {
icalproperty *icalprop = icalcomponent_get_first_property (subcomp, ICAL_RRULE_PROPERTY);
- if (icalprop)
+ if (icalprop)
icalproperty_remove_parameter_by_name (icalprop, "X-EVOLUTION-ENDDATE");
}
-
- e_calendar_view_add_event (cal_view, client, selected_time_start,
+
+ e_calendar_view_add_event (cal_view, client, selected_time_start,
default_zone, subcomp, in_top_canvas);
} else if (child_kind == ICAL_VTIMEZONE_COMPONENT) {
icaltimezone *zone;
@@ -831,10 +831,10 @@ clipboard_get_text_cb (GtkClipboard *clipboard, const gchar *text, ECalendarView
zone = icaltimezone_new ();
icaltimezone_set_component (zone, subcomp);
e_cal_add_timezone (client, zone, NULL);
-
+
icaltimezone_free (zone, 1);
}
-
+
subcomp = icalcomponent_get_next_component (
icalcomp, ICAL_ANY_COMPONENT);
}
@@ -871,7 +871,7 @@ add_retract_data (ECalComponent *comp, const char *retract_comment, CalObjModTyp
icalproperty_set_x_name (icalprop, "X-EVOLUTION-RETRACT-COMMENT");
icalcomponent_add_property (icalcomp, icalprop);
- if (mod == CALOBJ_MOD_ALL)
+ if (mod == CALOBJ_MOD_ALL)
icalprop = icalproperty_new_x ("All");
else
icalprop = icalproperty_new_x ("This");
@@ -879,7 +879,7 @@ add_retract_data (ECalComponent *comp, const char *retract_comment, CalObjModTyp
icalcomponent_add_property (icalcomp, icalprop);
}
-static gboolean
+static gboolean
check_for_retract (ECalComponent *comp, ECal *client)
{
ECalComponentOrganizer org;
@@ -887,13 +887,13 @@ check_for_retract (ECalComponent *comp, ECal *client)
const char *strip = NULL;
gboolean ret_val = FALSE;
- if (!(e_cal_component_has_attendees (comp) &&
+ if (!(e_cal_component_has_attendees (comp) &&
e_cal_get_save_schedules (client)))
return ret_val;
e_cal_component_get_organizer (comp, &org);
strip = itip_strip_mailto (org.value);
-
+
if (e_cal_get_cal_address (client, &email, NULL) && !g_ascii_strcasecmp (email, strip)) {
ret_val = TRUE;
}
@@ -916,8 +916,8 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
vtype = e_cal_component_get_vtype (comp);
-
- /*FIXME remove it once the we dont set the recurrence id for all the generated instances */
+
+ /*FIXME remove it once the we dont set the recurrence id for all the generated instances */
if (!e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER))
e_cal_component_set_recurid (comp, NULL);
@@ -933,7 +933,7 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
add_retract_data (comp, retract_comment, CALOBJ_MOD_ALL);
icalcomp = e_cal_component_get_icalcomponent (comp);
icalcomponent_set_method (icalcomp, ICAL_METHOD_CANCEL);
- if (!e_cal_send_objects (event->comp_data->client, icalcomp, &users,
+ if (!e_cal_send_objects (event->comp_data->client, icalcomp, &users,
&mod_comp, &error)) {
delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
@@ -949,12 +949,12 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
}
}
}
- } else
+ } else
delete = delete_component_dialog (comp, FALSE, 1, vtype, GTK_WIDGET (cal_view));
if (delete) {
const char *uid;
-
+
if ((itip_organizer_is_user (comp, event->comp_data->client) || itip_sentby_is_user (comp))
&& cancel_component_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (cal_view)),
event->comp_data->client,
@@ -967,9 +967,9 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
g_object_unref (comp);
return;
}
-
+
if (e_cal_util_component_is_instance (event->comp_data->icalcomp) || e_cal_util_component_has_recurrences (event->comp_data->icalcomp))
- e_cal_remove_object_with_mod (event->comp_data->client, uid,
+ e_cal_remove_object_with_mod (event->comp_data->client, uid,
e_cal_component_get_recurid_as_string (comp), CALOBJ_MOD_ALL, &error);
else
e_cal_remove_object (event->comp_data->client, uid, &error);
@@ -1026,7 +1026,7 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
ECalComponentVType vtype;
gboolean delete = FALSE;
GError *error = NULL;
-
+
selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
@@ -1047,7 +1047,7 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
add_retract_data (comp, retract_comment, CALOBJ_MOD_THIS);
icalcomp = e_cal_component_get_icalcomponent (comp);
icalcomponent_set_method (icalcomp, ICAL_METHOD_CANCEL);
- if (!e_cal_send_objects (event->comp_data->client, icalcomp, &users,
+ if (!e_cal_send_objects (event->comp_data->client, icalcomp, &users,
&mod_comp, &error)) {
delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
@@ -1061,7 +1061,7 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
}
}
}
- } else
+ } else
delete = delete_component_dialog (comp, FALSE, 1, vtype, GTK_WIDGET (cal_view));
if (delete) {
@@ -1079,14 +1079,14 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
e_cal_get_timezone (event->comp_data->client, dt.tzid, &zone, &error);
if (error) {
- zone = e_calendar_view_get_timezone (cal_view);
+ zone = e_calendar_view_get_timezone (cal_view);
g_clear_error(&error);
}
- } else
+ } else
zone = e_calendar_view_get_timezone (cal_view);
- if (is_instance)
+ if (is_instance)
rid = e_cal_component_get_recurid_as_string (comp);
e_cal_component_free_datetime (&dt);
@@ -1115,13 +1115,13 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
else {
struct icaltimetype instance_rid;
- instance_rid = icaltime_from_timet_with_zone (event->comp_data->instance_start,
+ instance_rid = icaltime_from_timet_with_zone (event->comp_data->instance_start,
TRUE, zone ? zone : icaltimezone_get_utc_timezone ());
e_cal_util_remove_instances (event->comp_data->icalcomp, instance_rid, CALOBJ_MOD_THIS);
e_cal_modify_object (event->comp_data->client, event->comp_data->icalcomp, CALOBJ_MOD_THIS,
&error);
}
-
+
delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
}
@@ -1193,7 +1193,7 @@ on_edit_appointment (EPopup *ep, EPopupItem *pitem, void *data)
if (event)
e_calendar_view_edit_appointment (cal_view, event->comp_data->client,
- event->comp_data->icalcomp,
+ event->comp_data->icalcomp,
icalcomponent_get_first_property(event->comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY) != NULL);
g_list_free (selected);
@@ -1216,7 +1216,7 @@ on_save_as (EPopup *ep, EPopupItem *pitem, void *data)
char *filename;
char *ical_string;
ECalendarViewEvent *event;
-
+
selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
@@ -1224,7 +1224,7 @@ on_save_as (EPopup *ep, EPopupItem *pitem, void *data)
filename = e_file_dialog_save (_("Save as..."), NULL);
if (filename == NULL)
return;
-
+
event = (ECalendarViewEvent *) selected->data;
ical_string = e_cal_get_component_as_string (event->comp_data->client, event->comp_data->icalcomp);
if (ical_string == NULL) {
@@ -1267,19 +1267,19 @@ transfer_item_to (ECalendarViewEvent *event, ECal *dest_client, gboolean remove_
char *new_uid;
icalcomponent *orig_icalcomp;
icalproperty *icalprop;
-
+
uid = icalcomponent_get_uid (event->comp_data->icalcomp);
/* put the new object into the destination calendar */
if (e_cal_get_object (dest_client, uid, NULL, &orig_icalcomp, NULL)) {
icalcomponent_free (orig_icalcomp);
-
-
- if (!e_cal_modify_object (dest_client, event->comp_data->icalcomp, CALOBJ_MOD_ALL, NULL))
+
+
+ if (!e_cal_modify_object (dest_client, event->comp_data->icalcomp, CALOBJ_MOD_ALL, NULL))
return;
} else {
orig_icalcomp = icalcomponent_new_clone (event->comp_data->icalcomp);
-
+
icalprop = icalproperty_new_x ("1");
icalproperty_set_x_name (icalprop, "X-EVOLUTION-MOVE-CALENDAR");
icalcomponent_add_property (orig_icalcomp, icalprop);
@@ -1306,7 +1306,7 @@ transfer_item_to (ECalendarViewEvent *event, ECal *dest_client, gboolean remove_
/* remove the item from the source calendar */
if (remove_item) {
if (e_cal_util_component_is_instance (event->comp_data->icalcomp) || e_cal_util_component_is_instance (event->comp_data->icalcomp))
- e_cal_remove_object_with_mod (event->comp_data->client, uid,
+ e_cal_remove_object_with_mod (event->comp_data->client, uid,
NULL, CALOBJ_MOD_ALL, NULL);
else
e_cal_remove_object (event->comp_data->client, uid, NULL);
@@ -1389,7 +1389,7 @@ on_meeting (EPopup *ep, EPopupItem *pitem, void *data)
static void
set_attendee_status_for_delegate (icalcomponent *icalcomp, ECal *client)
{
- icalproperty *prop;
+ icalproperty *prop;
icalparameter *param;
char *address = NULL;
ECalComponent *comp;
@@ -1397,9 +1397,9 @@ set_attendee_status_for_delegate (icalcomponent *icalcomp, ECal *client)
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (icalcomp));
-
- address = itip_get_comp_attendee (comp, client);
-
+
+ address = itip_get_comp_attendee (comp, client);
+
for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
prop;
@@ -1412,17 +1412,17 @@ set_attendee_status_for_delegate (icalcomponent *icalcomp, ECal *client)
param = icalparameter_new_partstat (ICAL_PARTSTAT_DELEGATED);
icalproperty_set_parameter (prop, param);
-
+
found = TRUE;
break;
- }
+ }
}
/* We couldn find the attendee in the component, so add a new attendee */
if (!found) {
char *temp = g_strdup_printf ("MAILTO:%s", address);
-
+
prop = icalproperty_new_attendee ((const char *) temp);
icalcomponent_add_property (icalcomp, prop);
@@ -1457,7 +1457,7 @@ on_delegate (EPopup *ep, EPopupItem *pitem, void *data)
selected = e_calendar_view_get_selected_events (cal_view);
if (selected) {
ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
-
+
clone = icalcomponent_new_clone (event->comp_data->icalcomp);
set_attendee_status_for_delegate (clone, event->comp_data->client);
@@ -1552,7 +1552,7 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
ECal *client;
char *new_uid;
ECalComponentId *id = NULL;
-
+
selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
return;
@@ -1570,13 +1570,13 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
id = e_cal_component_get_id (comp);
-
+
/* For the unrecurred instance we duplicate the original object,
create a new uid for it, get rid of the recurrence rules, and set
the start & end times to the instances times. */
new_comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (new_comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
+
new_uid = e_cal_component_gen_uid ();
e_cal_component_set_uid (new_comp, new_uid);
g_free (new_uid);
@@ -1600,7 +1600,7 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
/* Now update both ECalComponents. Note that we do this last since at
* present the updates happen synchronously so our event may disappear.
*/
-
+
if (!e_cal_remove_object_with_mod (client, id->uid, id->rid, CALOBJ_MOD_THIS,
NULL))
g_message ("on_unrecur_appointment(): Could not remove the old object!");
@@ -1665,7 +1665,7 @@ static EPopupItem ecv_main_items [] = {
{ E_POPUP_BAR, "60." },
/* FIXME: hook in this somehow */
{ E_POPUP_SUBMENU, "60.view", N_("_Current View") },
-
+
{ E_POPUP_ITEM, "61.today", N_("Select T_oday"), on_goto_today, NULL, "go-today" },
{ E_POPUP_ITEM, "62.todate", N_("_Select Date..."), on_goto_date, NULL, GTK_STOCK_JUMP_TO },
};
@@ -1762,7 +1762,7 @@ e_calendar_view_create_popup_menu (ECalendarView *cal_view)
return e_popup_create_menu_once((EPopup *)ep, (EPopupTarget *)t, 0);
}
-void
+void
e_calendar_view_open_event (ECalendarView *cal_view)
{
GList *selected;
@@ -1815,18 +1815,18 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view,
g_warning ("Default client not loaded \n");
return;
}
-
+
if (e_cal_is_read_only (default_client, &readonly, NULL) && readonly) {
GtkWidget *widget;
-
+
widget = e_error_new (NULL, "calendar:prompt-read-only-cal", NULL);
-
- g_signal_connect ((GtkDialog *)widget, "response", G_CALLBACK (gtk_widget_destroy),
+
+ g_signal_connect ((GtkDialog *)widget, "response", G_CALLBACK (gtk_widget_destroy),
widget);
gtk_widget_show (widget);
return;
}
-
+
dt.value = &itt;
if (all_day)
dt.tzid = NULL;
@@ -1873,7 +1873,7 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view,
flags |= COMP_EDITOR_MEETING;
flags |= COMP_EDITOR_USER_ORG;
}
-
+
open_event_with_flags (cal_view, default_client,
icalcomp, flags);
@@ -2011,7 +2011,7 @@ e_calendar_view_edit_appointment (ECalendarView *cal_view,
gboolean meeting)
{
guint32 flags = 0;
-
+
g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
g_return_if_fail (E_IS_CAL (client));
g_return_if_fail (icalcomp != NULL);
@@ -2025,7 +2025,7 @@ e_calendar_view_edit_appointment (ECalendarView *cal_view,
g_object_unref (comp);
}
-
+
open_event_with_flags (cal_view, client, icalcomp, flags);
}
@@ -2056,7 +2056,7 @@ tooltip_grab (GtkWidget *tooltip, GdkEventKey *event, ECalendarView *view)
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
gtk_widget_destroy (widget);
g_object_set_data (G_OBJECT (view), "tooltip-window", NULL);
-
+
return FALSE;
}
@@ -2075,7 +2075,7 @@ get_label (struct icaltimetype *tt, icaltimezone *f_zone, icaltimezone *t_zone)
return g_strdup (buffer);
}
-void
+void
e_calendar_view_move_tip (GtkWidget *widget, int x, int y)
{
GtkRequisition requisition;
@@ -2083,7 +2083,7 @@ e_calendar_view_move_tip (GtkWidget *widget, int x, int y)
GdkScreen *screen;
GdkScreen *pointer_screen;
gint monitor_num, px, py;
- GdkRectangle monitor;
+ GdkRectangle monitor;
screen = gtk_widget_get_screen (widget);
@@ -2093,7 +2093,7 @@ e_calendar_view_move_tip (GtkWidget *widget, int x, int y)
gdk_display_get_pointer (gdk_screen_get_display (screen),
&pointer_screen, &px, &py, NULL);
- if (pointer_screen != screen)
+ if (pointer_screen != screen)
{
px = x;
py = y;
@@ -2110,10 +2110,10 @@ e_calendar_view_move_tip (GtkWidget *widget, int x, int y)
y = y - h - 36;
gtk_window_move (GTK_WINDOW (widget), x, y);
- gtk_widget_show (widget);
+ gtk_widget_show (widget);
}
-/*
+/*
* It is expected to show the tooltips in this below format
*
* <B>SUBJECT OF THE MEETING</B>
@@ -2128,7 +2128,7 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data)
GtkWidget *label, *box, *hbox, *ebox, *frame;
const char *str;
char *tmp, *tmp1, *tmp2;
- ECalComponentOrganizer organiser;
+ ECalComponentOrganizer organiser;
ECalComponentDateTime dtstart, dtend;
icalcomponent *clone_comp;
time_t t_start, t_end;
@@ -2136,7 +2136,7 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data)
GtkStyle *style = gtk_widget_get_default_style ();
GtkWidget *widget = (GtkWidget *) g_object_get_data (G_OBJECT (data->cal_view), "tooltip-window");
ECalComponent *newcomp = e_cal_component_new ();
- icaltimezone *zone, *default_zone;
+ icaltimezone *zone, *default_zone;
ECal *client = NULL;
gboolean free_text = FALSE;
@@ -2181,21 +2181,21 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data)
gtk_container_add ((GtkContainer *)ebox, hbox);
gtk_widget_modify_bg (ebox, GTK_STATE_NORMAL, &(style->bg[GTK_STATE_SELECTED]));
gtk_widget_modify_fg (label, GTK_STATE_NORMAL, &(style->text[GTK_STATE_SELECTED]));
-
+
gtk_box_pack_start ((GtkBox *)box, ebox, FALSE, FALSE, 0);
g_free (tmp);
-
+
e_cal_component_get_organizer (newcomp, &organiser);
if (organiser.cn) {
- char *ptr ;
+ char *ptr ;
ptr = strchr(organiser.value, ':');
-
+
if (ptr) {
ptr++;
/* To Translators: It will display "Organiser: NameOfTheUser <email@ofuser.com>" */
tmp = g_strdup_printf (_("Organizer: %s <%s>"), organiser.cn, ptr);
}
- else
+ else
/* With SunOne accouts, there may be no ':' in organiser.value*/
tmp = g_strdup_printf (_("Organizer: %s"), organiser.cn);
@@ -2208,7 +2208,7 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data)
g_free (tmp);
}
-
+
e_cal_component_get_location (newcomp, &str);
if (str) {
@@ -2225,24 +2225,24 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data)
}
e_cal_component_get_dtstart (newcomp, &dtstart);
e_cal_component_get_dtend (newcomp, &dtend);
-
+
if (dtstart.tzid) {
zone = icalcomponent_get_timezone (e_cal_component_get_icalcomponent (newcomp), dtstart.tzid);
- if (!zone)
+ if (!zone)
e_cal_get_timezone (client, dtstart.tzid, &zone, NULL);
if (!zone)
zone = default_zone;
-
+
} else {
zone = NULL;
}
t_start = icaltime_as_timet_with_zone (*dtstart.value, zone);
t_end = icaltime_as_timet_with_zone (*dtend.value, zone);
-
+
tmp1 = get_label(dtstart.value, zone, default_zone);
tmp = calculate_time (t_start, t_end);
-
+
/* To Translators: It will display "Time: ActualStartDateAndTime (DurationOfTheMeeting)"*/
tmp2 = g_strdup_printf(_("Time: %s %s"), tmp1, tmp);
hbox = gtk_hbox_new (FALSE, 0);
@@ -2250,7 +2250,7 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data)
ebox = gtk_event_box_new ();
gtk_container_add ((GtkContainer *)ebox, hbox);
gtk_box_pack_start ((GtkBox *)box, ebox, FALSE, FALSE, 0);
-
+
g_free (tmp);
g_free (tmp2);
g_free (tmp1);
@@ -2258,12 +2258,12 @@ e_calendar_view_get_tooltips (ECalendarViewEventData *data)
pevent->tooltip = gtk_window_new (GTK_WINDOW_POPUP);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type ((GtkFrame *)frame, GTK_SHADOW_IN);
-
+
gtk_window_move ((GtkWindow *)pevent->tooltip, pevent->x +16, pevent->y+16);
gtk_container_add ((GtkContainer *)frame, box);
gtk_container_add ((GtkContainer *)pevent->tooltip, frame);
-
- gtk_widget_show_all (pevent->tooltip);
+
+ gtk_widget_show_all (pevent->tooltip);
e_calendar_view_move_tip (pevent->tooltip, pevent->x +16, pevent->y+16);
@@ -2320,7 +2320,7 @@ e_calendar_view_get_icalcomponent_summary (ECal *ecal, icalcomponent *icalcomp,
struct icaltimetype dtstart, dtnow;
icalcomponent *item_icalcomp = NULL;
- if (e_cal_get_object (ecal,
+ if (e_cal_get_object (ecal,
icalcomponent_get_uid (icalcomp),
icalcomponent_get_relcalid (icalcomp),
&item_icalcomp,
@@ -2345,8 +2345,8 @@ draw_curved_rectangle (cairo_t *cr, double x0, double y0,
double radius)
{
double x1, y1;
-
- x1 = x0 + rect_width;
+
+ x1 = x0 + rect_width;
y1 = y0 + rect_height;
if (!rect_width || !rect_height)
diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h
index eb887b1ce5..f25366d392 100644
--- a/calendar/gui/e-calendar-view.h
+++ b/calendar/gui/e-calendar-view.h
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Rodrigo Moya <rodrigo@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -56,7 +56,7 @@ typedef enum {
E_CAL_VIEW_MOVE_LEFT,
E_CAL_VIEW_MOVE_RIGHT,
E_CAL_VIEW_MOVE_PAGE_UP,
- E_CAL_VIEW_MOVE_PAGE_DOWN
+ E_CAL_VIEW_MOVE_PAGE_DOWN
} ECalViewMoveDirection;
#define E_CALENDAR_VIEW_EVENT_FIELDS \
@@ -70,12 +70,12 @@ typedef enum {
GtkWidget *tooltip; \
gint timeout; \
GdkColor *color; \
- gint x,y;
+ gint x,y;
typedef struct {
E_CALENDAR_VIEW_EVENT_FIELDS
} ECalendarViewEvent;
-
+
typedef struct _ECalendarView ECalendarView;
typedef struct _ECalendarViewClass ECalendarViewClass;
typedef struct _ECalendarViewPrivate ECalendarViewPrivate;
@@ -143,7 +143,7 @@ void e_calendar_view_delete_selected_occurrence (ECalendarView *cal_vi
GtkMenu *e_calendar_view_create_popup_menu (ECalendarView *cal_view);
-void e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
+void e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart,
icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas);
void e_calendar_view_new_appointment_for (ECalendarView *cal_view,
time_t dtstart,
diff --git a/calendar/gui/e-cell-date-edit-config.c b/calendar/gui/e-cell-date-edit-config.c
index f894da0e2b..ddccce408e 100644
--- a/calendar/gui/e-cell-date-edit-config.c
+++ b/calendar/gui/e-cell-date-edit-config.c
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -28,7 +28,7 @@ struct _ECellDateEditConfigPrivate {
ECellDateEdit *cell;
EMiniCalendarConfig *mini_config;
-
+
GList *notifications;
};
@@ -46,7 +46,7 @@ e_cell_date_edit_config_set_property (GObject *object, guint property_id, const
ECellDateEditConfig *view_config;
view_config = E_CELL_DATE_EDIT_CONFIG (object);
-
+
switch (property_id) {
case PROP_CELL:
e_cell_date_edit_config_set_cell (view_config, g_value_get_object (value));
@@ -63,7 +63,7 @@ e_cell_date_edit_config_get_property (GObject *object, guint property_id, GValue
ECellDateEditConfig *view_config;
view_config = E_CELL_DATE_EDIT_CONFIG (object);
-
+
switch (property_id) {
case PROP_CELL:
g_value_set_object (value, e_cell_date_edit_config_get_cell (view_config));
@@ -78,9 +78,9 @@ static void
e_cell_date_edit_config_dispose (GObject *object)
{
ECellDateEditConfig *view_config = E_CELL_DATE_EDIT_CONFIG (object);
-
+
e_cell_date_edit_config_set_cell (view_config, NULL);
-
+
if (G_OBJECT_CLASS (e_cell_date_edit_config_parent_class)->dispose)
G_OBJECT_CLASS (e_cell_date_edit_config_parent_class)->dispose (object);
}
@@ -90,11 +90,11 @@ e_cell_date_edit_config_finalize (GObject *object)
{
ECellDateEditConfig *view_config = E_CELL_DATE_EDIT_CONFIG (object);
ECellDateEditConfigPrivate *priv;
-
+
priv = view_config->priv;
g_free (priv);
-
+
if (G_OBJECT_CLASS (e_cell_date_edit_config_parent_class)->finalize)
G_OBJECT_CLASS (e_cell_date_edit_config_parent_class)->finalize (object);
}
@@ -104,7 +104,7 @@ e_cell_date_edit_config_class_init (ECellDateEditConfigClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *spec;
-
+
/* Method override */
gobject_class->set_property = e_cell_date_edit_config_set_property;
gobject_class->get_property = e_cell_date_edit_config_get_property;
@@ -127,14 +127,14 @@ ECellDateEditConfig *
e_cell_date_edit_config_new (ECellDateEdit *cell)
{
ECellDateEditConfig *view_config;
-
+
view_config = g_object_new (e_cell_date_edit_config_get_type (), "cell", cell, NULL);
return view_config;
}
ECellDateEdit *
-e_cell_date_edit_config_get_cell (ECellDateEditConfig *view_config)
+e_cell_date_edit_config_get_cell (ECellDateEditConfig *view_config)
{
ECellDateEditConfigPrivate *priv;
@@ -142,17 +142,17 @@ e_cell_date_edit_config_get_cell (ECellDateEditConfig *view_config)
g_return_val_if_fail (E_IS_CELL_DATE_EDIT_CONFIG (view_config), NULL);
priv = view_config->priv;
-
+
return priv->cell;
}
static void
-set_timezone (ECellDateEdit *cell)
+set_timezone (ECellDateEdit *cell)
{
ECellDateEditText *cell_text;
ECellPopup *cell_popup;
icaltimezone *zone;
-
+
zone = calendar_config_get_icaltimezone ();
cell_popup = E_CELL_POPUP (cell);
@@ -165,14 +165,14 @@ timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer
{
ECellDateEditConfig *view_config = data;
ECellDateEditConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_timezone (priv->cell);
}
static void
-set_twentyfour_hour (ECellDateEdit *cell)
+set_twentyfour_hour (ECellDateEdit *cell)
{
ECellDateEditText *cell_text;
ECellPopup *cell_popup;
@@ -196,14 +196,14 @@ twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gp
{
ECellDateEditConfig *view_config = data;
ECellDateEditConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_twentyfour_hour (priv->cell);
}
static void
-set_range (ECellDateEdit *cell)
+set_range (ECellDateEdit *cell)
{
int start_hour, end_hour;
@@ -219,7 +219,7 @@ set_range (ECellDateEdit *cell)
start_hour = end_hour;
/* We use the default 0 - 24 now. */
-#if 0
+#if 0
g_object_set (G_OBJECT (cell),
"lower_hour", start_hour,
"upper_hour", end_hour,
@@ -232,9 +232,9 @@ day_start_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpo
{
ECellDateEditConfig *view_config = data;
ECellDateEditConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_range (priv->cell);
}
@@ -243,9 +243,9 @@ day_end_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpoin
{
ECellDateEditConfig *view_config = data;
ECellDateEditConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_range (priv->cell);
}
@@ -254,24 +254,24 @@ day_end_minute_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpo
{
ECellDateEditConfig *view_config = data;
ECellDateEditConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_range (priv->cell);
}
void
-e_cell_date_edit_config_set_cell (ECellDateEditConfig *view_config, ECellDateEdit *cell)
+e_cell_date_edit_config_set_cell (ECellDateEditConfig *view_config, ECellDateEdit *cell)
{
ECellDateEditConfigPrivate *priv;
guint not;
GList *l;
-
+
g_return_if_fail (view_config != NULL);
g_return_if_fail (E_IS_CELL_DATE_EDIT_CONFIG (view_config));
priv = view_config->priv;
-
+
if (priv->cell) {
g_object_unref (priv->cell);
priv->cell = NULL;
@@ -281,7 +281,7 @@ e_cell_date_edit_config_set_cell (ECellDateEditConfig *view_config, ECellDateEdi
g_object_unref (priv->mini_config);
priv->mini_config = NULL;
}
-
+
for (l = priv->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
@@ -291,17 +291,17 @@ e_cell_date_edit_config_set_cell (ECellDateEditConfig *view_config, ECellDateEdi
/* If the new view is NULL, return right now */
if (!cell)
return;
-
+
priv->cell = g_object_ref (cell);
/* Time zone */
set_timezone (cell);
-
+
not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* 24 Hour format */
- set_twentyfour_hour (cell);
+ set_twentyfour_hour (cell);
not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, view_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
@@ -317,5 +317,5 @@ e_cell_date_edit_config_set_cell (ECellDateEditConfig *view_config, ECellDateEdi
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* The mini calendar */
- priv->mini_config = e_mini_calendar_config_new (E_CALENDAR (cell->calendar));
+ priv->mini_config = e_mini_calendar_config_new (E_CALENDAR (cell->calendar));
}
diff --git a/calendar/gui/e-cell-date-edit-config.h b/calendar/gui/e-cell-date-edit-config.h
index 1391650396..c42260b956 100644
--- a/calendar/gui/e-cell-date-edit-config.h
+++ b/calendar/gui/e-cell-date-edit-config.h
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -31,7 +31,7 @@ G_BEGIN_DECLS
#define E_CELL_DATE_EDIT_CONFIG(obj) GTK_CHECK_CAST (obj, e_cell_date_edit_config_get_type (), ECellDateEditConfig)
#define E_CELL_DATE_EDIT_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_cell_date_edit_config_get_type (), ECellDateEditConfigClass)
#define E_IS_CELL_DATE_EDIT_CONFIG(obj) GTK_CHECK_TYPE (obj, e_cell_date_edit_config_get_type ())
-
+
typedef struct _ECellDateEditConfig ECellDateEditConfig;
typedef struct _ECellDateEditConfigClass ECellDateEditConfigClass;
typedef struct _ECellDateEditConfigPrivate ECellDateEditConfigPrivate;
diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c
index b69b5915c2..9aedf58c42 100644
--- a/calendar/gui/e-cell-date-edit-text.c
+++ b/calendar/gui/e-cell-date-edit-text.c
@@ -35,7 +35,7 @@
#include <unistd.h>
#include <string.h>
#include <libgnomeui/gnome-messagebox.h>
-#include <libgnomeui/gnome-stock-icons.h>
+#include <libgnomeui/gnome-stock-icons.h>
#include <glib/gi18n.h>
#include <libedataserver/e-time-utils.h>
#include <libedataserver/e-data-server-util.h>
@@ -219,7 +219,7 @@ e_cell_date_edit_text_new (const char *fontname,
ECellDateEditText *ecd = g_object_new (e_cell_date_edit_text_get_type (), NULL);
e_cell_text_construct (E_CELL_TEXT (ecd), fontname, justify);
-
+
return (ECell *) ecd;
}
diff --git a/calendar/gui/e-comp-editor-registry.c b/calendar/gui/e-comp-editor-registry.c
index 19438d0301..609f254243 100644
--- a/calendar/gui/e-comp-editor-registry.c
+++ b/calendar/gui/e-comp-editor-registry.c
@@ -64,7 +64,7 @@ e_comp_editor_registry_dispose (GObject *obj)
reg = E_COMP_EDITOR_REGISTRY (obj);
priv = reg->priv;
-
+
if (priv->editors) {
g_hash_table_destroy (priv->editors);
priv->editors = NULL;
@@ -122,14 +122,14 @@ e_comp_editor_registry_add (ECompEditorRegistry *reg, CompEditor *editor, gboole
ECompEditorRegistryData *rdata;
ECalComponent *comp;
const char *uid;
-
+
g_return_if_fail (reg != NULL);
g_return_if_fail (E_IS_COMP_EDITOR_REGISTRY (reg));
g_return_if_fail (editor != NULL);
g_return_if_fail (IS_COMP_EDITOR (editor));
priv = reg->priv;
-
+
comp = comp_editor_get_comp (editor);
e_cal_component_get_uid (comp, &uid);
@@ -150,7 +150,7 @@ e_comp_editor_registry_find (ECompEditorRegistry *reg, const char *uid)
{
ECompEditorRegistryPrivate *priv;
ECompEditorRegistryData *rdata;
-
+
g_return_val_if_fail (reg != NULL, NULL);
g_return_val_if_fail (E_IS_COMP_EDITOR_REGISTRY (reg), NULL);
g_return_val_if_fail (uid != NULL, NULL);
@@ -160,7 +160,7 @@ e_comp_editor_registry_find (ECompEditorRegistry *reg, const char *uid)
rdata = g_hash_table_lookup (priv->editors, uid);
if (rdata != NULL)
return rdata->editor;
-
+
return NULL;
}
@@ -172,16 +172,16 @@ foreach_close_cb (gpointer key, gpointer value, gpointer data)
rdata = value;
g_signal_handlers_block_matched (rdata->editor, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, data);
-
+
comp_editor_focus (rdata->editor);
if (!comp_editor_close (rdata->editor)) {
g_signal_handlers_unblock_matched (rdata->editor, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, data);
return FALSE;
}
-
+
g_free (rdata->uid);
g_free (rdata);
-
+
return TRUE;
}
@@ -189,7 +189,7 @@ gboolean
e_comp_editor_registry_close_all (ECompEditorRegistry *reg)
{
ECompEditorRegistryPrivate *priv;
-
+
g_return_val_if_fail (reg != NULL, FALSE);
g_return_val_if_fail (E_IS_COMP_EDITOR_REGISTRY (reg), FALSE);
@@ -198,12 +198,12 @@ e_comp_editor_registry_close_all (ECompEditorRegistry *reg)
g_hash_table_foreach_remove (priv->editors, foreach_close_cb, reg);
if (g_hash_table_size (priv->editors) != 0)
return FALSE;
-
+
return TRUE;
}
static void
-editor_destroy_cb (gpointer data, GObject *where_object_was)
+editor_destroy_cb (gpointer data, GObject *where_object_was)
{
ECompEditorRegistryData *rdata = data;
diff --git a/calendar/gui/e-date-edit-config.c b/calendar/gui/e-date-edit-config.c
index f3c9895fe7..bc3752f3ca 100644
--- a/calendar/gui/e-date-edit-config.c
+++ b/calendar/gui/e-date-edit-config.c
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -43,7 +43,7 @@ e_date_edit_config_set_property (GObject *object, guint property_id, const GValu
EDateEditConfig *edit_config;
edit_config = E_DATE_EDIT_CONFIG (object);
-
+
switch (property_id) {
case PROP_EDIT:
e_date_edit_config_set_edit (edit_config, g_value_get_object (value));
@@ -60,7 +60,7 @@ e_date_edit_config_get_property (GObject *object, guint property_id, GValue *val
EDateEditConfig *edit_config;
edit_config = E_DATE_EDIT_CONFIG (object);
-
+
switch (property_id) {
case PROP_EDIT:
g_value_set_object (value, e_date_edit_config_get_edit (edit_config));
@@ -75,9 +75,9 @@ static void
e_date_edit_config_dispose (GObject *object)
{
EDateEditConfig *edit_config = E_DATE_EDIT_CONFIG (object);
-
+
e_date_edit_config_set_edit (edit_config, NULL);
-
+
if (G_OBJECT_CLASS (e_date_edit_config_parent_class)->dispose)
G_OBJECT_CLASS (e_date_edit_config_parent_class)->dispose (object);
}
@@ -87,11 +87,11 @@ e_date_edit_config_finalize (GObject *object)
{
EDateEditConfig *edit_config = E_DATE_EDIT_CONFIG (object);
EDateEditConfigPrivate *priv;
-
+
priv = edit_config->priv;
g_free (priv);
-
+
if (G_OBJECT_CLASS (e_date_edit_config_parent_class)->finalize)
G_OBJECT_CLASS (e_date_edit_config_parent_class)->finalize (object);
}
@@ -101,7 +101,7 @@ e_date_edit_config_class_init (EDateEditConfigClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *spec;
-
+
/* Method override */
gobject_class->set_property = e_date_edit_config_set_property;
gobject_class->get_property = e_date_edit_config_get_property;
@@ -124,14 +124,14 @@ EDateEditConfig *
e_date_edit_config_new (EDateEdit *date_edit)
{
EDateEditConfig *edit_config;
-
+
edit_config = g_object_new (e_date_edit_config_get_type (), "edit", date_edit, NULL);
return edit_config;
}
EDateEdit *
-e_date_edit_config_get_edit (EDateEditConfig *edit_config)
+e_date_edit_config_get_edit (EDateEditConfig *edit_config)
{
EDateEditConfigPrivate *priv;
@@ -139,14 +139,14 @@ e_date_edit_config_get_edit (EDateEditConfig *edit_config)
g_return_val_if_fail (E_IS_DATE_EDIT_CONFIG (edit_config), NULL);
priv = edit_config->priv;
-
+
return priv->edit;
}
static void
-set_week_start (EDateEdit *date_edit)
+set_week_start (EDateEdit *date_edit)
{
- int week_start_day;
+ int week_start_day;
week_start_day = calendar_config_get_week_start_day ();
@@ -161,14 +161,14 @@ week_start_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointe
{
EDateEditConfig *edit_config = data;
EDateEditConfigPrivate *priv;
-
+
priv = edit_config->priv;
-
+
set_week_start (priv->edit);
}
static void
-set_twentyfour_hour (EDateEdit *date_edit)
+set_twentyfour_hour (EDateEdit *date_edit)
{
gboolean use_24_hour;
@@ -182,14 +182,14 @@ twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gp
{
EDateEditConfig *edit_config = data;
EDateEditConfigPrivate *priv;
-
+
priv = edit_config->priv;
-
+
set_twentyfour_hour (priv->edit);
}
static void
-set_dnav_show_week_no (EDateEdit *date_edit)
+set_dnav_show_week_no (EDateEdit *date_edit)
{
gboolean show_week_no;
@@ -203,28 +203,28 @@ dnav_show_week_no_changed_cb (GConfClient *client, guint id, GConfEntry *entry,
{
EDateEditConfig *edit_config = data;
EDateEditConfigPrivate *priv;
-
+
priv = edit_config->priv;
-
+
set_dnav_show_week_no (priv->edit);
}
void
-e_date_edit_config_set_edit (EDateEditConfig *edit_config, EDateEdit *date_edit)
+e_date_edit_config_set_edit (EDateEditConfig *edit_config, EDateEdit *date_edit)
{
EDateEditConfigPrivate *priv;
guint not;
GList *l;
-
+
g_return_if_fail (edit_config != NULL);
g_return_if_fail (E_IS_DATE_EDIT_CONFIG (edit_config));
priv = edit_config->priv;
-
+
if (priv->edit) {
g_object_unref (priv->edit);
priv->edit = NULL;
}
-
+
for (l = priv->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
@@ -234,17 +234,17 @@ e_date_edit_config_set_edit (EDateEditConfig *edit_config, EDateEdit *date_edit)
/* If the new edit is NULL, return right now */
if (!date_edit)
return;
-
+
priv->edit = g_object_ref (date_edit);
/* Week start */
- set_week_start (date_edit);
+ set_week_start (date_edit);
not = calendar_config_add_notification_week_start_day (week_start_changed_cb, edit_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* 24 Hour format */
- set_twentyfour_hour (date_edit);
+ set_twentyfour_hour (date_edit);
not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, edit_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
diff --git a/calendar/gui/e-date-edit-config.h b/calendar/gui/e-date-edit-config.h
index 8b675ec772..1cff692461 100644
--- a/calendar/gui/e-date-edit-config.h
+++ b/calendar/gui/e-date-edit-config.h
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
#define E_DATE_EDIT_CONFIG(obj) GTK_CHECK_CAST (obj, e_date_edit_config_get_type (), EDateEditConfig)
#define E_DATE_EDIT_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_date_edit_config_get_type (), EDateEditConfigClass)
#define E_IS_DATE_EDIT_CONFIG(obj) GTK_CHECK_TYPE (obj, e_date_edit_config_get_type ())
-
+
typedef struct _EDateEditConfig EDateEditConfig;
typedef struct _EDateEditConfigClass EDateEditConfigClass;
typedef struct _EDateEditConfigPrivate EDateEditConfigPrivate;
diff --git a/calendar/gui/e-day-view-config.c b/calendar/gui/e-day-view-config.c
index bad45b62a6..4d52f55ec6 100644
--- a/calendar/gui/e-day-view-config.c
+++ b/calendar/gui/e-day-view-config.c
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Rodrigo Moya <rodrigo@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -44,7 +44,7 @@ e_day_view_config_set_property (GObject *object, guint property_id, const GValue
EDayViewConfig *view_config;
view_config = E_DAY_VIEW_CONFIG (object);
-
+
switch (property_id) {
case PROP_VIEW:
e_day_view_config_set_view (view_config, g_value_get_object (value));
@@ -61,7 +61,7 @@ e_day_view_config_get_property (GObject *object, guint property_id, GValue *valu
EDayViewConfig *view_config;
view_config = E_DAY_VIEW_CONFIG (object);
-
+
switch (property_id) {
case PROP_VIEW:
g_value_set_object (value, e_day_view_config_get_view (view_config));
@@ -78,7 +78,7 @@ e_day_view_config_dispose (GObject *object)
EDayViewConfig *view_config = E_DAY_VIEW_CONFIG (object);
e_day_view_config_set_view (view_config, NULL);
-
+
if (G_OBJECT_CLASS (e_day_view_config_parent_class)->dispose)
G_OBJECT_CLASS (e_day_view_config_parent_class)->dispose (object);
}
@@ -88,11 +88,11 @@ e_day_view_config_finalize (GObject *object)
{
EDayViewConfig *view_config = E_DAY_VIEW_CONFIG (object);
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
g_free (priv);
-
+
if (G_OBJECT_CLASS (e_day_view_config_parent_class)->finalize)
G_OBJECT_CLASS (e_day_view_config_parent_class)->finalize (object);
}
@@ -102,7 +102,7 @@ e_day_view_config_class_init (EDayViewConfigClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *spec;
-
+
/* Method override */
gobject_class->set_property = e_day_view_config_set_property;
gobject_class->get_property = e_day_view_config_get_property;
@@ -125,14 +125,14 @@ EDayViewConfig *
e_day_view_config_new (EDayView *day_view)
{
EDayViewConfig *view_config;
-
+
view_config = g_object_new (e_day_view_config_get_type (), "view", day_view, NULL);
return view_config;
}
EDayView *
-e_day_view_config_get_view (EDayViewConfig *view_config)
+e_day_view_config_get_view (EDayViewConfig *view_config)
{
EDayViewConfigPrivate *priv;
@@ -140,16 +140,16 @@ e_day_view_config_get_view (EDayViewConfig *view_config)
g_return_val_if_fail (E_IS_DAY_VIEW_CONFIG (view_config), NULL);
priv = view_config->priv;
-
+
return priv->view;
}
static void
-set_timezone (EDayView *day_view)
+set_timezone (EDayView *day_view)
{
icaltimezone *zone;
-
- zone = calendar_config_get_icaltimezone ();
+
+ zone = calendar_config_get_icaltimezone ();
e_calendar_view_set_timezone (E_CALENDAR_VIEW (day_view), zone);
}
@@ -158,16 +158,16 @@ timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer
{
EDayViewConfig *view_config = data;
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_timezone (priv->view);
}
static void
-set_week_start (EDayView *day_view)
+set_week_start (EDayView *day_view)
{
- int week_start_day;
+ int week_start_day;
week_start_day = calendar_config_get_week_start_day ();
@@ -182,14 +182,14 @@ week_start_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointe
{
EDayViewConfig *view_config = data;
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_week_start (priv->view);
}
static void
-set_twentyfour_hour (EDayView *day_view)
+set_twentyfour_hour (EDayView *day_view)
{
gboolean use_24_hour;
@@ -206,16 +206,16 @@ twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gp
{
EDayViewConfig *view_config = data;
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_twentyfour_hour (priv->view);
}
static void
-set_working_days (EDayView *day_view)
+set_working_days (EDayView *day_view)
{
- CalWeekdays working_days;
+ CalWeekdays working_days;
working_days = calendar_config_get_working_days ();
@@ -227,19 +227,19 @@ working_days_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpoin
{
EDayViewConfig *view_config = data;
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_working_days (priv->view);
}
static void
-set_day_start_hour (EDayView *day_view)
+set_day_start_hour (EDayView *day_view)
{
int start_hour, start_minute, end_hour, end_minute;
e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute);
-
+
start_hour = calendar_config_get_day_start_hour ();
e_day_view_set_working_day (day_view, start_hour, start_minute, end_hour, end_minute);
@@ -250,19 +250,19 @@ day_start_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpo
{
EDayViewConfig *view_config = data;
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_day_start_hour (priv->view);
}
static void
-set_day_start_minute (EDayView *day_view)
+set_day_start_minute (EDayView *day_view)
{
int start_hour, start_minute, end_hour, end_minute;
e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute);
-
+
start_minute = calendar_config_get_day_start_minute ();
e_day_view_set_working_day (day_view, start_hour, start_minute, end_hour, end_minute);
@@ -273,19 +273,19 @@ day_start_minute_changed_cb (GConfClient *client, guint id, GConfEntry *entry, g
{
EDayViewConfig *view_config = data;
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_day_start_minute (priv->view);
}
static void
-set_day_end_hour (EDayView *day_view)
+set_day_end_hour (EDayView *day_view)
{
int start_hour, start_minute, end_hour, end_minute;
e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute);
-
+
end_hour = calendar_config_get_day_end_hour ();
e_day_view_set_working_day (day_view, start_hour, start_minute, end_hour, end_minute);
@@ -296,20 +296,20 @@ day_end_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpoin
{
EDayViewConfig *view_config = data;
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_day_end_hour (priv->view);
}
static void
-set_day_end_minute (EDayView *day_view)
+set_day_end_minute (EDayView *day_view)
{
int start_hour, start_minute, end_hour, end_minute;
e_day_view_get_working_day (day_view, &start_hour, &start_minute, &end_hour, &end_minute);
-
+
end_minute = calendar_config_get_day_end_minute ();
e_day_view_set_working_day (day_view, start_hour, start_minute, end_hour, end_minute);
@@ -320,16 +320,16 @@ day_end_minute_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpo
{
EDayViewConfig *view_config = data;
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_day_end_minute (priv->view);
}
static void
-set_time_divisions (EDayView *day_view)
+set_time_divisions (EDayView *day_view)
{
- int time_divisions;
+ int time_divisions;
time_divisions = calendar_config_get_time_divisions ();
@@ -341,14 +341,14 @@ time_divisions_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpo
{
EDayViewConfig *view_config = data;
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_time_divisions (priv->view);
}
static void
-set_marcus_bains (EDayView *day_view)
+set_marcus_bains (EDayView *day_view)
{
gboolean show_marcus_bains_line;
const char *dayview_color, *timebar_color;
@@ -363,14 +363,14 @@ marcus_bains_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpoin
{
EDayViewConfig *view_config = data;
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_marcus_bains (priv->view);
}
static void
-set_show_event_end (EDayView *day_view)
+set_show_event_end (EDayView *day_view)
{
gboolean show_event_end;
@@ -384,30 +384,30 @@ show_event_end_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpo
{
EDayViewConfig *view_config = data;
EDayViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_show_event_end (priv->view);
}
void
-e_day_view_config_set_view (EDayViewConfig *view_config, EDayView *day_view)
+e_day_view_config_set_view (EDayViewConfig *view_config, EDayView *day_view)
{
EDayViewConfigPrivate *priv;
gint not_1, not_2, mbnot;
guint not;
GList *l;
-
+
g_return_if_fail (view_config != NULL);
g_return_if_fail (E_IS_DAY_VIEW_CONFIG (view_config));
priv = view_config->priv;
-
+
if (priv->view) {
g_object_unref (priv->view);
priv->view = NULL;
}
-
+
for (l = priv->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
@@ -417,27 +417,27 @@ e_day_view_config_set_view (EDayViewConfig *view_config, EDayView *day_view)
/* If the new view is NULL, return right now */
if (!day_view)
return;
-
+
priv->view = g_object_ref (day_view);
/* Time zone */
set_timezone (day_view);
-
+
not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* Week start */
- set_week_start (day_view);
+ set_week_start (day_view);
not = calendar_config_add_notification_week_start_day (week_start_changed_cb, view_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* 24 Hour format */
- set_twentyfour_hour (day_view);
+ set_twentyfour_hour (day_view);
not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, view_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
+
/* Working days */
set_working_days (day_view);
diff --git a/calendar/gui/e-day-view-config.h b/calendar/gui/e-day-view-config.h
index c75069bb2f..372d50262c 100644
--- a/calendar/gui/e-day-view-config.h
+++ b/calendar/gui/e-day-view-config.h
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
#define E_DAY_VIEW_CONFIG(obj) GTK_CHECK_CAST (obj, e_day_view_config_get_type (), EDayViewConfig)
#define E_DAY_VIEW_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_day_view_config_get_type (), EDayViewConfigClass)
#define E_IS_DAY_VIEW_CONFIG(obj) GTK_CHECK_TYPE (obj, e_day_view_config_get_type ())
-
+
typedef struct _EDayViewConfig EDayViewConfig;
typedef struct _EDayViewConfigClass EDayViewConfigClass;
typedef struct _EDayViewConfigPrivate EDayViewConfigPrivate;
diff --git a/calendar/gui/e-day-view-layout.c b/calendar/gui/e-day-view-layout.c
index 4536d67952..6bd9887b5b 100644
--- a/calendar/gui/e-day-view-layout.c
+++ b/calendar/gui/e-day-view-layout.c
@@ -89,7 +89,7 @@ static void
e_day_view_layout_long_event (EDayViewEvent *event,
guint8 *grid,
gint days_shown,
- time_t *day_starts,
+ time_t *day_starts,
gint *rows_in_top_display)
{
gint start_day, end_day, free_row, day, row;
@@ -318,7 +318,7 @@ e_day_view_expand_day_event (EDayViewEvent *event,
gboolean
e_day_view_find_long_event_days (EDayViewEvent *event,
gint days_shown,
- time_t *day_starts,
+ time_t *day_starts,
gint *start_day_return,
gint *end_day_return)
{
diff --git a/calendar/gui/e-day-view-layout.h b/calendar/gui/e-day-view-layout.h
index d5aa51ab8a..b2fcec4aac 100644
--- a/calendar/gui/e-day-view-layout.h
+++ b/calendar/gui/e-day-view-layout.h
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 2001, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 6b6ffef8a9..58212f0d8e 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -125,7 +125,7 @@ e_day_view_main_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
EDayViewMainItem *dvmitem;
dvmitem = E_DAY_VIEW_MAIN_ITEM (o);
-
+
switch (arg_id){
case ARG_DAY_VIEW:
dvmitem->day_view = GTK_VALUE_POINTER (*arg);
@@ -190,7 +190,7 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE,
e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
weekday = icaltime_day_of_week (day_start_tt) - 1;
-
+
work_day = day_view->working_days & (1 << weekday);
day_x = day_view->day_offsets[day] - x;
@@ -313,7 +313,7 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
if (day_view->marcus_bains_day_view_color && gdk_color_parse (day_view->marcus_bains_day_view_color, &mb_color)) {
GdkColormap *colormap;
-
+
colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
if (gdk_colormap_alloc_color (colormap, &mb_color, TRUE, TRUE)) {
gdk_gc_set_foreground (gc, &mb_color);
@@ -322,7 +322,7 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
zone = e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view));
time_now = icaltime_current_time_with_zone (zone);
-
+
for (day = 0; day < day_view->days_shown; day++) {
day_start = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE, zone);
@@ -804,7 +804,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
-
+
gdk_gc_set_clip_mask (gc, NULL);
}
@@ -854,7 +854,7 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE,
e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
weekday = icaltime_day_of_week (day_start_tt) - 1;
-
+
work_day = day_view->working_days & (1 << weekday);
day_x = day_view->day_offsets[day] - x;
@@ -863,24 +863,24 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
if (work_day) {
cairo_save (cr);
gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING]);
-
- cairo_rectangle (cr, day_x, 0 - y, day_w,
+
+ cairo_rectangle (cr, day_x, 0 - y, day_w,
work_day_start_y - (0 - y));
cairo_fill (cr);
cairo_restore (cr);
cairo_save (cr);
gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_BG_WORKING]);
-
- cairo_rectangle (cr, day_x, work_day_start_y, day_w,
+
+ cairo_rectangle (cr, day_x, work_day_start_y, day_w,
work_day_end_y - work_day_start_y);
cairo_fill (cr);
cairo_restore (cr);
cairo_save (cr);
gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_BG_NOT_WORKING]);
-
- cairo_rectangle (cr, day_x, work_day_end_y, day_w,
+
+ cairo_rectangle (cr, day_x, work_day_end_y, day_w,
height - work_day_end_y);
cairo_fill (cr);
cairo_restore (cr);
@@ -918,17 +918,17 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
if (GTK_WIDGET_HAS_FOCUS(day_view)) {
cairo_save (cr);
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED]);
- cairo_rectangle (cr, rect_x, rect_y, rect_width,
+ cairo_rectangle (cr, rect_x, rect_y, rect_width,
rect_height);
cairo_fill (cr);
cairo_restore (cr);
} else {
cairo_save (cr);
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED]);
- cairo_rectangle (cr, rect_x, rect_y, rect_width,
+ cairo_rectangle (cr, rect_x, rect_y, rect_width,
rect_height);
cairo_fill (cr);
cairo_restore (cr);
@@ -941,9 +941,9 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
grid_x2 = day_view->day_offsets[day_view->days_shown] - x;
cairo_save(cr);
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_BG_GRID]);
-
+
for (row = 0, row_y = 0 - y;
row < day_view->rows && row_y < height;
row++, row_y += day_view->row_height) {
@@ -967,26 +967,26 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
continue;
cairo_save (cr);
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_BG_GRID]);
cairo_move_to (cr, grid_x1, grid_y1);
cairo_line_to (cr, grid_x1, grid_y2);
cairo_stroke (cr);
-
- gdk_cairo_set_source_color (cr,
+
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_BG_GRID]);
cairo_move_to (cr, grid_x1 + E_DAY_VIEW_BAR_WIDTH - 1, grid_y1);
cairo_line_to (cr, grid_x1 + E_DAY_VIEW_BAR_WIDTH - 1, grid_y2);
cairo_stroke (cr);
-
+
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_rectangle (cr, grid_x1 + 1, grid_y1,
E_DAY_VIEW_BAR_WIDTH - 2, grid_y2 - grid_y1);
-
+
cairo_fill (cr);
-
+
cairo_restore (cr);
/* Fill in the bars when the user is busy. */
@@ -1017,19 +1017,19 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
GdkColor mb_color;
cairo_save (cr);
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE]);
if (day_view->marcus_bains_day_view_color && gdk_color_parse (day_view->marcus_bains_day_view_color, &mb_color)) {
GdkColormap *colormap;
-
+
colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
if (gdk_colormap_alloc_color (colormap, &mb_color, TRUE, TRUE))
gdk_cairo_set_source_color (cr, &mb_color);
}
zone = e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view));
time_now = icaltime_current_time_with_zone (zone);
-
+
for (day = 0; day < day_view->days_shown; day++) {
day_start = icaltime_from_timet_with_zone (day_view->day_starts[day], FALSE, zone);
@@ -1048,7 +1048,7 @@ e_day_view_main_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable,
}
cairo_restore (cr);
}
- cairo_destroy (cr);
+ cairo_destroy (cr);
}
@@ -1069,8 +1069,8 @@ e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem,
cr = gdk_cairo_create (drawable);
cairo_save (cr);
-
- gdk_cairo_set_source_color (cr,
+
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND]);
grid_x = day_view->day_offsets[day] + 1 - x;
@@ -1088,7 +1088,7 @@ e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem,
colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&bg_color);
}
}
@@ -1117,7 +1117,7 @@ e_day_view_main_item_draw_events_in_vbars (EDayViewMainItem *dvmitem,
cairo_rectangle (cr, grid_x, bar_y,
E_DAY_VIEW_BAR_WIDTH - 2, bar_h);
-
+
cairo_fill (cr);
g_object_unref (comp);
@@ -1145,7 +1145,7 @@ e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem,
cr = gdk_cairo_create (drawable);
cairo_save (cr);
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND]);
for (event_num = 0; event_num < day_view->long_events->len;
@@ -1201,7 +1201,7 @@ e_day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *dvmitem,
if (bar_y1 < height && bar_y2 > 0 && bar_y2 > bar_y1) {
cairo_rectangle (cr, grid_x, bar_y1,
E_DAY_VIEW_BAR_WIDTH - 2, bar_y2 - bar_y1);
-
+
cairo_fill (cr);
}
}
@@ -1273,7 +1273,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
day_view = dvmitem->day_view;
cr = gdk_cairo_create (drawable);
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
gc = day_view->main_gc;
@@ -1299,7 +1299,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
return;
/* Get the position of the event. If it is not shown skip it.*/
- if (!e_day_view_get_event_position (day_view, day, event_num,
+ if (!e_day_view_get_event_position (day_view, day, event_num,
&item_x, &item_y,
&item_w, &item_h))
return;
@@ -1353,7 +1353,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
cairo_fill (cr);
cairo_pattern_destroy (pat);
- /* Arc at the right */
+ /* Arc at the right */
pat = cairo_pattern_create_radial (item_x + item_w - E_DAY_VIEW_BAR_WIDTH + 3, item_y + 13.5, 5.0,
item_x + item_w - E_DAY_VIEW_BAR_WIDTH + 5, item_y + 13.5, 12.0);
cairo_pattern_add_color_stop_rgba (pat, 1, 1, 1, 1, 0.3);
@@ -1422,40 +1422,40 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
cairo_move_to (cr, item_x + item_w - E_DAY_VIEW_BAR_WIDTH + 9, item_y + item_h - 6);
cairo_line_to (cr, item_x + item_w - E_DAY_VIEW_BAR_WIDTH + 10, item_y + item_h - 6);
cairo_stroke (cr);
-
+
cairo_restore (cr);
-
+
/* Black border */
cairo_save (cr);
- x0 = item_x + E_DAY_VIEW_BAR_WIDTH + 9;
+ x0 = item_x + E_DAY_VIEW_BAR_WIDTH + 9;
y0 = item_y + 10;
rect_width = MAX (item_w - E_DAY_VIEW_BAR_WIDTH - 7, 0);
rect_height = item_h - 7;
- radius = 20;
+ radius = 20;
draw_curved_rectangle (cr, x0, y0, rect_width, rect_height, radius);
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_fill (cr);
cairo_restore (cr);
-
+
/* Extra Grid lines when clicked */
cairo_save (cr);
- x0 = item_x + E_DAY_VIEW_BAR_WIDTH + 1;
+ x0 = item_x + E_DAY_VIEW_BAR_WIDTH + 1;
y0 = item_y + 2;
rect_width = MAX (item_w - E_DAY_VIEW_BAR_WIDTH - 3, 0);
rect_height = item_h - 4.;
- radius = 16;
+ radius = 16;
draw_curved_rectangle (cr, x0, y0, rect_width, rect_height, radius);
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_fill (cr);
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_BG_GRID]);
for (row_y = y0;
@@ -1469,18 +1469,18 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
}
}
cairo_restore (cr);
- }
+ }
}
/* Draw the background of the event with white to play with transparency */
cairo_save (cr);
- x0 = item_x + E_DAY_VIEW_BAR_WIDTH + 1;
+ x0 = item_x + E_DAY_VIEW_BAR_WIDTH + 1;
y0 = item_y + 2;
rect_width = MAX (item_w - E_DAY_VIEW_BAR_WIDTH - 3, 0);
rect_height = item_h - 4.;
- radius = 16;
+ radius = 16;
draw_curved_rectangle (cr, x0, y0, rect_width, rect_height, radius);
@@ -1492,12 +1492,12 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
/* Here we draw the border in event color */
cairo_save (cr);
- x0 = item_x + E_DAY_VIEW_BAR_WIDTH;
+ x0 = item_x + E_DAY_VIEW_BAR_WIDTH;
y0 = item_y + 1.;
rect_width = MAX (item_w - E_DAY_VIEW_BAR_WIDTH - 1., 0);
rect_height = item_h - 2.;
- radius = 16;
+ radius = 16;
draw_curved_rectangle (cr, x0, y0, rect_width,rect_height, radius);
cairo_set_line_width (cr, 2.);
@@ -1514,24 +1514,24 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
rect_width = item_w - E_DAY_VIEW_BAR_WIDTH - 4.5;
rect_height = item_h - 5.5;
- radius = 14;
-
+ radius = 14;
+
draw_curved_rectangle (cr, x0, y0, rect_width, rect_height, radius);
date_fraction = rect_height / day_view->row_height;
interval = event->end_minute - event->start_minute;
- if ((interval/day_view->mins_per_row) >= 2)
+ if ((interval/day_view->mins_per_row) >= 2)
short_event = FALSE;
else if ((interval%day_view->mins_per_row)==0) {
if (((event->end_minute%day_view->mins_per_row) == 0) || ((event->start_minute%day_view->mins_per_row) == 0))
- short_event = TRUE;
+ short_event = TRUE;
}
else
short_event = FALSE;
if (day_view->editing_event_day == day
- && day_view->editing_event_num == event_num)
+ && day_view->editing_event_num == event_num)
short_event = TRUE;
if (gradient) {
@@ -1558,10 +1558,10 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
cairo_set_line_width (cr, 0.5);
cairo_stroke (cr);
cairo_restore (cr);
-
+
/* Draw the right edge of the vertical bar. */
cairo_save (cr);
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_BG_GRID]);
cairo_set_line_width (cr, 0.7);
cairo_move_to (cr, item_x + E_DAY_VIEW_BAR_WIDTH - 1, item_y + 1);
@@ -1569,7 +1569,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
cairo_stroke (cr);
cairo_restore (cr);
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
/* Draw the vertical colored bar showing when the appointment
@@ -1583,7 +1583,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE
&& day_view->resize_event_day == day
&& day_view->resize_event_num == event_num) {
- resize_flag = TRUE;
+ resize_flag = TRUE;
if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE)
bar_y1 = item_y + 1;
@@ -1592,7 +1592,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
bar_y2 = item_y + item_h - 1;
end_minute = event->end_minute;
-
+
end_hour = end_minute / 60;
end_minute = end_minute % 60;
@@ -1600,7 +1600,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
&end_display_hour,
&end_resize_suffix,
&end_suffix_width);
-
+
cairo_save (cr);
cairo_rectangle (cr, item_x + E_DAY_VIEW_BAR_WIDTH + 1.75, item_y + 2.75,
item_w - E_DAY_VIEW_BAR_WIDTH - 4.5,
@@ -1612,7 +1612,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
cairo_translate (cr, item_x + item_w - E_DAY_VIEW_BAR_WIDTH - 32, item_y + item_h - 8);
end_resize_time = g_strdup_printf ("%2i:%02i",
end_display_hour, end_minute);
-
+
} else {
cairo_translate (cr, item_x + item_w - E_DAY_VIEW_BAR_WIDTH - 48, item_y + item_h - 8);
end_resize_time = g_strdup_printf ("%2i:%02i%s",
@@ -1633,7 +1633,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
if (bar_y2 > scroll_flag)
event->end_minute += day_view->mins_per_row;
- else if (bar_y2 < scroll_flag)
+ else if (bar_y2 < scroll_flag)
event->end_minute -= day_view->mins_per_row;
if (!short_event)
@@ -1673,7 +1673,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
text = g_strdup_printf
("%2i:%02i-%2i:%02i",
start_display_hour, start_minute,
- end_display_hour, end_minute);
+ end_display_hour, end_minute);
} else {
if (format_time) {
/* 24 hour format without end time. */
@@ -1687,7 +1687,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
/* 12 hour format with end time. */
text = g_strdup_printf
("%2i:%02i%s-%2i:%02i%s",
- start_display_hour, start_minute,
+ start_display_hour, start_minute,
start_suffix,
end_display_hour, end_minute, end_suffix);
} else {
@@ -1754,7 +1754,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
}
}
- gdk_cairo_set_source_color (cr,
+ gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
/* Draw the reminder & recurrence icons, if needed. */
@@ -1823,17 +1823,17 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
cairo_paint (cr);
cairo_close_path (cr);
cairo_restore (cr);
-
+
icon_x += icon_x_inc;
icon_y += icon_y_inc;
- }
+ }
if (draw_recurrence_icon) {
max_icon_w = item_x + item_w - icon_x
- E_DAY_VIEW_EVENT_BORDER_WIDTH;
max_icon_h = item_y + item_h - icon_y
- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
-
+
cairo_save (cr);
cairo_rectangle (cr, icon_x, icon_y, max_icon_w, max_icon_h);
cairo_clip (cr);
@@ -1842,7 +1842,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
cairo_paint (cr);
cairo_close_path (cr);
cairo_restore (cr);
-
+
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
@@ -1877,7 +1877,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
cairo_paint (cr);
cairo_close_path (cr);
cairo_restore (cr);
-
+
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
@@ -1893,7 +1893,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
gdk_cairo_set_source_pixbuf (cr, day_view->meeting_icon, icon_x, icon_y);
cairo_paint (cr);
cairo_restore (cr);
-
+
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
@@ -1912,7 +1912,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
- E_DAY_VIEW_EVENT_BORDER_WIDTH;
max_icon_h = item_y + item_h - icon_y
- E_DAY_VIEW_EVENT_BORDER_HEIGHT;
-
+
gdk_gc_set_clip_origin (gc, icon_x, icon_y);
if (mask != NULL)
gdk_gc_set_clip_mask (gc, mask);
@@ -1931,7 +1931,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem,
icon_x += icon_x_inc;
icon_y += icon_y_inc;
}
-
+
gdk_gc_set_clip_mask (gc, NULL);
}
diff --git a/calendar/gui/e-day-view-main-item.h b/calendar/gui/e-day-view-main-item.h
index 1162926480..7e64cb5927 100644
--- a/calendar/gui/e-day-view-main-item.h
+++ b/calendar/gui/e-day-view-main-item.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index 56642db245..5c06fe6ea7 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -141,7 +141,7 @@ e_day_view_time_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
EDayViewTimeItem *dvtmitem;
dvtmitem = E_DAY_VIEW_TIME_ITEM (o);
-
+
switch (arg_id){
case ARG_DAY_VIEW:
dvtmitem->day_view = GTK_VALUE_POINTER (*arg);
@@ -333,12 +333,12 @@ e_day_view_time_item_draw (GnomeCanvasItem *canvas_item,
struct icaltimetype time_now;
int marcus_bains_y;
GdkColor mb_color;
-
+
gdk_gc_set_foreground (gc, &day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE]);
if (day_view->marcus_bains_time_bar_color && gdk_color_parse (day_view->marcus_bains_time_bar_color, &mb_color)) {
GdkColormap *colormap;
-
+
colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
if (gdk_colormap_alloc_color (colormap, &mb_color, TRUE, TRUE)) {
gdk_gc_set_foreground (gc, &mb_color);
@@ -557,13 +557,13 @@ e_day_view_time_item_draw (GnomeCanvasItem *canvas_item,
struct icaltimetype time_now;
int marcus_bains_y;
GdkColor mb_color;
-
+
cairo_save (cr);
gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE]);
if (day_view->marcus_bains_time_bar_color && gdk_color_parse (day_view->marcus_bains_time_bar_color, &mb_color)) {
GdkColormap *colormap;
-
+
colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
if (gdk_colormap_alloc_color (colormap, &mb_color, TRUE, TRUE)) {
gdk_cairo_set_source_color (cr, &mb_color);
@@ -625,7 +625,7 @@ e_day_view_time_item_draw (GnomeCanvasItem *canvas_item,
layout = pango_cairo_create_layout (cr);
pango_layout_set_text (layout, buffer, -1);
pango_layout_get_pixel_size (layout, &minute_width, NULL);
- cairo_translate (cr, minute_x2 - minute_width, row_y + small_font_y_offset);
+ cairo_translate (cr, minute_x2 - minute_width, row_y + small_font_y_offset);
pango_cairo_update_layout (cr, layout);
pango_cairo_show_layout (cr, layout);
cairo_restore (cr);
@@ -800,7 +800,7 @@ e_day_view_time_item_show_popup_menu (EDayViewTimeItem *dvtmitem,
for (i = 0; i < num_divisions; i++) {
g_snprintf (buffer, sizeof (buffer),
- /* TO TRANSLATORS: %02i is the number of minutes; this is a context menu entry
+ /* TO TRANSLATORS: %02i is the number of minutes; this is a context menu entry
* to change the length of the time division in the calendar day view, e.g.
* a day is displayed in 24 "60 minute divisions" or 48 "30 minute divisions"
*/
diff --git a/calendar/gui/e-day-view-time-item.h b/calendar/gui/e-day-view-time-item.h
index c587db68d3..b897eb26f0 100644
--- a/calendar/gui/e-day-view-time-item.h
+++ b/calendar/gui/e-day-view-time-item.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index e348e8cc50..e04c3e2345 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -124,7 +124,7 @@ e_day_view_top_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
EDayViewTopItem *dvtitem;
dvtitem = E_DAY_VIEW_TOP_ITEM (o);
-
+
switch (arg_id){
case ARG_DAY_VIEW:
dvtitem->day_view = GTK_VALUE_POINTER (*arg);
@@ -798,7 +798,7 @@ e_day_view_top_item_draw (GnomeCanvasItem *canvas_item,
clip_rect.y = 2 - y;
clip_rect.width = day_view->day_widths[day];
clip_rect.height = item_height - 2;
-
+
gdk_gc_set_clip_rectangle (fg_gc, &clip_rect);
layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
@@ -952,7 +952,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
/* Fill the background with white to play with transparency */
cairo_save (cr);
- x0 = item_x - x + 4;
+ x0 = item_x - x + 4;
y0 = item_y + 1 - y;
rect_width = item_w - 8;
rect_height = item_h - 2;
@@ -969,7 +969,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
/* Draw the border around the event */
cairo_save (cr);
- x0 = item_x - x + 4;
+ x0 = item_x - x + 4;
y0 = item_y + 1 - y;
rect_width = item_w - 8;
rect_height = item_h - 2;
@@ -987,15 +987,15 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
cairo_save (cr);
- x0 = item_x - x + 5.5;
+ x0 = item_x - x + 5.5;
y0 = item_y + 2.5 - y;
rect_width = item_w - 11;
rect_height = item_h - 5;
- radius = 10;
+ radius = 10;
draw_curved_rectangle (cr, x0, y0, rect_width, rect_height, radius);
-
+
if (gradient){
pat = cairo_pattern_create_linear (item_x - x + 5.5, item_y + 2.5 - y,
item_x - x + 5, item_y - y + item_h + 7.5);
@@ -1155,7 +1155,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
gdk_cairo_set_source_pixbuf (cr, day_view->recurrence_icon, icon_x, icon_y);
cairo_paint (cr);
cairo_restore (cr);
-
+
icon_x -= icon_x_inc;
}
@@ -1164,7 +1164,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
gdk_cairo_set_source_pixbuf (cr, day_view->attach_icon, icon_x, icon_y);
cairo_paint (cr);
cairo_restore (cr);
-
+
icon_x -= icon_x_inc;
}
if (icon_x <= max_icon_x && e_cal_component_has_alarms (comp)) {
@@ -1172,7 +1172,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
gdk_cairo_set_source_pixbuf (cr, day_view->reminder_icon, icon_x, icon_y);
cairo_paint (cr);
cairo_restore (cr);
-
+
icon_x -= icon_x_inc;
}
@@ -1181,11 +1181,11 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem,
gdk_cairo_set_source_pixbuf (cr, day_view->meeting_icon, icon_x, icon_y);
cairo_paint (cr);
cairo_restore (cr);
-
+
icon_x -= icon_x_inc;
}
- /* draw categories icons */
+ /* draw categories icons */
e_cal_component_get_categories_list (comp, &categories_list);
for (elem = categories_list; elem; elem = elem->next) {
char *category;
@@ -1273,7 +1273,7 @@ e_day_view_top_item_draw_triangle (EDayViewTopItem *dvtitem,
gdk_cairo_set_source_color (cr, &bg_color);
} else {
gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
- }
+ }
} else {
gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
}
diff --git a/calendar/gui/e-day-view-top-item.h b/calendar/gui/e-day-view-top-item.h
index f267a98d55..2d21a42f35 100644
--- a/calendar/gui/e-day-view-top-item.h
+++ b/calendar/gui/e-day-view-top-item.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 0eccaa3922..598404b673 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -500,7 +500,7 @@ time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpo
} else {
lower = e_day_view_find_work_week_start (day_view, start_time);
}
-
+
/* See if we need to change the days shown. */
if (lower != day_view->lower)
e_day_view_recalc_day_starts (day_view, lower);
@@ -614,9 +614,9 @@ model_rows_deleted_cb (ETableModel *etm, int row, int count, gpointer user_data)
{
EDayView *day_view = E_DAY_VIEW (user_data);
int i;
-
+
e_day_view_stop_editing_event (day_view);
-
+
for (i = row + count; i > row; i--) {
gint day, event_num;
const char *uid, *rid = NULL;
@@ -638,7 +638,7 @@ model_rows_deleted_cb (ETableModel *etm, int row, int count, gpointer user_data)
if (e_day_view_find_event_from_uid (day_view, comp_data->client, uid, rid, &day, &event_num))
e_day_view_remove_event_cb (day_view, day, event_num, NULL);
}
-
+
gtk_widget_queue_draw (day_view->top_canvas);
gtk_widget_queue_draw (day_view->main_canvas);
e_day_view_queue_layout (day_view);
@@ -676,7 +676,7 @@ e_day_view_init (EDayView *day_view)
gint day;
GnomeCanvasGroup *canvas_group;
ECalModel *model;
-
+
GTK_WIDGET_SET_FLAGS (day_view, GTK_CAN_FOCUS);
day_view->long_events = g_array_new (FALSE, FALSE,
@@ -920,7 +920,7 @@ e_day_view_init (EDayView *day_view)
day_view->drag_rect_item =
gnome_canvas_item_new (canvas_group,
- gnome_canvas_rect_get_type (),
+ gnome_canvas_rect_get_type (),
"width_pixels", 1,
NULL);
gnome_canvas_item_hide (day_view->drag_rect_item);
@@ -1027,7 +1027,7 @@ e_day_view_init (EDayView *day_view)
GnomeCanvasGroup *canvas_group;
ECalModel *model;
GtkWidget *w;
-
+
GTK_WIDGET_SET_FLAGS (day_view, GTK_CAN_FOCUS);
day_view->long_events = g_array_new (FALSE, FALSE,
@@ -1093,7 +1093,7 @@ e_day_view_init (EDayView *day_view)
day_view->last_edited_comp_string = NULL;
-
+
day_view->selection_start_row = -1;
day_view->selection_start_day = -1;
day_view->selection_end_row = -1;
@@ -1129,7 +1129,7 @@ e_day_view_init (EDayView *day_view)
* Top Canvas
*/
w = gtk_vbox_new (FALSE, 0);
-
+
day_view->top_dates_canvas = e_canvas_new ();
gtk_box_pack_start (GTK_BOX (w), day_view->top_dates_canvas, TRUE, TRUE, 0);
day_view->top_canvas = e_canvas_new ();
@@ -1255,7 +1255,7 @@ e_day_view_init (EDayView *day_view)
day_view->drag_rect_item =
gnome_canvas_item_new (canvas_group,
- gnome_canvas_rect_get_type (),
+ gnome_canvas_rect_get_type (),
"width_pixels", 1,
NULL);
gnome_canvas_item_hide (day_view->drag_rect_item);
@@ -1379,7 +1379,7 @@ e_day_view_new (void)
day_view = g_object_new (e_day_view_get_type (), NULL);
e_cal_model_set_flags (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES);
-
+
return GTK_WIDGET (day_view);
}
@@ -1427,7 +1427,7 @@ e_day_view_destroy (GtkObject *object)
g_array_free (day_view->long_events, TRUE);
day_view->long_events = NULL;
}
-
+
for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++) {
if (day_view->events[day]) {
g_array_free (day_view->events[day], TRUE);
@@ -1454,9 +1454,9 @@ e_day_view_realize (GtkWidget *widget)
colormap = gtk_widget_get_colormap (widget);
/* Allocate the colors. */
-
+
e_day_view_set_colors(day_view, widget);
-
+
gdk_gc_set_colormap (day_view->main_gc, colormap);
/* Create the pixmaps. */
@@ -1464,7 +1464,7 @@ e_day_view_realize (GtkWidget *widget)
day_view->recurrence_icon = e_icon_factory_get_icon ("view-refresh", E_ICON_SIZE_MENU);
day_view->timezone_icon = e_icon_factory_get_icon ("stock_timezone", E_ICON_SIZE_MENU);
day_view->meeting_icon = e_icon_factory_get_icon ("stock_people", E_ICON_SIZE_MENU);
- day_view->attach_icon = e_icon_factory_get_icon ("mail-attachment", E_ICON_SIZE_MENU);
+ day_view->attach_icon = e_icon_factory_get_icon ("mail-attachment", E_ICON_SIZE_MENU);
/* Set the canvas item colors. */
@@ -1528,9 +1528,9 @@ e_day_view_realize (GtkWidget *widget)
colormap = gtk_widget_get_colormap (widget);
/* Allocate the colors. */
-
+
e_day_view_set_colors(day_view, widget);
-
+
gdk_gc_set_colormap (day_view->main_gc, colormap);
/* Create the pixmaps. */
@@ -1538,7 +1538,7 @@ e_day_view_realize (GtkWidget *widget)
day_view->recurrence_icon = e_icon_factory_get_icon ("view-refresh", E_ICON_SIZE_MENU);
day_view->timezone_icon = e_icon_factory_get_icon ("stock_timezone", E_ICON_SIZE_MENU);
day_view->meeting_icon = e_icon_factory_get_icon ("stock_people", E_ICON_SIZE_MENU);
- day_view->attach_icon = e_icon_factory_get_icon ("mail-attachment", E_ICON_SIZE_MENU);
+ day_view->attach_icon = e_icon_factory_get_icon ("mail-attachment", E_ICON_SIZE_MENU);
/* Set the canvas item colors. */
@@ -1611,9 +1611,9 @@ static GdkColor
e_day_view_get_text_color (EDayView *day_view, EDayViewEvent *event, GtkWidget *widget)
{
GdkColor color, bg_color;
- guint16 red, green, blue;
+ guint16 red, green, blue;
gdouble cc = 65535.0;
-
+
red = day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND].red;
green = day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND].green;
blue = day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND].blue;
@@ -1741,13 +1741,13 @@ e_day_view_style_set (GtkWidget *widget,
layout = pango_layout_new (pango_context);
/* Create the large font. */
- if (day_view->large_font_desc != NULL)
+ if (day_view->large_font_desc != NULL)
pango_font_description_free (day_view->large_font_desc);
day_view->large_font_desc = pango_font_description_copy (font_desc);
pango_font_description_set_size (day_view->large_font_desc,
E_DAY_VIEW_LARGE_FONT_PTSIZE * PANGO_SCALE);
-
+
/* Create the small fonts. */
if (day_view->small_font_desc != NULL)
pango_font_description_free (day_view->small_font_desc);
@@ -1934,13 +1934,13 @@ e_day_view_style_set (GtkWidget *widget,
layout = pango_layout_new (pango_context);
/* Create the large font. */
- if (day_view->large_font_desc != NULL)
+ if (day_view->large_font_desc != NULL)
pango_font_description_free (day_view->large_font_desc);
day_view->large_font_desc = pango_font_description_copy (font_desc);
pango_font_description_set_size (day_view->large_font_desc,
E_DAY_VIEW_LARGE_FONT_PTSIZE * PANGO_SCALE);
-
+
/* Create the small fonts. */
if (day_view->small_font_desc != NULL)
pango_font_description_free (day_view->small_font_desc);
@@ -2391,23 +2391,23 @@ e_day_view_remove_event_cb (EDayView *day_view,
static void
set_text_as_bold (EDayViewEvent *event)
{
- ECalComponent *comp;
+ ECalComponent *comp;
char *address;
GSList *attendees, *l;
ECalComponentAttendee *at = NULL;
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- address = itip_get_comp_attendee (comp, event->comp_data->client);
+ address = itip_get_comp_attendee (comp, event->comp_data->client);
e_cal_component_get_attendee_list (comp, &attendees);
for (l = attendees; l; l = l->next) {
ECalComponentAttendee *attendee = l->data;
if (g_str_equal (itip_strip_mailto (attendee->value), address)) {
- at = attendee;
+ at = attendee;
break;
- }
+ }
}
/* The attendee has not yet accepted the meeting, display the summary as bolded .
@@ -2519,8 +2519,8 @@ e_day_view_update_event_label (EDayView *day_view,
"text", text,
NULL);
-/* if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
- && e_cal_util_component_has_attendee (event->comp_data->icalcomp))
+/* if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
+ && e_cal_util_component_has_attendee (event->comp_data->icalcomp))
set_text_as_bold (event); */
if (free_text)
@@ -2555,11 +2555,11 @@ e_day_view_update_event_label (EDayView *day_view,
interval = event->end_minute - event->start_minute;
- if ((interval/day_view->mins_per_row) >= 2)
+ if ((interval/day_view->mins_per_row) >= 2)
short_event = FALSE;
else if ((interval%day_view->mins_per_row)==0) {
if (((event->end_minute%day_view->mins_per_row)==0) || ((event->start_minute%day_view->mins_per_row)==0)){
- short_event = TRUE;
+ short_event = TRUE;
}
} else
short_event = FALSE;
@@ -2575,8 +2575,8 @@ e_day_view_update_event_label (EDayView *day_view,
"text", text,
NULL);
-/* if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
- && e_cal_util_component_has_attendee (event->comp_data->icalcomp))
+/* if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
+ && e_cal_util_component_has_attendee (event->comp_data->icalcomp))
set_text_as_bold (event); */
if (free_text)
@@ -2608,8 +2608,8 @@ e_day_view_update_long_event_label (EDayView *day_view,
if (free_text)
g_free ((gchar*)summary);
-/* if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
- && e_cal_util_component_has_attendee (event->comp_data->icalcomp))
+/* if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
+ && e_cal_util_component_has_attendee (event->comp_data->icalcomp))
set_text_as_bold (event); */
}
@@ -3251,15 +3251,15 @@ e_day_view_set_marcus_bains (EDayView *day_view,
(day_view->marcus_bains_day_view_color != dayview_color) |
(day_view->marcus_bains_time_bar_color != timebar_color)) {
- if (day_view->marcus_bains_day_view_color)
+ if (day_view->marcus_bains_day_view_color)
g_free (day_view->marcus_bains_day_view_color);
- if (day_view->marcus_bains_time_bar_color)
+ if (day_view->marcus_bains_time_bar_color)
g_free (day_view->marcus_bains_time_bar_color);
-
+
day_view->show_marcus_bains_line = show_line;
- if (dayview_color)
+ if (dayview_color)
day_view->marcus_bains_day_view_color = g_strdup (dayview_color);
- else
+ else
day_view->marcus_bains_day_view_color = NULL;
if (timebar_color)
@@ -3339,7 +3339,7 @@ e_day_view_set_week_start_day (EDayView *day_view,
static void
e_day_view_recalc_work_week (EDayView *day_view)
-{
+{
time_t lower;
/* If we aren't showing the work week, just return. */
@@ -3347,7 +3347,7 @@ e_day_view_recalc_work_week (EDayView *day_view)
return;
e_day_view_recalc_work_week_days_shown (day_view);
-
+
/* If the date isn't set, just return. */
if (day_view->lower == 0 && day_view->upper == 0)
return;
@@ -3463,7 +3463,7 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
if (day_view->drag_event_num != -1)
day_view->drag_event_num = -1;
-
+
/* Convert the coords to the main canvas window, or return if the
window is not found. */
if (!e_day_view_convert_event_coords (day_view, (GdkEvent*) event,
@@ -3523,7 +3523,7 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
e_day_view_start_selection (day_view, day, -1);
e_day_view_finish_selection (day_view);
}
-
+
e_day_view_on_event_right_click (day_view, event, -1, -1);
}
@@ -3602,7 +3602,7 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
if (day_view->drag_event_num != -1)
day_view->drag_event_num = -1;
-
+
/* Convert the coords to the main canvas window, or return if the
window is not found. */
if (!e_day_view_convert_event_coords (day_view, (GdkEvent*) event,
@@ -3660,14 +3660,14 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
if (!GTK_WIDGET_HAS_FOCUS (day_view))
gtk_widget_grab_focus (GTK_WIDGET (day_view));
-
+
if ((day < day_view->selection_start_day || day > day_view->selection_end_day)
|| (day == day_view->selection_start_day && row < day_view->selection_start_row)
|| (day == day_view->selection_end_day && row > day_view->selection_end_row)) {
e_day_view_start_selection (day_view, day, row);
e_day_view_finish_selection (day_view);
}
-
+
e_day_view_on_event_right_click (day_view, event, -1, -1);
}
@@ -3723,7 +3723,7 @@ e_day_view_on_time_canvas_scroll (GtkWidget *widget,
gtk_widget_destroy (tool_window);
g_object_set_data (G_OBJECT (day_view), "tooltip-window", NULL);
}
-
+
switch (scroll->direction) {
case GDK_SCROLL_UP:
e_day_view_scroll (day_view, E_DAY_VIEW_WHEEL_MOUSE_STEP_SIZE);
@@ -3765,7 +3765,7 @@ e_day_view_on_long_event_button_press (EDayView *day_view,
e = &g_array_index (day_view->long_events, EDayViewEvent, event_num);
e_day_view_set_selected_time_range_in_top_visible (day_view, e->start, e->end);
-
+
e_day_view_on_event_right_click (day_view, event,
E_DAY_VIEW_LONG_EVENT,
event_num);
@@ -3805,7 +3805,7 @@ e_day_view_on_event_button_press (EDayView *day_view,
e = &g_array_index (day_view->events[day], EDayViewEvent, event_num);
e_day_view_set_selected_time_range_visible (day_view, e->start, e->end);
-
+
e_day_view_on_event_right_click (day_view, event,
day, event_num);
@@ -4178,14 +4178,14 @@ e_day_view_on_event_double_click (EDayView *day_view,
if (day == -1)
event = &g_array_index (day_view->long_events, EDayViewEvent,
event_num);
- else
+ else
event = &g_array_index (day_view->events[day], EDayViewEvent,
event_num);
attendee_prop = icalcomponent_get_first_property (event->comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY);
e_calendar_view_edit_appointment ((ECalendarView *)day_view,
- event->comp_data->client,
+ event->comp_data->client,
event->comp_data->icalcomp, attendee_prop ? TRUE:FALSE);
}
@@ -4195,9 +4195,9 @@ popup_destroyed_cb (gpointer data, GObject *where_object_was)
EDayView *day_view = data;
day_view->popup_event_day = -1;
- day_view->popup_event_num = -1;
+ day_view->popup_event_num = -1;
}
-
+
static void
e_day_view_show_popup_menu (EDayView *day_view,
GdkEvent *gdk_event,
@@ -4976,7 +4976,7 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
CalObjModType mod = CALOBJ_MOD_ALL;
GtkWindow *toplevel;
int is_date;
-
+
event_num = day_view->resize_event_num;
event = &g_array_index (day_view->long_events, EDayViewEvent,
event_num);
@@ -5017,7 +5017,7 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
e_cal_component_set_dtend (comp, &date);
}
-
+
e_cal_component_commit_sequence (comp);
if (e_cal_component_is_instance (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL, FALSE)) {
@@ -5047,13 +5047,13 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
e_cal_component_commit_sequence (comp);
}
}
-
+
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
-
+
out:
gnome_canvas_item_hide (day_view->resize_long_event_rect_item);
-
+
day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
g_object_unref (comp);
@@ -5157,12 +5157,12 @@ e_day_view_finish_resize (EDayView *day_view)
e_cal_component_set_exrule_list (comp, NULL);
}
}
-
+
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
e_cal_component_commit_sequence (comp);
e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
- out:
+ out:
g_object_unref (comp);
}
@@ -5216,7 +5216,7 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
CalObjModType mod = CALOBJ_MOD_ALL;
GtkWindow *toplevel;
int is_date;
-
+
event_num = day_view->resize_event_num;
event = &g_array_index (day_view->long_events, EDayViewEvent,
event_num);
@@ -5257,7 +5257,7 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
e_cal_component_set_dtend (comp, &date);
}
-
+
e_cal_component_commit_sequence (comp);
if (e_cal_component_is_instance (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL, FALSE)) {
@@ -5287,10 +5287,10 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
e_cal_component_commit_sequence (comp);
}
}
-
+
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
-
+
out:
day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
@@ -5391,12 +5391,12 @@ e_day_view_finish_resize (EDayView *day_view)
e_cal_component_set_exrule_list (comp, NULL);
}
}
-
+
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
e_cal_component_commit_sequence (comp);
e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
- out:
+ out:
g_object_unref (comp);
}
@@ -6106,14 +6106,14 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
const char *uid;
AddEventData add_event_data;
gboolean read_only = TRUE;
-
+
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (E_IS_DAY_VIEW (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
day_view = E_DAY_VIEW (widget);
keyval = event->keyval;
-
+
/* The Escape key aborts a resize operation. */
if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
if (keyval == GDK_Escape) {
@@ -6122,7 +6122,7 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
}
return FALSE;
}
-
+
/* Alt + Arrow Keys to move a selected event through time lines */
if (((event->state & GDK_SHIFT_MASK) != GDK_SHIFT_MASK)
&&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
@@ -6137,7 +6137,7 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
return e_day_view_event_move ((ECalendarView *) day_view, E_CAL_VIEW_MOVE_RIGHT);
}
- /*Go to the start/end of a work day*/
+ /*Go to the start/end of a work day*/
if ((keyval == GDK_Home)
&&((event->state & GDK_SHIFT_MASK) != GDK_SHIFT_MASK)
&&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
@@ -6152,8 +6152,8 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
e_day_view_goto_end_of_work_day (day_view);
return TRUE;
}
-
- /* In DayView, Shift+Home/End, Change the duration to the time that begins/ends the current work day */
+
+ /* In DayView, Shift+Home/End, Change the duration to the time that begins/ends the current work day */
if ((keyval == GDK_Home)
&&((event->state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
&&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
@@ -6169,7 +6169,7 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
return TRUE;
}
-
+
/* Handle the cursor keys for moving & extending the selection. */
stop_emission = TRUE;
if (event->state & GDK_SHIFT_MASK) {
@@ -6244,9 +6244,9 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
|| (event->length == 0)
|| (keyval == GDK_Tab))) {
return FALSE;
- }
+ }
- /* Add a new event covering the selected range */
+ /* Add a new event covering the selected range */
icalcomp = e_cal_model_create_component_with_defaults (model);
if (!icalcomp)
return FALSE;
@@ -6267,12 +6267,12 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
start_dt.tzid = NULL;
start_tt.is_date = 1;
end_tt.is_date = 1;
-
+
/* Editor default in day/work-week view - top canvas */
e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_TRANSPARENT);
} else {
start_dt.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
+
/* Editor default in day/work-week view - main canvas */
e_cal_component_set_transparency (comp, E_CAL_COMPONENT_TRANSP_OPAQUE);
}
@@ -6322,23 +6322,23 @@ e_day_view_key_press (GtkWidget *widget, GdkEventKey *event)
static void
e_day_view_goto_start_of_work_day (EDayView *day_view)
{
- g_return_if_fail(day_view!=NULL);
+ g_return_if_fail(day_view!=NULL);
if (day_view->selection_in_top_canvas)
return;
- else
- day_view->selection_start_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_start_hour,
+ else
+ day_view->selection_start_row =
+ e_day_view_convert_time_to_row (day_view,
+ day_view->work_day_start_hour,
day_view->work_day_start_minute);
day_view->selection_end_row = day_view->selection_start_row;
e_day_view_ensure_rows_visible (day_view,
day_view->selection_start_row,
day_view->selection_end_row);
-
+
e_day_view_update_calendar_selection_time (day_view);
-
+
gtk_widget_queue_draw (day_view->top_canvas);
gtk_widget_queue_draw (day_view->top_dates_canvas);
gtk_widget_queue_draw (day_view->main_canvas);
@@ -6353,11 +6353,11 @@ e_day_view_goto_end_of_work_day (EDayView *day_view)
return;
else
day_view->selection_start_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_end_hour-1,
+ e_day_view_convert_time_to_row (day_view,
+ day_view->work_day_end_hour-1,
day_view->work_day_end_minute+30);
day_view->selection_end_row = day_view->selection_start_row;
-
+
e_day_view_ensure_rows_visible (day_view,
day_view->selection_start_row,
day_view->selection_end_row);
@@ -6374,20 +6374,20 @@ static void
e_day_view_change_duration_to_start_of_work_day (EDayView *day_view)
{
g_return_if_fail(day_view != NULL);
-
+
if (day_view->selection_in_top_canvas)
return;
else {
/* These are never used after being set? */
gint work_start_row,work_end_row,selection_start_row,selection_end_row;
-
+
work_start_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_start_hour,
+ e_day_view_convert_time_to_row (day_view,
+ day_view->work_day_start_hour,
day_view->work_day_start_minute);
work_end_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_end_hour - 1,
+ e_day_view_convert_time_to_row (day_view,
+ day_view->work_day_end_hour - 1,
day_view->work_day_end_minute + 30);
selection_start_row = day_view->selection_start_row;
selection_end_row = day_view->selection_end_row;
@@ -6395,7 +6395,7 @@ e_day_view_change_duration_to_start_of_work_day (EDayView *day_view)
day_view->selection_end_row = work_start_row - 1;
else day_view->selection_start_row = work_start_row;
}
-
+
e_day_view_ensure_rows_visible (day_view,
day_view->selection_start_row,
day_view->selection_end_row);
@@ -6412,17 +6412,17 @@ static void
e_day_view_change_duration_to_end_of_work_day (EDayView *day_view)
{
g_return_if_fail(day_view != NULL);
-
+
if (day_view->selection_in_top_canvas)
return;
- else {
- gint work_start_row,work_end_row,selection_start_row,selection_end_row;
+ else {
+ gint work_start_row,work_end_row,selection_start_row,selection_end_row;
work_start_row =
- e_day_view_convert_time_to_row (day_view,
- day_view->work_day_start_hour,
+ e_day_view_convert_time_to_row (day_view,
+ day_view->work_day_start_hour,
day_view->work_day_start_minute);
- work_end_row = e_day_view_convert_time_to_row (day_view,
- day_view->work_day_end_hour-1,
+ work_end_row = e_day_view_convert_time_to_row (day_view,
+ day_view->work_day_end_hour-1,
day_view->work_day_end_minute+30);
selection_start_row = day_view->selection_start_row;
selection_end_row = day_view->selection_end_row;
@@ -6437,9 +6437,9 @@ e_day_view_change_duration_to_end_of_work_day (EDayView *day_view)
e_day_view_ensure_rows_visible (day_view,
day_view->selection_start_row,
day_view->selection_end_row);
-
+
e_day_view_update_calendar_selection_time (day_view);
-
+
gtk_widget_queue_draw (day_view->top_canvas);
gtk_widget_queue_draw (day_view->top_dates_canvas);
gtk_widget_queue_draw (day_view->main_canvas);
@@ -6604,7 +6604,7 @@ e_day_view_get_extreme_long_event (EDayView *day_view, gboolean first,
* @event_num_out: out value, event number of the event found.
* -1 for no event found.
*
- * Decide on which event the focus should go next.
+ * Decide on which event the focus should go next.
* if ((day_out == -1) && (event_num_out == -1)) is true, focus should go
* to day_view widget itself.
*
@@ -7046,7 +7046,7 @@ e_day_view_start_editing_event (EDayView *day_view,
"text", initial_text,
NULL);
if (initial_text)
- g_free (initial_text);
+ g_free (initial_text);
}
}
@@ -7121,7 +7121,7 @@ tooltip_get_view_event (EDayView *day_view, int day, int event_num)
} else {
pevent = &g_array_index (day_view->events[day], EDayViewEvent,
event_num);
- }
+ }
return pevent;
}
@@ -7145,7 +7145,7 @@ tooltip_destroy (EDayView *day_view, GnomeCanvasItem *item)
pevent->timeout = -1;
}
- g_object_set_data (G_OBJECT (day_view), "tooltip-window", NULL);
+ g_object_set_data (G_OBJECT (day_view), "tooltip-window", NULL);
}
}
@@ -7202,7 +7202,7 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
if (day_view->drag_event_num != -1)
day_view->drag_event_num = -1;
-
+
case GDK_BUTTON_PRESS:
tooltip_destroy (day_view, item);
/* Only let the EText handle the event while editing. */
@@ -7245,7 +7245,7 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
&event_num);
} else {
int tmp;
-
+
pos = e_day_view_convert_position_in_top_canvas (day_view,
event_x, event_y,
&tmp, &event_num);
@@ -7263,7 +7263,7 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
if (day_view->drag_event_num != -1)
break;
-
+
pevent = tooltip_get_view_event (day_view, day, event_num);
g_object_set_data (G_OBJECT (item), "event-num", GINT_TO_POINTER (event_num));
g_object_set_data (G_OBJECT (item), "event-day", GINT_TO_POINTER (day));
@@ -7278,7 +7278,7 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
data->event_num = event_num;
data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, int)) tooltip_get_view_event;
pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);
-
+
return TRUE;
}
case GDK_LEAVE_NOTIFY:
@@ -7291,11 +7291,11 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
int day = GPOINTER_TO_INT(g_object_get_data ((GObject *)item, "event-day"));
pevent = tooltip_get_view_event (day_view, day, event_num);
-
+
pevent->x = ((GdkEventMotion *)event)->x_root;
pevent->y = ((GdkEventMotion *)event)->y_root;
pevent->tooltip = (GtkWidget *)g_object_get_data (G_OBJECT (day_view), "tooltip-window");
-
+
if (pevent->tooltip) {
e_calendar_view_move_tip (pevent->tooltip, pevent->x+16, pevent->y+16);
}
@@ -7305,11 +7305,11 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
default:
break;
}
-
+
return FALSE;
}
-static gboolean
+static gboolean
e_day_view_event_move (ECalendarView *cal_view, ECalViewMoveDirection direction)
{
EDayViewEvent *event;
@@ -7335,7 +7335,7 @@ e_day_view_event_move (ECalendarView *cal_view, ECalViewMoveDirection direction)
resize_end_row = (event->end_minute - 1) / day_view->mins_per_row;
if (resize_end_row < resize_start_row)
resize_end_row = resize_start_row;
-
+
switch (direction) {
case E_CAL_VIEW_MOVE_UP:
if (resize_start_row <= 0)
@@ -7343,7 +7343,7 @@ e_day_view_event_move (ECalendarView *cal_view, ECalViewMoveDirection direction)
resize_start_row--;
resize_end_row--;
start_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_start_row);
- end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
+ end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
break;
case E_CAL_VIEW_MOVE_DOWN:
if (resize_end_row >= day_view->rows - 1)
@@ -7351,17 +7351,17 @@ e_day_view_event_move (ECalendarView *cal_view, ECalViewMoveDirection direction)
resize_start_row++;
resize_end_row++;
start_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_start_row);
- end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
+ end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
break;
case E_CAL_VIEW_MOVE_LEFT:
- if (day <= 0)
+ if (day <= 0)
return TRUE;
start_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_start_row);
end_dt = e_day_view_convert_grid_position_to_time (day_view, day, resize_end_row + 1);
start_time = icaltime_from_timet (start_dt, 0);
end_time = icaltime_from_timet (end_dt, 0);
icaltime_adjust (&start_time ,-1,0,0,0);
- icaltime_adjust (&end_time ,-1,0,0,0);
+ icaltime_adjust (&end_time ,-1,0,0,0);
start_dt = icaltime_as_timet (start_time);
end_dt = icaltime_as_timet (end_time);
break;
@@ -7373,14 +7373,14 @@ e_day_view_event_move (ECalendarView *cal_view, ECalViewMoveDirection direction)
start_time = icaltime_from_timet (start_dt, 0);
end_time = icaltime_from_timet (end_dt, 0);
icaltime_adjust (&start_time ,1,0,0,0);
- icaltime_adjust (&end_time ,1,0,0,0);
+ icaltime_adjust (&end_time ,1,0,0,0);
start_dt = icaltime_as_timet (start_time);
end_dt = icaltime_as_timet (end_time);
- break;
+ break;
default:
return FALSE;
}
-
+
e_day_view_change_event_time (day_view, start_dt, end_dt);
e_day_view_ensure_rows_visible (day_view, resize_start_row, resize_end_row);
@@ -7421,7 +7421,7 @@ e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt
/* FIXME: Should probably keep the timezone of the original start
and end times. */
date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
+
*date.value = icaltime_from_timet_with_zone (start_dt, FALSE,
e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
e_cal_component_set_dtstart (comp, &date);
@@ -7430,12 +7430,12 @@ e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt
e_cal_component_set_dtend (comp, &date);
e_cal_component_commit_sequence (comp);
-
+
if (day_view->last_edited_comp_string != NULL) {
g_free (day_view->last_edited_comp_string);
day_view->last_edited_comp_string = NULL;
}
-
+
day_view->last_edited_comp_string = e_cal_component_get_as_string (comp);
gnome_canvas_item_hide (day_view->resize_rect_item);
@@ -7456,13 +7456,13 @@ e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt
e_cal_component_set_exrule_list (comp, NULL);
}
}
-
+
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
e_cal_component_commit_sequence (comp);
e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
-out:
+out:
g_object_unref (comp);
}
#endif
@@ -7501,7 +7501,7 @@ e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt
/* FIXME: Should probably keep the timezone of the original start
and end times. */
date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
-
+
*date.value = icaltime_from_timet_with_zone (start_dt, FALSE,
e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
e_cal_component_set_dtstart (comp, &date);
@@ -7510,12 +7510,12 @@ e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt
e_cal_component_set_dtend (comp, &date);
e_cal_component_commit_sequence (comp);
-
+
if (day_view->last_edited_comp_string != NULL) {
g_free (day_view->last_edited_comp_string);
day_view->last_edited_comp_string = NULL;
}
-
+
day_view->last_edited_comp_string = e_cal_component_get_as_string (comp);
day_view->resize_drag_pos = E_CALENDAR_VIEW_POS_NONE;
@@ -7533,18 +7533,18 @@ e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt
e_cal_component_set_exrule_list (comp, NULL);
}
}
-
+
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
e_cal_component_commit_sequence (comp);
e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
-out:
+out:
g_object_unref (comp);
}
#endif
-static void
+static void
e_day_view_change_event_end_time_up (EDayView *day_view)
{
EDayViewEvent *event;
@@ -7575,12 +7575,12 @@ e_day_view_change_event_end_time_up (EDayView *day_view)
}
-static void
+static void
e_day_view_change_event_end_time_down (EDayView *day_view)
{
EDayViewEvent *event;
gint day, event_num, resize_start_row, resize_end_row;
-
+
day = day_view->editing_event_day;
event_num = day_view->editing_event_num;
if ((day == -1) || (day == E_DAY_VIEW_LONG_EVENT))
@@ -7665,7 +7665,7 @@ e_day_view_on_editing_stopped (EDayView *day_view,
ECalComponent *comp;
ECal *client;
gboolean on_server;
-
+
/* Note: the item we are passed here isn't reliable, so we just stop
the edit of whatever item was being edited. We also receive this
event twice for some reason. */
@@ -7711,12 +7711,12 @@ e_day_view_on_editing_stopped (EDayView *day_view,
client = event->comp_data->client;
on_server = cal_comp_is_on_server (comp, client);
-
+
if (string_is_empty (text) && !on_server) {
const char *uid;
-
+
e_cal_component_get_uid (comp, &uid);
-
+
e_day_view_foreach_event_with_uid (day_view, uid,
e_day_view_remove_event_cb, NULL);
e_day_view_check_layout (day_view);
@@ -7796,12 +7796,12 @@ e_day_view_on_editing_stopped (EDayView *day_view,
e_cal_component_commit_sequence (comp);
}
}
-
+
/* FIXME When sending here, what exactly should we send? */
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
e_calendar_view_modify_and_send (comp, client, mod, toplevel, FALSE);
}
-
+
}
out:
@@ -7825,7 +7825,7 @@ e_day_view_on_editing_stopped (EDayView *day_view,
ECalComponent *comp;
ECal *client;
gboolean on_server;
-
+
/* Note: the item we are passed here isn't reliable, so we just stop
the edit of whatever item was being edited. We also receive this
event twice for some reason. */
@@ -7868,12 +7868,12 @@ e_day_view_on_editing_stopped (EDayView *day_view,
client = event->comp_data->client;
on_server = cal_comp_is_on_server (comp, client);
-
+
if (string_is_empty (text) && !on_server) {
const char *uid;
-
+
e_cal_component_get_uid (comp, &uid);
-
+
e_day_view_foreach_event_with_uid (day_view, uid,
e_day_view_remove_event_cb, NULL);
e_day_view_check_layout (day_view);
@@ -7953,12 +7953,12 @@ e_day_view_on_editing_stopped (EDayView *day_view,
e_cal_component_commit_sequence (comp);
}
}
-
+
/* FIXME When sending here, what exactly should we send? */
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
e_calendar_view_modify_and_send (comp, client, mod, toplevel, FALSE);
}
-
+
}
gtk_widget_queue_draw (day_view->main_canvas);
@@ -9095,14 +9095,14 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
e_calendar_view_modify_and_send (comp, client, mod, toplevel, FALSE);
-
+
g_object_unref (comp);
return;
}
}
- if ((data->length >= 0) && (data->format == 8)
+ if ((data->length >= 0) && (data->format == 8)
&& !drag_from_same_window) {
/* We are dragging between different window */
@@ -9115,7 +9115,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
pos = e_day_view_convert_position_in_top_canvas (day_view,
x, y, &day,
NULL);
- if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
+ if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
goto error;
comp_str = (char *) data->data;
@@ -9140,7 +9140,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
while (subcomp) {
child_kind = icalcomponent_isa (subcomp);
if (child_kind == ICAL_VEVENT_COMPONENT)
- e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart,
+ e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart,
default_zone, subcomp, TRUE);
else if (child_kind == ICAL_VTIMEZONE_COMPONENT) {
icaltimezone *zone;
@@ -9148,10 +9148,10 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
zone = icaltimezone_new ();
icaltimezone_set_component (zone, subcomp);
e_cal_add_timezone (client, zone, NULL);
-
+
icaltimezone_free (zone, 1);
}
-
+
subcomp = icalcomponent_get_next_component (
icalcomp, ICAL_ANY_COMPONENT);
}
@@ -9161,7 +9161,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
} else {
e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart, default_zone, icalcomp, TRUE);
}
-
+
gtk_drag_finish (context, TRUE, TRUE, time);
return;
}
@@ -9194,7 +9194,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
if (day_view->drag_event_day != -1)
drag_from_same_window = TRUE;
- else
+ else
drag_from_same_window = FALSE;
client = e_cal_model_get_default_client (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)));
@@ -9256,7 +9256,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
g_object_unref (comp);
return;
}
-
+
date.value = &itt;
date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
@@ -9304,7 +9304,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
}
}
- if ((data->length >= 0) && (data->format == 8)
+ if ((data->length >= 0) && (data->format == 8)
&& !drag_from_same_window) {
/* We are dragging between different window */
@@ -9317,7 +9317,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
pos = e_day_view_convert_position_in_main_canvas (day_view,
x, y, &day,
&row, NULL);
- if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
+ if (pos == E_CALENDAR_VIEW_POS_OUTSIDE)
goto error;
comp_str = (char *) data->data;
@@ -9342,7 +9342,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
while (subcomp) {
child_kind = icalcomponent_isa (subcomp);
if (child_kind == ICAL_VEVENT_COMPONENT)
- e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart,
+ e_calendar_view_add_event (E_CALENDAR_VIEW (day_view), client, dtstart,
default_zone, subcomp, FALSE);
else if (child_kind == ICAL_VTIMEZONE_COMPONENT) {
icaltimezone *zone;
@@ -9350,10 +9350,10 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
zone = icaltimezone_new ();
icaltimezone_set_component (zone, subcomp);
e_cal_add_timezone (client, zone, NULL);
-
+
icaltimezone_free (zone, 1);
}
-
+
subcomp = icalcomponent_get_next_component (
icalcomp, ICAL_ANY_COMPONENT);
}
diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h
index 7ee92005ba..b7fed463ca 100644
--- a/calendar/gui/e-day-view.h
+++ b/calendar/gui/e-day-view.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -379,7 +379,7 @@ struct _EDayView
/* The event for which a popup menu is being displayed, as above. */
gint popup_event_day;
gint popup_event_num;
-
+
/* The currently selected region. If selection_start_day is -1 there is
no current selection. If start_row or end_row is -1 then the
selection is in the top canvas. */
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index 3ba297b893..0142968b8a 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -64,7 +64,7 @@ struct _EItipControlPrivate {
GtkWidget *html;
ESourceList *source_lists[E_CAL_SOURCE_TYPE_LAST];
- GHashTable *ecals[E_CAL_SOURCE_TYPE_LAST];
+ GHashTable *ecals[E_CAL_SOURCE_TYPE_LAST];
ECal *current_ecal;
ECalSourceType type;
@@ -85,7 +85,7 @@ struct _EItipControlPrivate {
GtkWidget *widget;
gpointer pointer;
} vbox;
-
+
char *vcalendar;
ECalComponent *comp;
icalcomponent *main_comp;
@@ -129,9 +129,9 @@ static void
e_itip_control_class_init (EItipControlClass *klass)
{
GtkObjectClass *gtkobject_class;
-
+
gtkobject_class = GTK_OBJECT_CLASS (klass);
-
+
gtkobject_class->destroy = e_itip_control_destroy;
}
@@ -140,15 +140,15 @@ set_ok_sens (EItipControl *itip)
{
EItipControlPrivate *priv;
gboolean read_only = TRUE;
-
+
priv = itip->priv;
if (!priv->ok.widget)
return;
-
+
if (priv->current_ecal)
e_cal_is_read_only (priv->current_ecal, &read_only, NULL);
-
+
gtk_widget_set_sensitive (priv->ok.widget, priv->current_ecal != NULL && !read_only);
}
@@ -164,7 +164,7 @@ cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
source_type = e_cal_get_source_type (ecal);
source = e_cal_get_source (ecal);
-
+
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, cal_opened_cb, NULL);
if (status != E_CALENDAR_STATUS_OK) {
@@ -187,23 +187,23 @@ start_calendar_server (EItipControl *itip, ESource *source, ECalSourceType type,
icaltimezone *zone;
priv = itip->priv;
-
+
ecal = g_hash_table_lookup (priv->ecals[type], e_source_peek_uid (source));
if (ecal) {
priv->current_ecal = ecal;
set_ok_sens (itip);
- return ecal;
+ return ecal;
}
-
+
ecal = auth_new_cal_from_source (source, type);
-
+
zone = calendar_config_get_icaltimezone ();
e_cal_set_default_timezone (ecal, zone, NULL);
-
+
g_signal_connect (G_OBJECT (ecal), "cal_opened", G_CALLBACK (func), data);
g_hash_table_insert (priv->ecals[type], g_strdup (e_source_peek_uid (source)), ecal);
-
+
e_cal_open_async (ecal, TRUE);
return ecal;
@@ -214,7 +214,7 @@ start_calendar_server_by_uid (EItipControl *itip, const char *uid, ECalSourceTyp
{
EItipControlPrivate *priv;
int i;
-
+
priv = itip->priv;
for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++) {
@@ -224,12 +224,12 @@ start_calendar_server_by_uid (EItipControl *itip, const char *uid, ECalSourceTyp
if (source)
return start_calendar_server (itip, source, type, cal_opened_cb, itip);
}
-
+
return NULL;
}
typedef struct {
- EItipControl *itip;
+ EItipControl *itip;
char *uid;
int count;
gboolean show_selector;
@@ -242,7 +242,7 @@ source_changed_cb (ESourceComboBox *escb, EItipControl *itip)
ESource *source;
source = e_source_combo_box_get_active (escb);
-
+
if (priv->ok.widget)
gtk_widget_set_sensitive (priv->ok.widget, FALSE);
@@ -262,9 +262,9 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
source = e_cal_get_source (ecal);
priv = fd->itip->priv;
-
+
fd->count--;
-
+
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, find_cal_opened_cb, NULL);
if (status != E_CALENDAR_STATUS_OK) {
@@ -275,7 +275,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
if (e_cal_get_object (ecal, fd->uid, NULL, &icalcomp, NULL)) {
icalcomponent_free (icalcomp);
-
+
priv->current_ecal = ecal;
set_ok_sens (fd->itip);
}
@@ -296,8 +296,8 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
default:
uid = NULL;
g_return_if_reached ();
- }
-
+ }
+
if (uid) {
source = e_source_list_peek_source_by_uid (priv->source_lists[priv->type], uid);
g_free (uid);
@@ -321,7 +321,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
} else {
/* FIXME Display error message to user */
}
-
+
g_free (fd->uid);
g_free (fd);
}
@@ -336,23 +336,23 @@ find_server (EItipControl *itip, ECalComponent *comp, gboolean show_selector)
const char *uid;
priv = itip->priv;
-
+
e_cal_component_get_uid (comp, &uid);
groups = e_source_list_peek_groups (priv->source_lists[priv->type]);
for (l = groups; l; l = l->next) {
ESourceGroup *group;
GSList *sources, *m;
-
+
group = l->data;
sources = e_source_group_peek_sources (group);
for (m = sources; m; m = m->next) {
ESource *source;
ECal *ecal;
-
+
source = m->data;
-
+
if (!fd) {
fd = g_new0 (EItipControlFindData, 1);
fd->itip = itip;
@@ -361,8 +361,8 @@ find_server (EItipControl *itip, ECalComponent *comp, gboolean show_selector)
}
fd->count++;
/* Check this return too? */
- ecal = start_calendar_server (itip, source, priv->type, find_cal_opened_cb, fd);
- }
+ ecal = start_calendar_server (itip, source, priv->type, find_cal_opened_cb, fd);
+ }
}
}
@@ -374,7 +374,7 @@ cleanup_ecal (void *data)
/* Clean up any signals */
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, cal_opened_cb, NULL);
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, find_cal_opened_cb, NULL);
-
+
g_object_unref (ecal);
}
@@ -383,9 +383,9 @@ html_destroyed (gpointer data)
{
EItipControl *itip = data;
EItipControlPrivate *priv;
-
+
priv = itip->priv;
-
+
priv->html = NULL;
}
@@ -408,7 +408,7 @@ e_itip_control_init (EItipControl *itip)
priv->source_lists[E_CAL_SOURCE_TYPE_EVENT] = e_source_list_new_for_gconf_default ("/apps/evolution/calendar/sources");
priv->source_lists[E_CAL_SOURCE_TYPE_TODO] = e_source_list_new_for_gconf_default ("/apps/evolution/tasks/sources");
-
+
/* Initialize the ecal hashes */
for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++)
priv->ecals[i] = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, cleanup_ecal);
@@ -421,10 +421,10 @@ e_itip_control_init (EItipControl *itip)
priv->delegator_name = NULL;
priv->my_address = NULL;
priv->view_only = 0;
-
+
/* Html Widget */
priv->html = gtk_html_new ();
- gtk_html_set_default_content_type (GTK_HTML (priv->html),
+ gtk_html_set_default_content_type (GTK_HTML (priv->html),
"text/html; charset=utf-8");
gtk_html_load_from_string (GTK_HTML (priv->html), " ", 1);
gtk_widget_show (priv->html);
@@ -494,32 +494,32 @@ e_itip_control_destroy (GtkObject *obj)
{
EItipControl *itip = E_ITIP_CONTROL (obj);
EItipControlPrivate *priv;
-
+
priv = itip->priv;
if (priv) {
int i;
clean_up (itip);
-
+
priv->accounts = NULL;
-
+
for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++) {
if (priv->ecals[i]) {
g_hash_table_destroy (priv->ecals[i]);
priv->ecals[i] = NULL;
}
}
-
+
if (priv->html) {
g_signal_handlers_disconnect_matched (priv->html, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, itip);
g_object_weak_unref (G_OBJECT (priv->html), (GWeakNotify)html_destroyed, itip);
}
-
+
g_free (priv);
itip->priv = NULL;
}
-
+
(* GTK_OBJECT_CLASS (e_itip_control_parent_class)->destroy) (obj);
}
@@ -535,9 +535,9 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par
EItipControlPrivate *priv;
icalproperty *prop;
char *my_alt_address = NULL;
-
+
priv = itip->priv;
-
+
for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
prop != NULL;
prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY)) {
@@ -556,7 +556,7 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par
attendee = NULL;
attendee_clean = NULL;
}
-
+
param = icalproperty_get_first_parameter (prop, ICAL_CN_PARAMETER);
if (param != NULL) {
name = icalparameter_get_cn (param);
@@ -569,10 +569,10 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par
if (priv->delegator_address) {
char *delegator_clean;
-
+
delegator_clean = g_strdup (itip_strip_mailto (attendee));
delegator_clean = g_strstrip (delegator_clean);
-
+
/* If the mailer told us the address to use, use that */
if (delegator_clean != NULL
&& !g_ascii_strcasecmp (attendee_clean, delegator_clean)) {
@@ -590,7 +590,7 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par
it = e_list_get_iterator((EList *)priv->accounts);
while (e_iterator_is_valid(it)) {
const EAccount *account = e_iterator_get(it);
-
+
/* Check for a matching address */
if (attendee_clean != NULL
&& !g_ascii_strcasecmp (account->id->address, attendee_clean)) {
@@ -605,17 +605,17 @@ find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_par
g_object_unref(it);
return;
}
-
+
/* Check for a matching cname to fall back on */
- if (name_clean != NULL
+ if (name_clean != NULL
&& !g_ascii_strcasecmp (account->id->name, name_clean))
my_alt_address = g_strdup (attendee_clean);
-
+
e_iterator_next(it);
}
g_object_unref(it);
}
-
+
g_free (attendee_clean);
g_free (name_clean);
}
@@ -654,7 +654,7 @@ find_attendee (icalcomponent *ical_comp, const char *address)
}
g_free (text);
}
-
+
return prop;
}
@@ -789,7 +789,7 @@ write_recurrence_piece (EItipControl *itip, ECalComponent *comp,
if (r->by_day[0] == ICAL_RECURRENCE_ARRAY_MAX) {
/* For Translators: In this can also be translated as "With the period of %d
week/weeks", where %d is a number. The entire sentence is of the form "Recurring:
- Every %d week/weeks" */
+ Every %d week/weeks" */
/* For Translators : 'Every week' is event Recurring every week */
/* For Translators : 'Every %d weeks' is event Recurring every %d weeks. %d is a digit */
sprintf (buffer, ngettext("Every week", "Every %d weeks", r->interval), r->interval);
@@ -837,7 +837,7 @@ write_recurrence_piece (EItipControl *itip, ECalComponent *comp,
size -= len;
/* For Translators: In this can also be translated as "With the period of %d
month/months", where %d is a number. The entire sentence is of the form "Recurring:
- Every %d month/months" */
+ Every %d month/months" */
/* For Translators : 'every month' is part of the sentence 'event recurring on the (nth) day of every month.' */
/* For Translators : 'every %d months' is part of the sentence 'event recurring on the (nth) day of every %d months.'
%d is a digit */
@@ -847,7 +847,7 @@ write_recurrence_piece (EItipControl *itip, ECalComponent *comp,
case ICAL_YEARLY_RECURRENCE:
/* For Translators: In this can also be translated as "With the period of %d
year/years", where %d is a number. The entire sentence is of the form "Recurring:
- Every %d year/years" */
+ Every %d year/years" */
/* For Translators : 'Every year' is event Recurring every year */
/* For Translators : 'Every %d years' is event Recurring every %d years. %d is a digit */
sprintf (buffer, ngettext("Every year", "Every %d years", r->interval), r->interval);
@@ -1035,7 +1035,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
if (priv->html == NULL)
return;
-
+
/* Html widget */
html_stream = gtk_html_begin (GTK_HTML (priv->html));
gtk_html_stream_printf (html_stream,
@@ -1101,9 +1101,9 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
else
html = g_strdup_printf (itip_desc, _("An unknown person"));
}
-
+
break;
-
+
case ICAL_METHOD_PUBLISH:
case ICAL_METHOD_ADD:
case ICAL_METHOD_CANCEL:
@@ -1146,28 +1146,28 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
g_free (str);
if (text.value)
g_free (html);
-
+
/* Location */
e_cal_component_get_location (priv->comp, &string);
if (string != NULL) {
html = e_text_to_html_full (string, E_TEXT_TO_HTML_CONVERT_NL, 0);
- gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s<br><br>",
+ gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s<br><br>",
_("Location:"), html);
g_free (html);
}
-
+
/* Status */
if (priv->method == ICAL_METHOD_REPLY) {
GSList *alist;
e_cal_component_get_attendee_list (priv->comp, &alist);
-
+
if (alist != NULL) {
ECalComponentAttendee *a = alist->data;
gtk_html_stream_printf (html_stream, "<b>%s</b><br>",
_("Status:"));
-
+
switch (a->status) {
case ICAL_PARTSTAT_ACCEPTED:
gtk_html_stream_printf (html_stream, "%s<br><br>",
@@ -1186,10 +1186,10 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
_("Unknown"));
}
}
-
+
e_cal_component_free_attendee_list (alist);
}
-
+
/* Description */
e_cal_component_get_description_list (priv->comp, &l);
if (l)
@@ -1214,7 +1214,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
gtk_html_write (GTK_HTML (priv->html), html_stream, options, strlen (options));
}
}
-
+
const_html = "</td></tr></table>";
gtk_html_write (GTK_HTML (priv->html), html_stream, const_html, strlen(const_html));
@@ -1259,7 +1259,7 @@ get_refresh_options (void)
static char*
get_cancel_options (gboolean found, icalcomponent_kind kind)
-{
+{
if (!found) {
switch (kind) {
case ICAL_VEVENT_COMPONENT:
@@ -1268,7 +1268,7 @@ get_cancel_options (gboolean found, icalcomponent_kind kind)
return g_strdup_printf ("<i>%s</i>", _("The task has been canceled, however it could not be found in your task lists"));
default:
g_return_val_if_reached (NULL);
- }
+ }
}
return g_strdup_printf ("<object classid=\"itip:cancel_options\"></object>");
@@ -1276,14 +1276,14 @@ get_cancel_options (gboolean found, icalcomponent_kind kind)
static ECalComponent *
-get_real_item (EItipControl *itip)
+get_real_item (EItipControl *itip)
{
EItipControlPrivate *priv;
ECalComponent *comp;
icalcomponent *icalcomp;
gboolean found = FALSE;
const char *uid;
-
+
priv = itip->priv;
e_cal_component_get_uid (priv->comp, &uid);
@@ -1306,13 +1306,13 @@ static void
adjust_item (EItipControl *itip, ECalComponent *comp)
{
ECalComponent *real_comp;
-
+
real_comp = get_real_item (itip);
if (real_comp != NULL) {
ECalComponentText text;
const char *string;
GSList *l;
-
+
e_cal_component_get_summary (real_comp, &text);
e_cal_component_set_summary (comp, &text);
e_cal_component_get_location (real_comp, &string);
@@ -1320,11 +1320,11 @@ adjust_item (EItipControl *itip, ECalComponent *comp)
e_cal_component_get_description_list (real_comp, &l);
e_cal_component_set_description_list (comp, l);
e_cal_component_free_text_list (l);
-
+
g_object_unref (real_comp);
} else {
ECalComponentText text = {_("Unknown"), NULL};
-
+
e_cal_component_set_summary (comp, &text);
}
}
@@ -1336,7 +1336,7 @@ show_current_event (EItipControl *itip)
const gchar *itip_title, *itip_desc;
char *options;
gboolean show_selector = FALSE;
-
+
priv = itip->priv;
priv->type = E_CAL_SOURCE_TYPE_EVENT;
@@ -1401,7 +1401,7 @@ show_current_event (EItipControl *itip)
if (priv->calendar_uid)
priv->current_ecal = start_calendar_server_by_uid (itip, priv->calendar_uid, priv->type);
- else
+ else
find_server (itip, priv->comp, show_selector);
}
@@ -1412,7 +1412,7 @@ show_current_todo (EItipControl *itip)
const gchar *itip_title, *itip_desc;
char *options;
gboolean show_selector = FALSE;
-
+
priv = itip->priv;
priv->type = E_CAL_SOURCE_TYPE_TODO;
@@ -1478,7 +1478,7 @@ show_current_todo (EItipControl *itip)
if (priv->calendar_uid)
priv->current_ecal = start_calendar_server_by_uid (itip, priv->calendar_uid, priv->type);
- else
+ else
find_server (itip, priv->comp, show_selector);
}
@@ -1529,7 +1529,7 @@ get_next (icalcompiter *iter)
if (ret == NULL)
break;
kind = icalcomponent_isa (ret);
- } while (ret != NULL
+ } while (ret != NULL
&& kind != ICAL_VEVENT_COMPONENT
&& kind != ICAL_VTODO_COMPONENT
&& kind != ICAL_VFREEBUSY_COMPONENT);
@@ -1549,7 +1549,7 @@ show_current (EItipControl *itip)
priv = itip->priv;
g_object_ref (itip);
-
+
if (priv->comp)
g_object_unref (priv->comp);
priv->current_ecal = NULL;
@@ -1573,7 +1573,7 @@ show_current (EItipControl *itip)
prop = icalcomponent_get_next_property (priv->ical_comp, ICAL_X_PROPERTY);
}
-
+
/* Strip out alarms for security purposes */
alarm_iter = icalcomponent_begin_component (priv->ical_comp, ICAL_VALARM_COMPONENT);
while ((alarm_comp = icalcompiter_deref (&alarm_iter)) != NULL) {
@@ -1615,10 +1615,10 @@ show_current (EItipControl *itip)
case CAL_MINUTES:
trigger.u.rel_duration.minutes = interval;
break;
- case CAL_HOURS:
+ case CAL_HOURS:
trigger.u.rel_duration.hours = interval;
break;
- case CAL_DAYS:
+ case CAL_DAYS:
trigger.u.rel_duration.days = interval;
break;
default:
@@ -1671,7 +1671,7 @@ e_itip_control_set_data (EItipControl *itip, const gchar *text)
gtk_html_load_from_string (GTK_HTML (priv->html), " ", 1);
return;
}
-
+
priv->vcalendar = g_strdup (text);
priv->top_level = e_cal_util_new_top_level ();
@@ -1709,7 +1709,7 @@ e_itip_control_set_data (EItipControl *itip, const gchar *text)
}
if (priv->ical_comp == NULL) {
- write_error_html (itip, _("The attachment has no viewable calendar items"));
+ write_error_html (itip, _("The attachment has no viewable calendar items"));
return;
}
@@ -1877,7 +1877,7 @@ change_status (icalcomponent *ical_comp, const char *address, icalparameter_part
icalproperty_add_parameter (prop, param);
} else {
icalparameter *param;
-
+
if (address != NULL) {
prop = icalproperty_new_attendee (address);
icalcomponent_add_property (ical_comp, prop);
@@ -1891,16 +1891,16 @@ change_status (icalcomponent *ical_comp, const char *address, icalparameter_part
EAccount *a;
a = itip_addresses_get_default ();
-
+
prop = icalproperty_new_attendee (a->id->address);
icalcomponent_add_property (ical_comp, prop);
-
+
param = icalparameter_new_cn (a->id->name);
- icalproperty_add_parameter (prop, param);
+ icalproperty_add_parameter (prop, param);
param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT);
icalproperty_add_parameter (prop, param);
-
+
param = icalparameter_new_partstat (status);
icalproperty_add_parameter (prop, param);
}
@@ -1969,9 +1969,9 @@ update_attendee_status (EItipControl *itip)
const char *uid;
GtkWidget *dialog;
GError *error = NULL;
-
+
priv = itip->priv;
-
+
/* Obtain our version */
e_cal_component_get_uid (priv->comp, &uid);
if (e_cal_get_object (priv->current_ecal, uid, NULL, &icalcomp, NULL)) {
@@ -2027,7 +2027,7 @@ update_attendee_status (EItipControl *itip)
change_status (icalcomp,
itip_strip_mailto (a->value),
a->status);
- e_cal_component_rescan (comp);
+ e_cal_component_rescan (comp);
}
}
}
@@ -2074,7 +2074,7 @@ send_item (EItipControl *itip)
priv = itip->priv;
comp = get_real_item (itip);
-
+
if (comp != NULL) {
itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, priv->current_ecal, NULL, NULL, NULL);
g_object_unref (comp);
@@ -2181,32 +2181,32 @@ url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpoint
static void
option_activated_cb (GtkWidget *widget, gpointer data)
{
- EItipControl *itip = E_ITIP_CONTROL (data);
+ EItipControl *itip = E_ITIP_CONTROL (data);
EItipControlPrivate *priv;
-
+
priv = itip->priv;
priv->action = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), ACTION_DATA));
}
static void
-add_option (EItipControl *itip, GtkWidget *menu, const char *text, char action)
+add_option (EItipControl *itip, GtkWidget *menu, const char *text, char action)
{
GtkWidget *item;
-
+
item = gtk_menu_item_new_with_label (text);
g_signal_connect (item, "activate", G_CALLBACK (option_activated_cb), itip);
g_object_set_data (G_OBJECT (item), ACTION_DATA, GINT_TO_POINTER ((int)action));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
-
+
}
static void
insert_boxes (GtkHTMLEmbedded *eb, EItipControl *itip)
{
EItipControlPrivate *priv;
-
+
priv = itip->priv;
priv->vbox.widget = gtk_vbox_new (FALSE, 12);
@@ -2222,39 +2222,39 @@ insert_boxes (GtkHTMLEmbedded *eb, EItipControl *itip)
}
static void
-insert_label (GtkWidget *hbox)
+insert_label (GtkWidget *hbox)
{
GtkWidget *label;
char *text;
-
+
text = g_strdup_printf ("<b>%s</b>", _("Choose an action:"));
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), text);
g_free (text);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
- gtk_widget_show (label);
+ gtk_widget_show (label);
}
static void
rsvp_clicked_cb (GtkWidget *widget, gpointer data)
{
- EItipControl *itip = E_ITIP_CONTROL (data);
+ EItipControl *itip = E_ITIP_CONTROL (data);
EItipControlPrivate *priv;
-
+
priv = itip->priv;
priv->rsvp = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
}
static void
-insert_rsvp (GtkWidget *hbox, EItipControl *itip)
+insert_rsvp (GtkWidget *hbox, EItipControl *itip)
{
EItipControlPrivate *priv;
GtkWidget *btn;
priv = itip->priv;
-
+
/* To translators: RSVP means "please reply" */
btn = gtk_check_button_new_with_label ("RSVP");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (btn), TRUE);
@@ -2263,15 +2263,15 @@ insert_rsvp (GtkWidget *hbox, EItipControl *itip)
g_signal_connect (btn, "clicked", G_CALLBACK (rsvp_clicked_cb), itip);
gtk_box_pack_start (GTK_BOX (hbox), btn, FALSE, TRUE, 0);
- gtk_widget_show (btn);
+ gtk_widget_show (btn);
}
static void
-insert_ok (GtkWidget *hbox, EItipControl *itip)
+insert_ok (GtkWidget *hbox, EItipControl *itip)
{
EItipControlPrivate *priv;
priv = itip->priv;
-
+
priv->ok.widget = gtk_button_new_from_stock (GTK_STOCK_OK);
g_object_add_weak_pointer (G_OBJECT (priv->ok.widget), &priv->ok.pointer);
@@ -2280,7 +2280,7 @@ insert_ok (GtkWidget *hbox, EItipControl *itip)
set_ok_sens (itip);
gtk_box_pack_start (GTK_BOX (hbox), priv->ok.widget, FALSE, TRUE, 0);
- gtk_widget_show (priv->ok.widget);
+ gtk_widget_show (priv->ok.widget);
}
static gboolean
@@ -2288,19 +2288,19 @@ publish_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb)
{
EItipControlPrivate *priv;
GtkWidget *option, *menu;
-
+
priv = itip->priv;
insert_boxes (eb, itip);
insert_label (priv->hbox.widget);
option = gtk_option_menu_new ();
-
+
menu = gtk_menu_new ();
add_option (itip, menu, _("Update"), 'U');
priv->action = 'U';
-
+
gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu);
gtk_box_pack_start (GTK_BOX (priv->hbox.widget), option, FALSE, TRUE, 0);
@@ -2316,21 +2316,21 @@ request_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb)
{
EItipControlPrivate *priv;
GtkWidget *option, *menu;
-
+
priv = itip->priv;
insert_boxes (eb, itip);
insert_label (priv->hbox.widget);
-
+
option = gtk_option_menu_new ();
-
+
menu = gtk_menu_new ();
add_option (itip, menu, _("Accept"), 'A');
add_option (itip, menu, _("Tentatively accept"), 'T');
add_option (itip, menu, _("Decline"), 'D');
priv->action = 'A';
-
+
gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu);
gtk_box_pack_start (GTK_BOX (priv->hbox.widget), option, FALSE, TRUE, 0);
@@ -2347,19 +2347,19 @@ freebusy_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb)
{
EItipControlPrivate *priv;
GtkWidget *option, *menu;
-
+
priv = itip->priv;
insert_boxes (eb, itip);
insert_label (priv->hbox.widget);
option = gtk_option_menu_new ();
-
+
menu = gtk_menu_new ();
add_option (itip, menu, _("Send Free/Busy Information"), 'F');
priv->action = 'F';
-
+
gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu);
gtk_container_add (GTK_CONTAINER (priv->hbox.widget), option);
@@ -2375,19 +2375,19 @@ reply_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb)
{
EItipControlPrivate *priv;
GtkWidget *option, *menu;
-
+
priv = itip->priv;
insert_boxes (eb, itip);
insert_label (priv->hbox.widget);
option = gtk_option_menu_new ();
-
+
menu = gtk_menu_new ();
add_option (itip, menu, _("Update respondent status"), 'R');
priv->action = 'R';
-
+
gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu);
gtk_container_add (GTK_CONTAINER (priv->hbox.widget), option);
@@ -2403,19 +2403,19 @@ refresh_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb)
{
EItipControlPrivate *priv;
GtkWidget *option, *menu;
-
+
priv = itip->priv;
insert_boxes (eb, itip);
insert_label (priv->hbox.widget);
option = gtk_option_menu_new ();
-
+
menu = gtk_menu_new ();
add_option (itip, menu, _("Send Latest Information"), 'S');
priv->action = 'R';
-
+
gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu);
gtk_container_add (GTK_CONTAINER (priv->hbox.widget), option);
@@ -2431,19 +2431,19 @@ cancel_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb)
{
EItipControlPrivate *priv;
GtkWidget *option, *menu;
-
+
priv = itip->priv;
insert_boxes (eb, itip);
insert_label (priv->hbox.widget);
option = gtk_option_menu_new ();
-
+
menu = gtk_menu_new ();
add_option (itip, menu, _("Cancel"), 'C');
priv->action = 'C';
-
+
gtk_option_menu_set_menu (GTK_OPTION_MENU (option), menu);
gtk_container_add (GTK_CONTAINER (priv->hbox.widget), option);
@@ -2455,7 +2455,7 @@ cancel_options_object (EItipControl *itip, GtkHTML *html, GtkHTMLEmbedded *eb)
}
static gboolean
-object_requested_cb (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data)
+object_requested_cb (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data)
{
EItipControl *itip = E_ITIP_CONTROL (data);
@@ -2471,7 +2471,7 @@ object_requested_cb (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data)
return refresh_options_object (itip, html, eb);
else if (!strcmp (eb->classid, "itip:cancel_options"))
return cancel_options_object (itip, html, eb);
-
+
return FALSE;
}
@@ -2492,7 +2492,7 @@ ok_clicked_cb (GtkWidget *widget, gpointer data)
update_item (itip);
break;
case 'A':
- status = change_status (priv->ical_comp, priv->my_address,
+ status = change_status (priv->ical_comp, priv->my_address,
ICAL_PARTSTAT_ACCEPTED);
if (status) {
e_cal_component_rescan (priv->comp);
@@ -2539,43 +2539,43 @@ ok_clicked_cb (GtkWidget *widget, gpointer data)
icalvalue *value;
const char *attendee;
GSList *l, *list = NULL;
-
+
comp = e_cal_component_clone (priv->comp);
if (comp == NULL)
return;
-
+
if (priv->my_address == NULL)
find_my_address (itip, priv->ical_comp, NULL);
g_return_if_fail (priv->my_address != NULL);
-
+
ical_comp = e_cal_component_get_icalcomponent (comp);
-
+
for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
prop != NULL;
prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY))
{
char *text;
-
+
value = icalproperty_get_value (prop);
if (!value)
continue;
-
+
attendee = icalvalue_get_string (value);
-
+
text = g_strdup (itip_strip_mailto (attendee));
text = g_strstrip (text);
if (g_ascii_strcasecmp (priv->my_address, text))
list = g_slist_prepend (list, prop);
g_free (text);
}
-
+
for (l = list; l; l = l->next) {
prop = l->data;
icalcomponent_remove_property (ical_comp, prop);
icalproperty_free (prop);
}
g_slist_free (list);
-
+
e_cal_component_rescan (comp);
itip_send_comp (E_CAL_COMPONENT_METHOD_REPLY, comp, priv->current_ecal, priv->top_level, NULL, NULL);
diff --git a/calendar/gui/e-itip-control.h b/calendar/gui/e-itip-control.h
index faab0cc8cd..82cc42376c 100644
--- a/calendar/gui/e-itip-control.h
+++ b/calendar/gui/e-itip-control.h
@@ -59,7 +59,7 @@ gint e_itip_control_get_data_size (EItipControl *itip);
void e_itip_control_set_from_address (EItipControl *itip,
const gchar *address);
const gchar *e_itip_control_get_from_address (EItipControl *itip);
-void e_itip_control_set_view_only (EItipControl *itip,
+void e_itip_control_set_view_only (EItipControl *itip,
gboolean view_only);
gboolean e_itip_control_get_view_only (EItipControl *itip);
void e_itip_control_set_delegator_address (EItipControl *itip,
diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c
index 269fdf298e..2239ee1b46 100644
--- a/calendar/gui/e-meeting-attendee.c
+++ b/calendar/gui/e-meeting-attendee.c
@@ -42,7 +42,7 @@ struct _EMeetingAttendeePrivate {
gchar *delfrom;
icalparameter_partstat status;
-
+
gchar *sentby;
gchar *cn;
gchar *language;
@@ -58,7 +58,7 @@ struct _EMeetingAttendeePrivate {
EMeetingTime busy_periods_end;
gboolean start_busy_range_set;
gboolean end_busy_range_set;
-
+
gint longest_period_in_days;
};
@@ -98,16 +98,16 @@ string_test (gchar *string)
}
static gboolean
-string_is_set (gchar *string)
+string_is_set (gchar *string)
{
if (string != NULL && *string != '\0')
return TRUE;
-
+
return FALSE;
}
static void
-notify_changed (EMeetingAttendee *ia)
+notify_changed (EMeetingAttendee *ia)
{
g_signal_emit_by_name (G_OBJECT (ia), "changed");
}
@@ -131,16 +131,16 @@ e_meeting_attendee_init (EMeetingAttendee *ia)
priv->delto = string_test (NULL);
priv->delfrom = string_test (NULL);
-
+
priv->status = ICAL_PARTSTAT_NONE;
-
+
priv->sentby = string_test (NULL);
priv->cn = string_test (NULL);
priv->language = string_test (NULL);
priv->edit_level = E_MEETING_ATTENDEE_EDIT_FULL;
priv->has_calendar_info = FALSE;
-
+
priv->busy_periods = g_array_new (FALSE, FALSE, sizeof (EMeetingFreeBusyPeriod));
priv->busy_periods_sorted = FALSE;
@@ -154,7 +154,7 @@ e_meeting_attendee_init (EMeetingAttendee *ia)
priv->start_busy_range_set = FALSE;
priv->end_busy_range_set = FALSE;
-
+
priv->longest_period_in_days = 0;
}
@@ -177,9 +177,9 @@ e_meeting_attendee_finalize (GObject *obj)
g_free (priv->sentby);
g_free (priv->cn);
g_free (priv->language);
-
+
g_array_free (priv->busy_periods, TRUE);
-
+
g_free (priv);
if (G_OBJECT_CLASS (e_meeting_attendee_parent_class)->finalize)
@@ -196,7 +196,7 @@ GObject *
e_meeting_attendee_new_from_e_cal_component_attendee (ECalComponentAttendee *ca)
{
EMeetingAttendee *ia;
-
+
ia = E_MEETING_ATTENDEE (g_object_new (E_TYPE_MEETING_ATTENDEE, NULL));
e_meeting_attendee_set_address (ia, g_strdup (ca->value));
@@ -210,7 +210,7 @@ e_meeting_attendee_new_from_e_cal_component_attendee (ECalComponentAttendee *ca)
e_meeting_attendee_set_sentby (ia, g_strdup (ca->sentby));
e_meeting_attendee_set_cn (ia, g_strdup (ca->cn));
e_meeting_attendee_set_language (ia, g_strdup (ca->language));
-
+
return G_OBJECT (ia);
}
@@ -221,7 +221,7 @@ e_meeting_attendee_as_e_cal_component_attendee (EMeetingAttendee *ia)
ECalComponentAttendee *ca;
priv = ia->priv;
-
+
ca = g_new0 (ECalComponentAttendee, 1);
ca->value = priv->address;
@@ -243,9 +243,9 @@ const gchar *
e_meeting_attendee_get_fburi (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->fburi;
}
@@ -253,12 +253,12 @@ void
e_meeting_attendee_set_fburi (EMeetingAttendee *ia, gchar *fburi)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
if (priv->fburi != NULL)
g_free (priv->fburi);
-
+
priv->fburi = string_test (fburi);
notify_changed (ia);
@@ -268,9 +268,9 @@ const gchar *
e_meeting_attendee_get_address (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->address;
}
@@ -278,12 +278,12 @@ void
e_meeting_attendee_set_address (EMeetingAttendee *ia, gchar *address)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
if (priv->address != NULL)
g_free (priv->address);
-
+
priv->address = string_test (address);
notify_changed (ia);
@@ -293,9 +293,9 @@ gboolean
e_meeting_attendee_is_set_address (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return string_is_set (priv->address);
}
@@ -303,9 +303,9 @@ const gchar *
e_meeting_attendee_get_member (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->member;
}
@@ -313,12 +313,12 @@ void
e_meeting_attendee_set_member (EMeetingAttendee *ia, gchar *member)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
if (priv->member != NULL)
g_free (priv->member);
-
+
priv->member = string_test (member);
notify_changed (ia);
@@ -328,7 +328,7 @@ gboolean
e_meeting_attendee_is_set_member (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
return string_is_set (priv->member);
@@ -338,19 +338,19 @@ icalparameter_cutype
e_meeting_attendee_get_cutype (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->cutype;
}
-void
+void
e_meeting_attendee_set_cutype (EMeetingAttendee *ia, icalparameter_cutype cutype)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
priv->cutype = cutype;
notify_changed (ia);
@@ -360,9 +360,9 @@ icalparameter_role
e_meeting_attendee_get_role (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->role;
}
@@ -370,21 +370,21 @@ void
e_meeting_attendee_set_role (EMeetingAttendee *ia, icalparameter_role role)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
priv->role = role;
notify_changed (ia);
}
-gboolean
+gboolean
e_meeting_attendee_get_rsvp (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->rsvp;
}
@@ -392,9 +392,9 @@ void
e_meeting_attendee_set_rsvp (EMeetingAttendee *ia, gboolean rsvp)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
priv->rsvp = rsvp;
notify_changed (ia);
@@ -404,9 +404,9 @@ const gchar *
e_meeting_attendee_get_delto (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->delto;
}
@@ -414,12 +414,12 @@ void
e_meeting_attendee_set_delto (EMeetingAttendee *ia, gchar *delto)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
if (priv->delto != NULL)
g_free (priv->delto);
-
+
priv->delto = string_test (delto);
notify_changed (ia);
@@ -429,7 +429,7 @@ gboolean
e_meeting_attendee_is_set_delto (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
return string_is_set (priv->delto);
@@ -439,9 +439,9 @@ const gchar *
e_meeting_attendee_get_delfrom (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->delfrom;
}
@@ -449,12 +449,12 @@ void
e_meeting_attendee_set_delfrom (EMeetingAttendee *ia, gchar *delfrom)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
if (priv->delfrom != NULL)
g_free (priv->delfrom);
-
+
priv->delfrom = string_test (delfrom);
notify_changed (ia);
@@ -464,7 +464,7 @@ gboolean
e_meeting_attendee_is_set_delfrom (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
return string_is_set (priv->delfrom);
@@ -474,9 +474,9 @@ icalparameter_partstat
e_meeting_attendee_get_status (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->status;
}
@@ -484,9 +484,9 @@ void
e_meeting_attendee_set_status (EMeetingAttendee *ia, icalparameter_partstat status)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
priv->status = status;
notify_changed (ia);
@@ -496,9 +496,9 @@ const gchar *
e_meeting_attendee_get_sentby (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->sentby;
}
@@ -506,12 +506,12 @@ void
e_meeting_attendee_set_sentby (EMeetingAttendee *ia, gchar *sentby)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
if (priv->sentby != NULL)
g_free (priv->sentby);
-
+
priv->sentby = string_test (sentby);
notify_changed (ia);
@@ -521,7 +521,7 @@ gboolean
e_meeting_attendee_is_set_sentby (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
return string_is_set (priv->sentby);
@@ -531,9 +531,9 @@ const gchar *
e_meeting_attendee_get_cn (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->cn;
}
@@ -541,12 +541,12 @@ void
e_meeting_attendee_set_cn (EMeetingAttendee *ia, gchar *cn)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
if (priv->cn != NULL)
g_free (priv->cn);
-
+
priv->cn = string_test (cn);
notify_changed (ia);
@@ -556,7 +556,7 @@ gboolean
e_meeting_attendee_is_set_cn (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
return string_is_set (priv->cn);
@@ -566,9 +566,9 @@ const gchar *
e_meeting_attendee_get_language (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->language;
}
@@ -576,12 +576,12 @@ void
e_meeting_attendee_set_language (EMeetingAttendee *ia, gchar *language)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
if (priv->language != NULL)
g_free (priv->language);
-
+
priv->language = string_test (language);
notify_changed (ia);
@@ -591,7 +591,7 @@ gboolean
e_meeting_attendee_is_set_language (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
return string_is_set (priv->language);
@@ -601,7 +601,7 @@ EMeetingAttendeeType
e_meeting_attendee_get_atype (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
if (priv->cutype == ICAL_CUTYPE_ROOM
@@ -611,7 +611,7 @@ e_meeting_attendee_get_atype (EMeetingAttendee *ia)
if (priv->role == ICAL_ROLE_CHAIR
|| priv->role == ICAL_ROLE_REQPARTICIPANT)
return E_MEETING_ATTENDEE_REQUIRED_PERSON;
-
+
return E_MEETING_ATTENDEE_OPTIONAL_PERSON;
}
@@ -620,7 +620,7 @@ EMeetingAttendeeEditLevel
e_meeting_attendee_get_edit_level (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
g_return_val_if_fail (ia != NULL, E_MEETING_ATTENDEE_EDIT_NONE);
g_return_val_if_fail (E_IS_MEETING_ATTENDEE (ia), E_MEETING_ATTENDEE_EDIT_NONE);
@@ -629,11 +629,11 @@ e_meeting_attendee_get_edit_level (EMeetingAttendee *ia)
return priv->edit_level;
}
-void
+void
e_meeting_attendee_set_edit_level (EMeetingAttendee *ia, EMeetingAttendeeEditLevel level)
{
EMeetingAttendeePrivate *priv;
-
+
g_return_if_fail (ia != NULL);
g_return_if_fail (E_IS_MEETING_ATTENDEE (ia));
@@ -684,7 +684,7 @@ static void
ensure_periods_sorted (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
if (priv->busy_periods_sorted)
@@ -701,7 +701,7 @@ gboolean
e_meeting_attendee_get_has_calendar_info (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
return priv->has_calendar_info;
@@ -711,7 +711,7 @@ void
e_meeting_attendee_set_has_calendar_info (EMeetingAttendee *ia, gboolean has_calendar_info)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
priv->has_calendar_info = has_calendar_info;
@@ -721,12 +721,12 @@ const GArray *
e_meeting_attendee_get_busy_periods (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
ensure_periods_sorted (ia);
-
- return priv->busy_periods;
+
+ return priv->busy_periods;
}
gint
@@ -738,7 +738,7 @@ e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia, GDate *date)
GDate tmp_date;
priv = ia->priv;
-
+
/* Make sure the busy periods have been sorted. */
ensure_periods_sorted (ia);
@@ -756,12 +756,12 @@ e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia, GDate *date)
while (lower < upper) {
middle = (lower + upper) >> 1;
-
+
period = &g_array_index (priv->busy_periods,
EMeetingFreeBusyPeriod, middle);
cmp = g_date_compare (&tmp_date, &period->start.date);
-
+
if (cmp == 0)
break;
else if (cmp < 0)
@@ -793,7 +793,7 @@ e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia, GDate *date)
}
gboolean
-e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
+e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
gint start_year,
gint start_month,
gint start_day,
@@ -816,7 +816,7 @@ e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
g_return_val_if_fail (busy_type < E_MEETING_FREE_BUSY_LAST, FALSE);
priv = ia->priv;
-
+
/* Check the dates are valid. */
if (!g_date_valid_dmy (start_day, start_month, start_year))
return FALSE;
@@ -850,13 +850,13 @@ e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
if (!g_date_valid (&priv->busy_periods_start.date)) {
priv->busy_periods_start.date = period.start.date;
priv->busy_periods_start.hour = period.start.hour;
- priv->busy_periods_start.minute = period.start.minute;
+ priv->busy_periods_start.minute = period.start.minute;
} else {
switch (g_date_compare (&period.start.date, &priv->busy_periods_start.date)) {
case -1:
priv->busy_periods_start.date = period.start.date;
priv->busy_periods_start.hour = period.start.hour;
- priv->busy_periods_start.minute = period.start.minute;
+ priv->busy_periods_start.minute = period.start.minute;
break;
case 0:
if (period.start.hour < priv->busy_periods_start.hour
@@ -864,7 +864,7 @@ e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
&& period.start.minute < priv->busy_periods_start.minute)) {
priv->busy_periods_start.date = period.start.date;
priv->busy_periods_start.hour = period.start.hour;
- priv->busy_periods_start.minute = period.start.minute;
+ priv->busy_periods_start.minute = period.start.minute;
break;
}
break;
@@ -875,7 +875,7 @@ e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
if (!g_date_valid (&priv->busy_periods_end.date)) {
priv->busy_periods_end.date = period.end.date;
priv->busy_periods_end.hour = period.end.hour;
- priv->busy_periods_end.minute = period.end.minute;
+ priv->busy_periods_end.minute = period.end.minute;
} else {
switch (g_date_compare (&period.end.date, &priv->busy_periods_end.date)) {
case 0:
@@ -884,19 +884,19 @@ e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
&& period.end.minute > priv->busy_periods_end.minute)) {
priv->busy_periods_end.date = period.end.date;
priv->busy_periods_end.hour = period.end.hour;
- priv->busy_periods_end.minute = period.end.minute;
+ priv->busy_periods_end.minute = period.end.minute;
break;
}
break;
case 1:
priv->busy_periods_end.date = period.end.date;
priv->busy_periods_end.hour = period.end.hour;
- priv->busy_periods_end.minute = period.end.minute;
+ priv->busy_periods_end.minute = period.end.minute;
break;
}
}
}
-
+
g_array_append_val (priv->busy_periods, period);
priv->has_calendar_info = TRUE;
priv->busy_periods_sorted = FALSE;
@@ -911,7 +911,7 @@ EMeetingTime
e_meeting_attendee_get_start_busy_range (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
return priv->busy_periods_start;
@@ -921,9 +921,9 @@ EMeetingTime
e_meeting_attendee_get_end_busy_range (EMeetingAttendee *ia)
{
EMeetingAttendeePrivate *priv;
-
+
priv = ia->priv;
-
+
return priv->busy_periods_end;
}
@@ -936,11 +936,11 @@ e_meeting_attendee_set_start_busy_range (EMeetingAttendee *ia,
gint start_minute)
{
EMeetingAttendeePrivate *priv;
-
+
g_return_val_if_fail (E_IS_MEETING_ATTENDEE (ia), FALSE);
priv = ia->priv;
-
+
/* Check the dates are valid. */
if (!g_date_valid_dmy (start_day, start_month, start_year))
return FALSE;
@@ -956,7 +956,7 @@ e_meeting_attendee_set_start_busy_range (EMeetingAttendee *ia,
priv->busy_periods_start.minute = start_minute;
priv->start_busy_range_set = TRUE;
-
+
return TRUE;
}
@@ -969,11 +969,11 @@ e_meeting_attendee_set_end_busy_range (EMeetingAttendee *ia,
gint end_minute)
{
EMeetingAttendeePrivate *priv;
-
+
g_return_val_if_fail (E_IS_MEETING_ATTENDEE (ia), FALSE);
priv = ia->priv;
-
+
/* Check the dates are valid. */
if (!g_date_valid_dmy (end_day, end_month, end_year))
return FALSE;
@@ -989,7 +989,7 @@ e_meeting_attendee_set_end_busy_range (EMeetingAttendee *ia,
priv->busy_periods_end.minute = end_minute;
priv->end_busy_range_set = TRUE;
-
+
return TRUE;
}
@@ -1002,7 +1002,7 @@ e_meeting_attendee_clear_busy_periods (EMeetingAttendee *ia)
g_return_if_fail (E_IS_MEETING_ATTENDEE (ia));
priv = ia->priv;
-
+
g_array_set_size (priv->busy_periods, 0);
priv->busy_periods_sorted = TRUE;
diff --git a/calendar/gui/e-meeting-attendee.h b/calendar/gui/e-meeting-attendee.h
index 56f66123e5..5c8dc98e81 100644
--- a/calendar/gui/e-meeting-attendee.h
+++ b/calendar/gui/e-meeting-attendee.h
@@ -137,7 +137,7 @@ void e_meeting_attendee_set_fburi (EMeetingAttendee *ia, gchar *fburi);
const GArray *e_meeting_attendee_get_busy_periods (EMeetingAttendee *ia);
gint e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia, GDate *date);
-gboolean e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
+gboolean e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
gint start_year,
gint start_month,
gint start_day,
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c
index 235e988907..8d1a97208d 100644
--- a/calendar/gui/e-meeting-list-view.c
+++ b/calendar/gui/e-meeting-list-view.c
@@ -1,4 +1,4 @@
-/*
+/*
* e-meeting-list-view.c
*
* Authors: Mike Kestner <mkestner@ximian.com>
@@ -67,9 +67,9 @@ static guint e_meeting_list_view_signals[LAST_SIGNAL] = { 0 };
static void name_selector_dialog_close_cb (ENameSelectorDialog *dialog, gint response, gpointer data);
-static char *sections[] = {N_("Chair Persons"),
- N_("Required Participants"),
- N_("Optional Participants"),
+static char *sections[] = {N_("Chair Persons"),
+ N_("Required Participants"),
+ N_("Optional Participants"),
N_("Resources"),
NULL};
static icalparameter_role roles[] = {ICAL_ROLE_CHAIR,
@@ -111,14 +111,14 @@ e_meeting_list_view_class_init (EMeetingListViewClass *klass)
object_class->finalize = e_meeting_list_view_finalize;
- e_meeting_list_view_signals [ATTENDEE_ADDED] =
- g_signal_new ("attendee_added",
+ e_meeting_list_view_signals [ATTENDEE_ADDED] =
+ g_signal_new ("attendee_added",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EMeetingListViewClass, attendee_added),
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1,
+ G_TYPE_NONE, 1,
G_TYPE_POINTER);
}
@@ -142,7 +142,7 @@ e_meeting_list_view_init (EMeetingListView *view)
priv = g_new0 (EMeetingListViewPrivate, 1);
view->priv = priv;
-
+
priv->renderers = g_hash_table_new (g_direct_hash, g_int_equal);
priv->name_selector = e_name_selector_new ();
@@ -216,12 +216,12 @@ value_edited (GtkTreeView *view, gint col, const gchar *path, const gchar *text)
EMeetingStore *model = E_MEETING_STORE (gtk_tree_view_get_model (view));
GtkTreePath *treepath = gtk_tree_path_new_from_string (path);
int row = gtk_tree_path_get_indices (treepath)[0];
-
+
e_meeting_store_set_value (model, row, col, text);
gtk_tree_path_free (treepath);
}
-static guint
+static guint
get_index_from_role (icalparameter_role role)
{
switch (role) {
@@ -238,7 +238,7 @@ get_index_from_role (icalparameter_role role)
}
}
-void
+void
e_meeting_list_view_add_attendee_to_name_selector (EMeetingListView *view, EMeetingAttendee *ma)
{
EDestinationStore *destination_store;
@@ -260,7 +260,7 @@ e_meeting_list_view_add_attendee_to_name_selector (EMeetingListView *view, EMeet
g_object_unref (des);
}
-void
+void
e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view, EMeetingAttendee *ma)
{
GList *destinations, *l;
@@ -269,18 +269,18 @@ e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view,
const char *madd = NULL;
EMeetingListViewPrivate *priv;
guint i = 1;
-
+
priv = view->priv;
-
+
name_selector_model = e_name_selector_peek_model (priv->name_selector);
i = get_index_from_role (e_meeting_attendee_get_role (ma));
e_name_selector_model_peek_section (name_selector_model, sections [i],
NULL, &destination_store);
destinations = e_destination_store_list_destinations (destination_store);
madd = itip_strip_mailto (e_meeting_attendee_get_address (ma));
-
+
for (l = destinations; l; l = g_list_next (l)) {
- const char *attendee = NULL;
+ const char *attendee = NULL;
EDestination *des = l->data;
@@ -299,14 +299,14 @@ e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view,
}
} else {
attendee = e_destination_get_email (des);
-
+
if (madd && attendee && g_str_equal (madd, attendee)) {
attendee = e_destination_get_email (des);
e_destination_store_remove_destination (destination_store, des);
}
}
}
-
+
g_list_free (destinations);
}
@@ -327,13 +327,13 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address
for (l = addresses, m = names; l && m; l = l->next, m = m->next) {
char *name = m->data, *email = l->data;
-
- if (!((name && *name) || (email && *email)))
+
+ if (!((name && *name) || (email && *email)))
continue;
-
+
if (e_meeting_store_find_attendee (model, email, NULL) != NULL)
continue;
-
+
attendee = e_meeting_store_add_attendee_with_defaults (model);
e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (char *)l->data));
e_meeting_attendee_set_cn (attendee, g_strdup (m->data));
@@ -354,7 +354,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address
existing_attendee);
e_meeting_store_remove_attendee (model, existing_attendee);
}
-
+
} else if (g_list_length (addresses) == 1) {
char *name = names->data, *email = addresses->data;
int existing_row;
@@ -385,7 +385,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address
} else {
if (existing_attendee) {
const char *address = e_meeting_attendee_get_address (existing_attendee);
-
+
if (address && *address)
return;
@@ -398,12 +398,12 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address
gtk_tree_path_free (treepath);
- if (!removed)
- g_signal_emit_by_name (G_OBJECT (view), "attendee_added", (gpointer) existing_attendee);
+ if (!removed)
+ g_signal_emit_by_name (G_OBJECT (view), "attendee_added", (gpointer) existing_attendee);
}
static void
-attendee_editing_canceled_cb (GtkCellRenderer *renderer, GtkTreeView *view)
+attendee_editing_canceled_cb (GtkCellRenderer *renderer, GtkTreeView *view)
{
EMeetingStore *model = E_MEETING_STORE (gtk_tree_view_get_model (view));
GtkTreePath *path;
@@ -414,14 +414,14 @@ attendee_editing_canceled_cb (GtkCellRenderer *renderer, GtkTreeView *view)
gtk_tree_view_get_cursor (view, &path, NULL);
if (!path)
return;
-
+
row = gtk_tree_path_get_indices (path)[0];
existing_attendee = e_meeting_store_find_attendee_at_row (model, row);
if (existing_attendee) {
if (!e_meeting_attendee_is_set_cn (existing_attendee) && !e_meeting_attendee_is_set_address (existing_attendee))
e_meeting_store_remove_attendee (model, existing_attendee);
}
-
+
gtk_tree_path_free (path);
}
@@ -472,7 +472,7 @@ build_table (EMeetingListView *lview)
GHashTable *edit_table;
GtkTreeViewColumn *col;
int pos;
-
+
priv = lview->priv;
edit_table = priv->renderers;
gtk_tree_view_set_headers_visible (view, TRUE);
@@ -493,8 +493,8 @@ build_table (EMeetingListView *lview)
g_object_set (col, "min-width", 50, NULL);
g_signal_connect (renderer, "cell_edited", G_CALLBACK (attendee_edited_cb), view);
g_signal_connect (renderer, "editing-canceled", G_CALLBACK (attendee_editing_canceled_cb), view);
- g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_ATTENDEE_COL), renderer);
-
+ g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_ATTENDEE_COL), renderer);
+
renderer = e_cell_renderer_combo_new ();
g_object_set (G_OBJECT (renderer), "list", get_type_strings (), "editable", TRUE, NULL);
pos = gtk_tree_view_insert_column_with_attributes (view, -1, _("Type"), renderer,
@@ -504,8 +504,8 @@ build_table (EMeetingListView *lview)
gtk_tree_view_column_set_resizable (col, TRUE);
gtk_tree_view_column_set_reorderable(col, TRUE);
g_signal_connect (renderer, "edited", G_CALLBACK (type_edited_cb), view);
- g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_TYPE_COL), renderer);
-
+ g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_TYPE_COL), renderer);
+
renderer = e_cell_renderer_combo_new ();
g_object_set (G_OBJECT (renderer), "list", get_role_strings (), "editable", TRUE, NULL);
pos = gtk_tree_view_insert_column_with_attributes (view, -1, _("Role"), renderer,
@@ -539,7 +539,7 @@ build_table (EMeetingListView *lview)
gtk_tree_view_column_set_reorderable(col, TRUE);
g_signal_connect (renderer, "edited", G_CALLBACK (status_edited_cb), view);
g_hash_table_insert (edit_table, GINT_TO_POINTER (E_MEETING_STORE_STATUS_COL), renderer);
-
+
priv->renderers = edit_table;
}
@@ -568,11 +568,11 @@ change_edit_cols_for_user (gpointer key, gpointer value, gpointer user_data)
}
}
-static void
+static void
change_edit_cols_for_organizer (gpointer key, gpointer value, gpointer user_data)
{
GtkCellRenderer *renderer = (GtkCellRenderer *) value;
- guint edit_level = GPOINTER_TO_INT (user_data);
+ guint edit_level = GPOINTER_TO_INT (user_data);
g_object_set (G_OBJECT (renderer), "editable", GINT_TO_POINTER (edit_level), NULL);
}
@@ -584,45 +584,45 @@ row_activated_cb (GtkTreeSelection *selection, EMeetingListView *view)
int row;
EMeetingAttendeeEditLevel el;
gint edit_level;
- GtkTreeModel *model;
+ GtkTreeModel *model;
GtkTreePath *path = NULL;
GList *paths=NULL;
priv = view->priv;
-
- if (!(paths = gtk_tree_selection_get_selected_rows (selection, &model)))
+
+ if (!(paths = gtk_tree_selection_get_selected_rows (selection, &model)))
return;
if (g_list_length (paths) > 1)
return;
path = g_list_nth_data (paths, 0);
if (!path)
return;
-
+
row = gtk_tree_path_get_indices (path)[0];
existing_attendee = e_meeting_store_find_attendee_at_row (priv->store, row);
el = e_meeting_attendee_get_edit_level (existing_attendee);
-
+
switch (el)
{
case E_MEETING_ATTENDEE_EDIT_NONE:
edit_level = FALSE;
g_hash_table_foreach (priv->renderers, change_edit_cols_for_organizer, GINT_TO_POINTER (edit_level));
break;
-
+
case E_MEETING_ATTENDEE_EDIT_FULL:
edit_level = TRUE;
g_hash_table_foreach (priv->renderers, change_edit_cols_for_organizer, GINT_TO_POINTER (edit_level));
break;
-
+
case E_MEETING_ATTENDEE_EDIT_STATUS:
edit_level = FALSE;
g_hash_table_foreach (priv->renderers, change_edit_cols_for_user, GINT_TO_POINTER (edit_level));
break;
}
-
+
}
-
+
EMeetingListView *
e_meeting_list_view_new (EMeetingStore *store)
@@ -664,7 +664,7 @@ e_meeting_list_view_edit (EMeetingListView *emlv, EMeetingAttendee *attendee)
EMeetingListViewPrivate *priv;
GtkTreePath *path;
GtkTreeViewColumn *focus_col;
-
+
priv = emlv->priv;
g_return_if_fail (emlv != NULL);
@@ -672,13 +672,13 @@ e_meeting_list_view_edit (EMeetingListView *emlv, EMeetingAttendee *attendee)
g_return_if_fail (attendee != NULL);
path = e_meeting_store_find_attendee_path (priv->store, attendee);
- focus_col = gtk_tree_view_get_column (GTK_TREE_VIEW (emlv), 0);
-
+ focus_col = gtk_tree_view_get_column (GTK_TREE_VIEW (emlv), 0);
+
if (path) {
gtk_tree_view_set_cursor (GTK_TREE_VIEW (emlv), path, focus_col, TRUE);
gtk_tree_path_free (path);
- }
+ }
}
static void
@@ -717,16 +717,16 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role
break;
}
}
-
+
if (book) {
GList *contacts;
EContact *n_con = NULL;
char *qu;
EBookQuery *query;
- qu = g_strdup_printf ("(is \"full_name\" \"%s\")",
+ qu = g_strdup_printf ("(is \"full_name\" \"%s\")",
(char *) e_contact_get (contact, E_CONTACT_FULL_NAME));
- query = e_book_query_from_string (qu);
+ query = e_book_query_from_string (qu);
if (!e_book_get_contacts (book, query, &contacts, NULL)) {
g_warning ("Could not get contact from the book \n");
@@ -738,7 +738,7 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role
e_destination_set_contact (des, n_con, 0);
list_dests = e_destination_list_get_dests (des);
- g_list_foreach (contacts, (GFunc) g_object_unref, NULL);
+ g_list_foreach (contacts, (GFunc) g_object_unref, NULL);
g_list_free (contacts);
}
@@ -752,14 +752,14 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role
card_dest.data = destination;
list_dests = &card_dest;
}
- }
-
+ }
+
for (l = list_dests; l; l = l->next) {
EDestination *dest = l->data;
EContact *contact;
const char *name, *attendee = NULL;
char *attr = NULL, *fburi = NULL;
-
+
name = e_destination_get_name (dest);
/* Get the field as attendee from the backend */
@@ -786,12 +786,12 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role
if (attendee == NULL || *attendee == '\0')
continue;
-
+
contact = e_destination_get_contact (dest);
- if (contact)
+ if (contact)
fburi = e_contact_get (contact, E_CONTACT_FREEBUSY_URL);
-
-
+
+
if (e_meeting_store_find_attendee (priv->store, attendee, NULL) == NULL) {
EMeetingAttendee *ia = e_meeting_store_add_attendee_with_defaults (priv->store);
@@ -800,7 +800,7 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role
if (role == ICAL_ROLE_NONPARTICIPANT)
e_meeting_attendee_set_cutype (ia, ICAL_CUTYPE_RESOURCE);
e_meeting_attendee_set_cn (ia, g_strdup (name));
-
+
if (fburi)
e_meeting_attendee_set_fburi (ia, fburi);
} else {
@@ -816,7 +816,7 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role
g_object_unref (des);
des = NULL;
}
-
+
}
}
@@ -841,10 +841,10 @@ name_selector_dialog_close_cb (ENameSelectorDialog *dialog, gint response, gpoin
name_selector_model = e_name_selector_peek_model (view->priv->name_selector);
store = E_MEETING_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (view)));
attendees = e_meeting_store_get_attendees (store);
-
+
/* get all the email ids of the attendees */
g_ptr_array_foreach ((GPtrArray *)attendees, (GFunc) add_to_list, &la);
-
+
for (i = 0; sections[i] != NULL; i++) {
EDestinationStore *destination_store;
GList *destinations;
@@ -886,7 +886,7 @@ e_meeting_list_view_invite_others_dialog (EMeetingListView *view)
gtk_widget_show (GTK_WIDGET (dialog));
}
-void
+void
e_meeting_list_view_set_editable (EMeetingListView *lview, gboolean set)
{
EMeetingListViewPrivate *priv = lview->priv;
@@ -896,24 +896,24 @@ e_meeting_list_view_set_editable (EMeetingListView *lview, gboolean set)
g_hash_table_foreach (priv->renderers, change_edit_cols_for_organizer, GINT_TO_POINTER (edit_level));
}
-ENameSelector *
-e_meeting_list_view_get_name_selector (EMeetingListView *lview)
+ENameSelector *
+e_meeting_list_view_get_name_selector (EMeetingListView *lview)
{
EMeetingListViewPrivate *priv;
-
+
g_return_val_if_fail (lview != NULL, NULL);
g_return_val_if_fail (E_IS_MEETING_LIST_VIEW (lview), NULL);
priv = lview->priv;
- return priv->name_selector;
+ return priv->name_selector;
}
void
e_meeting_list_view_set_name_selector (EMeetingListView *lview, ENameSelector *name_selector)
{
EMeetingListViewPrivate *priv;
-
+
g_return_if_fail (lview != NULL);
g_return_if_fail (E_IS_MEETING_LIST_VIEW (lview));
@@ -923,7 +923,7 @@ e_meeting_list_view_set_name_selector (EMeetingListView *lview, ENameSelector *n
g_object_unref (priv->name_selector);
priv->name_selector = NULL;
}
-
+
priv->name_selector = g_object_ref (name_selector);
}
diff --git a/calendar/gui/e-meeting-list-view.h b/calendar/gui/e-meeting-list-view.h
index fc49fe6014..f565381382 100644
--- a/calendar/gui/e-meeting-list-view.h
+++ b/calendar/gui/e-meeting-list-view.h
@@ -1,4 +1,4 @@
-/*
+/*
* e-meeting-list-view.h
*
* Author: Mike Kestner <mkestner@ximian.com>
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 65a4930d57..2703836049 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -1,4 +1,4 @@
-/*
+/*
* e-meeting-store.c
*
* Copyright (C) 2001-2003 Ximian, Inc.
@@ -47,7 +47,7 @@ struct _EMeetingStorePrivate {
ECal *client;
icaltimezone *zone;
-
+
char *fb_uri;
GPtrArray *refresh_queue;
@@ -67,13 +67,13 @@ struct _EMeetingStoreQueueData {
EMeetingAttendee *attendee;
gboolean refreshing;
-
+
EMeetingTime start;
EMeetingTime end;
char buffer[BUF_SIZE];
GString *string;
-
+
GPtrArray *call_backs;
GPtrArray *data;
};
@@ -134,7 +134,7 @@ text_to_role (const char *role)
}
static char *
-role_to_text (icalparameter_role role)
+role_to_text (icalparameter_role role)
{
switch (role) {
case ICAL_ROLE_CHAIR:
@@ -160,7 +160,7 @@ text_to_boolean (const char *role)
}
static char *
-boolean_to_text (gboolean b)
+boolean_to_text (gboolean b)
{
if (b)
return _("Yes");
@@ -190,7 +190,7 @@ text_to_partstat (const char *partstat)
}
static char *
-partstat_to_text (icalparameter_partstat partstat)
+partstat_to_text (icalparameter_partstat partstat)
{
switch (partstat) {
case ICAL_PARTSTAT_NEEDSACTION:
@@ -290,7 +290,7 @@ get_path (GtkTreeModel *model, GtkTreeIter *iter)
gtk_tree_path_append_index (result, row);
return result;
}
-
+
static void
get_value (GtkTreeModel *model, GtkTreeIter *iter, int col, GValue *value)
{
@@ -303,13 +303,13 @@ get_value (GtkTreeModel *model, GtkTreeIter *iter, int col, GValue *value)
g_return_if_fail (col >= 0 && col < E_MEETING_STORE_COLUMN_COUNT);
row = GPOINTER_TO_INT (iter->user_data);
- store = E_MEETING_STORE (model);
+ store = E_MEETING_STORE (model);
g_return_if_fail (iter->stamp == store->priv->stamp);
g_return_if_fail (ROW_VALID (E_MEETING_STORE (model), row));
attendee = g_ptr_array_index (store->priv->attendees, row);
-
+
switch (col) {
case E_MEETING_STORE_ADDRESS_COL:
g_value_init (value, G_TYPE_STRING);
@@ -387,14 +387,14 @@ iter_children (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent)
g_return_val_if_fail (E_IS_MEETING_STORE (model), FALSE);
- store = E_MEETING_STORE (model);
+ store = E_MEETING_STORE (model);
if (parent || store->priv->attendees->len <= 0)
return FALSE;
iter->stamp = store->priv->stamp;
iter->user_data = GINT_TO_POINTER (0);
-
+
return TRUE;
}
@@ -408,7 +408,7 @@ static int
iter_n_children (GtkTreeModel *model, GtkTreeIter *iter)
{
g_return_val_if_fail (E_IS_MEETING_STORE (model), -1);
-
+
if (!iter)
return E_MEETING_STORE (model)->priv->attendees->len;
@@ -424,7 +424,7 @@ iter_nth_child (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent, int
g_return_val_if_fail (E_IS_MEETING_STORE (model), FALSE);
- store = E_MEETING_STORE (model);
+ store = E_MEETING_STORE (model);
if (parent || !ROW_VALID (store, n))
return FALSE;
@@ -477,7 +477,7 @@ e_meeting_store_set_value (EMeetingStore *store, int row, int col, const gchar *
e_meeting_attendee_set_cutype (attendee, text_to_type (val));
if (type == ICAL_CUTYPE_RESOURCE) {
e_meeting_attendee_set_role (attendee, ICAL_ROLE_NONPARTICIPANT);
- }
+ }
break;
case E_MEETING_STORE_ROLE_COL:
e_meeting_attendee_set_role (attendee, text_to_role (val));
@@ -504,13 +504,13 @@ e_meeting_store_set_value (EMeetingStore *store, int row, int col, const gchar *
}
static void
-refresh_queue_remove (EMeetingStore *store, EMeetingAttendee *attendee)
+refresh_queue_remove (EMeetingStore *store, EMeetingAttendee *attendee)
{
EMeetingStorePrivate *priv;
EMeetingStoreQueueData *qdata;
-
+
priv = store->priv;
-
+
/* Free the queue data */
qdata = g_hash_table_lookup (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
if (qdata) {
@@ -533,12 +533,12 @@ ems_finalize (GObject *obj)
EMeetingStore *store = E_MEETING_STORE (obj);
EMeetingStorePrivate *priv;
int i;
-
+
priv = store->priv;
for (i = 0; i < priv->attendees->len; i++)
g_object_unref (g_ptr_array_index (priv->attendees, i));
- g_ptr_array_free (priv->attendees, TRUE);
+ g_ptr_array_free (priv->attendees, TRUE);
if (priv->client != NULL)
g_object_unref (priv->client);
@@ -547,7 +547,7 @@ ems_finalize (GObject *obj)
refresh_queue_remove (store, g_ptr_array_index (priv->refresh_queue, 0));
g_ptr_array_free (priv->refresh_queue, TRUE);
g_hash_table_destroy (priv->refresh_data);
-
+
if (priv->refresh_idle_id)
g_source_remove (priv->refresh_idle_id);
@@ -580,11 +580,11 @@ ems_init (EMeetingStore *store)
store->priv = priv;
priv->attendees = g_ptr_array_new ();
-
+
priv->zone = calendar_config_get_icaltimezone ();
priv->fb_uri = calendar_config_get_free_busy_template ();
-
+
priv->refresh_queue = g_ptr_array_new ();
priv->refresh_data = g_hash_table_new (g_str_hash, g_str_equal);
@@ -609,18 +609,18 @@ e_meeting_store_get_type (void)
sizeof (EMeetingStore),
0,
(GInstanceInitFunc) ems_init };
-
+
static const GInterfaceInfo tree_model_info = {
(GInterfaceInitFunc) ems_tree_model_init,
NULL,
NULL };
-
- ems_type = g_type_register_static (GTK_TYPE_LIST_STORE,
+
+ ems_type = g_type_register_static (GTK_TYPE_LIST_STORE,
"EMeetingStore",
&ems_info, 0);
-
- g_type_add_interface_static (ems_type,
- GTK_TYPE_TREE_MODEL,
+
+ g_type_add_interface_static (ems_type,
+ GTK_TYPE_TREE_MODEL,
&tree_model_info);
}
@@ -645,7 +645,7 @@ e_meeting_store_set_e_cal (EMeetingStore *store, ECal *client)
{
if (store->priv->client != NULL)
g_object_unref (store->priv->client);
-
+
if (client != NULL)
g_object_ref (client);
store->priv->client = client;
@@ -668,14 +668,14 @@ e_meeting_store_set_zone (EMeetingStore *store, icaltimezone *zone)
}
gchar *
-e_meeting_store_get_fb_uri (EMeetingStore *store)
+e_meeting_store_get_fb_uri (EMeetingStore *store)
{
g_return_val_if_fail (E_IS_MEETING_STORE (store), NULL);
return g_strdup (store->priv->fb_uri);
}
-void
+void
e_meeting_store_set_fb_uri (EMeetingStore *store, const gchar *fb_uri)
{
g_return_if_fail (E_IS_MEETING_STORE (store));
@@ -691,14 +691,14 @@ attendee_changed_cb (EMeetingAttendee *attendee, gpointer data)
GtkTreePath *path;
GtkTreeIter iter;
gint row = -1, i;
-
+
for (i = 0; i < store->priv->attendees->len; i++) {
if (attendee == g_ptr_array_index (store->priv->attendees, i)) {
row = i;
break;
}
}
-
+
if (row == -1)
return;
@@ -734,7 +734,7 @@ e_meeting_store_add_attendee_with_defaults (EMeetingStore *store)
{
EMeetingAttendee *attendee;
char *str;
-
+
attendee = E_MEETING_ATTENDEE (e_meeting_attendee_new ());
e_meeting_attendee_set_address (attendee, g_strdup (""));
@@ -745,11 +745,11 @@ e_meeting_store_add_attendee_with_defaults (EMeetingStore *store)
g_free (str);
str = g_strdup (_("Required Participant"));
e_meeting_attendee_set_role (attendee, text_to_role (str));
- g_free (str);
+ g_free (str);
str = g_strdup (_("Yes"));
e_meeting_attendee_set_rsvp (attendee, text_to_boolean (str));
g_free (str);
-
+
e_meeting_attendee_set_delto (attendee, g_strdup (""));
e_meeting_attendee_set_delfrom (attendee, g_strdup (""));
@@ -776,11 +776,11 @@ e_meeting_store_remove_attendee (EMeetingStore *store, EMeetingAttendee *attende
row = i;
break;
}
- }
-
+ }
+
if (row != -1) {
- g_ptr_array_remove_index (store->priv->attendees, row);
+ g_ptr_array_remove_index (store->priv->attendees, row);
g_object_unref (attendee);
path = gtk_tree_path_new ();
@@ -815,15 +815,15 @@ e_meeting_store_find_attendee (EMeetingStore *store, const gchar *address, gint
{
EMeetingAttendee *attendee;
int i;
-
+
if (address == NULL)
return NULL;
-
+
for (i = 0; i < store->priv->attendees->len; i++) {
const gchar *attendee_address;
-
+
attendee = g_ptr_array_index (store->priv->attendees, i);
-
+
attendee_address = e_meeting_attendee_get_address (attendee);
if (attendee_address && !g_ascii_strcasecmp (itip_strip_mailto (attendee_address), itip_strip_mailto (address))) {
if (row != NULL)
@@ -850,29 +850,29 @@ e_meeting_store_find_attendee_path (EMeetingStore *store, EMeetingAttendee *atte
{
GtkTreePath *path;
gint row = -1, i;
-
+
for (i = 0; i < store->priv->attendees->len; i++) {
if (attendee == g_ptr_array_index (store->priv->attendees, i)) {
row = i;
break;
}
}
-
+
if (row == -1)
return NULL;
path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, row);
- return path;
+ return path;
}
-gint
+gint
e_meeting_store_count_actual_attendees (EMeetingStore *store)
{
g_return_val_if_fail (E_IS_MEETING_STORE (store), 0);
- return store->priv->attendees->len;
+ return store->priv->attendees->len;
}
const GPtrArray *
@@ -893,7 +893,7 @@ find_zone (icalproperty *ip, icalcomponent *tz_top_level)
if (tz_top_level == NULL)
return NULL;
-
+
param = icalproperty_get_first_parameter (ip, ICAL_TZID_PARAMETER);
if (param == NULL)
return NULL;
@@ -913,10 +913,10 @@ find_zone (icalproperty *ip, icalcomponent *tz_top_level)
zone = icaltimezone_new ();
clone = icalcomponent_new_clone (sub_comp);
icaltimezone_set_component (zone, clone);
-
+
return zone;
}
-
+
icalcompiter_next (&iter);
}
@@ -924,7 +924,7 @@ find_zone (icalproperty *ip, icalcomponent *tz_top_level)
}
static void
-process_callbacks (EMeetingStoreQueueData *qdata)
+process_callbacks (EMeetingStoreQueueData *qdata)
{
EMeetingStore *store;
int i;
@@ -937,7 +937,7 @@ process_callbacks (EMeetingStoreQueueData *qdata)
call_back = g_ptr_array_index (qdata->call_backs, i);
data = g_ptr_array_index (qdata->data, i);
-
+
g_idle_add ((GSourceFunc) call_back, data);
}
@@ -956,12 +956,12 @@ process_free_busy_comp (EMeetingAttendee *attendee,
icalcomponent *tz_top_level)
{
icalproperty *ip;
-
+
ip = icalcomponent_get_first_property (fb_comp, ICAL_DTSTART_PROPERTY);
if (ip != NULL) {
struct icaltimetype dtstart;
icaltimezone *ds_zone;
-
+
dtstart = icalproperty_get_dtstart (ip);
if (!dtstart.is_utc)
ds_zone = find_zone (ip, tz_top_level);
@@ -975,12 +975,12 @@ process_free_busy_comp (EMeetingAttendee *attendee,
dtstart.hour,
dtstart.minute);
}
-
+
ip = icalcomponent_get_first_property (fb_comp, ICAL_DTEND_PROPERTY);
if (ip != NULL) {
struct icaltimetype dtend;
icaltimezone *de_zone;
-
+
dtend = icalproperty_get_dtend (ip);
if (!dtend.is_utc)
de_zone = find_zone (ip, tz_top_level);
@@ -994,19 +994,19 @@ process_free_busy_comp (EMeetingAttendee *attendee,
dtend.hour,
dtend.minute);
}
-
+
ip = icalcomponent_get_first_property (fb_comp, ICAL_FREEBUSY_PROPERTY);
while (ip != NULL) {
icalparameter *param;
struct icalperiodtype fb;
EMeetingFreeBusyType busy_type = E_MEETING_FREE_BUSY_LAST;
icalparameter_fbtype fbtype = ICAL_FBTYPE_BUSY;
-
+
fb = icalproperty_get_freebusy (ip);
param = icalproperty_get_first_parameter (ip, ICAL_FBTYPE_PARAMETER);
if (param != NULL)
fbtype = icalparameter_get_fbtype (param);
-
+
switch (fbtype) {
case ICAL_FBTYPE_BUSY:
busy_type = E_MEETING_FREE_BUSY_BUSY;
@@ -1023,7 +1023,7 @@ process_free_busy_comp (EMeetingAttendee *attendee,
default:
break;
}
-
+
if (busy_type != E_MEETING_FREE_BUSY_LAST) {
icaltimezone *utc_zone = icaltimezone_get_utc_timezone ();
@@ -1042,7 +1042,7 @@ process_free_busy_comp (EMeetingAttendee *attendee,
fb.end.minute,
busy_type);
}
-
+
ip = icalcomponent_get_next_property (fb_comp, ICAL_FREEBUSY_PROPERTY);
}
}
@@ -1065,19 +1065,19 @@ process_free_busy (EMeetingStoreQueueData *qdata, char *text)
}
kind = icalcomponent_isa (main_comp);
- if (kind == ICAL_VCALENDAR_COMPONENT) {
+ if (kind == ICAL_VCALENDAR_COMPONENT) {
icalcompiter iter;
icalcomponent *tz_top_level, *sub_comp;
tz_top_level = e_cal_util_new_top_level ();
-
+
iter = icalcomponent_begin_component (main_comp, ICAL_VTIMEZONE_COMPONENT);
while ((sub_comp = icalcompiter_deref (&iter)) != NULL) {
icalcomponent *clone;
-
+
clone = icalcomponent_new_clone (sub_comp);
icalcomponent_add_component (tz_top_level, clone);
-
+
icalcompiter_next (&iter);
}
@@ -1091,15 +1091,15 @@ process_free_busy (EMeetingStoreQueueData *qdata, char *text)
} else if (kind == ICAL_VFREEBUSY_COMPONENT) {
process_free_busy_comp (attendee, main_comp, priv->zone, NULL);
}
-
+
icalcomponent_free (main_comp);
process_callbacks (qdata);
}
-/*
- * Replace all instances of from_value in string with to_value
- * In the returned newly allocated string.
+/*
+ * Replace all instances of from_value in string with to_value
+ * In the returned newly allocated string.
*/
static gchar *
replace_string (gchar *string, gchar *from_value, gchar *to_value)
@@ -1142,13 +1142,13 @@ freebusy_async (gpointer data)
GnomeVFSAsyncHandle *handle;
if (fbd->client) {
- /* FIXME this a work around for getting all th free busy information for the users
+ /* FIXME this a work around for getting all th free busy information for the users
we should be able to get free busy asynchronously */
- g_static_mutex_lock (&mutex);
+ g_static_mutex_lock (&mutex);
priv->num_queries++;
e_cal_get_free_busy (fbd->client, fbd->users, fbd->startt, fbd->endt, &(fbd->fb_data), NULL);
priv->num_queries--;
- g_static_mutex_unlock (&mutex);
+ g_static_mutex_unlock (&mutex);
g_list_foreach (fbd->users, (GFunc)g_free, NULL);
g_list_free (fbd->users);
@@ -1156,7 +1156,7 @@ freebusy_async (gpointer data)
if (fbd->fb_data != NULL) {
ECalComponent *comp = fbd->fb_data->data;
char *comp_str;
-
+
comp_str = e_cal_component_get_as_string (comp);
process_free_busy (fbd->qdata, comp_str);
g_free (comp_str);
@@ -1177,14 +1177,14 @@ freebusy_async (gpointer data)
if (fburi) {
priv->num_queries++;
- gnome_vfs_async_open (&handle, fburi, GNOME_VFS_OPEN_READ,
- GNOME_VFS_PRIORITY_DEFAULT, start_async_read,
+ gnome_vfs_async_open (&handle, fburi, GNOME_VFS_OPEN_READ,
+ GNOME_VFS_PRIORITY_DEFAULT, start_async_read,
fbd->qdata);
g_free (fburi);
} else if (default_fb_uri != NULL && !g_str_equal (default_fb_uri, "")) {
gchar *tmp_fb_uri;
gchar **split_email;
-
+
split_email = g_strsplit (fbd->email, "@", 2);
tmp_fb_uri = replace_string (default_fb_uri, USER_SUB, split_email[0]);
@@ -1192,10 +1192,10 @@ freebusy_async (gpointer data)
default_fb_uri = replace_string (tmp_fb_uri, DOMAIN_SUB, split_email[1]);
priv->num_queries++;
- gnome_vfs_async_open (&handle, default_fb_uri, GNOME_VFS_OPEN_READ,
- GNOME_VFS_PRIORITY_DEFAULT, start_async_read,
+ gnome_vfs_async_open (&handle, default_fb_uri, GNOME_VFS_OPEN_READ,
+ GNOME_VFS_PRIORITY_DEFAULT, start_async_read,
fbd->qdata);
-
+
g_free (tmp_fb_uri);
g_strfreev (split_email);
g_free (default_fb_uri);
@@ -1212,7 +1212,7 @@ freebusy_async (gpointer data)
static gboolean
refresh_busy_periods (gpointer data)
-{
+{
EMeetingStore *store = E_MEETING_STORE (data);
EMeetingStorePrivate *priv;
EMeetingAttendee *attendee = NULL;
@@ -1221,7 +1221,7 @@ refresh_busy_periods (gpointer data)
GThread *thread;
GError *error = NULL;
FreeBusyAsyncData *fbd;
-
+
priv = store->priv;
/* Check to see if there are any remaining attendees in the queue */
@@ -1242,27 +1242,27 @@ refresh_busy_periods (gpointer data)
priv->refresh_idle_id = 0;
return FALSE;
}
-
+
/* Indicate we are trying to refresh it */
qdata->refreshing = TRUE;
/* We take a ref in case we get destroyed in the gui during a callback */
g_object_ref (qdata->store);
-
+
fbd = g_new0 (FreeBusyAsyncData, 1);
fbd->client = priv->client;
fbd->attendee = attendee;
fbd->users = NULL;
- fbd->fb_data = NULL;
+ fbd->fb_data = NULL;
fbd->qdata = qdata;
fbd->fb_uri = priv->fb_uri;
fbd->store = store;
fbd->email = g_strdup (itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
- /* Check the server for free busy data */
+ /* Check the server for free busy data */
if (priv->client) {
struct icaltimetype itt;
-
+
itt = icaltime_null_time ();
itt.year = g_date_get_year (&qdata->start.date);
itt.month = g_date_get_month (&qdata->start.date);
@@ -1308,13 +1308,13 @@ refresh_busy_periods (gpointer data)
return TRUE;
}
-
+
static void
refresh_queue_add (EMeetingStore *store, int row,
EMeetingTime *start,
EMeetingTime *end,
EMeetingStoreRefreshCallback call_back,
- gpointer data)
+ gpointer data)
{
EMeetingStorePrivate *priv;
EMeetingAttendee *attendee;
@@ -1330,7 +1330,7 @@ refresh_queue_add (EMeetingStore *store, int row,
/* check the queue if the attendee is already in there*/
for (i = 0; i < priv->refresh_queue->len; i++) {
if (attendee == g_ptr_array_index (priv->refresh_queue, i))
- return;
+ return;
if (!strcmp (e_meeting_attendee_get_address (attendee), e_meeting_attendee_get_address (g_ptr_array_index (priv->refresh_queue, i))))
return;
@@ -1399,16 +1399,16 @@ async_read (GnomeVFSAsyncHandle *handle,
gnome_vfs_async_close (handle, async_close, qdata);
return;
}
-
+
((char *)buffer)[read] = '\0';
qdata->string = g_string_append (qdata->string, buffer);
-
+
if (result == GNOME_VFS_ERROR_EOF) {
gnome_vfs_async_close (handle, async_close, qdata);
return;
}
- gnome_vfs_async_read (handle, qdata->buffer, buf_size, async_read, qdata);
+ gnome_vfs_async_read (handle, qdata->buffer, buf_size, async_read, qdata);
}
static void
@@ -1438,14 +1438,14 @@ e_meeting_store_refresh_all_busy_periods (EMeetingStore *store,
gpointer data)
{
int i;
-
+
g_return_if_fail (E_IS_MEETING_STORE (store));
-
+
for (i = 0; i < store->priv->attendees->len; i++)
refresh_queue_add (store, i, start, end, call_back, data);
}
-void
+void
e_meeting_store_refresh_busy_periods (EMeetingStore *store,
int row,
EMeetingTime *start,
diff --git a/calendar/gui/e-meeting-store.h b/calendar/gui/e-meeting-store.h
index d3998b033b..7f111f4676 100644
--- a/calendar/gui/e-meeting-store.h
+++ b/calendar/gui/e-meeting-store.h
@@ -1,4 +1,4 @@
-/*
+/*
* e-meeting-store.h
*
* Copyright (C) 2003 Ximian, Inc.
diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c
index e1de77024d..211d4c71bd 100644
--- a/calendar/gui/e-meeting-time-sel-item.c
+++ b/calendar/gui/e-meeting-time-sel-item.c
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@gtk.org>
*
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -132,7 +132,7 @@ static void
e_meeting_time_selector_item_init (EMeetingTimeSelectorItem *mts_item)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (mts_item);
-
+
mts_item->mts = NULL;
mts_item->main_gc = NULL;
@@ -182,7 +182,7 @@ e_meeting_time_selector_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
EMeetingTimeSelectorItem *mts_item;
mts_item = E_MEETING_TIME_SELECTOR_ITEM (o);
-
+
switch (arg_id){
case ARG_MEETING_TIME_SELECTOR:
mts_item->mts = GTK_VALUE_POINTER (*arg);
@@ -281,7 +281,7 @@ e_meeting_time_selector_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
gdk_cairo_set_source_color (cr, &mts->all_attendees_bg_color);
cairo_rectangle (cr, 0, mts->row_height * 2 - y,
width, mts->row_height);
- cairo_fill (cr);
+ cairo_fill (cr);
} else {
gdk_cairo_set_source_color (cr, &mts->bg_color);
cairo_rectangle (cr, 0, 0, width, height);
@@ -300,11 +300,11 @@ e_meeting_time_selector_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
gdk_cairo_set_source_color (cr, &mts->meeting_time_bg_color);
if (is_display_top){
cairo_rectangle (cr, meeting_start_x + 1 - x, mts->row_height * 2 - y,
- meeting_end_x - meeting_start_x - 2, mts->row_height);
+ meeting_end_x - meeting_start_x - 2, mts->row_height);
cairo_fill (cr);
} else {
cairo_rectangle (cr, meeting_start_x + 1 - x, 0,
- meeting_end_x - meeting_start_x - 2, height);
+ meeting_end_x - meeting_start_x - 2, height);
cairo_fill (cr);
}
cairo_restore (cr);
@@ -671,7 +671,7 @@ e_meeting_time_selector_item_paint_busy_periods (EMeetingTimeSelectorItem *mts_i
gdk_gc_set_foreground (gc, &mts->busy_colors[busy_type]);
red = mts->busy_colors[busy_type].red;
green = mts->busy_colors[busy_type].green;
- blue = mts->busy_colors[busy_type].blue;
+ blue = mts->busy_colors[busy_type].blue;
cairo_set_source_rgba (cr, red/cc, green/cc, blue/cc, 0.8);
e_meeting_time_selector_item_paint_attendee_busy_periods (mts_item, drawable, x, y, width, row, first_period, busy_type, cr);
}
@@ -920,7 +920,7 @@ e_meeting_time_selector_item_button_press (EMeetingTimeSelectorItem *mts_item,
end_time = start_time;
g_date_add_days (&end_time.date, 1);
}
-
+
/* Fix any overflows. */
e_meeting_time_selector_fix_time_overflows (&end_time);
@@ -1047,11 +1047,11 @@ e_meeting_time_selector_item_calculate_busy_range (EMeetingTimeSelector *mts,
EMeetingAttendee *ia;
EMeetingTime busy_periods_start;
EMeetingTime busy_periods_end;
-
+
ia = e_meeting_store_find_attendee_at_row (mts->model, row);
busy_periods_start = e_meeting_attendee_get_start_busy_range (ia);
busy_periods_end = e_meeting_attendee_get_end_busy_range (ia);
-
+
*start_x = -1;
*end_x = -1;
@@ -1066,7 +1066,7 @@ e_meeting_time_selector_item_calculate_busy_range (EMeetingTimeSelector *mts,
return TRUE;
}
-void
+void
e_meeting_time_selector_item_set_normal_cursor (EMeetingTimeSelectorItem *mts_item)
{
g_return_if_fail (IS_E_MEETING_TIME_SELECTOR_ITEM (mts_item));
diff --git a/calendar/gui/e-meeting-time-sel-item.h b/calendar/gui/e-meeting-time-sel-item.h
index e4cf050f80..1ef96699d2 100644
--- a/calendar/gui/e-meeting-time-sel-item.h
+++ b/calendar/gui/e-meeting-time-sel-item.h
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@gtk.org>
*
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 035ddaaa4e..cadb1d3c9a 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -1,15 +1,15 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors :
+/*
+ * Authors :
* Damon Chaplin <damon@gtk.org>
* Rodrigo Moya <rodrigo@novell.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 2004, Novell, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -69,22 +69,22 @@
/* An array of hour strings for 24 hour time, "0:00" .. "23:00". */
const gchar *EMeetingTimeSelectorHours[24] = {
- "0:00", "1:00", "2:00", "3:00", "4:00", "5:00", "6:00", "7:00",
- "8:00", "9:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00",
+ "0:00", "1:00", "2:00", "3:00", "4:00", "5:00", "6:00", "7:00",
+ "8:00", "9:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00",
"16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00", "23:00"
};
/* An array of hour strings for 12 hour time, "12:00am" .. "11:00pm". */
const gchar *EMeetingTimeSelectorHours12[24] = {
- "12:00am", "1:00am", "2:00am", "3:00am", "4:00am", "5:00am", "6:00am",
- "7:00am", "8:00am", "9:00am", "10:00am", "11:00am", "12:00pm",
+ "12:00am", "1:00am", "2:00am", "3:00am", "4:00am", "5:00am", "6:00am",
+ "7:00am", "8:00am", "9:00am", "10:00am", "11:00am", "12:00pm",
"1:00pm", "2:00pm", "3:00pm", "4:00pm", "5:00pm", "6:00pm", "7:00pm",
"8:00pm", "9:00pm", "10:00pm", "11:00pm"
};
/* The number of days shown in the entire canvas. */
-#define E_MEETING_TIME_SELECTOR_DAYS_SHOWN 35
-#define E_MEETING_TIME_SELECTOR_DAYS_START_BEFORE 7
+#define E_MEETING_TIME_SELECTOR_DAYS_SHOWN 35
+#define E_MEETING_TIME_SELECTOR_DAYS_START_BEFORE 7
#define E_MEETING_TIME_SELECTOR_FB_DAYS_BEFORE 7
#define E_MEETING_TIME_SELECTOR_FB_DAYS_AFTER 28
@@ -222,10 +222,10 @@ e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * klass)
object_class = (GtkObjectClass *) klass;
widget_class = (GtkWidgetClass *) klass;
- mts_signals [CHANGED] =
+ mts_signals [CHANGED] =
gtk_signal_new ("changed", GTK_RUN_FIRST,
G_TYPE_FROM_CLASS (object_class),
- GTK_SIGNAL_OFFSET (EMeetingTimeSelectorClass,
+ GTK_SIGNAL_OFFSET (EMeetingTimeSelectorClass,
changed),
gtk_signal_default_marshaller,
GTK_TYPE_NONE, 0);
@@ -257,7 +257,7 @@ e_meeting_time_selector_init (EMeetingTimeSelector * mts)
mts->list_view = NULL;
- mts->fb_uri_not =
+ mts->fb_uri_not =
calendar_config_add_notification_free_busy_template ((GConfClientNotifyFunc) free_busy_template_changed_cb,
mts);
@@ -310,7 +310,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
mts->attendees_vbox_spacer = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), mts->attendees_vbox_spacer, FALSE, FALSE, 0);
gtk_widget_show (mts->attendees_vbox_spacer);
-
+
mts->attendees_vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), mts->attendees_vbox, TRUE, TRUE, 0);
gtk_widget_show (mts->attendees_vbox);
@@ -331,10 +331,10 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
e_meeting_list_view_column_set_visible (mts->list_view, "RSVP", FALSE);
e_meeting_list_view_column_set_visible (mts->list_view, "Status", FALSE);
e_meeting_list_view_column_set_visible (mts->list_view, "Type", FALSE);
-
+
gtk_widget_show (GTK_WIDGET (mts->list_view));
-
+
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
@@ -609,7 +609,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
e_date_edit_set_show_time (E_DATE_EDIT (mts->start_date_edit), TRUE);
e_date_edit_set_use_24_hour_format (E_DATE_EDIT (mts->start_date_edit),
calendar_config_get_24_hour_format ());
-
+
gtk_table_attach (GTK_TABLE (table), mts->start_date_edit,
1, 2, 0, 1, GTK_FILL, 0, 0, 0);
gtk_widget_show (mts->start_date_edit);
@@ -683,7 +683,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
e_meeting_time_selector_recalc_grid (mts);
e_meeting_time_selector_ensure_meeting_time_shown (mts);
e_meeting_time_selector_update_start_date_edit (mts);
- e_meeting_time_selector_update_end_date_edit (mts);
+ e_meeting_time_selector_update_end_date_edit (mts);
e_meeting_time_selector_update_date_popup_menus (mts);
gtk_signal_emit (GTK_OBJECT (mts), mts_signals [CHANGED]);
@@ -759,7 +759,7 @@ e_meeting_time_selector_alloc_named_color (EMeetingTimeSelector * mts,
const char *name, GdkColor *c)
{
GdkColormap *colormap;
-
+
g_return_if_fail (name != NULL);
g_return_if_fail (c != NULL);
@@ -810,7 +810,7 @@ e_meeting_time_selector_new (EMeetingStore *ems)
mts = GTK_WIDGET (g_object_new (e_meeting_time_selector_get_type (), NULL));
e_meeting_time_selector_construct (E_MEETING_TIME_SELECTOR (mts), ems);
-
+
return mts;
}
@@ -823,17 +823,17 @@ e_meeting_time_selector_destroy (GtkObject *object)
mts = E_MEETING_TIME_SELECTOR (object);
e_meeting_time_selector_remove_timeout (mts);
-
+
if (mts->stipple) {
g_object_unref (mts->stipple);
mts->stipple = NULL;
}
-
+
if (mts->model) {
g_object_unref (mts->model);
mts->model = NULL;
}
-
+
mts->display_top = NULL;
mts->display_main = NULL;
@@ -842,7 +842,7 @@ e_meeting_time_selector_destroy (GtkObject *object)
if (mts->fb_refresh_not != 0) {
g_source_remove (mts->fb_refresh_not);
}
-
+
if (GTK_OBJECT_CLASS (e_meeting_time_selector_parent_class)->destroy)
(*GTK_OBJECT_CLASS (e_meeting_time_selector_parent_class)->destroy)(object);
}
@@ -886,7 +886,7 @@ get_cell_height (GtkTreeView *tree)
gtk_tree_view_column_cell_get_size (column, NULL,
NULL, NULL,
NULL, &height);
-
+
return height;
}
@@ -914,7 +914,7 @@ e_meeting_time_selector_style_set (GtkWidget *widget,
font_metrics = pango_context_get_metrics (pango_context, font_desc,
pango_context_get_language (pango_context));
layout = pango_layout_new (pango_context);
-
+
/* Calculate the widths of the hour strings in the style's font. */
max_hour_width = 0;
for (hour = 0; hour < 24; hour++) {
@@ -926,16 +926,16 @@ e_meeting_time_selector_style_set (GtkWidget *widget,
pango_layout_get_pixel_size (layout, &mts->hour_widths [hour], NULL);
max_hour_width = MAX (max_hour_width, mts->hour_widths[hour]);
}
-
+
mts->row_height = get_cell_height (GTK_TREE_VIEW (mts->list_view));
mts->col_width = max_hour_width + 6;
e_meeting_time_selector_save_position (mts, &saved_time);
e_meeting_time_selector_recalc_grid (mts);
e_meeting_time_selector_restore_position (mts, &saved_time);
-
+
gtk_widget_set_size_request (mts->display_top, -1, mts->row_height * 3 + 4);
-
+
/*
* FIXME: I can't find a way to get the treeview header heights
* other than the below but it isn't nice to realize that widget here
@@ -946,7 +946,7 @@ e_meeting_time_selector_style_set (GtkWidget *widget,
NULL, &maxheight);
gtk_widget_set_size_request (mts->attendees_vbox_spacer, 1, mts->row_height * 3 - maxheight);
- */
+ */
gtk_widget_set_size_request (mts->attendees_vbox_spacer, 1, mts->row_height * 2 - 6);
@@ -1102,7 +1102,7 @@ e_meeting_time_selector_set_all_day (EMeetingTimeSelector *mts,
EMeetingTime saved_time;
mts->all_day = all_day;
-
+
e_date_edit_set_show_time (E_DATE_EDIT (mts->start_date_edit),
!all_day);
e_date_edit_set_show_time (E_DATE_EDIT (mts->end_date_edit),
@@ -1169,7 +1169,7 @@ e_meeting_time_selector_set_working_hours (EMeetingTimeSelector *mts,
mts->day_end_hour = day_start_hour + 1;
mts->day_end_minute = day_start_minute;
}
-
+
e_meeting_time_selector_save_position (mts, &saved_time);
e_meeting_time_selector_recalc_grid (mts);
e_meeting_time_selector_restore_position (mts, &saved_time);
@@ -1201,8 +1201,8 @@ e_meeting_time_selector_set_zoomed_out (EMeetingTimeSelector *mts,
gtk_widget_queue_draw (mts->display_main);
}
-static gboolean
-e_meeting_time_selector_refresh_cb (gpointer data)
+static gboolean
+e_meeting_time_selector_refresh_cb (gpointer data)
{
EMeetingTimeSelector *mts = data;
@@ -1211,7 +1211,7 @@ e_meeting_time_selector_refresh_cb (gpointer data)
mts->last_cursor_set = GDK_LEFT_PTR;
e_meeting_time_selector_item_set_normal_cursor (E_MEETING_TIME_SELECTOR_ITEM (mts->item_top));
e_meeting_time_selector_item_set_normal_cursor (E_MEETING_TIME_SELECTOR_ITEM (mts->item_main));
- }
+ }
if (mts->display_top != NULL)
gtk_widget_queue_draw (mts->display_top);
@@ -1227,7 +1227,7 @@ void
e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, int row, gboolean all)
{
EMeetingTime start, end;
-
+
start = mts->meeting_start_time;
g_date_subtract_days (&start.date, E_MEETING_TIME_SELECTOR_FB_DAYS_BEFORE);
start.hour = 0;
@@ -1235,7 +1235,7 @@ e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, int row, g
end = mts->meeting_end_time;
g_date_add_days (&end.date, E_MEETING_TIME_SELECTOR_FB_DAYS_AFTER);
end.hour = 0;
- end.minute = 0;
+ end.minute = 0;
/* set the cursor to Busy, We need to reset it to normal once the free busy
queries are complete */
@@ -1249,18 +1249,18 @@ e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, int row, g
* notification */
if (all) {
int i;
-
+
for (i = 0; i < e_meeting_store_count_actual_attendees (mts->model); i++)
gtk_object_ref (GTK_OBJECT (mts));
} else {
gtk_object_ref (GTK_OBJECT (mts));
}
-
+
if (all)
- e_meeting_store_refresh_all_busy_periods (mts->model, &start, &end,
+ e_meeting_store_refresh_all_busy_periods (mts->model, &start, &end,
e_meeting_time_selector_refresh_cb, mts);
else
- e_meeting_store_refresh_busy_periods (mts->model, row, &start, &end,
+ e_meeting_store_refresh_busy_periods (mts->model, row, &start, &end,
e_meeting_time_selector_refresh_cb, mts);
}
@@ -1554,7 +1554,7 @@ e_meeting_time_selector_autopick (EMeetingTimeSelector *mts,
/* Get the current meeting duration in days + hours + minutes. */
e_meeting_time_selector_calculate_time_difference (&mts->meeting_start_time, &mts->meeting_end_time, &duration_days, &duration_hours, &duration_minutes);
-
+
/* Find the first appropriate start time. */
start_time = mts->meeting_start_time;
if (forward)
@@ -1706,10 +1706,10 @@ e_meeting_time_selector_find_nearest_interval (EMeetingTimeSelector *mts,
} else {
g_date_add_days (&start_time->date, 1);
start_time->hour = 0;
- start_time->minute = 0;
+ start_time->minute = 0;
}
e_meeting_time_selector_fix_time_overflows (start_time);
-
+
*end_time = *start_time;
e_meeting_time_selector_adjust_time (end_time, days, hours, mins);
@@ -1752,7 +1752,7 @@ e_meeting_time_selector_find_nearest_interval (EMeetingTimeSelector *mts,
start_time->minute += 29;
start_time->minute -= start_time->minute % 30;
}
-
+
e_meeting_time_selector_fix_time_overflows (start_time);
*end_time = *start_time;
@@ -1795,7 +1795,7 @@ e_meeting_time_selector_find_nearest_interval_backward (EMeetingTimeSelector *mt
} else {
g_date_subtract_days (&start_time->date, 1);
start_time->hour = 0;
- start_time->minute = 0;
+ start_time->minute = 0;
}
*end_time = *start_time;
@@ -1839,7 +1839,7 @@ e_meeting_time_selector_find_nearest_interval_backward (EMeetingTimeSelector *mt
} else {
start_time->minute -= start_time->minute % 30;
}
-
+
*end_time = *start_time;
e_meeting_time_selector_adjust_time (end_time, days, hours, mins);
}
@@ -2408,7 +2408,7 @@ e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts,
if (drag_time.hour > 12)
g_date_add_days (&drag_time.date, 1);
drag_time.hour = 0;
- drag_time.minute = 0;
+ drag_time.minute = 0;
}
e_meeting_time_selector_fix_time_overflows (&drag_time);
@@ -2437,7 +2437,7 @@ e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts,
&& mts->dragging_position == E_MEETING_TIME_SELECTOR_POS_END
&& e_meeting_time_compare_times (&mts->meeting_start_time, &drag_time) == 0)
return;
-
+
*time_to_set = drag_time;
/* Check if the start time and end time need to be switched. */
@@ -2454,7 +2454,7 @@ e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts,
set_both_times = TRUE;
}
-
+
/* Mark the calculated positions as invalid. */
mts->meeting_positions_valid = FALSE;
@@ -2661,7 +2661,7 @@ static void
e_meeting_time_selector_update_end_date_edit (EMeetingTimeSelector *mts)
{
GDate date;
-
+
date = mts->meeting_end_time.date;
if (mts->all_day)
g_date_subtract_days (&date, 1);
@@ -2702,7 +2702,7 @@ e_meeting_time_selector_ensure_meeting_time_shown (EMeetingTimeSelector *mts)
time.minute = 0;
start_x = e_meeting_time_selector_calculate_time_position (mts, &time);
}
-
+
gnome_canvas_get_scroll_offsets (GNOME_CANVAS (mts->display_main),
&scroll_x, &scroll_y);
canvas_width = mts->display_main->allocation.width;
@@ -2905,18 +2905,18 @@ static gboolean
free_busy_timeout_refresh (gpointer data)
{
char *fb_uri;
-
+
EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data);
fb_uri = calendar_config_get_free_busy_template ();
e_meeting_store_set_fb_uri (mts->model, fb_uri);
g_free (fb_uri);
-
+
/* Update all free/busy info, so we use the new template uri */
e_meeting_time_selector_refresh_free_busy (mts, 0, TRUE);
mts->fb_refresh_not = 0;
-
+
return FALSE;
}
@@ -2930,10 +2930,10 @@ free_busy_template_changed_cb (GConfClient *client,
/* Wait REFRESH_PAUSE before refreshing, using the latest uri value */
if (mts->fb_refresh_not != 0) {
- g_source_remove (mts->fb_refresh_not);
+ g_source_remove (mts->fb_refresh_not);
}
- mts->fb_refresh_not = g_timeout_add (REFRESH_PAUSE,
- free_busy_timeout_refresh,
+ mts->fb_refresh_not = g_timeout_add (REFRESH_PAUSE,
+ free_busy_timeout_refresh,
data);
}
diff --git a/calendar/gui/e-meeting-time-sel.h b/calendar/gui/e-meeting-time-sel.h
index e071df37fe..9b95c7d767 100644
--- a/calendar/gui/e-meeting-time-sel.h
+++ b/calendar/gui/e-meeting-time-sel.h
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@gtk.org>
*
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -118,11 +118,11 @@ struct _EMeetingTimeSelector
with PACK_START if necessary. */
GtkWidget *attendees_vbox;
GtkWidget *attendees_vbox_spacer;
-
+
/* The etable and model */
EMeetingStore *model;
EMeetingListView *list_view;
-
+
/* The canvas displaying the dates, times, and the summary
'All Attendees' free/busy display. */
GtkWidget *display_top;
@@ -190,7 +190,7 @@ struct _EMeetingTimeSelector
/* True if we are selecting all day events */
gboolean all_day;
-
+
/* If this is TRUE we only show hours between day_start_hour and
day_end_hour, defaults to TRUE (9am-6pm). */
gboolean working_hours_only;
diff --git a/calendar/gui/e-memo-table-config.c b/calendar/gui/e-memo-table-config.c
index 15e19eb392..8f3729c61e 100644
--- a/calendar/gui/e-memo-table-config.c
+++ b/calendar/gui/e-memo-table-config.c
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
* Nathan Owens <pianocomp81@yahoo.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -29,7 +29,7 @@ struct _EMemoTableConfigPrivate {
EMemoTable *table;
ECellDateEditConfig *cell_config;
-
+
GList *notifications;
};
@@ -47,7 +47,7 @@ e_memo_table_config_set_property (GObject *object, guint property_id, const GVal
EMemoTableConfig *table_config;
table_config = E_MEMO_TABLE_CONFIG (object);
-
+
switch (property_id) {
case PROP_TABLE:
e_memo_table_config_set_table (table_config, g_value_get_object (value));
@@ -64,7 +64,7 @@ e_memo_table_config_get_property (GObject *object, guint property_id, GValue *va
EMemoTableConfig *table_config;
table_config = E_MEMO_TABLE_CONFIG (object);
-
+
switch (property_id) {
case PROP_TABLE:
g_value_set_object (value, e_memo_table_config_get_table (table_config));
@@ -81,7 +81,7 @@ e_memo_table_config_dispose (GObject *object)
EMemoTableConfig *table_config = E_MEMO_TABLE_CONFIG (object);
e_memo_table_config_set_table (table_config, NULL);
-
+
if (G_OBJECT_CLASS (e_memo_table_config_parent_class)->dispose)
G_OBJECT_CLASS (e_memo_table_config_parent_class)->dispose (object);
}
@@ -91,11 +91,11 @@ e_memo_table_config_finalize (GObject *object)
{
EMemoTableConfig *table_config = E_MEMO_TABLE_CONFIG (object);
EMemoTableConfigPrivate *priv;
-
+
priv = table_config->priv;
g_free (priv);
-
+
if (G_OBJECT_CLASS (e_memo_table_config_parent_class)->finalize)
G_OBJECT_CLASS (e_memo_table_config_parent_class)->finalize (object);
}
@@ -128,14 +128,14 @@ EMemoTableConfig *
e_memo_table_config_new (EMemoTable *table)
{
EMemoTableConfig *table_config;
-
+
table_config = g_object_new (e_memo_table_config_get_type (), "table", table, NULL);
return table_config;
}
EMemoTable *
-e_memo_table_config_get_table (EMemoTableConfig *table_config)
+e_memo_table_config_get_table (EMemoTableConfig *table_config)
{
EMemoTableConfigPrivate *priv;
@@ -143,16 +143,16 @@ e_memo_table_config_get_table (EMemoTableConfig *table_config)
g_return_val_if_fail (E_IS_MEMO_TABLE_CONFIG (table_config), NULL);
priv = table_config->priv;
-
+
return priv->table;
}
static void
-set_timezone (EMemoTable *table)
+set_timezone (EMemoTable *table)
{
ECalModel *model;
icaltimezone *zone;
-
+
zone = calendar_config_get_icaltimezone ();
model = e_memo_table_get_model (table);
if (model)
@@ -164,14 +164,14 @@ timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer
{
EMemoTableConfig *table_config = data;
EMemoTableConfigPrivate *priv;
-
+
priv = table_config->priv;
-
+
set_timezone (priv->table);
}
static void
-set_twentyfour_hour (EMemoTable *table)
+set_twentyfour_hour (EMemoTable *table)
{
ECalModel *model;
gboolean use_24_hour;
@@ -188,29 +188,29 @@ twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gp
{
EMemoTableConfig *table_config = data;
EMemoTableConfigPrivate *priv;
-
+
priv = table_config->priv;
-
+
set_twentyfour_hour (priv->table);
}
void
-e_memo_table_config_set_table (EMemoTableConfig *table_config, EMemoTable *table)
+e_memo_table_config_set_table (EMemoTableConfig *table_config, EMemoTable *table)
{
EMemoTableConfigPrivate *priv;
guint not;
GList *l;
-
+
g_return_if_fail (table_config != NULL);
g_return_if_fail (E_IS_MEMO_TABLE_CONFIG (table_config));
priv = table_config->priv;
-
+
if (priv->table) {
g_object_unref (priv->table);
priv->table = NULL;
}
-
+
if (priv->cell_config) {
g_object_unref (priv->cell_config);
priv->cell_config = NULL;
@@ -225,17 +225,17 @@ e_memo_table_config_set_table (EMemoTableConfig *table_config, EMemoTable *table
/* If the new view is NULL, return right now */
if (!table)
return;
-
+
priv->table = g_object_ref (table);
/* Time zone */
set_timezone (table);
-
+
not = calendar_config_add_notification_timezone (timezone_changed_cb, table_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* 24 Hour format */
- set_twentyfour_hour (table);
+ set_twentyfour_hour (table);
not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, table_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
diff --git a/calendar/gui/e-memo-table-config.h b/calendar/gui/e-memo-table-config.h
index 15e9a06d3a..ce4006df48 100644
--- a/calendar/gui/e-memo-table-config.h
+++ b/calendar/gui/e-memo-table-config.h
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
* Nathan Owens <pianocomp81@yahoo.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -31,7 +31,7 @@ G_BEGIN_DECLS
#define E_MEMO_TABLE_CONFIG(obj) GTK_CHECK_CAST (obj, e_memo_table_config_get_type (), EMemoTableConfig)
#define E_MEMO_TABLE_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_memo_table_config_get_type (), EMemoTableConfigClass)
#define E_IS_MEMO_TABLE_CONFIG(obj) GTK_CHECK_TYPE (obj, e_memo_table_config_get_type ())
-
+
typedef struct _EMemoTableConfig EMemoTableConfig;
typedef struct _EMemoTableConfigClass EMemoTableConfigClass;
typedef struct _EMemoTableConfigPrivate EMemoTableConfigPrivate;
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index 4ac8147fdf..aaf451244c 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -178,7 +178,7 @@ date_compare_cb (gconstpointer a, gconstpointer b)
}
static void
-row_appended_cb (ECalModel *model, EMemoTable *memo_table)
+row_appended_cb (ECalModel *model, EMemoTable *memo_table)
{
g_signal_emit (memo_table, signals[USER_CREATED], 0);
}
@@ -236,7 +236,7 @@ e_memo_table_init (EMemoTable *memo_table)
/* Sorting */
e_table_extras_add_compare (extras, "date-compare",
date_compare_cb);
-
+
/* Create pixmaps */
if (!icon_pixbufs[0])
@@ -274,7 +274,7 @@ e_memo_table_init (EMemoTable *memo_table)
g_signal_connect (e_table, "right_click", G_CALLBACK (e_memo_table_on_right_click), memo_table);
g_signal_connect (e_table, "key_press", G_CALLBACK (e_memo_table_on_key_press), memo_table);
g_signal_connect (e_table, "popup_menu", G_CALLBACK (e_memo_table_on_popup_menu), memo_table);
-
+
a11y = gtk_widget_get_accessible (GTK_WIDGET(e_table));
if (a11y)
atk_object_set_name (a11y, _("Memos"));
@@ -301,9 +301,9 @@ e_memo_table_new (void)
/**
* e_memo_table_get_model:
* @memo_table: A calendar table.
- *
+ *
* Queries the calendar data model that a calendar table is using.
- *
+ *
* Return value: A memo model.
**/
ECalModel *
@@ -334,9 +334,9 @@ e_memo_table_destroy (GtkObject *object)
/**
* e_memo_table_get_table:
* @memo_table: A calendar table.
- *
+ *
* Queries the #ETable widget that the calendar table is using.
- *
+ *
* Return value: The #ETable widget that the calendar table uses to display its
* data.
**/
@@ -371,7 +371,7 @@ get_selected_row_cb (int model_row, gpointer data)
*row = model_row;
}
-/*
+/*
* Returns the component that is selected in the table; only works if there is
* one and only one selected row.
*/
@@ -441,8 +441,8 @@ delete_selected_components (EMemoTable *memo_table)
for (l = objs; l; l = l->next) {
ECalModelComponent *comp_data = (ECalModelComponent *) l->data;
GError *error = NULL;
-
- e_cal_remove_object (comp_data->client,
+
+ e_cal_remove_object (comp_data->client,
icalcomponent_get_uid (comp_data->icalcomp), &error);
delete_error_dialog (error, E_CAL_COMPONENT_JOURNAL);
g_clear_error (&error);
@@ -455,10 +455,10 @@ delete_selected_components (EMemoTable *memo_table)
/**
* e_memo_table_get_selected:
- * @memo_table:
- *
+ * @memo_table:
+ *
* Get the currently selected ECalModelComponent's on the table.
- *
+ *
* Return value: A GSList of the components, which should be
* g_slist_free'd when finished with.
**/
@@ -471,7 +471,7 @@ e_memo_table_get_selected (EMemoTable *memo_table)
/**
* e_memo_table_delete_selected:
* @memo_table: A memo table.
- *
+ *
* Deletes the selected components in the table; asks the user first.
**/
void
@@ -502,7 +502,7 @@ e_memo_table_delete_selected (EMemoTable *memo_table)
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
}
-
+
if (delete_component_dialog (comp, FALSE, n_selected, E_CAL_COMPONENT_JOURNAL,
GTK_WIDGET (memo_table)))
delete_selected_components (memo_table);
@@ -589,7 +589,7 @@ e_memo_table_copy_clipboard (EMemoTable *memo_table)
ETable *etable;
GtkClipboard *clipboard;
char *comp_str;
-
+
g_return_if_fail (E_IS_MEMO_TABLE (memo_table));
/* create temporary VCALENDAR object */
@@ -606,7 +606,7 @@ e_memo_table_copy_clipboard (EMemoTable *memo_table)
} else {
gtk_clipboard_set_can_store (clipboard, target_types + 1, n_target_types - 1);
}
-
+
/* free memory */
icalcomponent_free (memo_table->tmp_vcal);
memo_table->tmp_vcal = NULL;
@@ -638,7 +638,7 @@ clipboard_get_calendar_data (EMemoTable *memo_table, const gchar *text)
}
client = e_cal_model_get_default_client (memo_table->model);
-
+
e_memo_table_set_status_message (memo_table, _("Updating objects"));
if (kind == ICAL_VCALENDAR_COMPONENT) {
@@ -690,7 +690,7 @@ clipboard_paste_received_cb (GtkClipboard *clipboard,
GtkSelectionData *selection_data,
gpointer data)
{
- EMemoTable *memo_table = E_MEMO_TABLE (data);
+ EMemoTable *memo_table = E_MEMO_TABLE (data);
ETable *e_table = e_table_scrolled_get_table (E_TABLE_SCROLLED (memo_table->etable));
GnomeCanvas *canvas = e_table->table_canvas;
GnomeCanvasItem *item = GNOME_CANVAS (canvas)->focused_item;
@@ -743,7 +743,7 @@ open_memo (EMemoTable *memo_table, ECalModelComponent *comp_data)
{
CompEditor *medit;
const char *uid;
-
+
uid = icalcomponent_get_uid (comp_data->icalcomp);
medit = e_comp_editor_registry_find (comp_editor_registry, uid);
@@ -763,10 +763,10 @@ open_memo (EMemoTable *memo_table, ECalModelComponent *comp_data)
medit = COMP_EDITOR (memo_editor_new (comp_data->client, flags));
comp_editor_edit_comp (medit, comp);
-
+
e_comp_editor_registry_add (comp_editor_registry, medit, FALSE);
}
-
+
comp_editor_focus (medit);
}
@@ -782,7 +782,7 @@ open_memo_by_row (EMemoTable *memo_table, int row)
static void
e_memo_table_on_double_click (ETable *table,
- gint row,
+ gint row,
gint col,
GdkEvent *event,
EMemoTable *memo_table)
@@ -809,22 +809,22 @@ e_memo_table_on_save_as (EPopup *ep, EPopupItem *pitem, void *data)
ECalModelComponent *comp_data;
char *filename;
char *ical_string;
-
+
comp_data = get_selected_comp (memo_table);
if (comp_data == NULL)
return;
-
+
filename = e_file_dialog_save (_("Save as..."), NULL);
if (filename == NULL)
return;
-
+
ical_string = e_cal_get_component_as_string (comp_data->client, comp_data->icalcomp);
if (ical_string == NULL) {
g_warning ("Couldn't convert item to a string");
return;
}
- e_write_file_uri (filename, ical_string);
+ e_write_file_uri (filename, ical_string);
g_free (ical_string);
}
@@ -838,7 +838,7 @@ e_memo_table_on_print_memo (EPopup *ep, EPopupItem *pitem, void *data)
comp_data = get_selected_comp (memo_table);
if (comp_data == NULL)
return;
-
+
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
print_comp (comp, comp_data->client, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
@@ -866,7 +866,7 @@ static void
e_memo_table_on_paste (EPopup *ep, EPopupItem *pitem, void *data)
{
EMemoTable *memo_table = E_MEMO_TABLE (data);
-
+
e_memo_table_paste_clipboard (memo_table);
}
@@ -923,7 +923,7 @@ static EPopupItem memos_popup_items [] = {
{ E_POPUP_ITEM, "20.print", N_("_Print..."), e_memo_table_on_print_memo, NULL, GTK_STOCK_PRINT, E_CAL_POPUP_SELECT_ONE },
{ E_POPUP_BAR, "30.bar" },
-
+
{ E_POPUP_ITEM, "40.cut", N_("C_ut"), e_memo_table_on_cut, NULL, GTK_STOCK_CUT, 0, E_CAL_POPUP_SELECT_EDITABLE },
{ E_POPUP_ITEM, "50.copy", N_("_Copy"), e_memo_table_on_copy, NULL, GTK_STOCK_COPY, 0, 0 },
{ E_POPUP_ITEM, "60.paste", N_("_Paste"), e_memo_table_on_paste, NULL, GTK_STOCK_PASTE, 0, E_CAL_POPUP_SELECT_EDITABLE },
@@ -1022,7 +1022,7 @@ e_memo_table_on_key_press (ETable *table,
} else if ((event->keyval == GDK_o)
&&(event->state & GDK_CONTROL_MASK)) {
open_memo_by_row (memo_table, row);
- return TRUE;
+ return TRUE;
}
return FALSE;
@@ -1110,7 +1110,7 @@ e_memo_table_set_status_message (EMemoTable *memo_table, const gchar *message)
if (!memo_table->activity_handler)
return;
-
+
if (!message || !*message) {
if (memo_table->activity_id != 0) {
e_activity_handler_operation_finished (memo_table->activity_handler, memo_table->activity_id);
@@ -1118,7 +1118,7 @@ e_memo_table_set_status_message (EMemoTable *memo_table, const gchar *message)
}
} else if (memo_table->activity_id == 0) {
char *client_id = g_strdup_printf ("%p", memo_table);
-
+
if (progress_icon == NULL)
progress_icon = e_icon_factory_get_icon (EVOLUTION_MEMOS_PROGRESS_IMAGE, E_ICON_SIZE_STATUS);
diff --git a/calendar/gui/e-memo-table.h b/calendar/gui/e-memo-table.h
index 5168735c58..5ce2f03cbc 100644
--- a/calendar/gui/e-memo-table.h
+++ b/calendar/gui/e-memo-table.h
@@ -1,15 +1,15 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
* Nathan Owens <pianocomp81@yahoo.com>
*
* Copyright 2000, Ximian, Inc.
* Copyright 2000, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-memos.c b/calendar/gui/e-memos.c
index a028f5e47b..6d5120787d 100644
--- a/calendar/gui/e-memos.c
+++ b/calendar/gui/e-memos.c
@@ -68,13 +68,13 @@ struct _EMemosPrivate {
ECal *default_client;
ECalView *query;
-
+
EConfigListener *config_listener;
-
+
/* The EMemoTable showing the memos. */
GtkWidget *memos_view;
EMemoTableConfig *memos_view_config;
-
+
/* Calendar search bar for memos */
GtkWidget *search_bar;
@@ -83,11 +83,11 @@ struct _EMemosPrivate {
/* The preview */
GtkWidget *preview;
-
+
gchar *current_uid;
char *sexp;
guint update_timeout;
-
+
/* View instance and the view menus handler */
GalViewInstance *view_instance;
GalViewMenus *view_menus;
@@ -141,27 +141,27 @@ table_cursor_change_cb (ETable *etable, int row, gpointer data)
priv = memos->priv;
n_selected = e_table_selected_count (etable);
-
+
/* update the HTML widget */
if (n_selected != 1) {
e_cal_component_memo_preview_clear (E_CAL_COMPONENT_MEMO_PREVIEW (priv->preview));
return;
}
-
+
model = e_memo_table_get_model (E_MEMO_TABLE (priv->memos_view));
-
+
comp_data = e_cal_model_get_component_at (model, e_table_get_cursor_row (etable));
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
e_cal_component_memo_preview_display (E_CAL_COMPONENT_MEMO_PREVIEW (priv->preview), comp_data->client, comp);
-
+
e_cal_component_get_uid (comp, &uid);
if (priv->current_uid)
g_free (priv->current_uid);
priv->current_uid = g_strdup (uid);
-
+
g_object_unref (comp);
}
@@ -182,10 +182,10 @@ table_selection_change_cb (ETable *etable, gpointer data)
static void
user_created_cb (GtkWidget *view, EMemos *memos)
{
- EMemosPrivate *priv;
+ EMemosPrivate *priv;
EMemoTable *memo_table;
ECal *ecal;
-
+
priv = memos->priv;
memo_table = E_MEMO_TABLE (priv->memos_view);
@@ -213,9 +213,9 @@ search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer
if (priv->sexp)
g_free (priv->sexp);
-
+
priv->sexp = g_strdup (sexp);
-
+
update_view (memos);
}
@@ -243,14 +243,14 @@ vpaned_resized_cb (GtkWidget *widget, GdkEventButton *event, EMemos *memos)
}
static void
-set_timezone (EMemos *memos)
+set_timezone (EMemos *memos)
{
EMemosPrivate *priv;
icaltimezone *zone;
GList *l;
-
+
priv = memos->priv;
-
+
zone = calendar_config_get_icaltimezone ();
for (l = priv->clients_list; l != NULL; l = l->next) {
ECal *client = l->data;
@@ -272,7 +272,7 @@ static void
timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
{
EMemos *memos = data;
-
+
set_timezone (memos);
}
@@ -281,19 +281,19 @@ update_view (EMemos *memos)
{
EMemosPrivate *priv;
ECalModel *model;
-
+
priv = memos->priv;
model = e_memo_table_get_model (E_MEMO_TABLE (priv->memos_view));
-
+
e_cal_model_set_search_query (model, priv->sexp);
-
+
e_cal_component_memo_preview_clear (E_CAL_COMPONENT_MEMO_PREVIEW (priv->preview));
}
static gboolean
update_view_cb (EMemos *memos)
-{
+{
update_view (memos);
return TRUE;
@@ -333,10 +333,10 @@ setup_config (EMemos *memos)
guint not;
priv = memos->priv;
-
+
/* Timezone */
set_timezone (memos);
-
+
not = calendar_config_add_notification_timezone (timezone_changed_cb, memos);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
}
@@ -458,7 +458,7 @@ table_drag_data_get (ETable *table,
}
}
-static void
+static void
table_drag_data_delete (ETable *table,
int row,
int col,
@@ -501,7 +501,7 @@ setup_widgets (EMemos *memos)
G_CALLBACK (search_bar_sexp_changed_cb), memos);
g_signal_connect (priv->search_bar, "category_changed",
G_CALLBACK (search_bar_category_changed_cb), memos);
-
+
/* TODO Why doesn't this work?? */
config_categories_changed_cb (priv->config_listener, "/apps/evolution/general/category_master_list", memos);
@@ -522,13 +522,13 @@ setup_widgets (EMemos *memos)
/* create the memo list */
priv->memos_view = e_memo_table_new ();
priv->memos_view_config = e_memo_table_config_new (E_MEMO_TABLE (priv->memos_view));
-
+
g_signal_connect (priv->memos_view, "user_created", G_CALLBACK (user_created_cb), memos);
etable = e_table_scrolled_get_table (
E_TABLE_SCROLLED (E_MEMO_TABLE (priv->memos_view)->etable));
e_table_set_state (etable, E_MEMOS_TABLE_DEFAULT_STATE);
-
+
gtk_paned_add1 (GTK_PANED (priv->paned), priv->memos_view);
gtk_widget_show (priv->memos_view);
@@ -536,7 +536,7 @@ setup_widgets (EMemos *memos)
e_table_drag_source_set (etable, GDK_BUTTON1_MASK,
list_drag_types, num_list_drag_types,
GDK_ACTION_MOVE|GDK_ACTION_COPY|GDK_ACTION_ASK);
-
+
g_signal_connect (etable, "table_drag_data_get",
G_CALLBACK(table_drag_data_get), memos);
g_signal_connect (etable, "table_drag_data_delete",
@@ -570,7 +570,7 @@ e_memos_class_init (EMemosClass *klass)
e_memos_signals[SELECTION_CHANGED] =
gtk_signal_new ("selection_changed",
GTK_RUN_LAST,
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (object_class),
GTK_SIGNAL_OFFSET (EMemosClass, selection_changed),
g_cclosure_marshal_VOID__INT,
GTK_TYPE_NONE, 1,
@@ -634,17 +634,17 @@ static void
e_memos_init (EMemos *memos)
{
EMemosPrivate *priv;
-
+
priv = g_new0 (EMemosPrivate, 1);
memos->priv = priv;
setup_config (memos);
setup_widgets (memos);
-
+
priv->config_listener = e_config_listener_new ();
g_signal_connect (priv->config_listener, "key_changed", G_CALLBACK (config_categories_changed_cb), memos);
- priv->clients = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
+ priv->clients = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
priv->query = NULL;
priv->view_instance = NULL;
priv->view_menus = NULL;
@@ -716,7 +716,7 @@ e_memos_destroy (GtkObject *object)
g_object_unref (priv->config_listener);
priv->config_listener = NULL;
}
-
+
/* disconnect from signals on all the clients */
for (l = priv->clients_list; l != NULL; l = l->next) {
g_signal_handlers_disconnect_matched (l->data, G_SIGNAL_MATCH_DATA,
@@ -734,7 +734,7 @@ e_memos_destroy (GtkObject *object)
g_free (priv->current_uid);
priv->current_uid = NULL;
}
-
+
if (priv->sexp) {
g_free (priv->sexp);
priv->sexp = NULL;
@@ -744,12 +744,12 @@ e_memos_destroy (GtkObject *object)
g_source_remove (priv->update_timeout);
priv->update_timeout = 0;
}
-
+
if (priv->memos_view_config) {
g_object_unref (priv->memos_view_config);
priv->memos_view_config = NULL;
}
-
+
for (l = priv->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
priv->notifications = NULL;
@@ -777,7 +777,7 @@ set_status_message (EMemos *memos, const char *message, ...)
}
priv = memos->priv;
-
+
e_memo_table_set_status_message (E_MEMO_TABLE (priv->memos_view), msg_string);
}
@@ -812,7 +812,7 @@ backend_died_cb (ECal *client, gpointer data)
EMemos *memos;
EMemosPrivate *priv;
ESource *source;
-
+
memos = E_MEMOS (data);
priv = memos->priv;
@@ -824,10 +824,10 @@ backend_died_cb (ECal *client, gpointer data)
gtk_signal_emit (GTK_OBJECT (memos), e_memos_signals[SOURCE_REMOVED], source);
e_memo_table_set_status_message (E_MEMO_TABLE (e_memos_get_calendar_table (memos)), NULL);
-
+
e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (memos))),
"calendar:memos-crashed", NULL);
-
+
g_object_unref (source);
}
@@ -894,7 +894,7 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, EMemos *memos)
case E_CALENDAR_STATUS_OK :
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, default_client_cal_opened_cb, NULL);
model = e_memo_table_get_model (E_MEMO_TABLE (priv->memos_view));
-
+
set_timezone (memos);
e_cal_model_set_default_client (model, ecal);
set_status_message (memos, NULL);
@@ -940,7 +940,7 @@ void
e_memos_open_memo (EMemos *memos)
{
EMemoTable *cal_table;
-
+
cal_table = e_memos_get_calendar_table (memos);
e_memo_table_open_selected (cal_table);
}
@@ -972,10 +972,10 @@ e_memos_add_memo_source (EMemos *memos, ESource *source)
return TRUE;
} else {
ESource *default_source;
-
+
if (priv->default_client) {
default_source = e_cal_get_source (priv->default_client);
-
+
/* We don't have it but the default client is it */
if (!strcmp (e_source_peek_uid (default_source), uid))
client = g_object_ref (priv->default_client);
@@ -993,7 +993,7 @@ e_memos_add_memo_source (EMemos *memos, ESource *source)
/* g_signal_connect (G_OBJECT (client), "categories_changed", G_CALLBACK (client_categories_changed_cb), memos); */
g_signal_connect (G_OBJECT (client), "backend_died", G_CALLBACK (backend_died_cb), memos);
- /* add the client to internal structure */
+ /* add the client to internal structure */
g_hash_table_insert (priv->clients, g_strdup (uid) , client);
priv->clients_list = g_list_prepend (priv->clients_list, client);
@@ -1020,19 +1020,19 @@ e_memos_remove_memo_source (EMemos *memos, ESource *source)
uid = e_source_peek_uid (source);
client = g_hash_table_lookup (priv->clients, uid);
- if (!client)
+ if (!client)
return TRUE;
-
+
priv->clients_list = g_list_remove (priv->clients_list, client);
g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, memos);
+ 0, 0, NULL, NULL, memos);
model = e_memo_table_get_model (E_MEMO_TABLE (priv->memos_view));
e_cal_model_remove_client (model, client);
g_hash_table_remove (priv->clients, uid);
-
+
gtk_signal_emit (GTK_OBJECT (memos), e_memos_signals[SOURCE_REMOVED], source);
@@ -1044,7 +1044,7 @@ e_memos_set_default_source (EMemos *memos, ESource *source)
{
EMemosPrivate *priv;
ECal *ecal;
-
+
g_return_val_if_fail (memos != NULL, FALSE);
g_return_val_if_fail (E_IS_MEMOS (memos), FALSE);
g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
@@ -1073,20 +1073,20 @@ ECal *
e_memos_get_default_client (EMemos *memos)
{
EMemosPrivate *priv;
-
+
g_return_val_if_fail (memos != NULL, NULL);
g_return_val_if_fail (E_IS_MEMOS (memos), NULL);
priv = memos->priv;
- return e_cal_model_get_default_client (e_memo_table_get_model (E_MEMO_TABLE (priv->memos_view)));
+ return e_cal_model_get_default_client (e_memo_table_get_model (E_MEMO_TABLE (priv->memos_view)));
}
/**
* e_memos_delete_selected:
* @memos: A memos control widget.
- *
+ *
* Deletes the selected memos in the memo list.
**/
void
@@ -1128,7 +1128,7 @@ display_view_cb (GalViewInstance *instance, GalView *view, gpointer data)
* e_memos_setup_view_menus:
* @memos: A memos widget.
* @uic: UI controller to use for the menus.
- *
+ *
* Sets up the #GalView menus for a memos control. This function should be
* called from the Bonobo control activation callback for this memos control.
* Also, the menus should be discarded using e_memos_discard_view_menus().
@@ -1164,7 +1164,7 @@ e_memos_setup_view_menus (EMemos *memos, BonoboUIComponent *uic)
dir0 = g_build_filename (EVOLUTION_GALVIEWSDIR,
"memos",
NULL);
- dir1 = g_build_filename (memos_component_peek_base_directory (memos_component_peek ()),
+ dir1 = g_build_filename (memos_component_peek_base_directory (memos_component_peek ()),
"memos", "views", NULL);
gal_view_collection_set_storage_directories (collection,
dir0,
@@ -1204,7 +1204,7 @@ e_memos_setup_view_menus (EMemos *memos, BonoboUIComponent *uic)
/**
* e_memos_discard_view_menus:
* @memos: A memos widget.
- *
+ *
* Discards the #GalView menus used by a memos control. This function should be
* called from the Bonobo control deactivation callback for this memos control.
* The menus should have been set up with e_memos_setup_view_menus().
@@ -1234,9 +1234,9 @@ e_memos_discard_view_menus (EMemos *memos)
/**
* e_memos_get_calendar_table:
* @memos: A memos widget.
- *
+ *
* Queries the #EMemoTable contained in a memos widget.
- *
+ *
* Return value: The #EMemoTable that the memos widget uses to display its
* information.
**/
diff --git a/calendar/gui/e-mini-calendar-config.c b/calendar/gui/e-mini-calendar-config.c
index 9325d60cd9..7165811a2f 100644
--- a/calendar/gui/e-mini-calendar-config.c
+++ b/calendar/gui/e-mini-calendar-config.c
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -43,7 +43,7 @@ e_mini_calendar_config_set_property (GObject *object, guint property_id, const G
EMiniCalendarConfig *mini_config;
mini_config = E_MINI_CALENDAR_CONFIG (object);
-
+
switch (property_id) {
case PROP_CALENDAR:
e_mini_calendar_config_set_calendar (mini_config, g_value_get_object (value));
@@ -60,7 +60,7 @@ e_mini_calendar_config_get_property (GObject *object, guint property_id, GValue
EMiniCalendarConfig *mini_config;
mini_config = E_MINI_CALENDAR_CONFIG (object);
-
+
switch (property_id) {
case PROP_CALENDAR:
g_value_set_object (value, e_mini_calendar_config_get_calendar (mini_config));
@@ -75,9 +75,9 @@ static void
e_mini_calendar_config_dispose (GObject *object)
{
EMiniCalendarConfig *mini_config = E_MINI_CALENDAR_CONFIG (object);
-
+
e_mini_calendar_config_set_calendar (mini_config, NULL);
-
+
if (G_OBJECT_CLASS (e_mini_calendar_config_parent_class)->dispose)
G_OBJECT_CLASS (e_mini_calendar_config_parent_class)->dispose (object);
}
@@ -87,11 +87,11 @@ e_mini_calendar_config_finalize (GObject *object)
{
EMiniCalendarConfig *mini_config = E_MINI_CALENDAR_CONFIG (object);
EMiniCalendarConfigPrivate *priv;
-
+
priv = mini_config->priv;
g_free (priv);
-
+
if (G_OBJECT_CLASS (e_mini_calendar_config_parent_class)->finalize)
G_OBJECT_CLASS (e_mini_calendar_config_parent_class)->finalize (object);
}
@@ -101,7 +101,7 @@ e_mini_calendar_config_class_init (EMiniCalendarConfigClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *spec;
-
+
/* Method override */
gobject_class->set_property = e_mini_calendar_config_set_property;
gobject_class->get_property = e_mini_calendar_config_get_property;
@@ -124,14 +124,14 @@ EMiniCalendarConfig *
e_mini_calendar_config_new (ECalendar *mini_cal)
{
EMiniCalendarConfig *mini_config;
-
+
mini_config = g_object_new (e_mini_calendar_config_get_type (), "calendar", mini_cal, NULL);
return mini_config;
}
ECalendar *
-e_mini_calendar_config_get_calendar (EMiniCalendarConfig *mini_config)
+e_mini_calendar_config_get_calendar (EMiniCalendarConfig *mini_config)
{
EMiniCalendarConfigPrivate *priv;
@@ -139,14 +139,14 @@ e_mini_calendar_config_get_calendar (EMiniCalendarConfig *mini_config)
g_return_val_if_fail (E_IS_MINI_CALENDAR_CONFIG (mini_config), NULL);
priv = mini_config->priv;
-
+
return priv->mini_cal;
}
static void
-set_week_start (ECalendar *mini_cal)
+set_week_start (ECalendar *mini_cal)
{
- int week_start_day;
+ int week_start_day;
week_start_day = calendar_config_get_week_start_day ();
@@ -163,14 +163,14 @@ week_start_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointe
{
EMiniCalendarConfig *mini_config = data;
EMiniCalendarConfigPrivate *priv;
-
+
priv = mini_config->priv;
-
+
set_week_start (priv->mini_cal);
}
static void
-set_dnav_show_week_no (ECalendar *mini_cal)
+set_dnav_show_week_no (ECalendar *mini_cal)
{
gboolean show_week_no;
@@ -186,29 +186,29 @@ dnav_show_week_no_changed_cb (GConfClient *client, guint id, GConfEntry *entry,
{
EMiniCalendarConfig *mini_config = data;
EMiniCalendarConfigPrivate *priv;
-
+
priv = mini_config->priv;
-
+
set_dnav_show_week_no (priv->mini_cal);
}
void
-e_mini_calendar_config_set_calendar (EMiniCalendarConfig *mini_config, ECalendar *mini_cal)
+e_mini_calendar_config_set_calendar (EMiniCalendarConfig *mini_config, ECalendar *mini_cal)
{
EMiniCalendarConfigPrivate *priv;
guint not;
GList *l;
-
+
g_return_if_fail (mini_config != NULL);
g_return_if_fail (E_IS_MINI_CALENDAR_CONFIG (mini_config));
priv = mini_config->priv;
-
+
if (priv->mini_cal) {
g_object_unref (priv->mini_cal);
priv->mini_cal = NULL;
}
-
+
for (l = priv->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
@@ -218,7 +218,7 @@ e_mini_calendar_config_set_calendar (EMiniCalendarConfig *mini_config, ECalendar
/* If the new view is NULL, return right now */
if (!mini_cal)
return;
-
+
priv->mini_cal = g_object_ref (mini_cal);
/* Week start */
diff --git a/calendar/gui/e-mini-calendar-config.h b/calendar/gui/e-mini-calendar-config.h
index a8ece07fbf..de252cdf25 100644
--- a/calendar/gui/e-mini-calendar-config.h
+++ b/calendar/gui/e-mini-calendar-config.h
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
#define E_MINI_CALENDAR_CONFIG(obj) GTK_CHECK_CAST (obj, e_mini_calendar_config_get_type (), EMiniCalendarConfig)
#define E_MINI_CALENDAR_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_mini_calendar_config_get_type (), EMiniCalendarConfigClass)
#define E_IS_MINI_CALENDAR_CONFIG(obj) GTK_CHECK_TYPE (obj, e_mini_calendar_config_get_type ())
-
+
typedef struct _EMiniCalendarConfig EMiniCalendarConfig;
typedef struct _EMiniCalendarConfigClass EMiniCalendarConfigClass;
typedef struct _EMiniCalendarConfigPrivate EMiniCalendarConfigPrivate;
diff --git a/calendar/gui/e-select-names-editable.c b/calendar/gui/e-select-names-editable.c
index 74f4e16d50..c258c7f43c 100644
--- a/calendar/gui/e-select-names-editable.c
+++ b/calendar/gui/e-select-names-editable.c
@@ -6,7 +6,7 @@
* Copyright (C) 2003 Ximian Inc.
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -60,7 +60,7 @@ static void
esne_class_init (GObjectClass *klass)
{
klass->finalize = esne_finalize;
-
+
parent_class = E_NAME_SELECTOR_ENTRY_CLASS (g_type_class_peek_parent (klass));
}
@@ -68,7 +68,7 @@ GType
e_select_names_editable_get_type (void)
{
static GType esne_type = 0;
-
+
if (!esne_type) {
static const GTypeInfo esne_info = {
sizeof (ESelectNamesEditableClass),
@@ -84,15 +84,15 @@ e_select_names_editable_get_type (void)
static const GInterfaceInfo cell_editable_info = {
(GInterfaceInitFunc) esne_cell_editable_init,
- NULL,
- NULL
+ NULL,
+ NULL
};
-
+
esne_type = g_type_register_static (E_TYPE_NAME_SELECTOR_ENTRY, "ESelectNamesEditable", &esne_info, 0);
-
+
g_type_add_interface_static (esne_type, GTK_TYPE_CELL_EDITABLE, &cell_editable_info);
}
-
+
return esne_type;
}
@@ -141,7 +141,7 @@ e_select_names_editable_get_emails (ESelectNamesEditable *esne)
return NULL;
destination = destinations->data;
- if (e_destination_is_evolution_list (destination)) {
+ if (e_destination_is_evolution_list (destination)) {
const GList *list_dests, *l;
list_dests = e_destination_list_get_dests (destination);
@@ -151,7 +151,7 @@ e_select_names_editable_get_emails (ESelectNamesEditable *esne)
} else {
/* check if the contact is contact list, it does not contain all the email ids */
/* we dont expand it currently, TODO do we need to expand it by getting it from addressbook*/
- if (e_destination_get_contact (destination) &&
+ if (e_destination_get_contact (destination) &&
e_contact_get (e_destination_get_contact (destination), E_CONTACT_IS_LIST)) {
/* If its a contact_list which is not expanded, it wont have a email id,
so we can use the name as the email id */
@@ -202,10 +202,10 @@ e_select_names_editable_get_names (ESelectNamesEditable *esne)
if (!destinations)
return NULL;
- destination = destinations->data;
+ destination = destinations->data;
if (e_destination_is_evolution_list (destination)) {
const GList *list_dests, *l;
-
+
list_dests = e_destination_list_get_dests (destination);
for (l = list_dests; l != NULL; l = g_list_next (l)) {
result = g_list_append (result, g_strdup (e_destination_get_name (l->data)));
@@ -238,7 +238,7 @@ e_select_names_editable_set_address (ESelectNamesEditable *esne, const gchar *na
e_destination_set_name (destination, name);
e_destination_set_email (destination, email);
-
+
if (!destinations)
e_destination_store_append_destination (destination_store, destination);
g_object_unref (destination);
diff --git a/calendar/gui/e-select-names-editable.h b/calendar/gui/e-select-names-editable.h
index c2c7c2e3e9..5177bba391 100644
--- a/calendar/gui/e-select-names-editable.h
+++ b/calendar/gui/e-select-names-editable.h
@@ -6,7 +6,7 @@
* Copyright (C) 2003 Ximian Inc.
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-select-names-renderer.c b/calendar/gui/e-select-names-renderer.c
index 4cbc49bd05..e1c001cdc5 100644
--- a/calendar/gui/e-select-names-renderer.c
+++ b/calendar/gui/e-select-names-renderer.c
@@ -6,7 +6,7 @@
* Copyright (C) 2003 Ximian Inc.
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -61,13 +61,13 @@ e_select_names_renderer_editing_done (GtkCellEditable *editable, ESelectNamesRen
g_signal_handlers_disconnect_matched (editable, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, cell);
if (GTK_ENTRY (editable)->editing_canceled) {
- gtk_cell_renderer_stop_editing (GTK_CELL_RENDERER (cell), TRUE);
+ gtk_cell_renderer_stop_editing (GTK_CELL_RENDERER (cell), TRUE);
goto cleanup;
}
-
+
addresses = e_select_names_editable_get_emails (E_SELECT_NAMES_EDITABLE (editable));
names = e_select_names_editable_get_names (E_SELECT_NAMES_EDITABLE (editable));
-
+
g_signal_emit (cell, signals [CELL_EDITED], 0, cell->priv->path, addresses, names);
g_list_foreach (addresses, (GFunc)g_free, NULL);
@@ -97,14 +97,14 @@ e_select_names_renderer_start_editing (GtkCellRenderer *cell, GdkEvent *event, G
ESelectNamesRenderer *sn_cell = E_SELECT_NAMES_RENDERER (cell);
GtkCellRendererText *text_cell = GTK_CELL_RENDERER_TEXT (cell);
ESelectNamesEditable *editable;
-
+
if (!text_cell->editable)
return NULL;
editable = E_SELECT_NAMES_EDITABLE (e_select_names_editable_new ());
gtk_entry_set_has_frame (GTK_ENTRY (editable), FALSE);
gtk_entry_set_alignment (GTK_ENTRY (editable), cell->xalign);
- if (sn_cell->priv->email && *sn_cell->priv->email)
+ if (sn_cell->priv->email && *sn_cell->priv->email)
e_select_names_editable_set_address (editable, sn_cell->priv->name, sn_cell->priv->email);
gtk_widget_show (GTK_WIDGET (editable));
@@ -182,7 +182,7 @@ e_select_names_renderer_class_init (ESelectNamesRendererClass *class)
{
GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class);
GObjectClass *obj_class = G_OBJECT_CLASS (class);
-
+
obj_class->finalize = e_select_names_renderer_finalize;
obj_class->get_property = e_select_names_renderer_get_property;
obj_class->set_property = e_select_names_renderer_set_property;
diff --git a/calendar/gui/e-select-names-renderer.h b/calendar/gui/e-select-names-renderer.h
index e15b307e5f..8087977ace 100644
--- a/calendar/gui/e-select-names-renderer.h
+++ b/calendar/gui/e-select-names-renderer.h
@@ -6,7 +6,7 @@
* Copyright (C) 2003 Ximian Inc.
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -49,10 +49,10 @@ struct _ESelectNamesRendererClass
{
GtkCellRendererTextClass parent_class;
- void (* cell_edited) (ESelectNamesRenderer *renderer,
- const gchar *path,
- GList *addresses,
- GList *names);
+ void (* cell_edited) (ESelectNamesRenderer *renderer,
+ const gchar *path,
+ GList *addresses,
+ GList *names);
};
GType e_select_names_renderer_get_type (void);
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index a2faca60f4..b127fdab30 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -69,13 +69,13 @@ struct _ETasksPrivate {
ECal *default_client;
ECalView *query;
-
+
EConfigListener *config_listener;
/* The ECalendarTable showing the tasks. */
GtkWidget *tasks_view;
ECalendarTableConfig *tasks_view_config;
-
+
/* Calendar search bar for tasks */
GtkWidget *search_bar;
@@ -87,11 +87,11 @@ struct _ETasksPrivate {
/* The preview */
GtkWidget *preview;
-
+
gchar *current_uid;
char *sexp;
guint update_timeout;
-
+
/* View instance and the view menus handler */
GalViewInstance *view_instance;
GalViewMenus *view_menus;
@@ -145,27 +145,27 @@ table_cursor_change_cb (ETable *etable, int row, gpointer data)
priv = tasks->priv;
n_selected = e_table_selected_count (etable);
-
+
/* update the HTML widget */
if (n_selected != 1) {
e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (priv->preview));
return;
}
-
+
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-
+
comp_data = e_cal_model_get_component_at (model, e_table_get_cursor_row (etable));
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
e_cal_component_preview_display (E_CAL_COMPONENT_PREVIEW (priv->preview), comp_data->client, comp);
-
+
e_cal_component_get_uid (comp, &uid);
if (priv->current_uid)
g_free (priv->current_uid);
priv->current_uid = g_strdup (uid);
-
+
g_object_unref (comp);
}
@@ -226,7 +226,7 @@ search_bar_sexp_changed_cb (CalSearchBar *cal_search, const char *sexp, gpointer
if (priv->sexp)
g_free (priv->sexp);
-
+
priv->sexp = g_strdup (sexp);
update_view (tasks);
@@ -256,14 +256,14 @@ vpaned_resized_cb (GtkWidget *widget, GdkEventButton *event, ETasks *tasks)
}
static void
-set_timezone (ETasks *tasks)
+set_timezone (ETasks *tasks)
{
ETasksPrivate *priv;
icaltimezone *zone;
GList *l;
-
+
priv = tasks->priv;
-
+
zone = calendar_config_get_icaltimezone ();
for (l = priv->clients_list; l != NULL; l = l->next) {
ECal *client = l->data;
@@ -271,7 +271,7 @@ set_timezone (ETasks *tasks)
e_cal_set_default_timezone (client, zone, NULL);
}
- if (priv->default_client)
+ if (priv->default_client)
/* FIXME Error checking */
e_cal_set_default_timezone (priv->default_client, zone, NULL);
@@ -283,7 +283,7 @@ static void
timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
{
ETasks *tasks = data;
-
+
set_timezone (tasks);
}
@@ -294,11 +294,11 @@ update_view (ETasks *tasks)
ECalModel *model;
char *real_sexp = NULL;
char *new_sexp = NULL;
-
+
priv = tasks->priv;
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-
+
if ((new_sexp = calendar_config_get_hide_completed_tasks_sexp (FALSE)) != NULL) {
real_sexp = g_strdup_printf ("(and %s %s)", new_sexp, priv->sexp);
e_cal_model_set_search_query (model, real_sexp);
@@ -325,7 +325,7 @@ process_completed_tasks (ETasks *tasks, gboolean config_changed)
static gboolean
update_view_cb (ETasks *tasks)
-{
+{
ECalModel *model;
model = e_calendar_table_get_model (E_CALENDAR_TABLE (tasks->priv->tasks_view));
@@ -373,16 +373,16 @@ model_row_changed_cb (ETableModel *etm, int row, gpointer data)
static void
view_progress_cb (ECalModel *model, const char *message, int percent, ECalSourceType type, ETasks *tasks)
{
- e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)),
+ e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)),
message, percent);
}
static void
view_done_cb (ECalModel *model, ECalendarStatus status, ECalSourceType type, ETasks *tasks)
{
- e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)),
+ e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)),
NULL, -1);
-
+
}
static void
@@ -407,24 +407,24 @@ setup_config (ETasks *tasks)
guint not;
priv = tasks->priv;
-
+
/* Timezone */
set_timezone (tasks);
-
+
not = calendar_config_add_notification_timezone (timezone_changed_cb, tasks);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- not = calendar_config_add_notification_hide_completed_tasks (config_hide_completed_tasks_changed_cb,
+
+ not = calendar_config_add_notification_hide_completed_tasks (config_hide_completed_tasks_changed_cb,
tasks);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- not = calendar_config_add_notification_hide_completed_tasks_units (config_hide_completed_tasks_changed_cb,
+
+ not = calendar_config_add_notification_hide_completed_tasks_units (config_hide_completed_tasks_changed_cb,
tasks);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- not = calendar_config_add_notification_hide_completed_tasks_value (config_hide_completed_tasks_changed_cb,
+
+ not = calendar_config_add_notification_hide_completed_tasks_value (config_hide_completed_tasks_changed_cb,
tasks);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
+ priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
not = calendar_config_add_notification_preview_state (config_preview_state_changed_cb, tasks);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
@@ -570,7 +570,7 @@ table_drag_end (ETable *table,
}
*/
-static void
+static void
table_drag_data_delete (ETable *table,
int row,
int col,
@@ -635,7 +635,7 @@ setup_widgets (ETasks *tasks)
priv->tasks_view = e_calendar_table_new ();
g_object_set_data (G_OBJECT (priv->tasks_view), "tasks", tasks);
priv->tasks_view_config = e_calendar_table_config_new (E_CALENDAR_TABLE (priv->tasks_view));
-
+
g_signal_connect (priv->tasks_view, "user_created", G_CALLBACK (user_created_cb), tasks);
etable = e_table_scrolled_get_table (
@@ -648,7 +648,7 @@ setup_widgets (ETasks *tasks)
e_table_drag_source_set (etable, GDK_BUTTON1_MASK,
list_drag_types, num_list_drag_types,
GDK_ACTION_MOVE|GDK_ACTION_COPY|GDK_ACTION_ASK);
-
+
g_signal_connect (etable, "table_drag_data_get",
G_CALLBACK(table_drag_data_get), tasks);
g_signal_connect (etable, "table_drag_data_delete",
@@ -670,11 +670,11 @@ setup_widgets (ETasks *tasks)
g_signal_connect (etable, "selection_change", G_CALLBACK (table_selection_change_cb), tasks);
/* Timeout check to hide completed items */
- priv->update_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_view_cb, tasks, NULL);
+ priv->update_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_view_cb, tasks, NULL);
/* create the task detail */
priv->preview = e_cal_component_preview_new ();
- e_cal_component_preview_set_default_timezone (E_CAL_COMPONENT_PREVIEW (priv->preview), calendar_config_get_icaltimezone ());
+ e_cal_component_preview_set_default_timezone (E_CAL_COMPONENT_PREVIEW (priv->preview), calendar_config_get_icaltimezone ());
gtk_paned_add2 (GTK_PANED (priv->paned), priv->preview);
state = calendar_config_get_preview_state ();
@@ -684,7 +684,7 @@ setup_widgets (ETasks *tasks)
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
g_signal_connect (G_OBJECT (model), "model_row_changed",
G_CALLBACK (model_row_changed_cb), tasks);
-
+
g_signal_connect (G_OBJECT (model), "cal_view_progress",
G_CALLBACK (view_progress_cb), tasks);
g_signal_connect (G_OBJECT (model), "cal_view_done",
@@ -702,7 +702,7 @@ e_tasks_class_init (ETasksClass *class)
e_tasks_signals[SELECTION_CHANGED] =
gtk_signal_new ("selection_changed",
GTK_RUN_LAST,
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (object_class),
GTK_SIGNAL_OFFSET (ETasksClass, selection_changed),
g_cclosure_marshal_VOID__INT,
GTK_TYPE_NONE, 1,
@@ -766,7 +766,7 @@ static void
e_tasks_init (ETasks *tasks)
{
ETasksPrivate *priv;
-
+
priv = g_new0 (ETasksPrivate, 1);
tasks->priv = priv;
@@ -776,7 +776,7 @@ e_tasks_init (ETasks *tasks)
setup_config (tasks);
setup_widgets (tasks);
- priv->clients = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
+ priv->clients = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
priv->query = NULL;
priv->view_instance = NULL;
priv->view_menus = NULL;
@@ -850,7 +850,7 @@ e_tasks_destroy (GtkObject *object)
g_free (priv->current_uid);
priv->current_uid = NULL;
}
-
+
if (priv->sexp) {
g_free (priv->sexp);
priv->sexp = NULL;
@@ -860,12 +860,12 @@ e_tasks_destroy (GtkObject *object)
g_source_remove (priv->update_timeout);
priv->update_timeout = 0;
}
-
+
if (priv->tasks_view_config) {
g_object_unref (priv->tasks_view_config);
priv->tasks_view_config = NULL;
}
-
+
for (l = priv->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
priv->notifications = NULL;
@@ -893,7 +893,7 @@ set_status_message (ETasks *tasks, const char *message, ...)
}
priv = tasks->priv;
-
+
e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->tasks_view), msg_string, -1);
}
@@ -929,7 +929,7 @@ backend_died_cb (ECal *client, gpointer data)
ETasks *tasks;
ETasksPrivate *priv;
ESource *source;
-
+
tasks = E_TASKS (data);
priv = tasks->priv;
@@ -941,10 +941,10 @@ backend_died_cb (ECal *client, gpointer data)
gtk_signal_emit (GTK_OBJECT (tasks), e_tasks_signals[SOURCE_REMOVED], source);
e_calendar_table_set_status_message (E_CALENDAR_TABLE (e_tasks_get_calendar_table (tasks)), NULL, -1);
-
+
e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))),
"calendar:tasks-crashed", NULL);
-
+
g_object_unref (source);
}
@@ -1009,7 +1009,7 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, ETasks *tasks)
case E_CALENDAR_STATUS_OK :
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, default_client_cal_opened_cb, NULL);
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-
+
e_cal_model_set_default_client (model, ecal);
set_status_message (tasks, NULL);
break;
@@ -1046,11 +1046,11 @@ open_ecal (ETasks *tasks, ECal *cal, gboolean only_if_exists, open_func of)
icaltimezone *zone;
priv = tasks->priv;
-
+
zone = calendar_config_get_icaltimezone ();
e_cal_set_default_timezone (cal, zone, NULL);
-
+
set_status_message (tasks, _("Opening tasks at %s"), e_cal_get_uri (cal));
g_signal_connect (G_OBJECT (cal), "cal_opened", G_CALLBACK (of), tasks);
@@ -1063,7 +1063,7 @@ void
e_tasks_open_task (ETasks *tasks)
{
ECalendarTable *cal_table;
-
+
cal_table = e_tasks_get_calendar_table (tasks);
e_calendar_table_open_selected (cal_table);
}
@@ -1077,7 +1077,7 @@ e_tasks_new_task (ETasks *tasks)
const char *category;
ECal *ecal;
guint32 flags = 0;
-
+
g_return_if_fail (E_IS_TASKS (tasks));
priv = tasks->priv;
@@ -1086,9 +1086,9 @@ e_tasks_new_task (ETasks *tasks)
ecal = e_tasks_get_default_client (tasks);
if (!ecal)
return;
-
+
flags |= COMP_EDITOR_NEW_ITEM | COMP_EDITOR_USER_ORG;
-
+
comp = cal_comp_task_new_with_defaults (ecal);
category = cal_search_bar_get_category (CAL_SEARCH_BAR (priv->search_bar));
@@ -1117,32 +1117,32 @@ e_tasks_show_preview (ETasks *tasks, gboolean state)
ETable *etable;
const char *uid;
int n_selected;
-
+
etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (E_CALENDAR_TABLE (priv->tasks_view)->etable));
n_selected = e_table_selected_count (etable);
-
+
if (n_selected != 1) {
e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (priv->preview));
} else {
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
-
+
comp_data = e_cal_model_get_component_at (model, e_table_get_cursor_row (etable));
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
-
+
e_cal_component_preview_display (E_CAL_COMPONENT_PREVIEW (priv->preview), comp_data->client, comp);
-
+
e_cal_component_get_uid (comp, &uid);
if (priv->current_uid)
g_free (priv->current_uid);
priv->current_uid = g_strdup (uid);
-
+
g_object_unref (comp);
}
gtk_widget_show (priv->preview);
} else {
- e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (priv->preview));
+ e_cal_component_preview_clear (E_CAL_COMPONENT_PREVIEW (priv->preview));
gtk_widget_hide (priv->preview);
}
}
@@ -1168,10 +1168,10 @@ e_tasks_add_todo_source (ETasks *tasks, ESource *source)
return TRUE;
} else {
ESource *default_source;
-
+
if (priv->default_client) {
default_source = e_cal_get_source (priv->default_client);
-
+
/* We don't have it but the default client is it */
if (!strcmp (e_source_peek_uid (default_source), uid))
client = g_object_ref (priv->default_client);
@@ -1188,7 +1188,7 @@ e_tasks_add_todo_source (ETasks *tasks, ESource *source)
g_signal_connect (G_OBJECT (client), "backend_error", G_CALLBACK (backend_error_cb), tasks);
g_signal_connect (G_OBJECT (client), "backend_died", G_CALLBACK (backend_died_cb), tasks);
- /* add the client to internal structure */
+ /* add the client to internal structure */
g_hash_table_insert (priv->clients, g_strdup (uid) , client);
priv->clients_list = g_list_prepend (priv->clients_list, client);
@@ -1215,19 +1215,19 @@ e_tasks_remove_todo_source (ETasks *tasks, ESource *source)
uid = e_source_peek_uid (source);
client = g_hash_table_lookup (priv->clients, uid);
- if (!client)
+ if (!client)
return TRUE;
-
+
priv->clients_list = g_list_remove (priv->clients_list, client);
g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, tasks);
+ 0, 0, NULL, NULL, tasks);
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view));
e_cal_model_remove_client (model, client);
g_hash_table_remove (priv->clients, uid);
-
+
gtk_signal_emit (GTK_OBJECT (tasks), e_tasks_signals[SOURCE_REMOVED], source);
@@ -1239,7 +1239,7 @@ e_tasks_set_default_source (ETasks *tasks, ESource *source)
{
ETasksPrivate *priv;
ECal *ecal;
-
+
g_return_val_if_fail (tasks != NULL, FALSE);
g_return_val_if_fail (E_IS_TASKS (tasks), FALSE);
g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
@@ -1268,19 +1268,19 @@ ECal *
e_tasks_get_default_client (ETasks *tasks)
{
ETasksPrivate *priv;
-
+
g_return_val_if_fail (tasks != NULL, NULL);
g_return_val_if_fail (E_IS_TASKS (tasks), NULL);
priv = tasks->priv;
- return e_cal_model_get_default_client (e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view)));
+ return e_cal_model_get_default_client (e_calendar_table_get_model (E_CALENDAR_TABLE (priv->tasks_view)));
}
/**
* e_tasks_complete_selected:
* @tasks: A tasks control widget
- *
+ *
* Marks the selected tasks complete
**/
void
@@ -1304,7 +1304,7 @@ e_tasks_complete_selected (ETasks *tasks)
/**
* e_tasks_delete_selected:
* @tasks: A tasks control widget.
- *
+ *
* Deletes the selected tasks in the task list.
**/
void
@@ -1329,7 +1329,7 @@ e_tasks_delete_selected (ETasks *tasks)
/**
* e_tasks_expunge:
* @tasks: A tasks control widget
- *
+ *
* Removes all tasks marked as completed
**/
void
@@ -1338,7 +1338,7 @@ e_tasks_delete_completed (ETasks *tasks)
ETasksPrivate *priv;
char *sexp;
GList *l;
-
+
g_return_if_fail (tasks != NULL);
g_return_if_fail (E_IS_TASKS (tasks));
@@ -1346,23 +1346,23 @@ e_tasks_delete_completed (ETasks *tasks)
sexp = g_strdup ("(is-completed?)");
- set_status_message (tasks, _("Expunging"));
+ set_status_message (tasks, _("Expunging"));
for (l = priv->clients_list; l != NULL; l = l->next) {
ECal *client = l->data;
GList *objects, *m;
gboolean read_only = TRUE;
-
+
e_cal_is_read_only (client, &read_only, NULL);
if (read_only)
continue;
-
+
if (!e_cal_get_object_list (client, sexp, &objects, NULL)) {
g_warning (G_STRLOC ": Could not get the objects");
-
+
continue;
}
-
+
for (m = objects; m; m = m->next) {
/* FIXME Better error handling */
e_cal_remove_object (client, icalcomponent_get_uid (m->data), NULL);
@@ -1396,7 +1396,7 @@ display_view_cb (GalViewInstance *instance, GalView *view, gpointer data)
* e_tasks_setup_view_menus:
* @tasks: A tasks widget.
* @uic: UI controller to use for the menus.
- *
+ *
* Sets up the #GalView menus for a tasks control. This function should be
* called from the Bonobo control activation callback for this tasks control.
* Also, the menus should be discarded using e_tasks_discard_view_menus().
@@ -1432,7 +1432,7 @@ e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic)
dir0 = g_build_filename (EVOLUTION_GALVIEWSDIR,
"tasks",
NULL);
- dir1 = g_build_filename (tasks_component_peek_base_directory (tasks_component_peek ()),
+ dir1 = g_build_filename (tasks_component_peek_base_directory (tasks_component_peek ()),
"tasks", "views", NULL);
gal_view_collection_set_storage_directories (collection,
dir0,
@@ -1472,7 +1472,7 @@ e_tasks_setup_view_menus (ETasks *tasks, BonoboUIComponent *uic)
/**
* e_tasks_discard_view_menus:
* @tasks: A tasks widget.
- *
+ *
* Discards the #GalView menus used by a tasks control. This function should be
* called from the Bonobo control deactivation callback for this tasks control.
* The menus should have been set up with e_tasks_setup_view_menus().
@@ -1510,7 +1510,7 @@ e_tasks_open_task_id (ETasks *tasks,
if (!src_uid || !comp_uid)
return;
-
+
for (l = tasks->priv->clients_list; l != NULL; l = l->next) {
ESource *client_src;
@@ -1521,7 +1521,7 @@ e_tasks_open_task_id (ETasks *tasks,
break;
}
- if (!client)
+ if (!client)
return;
e_cal_get_object (client, comp_uid, comp_rid, &icalcomp, NULL);
@@ -1539,9 +1539,9 @@ e_tasks_open_task_id (ETasks *tasks,
/**
* e_tasks_get_calendar_table:
* @tasks: A tasks widget.
- *
+ *
* Queries the #ECalendarTable contained in a tasks widget.
- *
+ *
* Return value: The #ECalendarTable that the tasks widget uses to display its
* information.
**/
diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c
index 81bbcbaf66..86f8b81261 100644
--- a/calendar/gui/e-timezone-entry.c
+++ b/calendar/gui/e-timezone-entry.c
@@ -86,7 +86,7 @@ e_timezone_entry_class_init (ETimezoneEntryClass *class)
{
GtkObjectClass *object_class = (GtkObjectClass *) class;
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class) ;
-
+
object_class = (GtkObjectClass*) class;
widget_class->mnemonic_activate = e_timezone_entry_mnemonic_activate;
@@ -125,7 +125,7 @@ e_timezone_entry_init (ETimezoneEntry *tentry)
gtk_box_pack_start (GTK_BOX (tentry), priv->entry, TRUE, TRUE, 0);
gtk_widget_show (priv->entry);
g_signal_connect (priv->entry, "changed", G_CALLBACK (on_entry_changed), tentry);
-
+
priv->button = gtk_button_new ();
g_signal_connect (priv->button, "clicked", G_CALLBACK (on_button_clicked), tentry);
gtk_box_pack_start (GTK_BOX (tentry), priv->button, FALSE, FALSE, 6);
@@ -146,7 +146,7 @@ e_timezone_entry_init (ETimezoneEntry *tentry)
*
* Description: Creates a new #ETimezoneEntry widget which can be used
* to provide an easy to use way for entering dates and times.
- *
+ *
* Returns: a new #ETimezoneEntry widget.
*/
GtkWidget *
@@ -330,8 +330,8 @@ e_timezone_entry_set_entry (ETimezoneEntry *tentry)
gtk_entry_set_text (GTK_ENTRY (priv->entry), name_buffer);
/* do we need to hide the timezone entry at all? i know this overrules the previous case of hiding the timezone
- * entry field when we select the default timezone
- */
+ * entry field when we select the default timezone
+ */
gtk_widget_show (priv->entry);
g_free (name_buffer);
@@ -343,13 +343,13 @@ e_timezone_entry_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling)
{
GtkButton *button = NULL;
-
+
if (GTK_WIDGET_CAN_FOCUS (widget)) {
button = GTK_BUTTON (((ETimezoneEntryPrivate *) ((ETimezoneEntry *) widget)->priv)->button);
if (button != NULL)
gtk_widget_grab_focus (GTK_WIDGET (button));
}
-
+
return TRUE;
}
diff --git a/calendar/gui/e-timezone-entry.h b/calendar/gui/e-timezone-entry.h
index 8c941077ad..3593b59008 100644
--- a/calendar/gui/e-timezone-entry.h
+++ b/calendar/gui/e-timezone-entry.h
@@ -30,11 +30,11 @@
*/
#ifndef __E_TIMEZONE_ENTRY_H_
-#define __E_TIMEZONE_ENTRY_H_
+#define __E_TIMEZONE_ENTRY_H_
#include <gtk/gtkhbox.h>
#include <libecal/e-cal.h>
-
+
G_BEGIN_DECLS
diff --git a/calendar/gui/e-week-view-config.c b/calendar/gui/e-week-view-config.c
index de2c9a895b..40404da915 100644
--- a/calendar/gui/e-week-view-config.c
+++ b/calendar/gui/e-week-view-config.c
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Rodrigo Moya <rodrigo@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -44,7 +44,7 @@ e_week_view_config_set_property (GObject *object, guint property_id, const GValu
EWeekViewConfig *view_config;
view_config = E_WEEK_VIEW_CONFIG (object);
-
+
switch (property_id) {
case PROP_VIEW:
e_week_view_config_set_view (view_config, g_value_get_object (value));
@@ -61,7 +61,7 @@ e_week_view_config_get_property (GObject *object, guint property_id, GValue *val
EWeekViewConfig *view_config;
view_config = E_WEEK_VIEW_CONFIG (object);
-
+
switch (property_id) {
case PROP_VIEW:
g_value_set_object (value, e_week_view_config_get_view (view_config));
@@ -78,7 +78,7 @@ e_week_view_config_dispose (GObject *object)
EWeekViewConfig *view_config = E_WEEK_VIEW_CONFIG (object);
e_week_view_config_set_view (view_config, NULL);
-
+
if (G_OBJECT_CLASS (e_week_view_config_parent_class)->dispose)
G_OBJECT_CLASS (e_week_view_config_parent_class)->dispose (object);
}
@@ -88,11 +88,11 @@ e_week_view_config_finalize (GObject *object)
{
EWeekViewConfig *view_config = E_WEEK_VIEW_CONFIG (object);
EWeekViewConfigPrivate *priv;
-
+
priv = view_config->priv;
g_free (priv);
-
+
if (G_OBJECT_CLASS (e_week_view_config_parent_class)->finalize)
G_OBJECT_CLASS (e_week_view_config_parent_class)->finalize (object);
}
@@ -102,7 +102,7 @@ e_week_view_config_class_init (EWeekViewConfigClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GParamSpec *spec;
-
+
/* Method override */
gobject_class->set_property = e_week_view_config_set_property;
gobject_class->get_property = e_week_view_config_get_property;
@@ -125,14 +125,14 @@ EWeekViewConfig *
e_week_view_config_new (EWeekView *week_view)
{
EWeekViewConfig *view_config;
-
+
view_config = g_object_new (e_week_view_config_get_type (), "view", week_view, NULL);
return view_config;
}
EWeekView *
-e_week_view_config_get_view (EWeekViewConfig *view_config)
+e_week_view_config_get_view (EWeekViewConfig *view_config)
{
EWeekViewConfigPrivate *priv;
@@ -140,16 +140,16 @@ e_week_view_config_get_view (EWeekViewConfig *view_config)
g_return_val_if_fail (E_IS_WEEK_VIEW_CONFIG (view_config), NULL);
priv = view_config->priv;
-
+
return priv->view;
}
static void
-set_timezone (EWeekView *week_view)
+set_timezone (EWeekView *week_view)
{
icaltimezone *zone;
-
- zone = calendar_config_get_icaltimezone ();
+
+ zone = calendar_config_get_icaltimezone ();
e_calendar_view_set_timezone (E_CALENDAR_VIEW (week_view), zone);
}
@@ -158,16 +158,16 @@ timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer
{
EWeekViewConfig *view_config = data;
EWeekViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_timezone (priv->view);
}
static void
-set_week_start (EWeekView *week_view)
+set_week_start (EWeekView *week_view)
{
- int week_start_week;
+ int week_start_week;
week_start_week = calendar_config_get_week_start_day ();
@@ -182,14 +182,14 @@ week_start_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointe
{
EWeekViewConfig *view_config = data;
EWeekViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_week_start (priv->view);
}
static void
-set_twentyfour_hour (EWeekView *week_view)
+set_twentyfour_hour (EWeekView *week_view)
{
gboolean use_24_hour;
@@ -203,14 +203,14 @@ twentyfour_hour_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gp
{
EWeekViewConfig *view_config = data;
EWeekViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_twentyfour_hour (priv->view);
}
static void
-set_show_event_end (EWeekView *week_view)
+set_show_event_end (EWeekView *week_view)
{
gboolean show_event_end;
@@ -224,14 +224,14 @@ show_event_end_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpo
{
EWeekViewConfig *view_config = data;
EWeekViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_show_event_end (priv->view);
}
static void
-set_compress_weekend (EWeekView *week_view)
+set_compress_weekend (EWeekView *week_view)
{
gboolean compress_weekend;
@@ -245,29 +245,29 @@ compress_weekend_changed_cb (GConfClient *client, guint id, GConfEntry *entry, g
{
EWeekViewConfig *view_config = data;
EWeekViewConfigPrivate *priv;
-
+
priv = view_config->priv;
-
+
set_compress_weekend (priv->view);
}
void
-e_week_view_config_set_view (EWeekViewConfig *view_config, EWeekView *week_view)
+e_week_view_config_set_view (EWeekViewConfig *view_config, EWeekView *week_view)
{
EWeekViewConfigPrivate *priv;
guint not;
GList *l;
-
+
g_return_if_fail (view_config != NULL);
g_return_if_fail (E_IS_WEEK_VIEW_CONFIG (view_config));
priv = view_config->priv;
-
+
if (priv->view) {
g_object_unref (priv->view);
priv->view = NULL;
}
-
+
for (l = priv->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
@@ -277,26 +277,26 @@ e_week_view_config_set_view (EWeekViewConfig *view_config, EWeekView *week_view)
/* If the new view is NULL, return right now */
if (!week_view)
return;
-
+
priv->view = g_object_ref (week_view);
/* Time zone */
set_timezone (week_view);
-
+
not = calendar_config_add_notification_timezone (timezone_changed_cb, view_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
+
/* Week start */
- set_week_start (week_view);
+ set_week_start (week_view);
not = calendar_config_add_notification_week_start_day (week_start_changed_cb, view_config);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* 24 Hour format */
- set_twentyfour_hour (week_view);
+ set_twentyfour_hour (week_view);
not = calendar_config_add_notification_24_hour_format (twentyfour_hour_changed_cb, view_config);
- priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
+ priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* Show event end */
set_show_event_end (week_view);
diff --git a/calendar/gui/e-week-view-config.h b/calendar/gui/e-week-view-config.h
index 2cbedf51e3..f79679837c 100644
--- a/calendar/gui/e-week-view-config.h
+++ b/calendar/gui/e-week-view-config.h
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* JP Rosevear <jpr@ximian.com>
*
* Copyright 2003, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
#define E_WEEK_VIEW_CONFIG(obj) GTK_CHECK_CAST (obj, e_week_view_config_get_type (), EWeekViewConfig)
#define E_WEEK_VIEW_CONFIG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, e_week_view_config_get_type (), EWeekViewConfigClass)
#define E_IS_WEEK_VIEW_CONFIG(obj) GTK_CHECK_TYPE (obj, e_week_view_config_get_type ())
-
+
typedef struct _EWeekViewConfig EWeekViewConfig;
typedef struct _EWeekViewConfigClass EWeekViewConfigClass;
typedef struct _EWeekViewConfigPrivate EWeekViewConfigPrivate;
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 8ac563191a..f31932b050 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 2001, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -143,7 +143,7 @@ e_week_view_event_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
item = GNOME_CANVAS_ITEM (o);
wveitem = E_WEEK_VIEW_EVENT_ITEM (o);
-
+
switch (arg_id){
case ARG_EVENT_NUM:
wveitem->event_num = GTK_VALUE_INT (*arg);
@@ -270,7 +270,7 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item,
/* Get the start & end times in 24-hour format. */
start_hour = event->start_minute / 60;
start_minute = event->start_minute % 60;
-
+
/* Modulo 24 because a midnight end time will be '24' */
end_hour = (event->end_minute / 60) % 24;
end_minute = event->end_minute % 60;
@@ -617,17 +617,17 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
draw_recurrence_icon = TRUE;
num_icons++;
}
-
+
if (e_cal_component_has_attachments (comp)) {
draw_attach_icon = TRUE;
num_icons++;
}
-
+
if (e_cal_component_has_organizer (comp)) {
draw_meeting_icon = TRUE;
num_icons++;
}
-
+
if (event->different_timezone) {
draw_timezone_icon = TRUE;
num_icons++;
@@ -664,7 +664,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
0, 0);
icon_x += icon_x_inc;
}
-
+
if (draw_recurrence_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
gdk_gc_set_clip_mask (gc, NULL);
gdk_draw_pixbuf (drawable, gc,
@@ -870,7 +870,7 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item,
/* Get the start & end times in 24-hour format. */
start_hour = event->start_minute / 60;
start_minute = event->start_minute % 60;
-
+
/* Modulo 24 because a midnight end time will be '24' */
end_hour = (event->end_minute / 60) % 24;
end_minute = event->end_minute % 60;
@@ -886,7 +886,7 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item,
time_x = x1 + E_WEEK_VIEW_EVENT_L_PAD + 1;
rect_x = x1 + E_WEEK_VIEW_EVENT_L_PAD;
rect_w = x2 - x1 - E_WEEK_VIEW_EVENT_L_PAD - E_WEEK_VIEW_EVENT_R_PAD + 1;
-
+
if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)),
event->comp_data),
&bg_color)) {
@@ -906,17 +906,17 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item,
red = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].green;
green = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].green;
blue = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].green;
- }
+ }
/* Here we draw the border around the event*/
cairo_save (cr);
- cx0 = rect_x;
+ cx0 = rect_x;
cy0 = y1 + 1;
rect_width = rect_w;
rect_height = y2 - y1 - 1;
- radius = 12;
+ radius = 12;
draw_curved_rectangle (cr, cx0, cy0, rect_width, rect_height, radius);
@@ -924,17 +924,17 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item,
cairo_set_source_rgb (cr, red/cc, green/cc, blue/cc);
cairo_stroke (cr);
cairo_restore (cr);
-
+
/* Fill it in the Event */
cairo_save (cr);
- cx0 = rect_x + 1.5;
+ cx0 = rect_x + 1.5;
cy0 = y1 + 2.75;
rect_width = rect_w - 3.;
rect_height = y2 - y1 - 4.5;
- radius = 8;
+ radius = 8;
draw_curved_rectangle (cr, cx0, cy0, rect_width, rect_height, radius);
@@ -1045,16 +1045,16 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item,
red = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].green;
green = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].green;
blue = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].green;
- }
+ }
/* Here we draw the border around the event */
- cx0 = rect_x;
+ cx0 = rect_x;
cy0 = y1 + 1;
rect_width = rect_w;
rect_height = y2 - y1 - 1;
- radius = 12;
+ radius = 12;
draw_curved_rectangle (cr, cx0, cy0, rect_width, rect_height, radius);
@@ -1067,12 +1067,12 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item,
cairo_save (cr);
- cx0 = rect_x + 1.5;
+ cx0 = rect_x + 1.5;
cy0 = y1 + 2.75;
rect_width = rect_w - 3.;
rect_height = y2 - y1 - 4.5;
- radius = 8;
+ radius = 8;
draw_curved_rectangle (cr, cx0, cy0, rect_width, rect_height, radius);
@@ -1254,7 +1254,7 @@ e_week_view_draw_time (EWeekView *week_view,
time_x,
time_y_small_font,
layout);
-
+
pango_layout_set_font_description (layout, style->font_desc);
time_x += week_view->small_digit_width * 2;
@@ -1262,7 +1262,7 @@ e_week_view_draw_time (EWeekView *week_view,
/* Draw the 'am'/'pm' suffix, if 12-hour format. */
if (!e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (week_view))) {
pango_layout_set_text (layout, suffix, -1);
-
+
gdk_draw_layout (drawable, gc,
time_x,
time_y_normal_font,
@@ -1329,7 +1329,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
draw_recurrence_icon = TRUE;
num_icons++;
}
-
+
if (e_cal_component_has_attachments (comp)) {
draw_attach_icon = TRUE;
num_icons++;
@@ -1339,7 +1339,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
draw_meeting_icon = TRUE;
num_icons++;
}
-
+
if (event->different_timezone) {
draw_timezone_icon = TRUE;
num_icons++;
@@ -1371,7 +1371,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
icon_x += icon_x_inc;
}
-
+
if (draw_recurrence_icon && icon_x + E_WEEK_VIEW_ICON_WIDTH <= x2) {
cairo_save (cr);
gdk_cairo_set_source_pixbuf (cr, week_view->recurrence_icon, icon_x, icon_y);
diff --git a/calendar/gui/e-week-view-event-item.h b/calendar/gui/e-week-view-event-item.h
index 404359cd50..59440ef291 100644
--- a/calendar/gui/e-week-view-event-item.h
+++ b/calendar/gui/e-week-view-event-item.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 2001, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-week-view-layout.h b/calendar/gui/e-week-view-layout.h
index 0d42429bd1..9f51f53bd8 100644
--- a/calendar/gui/e-week-view-layout.h
+++ b/calendar/gui/e-week-view-layout.h
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 2001, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c
index abfc0993cd..9f214af1d2 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -110,7 +110,7 @@ e_week_view_main_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
EWeekViewMainItem *wvmitem;
wvmitem = E_WEEK_VIEW_MAIN_ITEM (o);
-
+
switch (arg_id){
case ARG_WEEK_VIEW:
wvmitem->week_view = GTK_VALUE_POINTER (*arg);
@@ -281,7 +281,7 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
width - 5, line_y - y);
}
}
-
+
/* Display the date in the top of the cell.
In the week view, display the long format "10 January" in all cells,
or abbreviate it to "10 Jan" or "10" if that doesn't fit.
@@ -338,10 +338,10 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
} else if (week_view->multi_week_view) {
struct icaltimetype tt;
- /* Check if we are drawing today */
+ /* Check if we are drawing today */
tt = icaltime_from_timet_with_zone (time (NULL), FALSE,
e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
- if (g_date_get_year (date) == tt.year
+ if (g_date_get_year (date) == tt.year
&& g_date_get_month (date) == tt.month
&& g_date_get_day (date) == tt.day) {
gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_TODAY]);
@@ -357,11 +357,11 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
g_date_strftime (buffer, sizeof (buffer),
format_string ? format_string : "<b>%d</b>", date);
layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), buffer);
- pango_layout_set_markup (layout, buffer, strlen(buffer));
+ pango_layout_set_markup (layout, buffer, strlen(buffer));
} else {
g_date_strftime (buffer, sizeof (buffer),
format_string ? format_string : "%d", date);
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), buffer);
+ layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), buffer);
}
pango_layout_get_pixel_size (layout, &date_width, NULL);
@@ -440,9 +440,9 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
month starts (defaults are white for odd - January, March, ... and
light gray for even). In the week view the background is always the
same color, the color used for the odd months in the month view. */
- if (week_view->multi_week_view && (month % 2 == 0))
+ if (week_view->multi_week_view && (month % 2 == 0))
bg_color = &week_view->colors[E_WEEK_VIEW_COLOR_EVEN_MONTHS];
- else
+ else
bg_color = &week_view->colors[E_WEEK_VIEW_COLOR_ODD_MONTHS];
cairo_save (cr);
@@ -481,7 +481,7 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED]);
}
- if (week_view->multi_week_view) {
+ if (week_view->multi_week_view) {
cairo_rectangle (cr, x + 2, y + 1,
width - 5,
E_WEEK_VIEW_DATE_T_PAD - 1 +
@@ -493,9 +493,9 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
width - 5, line_y - y);
cairo_fill (cr);
}
- }
- cairo_restore (cr);
-
+ }
+ cairo_restore (cr);
+
/* Display the date in the top of the cell.
In the week view, display the long format "10 January" in all cells,
or abbreviate it to "10 Jan" or "10" if that doesn't fit.
@@ -553,10 +553,10 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
} else if (week_view->multi_week_view) {
struct icaltimetype tt;
- /* Check if we are drawing today */
+ /* Check if we are drawing today */
tt = icaltime_from_timet_with_zone (time (NULL), FALSE,
e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
- if (g_date_get_year (date) == tt.year
+ if (g_date_get_year (date) == tt.year
&& g_date_get_month (date) == tt.month
&& g_date_get_day (date) == tt.day) {
gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_TODAY]);
@@ -577,7 +577,7 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem,
layout = pango_cairo_create_layout (cr);
pango_layout_set_font_description (layout, font_desc);
pango_layout_set_text (layout, buffer, -1);
- pango_layout_set_markup (layout, buffer, strlen(buffer));
+ pango_layout_set_markup (layout, buffer, strlen(buffer));
} else {
g_date_strftime (buffer, sizeof (buffer),
format_string ? format_string : "%d", date);
diff --git a/calendar/gui/e-week-view-main-item.h b/calendar/gui/e-week-view-main-item.h
index 551d0b4c68..f475024051 100644
--- a/calendar/gui/e-week-view-main-item.h
+++ b/calendar/gui/e-week-view-main-item.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 2001, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-week-view-titles-item.c b/calendar/gui/e-week-view-titles-item.c
index 0ff79a8eff..08f401e599 100644
--- a/calendar/gui/e-week-view-titles-item.c
+++ b/calendar/gui/e-week-view-titles-item.c
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -96,7 +96,7 @@ e_week_view_titles_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
EWeekViewTitlesItem *wvtitem;
wvtitem = E_WEEK_VIEW_TITLES_ITEM (o);
-
+
switch (arg_id){
case ARG_WEEK_VIEW:
wvtitem->week_view = GTK_VALUE_POINTER (*arg);
diff --git a/calendar/gui/e-week-view-titles-item.h b/calendar/gui/e-week-view-titles-item.h
index 1b276b0da1..e70193b14b 100644
--- a/calendar/gui/e-week-view-titles-item.h
+++ b/calendar/gui/e-week-view-titles-item.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 2001, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index be189a0905..6915ec1b7d 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -251,10 +251,10 @@ time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpo
/* Calculate the weekday of the given date, 0 = Mon. */
weekday = g_date_get_weekday (&date) - 1;
-
+
/* Convert it to an offset from the start of the display. */
week_start_offset = (weekday + 7 - week_view->display_start_day) % 7;
-
+
/* Set the day_offset to the result, so we move back to the
start of the week. */
day_offset = week_start_offset;
@@ -270,7 +270,7 @@ time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpo
week_view->base_date = base_date;
update_adjustment_value = TRUE;
}
-
+
/* See if we need to update the first day shown. */
if (!g_date_valid (&week_view->first_day_shown)
|| g_date_compare (&week_view->first_day_shown, &base_date)) {
@@ -285,13 +285,13 @@ time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpo
/* Reset the adjustment value to 0 if the base address has changed.
Note that we do this after updating first_day_shown so that our
signal handler will not try to reload the events. */
- if (update_adjustment_value)
+ if (update_adjustment_value)
gtk_adjustment_set_value (GTK_RANGE (week_view->vscrollbar)->adjustment, 0);
gtk_widget_queue_draw (week_view->main_canvas);
/* FIXME Preserve selection if possible */
- if (week_view->selection_start_day == -1 ||
+ if (week_view->selection_start_day == -1 ||
(week_view->multi_week_view ? week_view->weeks_shown * 7 : 7) <= week_view->selection_start_day)
e_week_view_set_selected_time_range (E_CALENDAR_VIEW (week_view), start_time, start_time);
}
@@ -390,9 +390,9 @@ model_rows_deleted_cb (ETableModel *etm, int row, int count, gpointer user_data)
{
EWeekView *week_view = E_WEEK_VIEW (user_data);
int i;
-
+
/* FIXME Stop editing? */
-
+
for (i = row + count; i > row; i--) {
gint event_num;
const char *uid, *rid = NULL;
@@ -426,7 +426,7 @@ timezone_changed_cb (ECalendarView *cal_view, icaltimezone *old_zone,
struct icaltimetype tt = icaltime_null_time ();
time_t lower;
EWeekView *week_view = (EWeekView *) cal_view;
-
+
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
/* If we don't have a valid date set yet, just return. */
@@ -589,7 +589,7 @@ e_week_view_init (EWeekView *week_view)
/* Get the model */
model = e_calendar_view_get_model (E_CALENDAR_VIEW (week_view));
-
+
/* connect to ECalModel's signals */
g_signal_connect (G_OBJECT (model), "time_range_changed",
G_CALLBACK (time_range_changed_cb), week_view);
@@ -618,10 +618,10 @@ GtkWidget *
e_week_view_new (void)
{
GtkWidget *week_view;
-
+
week_view = GTK_WIDGET (g_object_new (e_week_view_get_type (), NULL));
e_cal_model_set_flags (e_calendar_view_get_model (E_CALENDAR_VIEW (week_view)), E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES);
-
+
return week_view;
}
@@ -686,7 +686,7 @@ e_week_view_realize (GtkWidget *widget)
/* Allocate the colors. */
e_week_view_set_colors(week_view, widget);
-
+
gdk_gc_set_colormap (week_view->main_gc, colormap);
/* Create the pixmaps. */
@@ -780,9 +780,9 @@ static GdkColor
e_week_view_get_text_color (EWeekView *week_view, EWeekViewEvent *event, GtkWidget *widget)
{
GdkColor color, bg_color;
- guint16 red, green, blue;
+ guint16 red, green, blue;
gdouble cc = 65535.0;
-
+
red = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].red;
green = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].green;
blue = week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BACKGROUND].blue;
@@ -1418,7 +1418,7 @@ e_week_view_set_selected_time_range_visible (EWeekView *week_view,
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
-
+
/* Set the selection to the given days. */
week_view->selection_start_day = g_date_get_julian (&date)
- g_date_get_julian (&week_view->first_day_shown);
@@ -1848,23 +1848,23 @@ e_week_view_recalc_display_start_day (EWeekView *week_view)
static void
set_text_as_bold (EWeekViewEvent *event, EWeekViewEventSpan *span)
{
- ECalComponent *comp;
+ ECalComponent *comp;
char *address;
GSList *attendees, *l;
ECalComponentAttendee *at = NULL;
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- address = itip_get_comp_attendee (comp, event->comp_data->client);
+ address = itip_get_comp_attendee (comp, event->comp_data->client);
e_cal_component_get_attendee_list (comp, &attendees);
for (l = attendees; l; l = l->next) {
ECalComponentAttendee *attendee = l->data;
if (g_str_equal (itip_strip_mailto (attendee->value), address)) {
- at = attendee;
+ at = attendee;
break;
- }
+ }
}
/* The attendee has not yet accepted the meeting, display the summary as bolded.
@@ -2115,7 +2115,7 @@ e_week_view_on_button_press (GtkWidget *widget,
/* FIXME: Optimise? */
gtk_widget_queue_draw (week_view->main_canvas);
}
-
+
e_week_view_show_popup_menu (week_view, event, -1);
}
@@ -2149,18 +2149,18 @@ e_week_view_on_scroll (GtkWidget *widget,
gfloat new_value;
GtkWidget *tool_window = g_object_get_data (G_OBJECT (week_view), "tooltip-window");
guint timeout;
-
+
timeout = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (week_view), "tooltip-timeout"));
if (timeout) {
g_source_remove (timeout);
g_object_set_data (G_OBJECT (week_view), "tooltip-timeout", NULL);
}
-
+
if (tool_window) {
gtk_widget_destroy (tool_window);
g_object_set_data (G_OBJECT (week_view), "tooltip-window", NULL);
}
-
+
switch (scroll->direction){
case GDK_SCROLL_UP:
new_value = adj->value - adj->page_increment;
@@ -2171,10 +2171,10 @@ e_week_view_on_scroll (GtkWidget *widget,
default:
return FALSE;
}
-
+
new_value = CLAMP (new_value, adj->lower, adj->upper - adj->page_size);
gtk_adjustment_set_value (adj, new_value);
-
+
return TRUE;
}
@@ -2560,7 +2560,7 @@ tooltip_get_view_event (EWeekView *week_view, int day, int event_num)
EWeekViewEvent *pevent;
pevent = &g_array_index (week_view->events, EWeekViewEvent, event_num);
-
+
return pevent;
}
@@ -2570,20 +2570,20 @@ tooltip_destroy (EWeekView *week_view, GnomeCanvasItem *item)
int event_num = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num"));
EWeekViewEvent *pevent;
guint timeout;
-
+
timeout = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (week_view), "tooltip-timeout"));
if (timeout) {
g_source_remove (timeout);
g_object_set_data (G_OBJECT (week_view), "tooltip-timeout", NULL);
}
-
+
pevent = tooltip_get_view_event (week_view, -1, event_num);
if (pevent) {
if (pevent->tooltip && g_object_get_data (G_OBJECT (week_view), "tooltip-window")) {
gtk_widget_destroy (pevent->tooltip);
pevent->tooltip = NULL;
}
-
+
g_object_set_data (G_OBJECT (week_view), "tooltip-window", NULL);
}
}
@@ -2595,36 +2595,36 @@ tooltip_event_cb (GnomeCanvasItem *item,
{
int event_num = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num"));
EWeekViewEvent *pevent;
-
+
pevent = tooltip_get_view_event (view, -1, event_num);
-
+
switch (event->type) {
case GDK_ENTER_NOTIFY:
{
ECalendarViewEventData *data;
-
+
data = g_malloc (sizeof (ECalendarViewEventData));
-
+
pevent->x = ((GdkEventCrossing *)event)->x_root;
pevent->y = ((GdkEventCrossing *)event)->y_root;
- pevent->tooltip = NULL;
+ pevent->tooltip = NULL;
data->cal_view = (ECalendarView *)view;
data->day = -1;
data->event_num = event_num;
data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, int)) tooltip_get_view_event;
pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);
- g_object_set_data ((GObject *)view, "tooltip-timeout", GUINT_TO_POINTER (pevent->timeout));
-
+ g_object_set_data ((GObject *)view, "tooltip-timeout", GUINT_TO_POINTER (pevent->timeout));
+
return TRUE;
}
case GDK_MOTION_NOTIFY:
pevent->x = ((GdkEventMotion *)event)->x_root;
pevent->y = ((GdkEventMotion *)event)->y_root;
pevent->tooltip = (GtkWidget *)g_object_get_data (G_OBJECT (view), "tooltip-window");
-
+
if (pevent->tooltip) {
- e_calendar_view_move_tip (pevent->tooltip, pevent->x+16, pevent->y+16);
+ e_calendar_view_move_tip (pevent->tooltip, pevent->x+16, pevent->y+16);
}
return TRUE;
@@ -2716,12 +2716,12 @@ e_week_view_reshape_event_span (EWeekView *week_view,
e_week_view_event_item_get_type (),
NULL);
}
-
+
g_object_set_data ((GObject *)span->background_item, "event-num", GINT_TO_POINTER (event_num));
g_signal_connect (span->background_item, "event",
G_CALLBACK (tooltip_event_cb),
week_view);
-
+
gnome_canvas_item_set (span->background_item,
"event_num", event_num,
"span_num", span_num,
@@ -2751,16 +2751,16 @@ e_week_view_reshape_event_span (EWeekView *week_view,
"fill_color_gdk", &color,
"im_context", E_CANVAS (week_view->main_canvas)->im_context,
NULL);
-
+
if (free_text)
g_free ((gchar*)summary);
-
-/* Uncomment once the pango fix is in
- if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
+
+/* Uncomment once the pango fix is in
+ if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
&& e_cal_util_component_has_attendee (event->comp_data->icalcomp)) {
set_text_as_bold (event, span);
} */
- g_object_set_data (G_OBJECT (span->text_item), "event-num", GINT_TO_POINTER (event_num));
+ g_object_set_data (G_OBJECT (span->text_item), "event-num", GINT_TO_POINTER (event_num));
g_signal_connect (span->text_item, "event",
G_CALLBACK (e_week_view_on_text_item_event),
week_view);
@@ -2921,7 +2921,7 @@ e_week_view_start_editing_event (EWeekView *week_view,
ETextEventProcessorCommand command;
ECalModelComponent *comp_data;
gboolean read_only;
-
+
/* If we are already editing the event, just return. */
if (event_num == week_view->editing_event_num
&& span_num == week_view->editing_span_num)
@@ -2946,14 +2946,14 @@ e_week_view_start_editing_event (EWeekView *week_view,
/* Save the comp_data value because we use that as our invariant */
comp_data = event->comp_data;
-
+
e_canvas_item_grab_focus (span->text_item, TRUE);
-
+
/* If the above focus caused things to redraw, then find the
* the event and the span again */
if (event_num < week_view->events->len)
event = &g_array_index (week_view->events, EWeekViewEvent, event_num);
-
+
if (event_num >= week_view->events->len || event->comp_data != comp_data) {
/* Unfocussing can cause a removal but not a new
* addition so just run backwards through the
@@ -2963,8 +2963,8 @@ e_week_view_start_editing_event (EWeekView *week_view,
if (event->comp_data == comp_data)
break;
}
- g_return_val_if_fail (event_num >= 0, FALSE);
- }
+ g_return_val_if_fail (event_num >= 0, FALSE);
+ }
span = &g_array_index (week_view->spans, EWeekViewEventSpan, event->spans_index + span_num);
/* Try to move the cursor to the end of the text. */
@@ -3021,7 +3021,7 @@ cancel_editing (EWeekView *week_view)
if (free_text)
g_free ((gchar*)summary);
-
+
/* Stop editing */
e_week_view_stop_editing_event (week_view);
}
@@ -3035,13 +3035,13 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
gint event_num, span_num;
int nevent = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num"));
EWeekViewEvent *pevent;
-
+
pevent = tooltip_get_view_event (week_view, -1, nevent);
#if 0
g_print ("In e_week_view_on_text_item_event\n");
#endif
-
+
switch (gdkevent->type) {
case GDK_KEY_PRESS:
tooltip_destroy (week_view, item);
@@ -3168,13 +3168,13 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
&nspan))
return FALSE;
-
- g_object_set_data ((GObject *)item, "event-num", GINT_TO_POINTER (nevent));
-
+
+ g_object_set_data ((GObject *)item, "event-num", GINT_TO_POINTER (nevent));
+
pevent = tooltip_get_view_event (week_view, -1, nevent);
data = g_malloc (sizeof (ECalendarViewEventData));
-
+
pevent->x = ((GdkEventCrossing *)gdkevent)->x_root;
pevent->y = ((GdkEventCrossing *)gdkevent)->y_root;
pevent->tooltip = NULL;
@@ -3183,24 +3183,24 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
data->day = -1;
data->event_num = nevent;
data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, int)) tooltip_get_view_event;
- pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);
+ pevent->timeout = g_timeout_add (500, (GSourceFunc)e_calendar_view_get_tooltips, data);
g_object_set_data ((GObject *)week_view, "tooltip-timeout", GUINT_TO_POINTER (pevent->timeout));
-
+
return TRUE;
- }
+ }
case GDK_LEAVE_NOTIFY:
tooltip_destroy (week_view, item);
-
+
return FALSE;
case GDK_MOTION_NOTIFY:
pevent->x = ((GdkEventMotion *)gdkevent)->x_root;
pevent->y = ((GdkEventMotion *)gdkevent)->y_root;
pevent->tooltip = (GtkWidget *)g_object_get_data (G_OBJECT (week_view), "tooltip-window");
-
+
if (pevent->tooltip) {
- e_calendar_view_move_tip (pevent->tooltip, pevent->x+16, pevent->y+16);
+ e_calendar_view_move_tip (pevent->tooltip, pevent->x+16, pevent->y+16);
}
- return TRUE;
+ return TRUE;
case GDK_FOCUS_CHANGE:
if (gdkevent->focus_change.in) {
e_week_view_on_editing_started (week_view, item);
@@ -3242,7 +3242,7 @@ static gboolean e_week_view_event_move (ECalendarView *cal_view, ECalViewMoveDir
if (start_time.is_date && end_time.is_date)
is_all_day = TRUE;
- current_end_day = e_week_view_get_day_offset_of_event (week_view,end_dt);
+ current_end_day = e_week_view_get_day_offset_of_event (week_view,end_dt);
switch (direction) {
case E_CAL_VIEW_MOVE_UP:
@@ -3256,11 +3256,11 @@ static gboolean e_week_view_event_move (ECalendarView *cal_view, ECalViewMoveDir
break;
case E_CAL_VIEW_MOVE_RIGHT:
adjust_days = e_week_view_get_adjust_days_for_move_right (week_view,current_end_day);
- break;
+ break;
default:
break;
}
-
+
icaltime_adjust (&start_time ,adjust_days,0,0,0);
icaltime_adjust (&end_time ,adjust_days,0,0,0);
start_dt = icaltime_as_timet_with_zone (start_time,
@@ -3285,7 +3285,7 @@ static gboolean e_week_view_event_move (ECalendarView *cal_view, ECalViewMoveDir
return TRUE;
}
}
-
+
e_week_view_change_event_time (week_view, start_dt, end_dt, is_all_day);
return TRUE;
}
@@ -3294,7 +3294,7 @@ static gint
e_week_view_get_day_offset_of_event (EWeekView *week_view, time_t event_time)
{
time_t first_day = week_view->day_starts[0];
-
+
if (event_time - first_day < 0)
return -1;
else
@@ -3306,7 +3306,7 @@ e_week_view_scroll_a_step (EWeekView *week_view, ECalViewMoveDirection direction
{
GtkAdjustment *adj = GTK_RANGE (week_view->vscrollbar)->adjustment;
gfloat new_value;
-
+
switch (direction){
case E_CAL_VIEW_MOVE_UP:
new_value = adj->value - adj->step_increment;
@@ -3357,7 +3357,7 @@ e_week_view_change_event_time (EWeekView *week_view, time_t start_dt, time_t end
/* FIXME: Should probably keep the timezone of the original start
and end times. */
date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
-
+
*date.value = icaltime_from_timet_with_zone (start_dt, is_all_day,
e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
e_cal_component_set_dtstart (comp, &date);
@@ -3366,12 +3366,12 @@ e_week_view_change_event_time (EWeekView *week_view, time_t start_dt, time_t end
e_cal_component_set_dtend (comp, &date);
e_cal_component_commit_sequence (comp);
-
+
if (week_view->last_edited_comp_string != NULL) {
g_free (week_view->last_edited_comp_string);
week_view->last_edited_comp_string = NULL;
}
-
+
week_view->last_edited_comp_string = e_cal_component_get_as_string (comp);
@@ -3388,13 +3388,13 @@ e_week_view_change_event_time (EWeekView *week_view, time_t start_dt, time_t end
e_cal_component_set_exrule_list (comp, NULL);
}
}
-
+
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (week_view)));
e_cal_component_commit_sequence (comp);
e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
-out:
+out:
g_object_unref (comp);
}
@@ -3439,7 +3439,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
ECal *client;
const char *uid;
gboolean on_server;
-
+
/* Note: the item we are passed here isn't reliable, so we just stop
the edit of whatever item was being edited. We also receive this
event twice for some reason. */
@@ -3470,10 +3470,10 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
client = event->comp_data->client;
on_server = cal_comp_is_on_server (comp, client);
-
+
if (string_is_empty (text) && !on_server) {
e_cal_component_get_uid (comp, &uid);
- g_signal_handlers_disconnect_by_func(item, e_week_view_on_text_item_event, week_view);
+ g_signal_handlers_disconnect_by_func(item, e_week_view_on_text_item_event, week_view);
e_week_view_foreach_event_with_uid (week_view, uid,
e_week_view_remove_event_cb, NULL);
week_view->event_destroyed = TRUE;
@@ -3490,12 +3490,12 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
span_num);
} else if (summary.value || !string_is_empty (text)) {
icalcomponent *icalcomp = e_cal_component_get_icalcomponent (comp);
-
+
summary.value = text;
summary.altrep = NULL;
e_cal_component_set_summary (comp, &summary);
e_cal_component_commit_sequence (comp);
-
+
if (!on_server) {
if (!e_cal_create_object (client, icalcomp, NULL, NULL))
g_message (G_STRLOC ": Could not create the object!");
@@ -3507,7 +3507,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
} else {
CalObjModType mod = CALOBJ_MOD_ALL;
GtkWindow *toplevel;
-
+
if (e_cal_component_is_instance (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL, FALSE)) {
goto out;
@@ -3552,7 +3552,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
e_cal_component_commit_sequence (comp);
}
}
-
+
/* FIXME When sending here, what exactly should we send? */
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (week_view)));
e_calendar_view_modify_and_send (comp, client, mod, toplevel, FALSE);
@@ -3681,7 +3681,7 @@ e_week_view_do_cursor_key_up (EWeekView *week_view)
{
if (week_view->selection_start_day <= 0)
return;
-
+
week_view->selection_start_day--;
week_view->selection_end_day = week_view->selection_start_day;
g_signal_emit_by_name (week_view, "selected_time_changed");
@@ -3694,7 +3694,7 @@ e_week_view_do_cursor_key_down (EWeekView *week_view)
if (week_view->selection_start_day == -1 ||
week_view->selection_start_day >= 6)
return;
-
+
week_view->selection_start_day++;
week_view->selection_end_day = week_view->selection_start_day;
g_signal_emit_by_name (week_view, "selected_time_changed");
@@ -3706,7 +3706,7 @@ e_week_view_do_cursor_key_left (EWeekView *week_view)
{
if (week_view->selection_start_day == -1)
return;
-
+
week_view->selection_start_day = map_left[week_view->selection_start_day];
week_view->selection_end_day = week_view->selection_start_day;
g_signal_emit_by_name (week_view, "selected_time_changed");
@@ -3718,7 +3718,7 @@ e_week_view_do_cursor_key_right (EWeekView *week_view)
{
if (week_view->selection_start_day == -1)
return;
-
+
week_view->selection_start_day = map_right[week_view->selection_start_day];
week_view->selection_end_day = week_view->selection_start_day;
g_signal_emit_by_name (week_view, "selected_time_changed");
@@ -3730,7 +3730,7 @@ e_month_view_do_cursor_key_up (EWeekView *week_view)
{
if (week_view->selection_start_day < 7)
return;
-
+
week_view->selection_start_day -= 7;
week_view->selection_end_day = week_view->selection_start_day;
g_signal_emit_by_name (week_view, "selected_time_changed");
@@ -3745,7 +3745,7 @@ e_month_view_do_cursor_key_down (EWeekView *week_view)
if (week_view->selection_start_day == -1 ||
week_view->selection_start_day >= (weeks_shown - 1) * 7)
return;
-
+
week_view->selection_start_day += 7;
week_view->selection_end_day = week_view->selection_start_day;
g_signal_emit_by_name (week_view, "selected_time_changed");
@@ -3757,7 +3757,7 @@ e_month_view_do_cursor_key_left (EWeekView *week_view)
{
if (week_view->selection_start_day <= 0)
return;
-
+
week_view->selection_start_day--;
week_view->selection_end_day = week_view->selection_start_day;
g_signal_emit_by_name (week_view, "selected_time_changed");
@@ -3772,7 +3772,7 @@ e_month_view_do_cursor_key_right (EWeekView *week_view)
if (week_view->selection_start_day == -1 ||
week_view->selection_start_day >= weeks_shown * 7 - 1)
return;
-
+
week_view->selection_start_day++;
week_view->selection_end_day = week_view->selection_start_day;
g_signal_emit_by_name (week_view, "selected_time_changed");
@@ -3858,7 +3858,7 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
gboolean read_only = TRUE;
gboolean stop_emission;
GnomeCalendarViewType view_type;
-
+
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (E_IS_WEEK_VIEW (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
@@ -3886,15 +3886,15 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
case GDK_Page_Up:
if (!week_view->multi_week_view)
e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_UP);
- else
+ else
e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_PAGE_UP);
break;
case GDK_Page_Down:
if (!week_view->multi_week_view)
e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_DOWN);
- else
+ else
e_week_view_scroll_a_step (week_view, E_CAL_VIEW_MOVE_PAGE_DOWN);
- break;
+ break;
case GDK_Up:
e_week_view_cursor_key_up (week_view, view_type);
break;
@@ -3914,7 +3914,7 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
}
if (stop_emission)
return TRUE;
-
+
/*Navigation through days with arrow keys*/
if (((event->state & GDK_SHIFT_MASK) != GDK_SHIFT_MASK)
&&((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK)
@@ -3928,7 +3928,7 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
else if (keyval == GDK_Right || keyval == GDK_KP_Right)
return e_week_view_event_move ((ECalendarView *) week_view, E_CAL_VIEW_MOVE_RIGHT);
}
-
+
if (week_view->selection_start_day == -1)
return FALSE;
@@ -3998,7 +3998,7 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
event_num);
span = &g_array_index (week_view->spans, EWeekViewEventSpan,
wvevent->spans_index + 0);
-
+
/* If the event can't be fit on the screen, don't try to edit it. */
if (!span->text_item) {
e_week_view_foreach_event_with_uid (week_view, uid,
@@ -4007,7 +4007,7 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
e_week_view_start_editing_event (week_view, event_num, 0,
initial_text);
}
-
+
} else {
g_warning ("Couldn't find event to start editing.\n");
}
@@ -4076,7 +4076,7 @@ e_week_view_show_popup_menu (EWeekView *week_view,
gint event_num)
{
GtkMenu *popup;
-
+
week_view->popup_event_num = event_num;
popup = e_calendar_view_create_popup_menu (E_CALENDAR_VIEW (week_view));
diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h
index 579ba43eb7..ca46060c37 100644
--- a/calendar/gui/e-week-view.h
+++ b/calendar/gui/e-week-view.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 1999, Ximian, Inc.
* Copyright 2001, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -108,7 +108,7 @@ typedef enum
E_WEEK_VIEW_COLOR_DATES,
E_WEEK_VIEW_COLOR_DATES_SELECTED,
E_WEEK_VIEW_COLOR_TODAY,
-
+
E_WEEK_VIEW_COLOR_LAST
} EWeekViewColors;
@@ -205,7 +205,7 @@ struct _EWeekView
gboolean multi_week_view;
gboolean update_base_date;
-
+
/* How many weeks we are showing. This is only relevant if
display_month is TRUE. */
gint weeks_shown;
@@ -336,7 +336,7 @@ struct _EWeekView
/* remember last selected interval when click and restore on double click,
if we double clicked inside that interval. */
- guint32 bc_event_time;
+ guint32 bc_event_time;
time_t before_click_dtstart;
time_t before_click_dtend;
};
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 140f84f3c7..768ed6e89b 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -96,7 +96,7 @@
/* Private part of the GnomeCalendar structure */
struct _GnomeCalendarPrivate {
/* The clients for display */
-
+
GHashTable *clients[E_CAL_SOURCE_TYPE_LAST];
GList *clients_list[E_CAL_SOURCE_TYPE_LAST];
ECal *default_client[E_CAL_SOURCE_TYPE_LAST];
@@ -109,7 +109,7 @@ struct _GnomeCalendarPrivate {
/* This is the last time explicitly selected by the user */
time_t base_view_time;
-
+
/* Widgets */
GtkWidget *search_bar;
@@ -119,13 +119,13 @@ struct _GnomeCalendarPrivate {
GtkWidget *vpane;
ECalendar *date_navigator;
- EMiniCalendarConfig *date_navigator_config;
+ EMiniCalendarConfig *date_navigator_config;
GtkWidget *todo;
ECalendarTableConfig *todo_config;
-
+
GtkWidget *memo;
EMemoTableConfig *memo_config;
-
+
GtkWidget *day_view;
GtkWidget *work_week_view;
GtkWidget *week_view;
@@ -147,7 +147,7 @@ struct _GnomeCalendarPrivate {
char *memo_sexp;
guint update_timeout;
guint update_marcus_bains_line_timeout;
-
+
/* This is the view currently shown. We use it to keep track of the
positions of the panes. range_selected is TRUE if a range of dates
was selected in the date navigator to show the view. */
@@ -155,7 +155,7 @@ struct _GnomeCalendarPrivate {
GObject *configs[GNOME_CAL_LAST_VIEW];
GnomeCalendarViewType current_view_type;
GList *notifications;
-
+
gboolean range_selected;
/* These are the saved positions of the panes. They are multiples of
@@ -175,7 +175,7 @@ struct _GnomeCalendarPrivate {
/* Our current week start */
int week_start;
-
+
/* Our current timezone. */
icaltimezone *zone;
@@ -453,7 +453,7 @@ gnome_calendar_class_init (GnomeCalendarClass *class)
"goto_date",1,
G_TYPE_ENUM,
GNOME_CAL_GOTO_SAME_DAY_OF_NEXT_WEEK);
-
+
/* Ctrl+Y/J/K/M/L to switch between
* DayView/WorkWeekView/WeekView/MonthView/ListView */
gtk_binding_entry_add_signal (binding_set, GDK_y,
@@ -518,7 +518,7 @@ dn_e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer data)
GnomeCalendar *gcal;
GnomeCalendarPrivate *priv;
GList *l;
-
+
gcal = GNOME_CALENDAR (data);
priv = gcal->priv;
@@ -529,7 +529,7 @@ dn_e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer data)
comp = e_cal_component_new ();
if (!e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (l->data))) {
g_object_unref (comp);
-
+
continue;
}
@@ -595,9 +595,9 @@ get_times_for_views (GnomeCalendar *gcal, GnomeCalendarViewType view_type, time_
gboolean has_working_days = FALSE;
guint offset;
struct icaltimetype tt = icaltime_null_time ();
-
+
priv = gcal->priv;
-
+
switch (view_type) {
case GNOME_CAL_DAY_VIEW:
shown = e_day_view_get_days_shown (E_DAY_VIEW (priv->views[view_type]));
@@ -667,7 +667,7 @@ get_times_for_views (GnomeCalendar *gcal, GnomeCalendarViewType view_type, time_
shown = e_week_view_get_weeks_shown (E_WEEK_VIEW (priv->views[view_type]));
/* FIXME We should be using the same day of the week enum every where */
display_start = (E_WEEK_VIEW (priv->views[view_type])->display_start_day + 1) % 7;
-
+
if (!priv->range_selected)
*start_time = time_month_begin_with_zone (*start_time, priv->zone);
*start_time = time_week_begin_with_zone (*start_time, display_start, priv->zone);
@@ -677,7 +677,7 @@ get_times_for_views (GnomeCalendar *gcal, GnomeCalendarViewType view_type, time_
/* FIXME What to do here? */
*start_time = time_month_begin_with_zone (*start_time, priv->zone);
*end_time = time_add_month_with_zone (*start_time, 1, priv->zone);
- break;
+ break;
default:
g_return_if_reached ();
}
@@ -1024,10 +1024,10 @@ gnome_calendar_emit_user_created_signal (gpointer instance, GnomeCalendar *gcal,
static void
user_created_cb (GtkWidget *view, GnomeCalendar *gcal)
{
- GnomeCalendarPrivate *priv;
+ GnomeCalendarPrivate *priv;
ECal *ecal;
-
- priv = gcal->priv;
+
+ priv = gcal->priv;
ecal = priv->user_created_cal;
if (!ecal) {
@@ -1115,9 +1115,9 @@ static void
connect_list_view_focus (GnomeCalendar *gcal, ECalListView *lv)
{
ETable *etable;
-
+
etable = e_table_scrolled_get_table (lv->table_scrolled);
-
+
g_signal_connect (etable->table_canvas, "focus_in_event",
G_CALLBACK (calendar_focus_change_cb), gcal);
g_signal_connect (etable->table_canvas, "focus_out_event",
@@ -1153,7 +1153,7 @@ set_week_start (GnomeCalendar *calendar)
GnomeCalendarPrivate *priv;
priv = calendar->priv;
-
+
priv->week_start = calendar_config_get_week_start_day ();
/* Only do this if views exist */
@@ -1168,7 +1168,7 @@ static void
week_start_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
{
GnomeCalendar *calendar = data;
-
+
set_week_start (calendar);
}
@@ -1178,7 +1178,7 @@ set_working_days (GnomeCalendar *calendar)
GnomeCalendarPrivate *priv;
priv = calendar->priv;
-
+
/* Only do this if views exist */
if (priv->day_view && priv->work_week_view && priv->week_view && priv->month_view && priv->list_view) {
update_view_times (calendar, priv->base_view_time);
@@ -1191,18 +1191,18 @@ static void
working_days_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
{
GnomeCalendar *calendar = data;
-
+
set_working_days (calendar);
}
static void
-set_timezone (GnomeCalendar *calendar)
+set_timezone (GnomeCalendar *calendar)
{
GnomeCalendarPrivate *priv;
int i;
-
+
priv = calendar->priv;
-
+
priv->zone = calendar_config_get_icaltimezone ();
for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++) {
@@ -1210,13 +1210,13 @@ set_timezone (GnomeCalendar *calendar)
for (l = priv->clients_list[i]; l != NULL; l = l->next) {
ECal *client = l->data;
-
+
if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED)
/* FIXME Error checking */
e_cal_set_default_timezone (client, priv->zone, NULL);
}
- if (priv->default_client[i]
+ if (priv->default_client[i]
&& e_cal_get_load_state (priv->default_client[i]) == E_CAL_LOAD_LOADED)
/* FIXME Error checking */
e_cal_set_default_timezone (priv->default_client[i], priv->zone, NULL);
@@ -1227,7 +1227,7 @@ static void
timezone_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
{
GnomeCalendar *calendar = data;
-
+
set_timezone (calendar);
}
@@ -1237,16 +1237,16 @@ update_todo_view (GnomeCalendar *gcal)
GnomeCalendarPrivate *priv;
ECalModel *model;
char *sexp = NULL;
-
+
priv = gcal->priv;
-
+
/* Set the query on the task pad */
if (priv->todo_sexp) {
g_free (priv->todo_sexp);
}
-
+
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
-
+
if ((sexp = calendar_config_get_hide_completed_tasks_sexp (FALSE)) != NULL) {
priv->todo_sexp = g_strdup_printf ("(and %s %s)", sexp, priv->sexp);
e_cal_model_set_search_query (model, priv->todo_sexp);
@@ -1255,7 +1255,7 @@ update_todo_view (GnomeCalendar *gcal)
priv->todo_sexp = g_strdup (priv->sexp);
e_cal_model_set_search_query (model, priv->todo_sexp);
}
-
+
}
static void
@@ -1263,11 +1263,11 @@ update_memo_view (GnomeCalendar *gcal)
{
GnomeCalendarPrivate *priv;
ECalModel *model, *view_model;
- time_t start, end;
+ time_t start, end;
char *iso_start, *iso_end;
-
+
priv = gcal->priv;
-
+
/* Set the query on the memo pad*/
model = e_memo_table_get_model (E_MEMO_TABLE (priv->memo));
view_model = e_calendar_view_get_model(priv->views[priv->current_view_type]);
@@ -1280,11 +1280,11 @@ update_memo_view (GnomeCalendar *gcal)
if (priv->memo_sexp) {
g_free (priv->memo_sexp);
}
-
+
priv->memo_sexp = g_strdup_printf ("(not (has-start?)) or (and (occur-in-time-range? (make-time \"%s\")"
" (make-time \"%s\"))"
" %s)",
- iso_start, iso_end,
+ iso_start, iso_end,
priv->sexp ? priv->sexp : "");
e_cal_model_set_search_query (model, priv->memo_sexp);
@@ -1308,7 +1308,7 @@ process_completed_tasks (GnomeCalendar *gcal, gboolean config_changed)
static gboolean
update_todo_view_cb (GnomeCalendar *gcal)
-{
+{
ECalModel *model;
model = e_calendar_table_get_model (E_CALENDAR_TABLE (gcal->priv->todo));
@@ -1321,7 +1321,7 @@ update_todo_view_cb (GnomeCalendar *gcal)
static gboolean
update_marcus_bains_line_cb (GnomeCalendar *gcal)
-{
+{
GnomeCalendarPrivate *priv;
priv = gcal->priv;
@@ -1359,23 +1359,23 @@ setup_config (GnomeCalendar *calendar)
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* Timezone */
- set_timezone (calendar);
+ set_timezone (calendar);
not = calendar_config_add_notification_timezone (timezone_changed_cb, calendar);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
/* Hide completed tasks */
- not = calendar_config_add_notification_hide_completed_tasks (config_hide_completed_tasks_changed_cb,
+ not = calendar_config_add_notification_hide_completed_tasks (config_hide_completed_tasks_changed_cb,
calendar);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- not = calendar_config_add_notification_hide_completed_tasks_units (config_hide_completed_tasks_changed_cb,
+
+ not = calendar_config_add_notification_hide_completed_tasks_units (config_hide_completed_tasks_changed_cb,
calendar);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
- not = calendar_config_add_notification_hide_completed_tasks_value (config_hide_completed_tasks_changed_cb,
+
+ not = calendar_config_add_notification_hide_completed_tasks_value (config_hide_completed_tasks_changed_cb,
calendar);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
-
+
/* Pane positions */
priv->hpane_pos = calendar_config_get_hpane_pos ();
priv->vpane_pos = calendar_config_get_vpane_pos ();
@@ -1384,7 +1384,7 @@ setup_config (GnomeCalendar *calendar)
}
static void
-update_adjustment (GnomeCalendar *gcal, GtkAdjustment *adjustment, EWeekView *week_view)
+update_adjustment (GnomeCalendar *gcal, GtkAdjustment *adjustment, EWeekView *week_view)
{
GDate date;
gint week_offset;
@@ -1424,13 +1424,13 @@ update_adjustment (GnomeCalendar *gcal, GtkAdjustment *adjustment, EWeekView *we
}
static void
-week_view_adjustment_changed_cb (GtkAdjustment *adjustment, GnomeCalendar *gcal)
+week_view_adjustment_changed_cb (GtkAdjustment *adjustment, GnomeCalendar *gcal)
{
- update_adjustment (gcal, adjustment, E_WEEK_VIEW (gcal->priv->week_view));
+ update_adjustment (gcal, adjustment, E_WEEK_VIEW (gcal->priv->week_view));
}
static void
-month_view_adjustment_changed_cb (GtkAdjustment *adjustment, GnomeCalendar *gcal)
+month_view_adjustment_changed_cb (GtkAdjustment *adjustment, GnomeCalendar *gcal)
{
update_adjustment (gcal, adjustment, E_WEEK_VIEW (gcal->priv->month_view));
}
@@ -1481,10 +1481,10 @@ view_done_cb (ECalModel *model, ECalendarStatus status, ECalSourceType type, Gno
} else if (type == E_CAL_SOURCE_TYPE_JOURNAL) {
e_memo_table_set_status_message (E_MEMO_TABLE (gcal->priv->memo), NULL);
}
-
+
}
-GtkWidget *
+GtkWidget *
gnome_calendar_get_tag (GnomeCalendar *gcal)
{
return GTK_WIDGET (gcal->priv->date_navigator);
@@ -1519,7 +1519,7 @@ setup_widgets (GnomeCalendar *gcal)
/* The main HPaned, with the notebook of calendar views on the left
and the ECalendar and ToDo list on the right. */
priv->hpane = gtk_hpaned_new ();
- g_signal_connect_after(priv->hpane, "realize",
+ g_signal_connect_after(priv->hpane, "realize",
G_CALLBACK(gnome_calendar_hpane_realized), gcal);
g_signal_connect (priv->hpane, "button_release_event",
G_CALLBACK (gnome_calendar_hpane_resized), gcal);
@@ -1550,7 +1550,7 @@ setup_widgets (GnomeCalendar *gcal)
G_CALLBACK (gnome_calendar_on_date_navigator_date_range_changed), gcal);
g_signal_connect (w, "scroll-event",
G_CALLBACK (gnome_calendar_date_navigator_scrolled), gcal);
-
+
/* The VPaned widget, to contain the ToDo list & Memo list */
priv->vpane = gtk_vpaned_new ();
g_signal_connect_after (priv->vpane, "realize",
@@ -1564,18 +1564,18 @@ setup_widgets (GnomeCalendar *gcal)
vbox = gtk_vbox_new (FALSE, 0);
sep = gtk_hseparator_new ();
gtk_box_pack_start ((GtkBox *)vbox, sep, FALSE, TRUE, 0);
-
+
label = gtk_label_new (NULL);
tmp = g_strdup_printf ("<b> %s </b>", _("Tasks"));
gtk_label_set_markup ((GtkLabel *)label, tmp);
g_free (tmp);
gtk_box_pack_start ((GtkBox *)vbox, label, FALSE, TRUE, 0);
-
+
priv->todo = e_calendar_table_new ();
priv->todo_config = e_calendar_table_config_new (E_CALENDAR_TABLE (priv->todo));
gtk_paned_pack1 (GTK_PANED (priv->vpane), vbox, FALSE, TRUE);
gtk_box_pack_end ((GtkBox *)vbox, priv->todo, TRUE, TRUE, 0);
-
+
gtk_widget_show (priv->todo);
gtk_widget_show (label);
gtk_widget_show (vbox);
@@ -1584,7 +1584,7 @@ setup_widgets (GnomeCalendar *gcal)
filename = g_build_filename (calendar_component_peek_config_directory (calendar_component_peek ()),
"TaskPad", NULL);
e_calendar_table_load_state (E_CALENDAR_TABLE (priv->todo), filename);
-
+
update_todo_view (gcal);
g_free (filename);
@@ -1596,14 +1596,14 @@ setup_widgets (GnomeCalendar *gcal)
g_signal_connect (etable, "selection_change",
G_CALLBACK (table_selection_change_cb), gcal);
-
+
g_signal_connect (e_calendar_table_get_model ((ECalendarTable *)priv->todo), "cal_view_progress",
G_CALLBACK (view_progress_cb), gcal);
g_signal_connect (e_calendar_table_get_model ((ECalendarTable *)priv->todo), "cal_view_done",
G_CALLBACK (view_done_cb), gcal);
/* Timeout check to hide completed items */
- priv->update_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_todo_view_cb, gcal, NULL);
+ priv->update_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_todo_view_cb, gcal, NULL);
/* The Day View. */
priv->day_view = e_day_view_new ();
@@ -1623,7 +1623,7 @@ setup_widgets (GnomeCalendar *gcal)
connect_day_view_focus (gcal, E_DAY_VIEW (priv->work_week_view));
/* The Marcus Bains line */
- priv->update_marcus_bains_line_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_marcus_bains_line_cb, gcal, NULL);
+ priv->update_marcus_bains_line_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_marcus_bains_line_cb, gcal, NULL);
/* The Week View. */
priv->week_view = e_week_view_new ();
@@ -1643,7 +1643,7 @@ setup_widgets (GnomeCalendar *gcal)
G_CALLBACK (view_progress_cb), gcal);
g_signal_connect (w_model, "cal_view_done",
G_CALLBACK (view_done_cb), gcal);
-
+
/* The Month View. */
priv->month_view = e_week_view_new ();
e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->month_view), gcal);
@@ -1659,7 +1659,7 @@ setup_widgets (GnomeCalendar *gcal)
g_signal_connect (adjustment, "value_changed",
G_CALLBACK (month_view_adjustment_changed_cb),
gcal);
-
+
/* The List View. */
priv->list_view = e_cal_list_view_new ();
@@ -1696,13 +1696,13 @@ setup_widgets (GnomeCalendar *gcal)
label = gtk_label_new (NULL);
tmp = g_strdup_printf ("<b> %s </b>", _("Memos"));
gtk_label_set_markup ((GtkLabel *)label, tmp);
- g_free (tmp);
+ g_free (tmp);
gtk_box_pack_start ((GtkBox *)vbox, label, FALSE, TRUE, 0);
priv->memo = e_memo_table_new ();
priv->memo_config = e_memo_table_config_new (E_MEMO_TABLE (priv->memo));
gtk_paned_pack2 (GTK_PANED (priv->vpane), vbox, TRUE, TRUE);
gtk_box_pack_end ((GtkBox *)vbox, priv->memo, TRUE, TRUE, 0);
-
+
gtk_widget_show (priv->memo);
gtk_widget_show (label);
gtk_widget_show (vbox);
@@ -1710,7 +1710,7 @@ setup_widgets (GnomeCalendar *gcal)
filename = g_build_filename (memos_component_peek_config_directory (memos_component_peek ()),
"MemoPad", NULL);
e_memo_table_load_state (E_MEMO_TABLE (priv->memo), filename);
-
+
update_memo_view (gcal);
g_free (filename);
@@ -1722,7 +1722,7 @@ setup_widgets (GnomeCalendar *gcal)
g_signal_connect (etable, "selection_change",
G_CALLBACK (memo_selection_change_cb), gcal);
-
+
g_signal_connect (e_memo_table_get_model ((EMemoTable *)priv->memo), "cal_view_progress",
G_CALLBACK (view_progress_cb), gcal);
g_signal_connect (e_memo_table_get_model ((EMemoTable *)priv->memo), "cal_view_done",
@@ -1731,7 +1731,7 @@ setup_widgets (GnomeCalendar *gcal)
/* make sure we set the initial time ranges for the views */
update_view_times (gcal, time (NULL));
- gnome_calendar_update_date_navigator (gcal);
+ gnome_calendar_update_date_navigator (gcal);
}
/* Object initialization function for the gnome calendar */
@@ -1740,13 +1740,13 @@ gnome_calendar_init (GnomeCalendar *gcal)
{
GnomeCalendarPrivate *priv;
int i;
-
+
priv = g_new0 (GnomeCalendarPrivate, 1);
gcal->priv = priv;
for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++)
priv->clients[i] = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
-
+
priv->config_listener = e_config_listener_new ();
g_signal_connect (priv->config_listener, "key_changed", G_CALLBACK (config_categories_changed_cb), gcal);
@@ -1761,7 +1761,7 @@ gnome_calendar_init (GnomeCalendar *gcal)
priv->taskpad_menu = e_cal_menu_new("org.gnome.evolution.calendar.taskpad");
priv->memopad_menu = e_cal_menu_new ("org.gnome.evolution.calendar.memopad");
- priv->dn_queries = NULL;
+ priv->dn_queries = NULL;
priv->sexp = g_strdup ("#t"); /* Match all */
priv->todo_sexp = g_strdup ("#t");
priv->memo_sexp = g_strdup ("#t");
@@ -1815,11 +1815,11 @@ gnome_calendar_destroy (GtkObject *object)
priv->clients_list[i] = NULL;
if (priv->default_client[i]) {
- g_signal_handlers_disconnect_matched (priv->default_client[i],
+ g_signal_handlers_disconnect_matched (priv->default_client[i],
G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, gcal);
g_object_unref (priv->default_client[i]);
- }
+ }
priv->default_client[i] = NULL;
}
@@ -1831,18 +1831,18 @@ gnome_calendar_destroy (GtkObject *object)
g_object_unref (priv->date_navigator_config);
g_object_unref (priv->todo_config);
g_object_unref (priv->memo_config);
-
+
for (l = priv->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
g_list_free (priv->notifications);
priv->notifications = NULL;
-
+
/* Save the TaskPad layout. */
filename = g_build_filename (calendar_component_peek_config_directory (calendar_component_peek ()),
"TaskPad", NULL);
e_calendar_table_save_state (E_CALENDAR_TABLE (priv->todo), filename);
g_free (filename);
-
+
/* Save the MemoPad layout. */
filename = g_build_filename (memos_component_peek_config_directory (memos_component_peek ()),
"MemoPad", NULL);
@@ -1864,7 +1864,7 @@ gnome_calendar_destroy (GtkObject *object)
g_free (priv->sexp);
priv->sexp = NULL;
}
-
+
if (priv->todo_sexp) {
g_free (priv->todo_sexp);
priv->todo_sexp = NULL;
@@ -1931,7 +1931,7 @@ gnome_calendar_destroy (GtkObject *object)
g_free (priv);
gcal->priv = NULL;
}
-
+
if (GTK_OBJECT_CLASS (gnome_calendar_parent_class)->destroy)
(* GTK_OBJECT_CLASS (gnome_calendar_parent_class)->destroy) (object);
}
@@ -1941,7 +1941,7 @@ notify_selected_time_changed (GnomeCalendar *gcal)
{
GnomeCalendarPrivate *priv;
int i;
-
+
priv = gcal->priv;
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
g_signal_emit_by_name (priv->views[i], "selected_time_changed");
@@ -1953,7 +1953,7 @@ gnome_calendar_goto_date (GnomeCalendar *gcal,
GnomeCalendarGotoDateType goto_date)
{
GnomeCalendarPrivate *priv;
- time_t new_time = 0;
+ time_t new_time = 0;
gboolean need_updating = FALSE;
g_return_if_fail (gcal != NULL);
@@ -2032,11 +2032,11 @@ gnome_calendar_goto (GnomeCalendar *gcal, time_t new_time)
update_view_times (gcal, new_time);
gnome_calendar_update_date_navigator (gcal);
gnome_calendar_notify_dates_shown_changed (gcal);
-
+
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
- if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (priv->views[i]))->set_selected_time_range)
+ if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (priv->views[i]))->set_selected_time_range)
E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (priv->views[i]))->set_selected_time_range (priv->views[i], new_time, new_time);
- }
+ }
}
@@ -2045,9 +2045,9 @@ update_view_times (GnomeCalendar *gcal, time_t start_time)
{
GnomeCalendarPrivate *priv;
int i;
-
+
priv = gcal->priv;
-
+
priv->base_view_time = start_time;
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
@@ -2245,7 +2245,7 @@ display_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type, gboolean gra
case GNOME_CAL_DAY_VIEW:
if (!priv->range_selected)
e_day_view_set_days_shown (E_DAY_VIEW (priv->day_view), 1);
-
+
gtk_widget_show (GTK_WIDGET (gcal->priv->date_navigator));
break;
@@ -2270,7 +2270,7 @@ display_view (GnomeCalendar *gcal, GnomeCalendarViewType view_type, gboolean gra
case GNOME_CAL_LIST_VIEW:
if (!priv->lview_select_daten_range)
gtk_widget_hide (GTK_WIDGET (gcal->priv->date_navigator));
- else
+ else
gtk_widget_show (GTK_WIDGET (gcal->priv->date_navigator));
break;
@@ -2300,7 +2300,7 @@ static void gnome_calendar_change_view (GnomeCalendar *gcal, GnomeCalendarViewTy
{
if (gnome_calendar_get_view(gcal) == view_type)
return;
-
+
gnome_calendar_set_view(gcal, view_type);
}
@@ -2312,41 +2312,41 @@ display_view_cb (GalViewInstance *view_instance, GalView *view, gpointer data)
GnomeCalendarPrivate *priv;
CalendarView *cal_view;
GnomeCalendarViewType view_type;
-
+
gcal = GNOME_CALENDAR (data);
priv = gcal->priv;
-
+
if (GAL_IS_VIEW_ETABLE(view)) {
ETable *table;
-
+
view_type = GNOME_CAL_LIST_VIEW;
-
+
table = e_table_scrolled_get_table (E_CAL_LIST_VIEW (priv->list_view)->table_scrolled);
gal_view_etable_attach_table (GAL_VIEW_ETABLE (view), table);
} else if (IS_CALENDAR_VIEW (view)) {
cal_view = CALENDAR_VIEW (view);
-
+
view_type = calendar_view_get_view_type (cal_view);
} else {
g_error (G_STRLOC ": Unknown type of view for GnomeCalendar");
return;
}
-
+
display_view (gcal, view_type, TRUE);
gnome_calendar_update_date_navigator (gcal);
gnome_calendar_notify_dates_shown_changed (gcal);
if (!priv->lview_select_daten_range && priv->current_view_type != GNOME_CAL_LIST_VIEW)
update_query (gcal);
-
+
}
/**
* gnome_calendar_setup_view_menus:
* @gcal: A calendar.
* @uic: UI controller to use for the menus.
- *
+ *
* Sets up the #GalView menus for a calendar. This function should be called
* from the Bonobo control activation callback for this calendar. Also, the
* menus should be discarded using gnome_calendar_discard_view_menus().
@@ -2381,7 +2381,7 @@ gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic)
path0 = g_build_filename (EVOLUTION_GALVIEWSDIR,
"calendar",
NULL);
- path1 = g_build_filename (calendar_component_peek_base_directory (calendar_component_peek ()),
+ path1 = g_build_filename (calendar_component_peek_base_directory (calendar_component_peek ()),
"calendar", "views", NULL);
gal_view_collection_set_storage_directories (collection,
path0,
@@ -2437,7 +2437,7 @@ gnome_calendar_setup_view_menus (GnomeCalendar *gcal, BonoboUIComponent *uic)
/**
* gnome_calendar_discard_view_menus:
* @gcal: A calendar.
- *
+ *
* Discards the #GalView menus used by a calendar. This function should be
* called from the Bonobo control deactivation callback for this calendar. The
* menus should have been set up with gnome_calendar_setup_view_menus().
@@ -2651,7 +2651,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
break;
case E_CALENDAR_STATUS_REPOSITORY_OFFLINE:
if (source_type == E_CAL_SOURCE_TYPE_EVENT)
- e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))),
+ e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))),
"calendar:prompt-no-contents-offline-calendar", NULL);
default:
/* Make sure the source doesn't disappear on us */
@@ -2680,7 +2680,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
/* add client to the views */
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
ECalModel *model;
-
+
model = e_calendar_view_get_model (priv->views[i]);
e_cal_model_add_client (model, ecal);
}
@@ -2690,7 +2690,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
break;
-
+
case E_CAL_SOURCE_TYPE_TODO :
msg = g_strdup_printf (_("Loading tasks at %s"), e_cal_get_uri (ecal));
e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), msg, -1);
@@ -2706,7 +2706,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
g_free (msg);
e_cal_model_add_client (e_memo_table_get_model (E_MEMO_TABLE (priv->memo)), ecal);
e_memo_table_set_status_message (E_MEMO_TABLE (priv->memo), NULL);
- break;
+ break;
default:
g_return_if_reached ();
}
@@ -2730,7 +2730,7 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar
switch (source_type) {
case E_CAL_SOURCE_TYPE_EVENT:
e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
- break;
+ break;
case E_CAL_SOURCE_TYPE_TODO:
e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), NULL, -1);
break;
@@ -2740,7 +2740,7 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar
default:
break;
}
-
+
switch (status) {
case E_CALENDAR_STATUS_OK:
break;
@@ -2751,7 +2751,7 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar
case E_CALENDAR_STATUS_INVALID_SERVER_VERSION :
e_error_run (NULL, "calendar:server-version", NULL);
status = E_CALENDAR_STATUS_OK;
- default:
+ default:
/* Make sure the source doesn't disappear on us */
g_object_ref (source);
@@ -2773,7 +2773,7 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, default_client_cal_opened_cb, NULL);
-
+
switch (source_type) {
case E_CAL_SOURCE_TYPE_EVENT:
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
@@ -2807,7 +2807,7 @@ open_ecal (GnomeCalendar *gcal, ECal *cal, gboolean only_if_exists, open_func of
zone = calendar_config_get_icaltimezone ();
e_cal_set_default_timezone (cal, zone, NULL);
-
+
msg = g_strdup_printf (_("Opening %s"), e_cal_get_uri (cal));
switch (e_cal_get_source_type (cal)) {
case E_CAL_SOURCE_TYPE_EVENT :
@@ -2874,15 +2874,15 @@ backend_died_cb (ECal *ecal, gpointer data)
/* Make sure the source doesn't go away on us since we use it below */
source_type = e_cal_get_source_type (ecal);
- source = g_object_ref (e_cal_get_source (ecal));
-
+ source = g_object_ref (e_cal_get_source (ecal));
+
priv->clients_list[source_type] = g_list_remove (priv->clients_list[source_type], ecal);
g_hash_table_remove (priv->clients[source_type], e_source_peek_uid (source));
switch (source_type) {
- case E_CAL_SOURCE_TYPE_EVENT:
+ case E_CAL_SOURCE_TYPE_EVENT:
id = "calendar:calendar-crashed";
-
+
e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL, -1);
gtk_signal_emit (GTK_OBJECT (gcal), gnome_calendar_signals[SOURCE_REMOVED], source_type, source);
@@ -2890,15 +2890,15 @@ backend_died_cb (ECal *ecal, gpointer data)
case E_CAL_SOURCE_TYPE_TODO:
id = "calendar:tasks-crashed";
-
+
e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->todo), NULL, -1);
gtk_signal_emit (GTK_OBJECT (gcal), gnome_calendar_signals[SOURCE_REMOVED], source_type, source);
break;
-
+
case E_CAL_SOURCE_TYPE_JOURNAL:
id = "calendar:memos-crashed";
-
+
e_memo_table_set_status_message (E_MEMO_TABLE (priv->memo), NULL);
gtk_signal_emit (GTK_OBJECT (gcal), gnome_calendar_signals[SOURCE_REMOVED], source_type, source);
@@ -2908,7 +2908,7 @@ backend_died_cb (ECal *ecal, gpointer data)
}
g_object_unref (source);
-
+
e_error_run (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), id, NULL);
}
@@ -2941,22 +2941,22 @@ gnome_calendar_new (void)
return GTK_WIDGET (gcal);
}
-void
+void
gnome_calendar_set_activity_handler (GnomeCalendar *cal, EActivityHandler *activity_handler)
{
GnomeCalendarPrivate *priv;
int i;
-
+
g_return_if_fail (cal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (cal));
priv = cal->priv;
priv->activity_handler = activity_handler;
-
+
for (i = 0; i < GNOME_CAL_LAST_VIEW; i++)
e_calendar_view_set_activity_handler (priv->views[i], activity_handler);
-
+
e_calendar_table_set_activity_handler (E_CALENDAR_TABLE (priv->todo), activity_handler);
}
@@ -3021,7 +3021,7 @@ gnome_calendar_add_source (GnomeCalendar *gcal, ECalSourceType source_type, ESou
{
GnomeCalendarPrivate *priv;
ECal *client;
-
+
g_return_val_if_fail (gcal != NULL, FALSE);
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), FALSE);
g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
@@ -3035,7 +3035,7 @@ gnome_calendar_add_source (GnomeCalendar *gcal, ECalSourceType source_type, ESou
return TRUE;
} else {
ESource *default_source;
-
+
if (priv->default_client[source_type]) {
default_source = e_cal_get_source (priv->default_client[source_type]);
@@ -3045,14 +3045,14 @@ gnome_calendar_add_source (GnomeCalendar *gcal, ECalSourceType source_type, ESou
client = g_object_ref (priv->default_client[source_type]);
}
- /* Create a new one */
+ /* Create a new one */
if (!client) {
client = auth_new_cal_from_source (source, source_type);
if (!client)
return FALSE;
}
}
-
+
g_signal_connect (G_OBJECT (client), "backend_error", G_CALLBACK (backend_error_cb), gcal);
g_signal_connect (G_OBJECT (client), "backend_died", G_CALLBACK (backend_died_cb), gcal);
@@ -3081,7 +3081,7 @@ gboolean
gnome_calendar_remove_source (GnomeCalendar *gcal, ECalSourceType source_type, ESource *source)
{
gboolean result;
-
+
g_return_val_if_fail (gcal != NULL, FALSE);
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), FALSE);
g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
@@ -3114,7 +3114,7 @@ gnome_calendar_remove_source_by_uid (GnomeCalendar *gcal, ECalSourceType source_
priv->clients_list[source_type] = g_list_remove (priv->clients_list[source_type], client);
g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, gcal);
+ 0, 0, NULL, NULL, gcal);
switch (source_type) {
case E_CAL_SOURCE_TYPE_EVENT:
@@ -3139,7 +3139,7 @@ gnome_calendar_remove_source_by_uid (GnomeCalendar *gcal, ECalSourceType source_
/* update date navigator query */
update_query (gcal);
break;
-
+
case E_CAL_SOURCE_TYPE_TODO:
model = e_calendar_table_get_model (E_CALENDAR_TABLE (priv->todo));
e_cal_model_remove_client (model, client);
@@ -3149,11 +3149,11 @@ gnome_calendar_remove_source_by_uid (GnomeCalendar *gcal, ECalSourceType source_
model = e_memo_table_get_model (E_MEMO_TABLE (priv->memo));
e_cal_model_remove_client (model, client);
break;
-
+
default:
g_return_val_if_reached (TRUE);
}
-
+
g_hash_table_remove (priv->clients[source_type], uid);
return TRUE;
@@ -3163,11 +3163,11 @@ gnome_calendar_remove_source_by_uid (GnomeCalendar *gcal, ECalSourceType source_
* gnome_calendar_set_default_source:
* @gcal: A calendar view
* @source: The #ESource to use as default
- *
+ *
* Set the default uri on the given calendar view, the default uri
* will be used as the default when creating events in the view.
- *
+ *
* Return value: TRUE if the uri was already added and is set, FALSE
* otherwise
**/
@@ -3176,7 +3176,7 @@ gnome_calendar_set_default_source (GnomeCalendar *gcal, ECalSourceType source_ty
{
GnomeCalendarPrivate *priv;
ECal *client;
-
+
g_return_val_if_fail (gcal != NULL, FALSE);
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), FALSE);
g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
@@ -3195,7 +3195,7 @@ gnome_calendar_set_default_source (GnomeCalendar *gcal, ECalSourceType source_ty
if (!priv->default_client[source_type])
return FALSE;
}
-
+
open_ecal (gcal, priv->default_client[source_type], FALSE, default_client_cal_opened_cb);
@@ -3227,7 +3227,7 @@ gnome_calendar_get_selected_time_range (GnomeCalendar *gcal,
{
GnomeCalendarPrivate *priv;
ECalModel *model;
-
+
g_return_if_fail (gcal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
@@ -3258,7 +3258,7 @@ gnome_calendar_new_task (GnomeCalendar *gcal, time_t *dtstart, time_t *dtend)
guint32 flags = 0;
ECalComponentDateTime dt;
struct icaltimetype itt;
-
+
g_return_if_fail (gcal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
@@ -3267,7 +3267,7 @@ gnome_calendar_new_task (GnomeCalendar *gcal, time_t *dtstart, time_t *dtend)
ecal = e_cal_model_get_default_client (model);
if (!ecal)
return;
-
+
flags |= COMP_EDITOR_NEW_ITEM;
tedit = task_editor_new (ecal, flags);
@@ -3349,21 +3349,21 @@ gnome_calendar_update_date_navigator (GnomeCalendar *gcal)
if (priv->current_view_type == GNOME_CAL_LIST_VIEW && !priv->lview_select_daten_range)
return;
-
+
model = e_calendar_view_get_model (priv->views[priv->current_view_type]);
e_cal_model_get_time_range (model, &start, &end);
-
+
time_to_gdate_with_zone (&start_date, start, priv->zone);
if (priv->current_view_type == GNOME_CAL_MONTH_VIEW) {
EWeekView *week_view = E_WEEK_VIEW (priv->views[priv->current_view_type]);
- if (priv->week_start == 0
+ if (priv->week_start == 0
&& (!week_view->multi_week_view || week_view->compress_weekend))
g_date_add_days (&start_date, 1);
}
time_to_gdate_with_zone (&end_date, end, priv->zone);
g_date_subtract_days (&end_date, 1);
-
+
e_calendar_item_set_selection (priv->date_navigator->calitem,
&start_date, &end_date);
}
@@ -3381,12 +3381,12 @@ gnome_calendar_on_date_navigator_selection_changed (ECalendarItem *calitem, Gnom
struct icaltimetype tt;
priv = gcal->priv;
-
+
starts_on_week_start_day = FALSE;
model = e_calendar_view_get_model (priv->views[priv->current_view_type]);
e_cal_model_get_time_range (model, &start, &end);
-
+
time_to_gdate_with_zone (&start_date, start, priv->zone);
if (priv->current_view_type == GNOME_CAL_MONTH_VIEW) {
EWeekView *week_view = E_WEEK_VIEW (priv->views[priv->current_view_type]);
@@ -3403,7 +3403,7 @@ gnome_calendar_on_date_navigator_selection_changed (ECalendarItem *calitem, Gnom
if (!g_date_compare (&start_date, &new_start_date)
&& !g_date_compare (&end_date, &new_end_date))
return;
-
+
new_days_shown = g_date_get_julian (&new_end_date) - g_date_get_julian (&new_start_date) + 1;
/* If a complete week is selected we show the Week view.
@@ -3419,7 +3419,7 @@ gnome_calendar_on_date_navigator_selection_changed (ECalendarItem *calitem, Gnom
tt.month = g_date_get_month (&new_start_date);
tt.day = g_date_get_day (&new_start_date);
new_time = icaltime_as_timet_with_zone (tt, priv->zone);
-
+
/* Switch views as appropriate, and change the number of days or weeks
shown. */
if (new_days_shown > 9) {
@@ -3434,10 +3434,10 @@ gnome_calendar_on_date_navigator_selection_changed (ECalendarItem *calitem, Gnom
view_type = GNOME_CAL_LIST_VIEW;
} else if (new_days_shown == 7 && starts_on_week_start_day) {
view_type = GNOME_CAL_WEEK_VIEW;
- } else {
+ } else {
e_day_view_set_days_shown (E_DAY_VIEW (priv->day_view), new_days_shown);
-
- if (new_days_shown == 5 && starts_on_week_start_day
+
+ if (new_days_shown == 5 && starts_on_week_start_day
&& priv->current_view_type == GNOME_CAL_WORK_WEEK_VIEW)
view_type = GNOME_CAL_WORK_WEEK_VIEW;
else
@@ -3471,13 +3471,13 @@ gnome_calendar_hpane_realized (GtkWidget *w, GnomeCalendar *gcal)
}
}
-static void
+static void
gnome_calendar_date_navigator_scrolled (GtkWidget *widget, GdkEventScroll *event, gpointer user_data)
{
GnomeCalendar *gcal = user_data;
- ECalendarItem *calitem = gcal->priv->date_navigator->calitem;
+ ECalendarItem *calitem = gcal->priv->date_navigator->calitem;
GDate start_date, end_date;
-
+
if (e_calendar_item_get_selection (calitem, &start_date, &end_date)) {
switch (event->direction) {
case GDK_SCROLL_UP:
@@ -3489,8 +3489,8 @@ gnome_calendar_date_navigator_scrolled (GtkWidget *widget, GdkEventScroll *event
g_date_add_months (&end_date, 1);
break;
default:
- break;
-
+ break;
+
}
e_calendar_item_set_selection (calitem, &start_date, &end_date);
gnome_calendar_on_date_navigator_selection_changed (calitem, gcal);
@@ -3520,8 +3520,8 @@ gnome_calendar_hpane_resized (GtkWidget *w, GdkEventButton *e, GnomeCalendar *gc
gtk_widget_set_size_request (E_DAY_VIEW (priv->day_view)->time_canvas, times_width, -1);
else
gtk_widget_set_size_request (E_DAY_VIEW (priv->day_view)->time_canvas, priv->hpane_pos - 20, -1);
-
-
+
+
return FALSE;
}
static void
@@ -3673,10 +3673,10 @@ gnome_calendar_get_num_events_selected (GnomeCalendar *gcal)
/**
* gnome_calendar_get_num_tasks_selected:
* @gcal: A calendar view.
- *
+ *
* Queries the number of tasks that are currently selected in the task pad of a
* calendar view.
- *
+ *
* Return value: Number of selected tasks.
**/
gint
@@ -3772,16 +3772,16 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
ECal *client = l->data;
GList *objects, *m;
gboolean read_only;
-
+
if (!e_cal_is_read_only (client, &read_only, NULL) || read_only)
continue;
-
+
if (!e_cal_get_object_list (client, sexp, &objects, NULL)) {
g_warning (G_STRLOC ": Could not get the objects");
-
+
continue;
}
-
+
for (m = objects; m; m = m->next) {
gboolean remove = TRUE;
@@ -3805,7 +3805,7 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
if (!icaltime_is_null_time (recur_id) )
rid = icaltime_as_ical_string (recur_id);
-
+
e_cal_remove_object_with_mod (client, uid, rid, CALOBJ_MOD_ALL, &error);
} else {
e_cal_remove_object (client, uid, &error);
@@ -3842,15 +3842,15 @@ GtkWidget *
gnome_calendar_get_e_calendar_widget (GnomeCalendar *gcal)
{
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
+
return GTK_WIDGET(gcal->priv->date_navigator);
}
-
+
GtkWidget *
gnome_calendar_get_search_bar_widget (GnomeCalendar *gcal)
{
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
+
return GTK_WIDGET(gcal->priv->search_bar);
}
@@ -3858,28 +3858,28 @@ GtkWidget *
gnome_calendar_get_view_notebook_widget (GnomeCalendar *gcal)
{
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
+
return GTK_WIDGET(gcal->priv->notebook);
}
ECalMenu *gnome_calendar_get_taskpad_menu (GnomeCalendar *gcal)
{
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
+
return gcal->priv->taskpad_menu;
}
ECalMenu *gnome_calendar_get_calendar_menu (GnomeCalendar *gcal)
{
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
+
return gcal->priv->calendar_menu;
}
ECalMenu *gnome_calendar_get_memopad_menu (GnomeCalendar *gcal)
{
g_return_val_if_fail (GNOME_IS_CALENDAR (gcal), NULL);
-
+
return gcal->priv->memopad_menu;
}
@@ -3897,7 +3897,7 @@ gnome_calendar_edit_appointment (GnomeCalendar *gcal,
if (!src_uid || !comp_uid)
return;
-
+
for (l = gcal->priv->clients_list[E_CAL_SOURCE_TYPE_EVENT]; l != NULL; l = l->next) {
ESource *client_src;
@@ -3908,7 +3908,7 @@ gnome_calendar_edit_appointment (GnomeCalendar *gcal,
break;
}
- if (!client)
+ if (!client)
return;
e_cal_get_object (client, comp_uid, comp_rid, &icalcomp, NULL);
@@ -3918,6 +3918,6 @@ gnome_calendar_edit_appointment (GnomeCalendar *gcal,
attendee_prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
e_calendar_view_edit_appointment (gcal->priv->views[gcal->priv->current_view_type],
- client, icalcomp, attendee_prop ? TRUE:FALSE);
+ client, icalcomp, attendee_prop ? TRUE:FALSE);
icalcomponent_free (icalcomp);
}
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
index 8524545037..f370c5930a 100644
--- a/calendar/gui/gnome-cal.h
+++ b/calendar/gui/gnome-cal.h
@@ -135,7 +135,7 @@ void gnome_calendar_set_view (GnomeCalendar *gcal, GnomeCalendarViewType view_ty
GtkWidget *gnome_calendar_get_current_view_widget (GnomeCalendar *gcal);
ECalendarTable *gnome_calendar_get_task_pad (GnomeCalendar *gcal);
-GtkWidget *gnome_calendar_get_e_calendar_widget (GnomeCalendar *gcal);
+GtkWidget *gnome_calendar_get_e_calendar_widget (GnomeCalendar *gcal);
GtkWidget *gnome_calendar_get_search_bar_widget (GnomeCalendar *gcal);
GtkWidget *gnome_calendar_get_view_notebook_widget (GnomeCalendar *gcal);
GtkWidget *gnome_calendar_get_tag (GnomeCalendar *gcal);
diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c
index c8cd424d8e..91715e3526 100644
--- a/calendar/gui/goto.c
+++ b/calendar/gui/goto.c
@@ -24,10 +24,10 @@
#include "tag-calendar.h"
#include "goto.h"
-typedef struct
+typedef struct
{
GladeXML *xml;
- GtkWidget *dialog;
+ GtkWidget *dialog;
GtkWidget *month;
GtkWidget *year;
@@ -38,7 +38,7 @@ typedef struct
gint year_val;
gint month_val;
gint day_val;
-
+
} GoToDialog;
static GoToDialog *dlg = NULL;
@@ -59,7 +59,7 @@ month_changed (GtkToggleButton *toggle, gpointer data)
{
GoToDialog *dlg = data;
GtkWidget *menu, *active;
-
+
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dlg->month));
active = gtk_menu_get_active (GTK_MENU (menu));
dlg->month_val = g_list_index (GTK_MENU_SHELL (menu)->children, active);
@@ -72,7 +72,7 @@ ecal_date_range_changed (ECalendarItem *calitem, gpointer user_data)
{
GoToDialog *dlg = user_data;
ECal *client;
-
+
client = gnome_calendar_get_default_client (dlg->gcal);
if (client)
tag_calendar_by_client (dlg->ecal, client);
@@ -88,7 +88,7 @@ ecal_event (ECalendarItem *calitem, gpointer user_data)
GDate start_date, end_date;
struct icaltimetype tt = icaltime_null_time ();
time_t et;
-
+
e_calendar_item_get_selection (calitem, &start_date, &end_date);
tt.year = g_date_get_year (&start_date);
@@ -133,10 +133,10 @@ static void
create_ecal (GoToDialog *dlg)
{
ECalendarItem *calitem;
-
+
dlg->ecal = E_CALENDAR (e_calendar_new ());
calitem = dlg->ecal->calitem;
-
+
gnome_canvas_item_set (GNOME_CANVAS_ITEM (calitem),
"move_selection_when_moving", FALSE,
NULL);
@@ -148,7 +148,7 @@ create_ecal (GoToDialog *dlg)
e_calendar_item_set_get_time_callback (calitem,
get_current_time,
dlg, NULL);
-
+
ecal_date_range_changed (calitem, dlg);
}
@@ -179,12 +179,12 @@ get_widgets (GoToDialog *dlg)
}
static void
-goto_dialog_init_widgets (GoToDialog *dlg)
+goto_dialog_init_widgets (GoToDialog *dlg)
{
GtkWidget *menu;
GtkAdjustment *adj;
GList *l;
-
+
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (dlg->month));
for (l = GTK_MENU_SHELL (menu)->children; l != NULL; l = l->next)
g_signal_connect (menu, "selection_done", G_CALLBACK (month_changed), dlg);
@@ -208,9 +208,9 @@ goto_dialog (GnomeCalendar *gcal)
if (dlg) {
return;
}
-
+
dlg = g_new0 (GoToDialog, 1);
-
+
/* Load the content widgets */
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"goto-dialog.glade",
@@ -238,7 +238,7 @@ goto_dialog (GnomeCalendar *gcal)
gtk_option_menu_set_history (GTK_OPTION_MENU (dlg->month), dlg->month_val);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (dlg->year), dlg->year_val);
-
+
create_ecal (dlg);
goto_dialog_init_widgets (dlg);
diff --git a/calendar/gui/itip-bonobo-control.c b/calendar/gui/itip-bonobo-control.c
index 03402776e6..d386f2ad58 100644
--- a/calendar/gui/itip-bonobo-control.c
+++ b/calendar/gui/itip-bonobo-control.c
@@ -78,11 +78,11 @@ stream_read (Bonobo_Stream stream)
memcpy (data + length, buffer->_buffer, buffer->_length);
length += buffer->_length;
data[length] = '\0';
-
+
CORBA_free (buffer);
#undef READ_CHUNK_SIZE
} while (1);
-
+
CORBA_free (buffer);
CORBA_exception_free (&ev);
@@ -101,15 +101,15 @@ typedef struct {
} idle_data;
static gboolean
-set_data_idle_cb (gpointer data)
-{
+set_data_idle_cb (gpointer data)
+{
idle_data *id = data;
-
+
e_itip_control_set_data (id->itip, id->text);
g_object_unref (id->itip);
g_free (id->text);
g_free (id);
-
+
return FALSE;
}
@@ -120,8 +120,8 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream,
{
EItipControl *itip = data;
idle_data *id;
-
- if (type && g_ascii_strcasecmp (type, "text/calendar") != 0 &&
+
+ if (type && g_ascii_strcasecmp (type, "text/calendar") != 0 &&
g_ascii_strcasecmp (type, "text/x-calendar") != 0) {
bonobo_exception_set (ev, ex_Bonobo_Persist_WrongDataType);
return;
@@ -135,7 +135,7 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream,
}
g_object_ref (itip);
id->itip = itip;
-
+
g_idle_add (set_data_idle_cb, id);
}
/*
@@ -150,8 +150,8 @@ pstream_save (BonoboPersistStream *ps, const Bonobo_Stream stream,
gchar *text;
gint len;
- if (type && g_ascii_strcasecmp (type, "text/calendar") != 0 &&
- g_ascii_strcasecmp (type, "text/x-calendar") != 0) {
+ if (type && g_ascii_strcasecmp (type, "text/calendar") != 0 &&
+ g_ascii_strcasecmp (type, "text/x-calendar") != 0) {
bonobo_exception_set (ev, ex_Bonobo_Persist_WrongDataType);
return;
}
@@ -169,9 +169,9 @@ pstream_save (BonoboPersistStream *ps, const Bonobo_Stream stream,
/* { */
/* EItipControl *itip = data; */
/* gint len; */
-
+
/* len = e_itip_control_get_data_size (itip); */
-
+
/* if (len > 0) */
/* return len; */
@@ -186,9 +186,9 @@ pstream_get_content_types (BonoboPersistStream *ps, void *closure,
}
static void
-get_prop (BonoboPropertyBag *bag,
+get_prop (BonoboPropertyBag *bag,
BonoboArg *arg,
- guint arg_id,
+ guint arg_id,
CORBA_Environment *ev,
gpointer user_data)
{
@@ -205,9 +205,9 @@ get_prop (BonoboPropertyBag *bag,
}
static void
-set_prop ( BonoboPropertyBag *bag,
+set_prop ( BonoboPropertyBag *bag,
const BonoboArg *arg,
- guint arg_id,
+ guint arg_id,
CORBA_Environment *ev,
gpointer user_data)
{
@@ -235,7 +235,7 @@ itip_bonobo_control_new (void)
itip = e_itip_control_new ();
gtk_widget_show (itip);
control = bonobo_control_new (itip);
-
+
/* create a property bag */
prop_bag = bonobo_property_bag_new (get_prop, set_prop, itip);
bonobo_property_bag_add (prop_bag, "from_address", FROM_ADDRESS_ARG_ID, BONOBO_ARG_STRING, NULL,
diff --git a/calendar/gui/itip-bonobo-control.h b/calendar/gui/itip-bonobo-control.h
index 42b1d03d8a..84a4fea8ef 100644
--- a/calendar/gui/itip-bonobo-control.h
+++ b/calendar/gui/itip-bonobo-control.h
@@ -3,7 +3,7 @@
* Copyright (C) 2000 Ximian, Inc.
* Copyright (C) 2000 Ximian, Inc.
*
- * Authors:
+ * Authors:
* Jesse Pavel <jpavel@ximian.com>
* JP Rosevear <jpr@ximian.com>
*
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 2cfd5244c3..63b0163ef9 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -93,7 +93,7 @@ itip_organizer_is_user (ECalComponent *comp, ECal *client)
ECalComponentOrganizer organizer;
const char *strip;
gboolean user_org = FALSE;
-
+
if (!e_cal_component_has_organizer (comp) || e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_ORGANIZER))
return FALSE;
@@ -101,20 +101,20 @@ itip_organizer_is_user (ECalComponent *comp, ECal *client)
if (organizer.value != NULL) {
strip = itip_strip_mailto (organizer.value);
-
- if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) {
+
+ if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) {
char *email = NULL;
-
+
if (e_cal_get_cal_address (client, &email, NULL) && !g_ascii_strcasecmp (email, strip)) {
g_free (email);
-
+
return TRUE;
}
-
+
g_free (email);
return FALSE;
}
-
+
user_org = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, strip) != NULL;
}
@@ -127,7 +127,7 @@ itip_sentby_is_user (ECalComponent *comp)
ECalComponentOrganizer organizer;
const char *strip;
gboolean user_sentby = FALSE;
-
+
if (!e_cal_component_has_organizer (comp))
return FALSE;
@@ -141,7 +141,7 @@ itip_sentby_is_user (ECalComponent *comp)
}
static ECalComponentAttendee *
-get_attendee (GSList *attendees, char *address)
+get_attendee (GSList *attendees, char *address)
{
GSList *l;
@@ -152,15 +152,15 @@ get_attendee (GSList *attendees, char *address)
ECalComponentAttendee *attendee = l->data;
if (!g_ascii_strcasecmp (itip_strip_mailto (attendee->value), address)) {
- return attendee;
- }
+ return attendee;
+ }
}
return NULL;
}
static ECalComponentAttendee *
-get_attendee_if_attendee_sentby_is_user (GSList *attendees, char *address)
+get_attendee_if_attendee_sentby_is_user (GSList *attendees, char *address)
{
GSList *l;
@@ -168,8 +168,8 @@ get_attendee_if_attendee_sentby_is_user (GSList *attendees, char *address)
ECalComponentAttendee *attendee = l->data;
if (attendee->sentby && g_str_equal (itip_strip_mailto (attendee->sentby), address)) {
- return attendee;
- }
+ return attendee;
+ }
}
return NULL;
@@ -200,8 +200,8 @@ html_new_lines_for (char *string)
html_string[index++] = *temp;
temp++;
}
- temp++;
-
+ temp++;
+
html_string[index++] = '<';
html_string[index++] = 'b';
html_string[index++] = 'r';
@@ -216,9 +216,9 @@ html_new_lines_for (char *string)
html_string[index++] = *temp;
temp++;
}
-
+
html_string[index] = '\0';
-
+
return html_string;
}
@@ -232,14 +232,14 @@ itip_get_comp_attendee (ECalComponent *comp, ECal *client)
ECalComponentAttendee *attendee = NULL;
char *address = NULL;
- e_cal_component_get_attendee_list (comp, &attendees);
+ e_cal_component_get_attendee_list (comp, &attendees);
al = itip_addresses_get ();
-
+
if (client)
e_cal_get_cal_address (client, &address, NULL);
if (address && *address) {
- attendee = get_attendee (attendees, address);
+ attendee = get_attendee (attendees, address);
if (attendee) {
char *user_email = g_strdup (itip_strip_mailto (attendee->value));
@@ -268,15 +268,15 @@ itip_get_comp_attendee (ECalComponent *comp, ECal *client)
e_iterator_next(it)) {
a = (EAccount *) e_iterator_get(it);
- if (!a->enabled)
+ if (!a->enabled)
continue;
attendee = get_attendee (attendees, a->id->address);
if (attendee) {
char *user_email = g_strdup (itip_strip_mailto (attendee->value));
-
+
e_cal_component_free_attendee_list (attendees);
- return user_email;
+ return user_email;
}
/* If the account was not found in the attendees list, then let's
@@ -284,9 +284,9 @@ itip_get_comp_attendee (ECalComponent *comp, ECal *client)
attendee = get_attendee_if_attendee_sentby_is_user (attendees, a->id->address);
if (attendee) {
char *user_email = g_strdup (itip_strip_mailto (attendee->sentby));
-
+
e_cal_component_free_attendee_list (attendees);
- return user_email;
+ return user_email;
}
}
@@ -295,17 +295,17 @@ itip_get_comp_attendee (ECalComponent *comp, ECal *client)
/* FIXME do we have a better way ? */
a = itip_addresses_get_default ();
address = g_strdup ((a != NULL) ? a->id->address : "");
-
+
e_cal_component_free_attendee_list (attendees);
return address;
}
const gchar *
-itip_strip_mailto (const gchar *address)
+itip_strip_mailto (const gchar *address)
{
if (address == NULL)
return NULL;
-
+
if (!g_ascii_strncasecmp (address, "mailto:", 7))
address += 7;
@@ -329,7 +329,7 @@ get_label (struct icaltimetype *tt)
typedef struct {
GHashTable *tzids;
- icalcomponent *icomp;
+ icalcomponent *icomp;
ECal *client;
icalcomponent *zones;
} ItipUtilTZData;
@@ -338,7 +338,7 @@ typedef struct {
static void
foreach_tzid_callback (icalparameter *param, gpointer data)
{
- ItipUtilTZData *tz_data = data;
+ ItipUtilTZData *tz_data = data;
const char *tzid;
icaltimezone *zone = NULL;
icalcomponent *vtimezone_comp;
@@ -353,7 +353,7 @@ foreach_tzid_callback (icalparameter *param, gpointer data)
zone = icalcomponent_get_timezone (tz_data->zones, tzid);
if (zone == NULL)
zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
- if (zone == NULL && tz_data->client != NULL)
+ if (zone == NULL && tz_data->client != NULL)
e_cal_get_timezone (tz_data->client, tzid, &zone, NULL);
if (zone == NULL)
return;
@@ -364,7 +364,7 @@ foreach_tzid_callback (icalparameter *param, gpointer data)
return;
icalcomponent_add_component (tz_data->icomp, icalcomponent_new_clone (vtimezone_comp));
- g_hash_table_insert (tz_data->tzids, (char *)tzid, (char *)tzid);
+ g_hash_table_insert (tz_data->tzids, (char *)tzid, (char *)tzid);
}
static icalcomponent *
@@ -384,7 +384,7 @@ comp_toplevel_with_zones (ECalComponentItipMethod method, ECalComponent *comp, E
icomp = e_cal_component_get_icalcomponent (comp);
icomp = icalcomponent_new_clone (icomp);
-
+
tz_data.tzids = g_hash_table_new (g_str_hash, g_str_equal);
tz_data.icomp = top_level;
tz_data.client = client;
@@ -418,33 +418,33 @@ comp_from (ECalComponentItipMethod method, ECalComponent *comp)
GSList *attendees;
CORBA_char *str;
char *sender = NULL;
-
+
switch (method) {
case E_CAL_COMPONENT_METHOD_PUBLISH:
return CORBA_string_dup ("");
-
+
case E_CAL_COMPONENT_METHOD_REQUEST:
sender = itip_get_comp_attendee (comp, NULL);
if (sender) {
str = CORBA_string_dup (sender);
g_free (sender);
return str;
- }
-
- case E_CAL_COMPONENT_METHOD_REPLY:
+ }
+
+ case E_CAL_COMPONENT_METHOD_REPLY:
sender = itip_get_comp_attendee (comp, NULL);
if (sender) {
str = CORBA_string_dup (sender);
g_free (sender);
return str;
- }
+ }
if (!e_cal_component_has_attendees (comp))
return CORBA_string_dup ("");
case E_CAL_COMPONENT_METHOD_CANCEL:
- case E_CAL_COMPONENT_METHOD_ADD:
-
+ case E_CAL_COMPONENT_METHOD_ADD:
+
e_cal_component_get_organizer (comp, &organizer);
if (organizer.value == NULL) {
e_notice (NULL, GTK_MESSAGE_ERROR,
@@ -453,7 +453,7 @@ comp_from (ECalComponentItipMethod method, ECalComponent *comp)
}
return CORBA_string_dup (itip_strip_mailto (organizer.value));
-
+
default:
if (!e_cal_component_has_attendees (comp))
return CORBA_string_dup ("");
@@ -488,7 +488,7 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
e_cal_component_free_attendee_list (attendees);
return NULL;
}
-
+
to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
to_list->_maximum = len;
to_list->_length = 0;
@@ -526,7 +526,7 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
else
recipient->name = CORBA_string_dup ("");
recipient->address = CORBA_string_dup (itip_strip_mailto (att->value));
-
+
to_list->_length++;
}
g_free (sender);
@@ -547,7 +547,7 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
e_cal_component_free_attendee_list (attendees);
return to_list;
}
-
+
to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
to_list->_maximum = len;
to_list->_length = 0;
@@ -559,14 +559,14 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
for (l = attendees; l != NULL; l = l->next) {
ECalComponentAttendee *att = l->data;
-
+
recipient = &(to_list->_buffer[to_list->_length]);
if (att->cn)
recipient->name = CORBA_string_dup (att->cn);
else
recipient->name = CORBA_string_dup ("");
recipient->address = CORBA_string_dup (itip_strip_mailto (att->value));
-
+
to_list->_length++;
}
@@ -581,7 +581,7 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (1);
recipient = &(to_list->_buffer[to_list->_length]);
-
+
e_cal_component_get_organizer (comp, &organizer);
if (organizer.value) {
recipient->name = CORBA_string_dup ("");
@@ -591,11 +591,11 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
} else {
recipient->address = CORBA_string_dup ("");
recipient->name = CORBA_string_dup ("");
- }
+ }
}
break;
-
-
+
+
case E_CAL_COMPONENT_METHOD_ADD:
case E_CAL_COMPONENT_METHOD_REFRESH:
case E_CAL_COMPONENT_METHOD_COUNTER:
@@ -606,7 +606,7 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
_("An organizer must be set."));
return NULL;
}
-
+
len = 2;
to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
@@ -621,8 +621,8 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
else
recipient->name = CORBA_string_dup ("");
recipient->address = CORBA_string_dup (itip_strip_mailto (organizer.value));
-
- /* send the status to delegatee to the delegate also*/
+
+ /* send the status to delegatee to the delegate also*/
e_cal_component_get_attendee_list (comp, &attendees);
sender = itip_get_comp_attendee (comp, NULL);
@@ -642,7 +642,7 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
}
e_cal_component_free_attendee_list (attendees);
-
+
break;
case E_CAL_COMPONENT_METHOD_PUBLISH:
if(users) {
@@ -653,7 +653,7 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
to_list->_maximum = len;
to_list->_length = 0;
to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (len);
-
+
for (list = users; list != NULL; list = list->next) {
recipient = &(to_list->_buffer[to_list->_length]);
recipient->name = CORBA_string_dup ("");
@@ -670,9 +670,9 @@ comp_to_list (ECalComponentItipMethod method, ECalComponent *comp, GList *users,
}
CORBA_sequence_set_release (to_list, TRUE);
- return to_list;
+ return to_list;
}
-
+
static CORBA_char *
comp_subject (ECalComponentItipMethod method, ECalComponent *comp)
{
@@ -684,7 +684,7 @@ comp_subject (ECalComponentItipMethod method, ECalComponent *comp)
ECalComponentAttendee *a = NULL;
e_cal_component_get_summary (comp, &caltext);
- if (caltext.value != NULL)
+ if (caltext.value != NULL)
description = caltext.value;
else {
switch (e_cal_component_get_vtype (comp)) {
@@ -717,7 +717,7 @@ comp_subject (ECalComponentItipMethod method, ECalComponent *comp)
for (l = alist; l != NULL ; l = l->next) {
a = l->data;
- if ((sender && *sender) && (g_ascii_strcasecmp (itip_strip_mailto (a->value), sender) || (a->sentby && g_ascii_strcasecmp (itip_strip_mailto (a->sentby), sender))))
+ if ((sender && *sender) && (g_ascii_strcasecmp (itip_strip_mailto (a->value), sender) || (a->sentby && g_ascii_strcasecmp (itip_strip_mailto (a->sentby), sender))))
break;
}
g_free (sender);
@@ -782,8 +782,8 @@ comp_subject (ECalComponentItipMethod method, ECalComponent *comp)
static CORBA_char *
comp_content_type (ECalComponent *comp, ECalComponentItipMethod method)
{
- char tmp[256];
-
+ char tmp[256];
+
sprintf (tmp, "text/calendar; name=\"%s\"; charset=utf-8; METHOD=%s",
e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_FREEBUSY ?
"freebusy.ifb" : "calendar.ics", itip_methods[method]);
@@ -845,20 +845,20 @@ comp_description (ECalComponent *comp)
}
static gboolean
-comp_server_send (ECalComponentItipMethod method, ECalComponent *comp, ECal *client,
+comp_server_send (ECalComponentItipMethod method, ECalComponent *comp, ECal *client,
icalcomponent *zones, GList **users)
{
icalcomponent *top_level, *returned_icalcomp = NULL;
gboolean retval = TRUE;
GError *error = NULL;
-
+
top_level = comp_toplevel_with_zones (method, comp, client, zones);
if (!e_cal_send_objects (client, top_level, users, &returned_icalcomp, &error)) {
/* FIXME Really need a book problem status code */
if (error->code != E_CALENDAR_STATUS_OK) {
/* FIXME Better error message */
e_notice (NULL, GTK_MESSAGE_ERROR, "Unable to book");
-
+
retval = FALSE;
}
}
@@ -873,7 +873,7 @@ comp_server_send (ECalComponentItipMethod method, ECalComponent *comp, ECal *cli
}
static gboolean
-comp_limit_attendees (ECalComponent *comp)
+comp_limit_attendees (ECalComponent *comp)
{
icalcomponent *icomp;
icalproperty *prop;
@@ -897,7 +897,7 @@ comp_limit_attendees (ECalComponent *comp)
list = g_slist_prepend (list, prop);
continue;
}
-
+
attendee = icalproperty_get_value_as_string (prop);
if (!attendee)
continue;
@@ -918,7 +918,7 @@ comp_limit_attendees (ECalComponent *comp)
g_free(attendee_text);
g_free (attendee_sentby_text);
-
+
if (!match)
list = g_slist_prepend (list, prop);
match = FALSE;
@@ -941,7 +941,7 @@ comp_sentby (ECalComponent *comp, ECal *client)
ECalComponentOrganizer organizer;
GSList * attendees, *l;
char *user = NULL;
-
+
e_cal_component_get_organizer (comp, &organizer);
if (!organizer.value) {
EAccount *a = itip_addresses_get_default ();
@@ -950,10 +950,10 @@ comp_sentby (ECalComponent *comp, ECal *client)
organizer.sentby = NULL;
organizer.cn = a->id->name;
organizer.language = NULL;
-
+
e_cal_component_set_organizer (comp, &organizer);
g_free ((char *) organizer.value);
-
+
return;
}
@@ -967,15 +967,15 @@ comp_sentby (ECalComponent *comp, ECal *client)
return;
}
}
-
+
if (!itip_organizer_is_user (comp, client) && !itip_sentby_is_user (comp)) {
EAccount *a = itip_addresses_get_default ();
-
+
organizer.value = g_strdup (organizer.value);
organizer.sentby = g_strdup_printf ("MAILTO:%s", a->id->address);
organizer.cn = g_strdup (organizer.cn);
organizer.language = g_strdup (organizer.language);
-
+
e_cal_component_set_organizer (comp, &organizer);
g_free ((char *)organizer.value);
@@ -995,13 +995,13 @@ comp_minimal (ECalComponent *comp, gboolean attendee)
GSList *comments;
struct icaltimetype itt;
ECalComponentRange recur_id;
-
+
clone = e_cal_component_new ();
e_cal_component_set_new_vtype (clone, e_cal_component_get_vtype (comp));
if (attendee) {
GSList *attendees;
-
+
e_cal_component_get_attendee_list (comp, &attendees);
e_cal_component_set_attendee_list (clone, attendees);
@@ -1011,7 +1011,7 @@ comp_minimal (ECalComponent *comp, gboolean attendee)
goto error;
}
}
-
+
itt = icaltime_from_timet_with_zone (time (NULL), FALSE,
icaltimezone_get_utc_timezone ());
e_cal_component_set_dtstamp (clone, &itt);
@@ -1029,17 +1029,17 @@ comp_minimal (ECalComponent *comp, gboolean attendee)
e_cal_component_set_comment_list (clone, comments);
} else {
GSList *l = comments;
-
+
comments = g_slist_remove_link (comments, l);
e_cal_component_set_comment_list (clone, l);
e_cal_component_free_text_list (l);
}
e_cal_component_free_text_list (comments);
-
+
e_cal_component_get_recurid (comp, &recur_id);
if (recur_id.datetime.value != NULL)
e_cal_component_set_recurid (clone, &recur_id);
-
+
icomp = e_cal_component_get_icalcomponent (comp);
icomp_clone = e_cal_component_get_icalcomponent (clone);
for (prop = icalcomponent_get_first_property (icomp, ICAL_X_PROPERTY);
@@ -1047,13 +1047,13 @@ comp_minimal (ECalComponent *comp, gboolean attendee)
prop = icalcomponent_get_next_property (icomp, ICAL_X_PROPERTY))
{
icalproperty *p;
-
+
p = icalproperty_new_clone (prop);
icalcomponent_add_property (icomp_clone, p);
}
e_cal_component_rescan (clone);
-
+
return clone;
error:
@@ -1066,7 +1066,7 @@ comp_compliant (ECalComponentItipMethod method, ECalComponent *comp, ECal *clien
{
ECalComponent *clone, *temp_clone;
struct icaltimetype itt;
-
+
clone = e_cal_component_clone (comp);
itt = icaltime_from_timet_with_zone (time (NULL), FALSE,
icaltimezone_get_utc_timezone ());
@@ -1077,14 +1077,14 @@ comp_compliant (ECalComponentItipMethod method, ECalComponent *comp, ECal *clien
&& e_cal_component_has_simple_recurrence (clone)) {
GSList *rrule_list;
struct icalrecurrencetype *r;
-
+
e_cal_component_get_rrule_list (clone, &rrule_list);
r = rrule_list->data;
if (!icaltime_is_null_time (r->until) && r->until.is_date) {
ECalComponentDateTime dt;
icaltimezone *from_zone = NULL, *to_zone;
-
+
e_cal_component_get_dtstart (clone, &dt);
if (dt.value->is_date) {
@@ -1100,14 +1100,14 @@ comp_compliant (ECalComponentItipMethod method, ECalComponent *comp, ECal *clien
/* FIXME Error checking */
e_cal_get_timezone (client, dt.tzid, &from_zone, NULL);
}
-
+
to_zone = icaltimezone_get_utc_timezone ();
r->until.hour = dt.value->hour;
r->until.minute = dt.value->minute;
r->until.second = dt.value->second;
r->until.is_date = FALSE;
-
+
icaltimezone_convert_time (&r->until, from_zone, to_zone);
r->until.is_utc = TRUE;
@@ -1117,13 +1117,13 @@ comp_compliant (ECalComponentItipMethod method, ECalComponent *comp, ECal *clien
e_cal_component_free_recur_list (rrule_list);
}
-
+
/* We delete incoming alarms anyhow, and this helps with outlook */
e_cal_component_remove_all_alarms (clone);
/* Strip X-LIC-ERROR stuff */
e_cal_component_strip_errors (clone);
-
+
/* Comply with itip spec */
switch (method) {
case E_CAL_COMPONENT_METHOD_PUBLISH:
@@ -1135,7 +1135,7 @@ comp_compliant (ECalComponentItipMethod method, ECalComponent *comp, ECal *clien
break;
case E_CAL_COMPONENT_METHOD_CANCEL:
comp_sentby (clone, client);
- break;
+ break;
case E_CAL_COMPONENT_METHOD_REPLY:
break;
case E_CAL_COMPONENT_METHOD_ADD:
@@ -1176,14 +1176,14 @@ append_cal_attachments (GNOME_Evolution_Composer composer_server, ECalComponent
for (l = attach_list; l ; l = l->next) {
mime_attach = (struct CalMimeAttach *) l->data;
-
+
filename = CORBA_string_dup (mime_attach->filename ? mime_attach->filename : "");
content_type = CORBA_string_dup (mime_attach->content_type);
description = CORBA_string_dup (mime_attach->description);
-
+
attach_data = GNOME_Evolution_Composer_AttachmentData__alloc ();
attach_data->_length = mime_attach->length;
- attach_data->_maximum = attach_data->_length;
+ attach_data->_maximum = attach_data->_length;
attach_data->_buffer = CORBA_sequence_CORBA_char_allocbuf (attach_data->_length);
memcpy (attach_data->_buffer, mime_attach->encoded_data, attach_data->_length);
@@ -1212,7 +1212,7 @@ append_cal_attachments (GNOME_Evolution_Composer composer_server, ECalComponent
g_free (mime_attach->description);
g_free (mime_attach->encoded_data);
}
-
+
return retval;
}
@@ -1236,7 +1236,7 @@ itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
/* check whether backend could handle sending requests/updates */
if (method != E_CAL_COMPONENT_METHOD_PUBLISH && e_cal_get_save_schedules (client))
return TRUE;
-
+
CORBA_exception_init (&ev);
/* Give the server a chance to manipulate the comp */
@@ -1244,7 +1244,7 @@ itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
if (!comp_server_send (method, send_comp, client, zones, &users))
goto cleanup;
}
-
+
/* Tidy up the comp */
comp = comp_compliant (method, send_comp, client, zones);
@@ -1269,10 +1269,10 @@ itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
cc_list->_maximum = cc_list->_length = 0;
bcc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
bcc_list->_maximum = bcc_list->_length = 0;
-
+
/* Subject information */
subject = comp_subject (method, comp);
-
+
/* From address */
from = comp_from (method, comp);
@@ -1319,7 +1319,7 @@ itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
attach_data = GNOME_Evolution_Composer_AttachmentData__alloc ();
attach_data->_length = strlen (ical_string);
- attach_data->_maximum = attach_data->_length;
+ attach_data->_maximum = attach_data->_length;
attach_data->_buffer = CORBA_sequence_CORBA_char_allocbuf (attach_data->_length);
memcpy (attach_data->_buffer, ical_string, attach_data->_length);
@@ -1328,7 +1328,7 @@ itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
TRUE, attach_data,
&ev);
}
-
+
if (BONOBO_EX (&ev)) {
g_warning ("Unable to place iTip message in composer");
goto cleanup;
@@ -1345,14 +1345,14 @@ itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
g_warning ("Unable to show the composer while sending iTip message");
else
retval = TRUE;
- } else {
+ } else {
GNOME_Evolution_Composer_send (composer_server, &ev);
if (BONOBO_EX (&ev))
g_warning ("Unable to send iTip message");
else
retval = TRUE;
}
-
+
cleanup:
CORBA_exception_free (&ev);
@@ -1365,7 +1365,7 @@ itip_send_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
g_list_foreach (users, (GFunc) g_free, NULL);
g_list_free (users);
}
-
+
if (to_list != NULL)
CORBA_free (to_list);
if (cc_list != NULL)
@@ -1425,10 +1425,10 @@ reply_to_calendar_comp (ECalComponentItipMethod method, ECalComponent *send_comp
cc_list->_maximum = cc_list->_length = 0;
bcc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
bcc_list->_maximum = bcc_list->_length = 0;
-
+
/* Subject information */
subject = comp_subject (method, comp);
-
+
/* From address */
from = comp_from (method, comp);
@@ -1457,7 +1457,7 @@ reply_to_calendar_comp (ECalComponentItipMethod method, ECalComponent *send_comp
ical_string = icalcomponent_as_ical_string (top_level);
if (e_cal_component_get_vtype (comp) == E_CAL_COMPONENT_EVENT){
-
+
GString *body;
char *orig_from = NULL;
char *description = NULL;
@@ -1480,7 +1480,7 @@ reply_to_calendar_comp (ECalComponentItipMethod method, ECalComponent *send_comp
description = (char *)text.value;
else
description = "";
- } else {
+ } else {
description = "";
}
@@ -1496,12 +1496,12 @@ reply_to_calendar_comp (ECalComponentItipMethod method, ECalComponent *send_comp
if (organizer.value)
orig_from = g_strdup (itip_strip_mailto (organizer.value));
-
+
e_cal_component_get_location (comp, &location);
if (!location)
location = "Unspecified";
-
+
e_cal_component_get_dtstart (comp, &dtstart);
if (dtstart.value) {
start_zone = icaltimezone_get_builtin_timezone_from_tzid (dtstart.tzid);
@@ -1516,8 +1516,8 @@ reply_to_calendar_comp (ECalComponentItipMethod method, ECalComponent *send_comp
start = icaltime_as_timet_with_zone (*dtstart.value, start_zone);
time = g_strdup (ctime (&start));
}
-
-
+
+
body = g_string_new ("<br><br><hr><br><b>______ Original Appointment ______ </b><br><br><table>");
if (orig_from && *orig_from)
@@ -1558,13 +1558,13 @@ reply_to_calendar_comp (ECalComponentItipMethod method, ECalComponent *send_comp
}
-
+
GNOME_Evolution_Composer_show (composer_server, &ev);
if (BONOBO_EX (&ev))
g_warning ("Unable to show the composer while sending iTip message");
else
retval = TRUE;
-
+
cleanup:
CORBA_exception_free (&ev);
@@ -1577,7 +1577,7 @@ reply_to_calendar_comp (ECalComponentItipMethod method, ECalComponent *send_comp
g_list_foreach (users, (GFunc) g_free, NULL);
g_list_free (users);
}
-
+
if (to_list != NULL)
CORBA_free (to_list);
if (cc_list != NULL)
@@ -1596,33 +1596,33 @@ reply_to_calendar_comp (ECalComponentItipMethod method, ECalComponent *send_comp
}
gboolean
-itip_publish_begin (ECalComponent *pub_comp, ECal *client,
+itip_publish_begin (ECalComponent *pub_comp, ECal *client,
gboolean cloned, ECalComponent **clone)
{
icalcomponent *icomp =NULL, *icomp_clone = NULL;
icalproperty *prop;
-
+
if (e_cal_component_get_vtype (pub_comp) == E_CAL_COMPONENT_FREEBUSY) {
-
+
if (!cloned) {
*clone = e_cal_component_clone (pub_comp);
cloned = TRUE;
} else {
-
+
icomp = e_cal_component_get_icalcomponent (pub_comp);
icomp_clone = e_cal_component_get_icalcomponent (*clone);
for (prop = icalcomponent_get_first_property (icomp,
ICAL_FREEBUSY_PROPERTY);
prop != NULL;
- prop = icalcomponent_get_next_property (icomp,
+ prop = icalcomponent_get_next_property (icomp,
ICAL_FREEBUSY_PROPERTY))
{
icalproperty *p;
-
+
p = icalproperty_new_clone (prop);
icalcomponent_add_property (icomp_clone, p);
}
- }
+ }
}
return TRUE;
@@ -1632,19 +1632,19 @@ static void
fb_sort (struct icalperiodtype *ipt, int fb_count)
{
int i,j;
-
+
if (ipt == NULL || fb_count == 0)
return;
-
+
for (i = 0; i < fb_count-1; i++) {
for (j = i+1; j < fb_count; j++) {
struct icalperiodtype temp;
-
+
if (icaltime_compare (ipt[i].start, ipt[j].start) < 0)
continue;
-
+
if (icaltime_compare (ipt[i].start, ipt[j].start) == 0){
- if (icaltime_compare (ipt[i].end,
+ if (icaltime_compare (ipt[i].end,
ipt[j].start) < 0)
continue;
}
@@ -1664,48 +1664,48 @@ comp_fb_normalize (icalcomponent *icomp)
struct icaltimetype itt;
int fb_count, i = 0, j;
struct icalperiodtype *ipt;
-
+
iclone = icalcomponent_new (ICAL_VFREEBUSY_COMPONENT);
-
- prop = icalcomponent_get_first_property (icomp,
+
+ prop = icalcomponent_get_first_property (icomp,
ICAL_ORGANIZER_PROPERTY);
if (prop) {
p = icalproperty_new_clone (prop);
icalcomponent_add_property (iclone, p);
}
-
+
itt = icalcomponent_get_dtstart (icomp);
icalcomponent_set_dtstart (iclone, itt);
-
+
itt = icalcomponent_get_dtend (icomp);
icalcomponent_set_dtend (iclone, itt);
-
- fb_count = icalcomponent_count_properties (icomp,
+
+ fb_count = icalcomponent_count_properties (icomp,
ICAL_FREEBUSY_PROPERTY);
ipt = g_new0 (struct icalperiodtype, fb_count+1);
-
- for (prop = icalcomponent_get_first_property (icomp,
+
+ for (prop = icalcomponent_get_first_property (icomp,
ICAL_FREEBUSY_PROPERTY);
prop != NULL;
- prop = icalcomponent_get_next_property (icomp,
+ prop = icalcomponent_get_next_property (icomp,
ICAL_FREEBUSY_PROPERTY))
{
ipt[i] = icalproperty_get_freebusy (prop);
i++;
}
-
+
fb_sort (ipt, fb_count);
-
+
for (j = 0; j <= fb_count-1; j++) {
icalparameter *param;
-
+
prop = icalproperty_new_freebusy (ipt[j]);
param = icalparameter_new_fbtype (ICAL_FBTYPE_BUSY);
icalproperty_add_parameter (prop, param);
icalcomponent_add_property (iclone, prop);
}
g_free (ipt);
-
+
/* Should I strip this RFC 2446 says there must not be a UID
if the METHOD is PUBLISH?? */
uid = icalcomponent_get_uid (icomp);
@@ -1714,14 +1714,14 @@ comp_fb_normalize (icalcomponent *icomp)
itt = icaltime_from_timet_with_zone (time (NULL), FALSE,
icaltimezone_get_utc_timezone ());
- icalcomponent_set_dtstamp (iclone, itt);
-
+ icalcomponent_set_dtstamp (iclone, itt);
+
prop = icalcomponent_get_first_property (icomp, ICAL_URL_PROPERTY);
if (prop) {
p = icalproperty_new_clone (prop);
icalcomponent_add_property (iclone, p);
}
-
+
comment = icalcomponent_get_comment (icomp);
if (comment)
icalcomponent_set_comment (iclone, comment);
@@ -1729,11 +1729,11 @@ comp_fb_normalize (icalcomponent *icomp)
for (prop = icalcomponent_get_first_property (icomp, ICAL_X_PROPERTY);
prop != NULL;
prop = icalcomponent_get_next_property (icomp, ICAL_X_PROPERTY))
- {
+ {
p = icalproperty_new_clone (prop);
icalcomponent_add_property (iclone, p);
}
-
+
return iclone;
/* this will never be reached */
g_object_unref (iclone);
@@ -1741,7 +1741,7 @@ comp_fb_normalize (icalcomponent *icomp)
}
gboolean
-itip_publish_comp (ECal *client, gchar *uri, gchar *username,
+itip_publish_comp (ECal *client, gchar *uri, gchar *username,
gchar *password, ECalComponent **pub_comp)
{
icalcomponent *toplevel = NULL, *icalcomp = NULL;
@@ -1750,15 +1750,15 @@ itip_publish_comp (ECal *client, gchar *uri, gchar *username,
SoupMessage *msg;
SoupUri *real_uri;
char *ical_string;
-
+
toplevel = e_cal_util_new_top_level ();
icalcomponent_set_method (toplevel, ICAL_METHOD_PUBLISH);
-
+
e_cal_component_set_url (*pub_comp, uri);
-
+
icalcomp = e_cal_component_get_icalcomponent (*pub_comp);
-
- icomp = comp_fb_normalize (icalcomp);
+
+ icomp = comp_fb_normalize (icalcomp);
icalcomponent_add_component (toplevel, icomp);
ical_string = icalcomponent_as_ical_string (toplevel);
@@ -1772,10 +1772,10 @@ itip_publish_comp (ECal *client, gchar *uri, gchar *username,
g_object_unref (session);
return FALSE;
}
-
+
real_uri->user = g_strdup (username);
real_uri->passwd = g_strdup (password);
-
+
/* build the SOAP message */
msg = soup_message_new_from_uri (SOUP_METHOD_PUT, real_uri);
if (!msg) {
@@ -1783,23 +1783,23 @@ itip_publish_comp (ECal *client, gchar *uri, gchar *username,
g_object_unref (session);
return FALSE;
}
- soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT);
+ soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT);
soup_message_set_request (msg, "text/calendar", SOUP_BUFFER_USER_OWNED,
ical_string, strlen (ical_string));
-
+
/* send message to server */
soup_session_send_message (session, msg);
if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) {
- g_warning(G_STRLOC ": Could not publish Free/Busy: %d: %s",
- msg->status_code,
+ g_warning(G_STRLOC ": Could not publish Free/Busy: %d: %s",
+ msg->status_code,
soup_status_get_phrase (msg->status_code));
g_object_unref (session);
return FALSE;
}
-
+
soup_uri_free (real_uri);
g_object_unref (session);
-
+
return TRUE;
}
diff --git a/calendar/gui/itip-utils.h b/calendar/gui/itip-utils.h
index eded65974d..e7014c9f47 100644
--- a/calendar/gui/itip-utils.h
+++ b/calendar/gui/itip-utils.h
@@ -42,10 +42,10 @@ char *itip_get_comp_attendee (ECalComponent *comp, ECal *client);
gboolean itip_send_comp (ECalComponentItipMethod method, ECalComponent *comp,
ECal *client, icalcomponent *zones, GSList *attachments_list, GList *users);
-gboolean itip_publish_comp (ECal *client, gchar* uri, gchar* username,
+gboolean itip_publish_comp (ECal *client, gchar* uri, gchar* username,
gchar* password, ECalComponent **pub_comp);
-gboolean itip_publish_begin (ECalComponent *pub_comp, ECal *client,
+gboolean itip_publish_begin (ECalComponent *pub_comp, ECal *client,
gboolean cloned, ECalComponent **clone);
gboolean reply_to_calendar_comp (ECalComponentItipMethod method, ECalComponent *send_comp,
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index cbd90ea431..3f15b77c8e 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -130,14 +130,14 @@ initialize (void)
EImportClass *klass;
comp_editor_registry = E_COMP_EDITOR_REGISTRY (e_comp_editor_registry_new ());
-
+
#if 0
itip_control_factory_init ();
component_editor_factory_init ();
#endif
launch_alarm_daemon ();
-
+
/* Initialize plugin system */
e_plugin_hook_register_type (e_cal_popup_hook_get_type());
diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c
index 40b71cf5f5..8766649959 100644
--- a/calendar/gui/memos-component.c
+++ b/calendar/gui/memos-component.c
@@ -84,16 +84,16 @@ extern ECompEditorRegistry *comp_editor_registry;
typedef struct _MemosComponentView
{
ESourceList *source_list;
-
+
GSList *source_selection;
-
+
EMemos *memos;
ETable *table;
ETableModel *model;
EInfoLabel *info_label;
GtkWidget *source_selector;
-
+
BonoboControl *view_control;
BonoboControl *sidebar_control;
BonoboControl *statusbar_control;
@@ -113,9 +113,9 @@ struct _MemosComponentPrivate {
GSList *source_selection;
GList *views;
-
+
ECal *create_ecal;
-
+
GList *notifications;
};
@@ -157,7 +157,7 @@ ensure_sources (MemosComponent *component)
group = E_SOURCE_GROUP (g->data);
- /* compare only file:// part. If user home dir name changes we do not want to create
+ /* compare only file:// part. If user home dir name changes we do not want to create
one more group */
if (!on_this_computer && !strncmp (base_uri_proto, e_source_group_peek_base_uri (group), 7))
@@ -249,10 +249,10 @@ static gboolean
is_in_selection (GSList *selection, ESource *source)
{
GSList *l;
-
+
for (l = selection; l; l = l->next) {
ESource *selected_source = l->data;
-
+
if (!strcmp (e_source_peek_uid (selected_source), e_source_peek_uid (source)))
return TRUE;
}
@@ -264,10 +264,10 @@ static gboolean
is_in_uids (GSList *uids, ESource *source)
{
GSList *l;
-
+
for (l = uids; l; l = l->next) {
const char *uid = l->data;
-
+
if (!strcmp (uid, e_source_peek_uid (source)))
return TRUE;
}
@@ -279,19 +279,19 @@ static void
update_uris_for_selection (MemosComponentView *component_view)
{
GSList *selection, *l, *uids_selected = NULL;
-
+
selection = e_source_selector_get_selection (E_SOURCE_SELECTOR (component_view->source_selector));
-
+
for (l = component_view->source_selection; l; l = l->next) {
ESource *old_selected_source = l->data;
if (!is_in_selection (selection, old_selected_source))
e_memos_remove_memo_source (component_view->memos, old_selected_source);
- }
-
+ }
+
for (l = selection; l; l = l->next) {
ESource *selected_source = l->data;
-
+
e_memos_add_memo_source (component_view->memos, selected_source);
uids_selected = g_slist_append (uids_selected, (char *)e_source_peek_uid (selected_source));
}
@@ -322,7 +322,7 @@ update_uri_for_primary_selection (MemosComponentView *component_view)
etable = e_memo_table_get_table (cal_table);
memos_control_sensitize_commands (component_view->view_control, component_view->memos, e_table_selected_count (etable));
-
+
/* Save the selection for next time we start up */
calendar_config_set_primary_memos (e_source_peek_uid (source));
}
@@ -331,7 +331,7 @@ static void
update_selection (MemosComponentView *component_view)
{
GSList *selection, *uids_selected, *l;
-
+
d(g_message("memos-component.c: update_selection called");)
/* Get the selection in gconf */
@@ -343,10 +343,10 @@ update_selection (MemosComponentView *component_view)
for (l = selection; l; l = l->next) {
ESource *source = l->data;
- if (!is_in_uids (uids_selected, source))
+ if (!is_in_uids (uids_selected, source))
e_source_selector_unselect_source (E_SOURCE_SELECTOR (component_view->source_selector), source);
}
-
+
e_source_selector_free_selection (selection);
/* Make sure the whole selection is there */
@@ -355,9 +355,9 @@ update_selection (MemosComponentView *component_view)
ESource *source;
source = e_source_list_peek_source_by_uid (component_view->source_list, uid);
- if (source)
+ if (source)
e_source_selector_select_source (E_SOURCE_SELECTOR (component_view->source_selector), source);
-
+
g_free (uid);
}
g_slist_free (uids_selected);
@@ -374,7 +374,7 @@ update_primary_selection (MemosComponentView *component_view)
source = e_source_list_peek_source_by_uid (component_view->source_list, uid);
g_free (uid);
}
-
+
if (source) {
e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector), source);
} else {
@@ -394,7 +394,7 @@ copy_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data)
{
MemosComponentView *component_view = data;
ESource *selected_source;
-
+
selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector));
if (!selected_source)
return;
@@ -434,7 +434,7 @@ delete_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data)
e_source_selector_unselect_source (E_SOURCE_SELECTOR (component_view->source_selector),
selected_source);
}
-
+
e_source_group_remove_source (e_source_peek_group (selected_source), selected_source);
e_source_list_sync (component_view->source_list, NULL);
}
@@ -533,7 +533,7 @@ set_info (MemosComponentView *component_view)
{
GString *message = g_string_new (NULL);
int rows, selected_rows;
-
+
rows = e_table_model_row_count (component_view->model);
selected_rows = e_table_selected_count (component_view->table);
@@ -596,11 +596,11 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
}
static gboolean
-selector_tree_drag_drop (GtkWidget *widget,
- GdkDragContext *context,
- int x,
- int y,
- guint time,
+selector_tree_drag_drop (GtkWidget *widget,
+ GdkDragContext *context,
+ int x,
+ int y,
+ guint time,
CalendarComponent *component)
{
GtkTreeViewColumn *column;
@@ -610,12 +610,12 @@ selector_tree_drag_drop (GtkWidget *widget,
GtkTreeModel *model;
GtkTreeIter iter;
gpointer data;
-
- if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, &path,
+
+ if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, &path,
&column, &cell_x, &cell_y))
return FALSE;
-
-
+
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
if (!gtk_tree_model_get_iter (model, &iter, path)) {
@@ -624,17 +624,17 @@ selector_tree_drag_drop (GtkWidget *widget,
}
gtk_tree_model_get (model, &iter, 0, &data, -1);
-
+
if (E_IS_SOURCE_GROUP (data)) {
g_object_unref (data);
gtk_tree_path_free (path);
return FALSE;
}
-
+
gtk_tree_path_free (path);
return TRUE;
}
-
+
static gboolean
selector_tree_drag_motion (GtkWidget *widget,
GdkDragContext *context,
@@ -649,21 +649,21 @@ selector_tree_drag_motion (GtkWidget *widget,
GtkTreeModel *model;
GtkTreeIter iter;
GdkDragAction action = GDK_ACTION_DEFAULT;
-
+
if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
x, y, &path, &pos))
goto finish;
-
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
-
+
if (!gtk_tree_model_get_iter (model, &iter, path))
goto finish;
-
+
gtk_tree_model_get (model, &iter, 0, &data, -1);
if (E_IS_SOURCE_GROUP (data) || e_source_get_readonly (data))
goto finish;
-
+
gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget), path, GTK_TREE_VIEW_DROP_INTO_OR_BEFORE);
action = context->suggested_action;
if (action == GDK_ACTION_COPY && (context->actions & GDK_ACTION_MOVE))
@@ -688,7 +688,7 @@ update_single_object (ECal *client, icalcomponent *icalcomp, gboolean fail_on_mo
d(g_message("memos-component.c: update_single_object called");)
uid = (char *) icalcomponent_get_uid (icalcomp);
-
+
if (e_cal_get_object (client, uid, NULL, &tmp_icalcomp, NULL)) {
if (fail_on_modify)
return FALSE;
@@ -696,7 +696,7 @@ update_single_object (ECal *client, icalcomponent *icalcomp, gboolean fail_on_mo
return e_cal_modify_object (client, icalcomp, CALOBJ_MOD_ALL, NULL);
}
- return e_cal_create_object (client, icalcomp, &uid, NULL);
+ return e_cal_create_object (client, icalcomp, &uid, NULL);
}
static gboolean
@@ -704,7 +704,7 @@ update_objects (ECal *client, icalcomponent *icalcomp)
{
icalcomponent *subcomp;
icalcomponent_kind kind;
-
+
d(g_message("memos-component.c: update_objects called");)
kind = icalcomponent_isa (icalcomp);
@@ -716,7 +716,7 @@ update_objects (ECal *client, icalcomponent *icalcomp)
subcomp = icalcomponent_get_first_component (icalcomp, ICAL_ANY_COMPONENT);
while (subcomp) {
gboolean success;
-
+
kind = icalcomponent_isa (subcomp);
if (kind == ICAL_VTIMEZONE_COMPONENT) {
icaltimezone *zone;
@@ -741,10 +741,10 @@ update_objects (ECal *client, icalcomponent *icalcomp)
}
static void
-selector_tree_drag_data_received (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
+selector_tree_drag_data_received (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
GtkSelectionData *data,
guint info,
guint time,
@@ -764,13 +764,13 @@ selector_tree_drag_data_received (GtkWidget *widget,
if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
x, y, &path, &pos))
goto finish;
-
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
-
+
if (!gtk_tree_model_get_iter (model, &iter, path))
goto finish;
-
-
+
+
gtk_tree_model_get (model, &iter, 0, &source, -1);
if (E_IS_SOURCE_GROUP (source) || e_source_get_readonly (source) || !data->data)
@@ -865,12 +865,12 @@ selector_tree_drag_data_received (GtkWidget *widget,
gtk_tree_path_free (path);
gtk_drag_finish (context, success, success && context->action == GDK_ACTION_MOVE, time);
-}
+}
static void
selector_tree_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time, gpointer data)
{
- gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget),
+ gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget),
NULL, GTK_TREE_VIEW_DROP_BEFORE);
}
@@ -883,33 +883,33 @@ control_activate_cb (BonoboControl *control, gboolean activate, gpointer data)
if (activate) {
BonoboUIComponent *uic;
uic = bonobo_control_get_ui_component (component_view->view_control);
-
+
e_user_creatable_items_handler_activate (component_view->creatable_items_handler, uic);
- }
+ }
}
static void
config_create_ecal_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
+{
MemosComponent *component = data;
MemosComponentPrivate *priv;
-
+
priv = component->priv;
g_object_unref (priv->create_ecal);
priv->create_ecal = NULL;
-
+
priv->notifications = g_list_remove (priv->notifications, GUINT_TO_POINTER (id));
}
static ECal *
-setup_create_ecal (MemosComponent *component, MemosComponentView *component_view)
+setup_create_ecal (MemosComponent *component, MemosComponentView *component_view)
{
MemosComponentPrivate *priv;
ESource *source = NULL;
char *uid;
guint not;
-
+
priv = component->priv;
if (component_view) {
@@ -919,10 +919,10 @@ setup_create_ecal (MemosComponent *component, MemosComponentView *component_view
if (default_ecal)
return default_ecal;
}
-
+
if (priv->create_ecal)
- return priv->create_ecal;
-
+ return priv->create_ecal;
+
/* Get the current primary calendar, or try to set one if it doesn't already exist */
uid = calendar_config_get_primary_memos ();
if (uid) {
@@ -938,15 +938,15 @@ setup_create_ecal (MemosComponent *component, MemosComponentView *component_view
if (source)
priv->create_ecal = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_JOURNAL);
}
-
+
if (priv->create_ecal) {
if (!e_cal_open (priv->create_ecal, FALSE, NULL)) {
GtkWidget *dialog;
-
+
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
- _("Unable to open the memo list '%s' for creating events and meetings"),
+ _("Unable to open the memo list '%s' for creating events and meetings"),
e_source_peek_name (source));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -956,7 +956,7 @@ setup_create_ecal (MemosComponent *component, MemosComponentView *component_view
} else {
GtkWidget *dialog;
-
+
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
_("There is no calendar available for creating memos"));
@@ -964,10 +964,10 @@ setup_create_ecal (MemosComponent *component, MemosComponentView *component_view
gtk_widget_destroy (dialog);
return NULL;
- }
+ }
/* Handle the fact it may change on us */
- not = calendar_config_add_notification_primary_memos (config_create_ecal_changed_cb,
+ not = calendar_config_add_notification_primary_memos (config_create_ecal_changed_cb,
component);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
@@ -995,7 +995,7 @@ create_new_memo (MemosComponent *memo_component, gboolean is_assigned, MemosComp
ECalComponent *comp;
MemoEditor *editor;
CompEditorFlags flags = 0;
-
+
ecal = setup_create_ecal (memo_component, component_view);
if (!ecal)
return FALSE;
@@ -1026,18 +1026,18 @@ create_local_item_cb (EUserCreatableItemsHandler *handler, const char *item_type
MemosComponentPrivate *priv;
MemosComponentView *component_view = NULL;
GList *l;
-
+
priv = memos_component->priv;
-
+
for (l = priv->views; l; l = l->next) {
component_view = l->data;
if (component_view->creatable_items_handler == handler)
break;
-
+
component_view = NULL;
}
-
+
if (strcmp (item_type_name, CREATE_MEMO_ID) == 0) {
create_new_memo (memos_component, FALSE, component_view);
} else if (strcmp (item_type_name, CREATE_SHARED_MEMO_ID) == 0) {
@@ -1055,28 +1055,28 @@ create_component_view (MemosComponent *memos_component)
GtkWidget *selector_scrolled_window, *vbox;
GtkWidget *statusbar_widget;
AtkObject *a11y;
-
+
priv = memos_component->priv;
/* Create the calendar component view */
component_view = g_new0 (MemosComponentView, 1);
-
+
/* Add the source lists */
component_view->source_list = g_object_ref (priv->source_list);
-
+
/* Create sidebar selector */
component_view->source_selector = e_source_selector_new (memos_component->priv->source_list);
e_source_selector_set_select_new ((ESourceSelector *)component_view->source_selector, TRUE);
a11y = gtk_widget_get_accessible (GTK_WIDGET (component_view->source_selector));
atk_object_set_name (a11y, _("Memo Source Selector"));
- g_signal_connect (component_view->source_selector, "drag-motion", G_CALLBACK (selector_tree_drag_motion),
+ g_signal_connect (component_view->source_selector, "drag-motion", G_CALLBACK (selector_tree_drag_motion),
memos_component);
- g_signal_connect (component_view->source_selector, "drag-leave", G_CALLBACK (selector_tree_drag_leave),
+ g_signal_connect (component_view->source_selector, "drag-leave", G_CALLBACK (selector_tree_drag_leave),
memos_component);
- g_signal_connect (component_view->source_selector, "drag-drop", G_CALLBACK (selector_tree_drag_drop),
+ g_signal_connect (component_view->source_selector, "drag-drop", G_CALLBACK (selector_tree_drag_drop),
memos_component);
- g_signal_connect (component_view->source_selector, "drag-data-received",
+ g_signal_connect (component_view->source_selector, "drag-data-received",
G_CALLBACK (selector_tree_drag_data_received), memos_component);
gtk_drag_dest_set(component_view->source_selector, GTK_DEST_DEFAULT_ALL, drag_types,
@@ -1116,9 +1116,9 @@ create_component_view (MemosComponent *memos_component)
component_view->model = E_TABLE_MODEL (e_memo_table_get_model (e_memos_get_calendar_table (component_view->memos)));
/* This signal is thrown if backends die - we update the selector */
- g_signal_connect (component_view->memos, "source_added",
+ g_signal_connect (component_view->memos, "source_added",
G_CALLBACK (source_added_cb), component_view);
- g_signal_connect (component_view->memos, "source_removed",
+ g_signal_connect (component_view->memos, "source_removed",
G_CALLBACK (source_removed_cb), component_view);
/* Create status bar */
@@ -1128,9 +1128,9 @@ create_component_view (MemosComponent *memos_component)
gtk_widget_show (statusbar_widget);
component_view->statusbar_control = bonobo_control_new (statusbar_widget);
-
+
e_memo_table_set_activity_handler (e_memos_get_calendar_table (component_view->memos), component_view->activity_handler);
-
+
/* connect after setting the initial selections, or we'll get unwanted calls
to calendar_control_sensitize_calendar_commands */
g_signal_connect (component_view->source_selector, "selection_changed",
@@ -1148,7 +1148,7 @@ create_component_view (MemosComponent *memos_component)
set_info (component_view);
g_signal_connect (component_view->table, "selection_change",
G_CALLBACK (table_selection_change_cb), component_view);
- g_signal_connect (component_view->model, "model_changed",
+ g_signal_connect (component_view->model, "model_changed",
G_CALLBACK (model_changed_cb), component_view);
g_signal_connect (component_view->model, "model_rows_inserted",
G_CALLBACK (model_rows_inserted_cb), component_view);
@@ -1156,7 +1156,7 @@ create_component_view (MemosComponent *memos_component)
G_CALLBACK (model_rows_deleted_cb), component_view);
/* Load the selection from the last run */
- update_selection (component_view);
+ update_selection (component_view);
update_primary_selection (component_view);
return component_view;
@@ -1164,15 +1164,15 @@ create_component_view (MemosComponent *memos_component)
static void
destroy_component_view (MemosComponentView *component_view)
-{
+{
GList *l;
-
+
if (component_view->source_list)
g_object_unref (component_view->source_list);
if (component_view->source_selection)
e_source_selector_free_selection (component_view->source_selection);
-
+
for (l = component_view->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
g_list_free (component_view->notifications);
@@ -1192,12 +1192,12 @@ view_destroyed_cb (gpointer data, GObject *where_the_object_was)
MemosComponent *memos_component = data;
MemosComponentPrivate *priv;
GList *l;
-
+
priv = memos_component->priv;
for (l = priv->views; l; l = l->next) {
MemosComponentView *component_view = l->data;
-
+
if (G_OBJECT (component_view->view_control) == where_the_object_was) {
priv->views = g_list_remove (priv->views, component_view);
destroy_component_view (component_view);
@@ -1216,7 +1216,7 @@ impl_createView (PortableServer_Servant servant,
MemosComponentPrivate *priv;
MemosComponentView *component_view;
EComponentView *ecv;
-
+
priv = component->priv;
/* Create the calendar component view */
@@ -1230,7 +1230,7 @@ impl_createView (PortableServer_Servant servant,
g_object_weak_ref (G_OBJECT (component_view->view_control), view_destroyed_cb, component);
priv->views = g_list_append (priv->views, component_view);
-
+
/* TODO: Make CalendarComponentView just subclass EComponentView */
ecv = e_component_view_new_controls (parent, "memos", component_view->sidebar_control,
component_view->view_control, component_view->statusbar_control);
@@ -1283,7 +1283,7 @@ impl_requestCreateItem (PortableServer_Servant servant,
CORBA_Environment *ev)
{
MemosComponent *memos_component = MEMOS_COMPONENT (bonobo_object_from_servant (servant));
-
+
if (strcmp (item_type_name, CREATE_MEMO_ID) == 0) {
if (!create_new_memo (memos_component, FALSE, NULL))
bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
@@ -1308,7 +1308,7 @@ impl_dispose (GObject *object)
MemosComponent *memos_component = MEMOS_COMPONENT (object);
MemosComponentPrivate *priv = memos_component->priv;
GList *l;
-
+
if (priv->source_list != NULL) {
g_object_unref (priv->source_list);
priv->source_list = NULL;
@@ -1325,7 +1325,7 @@ impl_dispose (GObject *object)
for (l = priv->views; l; l = l->next) {
MemosComponentView *component_view = l->data;
-
+
g_object_weak_unref (G_OBJECT (component_view->view_control), view_destroyed_cb, memos_component);
}
g_list_free (priv->views);
@@ -1344,10 +1344,10 @@ impl_finalize (GObject *object)
{
MemosComponentPrivate *priv = MEMOS_COMPONENT (object)->priv;
GList *l;
-
+
for (l = priv->views; l; l = l->next) {
MemosComponentView *component_view = l->data;
-
+
destroy_component_view (component_view);
}
g_list_free (priv->views);
@@ -1382,7 +1382,7 @@ memos_component_init (MemosComponent *component, MemosComponentClass *klass)
MemosComponentPrivate *priv;
priv = g_new0 (MemosComponentPrivate, 1);
-
+
priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
priv->config_directory = g_build_filename (g_get_home_dir (),
".evolution", "memos", "config",
@@ -1428,7 +1428,7 @@ memos_component_peek_config_directory (MemosComponent *component)
ESourceList *
memos_component_peek_source_list (MemosComponent *component)
{
- return component->priv->source_list;
+ return component->priv->source_list;
}
BONOBO_TYPE_FUNC_FULL (MemosComponent, GNOME_Evolution_Component, PARENT_TYPE, memos_component)
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c
index f6b977bbe9..3ed7d9fb5c 100644
--- a/calendar/gui/migration.c
+++ b/calendar/gui/migration.c
@@ -150,16 +150,16 @@ static void
setup_progress_dialog (gboolean tasks)
{
GtkWidget *vbox, *hbox, *w;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title ((GtkWindow *) window, _("Migrating..."));
gtk_window_set_modal ((GtkWindow *) window, TRUE);
gtk_container_set_border_width ((GtkContainer *) window, 6);
-
+
vbox = gtk_vbox_new (FALSE, 6);
gtk_widget_show (vbox);
gtk_container_add ((GtkContainer *) window, vbox);
-
+
if (tasks)
w = gtk_label_new (_("The location and hierarchy of the Evolution task "
"folders has changed since Evolution 1.x.\n\nPlease be "
@@ -172,19 +172,19 @@ setup_progress_dialog (gboolean tasks)
gtk_label_set_line_wrap ((GtkLabel *) w, TRUE);
gtk_widget_show (w);
gtk_box_pack_start_defaults ((GtkBox *) vbox, w);
-
+
hbox = gtk_hbox_new (FALSE, 6);
gtk_widget_show (hbox);
gtk_box_pack_start_defaults ((GtkBox *) vbox, hbox);
-
+
label = (GtkLabel *) gtk_label_new ("");
gtk_widget_show ((GtkWidget *) label);
gtk_box_pack_start_defaults ((GtkBox *) hbox, (GtkWidget *) label);
-
+
progress = (GtkProgressBar *) gtk_progress_bar_new ();
gtk_widget_show ((GtkWidget *) progress);
gtk_box_pack_start_defaults ((GtkBox *) hbox, (GtkWidget *) progress);
-
+
gtk_widget_show (window);
}
@@ -198,13 +198,13 @@ static void
dialog_set_folder_name (const char *folder_name)
{
char *text;
-
+
text = g_strdup_printf (_("Migrating `%s':"), folder_name);
gtk_label_set_text (label, text);
g_free (text);
-
+
gtk_progress_bar_set_fraction (progress, 0.0);
-
+
while (gtk_events_pending ())
gtk_main_iteration ();
}
@@ -213,12 +213,12 @@ static void
dialog_set_progress (double percent)
{
char text[5];
-
+
snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f));
-
+
gtk_progress_bar_set_fraction (progress, percent);
gtk_progress_bar_set_text (progress, text);
-
+
while (gtk_events_pending ())
gtk_main_iteration ();
}
@@ -290,7 +290,7 @@ migrate_ical (ECal *old_ecal, ECal *new_ecal)
int num_added = 0;
int num_objects;
gboolean retval = TRUE;
-
+
/* both ecals are loaded, start the actual migration */
if (!e_cal_get_object_list (old_ecal, "#t", &objects, NULL))
return FALSE;
@@ -304,7 +304,7 @@ migrate_ical (ECal *old_ecal, ECal *new_ecal)
g_warning ("Migration of object failed: %s", error->message);
retval = FALSE;
}
-
+
g_clear_error (&error);
num_added ++;
@@ -326,7 +326,7 @@ migrate_ical_folder_to_source (char *old_path, ESource *new_source, ECalSourceTy
char *old_uri = g_strdup_printf ("file://%s", old_path);
GError *error = NULL;
gboolean retval = FALSE;
-
+
group = e_source_group_new ("", old_uri);
old_source = e_source_new ("", "");
e_source_group_add_source (group, old_source, -1);
@@ -364,7 +364,7 @@ finish:
g_object_unref (new_ecal);
g_free (old_uri);
- return retval;
+ return retval;
}
static gboolean
@@ -372,7 +372,7 @@ migrate_ical_folder (char *old_path, ESourceGroup *dest_group, char *source_name
{
ESource *new_source;
gboolean retval;
-
+
new_source = e_source_new (source_name, source_name);
e_source_set_relative_uri (new_source, e_source_peek_uid (new_source));
e_source_group_add_source (dest_group, new_source, -1);
@@ -397,7 +397,7 @@ create_calendar_contact_source (ESourceList *source_list)
{
ESourceGroup *group;
ESource *source;
-
+
/* Create the contacts group */
group = e_source_group_new (_("Contacts"), CONTACTS_BASE_URI);
e_source_list_add_group (source_list, group, -1);
@@ -490,7 +490,7 @@ create_calendar_sources (CalendarComponent *component,
/* Create the default Person calendar */
ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (*on_this_computer, source, -1);
-
+
if (!primary_calendar && !calendar_config_get_calendars_selected ()) {
GSList selected;
@@ -501,7 +501,7 @@ create_calendar_sources (CalendarComponent *component,
calendar_config_set_calendars_selected (&selected);
}
- g_free (primary_calendar);
+ g_free (primary_calendar);
e_source_set_color_spec (source, "#BECEDD");
*personal_source = source;
}
@@ -519,7 +519,7 @@ create_calendar_sources (CalendarComponent *component,
*contacts = group;
}
-
+
g_free (base_uri_proto);
g_free (base_uri);
}
@@ -538,7 +538,7 @@ create_task_sources (TasksComponent *component,
*on_this_computer = NULL;
*on_the_web = NULL;
*personal_source = NULL;
-
+
base_uri = g_build_filename (tasks_component_peek_base_directory (component),
"tasks", "local", NULL);
@@ -622,7 +622,7 @@ static void
migrate_pilot_db_key (const char *key, gpointer user_data)
{
EXmlHash *xmlhash = user_data;
-
+
e_xmlhash_add (xmlhash, key, "");
}
@@ -634,16 +634,16 @@ migrate_pilot_data (const char *component, const char *conduit, const char *old_
const char *ext;
char *filename;
GDir *dir;
-
+
if (!(dir = g_dir_open (old_path, 0, NULL)))
return;
-
+
map = g_alloca (12 + strlen (conduit));
sprintf (map, "pilot-map-%s-", conduit);
-
+
changelog = g_alloca (24 + strlen (conduit));
sprintf (changelog, "pilot-sync-evolution-%s-", conduit);
-
+
while ((dent = g_dir_read_name (dir))) {
if (!strncmp (dent, map, strlen (map)) &&
((ext = strrchr (dent, '.')) && !strcmp (ext, ".xml"))) {
@@ -652,13 +652,13 @@ migrate_pilot_data (const char *component, const char *conduit, const char *old_
size_t nread, nwritten;
int fd0, fd1;
ssize_t n;
-
+
filename = g_build_filename (old_path, dent, NULL);
if ((fd0 = g_open (filename, O_RDONLY|O_BINARY, 0)) == -1) {
g_free (filename);
continue;
}
-
+
g_free (filename);
filename = g_build_filename (new_path, dent, NULL);
if ((fd1 = g_open (filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666)) == -1) {
@@ -666,38 +666,38 @@ migrate_pilot_data (const char *component, const char *conduit, const char *old_
close (fd0);
continue;
}
-
+
do {
do {
n = read (fd0, inbuf, sizeof (inbuf));
} while (n == -1 && errno == EINTR);
-
+
if (n < 1)
break;
-
+
nread = n;
nwritten = 0;
do {
do {
n = write (fd1, inbuf + nwritten, nread - nwritten);
} while (n == -1 && errno == EINTR);
-
+
if (n > 0)
nwritten += n;
} while (nwritten < nread && n != -1);
-
+
if (n == -1)
break;
} while (1);
-
+
if (n != -1)
n = fsync (fd1);
-
+
if (n == -1) {
g_warning ("Failed to migrate %s: %s", dent, strerror (errno));
g_unlink (filename);
}
-
+
close (fd0);
close (fd1);
g_free (filename);
@@ -707,31 +707,31 @@ migrate_pilot_data (const char *component, const char *conduit, const char *old_
EXmlHash *xmlhash;
EDbHash *dbhash;
struct stat st;
-
+
filename = g_build_filename (old_path, dent, NULL);
if (g_stat (filename, &st) == -1) {
g_free (filename);
continue;
}
-
+
dbhash = e_dbhash_new (filename);
g_free (filename);
-
+
filename = g_strdup_printf ("%s/%s.ics-%s", new_path, component, dent);
if (g_stat (filename, &st) != -1)
g_unlink (filename);
xmlhash = e_xmlhash_new (filename);
g_free (filename);
-
+
e_dbhash_foreach_key (dbhash, migrate_pilot_db_key, xmlhash);
-
+
e_dbhash_destroy (dbhash);
-
+
e_xmlhash_write (xmlhash);
e_xmlhash_destroy (xmlhash);
}
}
-
+
g_dir_close (dir);
}
@@ -758,21 +758,21 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis
struct stat st;
conf_file = g_build_filename (g_get_home_dir (), "evolution", "config.xmldb", NULL);
- if (lstat (conf_file, &st) == 0 && S_ISREG (st.st_mode))
+ if (lstat (conf_file, &st) == 0 && S_ISREG (st.st_mode))
config_doc = xmlParseFile (conf_file);
g_free (conf_file);
-
+
if (config_doc && minor <= 2) {
- GConfClient *gconf;
+ GConfClient *gconf;
int res = 0;
-
+
/* move bonobo config to gconf */
gconf = gconf_client_get_default ();
-
+
res = e_bconf_import (gconf, config_doc, calendar_remap_list);
-
+
g_object_unref (gconf);
-
+
xmlFreeDoc(config_doc);
if (res != 0) {
@@ -798,7 +798,7 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis
for (l = migration_dirs; l; l = l->next) {
char *source_name;
-
+
if (personal_source && !strcmp ((char*)l->data, local_cal_folder))
continue;
@@ -810,17 +810,17 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis
g_free(source_name);
goto fail;
}
-
+
g_free (source_name);
}
-
+
g_free (local_cal_folder);
dialog_close ();
}
if (minor <= 4 || (minor == 5 && revision < 5)) {
- GConfClient *gconf;
+ GConfClient *gconf;
GConfValue *gconf_val;
int i;
const char *keys[] = {
@@ -830,9 +830,9 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis
CALENDAR_CONFIG_MONTH_VPANE_POS,
NULL
};
-
+
gconf = gconf_client_get_default ();
-
+
for (i = 0; keys[i]; i++) {
gconf_val = gconf_client_get (gconf, keys[i], NULL);
if (gconf_val) {
@@ -841,13 +841,13 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis
gconf_value_free (gconf_val);
}
}
-
+
g_object_unref (gconf);
}
-
+
if (minor < 5 || (minor == 5 && revision <= 10)) {
char *old_path, *new_path;
-
+
old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Calendar", NULL);
new_path = g_build_filename (calendar_component_peek_base_directory (component),
"calendar", "local", "system", NULL);
@@ -883,7 +883,7 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis
/** @Event: component.migration
* @Title: Migration step in component initialization
* @Target: ECalEventTargetComponent
- *
+ *
* component.migration is emitted during the calendar component
* initialization process. This allows new calendar backend types
* to be distributed as an e-d-s backend and a plugin without
@@ -920,7 +920,7 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE
creates the groups/sources or it finds the necessary
groups/sources. */
create_task_sources (component, tasks_component_peek_source_list (component), &on_this_computer, &on_the_web, &personal_source);
-
+
#ifndef G_OS_WIN32
if (major == 1) {
xmlDocPtr config_doc = NULL;
@@ -930,18 +930,18 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE
if (g_file_test (conf_file, G_FILE_TEST_IS_REGULAR))
config_doc = e_xml_parse_file (conf_file);
g_free (conf_file);
-
+
if (config_doc && minor <= 2) {
- GConfClient *gconf;
+ GConfClient *gconf;
int res = 0;
-
+
/* move bonobo config to gconf */
gconf = gconf_client_get_default ();
-
+
res = e_bconf_import (gconf, config_doc, task_remap_list);
-
+
g_object_unref (gconf);
-
+
xmlFreeDoc(config_doc);
if (res != 0) {
@@ -953,9 +953,9 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE
if (minor <= 4) {
GSList *migration_dirs, *l;
char *path, *local_task_folder;
-
+
setup_progress_dialog (TRUE);
-
+
path = g_build_filename (g_get_home_dir (), "evolution", "local", NULL);
migration_dirs = e_folder_map_local_folders (path, "tasks");
local_task_folder = g_build_filename (path, "Tasks", NULL);
@@ -966,7 +966,7 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE
for (l = migration_dirs; l; l = l->next) {
char *source_name;
-
+
if (personal_source && !strcmp ((char*)l->data, local_task_folder))
continue;
@@ -978,18 +978,18 @@ migrate_tasks (TasksComponent *component, int major, int minor, int revision, GE
g_free(source_name);
goto fail;
}
-
+
g_free (source_name);
}
-
+
g_free (local_task_folder);
dialog_close ();
}
-
+
if (minor < 5 || (minor == 5 && revision <= 10)) {
char *old_path, *new_path;
-
+
old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Tasks", NULL);
new_path = g_build_filename (tasks_component_peek_base_directory (component),
"tasks", "local", "system", NULL);
@@ -1027,14 +1027,14 @@ fail:
g_object_unref (on_the_web);
if (personal_source)
g_object_unref (personal_source);
-
+
return retval;
}
/********************************************************************************************************
*
* MEMOS
- *
+ *
********************************************************************************************************/
static void
@@ -1051,7 +1051,7 @@ create_memo_sources (MemosComponent *component,
*on_this_computer = NULL;
*on_the_web = NULL;
*personal_source = NULL;
-
+
base_uri = g_build_filename (memos_component_peek_base_directory (component),
"memos", "local", NULL);
@@ -1150,8 +1150,8 @@ add_gw_esource (ESourceList *source_list, const char *group_name, const char *s
const char * use_ssl;
const char *poa_address;
const char *offline_sync;
-
-
+
+
poa_address = url->host;
if (!poa_address || strlen (poa_address) ==0)
return;
@@ -1167,7 +1167,7 @@ add_gw_esource (ESourceList *source_list, const char *group_name, const char *s
if (!e_source_list_add_group (source_list, group, -1))
return;
relative_uri = g_strdup_printf ("%s@%s/", url->user, poa_address);
-
+
source = e_source_new (source_name, relative_uri);
e_source_set_property (source, "auth", "1");
e_source_set_property (source, "username", url->user);
@@ -1185,7 +1185,7 @@ add_gw_esource (ESourceList *source_list, const char *group_name, const char *s
temp = ids;
for (; temp != NULL; temp = g_slist_next (temp))
g_free (temp->data);
-
+
g_slist_free (ids);
g_object_unref (source);
g_object_unref (group);
@@ -1212,7 +1212,7 @@ migrate_memos (MemosComponent *component, int major, int minor, int revision, st
if (major == 2 && minor < 8) {
EAccountList *al;
EAccount *a;
- CamelURL *url;
+ CamelURL *url;
EIterator *it;
GConfClient *gconf_client = gconf_client_get_default ();
al = e_account_list_new (gconf_client);
@@ -1220,7 +1220,7 @@ migrate_memos (MemosComponent *component, int major, int minor, int revision, st
e_iterator_is_valid(it);
e_iterator_next(it)) {
a = (EAccount *) e_iterator_get(it);
- if (!a->enabled || !is_groupwise_account (a))
+ if (!a->enabled || !is_groupwise_account (a))
continue;
url = camel_url_new (a->source->url, NULL);
add_gw_esource (source_list, a->name, _("Notes"), url, gconf_client);
@@ -1239,6 +1239,6 @@ migrate_memos (MemosComponent *component, int major, int minor, int revision, st
g_object_unref (on_the_web);
if (personal_source)
g_object_unref (personal_source);
-
+
return retval;
}
diff --git a/calendar/gui/misc.c b/calendar/gui/misc.c
index c67e37c2ea..f5ce590ea7 100644
--- a/calendar/gui/misc.c
+++ b/calendar/gui/misc.c
@@ -35,10 +35,10 @@
/**
* string_is_empty:
* @value: A string.
- *
+ *
* Returns whether a string is NULL, the empty string, or completely made up of
* whitespace characters.
- *
+ *
* Return value: TRUE if the string is empty, FALSE otherwise.
**/
gboolean
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 80b7e42355..e56205c036 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -67,13 +67,13 @@ struct PrintCompItem {
};
struct PrintCalItem {
- GnomeCalendar *gcal;
+ GnomeCalendar *gcal;
time_t start;
};
static double
evo_calendar_print_renderer_get_width (GtkPrintContext *context,
- PangoFontDescription *font,
+ PangoFontDescription *font,
const char *text)
{
PangoLayout *layout;
@@ -315,16 +315,16 @@ print_border_with_triangles (GtkPrintContext *pc,
/* Fill in the interior of the rectangle, if desired. */
if (red >= -EPSILON && green >= -EPSILON && blue >= -EPSILON) {
-
+
cairo_move_to (cr, x1, y1);
-
+
if (left_triangle_width > 0.0)
cairo_line_to (cr, x1 - left_triangle_width,
(y1 + y2) / 2);
cairo_line_to (cr, x1, y2);
cairo_line_to (cr, x2, y2);
-
+
if (right_triangle_width > 0.0)
cairo_line_to (cr, x2 + right_triangle_width, (y1 + y2) / 2);
@@ -357,7 +357,7 @@ print_border_with_triangles (GtkPrintContext *pc,
cairo_close_path (cr);
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_set_line_width (cr, line_width);
- cairo_stroke (cr);
+ cairo_stroke (cr);
}
cairo_restore (cr);
@@ -435,7 +435,7 @@ print_text (GtkPrintContext *context, PangoFontDescription *desc,
cairo_save (cr);
/* Set a clipping rectangle. */
- cairo_move_to (cr, x1, y1);
+ cairo_move_to (cr, x1, y1);
cairo_rectangle (cr, x1, y1, x2, y2);
cairo_clip (cr);
@@ -560,14 +560,14 @@ format_date(time_t time, int flags, char *buffer, int bufflen)
return buffer;
}
-static gboolean
+static gboolean
instance_cb (ECalComponent *comp, time_t instance_start, time_t instance_end, gpointer data)
{
-
+
gboolean *found = ((ECalModelGenerateInstancesData *) data)->cb_data;
-
+
*found = TRUE;
-
+
return FALSE;
}
@@ -680,19 +680,19 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month,
sprintf (buf, "%d", day);
/* this is a slow messy way to do this ... but easy ... */
- e_cal_model_generate_instances (gnome_calendar_get_calendar_model (gcal), now,
+ e_cal_model_generate_instances (gnome_calendar_get_calendar_model (gcal), now,
time_day_end_with_zone (now, zone),
instance_cb, &found);
-
+
font = found ? font_bold : font_normal;
next = time_add_day_with_zone (now, 1, zone);
- if ((now >= greystart && now < greyend)
+ if ((now >= greystart && now < greyend)
|| (greystart >= now && greystart < next)) {
print_border (context,
cell_left, cell_right,
cell_top, cell_bottom,
- -1.0, 0.75);
+ -1.0, 0.75);
}
print_text (context, font, buf, PANGO_ALIGN_RIGHT,
cell_left, text_right,
@@ -731,8 +731,8 @@ bound_text (GtkPrintContext *context,
/* Set a clipping rectangle. */
cairo_move_to (cr, x1, y1);
cairo_rectangle (cr, x1, y1, x2, y2);
- cairo_clip (cr);
- cairo_new_path (cr);
+ cairo_clip (cr);
+ cairo_new_path (cr);
cairo_move_to (cr, x1, y1);
pango_cairo_show_layout (cr, layout);
@@ -762,7 +762,7 @@ print_day_background (GtkPrintContext *context, GnomeCalendar *gcal,
int i, hour, row;
double hour_minute_x;
cairo_t *cr;
-
+
/* Fill the time column in light-gray. */
print_border (context, left, left + width, top, bottom, -1.0, 0.9);
@@ -770,7 +770,7 @@ print_day_background (GtkPrintContext *context, GnomeCalendar *gcal,
cr = gtk_print_context_get_cairo_context (context);
cairo_set_source_rgb (cr, 0, 0, 0);
- print_border (context, left, right, top, bottom, 1.0, -1.0);
+ print_border (context, left, right, top, bottom, 1.0, -1.0);
/* Draw the vertical line on the right of the time column. */
cr = gtk_print_context_get_cairo_context (context);
@@ -778,7 +778,7 @@ print_day_background (GtkPrintContext *context, GnomeCalendar *gcal,
cairo_move_to (cr, left + width, bottom);
cairo_line_to (cr, left + width, top);
cairo_stroke (cr);
-
+
/* Calculate the row height. */
if (top > bottom)
yinc = (top - bottom) / (pdi->end_hour - pdi->start_hour);
@@ -801,7 +801,7 @@ print_day_background (GtkPrintContext *context, GnomeCalendar *gcal,
row = 0;
hour_minute_x = left + width * 0.58;
for (i = pdi->start_hour; i < pdi->end_hour; i++) {
- y = top + yinc * (row + 1) ;
+ y = top + yinc * (row + 1) ;
cr = gtk_print_context_get_cairo_context (context);
cairo_set_source_rgb (cr, 0, 0, 0);
@@ -827,7 +827,7 @@ print_day_background (GtkPrintContext *context, GnomeCalendar *gcal,
print_text (context, font_minute, minute, PANGO_ALIGN_LEFT,
hour_minute_x, left + width - 3,
y - yinc + yinc / 2, y - yinc + yinc / 2 + minute_font_size);
-
+
/* Draw the horizontal line between hours, across the entire
width of the day view. */
cr = gtk_print_context_get_cairo_context (context);
@@ -835,7 +835,7 @@ print_day_background (GtkPrintContext *context, GnomeCalendar *gcal,
cairo_line_to (cr, right, y);
cairo_set_line_width (cr, 1);
cairo_stroke (cr);
-
+
/* Draw the horizontal line for the 1/2-hours, across the
entire width except for part of the time column. */
cairo_move_to (cr, left + width * 0.6, y - yinc / 2);
@@ -1073,7 +1073,7 @@ print_day_event (GtkPrintContext *context, PangoFontDescription *font,
row_height = (bottom - top) / pdi->rows;
y1 = top + start_row * row_height;
y2 = top + (end_row + 1) * row_height;
-#if 0
+#if 0
g_print ("Event: %g,%g %g,%g\n row_height: %g start_row: %i top: %g rows: %i\n",
x1, y1, x2, y2, row_height, start_row, top, pdi->rows);
#endif
@@ -1174,7 +1174,7 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
if (pdi.events[0]->len > 0) {
struct icaltimetype tt;
- event = &g_array_index (pdi.events[0], EDayViewEvent, 0);
+ event = &g_array_index (pdi.events[0], EDayViewEvent, 0);
tt = icaltime_from_timet_with_zone (event->start, FALSE, zone);
if (tt.hour < pdi.start_hour)
pdi.start_hour = tt.hour;
@@ -1191,7 +1191,7 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
pdi.rows = (pdi.end_hour - pdi.start_hour) * 2;
}
-
+
/* Lay them out the long events, across the top of the page. */
e_day_view_layout_long_events (pdi.long_events, pdi.days_shown,
pdi.day_starts, &rows_in_top_display);
@@ -1203,7 +1203,7 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
print_day_long_event (context, font, left, right, top, bottom,
DAY_VIEW_ROW_HEIGHT, event, &pdi, model);
}
-
+
/* We always leave space for DAY_VIEW_MIN_ROWS_IN_TOP_DISPLAY in the
top display, but we may have more rows than that, in which case
the main display area will be compressed. */
@@ -1216,18 +1216,18 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
cairo_set_source_rgb (cr, 0, 0, 0);
print_border (context, left, right,
top, top + rows_in_top_display * DAY_VIEW_ROW_HEIGHT - 4,
- 1.0, -1.0);
-
+ 1.0, -1.0);
+
/* Adjust the area containing the main display. */
top += rows_in_top_display * DAY_VIEW_ROW_HEIGHT - 2;
-
+
/* Draw the borders, lines, and times down the left. */
print_day_background (context, gcal, whence, &pdi,
left, right, top, bottom);
/* Now adjust to get rid of the time column. */
left += DAY_VIEW_TIME_COLUMN_WIDTH;
-
-
+
+
/* lay out the short events, within the day. */
e_day_view_layout_day_events (pdi.events[0], DAY_VIEW_ROWS,
DAY_VIEW_MINS_PER_ROW, pdi.cols_per_row);
@@ -1245,7 +1245,7 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
print_day_event (context, font, left, right, top, bottom,
event, &pdi, model);
}
-
+
/* Free everything. */
free_event_array (pdi.long_events);
pango_font_description_free (font);
@@ -1362,7 +1362,7 @@ print_week_day_event (GtkPrintContext *context, PangoFontDescription *font,
buffer, sizeof (buffer));
print_rectangle (context, x1, y1, (x2 + 6) - x1, (y2 + 4) - y1, red, green, blue);
x1 += print_text_size (context, buffer, PANGO_ALIGN_LEFT, x1, x2, y1, y2 + 3 ) + 4;
- print_text_size (context, text, PANGO_ALIGN_LEFT, x1, x2, y1, y2 + 3);
+ print_text_size (context, text, PANGO_ALIGN_LEFT, x1, x2, y1, y2 + 3);
if (psi->weeks_shown <= 2) {
date_tm.tm_hour = event->end_minute / 60;
@@ -1371,11 +1371,11 @@ print_week_day_event (GtkPrintContext *context, PangoFontDescription *font,
e_time_format_time (&date_tm, psi->use_24_hour_format, FALSE,
buffer, sizeof (buffer));
- print_rectangle (context, x1, y1, (x2 + 6) - x1, (y2 + 4) - y1, red, green, blue);
+ print_rectangle (context, x1, y1, (x2 + 6) - x1, (y2 + 4) - y1, red, green, blue);
x1 += print_text_size (context, buffer, PANGO_ALIGN_LEFT, x1, x2, y1, y2 + 3) + 4;
}
- print_text_size (context, text, PANGO_ALIGN_LEFT, x1, x2, y1, y2 + 3);
+ print_text_size (context, text, PANGO_ALIGN_LEFT, x1, x2, y1, y2 + 3);
}
@@ -1450,12 +1450,12 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font,
psi->day_starts)) {
print_week_day_event (context, font, psi,
x1, x2, y1, y2,
- event, span, text, red, green, blue);
+ event, span, text, red, green, blue);
} else {
print_week_long_event (context, font, psi,
x1, x2, y1, y2,
event, span, text, red, green, blue);
- }
+ }
} else {
cairo_t *cr = gtk_print_context_get_cairo_context (context);
@@ -1568,9 +1568,9 @@ print_week_view_background (GtkPrintContext *context,
}
e_utf8_strftime (buffer, sizeof (buffer), format_string, &tm);
-
+
print_text_size (context, buffer, PANGO_ALIGN_RIGHT,
- x1, x2 - 4, y1 + 2, y1 + 2 + font_size);
+ x1, x2 - 4, y1 + 2, y1 + 2 + font_size);
}
}
@@ -1686,7 +1686,7 @@ print_week_summary (GtkPrintContext *context, GnomeCalendar *gcal,
cell_width = (right - left) / 2;
cell_height = (bottom - top) / 6;
}
-
+
/* Calculate the row height, using the normal font and with room for
space or a rectangle around it. */
@@ -1963,31 +1963,31 @@ print_day_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
print_day_details (context, gcal, date,
0.0, todo - 2.0, HEADER_HEIGHT,
height);
-
+
/* Print the TaskPad down the right. */
print_todo_details (context, gcal, 0, INT_MAX,
todo, width, HEADER_HEIGHT,
height);
-
+
/* Print the filled border around the header. */
print_border (context, 0.0, width,
0.0, HEADER_HEIGHT + 2.0, 1.0, 0.9);
-
+
/* Print the 2 mini calendar-months. */
l = width - SMALL_MONTH_PAD - SMALL_MONTH_WIDTH * 2 - SMALL_MONTH_SPACING;
print_month_small (context, gcal, date,
l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 4,
DATE_MONTH | DATE_YEAR, date, date, FALSE);
-
+
l += SMALL_MONTH_SPACING + SMALL_MONTH_WIDTH;
print_month_small (context, gcal,
time_add_month_with_zone (date, 1, zone),
l, 4, l + SMALL_MONTH_WIDTH, HEADER_HEIGHT + 4,
DATE_MONTH | DATE_YEAR, 0, 0, FALSE);
-
-
+
+
/* Print the date, e.g. '8th May, 2001'. */
format_date (date, DATE_DAY | DATE_MONTH | DATE_YEAR,
buf, 100);
@@ -2042,8 +2042,8 @@ print_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
WEEK_NORMAL_FONT_SIZE,
0.0, width,
HEADER_HEIGHT + 20, height);
-
-
+
+
/* Print the border around the main view. */
print_border (context, 0.0, width, HEADER_HEIGHT ,
height, 1.0, -1.0);
@@ -2135,7 +2135,7 @@ print_year_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
width = gtk_page_setup_get_page_width (setup, GTK_UNIT_POINTS);
height = gtk_page_setup_get_page_height (setup, GTK_UNIT_POINTS);
- cr = gtk_print_context_get_cairo_context (context);
+ cr = gtk_print_context_get_cairo_context (context);
cairo_show_page (cr);
print_year_summary (context, gcal, date, 0.0,
@@ -2182,7 +2182,7 @@ get_zone_from_tzid (ECal *client, const char *tzid)
the builtin timezone with the TZID first. */
zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
if (!zone) {
- if (!e_cal_get_timezone (client, tzid, &zone, NULL))
+ if (!e_cal_get_timezone (client, tzid, &zone, NULL))
/* FIXME: Handle error better. */
g_warning ("Couldn't get timezone from server: %s",
tzid ? tzid : "");
@@ -2283,7 +2283,7 @@ print_calendar_draw_page (GtkPrintOperation *operation,
break;
default:
g_return_if_reached ();
- }
+ }
}
void
@@ -2338,9 +2338,9 @@ print_comp_draw_page (GtkPrintOperation *operation,
width = gtk_page_setup_get_page_width (setup, GTK_UNIT_POINTS);
height = gtk_page_setup_get_page_height (setup, GTK_UNIT_POINTS);
- /* PrintCompItem structure contains elements to be used
+ /* PrintCompItem structure contains elements to be used
* with the Print Context , obtained in comp_draw_page
- */
+ */
client = pci->client;
comp = pci->comp;
@@ -2357,7 +2357,7 @@ print_comp_draw_page (GtkPrintOperation *operation,
return;
cr = gtk_print_context_get_cairo_context (context);
-
+
/* Print the title in a box at the top of the page. */
font = get_font_for_size (18, PANGO_WEIGHT_BOLD);
header_size = 40;
@@ -2368,14 +2368,14 @@ print_comp_draw_page (GtkPrintOperation *operation,
pango_font_description_free (font);
top = header_size + 30;
-
+
/* Summary */
font = get_font_for_size (18, PANGO_WEIGHT_BOLD);
e_cal_component_get_summary (comp, &text);
summary_string = g_strdup_printf (_("Summary: %s"), text.value);
top = bound_text (context, font, summary_string, 0.0, top, width,
height);
-
+
g_free (summary_string);
/* Location */
@@ -2388,12 +2388,12 @@ print_comp_draw_page (GtkPrintOperation *operation,
g_free (location_string);
}
pango_font_description_free (font);
-
+
/* Date information */
print_date_label (context, comp, client, 0.0, width, top + 3, top + 15);
top += 20;
font = get_font_for_size (12, PANGO_WEIGHT_NORMAL);
-
+
/* For a VTODO we print the Status, Priority, % Complete and URL. */
if (vtype == E_CAL_COMPONENT_TODO) {
icalproperty_status status;
@@ -2401,7 +2401,7 @@ print_comp_draw_page (GtkPrintOperation *operation,
int *percent;
int *priority;
const char *url;
-
+
/* Status */
e_cal_component_get_status (comp, &status);
if (status != ICAL_STATUS_NONE) {
@@ -2473,7 +2473,7 @@ print_comp_draw_page (GtkPrintOperation *operation,
g_free (url_string);
}
}
-
+
/* Categories */
e_cal_component_get_categories (comp, &categories);
if (categories && categories[0]) {
@@ -2484,7 +2484,7 @@ print_comp_draw_page (GtkPrintOperation *operation,
top += get_font_size (font) - 6 ;
g_free (categories_string);
}
-
+
/* Contacts */
e_cal_component_get_contact_list (comp, &contact_list);
if (contact_list) {
@@ -2513,7 +2513,7 @@ print_comp_draw_page (GtkPrintOperation *operation,
top = 10; //FIXME
cairo_show_page (cr);
}
- if (text->value != NULL)
+ if (text->value != NULL)
top = bound_text (context, font, text->value, 0.0, top + 3, width, height) + 30;
}
diff --git a/calendar/gui/tag-calendar.c b/calendar/gui/tag-calendar.c
index b21e7a7ed1..29b4a491ae 100644
--- a/calendar/gui/tag-calendar.c
+++ b/calendar/gui/tag-calendar.c
@@ -76,7 +76,7 @@ prepare_tag (ECalendar *ecal, struct calendar_tag_closure *c, icaltimezone *zone
} else {
c->zone = calendar_config_get_icaltimezone ();
}
-
+
c->start_time = icaltime_as_timet_with_zone (start_tt, c->zone);
c->end_time = icaltime_as_timet_with_zone (end_tt, c->zone);
@@ -118,7 +118,7 @@ tag_calendar_cb (ECalComponent *comp,
* tag_calendar_by_client:
* @ecal: Calendar widget to tag.
* @client: A calendar client object.
- *
+ *
* Tags an #ECalendar widget with the events that occur in its current time
* range. The occurrences are extracted from the specified calendar @client.
**/
@@ -162,7 +162,7 @@ resolve_tzid_cb (const char *tzid, gpointer data)
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail (E_IS_CAL (data), NULL);
-
+
client = E_CAL (data);
/* Try to find the builtin timezone first. */
@@ -181,7 +181,7 @@ resolve_tzid_cb (const char *tzid, gpointer data)
* @ecal: Calendar widget to tag.
* @comp: A calendar component object.
* @clear_first: Whether the #ECalendar should be cleared of any marks first.
- *
+ *
* Tags an #ECalendar widget with any occurrences of a specific calendar
* component that occur within the calendar's current time range.
* Note that TRANSPARENT events are also tagged here.
@@ -191,7 +191,7 @@ resolve_tzid_cb (const char *tzid, gpointer data)
* have been added to the calendar on the server yet.
**/
void
-tag_calendar_by_comp (ECalendar *ecal, ECalComponent *comp, ECal *client, icaltimezone *display_zone,
+tag_calendar_by_comp (ECalendar *ecal, ECalComponent *comp, ECal *client, icaltimezone *display_zone,
gboolean clear_first, gboolean comp_is_on_server)
{
struct calendar_tag_closure c;
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 2f8c563aa7..da1c0e61eb 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -80,19 +80,19 @@ static BonoboObjectClass *parent_class = NULL;
extern ECompEditorRegistry *comp_editor_registry;
-typedef struct
+typedef struct
{
ESourceList *source_list;
-
+
GSList *source_selection;
-
+
ETasks *tasks;
ETable *table;
ETableModel *model;
EInfoLabel *info_label;
GtkWidget *source_selector;
-
+
BonoboControl *view_control;
BonoboControl *sidebar_control;
BonoboControl *statusbar_control;
@@ -112,9 +112,9 @@ struct _TasksComponentPrivate {
GSList *source_selection;
GList *views;
-
+
ECal *create_ecal;
-
+
GList *notifications;
};
@@ -153,7 +153,7 @@ ensure_sources (TasksComponent *component)
group = E_SOURCE_GROUP (g->data);
- /* compare only file:// part. If user home dir name changes we do not want to create
+ /* compare only file:// part. If user home dir name changes we do not want to create
one more group */
if (!on_this_computer && !strncmp (base_uri_proto, e_source_group_peek_base_uri (group), 7))
@@ -245,10 +245,10 @@ static gboolean
is_in_selection (GSList *selection, ESource *source)
{
GSList *l;
-
+
for (l = selection; l; l = l->next) {
ESource *selected_source = l->data;
-
+
if (!strcmp (e_source_peek_uid (selected_source), e_source_peek_uid (source)))
return TRUE;
}
@@ -260,10 +260,10 @@ static gboolean
is_in_uids (GSList *uids, ESource *source)
{
GSList *l;
-
+
for (l = uids; l; l = l->next) {
const char *uid = l->data;
-
+
if (!strcmp (uid, e_source_peek_uid (source)))
return TRUE;
}
@@ -275,19 +275,19 @@ static void
update_uris_for_selection (TasksComponentView *component_view)
{
GSList *selection, *l, *uids_selected = NULL;
-
+
selection = e_source_selector_get_selection (E_SOURCE_SELECTOR (component_view->source_selector));
-
+
for (l = component_view->source_selection; l; l = l->next) {
ESource *old_selected_source = l->data;
if (!is_in_selection (selection, old_selected_source))
e_tasks_remove_todo_source (component_view->tasks, old_selected_source);
- }
-
+ }
+
for (l = selection; l; l = l->next) {
ESource *selected_source = l->data;
-
+
e_tasks_add_todo_source (component_view->tasks, selected_source);
uids_selected = g_slist_append (uids_selected, (char *)e_source_peek_uid (selected_source));
}
@@ -318,7 +318,7 @@ update_uri_for_primary_selection (TasksComponentView *component_view)
etable = e_calendar_table_get_table (cal_table);
tasks_control_sensitize_commands (component_view->view_control, component_view->tasks, e_table_selected_count (etable));
-
+
/* Save the selection for next time we start up */
calendar_config_set_primary_tasks (e_source_peek_uid (source));
}
@@ -337,10 +337,10 @@ update_selection (TasksComponentView *component_view)
for (l = selection; l; l = l->next) {
ESource *source = l->data;
- if (!is_in_uids (uids_selected, source))
+ if (!is_in_uids (uids_selected, source))
e_source_selector_unselect_source (E_SOURCE_SELECTOR (component_view->source_selector), source);
}
-
+
e_source_selector_free_selection (selection);
/* Make sure the whole selection is there */
@@ -349,9 +349,9 @@ update_selection (TasksComponentView *component_view)
ESource *source;
source = e_source_list_peek_source_by_uid (component_view->source_list, uid);
- if (source)
+ if (source)
e_source_selector_select_source (E_SOURCE_SELECTOR (component_view->source_selector), source);
-
+
g_free (uid);
}
g_slist_free (uids_selected);
@@ -368,7 +368,7 @@ update_primary_selection (TasksComponentView *component_view)
source = e_source_list_peek_source_by_uid (component_view->source_list, uid);
g_free (uid);
}
-
+
if (source) {
e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector), source);
} else {
@@ -385,7 +385,7 @@ copy_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data)
{
TasksComponentView *component_view = data;
ESource *selected_source;
-
+
selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector));
if (!selected_source)
return;
@@ -425,7 +425,7 @@ delete_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data)
e_source_selector_unselect_source (E_SOURCE_SELECTOR (component_view->source_selector),
selected_source);
}
-
+
e_source_group_remove_source (e_source_peek_group (selected_source), selected_source);
e_source_list_sync (component_view->source_list, NULL);
}
@@ -524,7 +524,7 @@ set_info (TasksComponentView *component_view)
{
GString *message = g_string_new (NULL);
int rows, selected_rows;
-
+
rows = e_table_model_row_count (component_view->model);
selected_rows = e_table_selected_count (component_view->table);
@@ -587,11 +587,11 @@ impl_upgradeFromVersion (PortableServer_Servant servant,
}
static gboolean
-selector_tree_drag_drop (GtkWidget *widget,
- GdkDragContext *context,
- int x,
- int y,
- guint time,
+selector_tree_drag_drop (GtkWidget *widget,
+ GdkDragContext *context,
+ int x,
+ int y,
+ guint time,
CalendarComponent *component)
{
GtkTreeViewColumn *column;
@@ -601,12 +601,12 @@ selector_tree_drag_drop (GtkWidget *widget,
GtkTreeModel *model;
GtkTreeIter iter;
gpointer data;
-
- if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, &path,
+
+ if (!gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, &path,
&column, &cell_x, &cell_y))
return FALSE;
-
-
+
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
if (!gtk_tree_model_get_iter (model, &iter, path)) {
@@ -615,17 +615,17 @@ selector_tree_drag_drop (GtkWidget *widget,
}
gtk_tree_model_get (model, &iter, 0, &data, -1);
-
+
if (E_IS_SOURCE_GROUP (data)) {
g_object_unref (data);
gtk_tree_path_free (path);
return FALSE;
}
-
+
gtk_tree_path_free (path);
return TRUE;
}
-
+
static gboolean
selector_tree_drag_motion (GtkWidget *widget,
GdkDragContext *context,
@@ -640,21 +640,21 @@ selector_tree_drag_motion (GtkWidget *widget,
GtkTreeModel *model;
GtkTreeIter iter;
GdkDragAction action = GDK_ACTION_DEFAULT;
-
+
if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
x, y, &path, &pos))
goto finish;
-
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
-
+
if (!gtk_tree_model_get_iter (model, &iter, path))
goto finish;
-
+
gtk_tree_model_get (model, &iter, 0, &data, -1);
if (E_IS_SOURCE_GROUP (data) || e_source_get_readonly (data))
goto finish;
-
+
gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget), path, GTK_TREE_VIEW_DROP_INTO_OR_BEFORE);
action = context->suggested_action;
if (action == GDK_ACTION_COPY && (context->actions & GDK_ACTION_MOVE))
@@ -677,11 +677,11 @@ update_single_object (ECal *client, icalcomponent *icalcomp)
icalcomponent *tmp_icalcomp;
uid = (char *) icalcomponent_get_uid (icalcomp);
-
+
if (e_cal_get_object (client, uid, NULL, &tmp_icalcomp, NULL))
return e_cal_modify_object (client, icalcomp, CALOBJ_MOD_ALL, NULL);
- return e_cal_create_object (client, icalcomp, &uid, NULL);
+ return e_cal_create_object (client, icalcomp, &uid, NULL);
}
static gboolean
@@ -699,7 +699,7 @@ update_objects (ECal *client, icalcomponent *icalcomp)
subcomp = icalcomponent_get_first_component (icalcomp, ICAL_ANY_COMPONENT);
while (subcomp) {
gboolean success;
-
+
kind = icalcomponent_isa (subcomp);
if (kind == ICAL_VTIMEZONE_COMPONENT) {
icaltimezone *zone;
@@ -725,10 +725,10 @@ update_objects (ECal *client, icalcomponent *icalcomp)
}
static void
-selector_tree_drag_data_received (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
+selector_tree_drag_data_received (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
GtkSelectionData *data,
guint info,
guint time,
@@ -748,13 +748,13 @@ selector_tree_drag_data_received (GtkWidget *widget,
if (!gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
x, y, &path, &pos))
goto finish;
-
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
-
+
if (!gtk_tree_model_get_iter (model, &iter, path))
goto finish;
-
-
+
+
gtk_tree_model_get (model, &iter, 0, &source, -1);
if (E_IS_SOURCE_GROUP (source) || e_source_get_readonly (source) || !data->data)
@@ -849,12 +849,12 @@ selector_tree_drag_data_received (GtkWidget *widget,
gtk_tree_path_free (path);
gtk_drag_finish (context, success, context->action == GDK_ACTION_MOVE, time);
-}
+}
static void
selector_tree_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time, gpointer data)
{
- gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget),
+ gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget),
NULL, GTK_TREE_VIEW_DROP_BEFORE);
}
@@ -867,33 +867,33 @@ control_activate_cb (BonoboControl *control, gboolean activate, gpointer data)
if (activate) {
BonoboUIComponent *uic;
uic = bonobo_control_get_ui_component (component_view->view_control);
-
+
e_user_creatable_items_handler_activate (component_view->creatable_items_handler, uic);
- }
+ }
}
static void
config_create_ecal_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
-{
+{
TasksComponent *component = data;
TasksComponentPrivate *priv;
-
+
priv = component->priv;
g_object_unref (priv->create_ecal);
priv->create_ecal = NULL;
-
+
priv->notifications = g_list_remove (priv->notifications, GUINT_TO_POINTER (id));
}
static ECal *
-setup_create_ecal (TasksComponent *component, TasksComponentView *component_view)
+setup_create_ecal (TasksComponent *component, TasksComponentView *component_view)
{
TasksComponentPrivate *priv;
ESource *source = NULL;
char *uid;
guint not;
-
+
priv = component->priv;
if (component_view) {
@@ -903,18 +903,18 @@ setup_create_ecal (TasksComponent *component, TasksComponentView *component_view
if (default_ecal)
return default_ecal;
}
-
+
if (priv->create_ecal)
- return priv->create_ecal;
-
- /* Get the current primary calendar, or try to set one if it doesn't already exist */
+ return priv->create_ecal;
+
+ /* Get the current primary calendar, or try to set one if it doesn't already exist */
uid = calendar_config_get_primary_tasks ();
if (uid) {
source = e_source_list_peek_source_by_uid (priv->source_list, uid);
g_free (uid);
priv->create_ecal = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_TODO);
- }
+ }
if (!priv->create_ecal) {
/* Try to create a default if there isn't one */
@@ -922,19 +922,19 @@ setup_create_ecal (TasksComponent *component, TasksComponentView *component_view
if (source)
priv->create_ecal = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_TODO);
}
-
+
if (priv->create_ecal) {
icaltimezone *zone;
-
+
zone = calendar_config_get_icaltimezone ();
e_cal_set_default_timezone (priv->create_ecal, zone, NULL);
if (!e_cal_open (priv->create_ecal, FALSE, NULL)) {
GtkWidget *dialog;
-
+
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
- _("Unable to open the task list '%s' for creating events and meetings"),
+ _("Unable to open the task list '%s' for creating events and meetings"),
e_source_peek_name (source));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -944,7 +944,7 @@ setup_create_ecal (TasksComponent *component, TasksComponentView *component_view
} else {
GtkWidget *dialog;
-
+
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
_("There is no calendar available for creating tasks"));
@@ -952,10 +952,10 @@ setup_create_ecal (TasksComponent *component, TasksComponentView *component_view
gtk_widget_destroy (dialog);
return NULL;
- }
+ }
/* Handle the fact it may change on us */
- not = calendar_config_add_notification_primary_tasks (config_create_ecal_changed_cb,
+ not = calendar_config_add_notification_primary_tasks (config_create_ecal_changed_cb,
component);
priv->notifications = g_list_prepend (priv->notifications, GUINT_TO_POINTER (not));
@@ -982,15 +982,15 @@ create_new_todo (TasksComponent *task_component, gboolean is_assigned, TasksComp
ECal *ecal;
ECalComponent *comp;
TaskEditor *editor;
- guint32 flags = 0;
-
+ guint32 flags = 0;
+
ecal = setup_create_ecal (task_component, component_view);
if (!ecal)
return FALSE;
if (is_assigned)
flags |= COMP_EDITOR_IS_ASSIGNED;
-
+
flags |= COMP_EDITOR_NEW_ITEM | COMP_EDITOR_USER_ORG;
editor = task_editor_new (ecal, flags);
@@ -1015,18 +1015,18 @@ create_local_item_cb (EUserCreatableItemsHandler *handler, const char *item_type
TasksComponentPrivate *priv;
TasksComponentView *component_view = NULL;
GList *l;
-
+
priv = tasks_component->priv;
-
+
for (l = priv->views; l; l = l->next) {
component_view = l->data;
if (component_view->creatable_items_handler == handler)
break;
-
+
component_view = NULL;
}
-
+
if (strcmp (item_type_name, CREATE_TASK_ID) == 0) {
create_new_todo (tasks_component, FALSE, component_view);
} else if (strcmp (item_type_name, CREATE_TASK_ASSIGNED_ID) == 0) {
@@ -1044,28 +1044,28 @@ create_component_view (TasksComponent *tasks_component)
GtkWidget *selector_scrolled_window, *vbox;
GtkWidget *statusbar_widget;
AtkObject *a11y;
-
+
priv = tasks_component->priv;
/* Create the calendar component view */
component_view = g_new0 (TasksComponentView, 1);
-
+
/* Add the source lists */
component_view->source_list = g_object_ref (priv->source_list);
-
+
/* Create sidebar selector */
component_view->source_selector = e_source_selector_new (tasks_component->priv->source_list);
e_source_selector_set_select_new ((ESourceSelector *)component_view->source_selector, TRUE);
a11y = gtk_widget_get_accessible (GTK_WIDGET (component_view->source_selector));
atk_object_set_name (a11y, _("Task Source Selector"));
- g_signal_connect (component_view->source_selector, "drag-motion", G_CALLBACK (selector_tree_drag_motion),
+ g_signal_connect (component_view->source_selector, "drag-motion", G_CALLBACK (selector_tree_drag_motion),
tasks_component);
- g_signal_connect (component_view->source_selector, "drag-leave", G_CALLBACK (selector_tree_drag_leave),
+ g_signal_connect (component_view->source_selector, "drag-leave", G_CALLBACK (selector_tree_drag_leave),
tasks_component);
- g_signal_connect (component_view->source_selector, "drag-drop", G_CALLBACK (selector_tree_drag_drop),
+ g_signal_connect (component_view->source_selector, "drag-drop", G_CALLBACK (selector_tree_drag_drop),
tasks_component);
- g_signal_connect (component_view->source_selector, "drag-data-received",
+ g_signal_connect (component_view->source_selector, "drag-data-received",
G_CALLBACK (selector_tree_drag_data_received), tasks_component);
gtk_drag_dest_set(component_view->source_selector, GTK_DEST_DEFAULT_ALL, drag_types,
@@ -1105,9 +1105,9 @@ create_component_view (TasksComponent *tasks_component)
component_view->model = E_TABLE_MODEL (e_calendar_table_get_model (e_tasks_get_calendar_table (component_view->tasks)));
/* This signal is thrown if backends die - we update the selector */
- g_signal_connect (component_view->tasks, "source_added",
+ g_signal_connect (component_view->tasks, "source_added",
G_CALLBACK (source_added_cb), component_view);
- g_signal_connect (component_view->tasks, "source_removed",
+ g_signal_connect (component_view->tasks, "source_removed",
G_CALLBACK (source_removed_cb), component_view);
/* Create status bar */
@@ -1117,9 +1117,9 @@ create_component_view (TasksComponent *tasks_component)
gtk_widget_show (statusbar_widget);
component_view->statusbar_control = bonobo_control_new (statusbar_widget);
-
+
e_calendar_table_set_activity_handler (e_tasks_get_calendar_table (component_view->tasks), component_view->activity_handler);
-
+
/* connect after setting the initial selections, or we'll get unwanted calls
to calendar_control_sensitize_calendar_commands */
g_signal_connect (component_view->source_selector, "selection_changed",
@@ -1137,7 +1137,7 @@ create_component_view (TasksComponent *tasks_component)
set_info (component_view);
g_signal_connect (component_view->table, "selection_change",
G_CALLBACK (table_selection_change_cb), component_view);
- g_signal_connect (component_view->model, "model_changed",
+ g_signal_connect (component_view->model, "model_changed",
G_CALLBACK (model_changed_cb), component_view);
g_signal_connect (component_view->model, "model_rows_inserted",
G_CALLBACK (model_rows_inserted_cb), component_view);
@@ -1145,7 +1145,7 @@ create_component_view (TasksComponent *tasks_component)
G_CALLBACK (model_rows_deleted_cb), component_view);
/* Load the selection from the last run */
- update_selection (component_view);
+ update_selection (component_view);
update_primary_selection (component_view);
return component_view;
@@ -1153,15 +1153,15 @@ create_component_view (TasksComponent *tasks_component)
static void
destroy_component_view (TasksComponentView *component_view)
-{
+{
GList *l;
-
+
if (component_view->source_list)
g_object_unref (component_view->source_list);
if (component_view->source_selection)
e_source_selector_free_selection (component_view->source_selection);
-
+
for (l = component_view->notifications; l; l = l->next)
calendar_config_remove_notification (GPOINTER_TO_UINT (l->data));
g_list_free (component_view->notifications);
@@ -1181,12 +1181,12 @@ view_destroyed_cb (gpointer data, GObject *where_the_object_was)
TasksComponent *tasks_component = data;
TasksComponentPrivate *priv;
GList *l;
-
+
priv = tasks_component->priv;
for (l = priv->views; l; l = l->next) {
TasksComponentView *component_view = l->data;
-
+
if (G_OBJECT (component_view->view_control) == where_the_object_was) {
priv->views = g_list_remove (priv->views, component_view);
destroy_component_view (component_view);
@@ -1205,7 +1205,7 @@ impl_createView (PortableServer_Servant servant,
TasksComponentPrivate *priv;
TasksComponentView *component_view;
EComponentView *ecv;
-
+
priv = component->priv;
/* Create the calendar component view */
@@ -1219,7 +1219,7 @@ impl_createView (PortableServer_Servant servant,
g_object_weak_ref (G_OBJECT (component_view->view_control), view_destroyed_cb, component);
priv->views = g_list_append (priv->views, component_view);
-
+
/* TODO: Make TasksComponentView just subclass EComponentView */
ecv = e_component_view_new_controls (parent, "tasks", component_view->sidebar_control,
component_view->view_control, component_view->statusbar_control);
@@ -1257,17 +1257,17 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme
if (p) {
while (*p) {
len = strcspn (p, "=&");
-
+
/* If it's malformed, give up. */
if (p[len] != '=')
break;
-
+
header = (char *) p;
header[len] = '\0';
p += len + 1;
-
+
clen = strcspn (p, "&");
-
+
content = g_strndup (p, clen);
if (!g_ascii_strcasecmp (header, "source-uid")) {
src_uid = g_strdup (content);
@@ -1289,7 +1289,7 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme
if (uid && src_uid) {
e_tasks_open_task_id (view->tasks, src_uid, uid, rid);
}
-
+
g_free (src_uid);
g_free (uid);
g_free (rid);
@@ -1345,7 +1345,7 @@ impl_requestCreateItem (PortableServer_Servant servant,
CORBA_Environment *ev)
{
TasksComponent *tasks_component = TASKS_COMPONENT (bonobo_object_from_servant (servant));
-
+
if (strcmp (item_type_name, CREATE_TASK_ID) == 0) {
if (!create_new_todo (tasks_component, FALSE, NULL))
bonobo_exception_set (ev, ex_GNOME_Evolution_Component_Failed);
@@ -1368,7 +1368,7 @@ impl_dispose (GObject *object)
TasksComponent *tasks_component = TASKS_COMPONENT (object);
TasksComponentPrivate *priv = tasks_component->priv;
GList *l;
-
+
if (priv->source_list != NULL) {
g_object_unref (priv->source_list);
priv->source_list = NULL;
@@ -1385,7 +1385,7 @@ impl_dispose (GObject *object)
for (l = priv->views; l; l = l->next) {
TasksComponentView *component_view = l->data;
-
+
g_object_weak_unref (G_OBJECT (component_view->view_control), view_destroyed_cb, tasks_component);
}
g_list_free (priv->views);
@@ -1404,10 +1404,10 @@ impl_finalize (GObject *object)
{
TasksComponentPrivate *priv = TASKS_COMPONENT (object)->priv;
GList *l;
-
+
for (l = priv->views; l; l = l->next) {
TasksComponentView *component_view = l->data;
-
+
destroy_component_view (component_view);
}
g_list_free (priv->views);
@@ -1448,7 +1448,7 @@ tasks_component_init (TasksComponent *component, TasksComponentClass *klass)
priv->config_directory = g_build_filename (g_get_home_dir (),
".evolution", "tasks", "config",
NULL);
-
+
component->priv = priv;
ensure_sources (component);
}
@@ -1489,7 +1489,7 @@ tasks_component_peek_config_directory (TasksComponent *component)
ESourceList *
tasks_component_peek_source_list (TasksComponent *component)
{
- return component->priv->source_list;
+ return component->priv->source_list;
}
BONOBO_TYPE_FUNC_FULL (TasksComponent, GNOME_Evolution_Component, PARENT_TYPE, tasks_component)
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index dda57aad74..5c0b89e3f8 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -97,12 +97,12 @@ static void tasks_control_forward_cmd (BonoboUIComponent *uic,
gpointer data,
const char *path);
-static void tasks_control_view_preview (BonoboUIComponent *uic,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
+static void tasks_control_view_preview (BonoboUIComponent *uic,
+ const char *path,
+ Bonobo_UIComponent_EventType type,
+ const char *state,
void *data);
-
+
BonoboControl *
tasks_control_new (void)
{
@@ -218,9 +218,9 @@ tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, int n_s
ecal = e_cal_model_get_default_client (model);
- if (ecal)
+ if (ecal)
e_cal_is_read_only (ecal, &read_only, NULL);
-
+
sensitize_items (uic, tasks_sensitize_table, t->target.mask);
e_menu_update_target ((EMenu *)menu, (EMenuTarget *)t);
}
@@ -266,7 +266,7 @@ static EPixmap pixmaps [] = {
E_PIXMAP ("/Toolbar/Paste", "edit-paste", E_ICON_SIZE_LARGE_TOOLBAR),
E_PIXMAP ("/Toolbar/Print", "document-print", E_ICON_SIZE_LARGE_TOOLBAR),
E_PIXMAP ("/Toolbar/Delete", "edit-delete", E_ICON_SIZE_LARGE_TOOLBAR),
-
+
E_PIXMAP_END
};
void
@@ -302,8 +302,8 @@ tasks_control_activate (BonoboControl *control, ETasks *tasks)
NULL);
g_free (xmlfile);
- e_pixmaps_update (uic, pixmaps);
-
+ e_pixmaps_update (uic, pixmaps);
+
e_tasks_setup_view_menus (tasks, uic);
/* Signals from the tasks widget; also sensitize the menu items as appropriate */
@@ -320,7 +320,7 @@ tasks_control_activate (BonoboControl *control, ETasks *tasks)
state = calendar_config_get_preview_state();
bonobo_ui_component_thaw (uic, NULL);
-
+
bonobo_ui_component_add_listener(uic, "ViewPreview", tasks_control_view_preview, tasks);
bonobo_ui_component_set_prop(uic, "/commands/ViewPreview", "state", state?"1":"0", NULL);
/* Show the dialog for setting the timezone if the user hasn't chosen
@@ -441,7 +441,7 @@ confirm_purge (ETasks *tasks)
{
GtkWidget *dialog, *checkbox, *parent;
int button;
-
+
if (!calendar_config_get_confirm_purge ())
return TRUE;
@@ -457,12 +457,12 @@ confirm_purge (ETasks *tasks)
checkbox = gtk_check_button_new_with_label (_("Do not ask me again."));
gtk_widget_show (checkbox);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), checkbox, TRUE, TRUE, 6);
-
- button = gtk_dialog_run (GTK_DIALOG (dialog));
+
+ button = gtk_dialog_run (GTK_DIALOG (dialog));
if (button == GTK_RESPONSE_YES && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
calendar_config_set_confirm_purge (FALSE);
gtk_widget_destroy (dialog);
-
+
return button == GTK_RESPONSE_YES ? TRUE : FALSE;
}
@@ -535,7 +535,7 @@ tasks_control_forward_cmd (BonoboUIComponent *uic,
ETasks *tasks;
ECalendarTable *cal_table;
ECalModelComponent *comp_data;
-
+
tasks = E_TASKS (data);
cal_table = e_tasks_get_calendar_table (tasks);
comp_data = e_calendar_table_get_selected_comp (cal_table);
@@ -555,7 +555,7 @@ tasks_control_view_preview (BonoboUIComponent *uic, const char *path, Bonobo_UIC
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
tasks = E_TASKS (data);
calendar_config_set_preview_state (state[0] != '0');
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index cab6f9977d..166c5d5b26 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -109,7 +109,7 @@ weekday_picker_class_init (WeekdayPickerClass *class)
class->changed = NULL;
}
-static void
+static void
day_clicked (WeekdayPicker *wp, int index)
{
WeekdayPickerPrivate *priv = wp->priv;
@@ -324,7 +324,7 @@ get_day_text (int day_index)
/* we use strlen because we actually want to count bytes */
if (day_index == 6)
- char_size = strlen (day);
+ char_size = strlen (day);
else
char_size = strlen (day) - strlen (g_utf8_find_next_char (day, NULL));
@@ -459,7 +459,7 @@ weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style)
pango_layout_set_text (layout, c, strlen (c));
pango_layout_get_pixel_size (layout, &w, NULL);
g_free (c);
-
+
if (w > max_width)
max_width = w;
}
@@ -478,10 +478,10 @@ weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_style)
/**
* weekday_picker_new:
- * @void:
- *
+ * @void:
+ *
* Creates a new weekday picker widget.
- *
+ *
* Return value: A newly-created weekday picker.
**/
GtkWidget *
@@ -494,7 +494,7 @@ weekday_picker_new (void)
* weekday_picker_set_days:
* @wp: A weekday picker.
* @day_mask: Bitmask with the days to be selected.
- *
+ *
* Sets the days that are selected in a weekday picker. In the @day_mask,
* Sunday is bit 0, Monday is bit 1, etc.
**/
@@ -517,9 +517,9 @@ weekday_picker_set_days (WeekdayPicker *wp, guint8 day_mask)
/**
* weekday_picker_get_days:
* @wp: A weekday picker.
- *
+ *
* Queries the days that are selected in a weekday picker.
- *
+ *
* Return value: Bit mask of selected days. Sunday is bit 0, Monday is bit 1,
* etc.
**/
@@ -539,7 +539,7 @@ weekday_picker_get_days (WeekdayPicker *wp)
* weekday_picker_set_blocked_days:
* @wp: A weekday picker.
* @blocked_day_mask: Bitmask with the days to be blocked.
- *
+ *
* Sets the days that the weekday picker will prevent from being modified by the
* user. The @blocked_day_mask is specified in the same way as in
* weekday_picker_set_days().
@@ -559,10 +559,10 @@ weekday_picker_set_blocked_days (WeekdayPicker *wp, guint8 blocked_day_mask)
/**
* weekday_picker_get_blocked_days:
* @wp: A weekday picker.
- *
+ *
* Queries the set of days that the weekday picker prevents from being modified
* by the user.
- *
+ *
* Return value: Bit mask of blocked days, with the same format as that returned
* by weekday_picker_get_days().
**/
@@ -583,7 +583,7 @@ weekday_picker_get_blocked_days (WeekdayPicker *wp)
* @wp: A weekday picker.
* @week_start_day: Index of the day that defines the start of the week; 0 is
* Sunday, 1 is Monday, etc.
- *
+ *
* Sets the day that defines the start of the week for a weekday picker.
**/
void
@@ -604,9 +604,9 @@ weekday_picker_set_week_start_day (WeekdayPicker *wp, int week_start_day)
/**
* weekday_picker_get_week_start_day:
* @wp: A weekday picker.
- *
+ *
* Queries the day that defines the start of the week in a weekday picker.
- *
+ *
* Return value: Index of the day that defines the start of the week. See
* weekday_picker_set_week_start_day() to see how this is represented.
**/
diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c
index 5055e1a3ea..0b08fc893a 100644
--- a/calendar/importers/icalendar-importer.c
+++ b/calendar/importers/icalendar-importer.c
@@ -105,7 +105,7 @@ prepare_events (icalcomponent *icalcomp, GList **vtodos)
if (vtodos)
*vtodos = NULL;
-
+
iter = icalcomponent_begin_component (icalcomp, ICAL_ANY_COMPONENT);
while ((subcomp = icalcompiter_deref (&iter)) != NULL) {
icalcomponent_kind child_kind = icalcomponent_isa (subcomp);
@@ -218,7 +218,7 @@ ivcal_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
GtkWidget *nb;
vbox = gtk_vbox_new (FALSE, FALSE);
-
+
hbox = gtk_hbox_new (FALSE, FALSE);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 6);
@@ -389,7 +389,7 @@ ical_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
if (icalcomp) {
if (icalcomponent_is_valid (icalcomp))
ret = TRUE;
- else
+ else
ret = FALSE;
icalcomponent_free (icalcomp);
}
@@ -487,7 +487,7 @@ vcal_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
icalcomponent *icalcomp;
icalcomp = icalvcal_convert (vcal);
-
+
if (icalcomp) {
icalcomponent_free (icalcomp);
ret = TRUE;
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index a3170054fc..523c66f695 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -97,18 +97,18 @@ typedef struct {
struct _EMsgComposerHdrsPrivate {
ENameSelector *name_selector;
-
+
/* ui component */
BonoboUIComponent *uic;
-
+
/* The tooltips. */
GtkTooltips *tooltips;
-
+
EAccountList *accounts;
GSList *from_options;
-
+
gboolean post_custom;
-
+
/* Standard headers. */
EMsgComposerHdrPair from, reply_to, to, cc, bcc, post_to, subject;
};
@@ -138,9 +138,9 @@ setup_name_selector (EMsgComposerHdrs *hdrs)
{
EMsgComposerHdrsPrivate *priv;
ENameSelectorDialog *name_selector_dialog;
-
+
priv = hdrs->priv;
-
+
g_return_if_fail (priv->name_selector == NULL);
priv->name_selector = e_name_selector_new ();
@@ -167,13 +167,13 @@ static EMsgComposerHdrsAndString *
e_msg_composer_hdrs_and_string_create (EMsgComposerHdrs *hdrs, const char *string)
{
EMsgComposerHdrsAndString *emchas;
-
+
emchas = g_new (EMsgComposerHdrsAndString, 1);
emchas->hdrs = hdrs;
emchas->string = g_strdup (string);
if (emchas->hdrs)
g_object_ref (emchas->hdrs);
-
+
return emchas;
}
@@ -185,11 +185,11 @@ address_button_clicked_cb (GtkButton *button, gpointer data)
EMsgComposerHdrsPrivate *priv;
ENameSelectorDialog *name_selector_dialog;
guint index = 0;
-
+
emchas = data;
hdrs = emchas->hdrs;
priv = hdrs->priv;
-
+
if (button == (GtkButton *) hdrs->priv->to.label) {
gtk_widget_grab_focus (hdrs->priv->to.entry);
index = 0;
@@ -205,7 +205,7 @@ address_button_clicked_cb (GtkButton *button, gpointer data)
index = 2;
printf("index:%d\n", index);
}
-
+
name_selector_dialog = e_name_selector_peek_dialog (priv->name_selector);
e_name_selector_dialog_set_destination_index (name_selector_dialog, index);
gtk_widget_show (GTK_WIDGET (name_selector_dialog));
@@ -217,25 +217,25 @@ from_changed (GtkWidget *item, gpointer data)
EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (data);
const char *reply_to;
GList *post_items = NULL;
-
+
/* this will retrieve items relative to the previous account */
if (!hdrs->priv->post_custom)
post_items = e_msg_composer_hdrs_get_post_to(hdrs);
-
+
hdrs->account = g_object_get_data ((GObject *) item, "account");
-
+
/* we do this rather than calling e_msg_composer_hdrs_set_reply_to()
because we don't want to change the visibility of the header */
reply_to = hdrs->account->id->reply_to;
gtk_entry_set_text (GTK_ENTRY (hdrs->priv->reply_to.entry), reply_to ? reply_to : "");
-
+
/* folders should be made relative to the new from */
if (!hdrs->priv->post_custom) {
e_msg_composer_hdrs_set_post_to_list (hdrs, post_items);
g_list_foreach (post_items, (GFunc)g_free, NULL);
g_list_free(post_items);
}
-
+
g_signal_emit (hdrs, signals [FROM_CHANGED], 0);
}
@@ -245,11 +245,11 @@ account_can_send (EAccount *account)
static CamelStore *store;
CamelException ex;
gboolean result = FALSE;
-
- if (!account->parent_uid)
+
+ if (!account->parent_uid)
return TRUE;
-
- if (!(store = (CamelStore *) camel_session_get_service (session, e_account_get_string(account, E_ACCOUNT_SOURCE_URL), CAMEL_PROVIDER_STORE, &ex))) {
+
+ if (!(store = (CamelStore *) camel_session_get_service (session, e_account_get_string(account, E_ACCOUNT_SOURCE_URL), CAMEL_PROVIDER_STORE, &ex))) {
camel_exception_clear (&ex);
return result;
} else if (store->mode & CAMEL_STORE_WRITE)
@@ -264,10 +264,10 @@ account_added_cb (EAccountList *accounts, EAccount *account, EMsgComposerHdrs *h
{
GtkWidget *item, *menu, *omenu, *toplevel;
char *label;
-
+
omenu = e_msg_composer_hdrs_get_from_omenu (hdrs);
menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (omenu));
-
+
if (account_can_send (account)) {
label = g_strdup_printf ("%s <%s>", account->id->name, account->id->address);
item = gtk_menu_item_new_with_label (label);
@@ -277,12 +277,12 @@ account_added_cb (EAccountList *accounts, EAccount *account, EMsgComposerHdrs *h
g_object_ref (account);
g_object_set_data ((GObject *) item, "account", account);
g_signal_connect (item, "activate", G_CALLBACK (from_changed), hdrs);
-
+
/* this is so we can later set which one we want */
hdrs->priv->from_options = g_slist_append (hdrs->priv->from_options, item);
-
+
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
-
+
toplevel = gtk_widget_get_toplevel ((GtkWidget *) hdrs);
gtk_widget_set_sensitive (toplevel, TRUE);
}
@@ -307,7 +307,7 @@ account_changed_cb (EAccountList *accounts, EAccount *account, EMsgComposerHdrs
g_free (text);
break;
}
-
+
node = node->next;
}
}
@@ -327,30 +327,30 @@ account_removed_cb (EAccountList *accounts, EAccount *account, EMsgComposerHdrs
if (acnt == account) {
if (hdrs->account == account)
hdrs->account = NULL;
-
+
priv->from_options = g_slist_delete_link (priv->from_options, node);
g_object_unref (account);
gtk_widget_destroy (item);
break;
}
-
+
node = node->next;
}
-
+
if (hdrs->account == NULL) {
if (priv->from_options) {
/* the previously selected account was removed,
default the new selection to the first account in
the menu list */
omenu = e_msg_composer_hdrs_get_from_omenu (hdrs);
-
+
item = priv->from_options->data;
gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), 0);
g_signal_emit_by_name (item, "activate", hdrs);
} else {
toplevel = gtk_widget_get_toplevel ((GtkWidget *) hdrs);
gtk_widget_set_sensitive (toplevel, FALSE);
-
+
/* FIXME: this should offer a 'configure account' button, can we do that? */
e_error_run((GtkWindow *)toplevel, "mail-composer:all-accounts-deleted", NULL);
}
@@ -371,11 +371,11 @@ create_from_optionmenu (EMsgComposerHdrs *hdrs)
omenu = gtk_option_menu_new ();
menu = gtk_menu_new ();
-
+
gconf = gconf_client_get_default ();
uid = gconf_client_get_string (gconf, "/apps/evolution/mail/default_account", NULL);
g_object_unref (gconf);
-
+
/* Make list of account email addresses */
addresses = g_ptr_array_new ();
iter = e_list_get_iterator ((EList *) priv->accounts);
@@ -384,23 +384,23 @@ create_from_optionmenu (EMsgComposerHdrs *hdrs)
if (account->id->address && account_can_send (account) && account->enabled)
g_ptr_array_add (addresses, account->id->address);
-
+
e_iterator_next (iter);
}
-
+
e_iterator_reset (iter);
-
+
while (e_iterator_is_valid (iter)) {
char *label;
-
+
account = (EAccount *) e_iterator_get (iter);
-
+
/* this should never ever fail */
if (!account || !account->name || !account->id) {
g_warning ("account details are bad\n");
continue;
}
-
+
if (account->id->address && *account->id->address && account_can_send (account) && account->enabled) {
/* If the account has a unique email address, just
* show that. Otherwise include the account name.
@@ -409,60 +409,60 @@ create_from_optionmenu (EMsgComposerHdrs *hdrs)
if (!strcmp (account->id->address, addresses->pdata[m]))
matches++;
}
-
+
if (matches > 1)
label = g_strdup_printf ("%s <%s> (%s)", account->id->name,
account->id->address, account->name);
else
label = g_strdup_printf ("%s <%s>", account->id->name, account->id->address);
-
+
item = gtk_menu_item_new_with_label (label);
g_free (label);
-
+
g_object_ref (account);
g_object_set_data ((GObject *) item, "account", account);
g_signal_connect (item, "activate", G_CALLBACK (from_changed), hdrs);
-
+
if (uid && !strcmp (account->uid, uid)) {
first = item;
history = i;
}
-
+
/* this is so we can later set which one we want */
hdrs->priv->from_options = g_slist_append (hdrs->priv->from_options, item);
-
+
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
i++;
}
-
+
e_iterator_next (iter);
}
-
+
g_free (uid);
g_object_unref (iter);
-
+
g_ptr_array_free (addresses, TRUE);
-
+
gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
-
+
if (first) {
gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), history);
g_signal_emit_by_name (first, "activate", hdrs);
}
-
+
hbox = gtk_hbox_new (FALSE, 6);
gtk_box_pack_start_defaults (GTK_BOX (hbox), omenu);
gtk_widget_show (omenu);
gtk_widget_show (hbox);
-
+
g_object_set_data ((GObject *) hbox, "from_menu", omenu);
-
+
/* listen for changes to the account list so we can auto-update the from menu */
g_signal_connect (priv->accounts, "account-added", G_CALLBACK (account_added_cb), hdrs);
g_signal_connect (priv->accounts, "account-changed", G_CALLBACK (account_changed_cb), hdrs);
g_signal_connect (priv->accounts, "account-removed", G_CALLBACK (account_removed_cb), hdrs);
-
+
return hbox;
}
@@ -471,7 +471,7 @@ addressbook_entry_changed (GtkWidget *entry,
gpointer user_data)
{
EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (user_data);
-
+
g_signal_emit (hdrs, signals[HDRS_CHANGED], 0);
}
@@ -519,7 +519,7 @@ create_addressbook_entry (EMsgComposerHdrs *hdrs, const char *name)
EMsgComposerHdrsPrivate *priv;
ENameSelectorModel *name_selector_model;
ENameSelectorEntry *name_selector_entry;
-
+
priv = hdrs->priv;
name_selector_model = e_name_selector_peek_model (priv->name_selector);
@@ -537,31 +537,31 @@ create_addressbook_entry (EMsgComposerHdrs *hdrs, const char *name)
#if 0
CORBA_exception_init (&ev);
-
+
GNOME_Evolution_Addressbook_SelectNames_addSection (
corba_select_names, name, name, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
CORBA_exception_free (&ev);
return NULL;
}
-
+
corba_control =
GNOME_Evolution_Addressbook_SelectNames_getEntryBySection (
corba_select_names, name, &ev);
-
+
if (ev._major != CORBA_NO_EXCEPTION) {
CORBA_exception_free (&ev);
return NULL;
}
-
+
CORBA_exception_free (&ev);
-
+
control_widget = bonobo_widget_new_control_from_objref (
corba_control, bonobo_ui_component_get_container (priv->uic));
-
+
cf = bonobo_widget_get_control_frame (BONOBO_WIDGET (control_widget));
pb = bonobo_control_frame_get_control_property_bag (cf, NULL);
-
+
bonobo_control_frame_set_autoactivate (cf, TRUE);
bonobo_event_source_client_add_listener (
@@ -584,7 +584,7 @@ post_browser_response (EMFolderSelector *emfs, int response, EMsgComposerHdrs *h
g_list_foreach (uris, (GFunc) g_free, NULL);
g_list_free (uris);
}
-
+
gtk_widget_destroy ((GtkWidget *) emfs);
}
@@ -595,7 +595,7 @@ post_browser_clicked_cb (GtkButton *button, EMsgComposerHdrs *hdrs)
EMFolderTree *emft;
GtkWidget *dialog;
GList *post_items;
-
+
gtk_widget_grab_focus(hdrs->priv->post_to.entry);
model = mail_component_peek_tree_model (mail_component_peek ());
emft = (EMFolderTree *) em_folder_tree_new_with_model (model);
@@ -605,12 +605,12 @@ post_browser_clicked_cb (GtkButton *button, EMsgComposerHdrs *hdrs)
dialog = em_folder_selector_new (emft, EM_FOLDER_SELECTOR_CAN_CREATE,
_("Posting destination"),
_("Choose folders to post the message to."), NULL);
-
- post_items = e_msg_composer_hdrs_get_post_to (hdrs);
+
+ post_items = e_msg_composer_hdrs_get_post_to (hdrs);
em_folder_selector_set_selected_list ((EMFolderSelector *) dialog, post_items);
g_list_foreach (post_items, (GFunc) g_free, NULL);
g_list_free (post_items);
-
+
g_signal_connect (dialog, "response", G_CALLBACK (post_browser_response), hdrs);
gtk_widget_show (dialog);
}
@@ -621,7 +621,7 @@ post_entry_changed_cb (GtkButton *button, EMsgComposerHdrs *hdrs)
hdrs->priv->post_custom = TRUE;
}
-static EMsgComposerHdrPair
+static EMsgComposerHdrPair
header_new_recipient (EMsgComposerHdrs *hdrs, const char *name, const char *tip)
{
EMsgComposerHdrPair ret;
@@ -633,14 +633,14 @@ header_new_recipient (EMsgComposerHdrs *hdrs, const char *name, const char *tip)
e_msg_composer_hdrs_and_string_create (hdrs, name),
(GClosureNotify) e_msg_composer_hdrs_and_string_free,
0);
-
+
gtk_tooltips_set_tip (hdrs->priv->tooltips, ret.label,
_("Click here for the address book"),
NULL);
-
+
ret.entry = create_addressbook_entry (hdrs, name);
ret.visible = FALSE;
-
+
return ret;
}
@@ -659,7 +659,7 @@ create_headers (EMsgComposerHdrs *hdrs)
{
EMsgComposerHdrsPrivate *priv = hdrs->priv;
AtkObject *a11y;
-
+
/*
* Reply-To:
*
@@ -670,14 +670,14 @@ create_headers (EMsgComposerHdrs *hdrs)
priv->reply_to.label = gtk_label_new_with_mnemonic (_("_Reply-To:"));
priv->reply_to.entry = gtk_entry_new ();
gtk_label_set_mnemonic_widget((GtkLabel *)priv->reply_to.label, priv->reply_to.entry);
-
+
/*
* From
*/
priv->from.label = gtk_label_new_with_mnemonic (_("Fr_om:"));
priv->from.entry = create_from_optionmenu (hdrs);
gtk_label_set_mnemonic_widget((GtkLabel *)priv->from.label, e_msg_composer_hdrs_get_from_omenu (hdrs));
-
+
/*
* Subject
*/
@@ -693,11 +693,11 @@ create_headers (EMsgComposerHdrs *hdrs)
priv->to = header_new_recipient (
hdrs, _("_To:"),
_("Enter the recipients of the message"));
-
+
priv->cc = header_new_recipient (
hdrs, _("_Cc:"),
_("Enter the addresses that will receive a carbon copy of the message"));
-
+
priv->bcc = header_new_recipient (
hdrs, _("_Bcc:"),
_("Enter the addresses that will receive a carbon copy of "
@@ -714,11 +714,11 @@ create_headers (EMsgComposerHdrs *hdrs)
gtk_tooltips_set_tip (hdrs->priv->tooltips, priv->post_to.label,
_("Click here to select folders to post to"),
NULL);
-
+
priv->post_to.entry = gtk_entry_new ();
if ((a11y = gtk_widget_get_accessible (priv->post_to.entry)))
- atk_object_set_name (a11y, _("Post To:"));
-
+ atk_object_set_name (a11y, _("Post To:"));
+
g_signal_connect(priv->post_to.entry, "changed",
G_CALLBACK (post_entry_changed_cb), hdrs);
@@ -732,7 +732,7 @@ attach_couple (EMsgComposerHdrs *hdrs, EMsgComposerHdrPair *pair, int line)
pair->label, 0, 1,
line, line + 1,
GTK_FILL, GTK_FILL, 3, 3);
-
+
if (line == LINE_TO || line == LINE_CC || line == LINE_BCC) {
gtk_table_attach (GTK_TABLE (hdrs),
pair->entry, 1, 2,
@@ -751,7 +751,7 @@ static void
attach_headers (EMsgComposerHdrs *hdrs)
{
EMsgComposerHdrsPrivate *p = hdrs->priv;
-
+
attach_couple (hdrs, &p->from, LINE_FROM);
attach_couple (hdrs, &p->reply_to, LINE_REPLYTO);
attach_couple (hdrs, &p->to, LINE_TO);
@@ -779,13 +779,13 @@ static void
headers_set_visibility (EMsgComposerHdrs *h, int visible_flags)
{
EMsgComposerHdrsPrivate *p = h->priv;
-
+
/* To is always visible if we're not doing Post-To */
if (!(h->visible_mask & E_MSG_COMPOSER_VISIBLE_POSTTO))
visible_flags |= E_MSG_COMPOSER_VISIBLE_TO;
else
visible_flags |= E_MSG_COMPOSER_VISIBLE_POSTTO;
-
+
set_pair_visibility (h, &p->from, visible_flags & E_MSG_COMPOSER_VISIBLE_FROM);
set_pair_visibility (h, &p->reply_to, visible_flags & E_MSG_COMPOSER_VISIBLE_REPLYTO);
set_pair_visibility (h, &p->to, visible_flags & E_MSG_COMPOSER_VISIBLE_TO);
@@ -802,7 +802,7 @@ headers_set_sensitivity (EMsgComposerHdrs *h)
bonobo_ui_component_set_prop (
h->priv->uic, "/commands/ViewTo", "sensitive",
h->visible_mask & E_MSG_COMPOSER_VISIBLE_TO ? "0" : "1", NULL);
-
+
bonobo_ui_component_set_prop (
h->priv->uic, "/commands/ViewPostTo", "sensitive",
h->visible_mask & E_MSG_COMPOSER_VISIBLE_POSTTO ? "0" : "1", NULL);
@@ -812,7 +812,7 @@ void
e_msg_composer_hdrs_set_visible_mask (EMsgComposerHdrs *hdrs, int visible_mask)
{
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
+
hdrs->visible_mask = visible_mask;
headers_set_sensitivity (hdrs);
}
@@ -821,7 +821,7 @@ void
e_msg_composer_hdrs_set_visible (EMsgComposerHdrs *hdrs, int visible_flags)
{
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
+
headers_set_visibility (hdrs, visible_flags);
gtk_widget_queue_resize (GTK_WIDGET (hdrs));
}
@@ -831,7 +831,7 @@ setup_headers (EMsgComposerHdrs *hdrs, int visible_flags)
{
create_headers (hdrs);
attach_headers (hdrs);
-
+
headers_set_sensitivity (hdrs);
headers_set_visibility (hdrs, visible_flags);
}
@@ -845,10 +845,10 @@ destroy (GtkObject *object)
EMsgComposerHdrs *hdrs;
EMsgComposerHdrsPrivate *priv;
GSList *l, *n;
-
+
hdrs = E_MSG_COMPOSER_HDRS (object);
priv = hdrs->priv;
-
+
if (priv) {
if (priv->name_selector != NULL) {
g_object_unref (priv->name_selector);
@@ -860,32 +860,32 @@ destroy (GtkObject *object)
g_object_unref (priv->tooltips);
priv->tooltips = NULL;
}
-
+
if (priv->accounts) {
g_signal_handlers_disconnect_matched(priv->accounts, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, hdrs);
g_object_unref (priv->accounts);
priv->accounts = NULL;
}
-
+
l = priv->from_options;
while (l) {
EAccount *account;
GtkWidget *item = l->data;
-
+
account = g_object_get_data ((GObject *) item, "account");
g_object_unref (account);
-
+
n = l->next;
g_slist_free_1 (l);
l = n;
}
-
+
priv->from_options = NULL;
-
+
g_free (priv);
hdrs->priv = NULL;
}
-
+
if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
@@ -895,12 +895,12 @@ static void
class_init (EMsgComposerHdrsClass *class)
{
GtkObjectClass *object_class;
-
+
object_class = GTK_OBJECT_CLASS (class);
object_class->destroy = destroy;
-
+
parent_class = g_type_class_ref (gtk_table_get_type ());
-
+
signals[SHOW_ADDRESS_DIALOG] =
g_signal_new ("show_address_dialog",
E_TYPE_MSG_COMPOSER_HDRS,
@@ -909,7 +909,7 @@ class_init (EMsgComposerHdrsClass *class)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
+
signals[SUBJECT_CHANGED] =
g_signal_new ("subject_changed",
E_TYPE_MSG_COMPOSER_HDRS,
@@ -919,7 +919,7 @@ class_init (EMsgComposerHdrsClass *class)
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE,
1, G_TYPE_STRING);
-
+
signals[HDRS_CHANGED] =
g_signal_new ("hdrs_changed",
E_TYPE_MSG_COMPOSER_HDRS,
@@ -928,7 +928,7 @@ class_init (EMsgComposerHdrsClass *class)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
+
signals[FROM_CHANGED] =
g_signal_new ("from_changed",
E_TYPE_MSG_COMPOSER_HDRS,
@@ -943,17 +943,17 @@ static void
init (EMsgComposerHdrs *hdrs)
{
EMsgComposerHdrsPrivate *priv;
-
+
priv = g_new0 (EMsgComposerHdrsPrivate, 1);
-
+
priv->tooltips = gtk_tooltips_new ();
g_object_ref_sink (priv->tooltips);
-
+
priv->accounts = mail_config_get_accounts ();
g_object_ref (priv->accounts);
priv->post_custom = FALSE;
-
+
hdrs->priv = priv;
}
@@ -962,7 +962,7 @@ GType
e_msg_composer_hdrs_get_type (void)
{
static GType type = 0;
-
+
if (type == 0) {
static const GTypeInfo info = {
sizeof (EMsgComposerHdrsClass),
@@ -975,10 +975,10 @@ e_msg_composer_hdrs_get_type (void)
0,
(GInstanceInitFunc) init,
};
-
+
type = g_type_register_static (gtk_table_get_type (), "EMsgComposerHdrs", &info, 0);
}
-
+
return type;
}
@@ -987,7 +987,7 @@ e_msg_composer_hdrs_new (BonoboUIComponent *uic, int visible_mask, int visible_f
{
EMsgComposerHdrs *new;
EMsgComposerHdrsPrivate *priv;
-
+
new = g_object_new (e_msg_composer_hdrs_get_type (), NULL);
priv = new->priv;
priv->uic = uic;
@@ -995,11 +995,11 @@ e_msg_composer_hdrs_new (BonoboUIComponent *uic, int visible_mask, int visible_f
g_object_ref_sink (new);
setup_name_selector (new);
-
+
new->visible_mask = visible_mask;
-
+
setup_headers (new, visible_flags);
-
+
return GTK_WIDGET (new);
}
@@ -1017,15 +1017,15 @@ set_recipients_from_destv (CamelMimeMessage *msg,
const char *text_addr, *header;
gboolean seen_hidden_list = FALSE;
int i;
-
+
to_addr = camel_internet_address_new ();
cc_addr = camel_internet_address_new ();
bcc_addr = camel_internet_address_new ();
-
+
if (to_destv) {
for (i = 0; to_destv[i] != NULL; ++i) {
text_addr = e_destination_get_address (to_destv[i]);
-
+
if (text_addr && *text_addr) {
target = to_addr;
if (e_destination_is_evolution_list (to_destv[i])
@@ -1033,12 +1033,12 @@ set_recipients_from_destv (CamelMimeMessage *msg,
target = bcc_addr;
seen_hidden_list = TRUE;
}
-
+
camel_address_decode (CAMEL_ADDRESS (target), text_addr);
}
}
}
-
+
if (cc_destv) {
for (i = 0; cc_destv[i] != NULL; ++i) {
text_addr = e_destination_get_address (cc_destv[i]);
@@ -1049,38 +1049,38 @@ set_recipients_from_destv (CamelMimeMessage *msg,
target = bcc_addr;
seen_hidden_list = TRUE;
}
-
+
camel_address_decode (CAMEL_ADDRESS (target), text_addr);
}
}
}
-
+
if (bcc_destv) {
for (i = 0; bcc_destv[i] != NULL; ++i) {
text_addr = e_destination_get_address (bcc_destv[i]);
- if (text_addr && *text_addr) {
+ if (text_addr && *text_addr) {
camel_address_decode (CAMEL_ADDRESS (bcc_addr), text_addr);
}
}
}
-
+
header = redirect ? CAMEL_RECIPIENT_TYPE_RESENT_TO : CAMEL_RECIPIENT_TYPE_TO;
if (camel_address_length (CAMEL_ADDRESS (to_addr)) > 0) {
camel_mime_message_set_recipients (msg, header, to_addr);
} else if (seen_hidden_list) {
camel_medium_set_header (CAMEL_MEDIUM (msg), header, "Undisclosed-Recipient:;");
}
-
+
header = redirect ? CAMEL_RECIPIENT_TYPE_RESENT_CC : CAMEL_RECIPIENT_TYPE_CC;
if (camel_address_length (CAMEL_ADDRESS (cc_addr)) > 0) {
camel_mime_message_set_recipients (msg, header, cc_addr);
}
-
+
header = redirect ? CAMEL_RECIPIENT_TYPE_RESENT_BCC : CAMEL_RECIPIENT_TYPE_BCC;
if (camel_address_length (CAMEL_ADDRESS (bcc_addr)) > 0) {
camel_mime_message_set_recipients (msg, header, bcc_addr);
}
-
+
camel_object_unref (to_addr);
camel_object_unref (cc_addr);
camel_object_unref (bcc_addr);
@@ -1098,10 +1098,10 @@ e_msg_composer_hdrs_to_message_internal (EMsgComposerHdrs *hdrs,
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
g_return_if_fail (CAMEL_IS_MIME_MESSAGE (msg));
-
+
subject = e_msg_composer_hdrs_get_subject (hdrs);
camel_mime_message_set_subject (msg, subject);
-
+
addr = e_msg_composer_hdrs_get_from (hdrs);
if (redirect) {
header = camel_address_encode (CAMEL_ADDRESS (addr));
@@ -1111,27 +1111,27 @@ e_msg_composer_hdrs_to_message_internal (EMsgComposerHdrs *hdrs,
camel_mime_message_set_from (msg, addr);
}
camel_object_unref (addr);
-
+
addr = e_msg_composer_hdrs_get_reply_to (hdrs);
if (addr) {
camel_mime_message_set_reply_to (msg, addr);
camel_object_unref (addr);
}
-
+
if (hdrs->priv->to.visible || hdrs->priv->cc.visible || hdrs->priv->bcc.visible) {
to_destv = e_msg_composer_hdrs_get_to (hdrs);
cc_destv = e_msg_composer_hdrs_get_cc (hdrs);
bcc_destv = e_msg_composer_hdrs_get_bcc (hdrs);
-
+
/* Attach destinations to the message. */
-
+
set_recipients_from_destv (msg, to_destv, cc_destv, bcc_destv, redirect);
-
+
e_destination_freev (to_destv);
e_destination_freev (cc_destv);
e_destination_freev (bcc_destv);
}
-
+
if (hdrs->priv->post_to.visible) {
GList *post, *l;
@@ -1173,9 +1173,9 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
char *uid = NULL;
GSList *l;
int i = 0;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
+
omenu = GTK_OPTION_MENU (e_msg_composer_hdrs_get_from_omenu (hdrs));
if (!account_name) {
@@ -1183,13 +1183,13 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
uid = gconf_client_get_string (gconf, "/apps/evolution/mail/default_account", NULL);
g_object_unref (gconf);
}
-
+
/* find the item that represents the account and activate it */
l = hdrs->priv->from_options;
while (l) {
EAccount *account;
item = l->data;
-
+
account = g_object_get_data ((GObject *) item, "account");
if (account_can_send (account)) {
if (account_name) {
@@ -1198,7 +1198,7 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
gtk_option_menu_set_history (omenu, i);
g_signal_emit_by_name (item, "activate", hdrs);
g_free (uid);
-
+
return;
}
} else if (uid && !strcmp (account->uid, uid)) {
@@ -1206,14 +1206,14 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
gtk_option_menu_set_history (omenu, i);
g_signal_emit_by_name (item, "activate", hdrs);
g_free (uid);
-
+
return;
}
}
l = l->next;
i++;
}
-
+
g_free (uid);
}
@@ -1222,9 +1222,9 @@ e_msg_composer_hdrs_set_reply_to (EMsgComposerHdrs *hdrs,
const char *reply_to)
{
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
+
gtk_entry_set_text (GTK_ENTRY (hdrs->priv->reply_to.entry), reply_to ? reply_to : "");
-
+
if (reply_to && *reply_to)
set_pair_visibility (hdrs, &hdrs->priv->cc, TRUE);
}
@@ -1271,7 +1271,7 @@ e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
destinations_to_name_selector_entry (E_NAME_SELECTOR_ENTRY (hdrs->priv->cc.entry), cc_destv);
-
+
if (cc_destv && *cc_destv)
set_pair_visibility (hdrs, &hdrs->priv->cc, TRUE);
}
@@ -1283,7 +1283,7 @@ e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
destinations_to_name_selector_entry (E_NAME_SELECTOR_ENTRY (hdrs->priv->bcc.entry), bcc_destv);
-
+
if (bcc_destv && *bcc_destv)
set_pair_visibility (hdrs, &hdrs->priv->bcc, TRUE);
}
@@ -1294,14 +1294,14 @@ e_msg_composer_hdrs_set_post_to (EMsgComposerHdrs *hdrs,
const char *post_to)
{
GList *list;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
g_return_if_fail (post_to != NULL);
-
+
list = g_list_append (NULL, g_strdup (post_to));
-
+
e_msg_composer_hdrs_set_post_to_list (hdrs, list);
-
+
g_free (list->data);
g_list_free (list);
}
@@ -1310,22 +1310,22 @@ static GList *
newsgroups_list_split (const char *list)
{
GList *lst = NULL;
- char *tmp;
+ char *tmp;
char **items, **cur_ptr;
-
+
cur_ptr = items = g_strsplit (list, ",", 0);
-
+
while ((tmp = *cur_ptr) != NULL) {
g_strstrip (tmp);
-
+
if (tmp[0])
lst = g_list_append (lst, g_strdup (tmp));
-
+
cur_ptr++;
}
-
+
g_strfreev (items);
-
+
return lst;
}
@@ -1334,7 +1334,7 @@ get_account_store_url (EMsgComposerHdrs *hdrs)
{
CamelURL *url;
char *ret = NULL;
-
+
if (hdrs->account->source
&& hdrs->account->source->url
&& hdrs->account->source->url[0]
@@ -1342,27 +1342,27 @@ get_account_store_url (EMsgComposerHdrs *hdrs)
ret = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
camel_url_free (url);
}
-
+
return ret;
-}
+}
static char *
folder_name_to_string (EMsgComposerHdrs *hdrs, const char *uri)
{
char *storeurl = get_account_store_url (hdrs);
int len;
-
+
if (storeurl) {
len = strlen (storeurl);
-
+
if (g_ascii_strncasecmp (uri, storeurl, len) == 0) {
g_free (storeurl);
return g_strdup (uri + len);
}
-
+
g_free (storeurl);
}
-
+
return g_strdup (uri);
}
@@ -1372,7 +1372,7 @@ e_msg_composer_hdrs_set_post_to_list (EMsgComposerHdrs *hdrs, GList *urls)
GString *caption;
char *tmp;
gboolean post_custom;
-
+
if (hdrs->priv->post_to.entry == NULL)
return;
@@ -1384,10 +1384,10 @@ e_msg_composer_hdrs_set_post_to_list (EMsgComposerHdrs *hdrs, GList *urls)
g_string_append(caption, ", ");
g_string_append(caption, tmp);
}
-
+
urls = g_list_next (urls);
}
-
+
post_custom = hdrs->priv->post_custom;
gtk_entry_set_text(GTK_ENTRY(hdrs->priv->post_to.entry), caption->str);
hdrs->priv->post_custom = post_custom;
@@ -1402,11 +1402,11 @@ e_msg_composer_hdrs_set_post_to_base (EMsgComposerHdrs *hdrs, const char *base,
char *tmp, *tmp2;
gboolean post_custom;
GString *caption;
-
+
/* split to newsgroup names */
lst = newsgroups_list_split(post_to);
curlist = lst;
-
+
caption = g_string_new("");
while (curlist) {
/* FIXME: this doens't handle all folder names properly */
@@ -1420,7 +1420,7 @@ e_msg_composer_hdrs_set_post_to_base (EMsgComposerHdrs *hdrs, const char *base,
}
curlist = g_list_next(curlist);
}
-
+
post_custom = hdrs->priv->post_custom;
gtk_entry_set_text(GTK_ENTRY(hdrs->priv->post_to.entry), caption->str);
hdrs->priv->post_custom = post_custom;
@@ -1436,7 +1436,7 @@ e_msg_composer_hdrs_set_subject (EMsgComposerHdrs *hdrs,
{
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
g_return_if_fail (subject != NULL);
-
+
gtk_entry_set_text ((GtkEntry *) hdrs->priv->subject.entry, subject);
}
@@ -1448,15 +1448,15 @@ e_msg_composer_hdrs_get_from (EMsgComposerHdrs *hdrs)
EAccount *account;
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
if (!(account = hdrs->account)) {
/* FIXME: perhaps we should try the default account? */
return NULL;
}
-
+
addr = camel_internet_address_new ();
camel_internet_address_add (addr, account->id->name, account->id->address);
-
+
return addr;
}
@@ -1465,20 +1465,20 @@ e_msg_composer_hdrs_get_reply_to (EMsgComposerHdrs *hdrs)
{
CamelInternetAddress *addr;
const char *reply_to;
-
+
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
reply_to = gtk_entry_get_text (GTK_ENTRY (hdrs->priv->reply_to.entry));
-
+
if (!reply_to || *reply_to == '\0')
return NULL;
-
+
addr = camel_internet_address_new ();
if (camel_address_unformat (CAMEL_ADDRESS (addr), reply_to) == -1) {
camel_object_unref (CAMEL_OBJECT (addr));
return NULL;
}
-
+
return addr;
}
@@ -1510,7 +1510,7 @@ e_msg_composer_hdrs_get_internal (EMsgComposerHdrs *hdrs, ENameSelectorEntry *en
EDestinationStore *destination_store;
GList *destinations;
EDestination **destv = NULL;
-
+
destination_store = e_name_selector_entry_peek_destination_store (entry);
destinations = e_destination_store_list_destinations (destination_store);
@@ -1552,42 +1552,42 @@ e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs)
EDestination **bcc_destv;
EDestination **recip_destv;
int i, j, n;
-
+
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
to_destv = e_msg_composer_hdrs_get_to (hdrs);
cc_destv = e_msg_composer_hdrs_get_cc (hdrs);
bcc_destv = e_msg_composer_hdrs_get_bcc (hdrs);
-
+
n = 0;
-
+
for (i = 0; to_destv && to_destv[i] != NULL; i++, n++);
for (i = 0; cc_destv && cc_destv[i] != NULL; i++, n++);
for (i = 0; bcc_destv && bcc_destv[i] != NULL; i++, n++);
-
+
if (n == 0)
return NULL;
-
+
recip_destv = g_new (EDestination *, n + 1);
-
+
j = 0;
-
+
for (i = 0; to_destv && to_destv[i] != NULL; i++, j++)
recip_destv[j] = to_destv[i];
for (i = 0; cc_destv && cc_destv[i] != NULL; i++, j++)
recip_destv[j] = cc_destv[i];
for (i = 0; bcc_destv && bcc_destv[i] != NULL; i++, j++)
recip_destv[j] = bcc_destv[i];
-
+
if (j != n) {
g_warning ("j!=n \n");
}
recip_destv[j] = NULL;
-
+
g_free (to_destv);
g_free (cc_destv);
g_free (bcc_destv);
-
+
return recip_destv;
}
@@ -1597,16 +1597,16 @@ e_msg_composer_hdrs_get_post_to (EMsgComposerHdrs *hdrs)
{
GList *uris, *cur;
char *storeurl = NULL, *tmp;
-
+
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
if (hdrs->priv->post_to.entry == NULL)
return NULL;
-
+
tmp = g_strdup (gtk_entry_get_text (GTK_ENTRY (hdrs->priv->post_to.entry)));
uris = newsgroups_list_split (tmp);
g_free (tmp);
-
+
cur = uris;
while (cur) {
/* FIXME: this is a bit of a hack, should use camelurl's etc */
@@ -1620,12 +1620,12 @@ e_msg_composer_hdrs_get_post_to (EMsgComposerHdrs *hdrs)
g_free (cur->data);
cur->data = tmp;
}
-
+
cur = cur->next;
}
-
+
g_free (storeurl);
-
+
return uris;
}
@@ -1634,7 +1634,7 @@ const char *
e_msg_composer_hdrs_get_subject (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
return gtk_entry_get_text ((GtkEntry *) hdrs->priv->subject.entry);
}
@@ -1643,7 +1643,7 @@ GtkWidget *
e_msg_composer_hdrs_get_reply_to_entry (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
return hdrs->priv->reply_to.entry;
}
@@ -1651,7 +1651,7 @@ GtkWidget *
e_msg_composer_hdrs_get_to_entry (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
return hdrs->priv->to.entry;
}
@@ -1659,7 +1659,7 @@ GtkWidget *
e_msg_composer_hdrs_get_cc_entry (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
return hdrs->priv->cc.entry;
}
@@ -1667,7 +1667,7 @@ GtkWidget *
e_msg_composer_hdrs_get_bcc_entry (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
return hdrs->priv->bcc.entry;
}
@@ -1675,7 +1675,7 @@ GtkWidget *
e_msg_composer_hdrs_get_post_to_label (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
return hdrs->priv->post_to.entry;
}
@@ -1683,7 +1683,7 @@ GtkWidget *
e_msg_composer_hdrs_get_subject_entry (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
return hdrs->priv->subject.entry;
}
@@ -1691,7 +1691,7 @@ GtkWidget *
e_msg_composer_hdrs_get_from_hbox (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
return hdrs->priv->from.entry;
}
@@ -1699,7 +1699,7 @@ GtkWidget *
e_msg_composer_hdrs_get_from_omenu (EMsgComposerHdrs *hdrs)
{
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
+
return GTK_WIDGET (g_object_get_data ((GObject *) hdrs->priv->from.entry, "from_menu"));
}
diff --git a/composer/e-msg-composer-hdrs.h b/composer/e-msg-composer-hdrs.h
index 2888c5daa7..919400167d 100644
--- a/composer/e-msg-composer-hdrs.h
+++ b/composer/e-msg-composer-hdrs.h
@@ -51,13 +51,13 @@ typedef struct _EMsgComposerHdrsPrivate EMsgComposerHdrsPrivate;
struct _EMsgComposerHdrs {
GtkTable parent;
-
+
EMsgComposerHdrsPrivate *priv;
-
+
EAccount *account;
-
+
guint32 visible_mask;
-
+
gboolean has_changed;
};
diff --git a/composer/e-msg-composer-select-file.c b/composer/e-msg-composer-select-file.c
index 1d02f2bd8a..4cf92a661e 100644
--- a/composer/e-msg-composer-select-file.c
+++ b/composer/e-msg-composer-select-file.c
@@ -59,9 +59,9 @@ get_selector(struct _EMsgComposer *composer, const char *title, guint32 flags)
GtkWidget *showinline = NULL;
GList *icon_list;
char *path;
-
+
path = g_object_get_data ((GObject *) composer, "attach_path");
-
+
if (flags & SELECTOR_MODE_SAVE)
selection = gtk_file_chooser_dialog_new (title,
NULL,
@@ -76,37 +76,37 @@ get_selector(struct _EMsgComposer *composer, const char *title, guint32 flags)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
_("A_ttach"), GTK_RESPONSE_OK,
NULL);
-
+
gtk_dialog_set_default_response (GTK_DIALOG (selection), GTK_RESPONSE_OK);
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (selection), FALSE);
-
+
if ((flags & SELECTOR_MODE_SAVE) == 0)
gtk_file_chooser_set_select_multiple ((GtkFileChooser *) selection, (flags & SELECTOR_MODE_MULTI));
-
+
/* restore last path used */
if (!path)
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (selection), g_get_home_dir ());
else
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (selection), path);
-
+
if (flags & SELECTOR_SHOW_INLINE) {
showinline = gtk_check_button_new_with_mnemonic (_("_Suggest automatic display of attachment"));
gtk_widget_show (showinline);
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (selection), showinline);
g_object_set_data((GObject *)selection, "show-inline", showinline);
}
-
+
gtk_window_set_transient_for ((GtkWindow *) selection, (GtkWindow *) composer);
gtk_window_set_wmclass ((GtkWindow *) selection, "fileselection", "Evolution:composer");
gtk_window_set_modal ((GtkWindow *) selection, FALSE);
-
+
icon_list = e_icon_factory_get_icon_list ("mail-message-new");
if (icon_list) {
gtk_window_set_icon_list (GTK_WINDOW (selection), icon_list);
g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
g_list_free (icon_list);
}
-
+
return selection;
}
@@ -143,7 +143,7 @@ select_file_response(GtkWidget *selector, guint response, struct _EMsgComposer *
void e_msg_composer_select_file(struct _EMsgComposer *composer, GtkWidget **w, EMsgComposerSelectFileFunc func, const char *title, int save)
{
if (*w) {
- gtk_window_present((GtkWindow *)*w);
+ gtk_window_present((GtkWindow *)*w);
return;
}
@@ -163,7 +163,7 @@ select_attach_response(GtkWidget *selector, guint response, struct _EMsgComposer
EMsgComposerSelectAttachFunc func = g_object_get_data((GObject *)selector, "callback");
GtkToggleButton *showinline = g_object_get_data((GObject *)selector, "show-inline");
char *path = NULL;
-
+
char *filename = NULL;
names = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (selector));
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selector));
@@ -175,7 +175,7 @@ select_attach_response(GtkWidget *selector, guint response, struct _EMsgComposer
g_object_set_data_full ((GObject *) composer, "attach_path", path, g_free);
func(composer, names, gtk_toggle_button_get_active(showinline));
-
+
e_msg_composer_show_attachments_ui (composer);
@@ -189,7 +189,7 @@ select_attach_response(GtkWidget *selector, guint response, struct _EMsgComposer
void e_msg_composer_select_file_attachments(struct _EMsgComposer *composer, GtkWidget **w, EMsgComposerSelectAttachFunc func)
{
if (*w) {
- gtk_window_present((GtkWindow *)*w);
+ gtk_window_present((GtkWindow *)*w);
return;
}
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index f5b639dde0..eb4cac1e8b 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -23,7 +23,7 @@
* Jeffrey Stedfast (fejj@ximian.com)
* Miguel de Icaza (miguel@ximian.com)
* Radek Doulik (rodo@ximian.com)
- *
+ *
*/
/*
@@ -86,7 +86,7 @@
#include "misc/e-expander.h"
#include "e-util/e-error.h"
#include "e-util/e-util-private.h"
-#include <mail/em-event.h>
+#include <mail/em-event.h>
#include <camel/camel-session.h>
#include <camel/camel-charset-map.h>
@@ -138,13 +138,13 @@ typedef struct _EMsgComposerPrivate EMsgComposerPrivate;
struct _EMsgComposer {
BonoboWindow parent;
-
+
EMsgComposerPrivate *priv;
};
struct _EMsgComposerClass {
BonoboWindowClass parent_class;
-
+
void (* send) (EMsgComposer *composer);
void (* save_draft) (EMsgComposer *composer, int quit);
};
@@ -158,36 +158,36 @@ struct _EMsgComposerPrivate {
/* UIComponent for the non-control GtkEntries */
BonoboUIComponent *entry_uic;
-
+
GtkWidget *hdrs;
GPtrArray *extra_hdr_names, *extra_hdr_values;
-
+
GtkWidget *focused_entry;
-
+
GtkWidget *eeditor;
-
+
GtkWidget *attachment_bar;
GtkWidget *attachment_scrolled_window;
GtkWidget *attachment_expander;
GtkWidget *attachment_expander_label;
GtkWidget *attachment_expander_icon;
GtkWidget *attachment_expander_num;
-
+
GtkWidget *address_dialog;
-
+
Bonobo_PersistFile persist_file_interface;
Bonobo_PersistStream persist_stream_interface;
GNOME_GtkHTML_Editor_Engine eeditor_engine;
BonoboObject *eeditor_listener;
GHashTable *inline_images, *inline_images_by_url;
GList *current_images;
-
+
char *mime_type, *mime_body, *charset;
-
+
char *autosave_file;
int autosave_fd;
guint32 enable_autosave : 1;
-
+
guint32 attachment_bar_visible : 1;
guint32 send_html : 1;
guint32 is_alternative : 1;
@@ -206,22 +206,22 @@ struct _EMsgComposerPrivate {
guint32 set_priority : 1;
guint32 has_changed : 1;
guint32 autosaved : 1;
-
+
guint32 mode_post : 1;
-
+
guint32 in_signature_insert : 1;
-
+
struct _ESignature *signature;
struct _GtkOptionMenu *sig_menu;
guint sig_added_id;
guint sig_removed_id;
guint sig_changed_id;
-
+
CamelMimeMessage *redirect;
-
+
guint notify_id;
- gboolean send_invoked;
+ gboolean send_invoked;
EMMenu *menu;
GtkWidget *saveas; /* saveas async file requester */
@@ -306,13 +306,13 @@ destination_list_to_vector_sized (GList *list, int n)
{
EDestination **destv;
int i = 0;
-
+
if (n == -1)
n = g_list_length (list);
-
+
if (n == 0)
return NULL;
-
+
destv = g_new (EDestination *, n + 1);
while (list != NULL && i < n) {
destv[i] = E_DESTINATION (list->data);
@@ -321,7 +321,7 @@ destination_list_to_vector_sized (GList *list, int n)
list = g_list_next (list);
}
destv[i] = NULL;
-
+
return destv;
}
@@ -338,9 +338,9 @@ get_text (Bonobo_PersistStream persist, char *format)
BonoboStreamMem *stream_mem;
CORBA_Environment ev;
GByteArray *text;
-
+
CORBA_exception_init (&ev);
-
+
stream = bonobo_stream_mem_create (NULL, 0, FALSE, TRUE);
Bonobo_PersistStream_save (persist, (Bonobo_Stream)bonobo_object_corba_objref (BONOBO_OBJECT (stream)),
format, &ev);
@@ -349,14 +349,14 @@ get_text (Bonobo_PersistStream persist, char *format)
bonobo_exception_get_text (&ev));
return NULL;
}
-
+
CORBA_exception_free (&ev);
-
+
stream_mem = BONOBO_STREAM_MEM (stream);
text = g_byte_array_new ();
g_byte_array_append (text, (const guint8 *)stream_mem->buffer, stream_mem->pos);
bonobo_object_unref (BONOBO_OBJECT (stream));
-
+
return text;
}
@@ -369,14 +369,14 @@ best_encoding (GByteArray *buf, const char *charset)
size_t inlen, outlen;
int status, count = 0;
iconv_t cd;
-
+
if (!charset)
return -1;
-
+
cd = e_iconv_open (charset, "utf-8");
if (cd == (iconv_t) -1)
return -1;
-
+
in = (char*)buf->data;
inlen = buf->len;
do {
@@ -389,10 +389,10 @@ best_encoding (GByteArray *buf, const char *charset)
}
} while (status == (size_t) -1 && errno == E2BIG);
e_iconv_close (cd);
-
+
if (status == (size_t) -1 || status > 0)
return -1;
-
+
if (count == 0)
return CAMEL_TRANSFER_ENCODING_7BIT;
else if (count <= buf->len * 0.17)
@@ -407,10 +407,10 @@ composer_get_default_charset_setting (void)
GConfClient *gconf;
const char *locale;
char *charset;
-
+
gconf = gconf_client_get_default ();
charset = gconf_client_get_string (gconf, "/apps/evolution/mail/composer/charset", NULL);
-
+
if (!charset || charset[0] == '\0') {
g_free (charset);
charset = gconf_client_get_string (gconf, "/apps/evolution/mail/format/charset", NULL);
@@ -419,12 +419,12 @@ composer_get_default_charset_setting (void)
charset = NULL;
}
}
-
+
g_object_unref (gconf);
-
+
if (!charset && (locale = e_iconv_locale_charset ()))
charset = g_strdup (locale);
-
+
return charset ? charset : g_strdup ("us-ascii");
}
@@ -432,31 +432,31 @@ static char *
best_charset (GByteArray *buf, const char *default_charset, CamelTransferEncoding *encoding)
{
char *charset;
-
+
/* First try US-ASCII */
*encoding = best_encoding (buf, "US-ASCII");
if (*encoding == CAMEL_TRANSFER_ENCODING_7BIT)
return NULL;
-
+
/* Next try the user-specified charset for this message */
*encoding = best_encoding (buf, default_charset);
if (*encoding != -1)
return g_strdup (default_charset);
-
+
/* Now try the user's default charset from the mail config */
charset = composer_get_default_charset_setting ();
*encoding = best_encoding (buf, charset);
if (*encoding != -1)
return charset;
-
+
/* Try to find something that will work */
if (!(charset = (char *) camel_charset_best ((const gchar *)buf->data, buf->len))) {
*encoding = CAMEL_TRANSFER_ENCODING_7BIT;
return NULL;
}
-
+
*encoding = best_encoding (buf, charset);
-
+
return g_strdup (charset);
}
@@ -522,17 +522,17 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
GByteArray *data;
char *charset;
int i;
-
+
if (p->persist_stream_interface == CORBA_OBJECT_NIL)
return NULL;
-
+
/* evil kludgy hack for Redirect */
if (p->redirect) {
e_msg_composer_hdrs_to_redirect (hdrs, p->redirect);
camel_object_ref (p->redirect);
return p->redirect;
}
-
+
new = camel_mime_message_new ();
e_msg_composer_hdrs_to_message (hdrs, new);
for (i = 0; i < p->extra_hdr_names->len; i++) {
@@ -546,14 +546,14 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
char *mdn_address = hdrs->account->id->reply_to;
if (!mdn_address || !*mdn_address)
mdn_address = hdrs->account->id->address;
-
+
camel_medium_add_header (CAMEL_MEDIUM (new), "Disposition-Notification-To", mdn_address);
}
/* Message Priority */
- if (p->set_priority)
+ if (p->set_priority)
camel_medium_add_header (CAMEL_MEDIUM (new), "X-Priority", "1");
-
+
if (p->mime_body) {
plain_encoding = CAMEL_TRANSFER_ENCODING_7BIT;
for (i = 0; p->mime_body[i]; i++) {
@@ -572,7 +572,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
camel_object_unref (CAMEL_OBJECT (new));
return NULL;
}
-
+
/* FIXME: we may want to do better than this... */
type = camel_content_type_new ("text", "plain");
@@ -582,35 +582,35 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
g_free (charset);
}
}
-
+
stream = camel_stream_mem_new_with_byte_array (data);
-
+
/* convert the stream to the appropriate charset */
if (iconv_charset && g_ascii_strcasecmp (iconv_charset, "UTF-8") != 0) {
CamelStreamFilter *filter_stream;
CamelMimeFilterCharset *filter;
-
+
filter_stream = camel_stream_filter_new_with_stream (stream);
camel_object_unref (stream);
-
+
stream = (CamelStream *) filter_stream;
filter = camel_mime_filter_charset_new_convert ("UTF-8", iconv_charset);
camel_stream_filter_add (filter_stream, (CamelMimeFilter *) filter);
camel_object_unref (filter);
}
-
+
/* construct the content object */
plain = camel_data_wrapper_new ();
camel_data_wrapper_construct_from_stream (plain, stream);
camel_object_unref (stream);
-
+
camel_data_wrapper_set_mime_type_field (plain, type);
camel_content_type_unref (type);
-
+
if (p->send_html) {
CORBA_Environment ev;
clear_current_images (composer);
-
+
if (save_html_object_data) {
CORBA_exception_init (&ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "save-data-on", &ev);
@@ -620,79 +620,79 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "save-data-off", &ev);
CORBA_exception_free (&ev);
}
-
+
if (!data) {
/* The component has probably died */
camel_object_unref (new);
camel_object_unref (plain);
return NULL;
}
-
+
html = camel_data_wrapper_new ();
-
+
stream = camel_stream_mem_new_with_byte_array (data);
camel_data_wrapper_construct_from_stream (html, stream);
camel_object_unref (stream);
camel_data_wrapper_set_mime_type (html, "text/html; charset=utf-8");
-
+
/* Build the multipart/alternative */
body = camel_multipart_new ();
camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (body),
"multipart/alternative");
camel_multipart_set_boundary (body, NULL);
-
+
part = camel_mime_part_new ();
camel_medium_set_content_object (CAMEL_MEDIUM (part), plain);
camel_object_unref (plain);
camel_mime_part_set_encoding (part, plain_encoding);
camel_multipart_add_part (body, part);
camel_object_unref (part);
-
+
part = camel_mime_part_new ();
camel_medium_set_content_object (CAMEL_MEDIUM (part), html);
camel_object_unref (html);
camel_multipart_add_part (body, part);
camel_object_unref (part);
-
+
/* If there are inlined images, construct a
* multipart/related containing the
* multipart/alternative and the images.
*/
if (p->current_images) {
CamelMultipart *html_with_images;
-
+
html_with_images = camel_multipart_new ();
camel_data_wrapper_set_mime_type (
CAMEL_DATA_WRAPPER (html_with_images),
"multipart/related; type=\"multipart/alternative\"");
camel_multipart_set_boundary (html_with_images, NULL);
-
+
part = camel_mime_part_new ();
camel_medium_set_content_object (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER (body));
camel_object_unref (body);
camel_multipart_add_part (html_with_images, part);
camel_object_unref (part);
-
+
add_inlined_images (composer, html_with_images);
clear_current_images (composer);
-
+
current = CAMEL_DATA_WRAPPER (html_with_images);
} else
current = CAMEL_DATA_WRAPPER (body);
} else
current = plain;
-
+
if (e_attachment_bar_get_num_attachments (attachment_bar)) {
CamelMultipart *multipart = camel_multipart_new ();
-
+
if (p->is_alternative) {
camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (multipart),
"multipart/alternative");
}
-
+
/* Generate a random boundary. */
camel_multipart_set_boundary (multipart, NULL);
-
+
part = camel_mime_part_new ();
camel_medium_set_content_object (CAMEL_MEDIUM (part), current);
if (current == plain)
@@ -700,19 +700,19 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
camel_object_unref (current);
camel_multipart_add_part (multipart, part);
camel_object_unref (part);
-
+
e_attachment_bar_to_multipart (attachment_bar, multipart, p->charset);
-
+
if (p->is_alternative) {
for (i = camel_multipart_get_number (multipart); i > 1; i--) {
part = camel_multipart_get_part (multipart, i - 1);
camel_medium_remove_header (CAMEL_MEDIUM (part), "Content-Disposition");
}
}
-
+
current = CAMEL_DATA_WRAPPER (multipart);
}
-
+
camel_exception_init (&ex);
/* Setup working recipient list if we're encrypting */
@@ -735,7 +735,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
}
}
-
+
if (p->pgp_sign || p->pgp_encrypt) {
const char *pgp_userid;
CamelInternetAddress *from = NULL;
@@ -753,14 +753,14 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
from = e_msg_composer_hdrs_get_from(hdrs);
camel_internet_address_get(from, 0, NULL, &pgp_userid);
}
-
+
if (p->pgp_sign) {
CamelMimePart *npart = camel_mime_part_new();
cipher = mail_crypto_get_pgp_cipher_context(hdrs->account);
camel_cipher_sign(cipher, pgp_userid, CAMEL_CIPHER_HASH_SHA1, part, npart, &ex);
camel_object_unref(cipher);
-
+
if (camel_exception_is_set(&ex)) {
camel_object_unref(npart);
goto exception;
@@ -769,7 +769,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
camel_object_unref(part);
part = npart;
}
-
+
if (p->pgp_encrypt) {
CamelMimePart *npart = camel_mime_part_new();
@@ -794,13 +794,13 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
}
if (from)
- camel_object_unref (from);
-
+ camel_object_unref (from);
+
current = camel_medium_get_content_object (CAMEL_MEDIUM (part));
camel_object_ref (current);
camel_object_unref (part);
}
-
+
#if defined (HAVE_NSS) && defined (SMIME_SUPPORTED)
if (p->smime_sign || p->smime_encrypt) {
CamelInternetAddress *from = NULL;
@@ -818,7 +818,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
_("Cannot sign outgoing message: No signing certificate set for this account"));
goto exception;
}
-
+
if (p->smime_encrypt
&& (hdrs->account == NULL || hdrs->account->smime_sign_key == NULL || hdrs->account->smime_sign_key[0] == 0)) {
camel_exception_set (&ex, CAMEL_EXCEPTION_SYSTEM,
@@ -841,7 +841,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
camel_cipher_sign(cipher, hdrs->account->smime_sign_key, CAMEL_CIPHER_HASH_SHA1, part, npart, &ex);
camel_object_unref(cipher);
-
+
if (camel_exception_is_set(&ex)) {
camel_object_unref(npart);
goto exception;
@@ -850,7 +850,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data)
camel_object_unref(part);
part = npart;
}
-
+
if (p->smime_encrypt) {
/* check to see if we should encrypt to self, NB removed after use */
if (hdrs->account->smime_encrypt_to_self)
@@ -901,16 +901,16 @@ skip_content:
/* Attach whether this message was written in HTML */
camel_medium_set_header (CAMEL_MEDIUM (new), "X-Evolution-Format",
p->send_html ? "text/html" : "text/plain");
-
+
return new;
-
+
exception:
-
+
if (part != CAMEL_MIME_PART (new))
camel_object_unref (part);
-
+
camel_object_unref (new);
-
+
if (ex.id != CAMEL_EXCEPTION_USER_CANCEL) {
e_error_run((GtkWindow *)composer, "mail-composer:no-build-message",
camel_exception_get_description(&ex), NULL);
@@ -923,7 +923,7 @@ skip_content:
g_free(recipients->pdata[i]);
g_ptr_array_free(recipients, TRUE);
}
-
+
return NULL;
}
@@ -939,7 +939,7 @@ get_file_content (EMsgComposer *composer, const char *file_name, gboolean want_h
char *charset;
char *content;
int fd;
-
+
fd = g_open (file_name, O_RDONLY, 0);
if (fd == -1) {
if (warn)
@@ -947,27 +947,27 @@ get_file_content (EMsgComposer *composer, const char *file_name, gboolean want_h
file_name, g_strerror(errno), NULL);
return g_strdup ("");
}
-
+
stream = camel_stream_fs_new_with_fd (fd);
-
+
if (want_html) {
filtered_stream = camel_stream_filter_new_with_stream (stream);
camel_object_unref (stream);
-
+
html = camel_mime_filter_tohtml_new (flags, 0);
camel_stream_filter_add (filtered_stream, html);
camel_object_unref (html);
-
+
stream = (CamelStream *) filtered_stream;
}
-
+
memstream = (CamelStreamMem *) camel_stream_mem_new ();
buffer = g_byte_array_new ();
camel_stream_mem_set_byte_array (memstream, buffer);
-
+
camel_stream_write_to_stream (stream, (CamelStream *) memstream);
camel_object_unref (stream);
-
+
/* The newer signature UI saves signatures in UTF-8, but we still need to check that
the signature is valid UTF-8 because it is possible that the user imported a
signature file that is in his/her locale charset. If it's not in UTF-8 and not in
@@ -977,32 +977,32 @@ get_file_content (EMsgComposer *composer, const char *file_name, gboolean want_h
stream = (CamelStream *) memstream;
memstream = (CamelStreamMem *) camel_stream_mem_new ();
camel_stream_mem_set_byte_array (memstream, g_byte_array_new ());
-
+
filtered_stream = camel_stream_filter_new_with_stream (stream);
camel_object_unref (stream);
-
+
charset = composer && composer->priv->charset ? composer->priv->charset : NULL;
charset = charset ? g_strdup (charset) : composer_get_default_charset_setting ();
if ((charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "UTF-8"))) {
camel_stream_filter_add (filtered_stream, charenc);
camel_object_unref (charenc);
}
-
+
g_free (charset);
-
+
camel_stream_write_to_stream ((CamelStream *) filtered_stream, (CamelStream *) memstream);
camel_object_unref (filtered_stream);
g_byte_array_free (buffer, TRUE);
-
+
buffer = memstream->buffer;
}
-
+
camel_object_unref (memstream);
-
+
g_byte_array_append (buffer, (const guint8 *)"", 1);
content = (char*)buffer->data;
g_byte_array_free (buffer, FALSE);
-
+
return content;
}
@@ -1012,7 +1012,7 @@ e_msg_composer_get_sig_file_content (const char *sigfile, gboolean in_html)
if (!sigfile || !*sigfile) {
return NULL;
}
-
+
return get_file_content (NULL, sigfile, !in_html,
CAMEL_MIME_FILTER_TOHTML_PRESERVE_8BIT |
CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS |
@@ -1026,16 +1026,16 @@ prepare_engine (EMsgComposer *composer)
{
CORBA_Environment ev;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
/* printf ("prepare_engine\n"); */
-
+
CORBA_exception_init (&ev);
p->eeditor_engine = (GNOME_GtkHTML_Editor_Engine) Bonobo_Unknown_queryInterface
(bonobo_widget_get_objref (BONOBO_WIDGET (p->eeditor)), "IDL:GNOME/GtkHTML/Editor/Engine:1.0", &ev);
if ((p->eeditor_engine != CORBA_OBJECT_NIL) && (ev._major == CORBA_NO_EXCEPTION)) {
-
+
/* printf ("trying set listener\n"); */
p->eeditor_listener = BONOBO_OBJECT (listener_new (composer));
if (p->eeditor_listener != NULL)
@@ -1045,12 +1045,12 @@ prepare_engine (EMsgComposer *composer)
(bonobo_object_corba_objref (p->eeditor_listener),
&ev),
&ev);
-
+
if ((ev._major != CORBA_NO_EXCEPTION) || (p->eeditor_listener == NULL)) {
CORBA_Environment err_ev;
CORBA_exception_init (&err_ev);
-
+
Bonobo_Unknown_unref (p->eeditor_engine, &err_ev);
CORBA_Object_release (p->eeditor_engine, &err_ev);
@@ -1108,7 +1108,7 @@ encode_signature_name (const char *name)
s ++;
}
*e = 0;
-
+
return ename;
}
@@ -1165,16 +1165,16 @@ get_signature_html (EMsgComposer *composer)
EMsgComposerPrivate *p = composer->priv;
char *text = NULL, *html = NULL;
gboolean format_html;
-
+
if (!p->signature)
return NULL;
-
+
if (!p->signature->autogen) {
if (!p->signature->filename)
return NULL;
-
+
format_html = p->signature->html;
-
+
if (p->signature->script) {
text = mail_config_signature_run_script (p->signature->filename);
} else {
@@ -1185,12 +1185,12 @@ get_signature_html (EMsgComposer *composer)
char *organization;
char *address;
char *name;
-
+
id = E_MSG_COMPOSER_HDRS (p->hdrs)->account->id;
address = id->address ? camel_text_to_html (id->address, CONVERT_SPACES, 0) : NULL;
name = id->name ? camel_text_to_html (id->name, CONVERT_SPACES, 0) : NULL;
organization = id->organization ? camel_text_to_html (id->organization, CONVERT_SPACES, 0) : NULL;
-
+
text = g_strdup_printf ("-- <BR>%s%s%s%s%s%s%s%s",
name ? name : "",
(address && *address) ? " &lt;<A HREF=\"mailto:" : "",
@@ -1205,14 +1205,14 @@ get_signature_html (EMsgComposer *composer)
g_free (organization);
format_html = TRUE;
}
-
+
/* printf ("text: %s\n", text); */
if (text) {
char *encoded_uid = NULL;
-
+
if (p->signature)
encoded_uid = encode_signature_name (p->signature->uid);
-
+
/* The signature dash convention ("-- \n") is specified in the
* "Son of RFC 1036": http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html,
* section 4.3.2.
@@ -1231,7 +1231,7 @@ get_signature_html (EMsgComposer *composer)
g_free (encoded_uid);
text = html;
}
-
+
return text;
}
@@ -1248,22 +1248,22 @@ set_editor_text(EMsgComposer *composer, const char *text, ssize_t len, int set_s
GConfClient *gconf;
g_return_if_fail (p->persist_stream_interface != CORBA_OBJECT_NIL);
-
+
persist = p->persist_stream_interface;
-
+
CORBA_exception_init (&ev);
-
+
gconf = gconf_client_get_default ();
-
- /*
- Keeping Signatures in the beginning of composer
+ /*
+
+ Keeping Signatures in the beginning of composer
------------------------------------------------
- Purists are gonna blast me for this.
- But there are so many people (read Outlook users) who want this.
+ Purists are gonna blast me for this.
+ But there are so many people (read Outlook users) who want this.
And Evo is an exchange-client, Outlook-replacement etc.
- So Here it goes :(
+ So Here it goes :(
-- Sankar
@@ -1279,7 +1279,7 @@ set_editor_text(EMsgComposer *composer, const char *text, ssize_t len, int set_s
if (tmp) {
/* Minimizing the damage. Make it just a part of the body instead of a signature */
html = strstr (tmp, "-- \n");
- if (html) {
+ if (html) {
/* That two consecutive - symbols followed by a space */
*(html+1) = ' ';
body = g_strdup_printf ("</br>%s</br>%s", tmp, text);
@@ -1311,11 +1311,11 @@ set_editor_text(EMsgComposer *composer, const char *text, ssize_t len, int set_s
CORBA_exception_free (&ev);
return;
}
-
+
CORBA_exception_free (&ev);
-
+
bonobo_object_unref (BONOBO_OBJECT (stream));
-
+
if (set_signature && !reply_signature_on_top)
e_msg_composer_show_sig_file (composer);
}
@@ -1323,18 +1323,18 @@ set_editor_text(EMsgComposer *composer, const char *text, ssize_t len, int set_s
/* Commands. */
static void
-show_attachments (EMsgComposer *composer,
- gboolean show)
+show_attachments (EMsgComposer *composer,
+ gboolean show)
{
EMsgComposerPrivate *p = composer->priv;
e_expander_set_expanded (E_EXPANDER (p->attachment_expander), show);
- if (show)
- gtk_label_set_text_with_mnemonic (GTK_LABEL (composer->priv->attachment_expander_label),
- _("Hide _Attachment Bar"));
- else
- gtk_label_set_text_with_mnemonic (GTK_LABEL (composer->priv->attachment_expander_label),
- _("Show _Attachment Bar"));
+ if (show)
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (composer->priv->attachment_expander_label),
+ _("Hide _Attachment Bar"));
+ else
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (composer->priv->attachment_expander_label),
+ _("Show _Attachment Bar"));
}
static void
@@ -1343,12 +1343,12 @@ save (EMsgComposer *composer, const char *filename)
EMsgComposerPrivate *p = composer->priv;
CORBA_Environment ev;
int fd;
-
+
/* check to see if we already have the file and that we can create it */
if ((fd = g_open (filename, O_RDONLY | O_CREAT | O_EXCL, 0777)) == -1) {
int resp, errnosav = errno;
struct stat st;
-
+
if (g_stat (filename, &st) == 0 && S_ISREG (st.st_mode)) {
resp = e_error_run((GtkWindow *)composer, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, filename, NULL);
if (resp != GTK_RESPONSE_OK)
@@ -1359,11 +1359,11 @@ save (EMsgComposer *composer, const char *filename)
}
} else
close (fd);
-
+
CORBA_exception_init (&ev);
-
+
Bonobo_PersistFile_save (p->persist_file_interface, filename, &ev);
-
+
if (ev._major != CORBA_NO_EXCEPTION) {
e_error_run((GtkWindow *)composer, E_ERROR_NO_SAVE_FILE,
filename, _("Unknown reason"));
@@ -1393,15 +1393,15 @@ load (EMsgComposer *composer, const char *file_name)
{
EMsgComposerPrivate *p = composer->priv;
CORBA_Environment ev;
-
+
CORBA_exception_init (&ev);
-
+
Bonobo_PersistFile_load (p->persist_file_interface, file_name, &ev);
-
+
if (ev._major != CORBA_NO_EXCEPTION)
e_error_run((GtkWindow *)composer, E_ERROR_NO_LOAD_FILE,
file_name, _("Unknown reason"), NULL);
-
+
CORBA_exception_free (&ev);
}
@@ -1428,28 +1428,28 @@ autosave_save_draft (EMsgComposer *composer)
char *file;
int fd, camelfd;
gboolean success = TRUE;
-
+
if (!e_msg_composer_is_dirty (composer))
return TRUE;
fd = p->autosave_fd;
file = p->autosave_file;
-
+
if (fd == -1) {
/* This code is odd, the fd is opened elsewhere but a failure is ignored */
e_error_run((GtkWindow *)composer, "mail-composer:no-autosave",
file, _("Could not open file"), NULL);
return FALSE;
}
-
+
message = e_msg_composer_get_message_draft (composer);
-
+
if (message == NULL) {
e_error_run((GtkWindow *)composer, "mail-composer:no-autosave",
file, _("Unable to retrieve message from editor"), NULL);
return FALSE;
}
-
+
if (lseek (fd, (off_t)0, SEEK_SET) == -1
|| ftruncate (fd, (off_t)0) == -1
|| (camelfd = dup(fd)) == -1) {
@@ -1458,7 +1458,7 @@ autosave_save_draft (EMsgComposer *composer)
file, g_strerror(errno), NULL);
return FALSE;
}
-
+
/* this does an lseek so we don't have to */
stream = camel_stream_fs_new_with_fd (camelfd);
if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), stream) == -1
@@ -1474,46 +1474,46 @@ autosave_save_draft (EMsgComposer *composer)
e_msg_composer_unset_changed (composer);
e_msg_composer_set_autosaved (composer);
}
-
+
camel_object_unref (stream);
-
+
camel_object_unref (message);
-
+
return success;
}
-static EMsgComposer *
+static EMsgComposer *
autosave_load_draft (const char *filename)
{
CamelStream *stream;
CamelMimeMessage *msg;
EMsgComposer *composer;
-
+
g_return_val_if_fail (filename != NULL, NULL);
-
+
g_warning ("autosave load filename = \"%s\"", filename);
-
+
if (!(stream = camel_stream_fs_new_with_name (filename, O_RDONLY, 0)))
return NULL;
-
+
msg = camel_mime_message_new ();
camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg), stream);
camel_object_unref (stream);
-
+
composer = e_msg_composer_new_with_message (msg);
if (composer) {
if (autosave_save_draft (composer))
g_unlink (filename);
-
+
g_signal_connect (GTK_OBJECT (composer), "send",
G_CALLBACK (em_utils_composer_send_cb), NULL);
-
+
g_signal_connect (GTK_OBJECT (composer), "save-draft",
G_CALLBACK (em_utils_composer_save_draft_cb), NULL);
-
+
gtk_widget_show (GTK_WIDGET (composer));
}
-
+
return composer;
}
@@ -1538,7 +1538,7 @@ autosave_manager_query_load_orphans (AutosaveManager *am, GtkWindow *parent)
if (!dir) {
return;
}
-
+
while ((dname = g_dir_read_name (dir))) {
if ((!strncmp (dname, AUTOSAVE_SEED, len - 6))
&& (strlen (dname) == len)
@@ -1547,9 +1547,9 @@ autosave_manager_query_load_orphans (AutosaveManager *am, GtkWindow *parent)
struct stat st;
filename = g_build_filename (dirname, dname, NULL);
-
+
/*
- * check if the file has any length, It is a valid case if it doesn't
+ * check if the file has any length, It is a valid case if it doesn't
* so we simply don't ask then.
*/
if (g_stat (filename, &st) == -1 || st.st_size == 0) {
@@ -1557,32 +1557,32 @@ autosave_manager_query_load_orphans (AutosaveManager *am, GtkWindow *parent)
g_free (filename);
continue;
}
- match = g_slist_prepend (match, filename);
+ match = g_slist_prepend (match, filename);
}
}
-
+
g_dir_close (dir);
g_free (dirname);
-
+
if (match != NULL)
load = e_error_run(parent, "mail-composer:recover-autosave", NULL) == GTK_RESPONSE_YES;
-
+
while (match != NULL) {
GSList *next = match->next;
char *filename = match->data;
EMsgComposer *composer;
-
+
if (load) {
- /* FIXME: composer is never used */
+ /* FIXME: composer is never used */
composer = autosave_load_draft (filename);
} else {
g_unlink (filename);
}
-
+
g_free (filename);
g_slist_free_1 (match);
match = next;
- }
+ }
}
static void
@@ -1590,7 +1590,7 @@ autosave_run_foreach_cb (gpointer key, gpointer value, gpointer data)
{
EMsgComposer *composer = E_MSG_COMPOSER (value);
EMsgComposerPrivate *p = composer->priv;
-
+
if (p->enable_autosave)
autosave_save_draft (composer);
}
@@ -1599,12 +1599,12 @@ static gint
autosave_run (gpointer data)
{
AutosaveManager *am = data;
-
+
g_hash_table_foreach (am->table, (GHFunc)autosave_run_foreach_cb, am);
autosave_manager_stop (am);
autosave_manager_start (am);
-
+
return FALSE;
}
@@ -1647,23 +1647,23 @@ autosave_manager_new (void)
g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
(GDestroyNotify) NULL);
-
+
am = g_new (AutosaveManager, 1);
am->table = table;
am->id = 0;
am->ask = TRUE;
-
+
return am;
}
static void
-autosave_manager_register (AutosaveManager *am, EMsgComposer *composer)
+autosave_manager_register (AutosaveManager *am, EMsgComposer *composer)
{
char *key;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_if_fail (composer != NULL);
-
+
if (autosave_init_file (composer)) {
key = g_path_get_basename (p->autosave_file);
g_hash_table_insert (am->table, key, composer);
@@ -1678,7 +1678,7 @@ autosave_manager_register (AutosaveManager *am, EMsgComposer *composer)
}
static void
-autosave_manager_unregister (AutosaveManager *am, EMsgComposer *composer)
+autosave_manager_unregister (AutosaveManager *am, EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
gchar *key;
@@ -1689,7 +1689,7 @@ autosave_manager_unregister (AutosaveManager *am, EMsgComposer *composer)
key = g_path_get_basename (p->autosave_file);
g_hash_table_remove (am->table, key);
g_free (key);
-
+
/* only remove the file if we can successfully save it */
/* FIXME this test could probably be more efficient */
if (autosave_save_draft (composer)) {
@@ -1701,7 +1701,7 @@ autosave_manager_unregister (AutosaveManager *am, EMsgComposer *composer)
}
g_free (p->autosave_file);
p->autosave_file = NULL;
-
+
if (g_hash_table_size (am->table) == 0)
autosave_manager_stop (am);
}
@@ -1722,14 +1722,14 @@ do_exit (EMsgComposer *composer)
const char *subject;
int button;
EMsgComposerPrivate *p = composer->priv;
-
+
if (!e_msg_composer_is_dirty (composer) && !e_msg_composer_is_autosaved (composer)) {
gtk_widget_destroy (GTK_WIDGET (composer));
return;
}
-
+
gdk_window_raise (GTK_WIDGET (composer)->window);
-
+
subject = e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (p->hdrs));
button = e_error_run((GtkWindow *)composer, "mail-composer:exit-unsaved",
@@ -1781,11 +1781,11 @@ menu_file_save_cb (BonoboUIComponent *uic,
EMsgComposerPrivate *p = composer->priv;
CORBA_char *file_name;
CORBA_Environment ev;
-
+
CORBA_exception_init (&ev);
-
+
file_name = Bonobo_PersistFile_getCurrentFile (p->persist_file_interface, &ev);
-
+
if (ev._major != CORBA_NO_EXCEPTION) {
saveas (composer);
} else {
@@ -1817,7 +1817,7 @@ menu_file_close_cb (BonoboUIComponent *uic,
const char *path)
{
EMsgComposer *composer;
-
+
composer = E_MSG_COMPOSER (data);
do_exit (composer);
}
@@ -1829,7 +1829,7 @@ menu_help_cb (BonoboUIComponent *uic,
const char *path)
{
EMsgComposer *composer = (EMsgComposer *) data;
-
+
e_msg_composer_show_help (composer);
}
@@ -1841,21 +1841,21 @@ add_to_bar (EMsgComposer *composer, GSList *names, int is_inline)
while (names) {
CamelURL *url;
-
+
if (!(url = camel_url_new (names->data, NULL)))
continue;
-
- if (!g_ascii_strcasecmp (url->protocol, "file")) {
+
+ if (!g_ascii_strcasecmp (url->protocol, "file")) {
e_attachment_bar_attach((EAttachmentBar *)p->attachment_bar, url->path, is_inline ? "inline" : "attachment");
} else {
- e_attachment_bar_attach_remote_file ((EAttachmentBar *)p->attachment_bar, names->data, is_inline ? "inline" : "attachment");
+ e_attachment_bar_attach_remote_file ((EAttachmentBar *)p->attachment_bar, names->data, is_inline ? "inline" : "attachment");
}
-
+
camel_url_free (url);
names = names->next;
}
}
-
+
static void
menu_file_add_attachment_cb (BonoboUIComponent *uic,
void *data,
@@ -1874,9 +1874,9 @@ menu_edit_cut_cb (BonoboUIComponent *uic, void *data, const char *path)
{
EMsgComposer *composer = data;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_if_fail (p->focused_entry != NULL);
-
+
if (GTK_IS_ENTRY (p->focused_entry)) {
gtk_editable_cut_clipboard (GTK_EDITABLE (p->focused_entry));
} else {
@@ -1892,7 +1892,7 @@ menu_edit_copy_cb (BonoboUIComponent *uic, void *data, const char *path)
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (p->focused_entry != NULL);
-
+
if (GTK_IS_ENTRY (p->focused_entry)) {
gtk_editable_copy_clipboard (GTK_EDITABLE (p->focused_entry));
} else {
@@ -1906,9 +1906,9 @@ menu_edit_paste_cb (BonoboUIComponent *uic, void *data, const char *path)
{
EMsgComposer *composer = data;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_if_fail (p->focused_entry != NULL);
-
+
if (GTK_IS_ENTRY (p->focused_entry)) {
gtk_editable_paste_clipboard (GTK_EDITABLE (p->focused_entry));
} else {
@@ -1925,10 +1925,10 @@ menu_send_options_cb (BonoboUIComponent *component, void *data, const char *path
EMsgComposer *composer = data;
target = em_event_target_new_composer (e, composer, EM_EVENT_COMPOSER_SEND_OPTION);
- e_msg_composer_set_send_options (composer, FALSE);
+ e_msg_composer_set_send_options (composer, FALSE);
e_event_emit((EEvent *)e, "composer.selectsendoption", (EEventTarget *)target);
if (!composer->priv->send_invoked) {
- e_error_run ((GtkWindow *)composer, "mail-composer:send-options-support", NULL);
+ e_error_run ((GtkWindow *)composer, "mail-composer:send-options-support", NULL);
}
}
@@ -1939,7 +1939,7 @@ menu_edit_select_all_cb (BonoboUIComponent *uic, void *data, const char *path)
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (p->focused_entry != NULL);
-
+
if (GTK_IS_ENTRY (p->focused_entry)) {
gtk_editable_set_position (GTK_EDITABLE (p->focused_entry), -1);
gtk_editable_select_region (GTK_EDITABLE (p->focused_entry), 0, -1);
@@ -1957,7 +1957,7 @@ menu_edit_delete_all_cb (BonoboUIComponent *uic, void *data, const char *path)
CORBA_Environment ev;
CORBA_exception_init (&ev);
-
+
GNOME_GtkHTML_Editor_Engine_undoBegin (p->eeditor_engine, "Delete all but signature", "Undelete all", &ev);
GNOME_GtkHTML_Editor_Engine_freeze (p->eeditor_engine, &ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "disable-selection", &ev);
@@ -1974,7 +1974,7 @@ menu_edit_delete_all_cb (BonoboUIComponent *uic, void *data, const char *path)
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "style-normal", &ev);
GNOME_GtkHTML_Editor_Engine_thaw (p->eeditor_engine, &ev);
GNOME_GtkHTML_Editor_Engine_undoEnd (p->eeditor_engine, &ev);
-
+
CORBA_exception_free (&ev);
/* printf ("delete all\n"); */
}
@@ -1989,7 +1989,7 @@ menu_format_html_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_send_html (E_MSG_COMPOSER (user_data), atoi (state));
}
@@ -2003,7 +2003,7 @@ menu_security_pgp_sign_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_pgp_sign (E_MSG_COMPOSER (composer), atoi (state));
}
@@ -2017,7 +2017,7 @@ menu_security_pgp_encrypt_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_pgp_encrypt (E_MSG_COMPOSER (composer), atoi (state));
}
@@ -2031,7 +2031,7 @@ menu_security_smime_sign_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_smime_sign (E_MSG_COMPOSER (composer), atoi (state));
}
@@ -2045,7 +2045,7 @@ menu_security_smime_encrypt_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_smime_encrypt (E_MSG_COMPOSER (composer), atoi (state));
}
@@ -2059,7 +2059,7 @@ menu_view_from_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_view_from (E_MSG_COMPOSER (user_data), atoi (state));
}
@@ -2072,7 +2072,7 @@ menu_view_replyto_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_view_replyto (E_MSG_COMPOSER (user_data), atoi (state));
}
@@ -2085,7 +2085,7 @@ menu_view_to_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_view_to (E_MSG_COMPOSER (user_data), atoi (state));
}
@@ -2098,7 +2098,7 @@ menu_view_postto_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_view_postto (E_MSG_COMPOSER (user_data), atoi (state));
}
@@ -2111,7 +2111,7 @@ menu_view_cc_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_view_cc (E_MSG_COMPOSER (user_data), atoi (state));
}
@@ -2124,7 +2124,7 @@ menu_view_bcc_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_view_bcc (E_MSG_COMPOSER (user_data), atoi (state));
}
@@ -2137,7 +2137,7 @@ menu_insert_receipt_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_request_receipt (E_MSG_COMPOSER (user_data), atoi (state));
}
@@ -2150,7 +2150,7 @@ menu_insert_priority_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
e_msg_composer_set_priority (E_MSG_COMPOSER (user_data), atoi (state));
}
@@ -2163,7 +2163,7 @@ menu_changed_charset_cb (BonoboUIComponent *component,
{
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
if (atoi (state)) {
EMsgComposer *composer = E_MSG_COMPOSER (user_data);
EMsgComposerPrivate *p = composer->priv;
@@ -2181,14 +2181,14 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("FileSaveAs", menu_file_save_as_cb),
BONOBO_UI_VERB ("FileSaveDraft", menu_file_save_draft_cb),
BONOBO_UI_VERB ("FileClose", menu_file_close_cb),
- BONOBO_UI_VERB ("Help", menu_help_cb),
+ BONOBO_UI_VERB ("Help", menu_help_cb),
BONOBO_UI_VERB ("FileAttach", menu_file_add_attachment_cb),
-
+
BONOBO_UI_VERB ("FileSend", menu_file_send_cb),
-
+
BONOBO_UI_VERB ("DeleteAll", menu_edit_delete_all_cb),
BONOBO_UI_VERB ("InsertXSendOptions", menu_send_options_cb),
-
+
BONOBO_UI_VERB_END
};
@@ -2200,11 +2200,11 @@ static EPixmap pixcache [] = {
E_PIXMAP ("/commands/FileSave", "document-save", E_ICON_SIZE_MENU),
E_PIXMAP ("/commands/FileSaveAs", "document-save-as", E_ICON_SIZE_MENU),
E_PIXMAP ("/commands/FileSend", "mail-send", E_ICON_SIZE_MENU),
-
+
E_PIXMAP ("/Toolbar/FileSend", "mail-send", E_ICON_SIZE_LARGE_TOOLBAR),
E_PIXMAP ("/Toolbar/FileSaveDraft", "document-save", E_ICON_SIZE_LARGE_TOOLBAR) ,
E_PIXMAP ("/Toolbar/FileAttach", "mail-attachment", E_ICON_SIZE_LARGE_TOOLBAR),
-
+
E_PIXMAP_END
};
@@ -2215,10 +2215,10 @@ signature_activate_cb (GtkWidget *menu, EMsgComposer *composer)
GtkWidget *active;
ESignature *sig;
EMsgComposerPrivate *p = composer->priv;
-
+
active = gtk_menu_get_active (GTK_MENU (menu));
sig = g_object_get_data ((GObject *) active, "sig");
-
+
if (p->signature != sig) {
p->signature = sig;
e_msg_composer_show_sig_file (composer);
@@ -2230,16 +2230,16 @@ signature_added (ESignatureList *signatures, ESignature *sig, EMsgComposer *comp
{
GtkWidget *menu, *item;
EMsgComposerPrivate *p = composer->priv;
-
+
menu = gtk_option_menu_get_menu (p->sig_menu);
-
+
if (sig->autogen)
item = gtk_menu_item_new_with_label (_("Autogenerated"));
else
item = gtk_menu_item_new_with_label (sig->name);
g_object_set_data ((GObject *) item, "sig", sig);
gtk_widget_show (item);
-
+
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
}
@@ -2250,12 +2250,12 @@ signature_removed (ESignatureList *signatures, ESignature *sig, EMsgComposer *co
ESignature *cur;
GList *items;
EMsgComposerPrivate *p = composer->priv;
-
+
if (p->signature == sig) {
p->signature = NULL;
e_msg_composer_show_sig_file (composer);
}
-
+
menu = gtk_option_menu_get_menu (p->sig_menu);
items = GTK_MENU_SHELL (menu)->children;
while (items != NULL) {
@@ -2272,7 +2272,7 @@ static void
menu_item_set_label (GtkMenuItem *item, const char *label)
{
GtkWidget *widget;
-
+
widget = gtk_bin_get_child ((GtkBin *) item);
if (GTK_IS_LABEL (widget))
gtk_label_set_text ((GtkLabel *) widget, label);
@@ -2285,7 +2285,7 @@ signature_changed (ESignatureList *signatures, ESignature *sig, EMsgComposer *co
ESignature *cur;
GList *items;
EMsgComposerPrivate *p = composer->priv;
-
+
menu = gtk_option_menu_get_menu (p->sig_menu);
items = GTK_MENU_SHELL (menu)->children;
while (items != NULL) {
@@ -2306,12 +2306,12 @@ sig_select_item (EMsgComposer *composer)
GList *items;
int i = 0;
EMsgComposerPrivate *p = composer->priv;
-
+
if (!p->signature) {
gtk_option_menu_set_history (p->sig_menu, 0);
return;
}
-
+
menu = gtk_option_menu_get_menu (p->sig_menu);
items = GTK_MENU_SHELL (menu)->children;
while (items != NULL) {
@@ -2334,7 +2334,7 @@ setup_signatures_menu (EMsgComposer *composer)
ESignature *sig;
EIterator *it;
EMsgComposerPrivate *p = composer->priv;
-
+
hbox = e_msg_composer_hdrs_get_from_hbox (E_MSG_COMPOSER_HDRS (p->hdrs));
label = gtk_label_new_with_mnemonic (_("Si_gnature:"));
@@ -2349,31 +2349,31 @@ setup_signatures_menu (EMsgComposer *composer)
hspace = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hspace);
gtk_box_pack_start (GTK_BOX (hbox), hspace, FALSE, FALSE, 0);
-
+
menu = gtk_menu_new ();
gtk_widget_show (menu);
gtk_option_menu_set_menu (p->sig_menu, menu);
-
+
item = gtk_menu_item_new_with_label (_("None"));
gtk_widget_show (item);
-
+
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
-
+
signatures = mail_config_get_signatures ();
it = e_list_get_iterator ((EList *) signatures);
-
+
while (e_iterator_is_valid (it)) {
sig = (ESignature *) e_iterator_get (it);
signature_added (signatures, sig, composer);
e_iterator_next (it);
}
-
+
g_object_unref (it);
-
+
g_signal_connect (menu, "selection-done", G_CALLBACK (signature_activate_cb), composer);
gtk_widget_show ((GtkWidget *) p->sig_menu);
-
+
p->sig_added_id = g_signal_connect (signatures, "signature-added", G_CALLBACK (signature_added), composer);
p->sig_removed_id = g_signal_connect (signatures, "signature-removed", G_CALLBACK (signature_removed), composer);
p->sig_changed_id = g_signal_connect (signatures, "signature-changed", G_CALLBACK (signature_changed), composer);
@@ -2388,25 +2388,25 @@ setup_ui (EMsgComposer *composer)
gboolean hide_smime;
char *charset;
char *xmlfile;
-
+
container = bonobo_window_get_ui_container (BONOBO_WINDOW (composer));
-
+
p->uic = bonobo_ui_component_new_default ();
/* FIXME: handle bonobo exceptions */
bonobo_ui_component_set_container (p->uic, bonobo_object_corba_objref (BONOBO_OBJECT (container)), NULL);
-
+
bonobo_ui_component_add_verb_list_with_data (p->uic, verbs, composer);
-
+
bonobo_ui_component_freeze (p->uic, NULL);
-
+
xmlfile = g_build_filename (EVOLUTION_UIDIR, "evolution-message-composer.xml", NULL);
bonobo_ui_util_set_ui (p->uic, PREFIX,
xmlfile,
"evolution-message-composer", NULL);
g_free (xmlfile);
-
+
e_pixmaps_update (p->uic, pixcache);
-
+
/* Populate the Charset Encoding menu and default it to whatever the user
chose as his default charset in the mailer */
charset = composer_get_default_charset_setting ();
@@ -2415,7 +2415,7 @@ setup_ui (EMsgComposer *composer)
menu_changed_charset_cb,
composer);
g_free (charset);
-
+
/* Format -> HTML */
bonobo_ui_component_set_prop (
p->uic, "/commands/FormatHtml",
@@ -2431,7 +2431,7 @@ setup_ui (EMsgComposer *composer)
bonobo_ui_component_add_listener (
p->uic, "ViewFrom",
menu_view_from_cb, composer);
-
+
/* View/ReplyTo */
bonobo_ui_component_set_prop (
p->uic, "/commands/ViewReplyTo",
@@ -2439,7 +2439,7 @@ setup_ui (EMsgComposer *composer)
bonobo_ui_component_add_listener (
p->uic, "ViewReplyTo",
menu_view_replyto_cb, composer);
-
+
/* View/To */
bonobo_ui_component_set_prop (
p->uic, "/commands/ViewTo",
@@ -2447,7 +2447,7 @@ setup_ui (EMsgComposer *composer)
bonobo_ui_component_add_listener (
p->uic, "ViewTo",
menu_view_to_cb, composer);
-
+
/* View/PostTo */
bonobo_ui_component_set_prop (
p->uic, "/commands/ViewPostTo",
@@ -2455,7 +2455,7 @@ setup_ui (EMsgComposer *composer)
bonobo_ui_component_add_listener (
p->uic, "ViewPostTo",
menu_view_postto_cb, composer);
-
+
/* View/CC */
bonobo_ui_component_set_prop (
p->uic, "/commands/ViewCC",
@@ -2463,7 +2463,7 @@ setup_ui (EMsgComposer *composer)
bonobo_ui_component_add_listener (
p->uic, "ViewCC",
menu_view_cc_cb, composer);
-
+
/* View/BCC */
bonobo_ui_component_set_prop (
p->uic, "/commands/ViewBCC",
@@ -2479,7 +2479,7 @@ setup_ui (EMsgComposer *composer)
bonobo_ui_component_add_listener (
p->uic, "RequestReceipt",
menu_insert_receipt_cb, composer);
-
+
/* Insert/Exchange Send Options */
/* bonobo_ui_component_set_prop (
p->uic, "/commands/XSendOptions",
@@ -2495,31 +2495,31 @@ setup_ui (EMsgComposer *composer)
bonobo_ui_component_add_listener (
p->uic, "SetPriority",
menu_insert_priority_cb, composer);
-
+
/* Security -> PGP Sign */
bonobo_ui_component_set_prop (
p->uic, "/commands/SecurityPGPSign",
"state", p->pgp_sign ? "1" : "0", NULL);
-
+
bonobo_ui_component_add_listener (
p->uic, "SecurityPGPSign",
menu_security_pgp_sign_cb, composer);
-
+
/* Security -> PGP Encrypt */
bonobo_ui_component_set_prop (
p->uic, "/commands/SecurityPGPEncrypt",
"state", p->pgp_encrypt ? "1" : "0", NULL);
-
+
bonobo_ui_component_add_listener (
p->uic, "SecurityPGPEncrypt",
menu_security_pgp_encrypt_cb, composer);
-
+
#if defined(HAVE_NSS) && defined(SMIME_SUPPORTED)
hide_smime = FALSE;
#else
hide_smime = TRUE;
#endif
-
+
/* Security -> S/MIME Sign */
bonobo_ui_component_set_prop (
p->uic, "/commands/SecuritySMimeSign",
@@ -2527,11 +2527,11 @@ setup_ui (EMsgComposer *composer)
bonobo_ui_component_set_prop (
p->uic, "/commands/SecuritySMimeSign",
"hidden", hide_smime ? "1" : "0", NULL);
-
+
bonobo_ui_component_add_listener (
p->uic, "SecuritySMimeSign",
menu_security_smime_sign_cb, composer);
-
+
/* Security -> S/MIME Encrypt */
bonobo_ui_component_set_prop (
p->uic, "/commands/SecuritySMimeEncrypt",
@@ -2539,11 +2539,11 @@ setup_ui (EMsgComposer *composer)
bonobo_ui_component_set_prop (
p->uic, "/commands/SecuritySMimeEncrypt",
"hidden", hide_smime ? "1" : "0", NULL);
-
+
bonobo_ui_component_add_listener (
p->uic, "SecuritySMimeEncrypt",
menu_security_smime_encrypt_cb, composer);
-
+
bonobo_ui_component_thaw (p->uic, NULL);
/* Create the UIComponent for the non-control entries */
@@ -2580,29 +2580,29 @@ attachment_bar_changed_cb (EAttachmentBar *bar,
show_attachments (composer, TRUE);
} else {
gtk_label_set_text (GTK_LABEL (p->attachment_expander_num), "");
- gtk_widget_hide (p->attachment_expander_icon);
+ gtk_widget_hide (p->attachment_expander_icon);
show_attachments (composer, FALSE);
}
-
-
+
+
/* Mark the composer as changed so it prompts about unsaved
changes on close */
e_msg_composer_set_changed (composer);
}
static void
-attachment_expander_activate_cb (EExpander *expander,
- void *data)
-{
- EMsgComposer *composer = E_MSG_COMPOSER (data);
- gboolean show = e_expander_get_expanded (expander);
-
- /* Update the expander label */
- if (show)
- gtk_label_set_text_with_mnemonic (GTK_LABEL (composer->priv->attachment_expander_label),
- _("Hide _Attachment Bar"));
- else
- gtk_label_set_text_with_mnemonic (GTK_LABEL (composer->priv->attachment_expander_label),
- _("Show _Attachment Bar"));
+attachment_expander_activate_cb (EExpander *expander,
+ void *data)
+{
+ EMsgComposer *composer = E_MSG_COMPOSER (data);
+ gboolean show = e_expander_get_expanded (expander);
+
+ /* Update the expander label */
+ if (show)
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (composer->priv->attachment_expander_label),
+ _("Hide _Attachment Bar"));
+ else
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (composer->priv->attachment_expander_label),
+ _("Show _Attachment Bar"));
}
static void
subject_changed_cb (EMsgComposerHdrs *hdrs,
@@ -2610,9 +2610,9 @@ subject_changed_cb (EMsgComposerHdrs *hdrs,
void *data)
{
EMsgComposer *composer;
-
+
composer = E_MSG_COMPOSER (data);
-
+
gtk_window_set_title (GTK_WINDOW (composer), subject[0] ? subject : _("Compose Message"));
}
@@ -2621,9 +2621,9 @@ hdrs_changed_cb (EMsgComposerHdrs *hdrs,
void *data)
{
EMsgComposer *composer;
-
+
composer = E_MSG_COMPOSER (data);
-
+
/* Mark the composer as changed so it prompts about unsaved changes on close */
e_msg_composer_set_changed (composer);
}
@@ -2640,31 +2640,31 @@ update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs
CamelInternetAddress *iaddr;
GList *list, *tail, *node;
int i, n = 0;
-
+
tail = list = NULL;
-
+
if (auto_addrs) {
iaddr = camel_internet_address_new ();
if (camel_address_decode (CAMEL_ADDRESS (iaddr), auto_addrs) != -1) {
for (i = 0; i < camel_address_length (CAMEL_ADDRESS (iaddr)); i++) {
const char *name, *addr;
-
+
if (!camel_internet_address_get (iaddr, i, &name, &addr))
continue;
-
+
dest = e_destination_new ();
e_destination_set_auto_recipient (dest, TRUE);
-
+
if (name)
e_destination_set_name (dest, name);
-
+
if (addr)
e_destination_set_email (dest, addr);
-
+
node = g_list_alloc ();
node->data = dest;
node->next = NULL;
-
+
if (tail) {
node->prev = tail;
tail->next = node;
@@ -2672,15 +2672,15 @@ update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs
node->prev = NULL;
list = node;
}
-
+
tail = node;
n++;
}
}
-
+
camel_object_unref (iaddr);
}
-
+
switch (mode) {
case UPDATE_AUTO_CC:
destv = e_msg_composer_hdrs_get_cc (hdrs);
@@ -2691,14 +2691,14 @@ update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs
default:
g_return_if_reached ();
}
-
+
if (destv) {
for (i = 0; destv[i]; i++) {
if (!e_destination_is_auto_recipient (destv[i])) {
node = g_list_alloc ();
node->data = e_destination_copy (destv[i]);
node->next = NULL;
-
+
if (tail) {
node->prev = tail;
tail->next = node;
@@ -2706,18 +2706,18 @@ update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs
node->prev = NULL;
list = node;
}
-
+
tail = node;
n++;
}
}
-
+
e_destination_freev (destv);
}
-
+
destv = destination_list_to_vector_sized (list, n);
g_list_free (list);
-
+
switch (mode) {
case UPDATE_AUTO_CC:
e_msg_composer_hdrs_set_cc (hdrs, destv);
@@ -2728,7 +2728,7 @@ update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs
default:
g_return_if_reached ();
}
-
+
e_destination_freev (destv);
}
@@ -2737,10 +2737,10 @@ from_changed_cb (EMsgComposerHdrs *hdrs, void *data)
{
EMsgComposer *composer = E_MSG_COMPOSER (data);
EMsgComposerPrivate *p = composer->priv;
-
+
if (hdrs->account) {
EAccount *account = hdrs->account;
-
+
e_msg_composer_set_pgp_sign (composer,
account->pgp_always_sign &&
(!account->pgp_no_imip_sign || !p->mime_type ||
@@ -2753,7 +2753,7 @@ from_changed_cb (EMsgComposerHdrs *hdrs, void *data)
update_auto_recipients (hdrs, UPDATE_AUTO_CC, NULL);
update_auto_recipients (hdrs, UPDATE_AUTO_BCC, NULL);
}
-
+
set_editor_signature (composer);
e_msg_composer_show_sig_file (composer);
}
@@ -2769,10 +2769,10 @@ composer_finalise (GObject *object)
composer = E_MSG_COMPOSER (object);
p = composer->priv;
-
+
if (p->extra_hdr_names) {
int i;
-
+
for (i = 0; i < p->extra_hdr_names->len; i++) {
g_free (p->extra_hdr_names->pdata[i]);
g_free (p->extra_hdr_values->pdata[i]);
@@ -2780,23 +2780,23 @@ composer_finalise (GObject *object)
g_ptr_array_free (p->extra_hdr_names, TRUE);
g_ptr_array_free (p->extra_hdr_values, TRUE);
}
-
+
g_hash_table_destroy (p->inline_images);
g_hash_table_destroy (p->inline_images_by_url);
-
+
g_free (p->charset);
g_free (p->mime_type);
g_free (p->mime_body);
-
+
if (p->redirect)
camel_object_unref (p->redirect);
-
-
+
+
g_free (p);
p = NULL;
composer->priv = NULL;
-
+
if (G_OBJECT_CLASS (parent_class)->finalize != NULL)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
@@ -2809,7 +2809,7 @@ composer_dispose(GObject *object)
* been destroyed, so we have to do this here.
*/
autosave_manager_unregister (am, E_MSG_COMPOSER (object));
-
+
if (G_OBJECT_CLASS (parent_class)->dispose != NULL)
(* G_OBJECT_CLASS (parent_class)->dispose) (object);
}
@@ -2822,7 +2822,7 @@ destroy (GtkObject *object)
EMsgComposerPrivate *p = composer->priv;
CORBA_Environment ev;
ESignatureList *signatures;
-
+
CORBA_exception_init (&ev);
if (p->menu) {
@@ -2850,7 +2850,7 @@ destroy (GtkObject *object)
bonobo_object_unref (BONOBO_OBJECT (p->entry_uic));
p->entry_uic = NULL;
}
-
+
/* FIXME? I assume the Bonobo widget will get destroyed
normally? */
if (p->address_dialog != NULL) {
@@ -2861,51 +2861,51 @@ destroy (GtkObject *object)
gtk_widget_destroy (p->hdrs);
p->hdrs = NULL;
}
-
+
if (p->notify_id) {
GConfClient *gconf = gconf_client_get_default ();
gconf_client_notify_remove (gconf, p->notify_id);
p->notify_id = 0;
g_object_unref (gconf);
- }
+ }
if (p->persist_stream_interface != CORBA_OBJECT_NIL) {
Bonobo_Unknown_unref (p->persist_stream_interface, &ev);
CORBA_Object_release (p->persist_stream_interface, &ev);
p->persist_stream_interface = CORBA_OBJECT_NIL;
}
-
+
if (p->persist_file_interface != CORBA_OBJECT_NIL) {
Bonobo_Unknown_unref (p->persist_file_interface, &ev);
CORBA_Object_release (p->persist_file_interface, &ev);
p->persist_file_interface = CORBA_OBJECT_NIL;
}
-
+
if (p->eeditor_engine != CORBA_OBJECT_NIL) {
Bonobo_Unknown_unref (p->eeditor_engine, &ev);
CORBA_Object_release (p->eeditor_engine, &ev);
p->eeditor_engine = CORBA_OBJECT_NIL;
}
-
+
CORBA_exception_free (&ev);
-
+
if (p->eeditor_listener) {
bonobo_object_unref (p->eeditor_listener);
p->eeditor_listener = NULL;
}
-
+
signatures = mail_config_get_signatures ();
-
+
if (p->sig_added_id != 0) {
g_signal_handler_disconnect (signatures, p->sig_added_id);
p->sig_added_id = 0;
}
-
+
if (p->sig_removed_id != 0) {
g_signal_handler_disconnect (signatures, p->sig_removed_id);
p->sig_removed_id = 0;
}
-
+
if (p->sig_changed_id != 0) {
g_signal_handler_disconnect (signatures, p->sig_changed_id);
p->sig_changed_id = 0;
@@ -2938,7 +2938,7 @@ delete_event (GtkWidget *widget,
GdkEventAny *event)
{
do_exit (E_MSG_COMPOSER (widget));
-
+
return TRUE;
}
@@ -2986,7 +2986,7 @@ int
e_msg_composer_get_remote_download_count (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
- return e_attachment_bar_get_download_count
+ return e_attachment_bar_get_download_count
(E_ATTACHMENT_BAR (p->attachment_bar));
}
@@ -3020,7 +3020,7 @@ drop_action(EMsgComposer *composer, GdkDragContext *context, guint32 action, Gtk
char *content_type;
int i, success = FALSE, delete = FALSE;
EMsgComposerPrivate *p = composer->priv;
-
+
switch (info) {
case DND_TYPE_MESSAGE_RFC822:
d(printf ("dropping a message/rfc822\n"));
@@ -3028,7 +3028,7 @@ drop_action(EMsgComposer *composer, GdkDragContext *context, guint32 action, Gtk
stream = camel_stream_mem_new ();
camel_stream_write (stream, (const gchar *)selection->data, selection->length);
camel_stream_reset (stream);
-
+
msg = camel_mime_message_new ();
if (camel_data_wrapper_construct_from_stream((CamelDataWrapper *)msg, stream) != -1) {
attach_message(composer, msg);
@@ -3056,18 +3056,18 @@ drop_action(EMsgComposer *composer, GdkDragContext *context, guint32 action, Gtk
tmp = g_strndup ((const gchar *) selection->data, selection->length);
urls = g_strsplit (tmp, "\n", 0);
g_free (tmp);
-
+
for (i = 0; urls[i] != NULL; i++) {
str = g_strstrip (urls[i]);
if (str[0] == '#' || str[0] == '\0') {
g_free (str);
continue;
}
-
+
handle_uri (composer, str, html_dnd);
g_free (str);
}
-
+
g_free (urls);
success = TRUE;
break;
@@ -3075,16 +3075,16 @@ drop_action(EMsgComposer *composer, GdkDragContext *context, guint32 action, Gtk
case DND_TYPE_TEXT_CALENDAR:
content_type = gdk_atom_name (selection->type);
d(printf ("dropping a %s\n", content_type));
-
+
mime_part = camel_mime_part_new ();
camel_mime_part_set_content (mime_part, (const gchar *)selection->data, selection->length, content_type);
camel_mime_part_set_disposition (mime_part, "inline");
-
+
e_attachment_bar_attach_mime_part (E_ATTACHMENT_BAR (p->attachment_bar), mime_part);
-
+
camel_object_unref (mime_part);
g_free (content_type);
-
+
success = TRUE;
break;
case DND_TYPE_X_UID_LIST: {
@@ -3180,7 +3180,7 @@ drop_action(EMsgComposer *composer, GdkDragContext *context, guint32 action, Gtk
if (e_attachment_bar_get_num_attachments(E_ATTACHMENT_BAR(p->attachment_bar)))
show_attachments (composer, TRUE);
-
+
gtk_drag_finish(context, success, delete, time);
}
@@ -3307,14 +3307,14 @@ class_init (EMsgComposerClass *klass)
gobject_class = G_OBJECT_CLASS(klass);
object_class = GTK_OBJECT_CLASS (klass);
widget_class = GTK_WIDGET_CLASS (klass);
-
+
gobject_class->finalize = composer_finalise;
gobject_class->dispose = composer_dispose;
object_class->destroy = destroy;
widget_class->delete_event = delete_event;
-
+
parent_class = g_type_class_ref(bonobo_window_get_type ());
-
+
signals[SEND] =
g_signal_new ("send",
E_TYPE_MSG_COMPOSER,
@@ -3323,7 +3323,7 @@ class_init (EMsgComposerClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
+
signals[SAVE_DRAFT] =
g_signal_new ("save-draft",
E_TYPE_MSG_COMPOSER,
@@ -3353,46 +3353,46 @@ init (EMsgComposer *composer)
(GDestroyNotify) camel_object_unref);
p->uic = NULL;
-
+
p->hdrs = NULL;
p->extra_hdr_names = g_ptr_array_new ();
p->extra_hdr_values = g_ptr_array_new ();
-
+
p->focused_entry = NULL;
-
+
p->eeditor = NULL;
-
+
p->address_dialog = NULL;
-
+
p->attachment_bar = NULL;
p->attachment_scrolled_window = NULL;
-
+
p->persist_file_interface = CORBA_OBJECT_NIL;
p->persist_stream_interface = CORBA_OBJECT_NIL;
-
+
p->eeditor_engine = CORBA_OBJECT_NIL;
p->inline_images = inline_images;
p->inline_images_by_url = inline_images_by_url;
p->current_images = NULL;
-
+
p->attachment_bar_visible = FALSE;
p->send_html = FALSE;
p->pgp_sign = FALSE;
p->pgp_encrypt = FALSE;
p->smime_sign = FALSE;
p->smime_encrypt = FALSE;
-
+
p->has_changed = FALSE;
p->autosaved = FALSE;
-
- p->redirect = NULL;
- p->send_invoked = FALSE;
+
+ p->redirect = NULL;
+ p->send_invoked = FALSE;
p->charset = NULL;
-
+
p->enable_autosave = TRUE;
p->autosave_file = NULL;
p->autosave_fd = -1;
-
+
/** @HookPoint-EMMenu: Main Mail Menu
* @Id: org.gnome.evolution.mail.composer
* @Class: org.gnome.evolution.mail.bonobomenu:1.0
@@ -3402,7 +3402,7 @@ init (EMsgComposer *composer)
* target will point to the EMsgComposer object.
*/
p->menu = em_menu_new("org.gnome.evolution.mail.composer");
-
+
composer->priv = p;
}
@@ -3411,7 +3411,7 @@ GtkType
e_msg_composer_get_type (void)
{
static GType type = 0;
-
+
if (type == 0) {
static const GTypeInfo info = {
sizeof (EMsgComposerClass),
@@ -3422,10 +3422,10 @@ e_msg_composer_get_type (void)
0,
(GInstanceInitFunc) init,
};
-
+
type = g_type_register_static (bonobo_window_get_type (), "EMsgComposer", &info, 0);
}
-
+
return type;
}
@@ -3434,9 +3434,9 @@ e_msg_composer_load_config (EMsgComposer *composer, int visible_mask)
{
GConfClient *gconf;
EMsgComposerPrivate *p = composer->priv;
-
+
gconf = gconf_client_get_default ();
-
+
p->view_from = gconf_client_get_bool (
gconf, "/apps/evolution/mail/composer/view/From", NULL);
p->view_replyto = gconf_client_get_bool (
@@ -3445,32 +3445,32 @@ e_msg_composer_load_config (EMsgComposer *composer, int visible_mask)
gconf, "/apps/evolution/mail/composer/view/To", NULL);
p->view_postto = gconf_client_get_bool (
gconf, "/apps/evolution/mail/composer/view/PostTo", NULL);
- p->view_cc = gconf_client_get_bool (
+ p->view_cc = gconf_client_get_bool (
gconf, "/apps/evolution/mail/composer/view/Cc", NULL);
p->view_bcc = gconf_client_get_bool (
gconf, "/apps/evolution/mail/composer/view/Bcc", NULL);
p->view_subject = gconf_client_get_bool (
gconf, "/apps/evolution/mail/composer/view/Subject", NULL);
-
+
/* if we're mailing, you cannot disable to so it should appear checked */
if (visible_mask & E_MSG_COMPOSER_VISIBLE_TO)
p->view_to = TRUE;
else
p->view_to = FALSE;
-
+
/* ditto for post-to */
if (visible_mask & E_MSG_COMPOSER_VISIBLE_POSTTO)
p->view_postto = TRUE;
else
p->view_postto = FALSE;
-
+
/* we set these to false initially if we're posting */
if (!(visible_mask & E_MSG_COMPOSER_VISIBLE_CC))
p->view_cc = FALSE;
-
+
if (!(visible_mask & E_MSG_COMPOSER_VISIBLE_BCC))
p->view_bcc = FALSE;
-
+
g_object_unref (gconf);
}
@@ -3479,7 +3479,7 @@ e_msg_composer_get_visible_flags (EMsgComposer *composer)
{
int flags = 0;
EMsgComposerPrivate *p = composer->priv;
-
+
if (p->view_from)
flags |= E_MSG_COMPOSER_VISIBLE_FROM;
if (p->view_replyto)
@@ -3494,14 +3494,14 @@ e_msg_composer_get_visible_flags (EMsgComposer *composer)
flags |= E_MSG_COMPOSER_VISIBLE_BCC;
if (p->view_subject)
flags |= E_MSG_COMPOSER_VISIBLE_SUBJECT;
-
+
/*
* Until we have a GUI way, lets make sure that
* even if the user screws up, we will do the right
* thing (screws up == edit the config file manually
* and screw up).
*/
- flags |= E_MSG_COMPOSER_VISIBLE_SUBJECT;
+ flags |= E_MSG_COMPOSER_VISIBLE_SUBJECT;
return flags;
}
@@ -3515,29 +3515,29 @@ map_default_cb (EMsgComposer *composer, gpointer user_data)
const char *text;
EMsgComposerPrivate *p = composer->priv;
- /* If the 'To:' field is empty, focus it */
+ /* If the 'To:' field is empty, focus it */
widget = e_msg_composer_hdrs_get_to_entry (E_MSG_COMPOSER_HDRS (p->hdrs));
text = gtk_entry_get_text (GTK_ENTRY (widget));
-
+
if (!text || text[0] == '\0') {
gtk_widget_grab_focus (widget);
-
+
return;
}
-
+
/* If not, check the subject field */
-
+
subject = e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (p->hdrs));
-
+
if (!subject || subject[0] == '\0') {
widget = e_msg_composer_hdrs_get_subject_entry (E_MSG_COMPOSER_HDRS (p->hdrs));
gtk_widget_grab_focus (widget);
return;
}
-
+
/* Jump to the editor as a last resort. */
-
+
CORBA_exception_init (&ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "grab-focus", &ev);
CORBA_exception_free (&ev);
@@ -3547,7 +3547,7 @@ static void
msg_composer_destroy_notify (void *data)
{
EMsgComposer *composer = E_MSG_COMPOSER (data);
-
+
all_composers = g_slist_remove (all_composers, composer);
}
@@ -3576,7 +3576,7 @@ composer_key_pressed (EMsgComposer *composer, GdkEventKey *event, void *user_dat
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "grab-focus", &ev);
CORBA_exception_free (&ev);
g_signal_stop_emission_by_name (composer, "key-press-event");
- return TRUE;
+ return TRUE;
}
return FALSE;
}
@@ -3616,7 +3616,7 @@ composer_entry_focus_in_event_cb (GtkWidget *widget, GdkEventFocus *event, gpoin
g_free (xmlfile);
bonobo_ui_component_thaw (p->entry_uic, NULL);
-
+
return FALSE;
}
@@ -3625,12 +3625,12 @@ composer_entry_focus_out_event_cb (GtkWidget *widget, GdkEventFocus *event, gpoi
{
EMsgComposer *composer = user_data;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_val_if_fail (p->focused_entry == widget, FALSE);
p->focused_entry = NULL;
bonobo_ui_component_unset_container (p->entry_uic, NULL);
-
+
return FALSE;
}
@@ -3640,13 +3640,13 @@ setup_cut_copy_paste (EMsgComposer *composer)
EMsgComposerHdrs *hdrs;
EMsgComposerPrivate *p = composer->priv;
GtkWidget *entry;
-
+
hdrs = (EMsgComposerHdrs *) p->hdrs;
-
+
entry = e_msg_composer_hdrs_get_subject_entry (hdrs);
g_signal_connect (entry, "focus_in_event", G_CALLBACK (composer_entry_focus_in_event_cb), composer);
g_signal_connect (entry, "focus_out_event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
-
+
entry = e_msg_composer_hdrs_get_reply_to_entry (hdrs);
g_signal_connect (entry, "focus_in_event", G_CALLBACK (composer_entry_focus_in_event_cb), composer);
g_signal_connect (entry, "focus_out_event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
@@ -3722,7 +3722,7 @@ static void
emcab_properties(EPopup *ep, EPopupItem *item, void *data)
{
EAttachmentBar *bar = data;
-
+
e_attachment_bar_edit_selected(bar);
}
@@ -3749,17 +3749,17 @@ emcab_popup_position(GtkMenu *menu, int *x, int *y, gboolean *push_in, gpointer
GnomeIconList *icon_list = user_data;
GList *selection;
GnomeCanvasPixbuf *image;
-
+
gdk_window_get_origin (((GtkWidget*) bar)->window, x, y);
-
+
selection = gnome_icon_list_get_selection (icon_list);
if (selection == NULL)
return;
-
+
image = gnome_icon_list_get_icon_pixbuf_item (icon_list, GPOINTER_TO_INT(selection->data));
if (image == NULL)
return;
-
+
/* Put menu to the center of icon. */
*x += (int)(image->item.x1 + image->item.x2) / 2;
*y += (int)(image->item.y1 + image->item.y2) / 2;
@@ -3783,7 +3783,7 @@ emcab_popup(EAttachmentBar *bar, GdkEventButton *event, int id)
GtkMenu *menu;
attachments = e_attachment_bar_get_attachment(bar, id);
-
+
for (i=0;i<sizeof(emcab_popups)/sizeof(emcab_popups[0]);i++)
menus = g_slist_prepend(menus, &emcab_popups[i]);
@@ -3806,7 +3806,7 @@ emcab_popup(EAttachmentBar *bar, GdkEventButton *event, int id)
gtk_menu_popup(menu, NULL, NULL, NULL, NULL, event->button, event->time);
}
-static gboolean
+static gboolean
popup_menu_event (GtkWidget *widget)
{
emcab_popup((EAttachmentBar *)widget, NULL, -1);
@@ -3820,10 +3820,10 @@ button_press_event (GtkWidget *widget, GdkEventButton *event)
EAttachmentBar *bar = (EAttachmentBar *)widget;
GnomeIconList *icon_list = GNOME_ICON_LIST(widget);
int icon_number;
-
+
if (event->button != 3)
return FALSE;
-
+
icon_number = gnome_icon_list_get_icon_at (icon_list, event->x, event->y);
if (icon_number >= 0) {
gnome_icon_list_unselect_all(icon_list);
@@ -3831,7 +3831,7 @@ button_press_event (GtkWidget *widget, GdkEventButton *event)
}
emcab_popup(bar, event, icon_number);
-
+
return TRUE;
}
@@ -3844,7 +3844,7 @@ key_press_event(GtkWidget *widget, GdkEventKey *event)
e_attachment_bar_remove_selected (bar);
return TRUE;
}
-
+
return FALSE;
}
@@ -3861,20 +3861,20 @@ create_composer (int visible_mask)
BonoboControlFrame *control_frame;
GtkWidget *html_widget = NULL;
gpointer servant;
- BonoboObject *impl;
+ BonoboObject *impl;
EMsgComposerPrivate *p;
-
+
composer = g_object_new (E_TYPE_MSG_COMPOSER, "win_name", _("Compose Message"), NULL);
p = composer->priv;
-
+
gtk_window_set_title ((GtkWindow *) composer, _("Compose Message"));
-
+
all_composers = g_slist_prepend (all_composers, composer);
-
+
g_signal_connect (composer, "key-press-event",
G_CALLBACK (composer_key_pressed),
NULL);
-
+
g_signal_connect (composer, "destroy",
G_CALLBACK (msg_composer_destroy_notify),
NULL);
@@ -3891,11 +3891,11 @@ create_composer (int visible_mask)
g_signal_connect(composer, "drag_data_received", G_CALLBACK (drag_data_received), composer);
g_signal_connect(composer, "drag-motion", G_CALLBACK(drag_motion), composer);
e_msg_composer_load_config (composer, visible_mask);
-
+
setup_ui (composer);
-
+
vbox = gtk_vbox_new (FALSE, 0);
-
+
vis = e_msg_composer_get_visible_flags (composer);
p->hdrs = e_msg_composer_hdrs_new (p->uic, visible_mask, vis);
if (!p->hdrs) {
@@ -3903,7 +3903,7 @@ create_composer (int visible_mask)
gtk_object_destroy (GTK_OBJECT (composer));
return NULL;
}
-
+
gtk_box_set_spacing (GTK_BOX (vbox), 6);
gtk_box_pack_start (GTK_BOX (vbox), p->hdrs, FALSE, FALSE, 0);
g_signal_connect (p->hdrs, "subject_changed",
@@ -3913,7 +3913,7 @@ create_composer (int visible_mask)
g_signal_connect (p->hdrs, "from_changed",
G_CALLBACK (from_changed_cb), composer);
gtk_widget_show (p->hdrs);
-
+
setup_signatures_menu (composer);
from_changed_cb((EMsgComposerHdrs *)p->hdrs, composer);
@@ -3930,12 +3930,12 @@ create_composer (int visible_mask)
control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (p->eeditor));
bonobo_control_frame_set_autoactivate (control_frame, TRUE);
-
+
/* let the editor know which mode we are in */
- bonobo_widget_set_property (BONOBO_WIDGET (p->eeditor),
+ bonobo_widget_set_property (BONOBO_WIDGET (p->eeditor),
"FormatHTML", TC_CORBA_boolean, p->send_html,
NULL);
-
+
gconf = gconf_client_get_default ();
composer_settings_update (gconf, 0, NULL, composer);
gconf_client_add_dir (gconf, "/apps/evolution/mail/composer", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
@@ -3946,9 +3946,9 @@ create_composer (int visible_mask)
gconf_client_get_int (gconf, "/apps/evolution/mail/composer/height", NULL));
g_signal_connect (composer, "unrealize", G_CALLBACK (e_msg_composer_unrealize), NULL);
g_object_unref (gconf);
-
+
editor_server = bonobo_widget_get_objref (BONOBO_WIDGET (p->eeditor));
-
+
/* FIXME: handle exceptions */
CORBA_exception_init (&ev);
p->persist_file_interface
@@ -3956,24 +3956,24 @@ create_composer (int visible_mask)
p->persist_stream_interface
= Bonobo_Unknown_queryInterface (editor_server, "IDL:Bonobo/PersistStream:1.0", &ev);
CORBA_exception_free (&ev);
-
+
gtk_box_pack_start (GTK_BOX (vbox), p->eeditor, TRUE, TRUE, 0);
-
+
/* Attachment editor, wrapped into an EScrollFrame. It's
hidden in an EExpander. */
-
+
p->attachment_scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (p->attachment_scrolled_window),
GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (p->attachment_scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
+
p->attachment_bar = e_attachment_bar_new (NULL);
g_signal_connect (p->attachment_bar, "button_press_event", G_CALLBACK (button_press_event), NULL);
g_signal_connect (p->attachment_bar, "key_press_event", G_CALLBACK (key_press_event), NULL);
g_signal_connect (p->attachment_bar, "popup-menu", G_CALLBACK (popup_menu_event), NULL);
-
+
GTK_WIDGET_SET_FLAGS (p->attachment_bar, GTK_CAN_FOCUS);
gtk_container_add (GTK_CONTAINER (p->attachment_scrolled_window),
p->attachment_bar);
@@ -3988,7 +3988,7 @@ create_composer (int visible_mask)
gtk_misc_set_alignment (GTK_MISC (p->attachment_expander_label), 0.0, 0.5);
gtk_misc_set_alignment (GTK_MISC (p->attachment_expander_num), 1.0, 0.5);
expander_hbox = gtk_hbox_new (FALSE, 0);
-
+
p->attachment_expander_icon = e_icon_factory_get_image ("mail-attachment", E_ICON_SIZE_MENU);
gtk_misc_set_alignment (GTK_MISC (p->attachment_expander_icon), 1, 0.5);
gtk_widget_set_size_request (p->attachment_expander_icon, 100, -1);
@@ -4008,18 +4008,18 @@ create_composer (int visible_mask)
gtk_box_pack_start (GTK_BOX (vbox), p->attachment_expander, FALSE, FALSE, GNOME_PAD_SMALL);
gtk_widget_show (p->attachment_expander);
- e_expander_set_expanded (E_EXPANDER (p->attachment_expander), FALSE);
- g_signal_connect_after (p->attachment_expander, "activate",
+ e_expander_set_expanded (E_EXPANDER (p->attachment_expander), FALSE);
+ g_signal_connect_after (p->attachment_expander, "activate",
G_CALLBACK (attachment_expander_activate_cb), composer);
bonobo_window_set_contents (BONOBO_WINDOW (composer), vbox);
gtk_widget_show (vbox);
-
+
/* If we show this widget earlier, we lose network transparency. i.e. the
component appears on the machine evo is running on, ignoring any DISPLAY
variable. */
gtk_widget_show (p->eeditor);
-
+
prepare_engine (composer);
if (p->eeditor_engine == CORBA_OBJECT_NIL) {
e_error_run (GTK_WINDOW (composer), "mail-composer:no-editor-control", NULL);
@@ -4030,7 +4030,7 @@ create_composer (int visible_mask)
/* The engine would have the GtkHTML widget stored in "html-widget"
* We'll use that to listen for DnD signals
*/
-
+
servant = ORBit_small_get_servant (p->eeditor_engine);
if (servant && (impl = bonobo_object (servant)))
html_widget = g_object_get_data (G_OBJECT(impl), "html-widget");
@@ -4038,18 +4038,18 @@ create_composer (int visible_mask)
if (html_widget) {
g_signal_connect (html_widget, "drag_data_received", G_CALLBACK (drag_data_received), composer);
}
-
+
setup_cut_copy_paste (composer);
g_signal_connect (composer, "map", (GCallback) map_default_cb, NULL);
-
+
if (am == NULL)
am = autosave_manager_new ();
-
+
autosave_manager_register (am, composer);
p->has_changed = FALSE;
-
+
return composer;
}
@@ -4058,15 +4058,15 @@ set_editor_signature (EMsgComposer *composer)
{
EAccountIdentity *id;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_if_fail (E_MSG_COMPOSER_HDRS (p->hdrs)->account != NULL);
-
+
id = E_MSG_COMPOSER_HDRS (p->hdrs)->account->id;
if (id->sig_uid)
p->signature = mail_config_get_signature_by_uid (id->sig_uid);
else
p->signature = NULL;
-
+
sig_select_item (composer);
}
@@ -4114,7 +4114,7 @@ e_msg_composer_new_with_type (int type)
* e_msg_composer_new:
*
* Create a new message composer widget.
- *
+ *
* Return value: A pointer to the newly created widget
**/
EMsgComposer *
@@ -4132,12 +4132,12 @@ is_special_header (const char *hdr_name)
*/
if (g_ascii_strncasecmp (hdr_name, "X-", 2))
return TRUE;
-
+
if (!g_ascii_strncasecmp (hdr_name, "X-Evolution", 11))
return TRUE;
-
+
/* we can keep all other X-* headers */
-
+
return FALSE;
}
@@ -4145,7 +4145,7 @@ static void
e_msg_composer_set_pending_body (EMsgComposer *composer, char *text, ssize_t len)
{
char *old;
-
+
old = g_object_get_data ((GObject *) composer, "body:text");
g_free (old);
g_object_set_data ((GObject *) composer, "body:text", text);
@@ -4157,20 +4157,20 @@ e_msg_composer_flush_pending_body (EMsgComposer *composer, gboolean apply)
{
char *body;
ssize_t len;
-
+
body = g_object_get_data ((GObject *) composer, "body:text");
len = GPOINTER_TO_SIZE (g_object_get_data ((GObject *) composer, "body:len"));
if (body) {
- if (apply)
+ if (apply)
set_editor_text (composer, body, len, FALSE, FALSE);
-
+
g_object_set_data ((GObject *) composer, "body:text", NULL);
g_free (body);
}
-}
+}
static void
-add_attachments_handle_mime_part (EMsgComposer *composer, CamelMimePart *mime_part,
+add_attachments_handle_mime_part (EMsgComposer *composer, CamelMimePart *mime_part,
gboolean just_inlines, gboolean related, int depth)
{
CamelContentType *content_type;
@@ -4181,7 +4181,7 @@ add_attachments_handle_mime_part (EMsgComposer *composer, CamelMimePart *mime_pa
content_type = camel_mime_part_get_content_type (mime_part);
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
-
+
if (CAMEL_IS_MULTIPART (wrapper)) {
/* another layer of multipartness... */
add_attachments_from_multipart (composer, (CamelMultipart *) wrapper, just_inlines, depth + 1);
@@ -4210,9 +4210,9 @@ add_attachments_from_multipart (EMsgComposer *composer, CamelMultipart *multipar
CamelMimePart *mime_part;
gboolean related;
int i, nparts;
-
+
related = camel_content_type_is (CAMEL_DATA_WRAPPER (multipart)->mime_type, "multipart", "related");
-
+
if (CAMEL_IS_MULTIPART_SIGNED (multipart)) {
mime_part = camel_multipart_get_part (multipart, CAMEL_MULTIPART_SIGNED_CONTENT);
add_attachments_handle_mime_part (composer, mime_part, just_inlines, related, depth);
@@ -4244,11 +4244,11 @@ e_msg_composer_add_message_attachments (EMsgComposer *composer, CamelMimeMessage
gboolean just_inlines)
{
CamelDataWrapper *wrapper;
-
+
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (message));
if (!CAMEL_IS_MULTIPART (wrapper))
return;
-
+
/* there must be attachments... */
add_attachments_from_multipart (composer, (CamelMultipart *) wrapper, just_inlines, 0);
}
@@ -4260,27 +4260,27 @@ handle_multipart_signed (EMsgComposer *composer, CamelMultipart *multipart, int
CamelContentType *content_type;
CamelDataWrapper *content;
CamelMimePart *mime_part;
-
+
/* FIXME: make sure this isn't an s/mime signed part?? */
e_msg_composer_set_pgp_sign (composer, TRUE);
-
+
mime_part = camel_multipart_get_part (multipart, CAMEL_MULTIPART_SIGNED_CONTENT);
if (!mime_part)
return;
content_type = camel_mime_part_get_content_type (mime_part);
-
+
content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
-
+
if (CAMEL_IS_MULTIPART (content)) {
multipart = CAMEL_MULTIPART (content);
-
+
/* Note: depth is preserved here because we're not
counting multipart/signed as a multipart, instead
we want to treat the content part as our mime part
here. */
-
+
if (CAMEL_IS_MULTIPART_SIGNED (content)) {
/* handle the signed content and configure the composer to sign outgoing messages */
handle_multipart_signed (composer, multipart, depth);
@@ -4317,7 +4317,7 @@ handle_multipart_encrypted (EMsgComposer *composer, CamelMimePart *multipart, in
/* FIXME: make sure this is a PGP/MIME encrypted part?? */
e_msg_composer_set_pgp_encrypt (composer, TRUE);
-
+
camel_exception_init (&ex);
cipher = mail_crypto_get_pgp_cipher_context (NULL);
mime_part = camel_mime_part_new();
@@ -4325,21 +4325,21 @@ handle_multipart_encrypted (EMsgComposer *composer, CamelMimePart *multipart, in
camel_object_unref(cipher);
camel_exception_clear (&ex);
if (valid == NULL)
- return;
+ return;
camel_cipher_validity_free(valid);
-
+
content_type = camel_mime_part_get_content_type (mime_part);
-
+
content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
-
+
if (CAMEL_IS_MULTIPART (content)) {
CamelMultipart *content_multipart = CAMEL_MULTIPART (content);
-
+
/* Note: depth is preserved here because we're not
counting multipart/encrypted as a multipart, instead
we want to treat the content part as our mime part
here. */
-
+
if (CAMEL_IS_MULTIPART_SIGNED (content)) {
/* handle the signed content and configure the composer to sign outgoing messages */
handle_multipart_signed (composer, content_multipart, depth);
@@ -4362,7 +4362,7 @@ handle_multipart_encrypted (EMsgComposer *composer, CamelMimePart *multipart, in
} else {
e_msg_composer_attach (composer, mime_part);
}
-
+
camel_object_unref (mime_part);
}
@@ -4372,14 +4372,14 @@ handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart,
/* Find the text/html part and set the composer body to it's contents */
CamelMimePart *text_part = NULL;
int i, nparts;
-
+
nparts = camel_multipart_get_number (multipart);
-
+
for (i = 0; i < nparts; i++) {
CamelContentType *content_type;
CamelDataWrapper *content;
CamelMimePart *mime_part;
-
+
mime_part = camel_multipart_get_part (multipart, i);
if (!mime_part)
@@ -4387,12 +4387,12 @@ handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart,
content_type = camel_mime_part_get_content_type (mime_part);
content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
-
+
if (CAMEL_IS_MULTIPART (content)) {
CamelMultipart *mp;
-
+
mp = CAMEL_MULTIPART (content);
-
+
if (CAMEL_IS_MULTIPART_SIGNED (content)) {
/* handle the signed content and configure the composer to sign outgoing messages */
handle_multipart_signed (composer, mp, depth + 1);
@@ -4416,7 +4416,7 @@ handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart,
e_msg_composer_attach (composer, mime_part);
}
}
-
+
if (text_part) {
ssize_t len;
char *html;
@@ -4430,9 +4430,9 @@ static void
handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth)
{
int i, nparts;
-
+
nparts = camel_multipart_get_number (multipart);
-
+
for (i = 0; i < nparts; i++) {
CamelContentType *content_type;
CamelDataWrapper *content;
@@ -4445,12 +4445,12 @@ handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth)
content_type = camel_mime_part_get_content_type (mime_part);
content = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
-
+
if (CAMEL_IS_MULTIPART (content)) {
CamelMultipart *mp;
-
+
mp = CAMEL_MULTIPART (content);
-
+
if (CAMEL_IS_MULTIPART_SIGNED (content)) {
/* handle the signed content and configure the composer to sign outgoing messages */
handle_multipart_signed (composer, mp, depth + 1);
@@ -4486,13 +4486,13 @@ set_signature_gui (EMsgComposer *composer)
{
CORBA_Environment ev;
EMsgComposerPrivate *p = composer->priv;
-
+
p->signature = NULL;
-
+
CORBA_exception_init (&ev);
if (GNOME_GtkHTML_Editor_Engine_searchByData (p->eeditor_engine, 1, "ClueFlow", "signature", "1", &ev)) {
char *name, *str = NULL;
-
+
str = GNOME_GtkHTML_Editor_Engine_getParagraphData (p->eeditor_engine, "signature_name", &ev);
if (ev._major == CORBA_NO_EXCEPTION && str) {
if (!strncmp (str, "uid:", 4)) {
@@ -4505,7 +4505,7 @@ set_signature_gui (EMsgComposer *composer)
g_free (name);
}
}
-
+
sig_select_item (composer);
}
CORBA_exception_free (&ev);
@@ -4515,7 +4515,7 @@ set_signature_gui (EMsgComposer *composer)
/**
* e_msg_composer_new_with_message:
* @message: The message to use as the source
- *
+ *
* Create a new message composer widget.
*
* Note: Designed to work only for messages constructed using Evolution.
@@ -4539,7 +4539,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
struct _camel_header_raw *xev;
int len, i;
EMsgComposerPrivate *p;
-
+
for (headers = CAMEL_MIME_PART (message)->headers;headers;headers = headers->next) {
if (!strcmp(headers->name, "X-Evolution-PostTo"))
postto = g_list_append(postto, g_strstrip(g_strdup(headers->value)));
@@ -4547,26 +4547,26 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
new = create_composer (postto ? E_MSG_COMPOSER_VISIBLE_MASK_POST : E_MSG_COMPOSER_VISIBLE_MASK_MAIL);
p = new->priv;
-
+
if (!new) {
g_list_foreach(postto, (GFunc)g_free, NULL);
g_list_free(postto);
return NULL;
}
-
+
if (postto) {
e_msg_composer_hdrs_set_post_to_list(E_MSG_COMPOSER_HDRS (p->hdrs), postto);
g_list_foreach(postto, (GFunc)g_free, NULL);
g_list_free(postto);
postto = NULL;
}
-
+
/* Restore the Account preference */
account_name = (char *) camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account");
if (account_name) {
account_name = g_strdup (account_name);
g_strstrip (account_name);
-
+
if ((account = mail_config_get_account_by_uid(account_name)) == NULL)
/* 'old' setting */
account = mail_config_get_account_by_name(account_name);
@@ -4575,7 +4575,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
account_name = g_strdup (account->name);
}
}
-
+
if (postto == NULL) {
auto_cc = g_hash_table_new_full (
camel_strcase_hash, camel_strcase_equal,
@@ -4586,50 +4586,50 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
camel_strcase_hash, camel_strcase_equal,
(GDestroyNotify) g_free,
(GDestroyNotify) NULL);
-
+
if (account) {
CamelInternetAddress *iaddr;
-
+
/* hash our auto-recipients for this account */
if (account->always_cc) {
iaddr = camel_internet_address_new ();
if (camel_address_decode (CAMEL_ADDRESS (iaddr), account->cc_addrs) != -1) {
for (i = 0; i < camel_address_length (CAMEL_ADDRESS (iaddr)); i++) {
const char *name, *addr;
-
+
if (!camel_internet_address_get (iaddr, i, &name, &addr))
continue;
-
+
g_hash_table_insert (auto_cc, g_strdup (addr), GINT_TO_POINTER (TRUE));
}
}
camel_object_unref (iaddr);
}
-
+
if (account->always_bcc) {
iaddr = camel_internet_address_new ();
if (camel_address_decode (CAMEL_ADDRESS (iaddr), account->bcc_addrs) != -1) {
for (i = 0; i < camel_address_length (CAMEL_ADDRESS (iaddr)); i++) {
const char *name, *addr;
-
+
if (!camel_internet_address_get (iaddr, i, &name, &addr))
continue;
-
+
g_hash_table_insert (auto_bcc, g_strdup (addr), GINT_TO_POINTER (TRUE));
}
}
camel_object_unref (iaddr);
}
}
-
+
to = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
cc = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
bcc = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_BCC);
-
+
len = CAMEL_ADDRESS (to)->addresses->len;
for (i = 0; i < len; i++) {
const char *name, *addr;
-
+
if (camel_internet_address_get (to, i, &name, &addr)) {
EDestination *dest = e_destination_new ();
e_destination_set_name (dest, name);
@@ -4639,43 +4639,43 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
}
Tov = destination_list_to_vector (To);
g_list_free (To);
-
+
len = CAMEL_ADDRESS (cc)->addresses->len;
for (i = 0; i < len; i++) {
const char *name, *addr;
-
+
if (camel_internet_address_get (cc, i, &name, &addr)) {
EDestination *dest = e_destination_new ();
e_destination_set_name (dest, name);
e_destination_set_email (dest, addr);
-
+
if (g_hash_table_lookup (auto_cc, addr))
e_destination_set_auto_recipient (dest, TRUE);
-
+
Cc = g_list_append (Cc, dest);
}
}
-
+
Ccv = destination_list_to_vector (Cc);
g_hash_table_destroy (auto_cc);
g_list_free (Cc);
-
+
len = CAMEL_ADDRESS (bcc)->addresses->len;
for (i = 0; i < len; i++) {
const char *name, *addr;
-
+
if (camel_internet_address_get (bcc, i, &name, &addr)) {
EDestination *dest = e_destination_new ();
e_destination_set_name (dest, name);
e_destination_set_email (dest, addr);
-
+
if (g_hash_table_lookup (auto_bcc, addr))
e_destination_set_auto_recipient (dest, TRUE);
-
+
Bcc = g_list_append (Bcc, dest);
}
}
-
+
Bccv = destination_list_to_vector (Bcc);
g_hash_table_destroy (auto_bcc);
g_list_free (Bcc);
@@ -4684,17 +4684,17 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
Ccv = NULL;
Bccv = NULL;
}
-
+
subject = camel_mime_message_get_subject (message);
-
+
e_msg_composer_set_headers (new, account_name, Tov, Ccv, Bccv, subject);
-
+
g_free (account_name);
-
+
e_destination_freev (Tov);
e_destination_freev (Ccv);
e_destination_freev (Bccv);
-
+
/* Restore the format editing preference */
format = camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Format");
if (format) {
@@ -4722,11 +4722,11 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
}
g_strfreev(flags);
}
-
+
/* Remove any other X-Evolution-* headers that may have been set */
xev = mail_tool_remove_xevolution_headers (message);
camel_header_raw_clear(&xev);
-
+
/* set extra headers */
headers = CAMEL_MIME_PART (message)->headers;
while (headers) {
@@ -4736,18 +4736,18 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
g_ptr_array_add (p->extra_hdr_names, g_strdup (headers->name));
g_ptr_array_add (p->extra_hdr_values, g_strdup (headers->value));
}
-
+
headers = headers->next;
}
-
+
/* Restore the attachments and body text */
content = camel_medium_get_content_object (CAMEL_MEDIUM (message));
if (CAMEL_IS_MULTIPART (content)) {
CamelMultipart *multipart;
-
+
multipart = CAMEL_MULTIPART (content);
content_type = camel_mime_part_get_content_type (CAMEL_MIME_PART (message));
-
+
if (CAMEL_IS_MULTIPART_SIGNED (content)) {
/* handle the signed content and configure the composer to sign outgoing messages */
handle_multipart_signed (new, multipart, 0);
@@ -4768,14 +4768,14 @@ e_msg_composer_new_with_message (CamelMimeMessage *message)
html = em_utils_part_to_html((CamelMimePart *)message, &length, NULL);
e_msg_composer_set_pending_body(new, html, length);
}
-
+
/* We wait until now to set the body text because we need to ensure that
* the attachment bar has all the attachments, before we request them.
- */
+ */
e_msg_composer_flush_pending_body (new, TRUE);
-
+
set_signature_gui (new);
-
+
return new;
}
@@ -4788,9 +4788,9 @@ disable_editor (EMsgComposer *composer)
CORBA_exception_init (&ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "editable-off", &ev);
CORBA_exception_free (&ev);
-
+
gtk_widget_set_sensitive (p->attachment_bar, FALSE);
-
+
bonobo_ui_component_set_prop (p->uic, "/menu/Edit", "sensitive", "0", NULL);
bonobo_ui_component_set_prop (p->uic, "/menu/Format", "sensitive", "0", NULL);
bonobo_ui_component_set_prop (p->uic, "/menu/Insert", "sensitive", "0", NULL);
@@ -4799,7 +4799,7 @@ disable_editor (EMsgComposer *composer)
/**
* e_msg_composer_new_redirect:
* @message: The message to use as the source
- *
+ *
* Create a new message composer widget.
*
* Return value: A pointer to the newly created widget
@@ -4810,21 +4810,21 @@ e_msg_composer_new_redirect (CamelMimeMessage *message, const char *resent_from)
EMsgComposer *composer;
EMsgComposerPrivate *p;
const char *subject;
-
+
g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
-
+
composer = e_msg_composer_new_with_message (message);
p = composer->priv;
-
+
subject = camel_mime_message_get_subject (message);
-
+
p->redirect = message;
camel_object_ref (message);
-
+
e_msg_composer_set_headers (composer, resent_from, NULL, NULL, NULL, subject);
-
+
disable_editor (composer);
-
+
return composer;
}
@@ -4835,20 +4835,20 @@ add_recipients (GList *list, const char *recips)
CamelInternetAddress *cia;
const char *name, *addr;
int num, i;
-
+
cia = camel_internet_address_new ();
num = camel_address_decode (CAMEL_ADDRESS (cia), recips);
-
+
for (i = 0; i < num; i++) {
if (camel_internet_address_get (cia, i, &name, &addr)) {
EDestination *dest = e_destination_new ();
e_destination_set_name (dest, name);
e_destination_set_email (dest, addr);
-
+
list = g_list_append (list, dest);
}
}
-
+
return list;
}
@@ -4865,9 +4865,9 @@ handle_mailto (EMsgComposer *composer, const char *mailto)
const char *p;
int len, clen;
CamelURL *url;
-
+
buf = g_strdup (mailto);
-
+
/* Parse recipients (everything after ':' until '?' or eos). */
p = buf + 7;
len = strcspn (p, "?");
@@ -4877,27 +4877,27 @@ handle_mailto (EMsgComposer *composer, const char *mailto)
to = add_recipients (to, content);
g_free (content);
}
-
+
p += len;
if (*p == '?') {
p++;
-
+
while (*p) {
len = strcspn (p, "=&");
-
+
/* If it's malformed, give up. */
if (p[len] != '=')
break;
-
+
header = (char *) p;
header[len] = '\0';
p += len + 1;
-
+
clen = strcspn (p, "&");
-
+
content = g_strndup (p, clen);
camel_url_decode (content);
-
+
if (!g_ascii_strcasecmp (header, "to")) {
to = add_recipients (to, content);
} else if (!g_ascii_strcasecmp (header, "cc")) {
@@ -4945,7 +4945,7 @@ handle_mailto (EMsgComposer *composer, const char *mailto)
"attachment");
}
gtk_widget_show (priv->attachment_expander);
- gtk_widget_show (priv->attachment_scrolled_window);
+ gtk_widget_show (priv->attachment_scrolled_window);
} else if (!g_ascii_strcasecmp (header, "from")) {
/* Ignore */
} else if (!g_ascii_strcasecmp (header, "reply-to")) {
@@ -4954,9 +4954,9 @@ handle_mailto (EMsgComposer *composer, const char *mailto)
/* add an arbitrary header? */
e_msg_composer_add_header (composer, header, content);
}
-
+
g_free (content);
-
+
p += clen;
if (*p == '&') {
p++;
@@ -4965,35 +4965,35 @@ handle_mailto (EMsgComposer *composer, const char *mailto)
}
}
}
-
+
g_free (buf);
-
+
tov = destination_list_to_vector (to);
ccv = destination_list_to_vector (cc);
bccv = destination_list_to_vector (bcc);
-
+
g_list_free (to);
g_list_free (cc);
g_list_free (bcc);
-
+
hdrs = E_MSG_COMPOSER_HDRS (priv->hdrs);
-
+
e_msg_composer_hdrs_set_to (hdrs, tov);
e_msg_composer_hdrs_set_cc (hdrs, ccv);
e_msg_composer_hdrs_set_bcc (hdrs, bccv);
-
+
e_destination_freev (tov);
e_destination_freev (ccv);
e_destination_freev (bccv);
-
+
if (subject) {
e_msg_composer_hdrs_set_subject (hdrs, subject);
g_free (subject);
}
-
+
if (body) {
char *htmlbody;
-
+
htmlbody = camel_text_to_html (body, CAMEL_MIME_FILTER_TOHTML_PRE, 0);
set_editor_text (composer, htmlbody, -1, FALSE, FALSE);
g_free (htmlbody);
@@ -5043,15 +5043,15 @@ EMsgComposer *
e_msg_composer_new_from_url (const char *url)
{
EMsgComposer *composer;
-
+
g_return_val_if_fail (g_ascii_strncasecmp (url, "mailto:", 7) == 0, NULL);
-
+
composer = e_msg_composer_new ();
if (!composer)
return NULL;
-
+
handle_mailto (composer, url);
-
+
return composer;
}
@@ -5067,7 +5067,7 @@ e_msg_composer_new_from_url (const char *url)
*
* Sets the headers in the composer to the given values.
**/
-void
+void
e_msg_composer_set_headers (EMsgComposer *composer,
const char *from,
EDestination **to,
@@ -5077,11 +5077,11 @@ e_msg_composer_set_headers (EMsgComposer *composer,
{
EMsgComposerHdrs *hdrs;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
hdrs = E_MSG_COMPOSER_HDRS (p->hdrs);
-
+
e_msg_composer_hdrs_set_to (hdrs, to);
e_msg_composer_hdrs_set_cc (hdrs, cc);
e_msg_composer_hdrs_set_bcc (hdrs, bcc);
@@ -5102,7 +5102,7 @@ e_msg_composer_set_body_text (EMsgComposer *composer, const char *text, ssize_t
{
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
g_return_if_fail (text != NULL);
-
+
set_editor_text (composer, text, len, TRUE, *text == '\0');
}
@@ -5121,11 +5121,11 @@ e_msg_composer_set_body (EMsgComposer *composer, const char *body,
{
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
set_editor_text (composer, _("<b>(The composer contains a non-text message body, which cannot be edited.)</b>"), -1, FALSE, FALSE);
e_msg_composer_set_send_html (composer, FALSE);
disable_editor (composer);
-
+
g_free (p->mime_body);
p->mime_body = g_strdup (body);
g_free (p->mime_type);
@@ -5158,7 +5158,7 @@ e_msg_composer_add_header (EMsgComposer *composer, const char *name,
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
g_return_if_fail (name != NULL);
g_return_if_fail (value != NULL);
-
+
g_ptr_array_add (p->extra_hdr_names, g_strdup (name));
g_ptr_array_add (p->extra_hdr_values, g_strdup (value));
}
@@ -5169,19 +5169,19 @@ e_msg_composer_add_header (EMsgComposer *composer, const char *name,
* @change_value: the header value to put in place of the previous
* value
*
- * Searches for a header with name=@name ,if found it removes
- * that header and adds a new header with the @name and @change_value .
+ * Searches for a header with name=@name ,if found it removes
+ * that header and adds a new header with the @name and @change_value .
* If not found then it creates a new header with @name and @change_value .
**/
-void
+void
e_msg_composer_modify_header (EMsgComposer *composer, const char *name,
const char *change_value)
{
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
g_return_if_fail (name != NULL);
g_return_if_fail (change_value != NULL);
-
- e_msg_composer_remove_header (composer, name);
+
+ e_msg_composer_remove_header (composer, name);
e_msg_composer_add_header (composer, name, change_value);
}
@@ -5191,7 +5191,7 @@ e_msg_composer_modify_header (EMsgComposer *composer, const char *name,
* @name: the header name
*
* Searches for the header and if found it removes it .
- **/
+ **/
void
e_msg_composer_remove_header (EMsgComposer *composer, const char *name)
{
@@ -5205,7 +5205,7 @@ e_msg_composer_remove_header (EMsgComposer *composer, const char *name)
for (i = 0; i < p->extra_hdr_names->len; i++) {
if (strcmp (p->extra_hdr_names->pdata[i], name) == 0) {
- g_print ("Hit : %s",name);
+ g_print ("Hit : %s",name);
g_ptr_array_remove_index (p->extra_hdr_names, i);
g_ptr_array_remove_index (p->extra_hdr_values, i);
}
@@ -5223,10 +5223,10 @@ e_msg_composer_attach (EMsgComposer *composer, CamelMimePart *attachment)
{
EAttachmentBar *bar;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
g_return_if_fail (CAMEL_IS_MIME_PART (attachment));
-
+
bar = E_ATTACHMENT_BAR (p->attachment_bar);
e_attachment_bar_attach_mime_part (bar, attachment);
@@ -5258,45 +5258,45 @@ e_msg_composer_add_inline_image_from_file (EMsgComposer *composer,
dec_file_name = g_strdup(file_name);
camel_url_decode(dec_file_name);
-
+
/* check for regular file */
if (g_stat (dec_file_name, &statbuf) < 0 || !S_ISREG (statbuf.st_mode))
return NULL;
-
+
stream = camel_stream_fs_new_with_name (dec_file_name, O_RDONLY, 0);
if (!stream)
return NULL;
-
+
wrapper = camel_data_wrapper_new ();
camel_data_wrapper_construct_from_stream (wrapper, stream);
camel_object_unref (CAMEL_OBJECT (stream));
-
+
mime_type = e_msg_composer_guess_mime_type (dec_file_name);
camel_data_wrapper_set_mime_type (wrapper, mime_type ? mime_type : "application/octet-stream");
g_free (mime_type);
-
+
part = camel_mime_part_new ();
camel_medium_set_content_object (CAMEL_MEDIUM (part), wrapper);
camel_object_unref (wrapper);
-
+
cid = camel_header_msgid_generate ();
camel_mime_part_set_content_id (part, cid);
name = g_path_get_basename(dec_file_name);
camel_mime_part_set_filename (part, name);
g_free(name);
camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_BASE64);
-
+
url = g_strdup_printf ("file:%s", dec_file_name);
g_hash_table_insert (p->inline_images_by_url, url, part);
-
+
url = g_strdup_printf ("cid:%s", cid);
g_hash_table_insert (p->inline_images, url, part);
g_free (cid);
g_free(dec_file_name);
-
+
return part;
-}
+}
/**
@@ -5320,11 +5320,11 @@ e_msg_composer_add_inline_image_from_mime_part (EMsgComposer *composer,
camel_mime_part_set_content_id (part, NULL);
cid = camel_mime_part_get_content_id (part);
}
-
+
url = g_strdup_printf ("cid:%s", cid);
g_hash_table_insert (p->inline_images, url, part);
camel_object_ref (part);
-
+
location = camel_mime_part_get_content_location (part);
if (location) {
g_hash_table_insert (p->inline_images_by_url,
@@ -5336,11 +5336,11 @@ e_msg_composer_add_inline_image_from_mime_part (EMsgComposer *composer,
/**
* e_msg_composer_get_message:
* @composer: A message composer widget
- *
+ *
* Retrieve the message edited by the user as a CamelMimeMessage. The
* CamelMimeMessage object is created on the fly; subsequent calls to this
* function will always create new objects from scratch.
- *
+ *
* Return value: A pointer to the new CamelMimeMessage object
**/
CamelMimeMessage *
@@ -5352,7 +5352,7 @@ e_msg_composer_get_message (EMsgComposer *composer, gboolean save_html_object_da
return NULL;
}
}
-
+
return build_message (composer, save_html_object_data);
}
@@ -5409,7 +5409,7 @@ e_msg_composer_get_message_draft (EMsgComposer *composer)
GString *flags;
int i;
EMsgComposerPrivate *p = composer->priv;
-
+
/* always save drafts as HTML to preserve formatting */
old_send_html = p->send_html;
p->send_html = TRUE;
@@ -5421,20 +5421,20 @@ e_msg_composer_get_message_draft (EMsgComposer *composer)
p->smime_sign = FALSE;
old_flags[3] = p->smime_encrypt;
p->smime_encrypt = FALSE;
-
+
msg = build_message (composer, TRUE);
-
+
p->send_html = old_send_html;
p->pgp_sign = old_flags[0];
p->pgp_encrypt = old_flags[1];
p->smime_sign = old_flags[2];
p->smime_encrypt = old_flags[3];
-
+
/* Attach account info to the draft. */
account = e_msg_composer_get_preferred_account (composer);
if (account && account->name)
camel_medium_set_header (CAMEL_MEDIUM (msg), "X-Evolution-Account", account->uid);
-
+
/* build_message() set this to text/html since we set p->send_html to
TRUE before calling e_msg_composer_get_message() */
if (!p->send_html)
@@ -5461,7 +5461,7 @@ delete_old_signature (EMsgComposer *composer)
{
CORBA_Environment ev;
EMsgComposerPrivate *p = composer->priv;
-
+
/* printf ("delete_old_signature\n"); */
CORBA_exception_init (&ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "block-selection", &ev);
@@ -5484,7 +5484,7 @@ delete_old_signature (EMsgComposer *composer)
/**
* e_msg_composer_show_sig:
* @composer: A message composer widget
- *
+ *
* Set a signature
**/
void
@@ -5494,7 +5494,7 @@ e_msg_composer_show_sig_file (EMsgComposer *composer)
char *html;
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
/* printf ("e_msg_composer_show_sig_file\n"); */
/* printf ("set sig '%s' '%s'\n", sig_file, p->sig_file); */
if (!p->redirect) {
@@ -5503,7 +5503,7 @@ e_msg_composer_show_sig_file (EMsgComposer *composer)
GNOME_GtkHTML_Editor_Engine_freeze (p->eeditor_engine, &ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "cursor-position-save", &ev);
GNOME_GtkHTML_Editor_Engine_undoBegin (p->eeditor_engine, "Set signature", "Reset signature", &ev);
-
+
delete_old_signature (composer);
html = get_signature_html (composer);
if (html) {
@@ -5519,7 +5519,7 @@ e_msg_composer_show_sig_file (EMsgComposer *composer)
GNOME_GtkHTML_Editor_Engine_insertHTML (p->eeditor_engine, html, &ev);
g_free (html);
}
-
+
GNOME_GtkHTML_Editor_Engine_undoEnd (p->eeditor_engine, &ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "cursor-position-restore", &ev);
GNOME_GtkHTML_Editor_Engine_thaw (p->eeditor_engine, &ev);
@@ -5534,7 +5534,7 @@ e_msg_composer_show_sig_file (EMsgComposer *composer)
* e_msg_composer_set_send_html:
* @composer: A message composer widget
* @send_html: Whether the composer should have the "Send HTML" flag set
- *
+ *
* Set the status of the "Send HTML" toggle item. The user can override it.
**/
void
@@ -5543,30 +5543,30 @@ e_msg_composer_set_send_html (EMsgComposer *composer,
{
CORBA_Environment ev;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if (p->send_html && send_html)
return;
-
+
if (!p->send_html && !send_html)
return;
-
+
p->send_html = send_html;
-
+
CORBA_exception_init (&ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "block-redraw", &ev);
CORBA_exception_free (&ev);
-
+
bonobo_ui_component_set_prop (p->uic, "/commands/FormatHtml",
"state", p->send_html ? "1" : "0", NULL);
-
+
/* let the editor know which mode we are in */
bonobo_widget_set_property (BONOBO_WIDGET (p->eeditor),
"FormatHTML", TC_CORBA_boolean,
p->send_html, NULL);
-
-
+
+
CORBA_exception_init (&ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "unblock-redraw", &ev);
CORBA_exception_free (&ev);
@@ -5576,9 +5576,9 @@ e_msg_composer_set_send_html (EMsgComposer *composer,
/**
* e_msg_composer_get_send_html:
* @composer: A message composer widget
- *
+ *
* Get the status of the "Send HTML mail" flag.
- *
+ *
* Return value: The status of the "Send HTML mail" flag.
**/
gboolean
@@ -5587,7 +5587,7 @@ e_msg_composer_get_send_html (EMsgComposer *composer)
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->send_html;
}
@@ -5603,11 +5603,11 @@ e_msg_composer_get_preferred_account (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
EMsgComposerHdrs *hdrs;
-
+
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
+
hdrs = E_MSG_COMPOSER_HDRS (p->hdrs);
-
+
return hdrs->account;
}
@@ -5616,7 +5616,7 @@ e_msg_composer_get_preferred_account (EMsgComposer *composer)
* e_msg_composer_set_pgp_sign:
* @composer: A message composer widget
* @send_html: Whether the composer should have the "PGP Sign" flag set
- *
+ *
* Set the status of the "PGP Sign" toggle item. The user can override it.
**/
void
@@ -5624,15 +5624,15 @@ e_msg_composer_set_pgp_sign (EMsgComposer *composer, gboolean pgp_sign)
{
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if (p->pgp_sign && pgp_sign)
return;
if (!p->pgp_sign && !pgp_sign)
return;
-
+
p->pgp_sign = pgp_sign;
e_msg_composer_set_changed (composer);
-
+
bonobo_ui_component_set_prop (p->uic, "/commands/SecurityPGPSign",
"state", p->pgp_sign ? "1" : "0", NULL);
}
@@ -5641,9 +5641,9 @@ e_msg_composer_set_pgp_sign (EMsgComposer *composer, gboolean pgp_sign)
/**
* e_msg_composer_get_pgp_sign:
* @composer: A message composer widget
- *
+ *
* Get the status of the "PGP Sign" flag.
- *
+ *
* Return value: The status of the "PGP Sign" flag.
**/
gboolean
@@ -5651,7 +5651,7 @@ e_msg_composer_get_pgp_sign (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->pgp_sign;
}
@@ -5660,7 +5660,7 @@ e_msg_composer_get_pgp_sign (EMsgComposer *composer)
* e_msg_composer_set_pgp_encrypt:
* @composer: A message composer widget
* @send_html: Whether the composer should have the "PGP Encrypt" flag set
- *
+ *
* Set the status of the "PGP Encrypt" toggle item. The user can override it.
**/
void
@@ -5668,15 +5668,15 @@ e_msg_composer_set_pgp_encrypt (EMsgComposer *composer, gboolean pgp_encrypt)
{
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if (p->pgp_encrypt && pgp_encrypt)
return;
if (!p->pgp_encrypt && !pgp_encrypt)
return;
-
+
p->pgp_encrypt = pgp_encrypt;
e_msg_composer_set_changed (composer);
-
+
bonobo_ui_component_set_prop (p->uic, "/commands/SecurityPGPEncrypt",
"state", p->pgp_encrypt ? "1" : "0", NULL);
}
@@ -5685,9 +5685,9 @@ e_msg_composer_set_pgp_encrypt (EMsgComposer *composer, gboolean pgp_encrypt)
/**
* e_msg_composer_get_pgp_encrypt:
* @composer: A message composer widget
- *
+ *
* Get the status of the "PGP Encrypt" flag.
- *
+ *
* Return value: The status of the "PGP Encrypt" flag.
**/
gboolean
@@ -5695,7 +5695,7 @@ e_msg_composer_get_pgp_encrypt (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->pgp_encrypt;
}
@@ -5704,7 +5704,7 @@ e_msg_composer_get_pgp_encrypt (EMsgComposer *composer)
* e_msg_composer_set_smime_sign:
* @composer: A message composer widget
* @send_html: Whether the composer should have the "S/MIME Sign" flag set
- *
+ *
* Set the status of the "S/MIME Sign" toggle item. The user can override it.
**/
void
@@ -5712,13 +5712,13 @@ e_msg_composer_set_smime_sign (EMsgComposer *composer, gboolean smime_sign)
{
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if (p->smime_sign && smime_sign)
return;
if (!p->smime_sign && !smime_sign)
return;
-
- p->smime_sign = smime_sign;
+
+ p->smime_sign = smime_sign;
e_msg_composer_set_changed (composer);
bonobo_ui_component_set_prop (p->uic, "/commands/SecuritySMimeSign",
@@ -5729,9 +5729,9 @@ e_msg_composer_set_smime_sign (EMsgComposer *composer, gboolean smime_sign)
/**
* e_msg_composer_get_smime_sign:
* @composer: A message composer widget
- *
+ *
* Get the status of the "S/MIME Sign" flag.
- *
+ *
* Return value: The status of the "S/MIME Sign" flag.
**/
gboolean
@@ -5739,7 +5739,7 @@ e_msg_composer_get_smime_sign (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->smime_sign;
}
@@ -5748,7 +5748,7 @@ e_msg_composer_get_smime_sign (EMsgComposer *composer)
* e_msg_composer_set_smime_encrypt:
* @composer: A message composer widget
* @send_html: Whether the composer should have the "S/MIME Encrypt" flag set
- *
+ *
* Set the status of the "S/MIME Encrypt" toggle item. The user can override it.
**/
void
@@ -5756,15 +5756,15 @@ e_msg_composer_set_smime_encrypt (EMsgComposer *composer, gboolean smime_encrypt
{
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if (p->smime_encrypt && smime_encrypt)
return;
if (!p->smime_encrypt && !smime_encrypt)
return;
-
+
p->smime_encrypt = smime_encrypt;
e_msg_composer_set_changed (composer);
-
+
bonobo_ui_component_set_prop (p->uic, "/commands/SecuritySMimeEncrypt",
"state", p->smime_encrypt ? "1" : "0", NULL);
}
@@ -5773,9 +5773,9 @@ e_msg_composer_set_smime_encrypt (EMsgComposer *composer, gboolean smime_encrypt
/**
* e_msg_composer_get_smime_encrypt:
* @composer: A message composer widget
- *
+ *
* Get the status of the "S/MIME Encrypt" flag.
- *
+ *
* Return value: The status of the "S/MIME Encrypt" flag.
**/
gboolean
@@ -5783,7 +5783,7 @@ e_msg_composer_get_smime_encrypt (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->smime_encrypt;
}
@@ -5791,9 +5791,9 @@ e_msg_composer_get_smime_encrypt (EMsgComposer *composer)
/**
* e_msg_composer_get_view_from:
* @composer: A message composer widget
- *
+ *
* Get the status of the "View From header" flag.
- *
+ *
* Return value: The status of the "View From header" flag.
**/
gboolean
@@ -5801,7 +5801,7 @@ e_msg_composer_get_view_from (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->view_from;
}
@@ -5818,21 +5818,21 @@ e_msg_composer_set_view_from (EMsgComposer *composer, gboolean view_from)
{
EMsgComposerPrivate *p = composer->priv;
GConfClient *gconf;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if ((p->view_from && view_from) ||
(!p->view_from && !view_from))
return;
-
+
p->view_from = view_from;
bonobo_ui_component_set_prop (p->uic, "/commands/ViewFrom",
"state", p->view_from ? "1" : "0", NULL);
-
+
gconf = gconf_client_get_default ();
gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/From", view_from, NULL);
g_object_unref (gconf);
-
+
e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (p->hdrs),
e_msg_composer_get_visible_flags (composer));
}
@@ -5851,7 +5851,7 @@ e_msg_composer_get_view_replyto (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->view_replyto;
}
@@ -5868,22 +5868,22 @@ e_msg_composer_set_view_replyto (EMsgComposer *composer, gboolean view_replyto)
{
EMsgComposerPrivate *p = composer->priv;
GConfClient *gconf;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if ((p->view_replyto && view_replyto) ||
(!p->view_replyto && !view_replyto))
return;
-
+
p->view_replyto = view_replyto;
bonobo_ui_component_set_prop (p->uic, "/commands/ViewReplyTo",
"state", p->view_replyto ? "1" : "0", NULL);
-
+
/* we do this /only/ if the fields is in the visible_mask */
gconf = gconf_client_get_default ();
gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/ReplyTo", view_replyto, NULL);
g_object_unref (gconf);
-
+
e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (p->hdrs),
e_msg_composer_get_visible_flags (composer));
}
@@ -5902,7 +5902,7 @@ e_msg_composer_get_view_to (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->view_to;
}
@@ -5919,23 +5919,23 @@ e_msg_composer_set_view_to (EMsgComposer *composer, gboolean view_to)
{
EMsgComposerPrivate *p = composer->priv;
GConfClient *gconf;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if ((p->view_to && view_to) ||
(!p->view_to && !view_to))
return;
-
+
p->view_to = view_to;
bonobo_ui_component_set_prop (p->uic, "/commands/ViewTo",
"state", p->view_to ? "1" : "0", NULL);
-
+
if ((E_MSG_COMPOSER_HDRS(p->hdrs))->visible_mask & E_MSG_COMPOSER_VISIBLE_TO) {
gconf = gconf_client_get_default ();
gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/To", view_to, NULL);
g_object_unref (gconf);
}
-
+
e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (p->hdrs),
e_msg_composer_get_visible_flags (composer));
}
@@ -5955,7 +5955,7 @@ e_msg_composer_get_view_postto (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->view_postto;
}
@@ -5972,23 +5972,23 @@ e_msg_composer_set_view_postto (EMsgComposer *composer, gboolean view_postto)
{
GConfClient *gconf;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if ((p->view_postto && view_postto) ||
(!p->view_postto && !view_postto))
return;
-
+
p->view_postto = view_postto;
bonobo_ui_component_set_prop (p->uic, "/commands/ViewPostTo",
"state", p->view_postto ? "1" : "0", NULL);
-
+
if ((E_MSG_COMPOSER_HDRS(p->hdrs))->visible_mask & E_MSG_COMPOSER_VISIBLE_POSTTO) {
gconf = gconf_client_get_default ();
gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/PostTo", view_postto, NULL);
g_object_unref (gconf);
}
-
+
e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (p->hdrs),
e_msg_composer_get_visible_flags (composer));
}
@@ -5998,9 +5998,9 @@ e_msg_composer_set_view_postto (EMsgComposer *composer, gboolean view_postto)
/**
* e_msg_composer_get_view_cc:
* @composer: A message composer widget
- *
+ *
* Get the status of the "View CC header" flag.
- *
+ *
* Return value: The status of the "View CC header" flag.
**/
gboolean
@@ -6008,7 +6008,7 @@ e_msg_composer_get_view_cc (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->view_cc;
}
@@ -6025,23 +6025,23 @@ e_msg_composer_set_view_cc (EMsgComposer *composer, gboolean view_cc)
{
GConfClient *gconf;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if ((p->view_cc && view_cc) ||
(!p->view_cc && !view_cc))
return;
-
+
p->view_cc = view_cc;
bonobo_ui_component_set_prop (p->uic, "/commands/ViewCC",
"state", p->view_cc ? "1" : "0", NULL);
-
+
if ((E_MSG_COMPOSER_HDRS (p->hdrs))->visible_mask & E_MSG_COMPOSER_VISIBLE_CC) {
gconf = gconf_client_get_default ();
gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/Cc", view_cc, NULL);
g_object_unref (gconf);
}
-
+
e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (p->hdrs),
e_msg_composer_get_visible_flags (composer));
}
@@ -6051,9 +6051,9 @@ e_msg_composer_set_view_cc (EMsgComposer *composer, gboolean view_cc)
/**
* e_msg_composer_get_view_bcc:
* @composer: A message composer widget
- *
+ *
* Get the status of the "View BCC header" flag.
- *
+ *
* Return value: The status of the "View BCC header" flag.
**/
gboolean
@@ -6062,7 +6062,7 @@ e_msg_composer_get_view_bcc (EMsgComposer *composer)
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->view_bcc;
}
@@ -6079,23 +6079,23 @@ e_msg_composer_set_view_bcc (EMsgComposer *composer, gboolean view_bcc)
{
GConfClient *gconf;
EMsgComposerPrivate *p = composer->priv;
-
+
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if ((p->view_bcc && view_bcc) ||
(!p->view_bcc && !view_bcc))
return;
-
+
p->view_bcc = view_bcc;
bonobo_ui_component_set_prop (p->uic, "/commands/ViewBCC",
"state", p->view_bcc ? "1" : "0", NULL);
-
+
if ((E_MSG_COMPOSER_HDRS (p->hdrs))->visible_mask & E_MSG_COMPOSER_VISIBLE_BCC) {
gconf = gconf_client_get_default ();
gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/Bcc", view_bcc, NULL);
g_object_unref (gconf);
}
-
+
e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (p->hdrs),
e_msg_composer_get_visible_flags (composer));
}
@@ -6105,9 +6105,9 @@ e_msg_composer_set_view_bcc (EMsgComposer *composer, gboolean view_bcc)
/**
* e_msg_composer_get_request_receipt
* @composer: A message composer widget
- *
+ *
* Get the status of the "Request receipt" flag.
- *
+ *
* Return value: The status of the "Request receipt" flag.
**/
gboolean
@@ -6115,7 +6115,7 @@ e_msg_composer_get_request_receipt (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->request_receipt;
}
@@ -6132,11 +6132,11 @@ e_msg_composer_set_request_receipt (EMsgComposer *composer, gboolean request_rec
{
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if ((p->request_receipt && request_receipt) ||
(!p->request_receipt && !request_receipt))
return;
-
+
p->request_receipt = request_receipt;
bonobo_ui_component_set_prop (p->uic, "/commands/RequestReceipt",
"state", p->request_receipt ? "1" : "0", NULL);
@@ -6146,9 +6146,9 @@ e_msg_composer_set_request_receipt (EMsgComposer *composer, gboolean request_rec
/**
* e_msg_composer_get_priority
* @composer: A message composer widget
- *
+ *
* Get the status of the "Priority" flag.
- *
+ *
* Return value: The status of the "Priority" flag.
**/
gboolean
@@ -6156,7 +6156,7 @@ e_msg_composer_get_priority (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
+
return p->set_priority;
}
@@ -6173,11 +6173,11 @@ e_msg_composer_set_priority (EMsgComposer *composer, gboolean set_priority)
{
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
if ((p->set_priority && set_priority) ||
(!p->set_priority && !set_priority))
return;
-
+
p->set_priority= set_priority;
bonobo_ui_component_set_prop (p->uic, "/commands/SetPriority",
"state", p->set_priority ? "1" : "0", NULL);
@@ -6197,7 +6197,7 @@ e_msg_composer_get_to (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
+
return p->hdrs ? e_msg_composer_hdrs_get_to (E_MSG_COMPOSER_HDRS (p->hdrs)) : NULL;
}
@@ -6206,7 +6206,7 @@ e_msg_composer_get_cc (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
+
return p->hdrs ? e_msg_composer_hdrs_get_cc (E_MSG_COMPOSER_HDRS (p->hdrs)) : NULL;
}
@@ -6215,7 +6215,7 @@ e_msg_composer_get_bcc (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
+
return p->hdrs ? e_msg_composer_hdrs_get_bcc (E_MSG_COMPOSER_HDRS (p->hdrs)) : NULL;
}
@@ -6224,7 +6224,7 @@ e_msg_composer_get_subject (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
+
return p->hdrs ? e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (p->hdrs)) : NULL;
}
@@ -6268,7 +6268,7 @@ e_msg_composer_set_changed (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
p->has_changed = TRUE;
}
@@ -6285,7 +6285,7 @@ e_msg_composer_unset_changed (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
p->has_changed = FALSE;
}
@@ -6295,7 +6295,7 @@ e_msg_composer_is_dirty (EMsgComposer *composer)
EMsgComposerPrivate *p = composer->priv;
CORBA_Environment ev;
gboolean rv;
-
+
CORBA_exception_init (&ev);
rv = p->has_changed
|| (GNOME_GtkHTML_Editor_Engine_hasUndo (p->eeditor_engine, &ev) &&
@@ -6334,13 +6334,13 @@ e_msg_composer_unset_autosaved (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
+
p->autosaved = FALSE;
}
/**
* e_msg_composer_get_raw_message_text:
- *
+ *
* Returns the text/plain of the message from composer
**/
const gchar *
@@ -6388,7 +6388,7 @@ e_msg_composer_drop_editor_undo (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
CORBA_Environment ev;
-
+
CORBA_exception_init (&ev);
GNOME_GtkHTML_Editor_Engine_dropUndo (p->eeditor_engine, &ev);
CORBA_exception_free (&ev);
@@ -6429,7 +6429,7 @@ e_msg_composer_show_attachments_ui (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
- if (e_attachment_bar_get_num_attachments(E_ATTACHMENT_BAR(p->attachment_bar)))
+ if (e_attachment_bar_get_num_attachments(E_ATTACHMENT_BAR(p->attachment_bar)))
show_attachments (composer, TRUE);
}
@@ -6437,7 +6437,7 @@ void
e_msg_composer_set_alternative (EMsgComposer *composer, gboolean alt)
{
EMsgComposerPrivate *p = composer->priv;
-
+
p->is_alternative = alt;
p->send_html = !alt;
}
@@ -6447,9 +6447,9 @@ e_msg_composer_reply_indent (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
CORBA_Environment ev;
-
+
CORBA_exception_init (&ev);
-
+
if (!GNOME_GtkHTML_Editor_Engine_isParagraphEmpty (p->eeditor_engine, &ev)) {
if (GNOME_GtkHTML_Editor_Engine_isPreviousParagraphEmpty (p->eeditor_engine, &ev))
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "cursor-backward", &ev);
@@ -6465,7 +6465,7 @@ e_msg_composer_reply_indent (EMsgComposer *composer)
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "indent-zero", &ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "text-default-color", &ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "italic-off", &ev);
-
+
CORBA_exception_free (&ev);
}
@@ -6475,9 +6475,9 @@ e_msg_composer_insert_paragraph_before (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
CORBA_Environment ev;
-
+
CORBA_exception_init (&ev);
-
+
if (!p->in_signature_insert) {
CORBA_char *orig, *signature;
gboolean changed = FALSE;
@@ -6504,7 +6504,7 @@ e_msg_composer_insert_paragraph_before (EMsgComposer *composer)
}
}
}
-
+
CORBA_exception_free (&ev);
}
@@ -6527,14 +6527,14 @@ e_msg_composer_insert_paragraph_after (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
CORBA_Environment ev;
-
+
CORBA_exception_init (&ev);
-
+
if (!p->in_signature_insert) {
CORBA_char *orig, *signature;
/* FIXME check for insert-paragraph command */
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "italic-off", &ev);
-
+
orig = GNOME_GtkHTML_Editor_Engine_getParagraphData (p->eeditor_engine, "orig", &ev);
if (ev._major == CORBA_NO_EXCEPTION) {
if (orig && *orig == '1')
@@ -6549,7 +6549,7 @@ e_msg_composer_insert_paragraph_after (EMsgComposer *composer)
CORBA_free (signature);
}
}
-
+
CORBA_exception_free (&ev);
}
@@ -6558,13 +6558,13 @@ e_msg_composer_delete (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
CORBA_Environment ev;
-
+
CORBA_exception_init (&ev);
-
+
if (GNOME_GtkHTML_Editor_Engine_isParagraphEmpty (p->eeditor_engine, &ev)) {
CORBA_char *orig;
CORBA_char *signature;
-
+
orig = GNOME_GtkHTML_Editor_Engine_getParagraphData (p->eeditor_engine, "orig", &ev);
if (ev._major == CORBA_NO_EXCEPTION) {
if (orig && *orig == '1') {
@@ -6621,7 +6621,7 @@ e_msg_composer_url_requested (EMsgComposer *composer, gchar *url)
{
EMsgComposerPrivate *p = composer->priv;
CamelMimePart *part = NULL;
-
+
part = g_hash_table_lookup (p->inline_images_by_url, url);
if (!part)
part = g_hash_table_lookup (p->inline_images, url);
@@ -6663,7 +6663,7 @@ e_msg_composer_set_saved (EMsgComposer *composer)
{
CORBA_Environment ev;
EMsgComposerPrivate *p = composer->priv;
-
+
CORBA_exception_init (&ev);
GNOME_GtkHTML_Editor_Engine_runCommand (p->eeditor_engine, "saved", &ev);
CORBA_exception_free (&ev);
@@ -6674,6 +6674,6 @@ e_msg_composer_set_send_options (EMsgComposer *composer, gboolean send_enable)
{
EMsgComposerPrivate *priv;
priv = composer->priv;
-
- priv->send_invoked = send_enable;
-}
+
+ priv->send_invoked = send_enable;
+}
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index a1ab0c1287..d285c0d6f1 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -68,7 +68,7 @@ void e_msg_composer_show_attachments_ui (EMsgComposer *composer);
void e_msg_composer_set_alternative (EMsgComposer *composer,
gboolean alt);
-
+
void e_msg_composer_set_headers (EMsgComposer *composer,
const char *from,
EDestination **to,
@@ -190,7 +190,7 @@ void e_msg_composer_link_clicked (EMsgComposer *composer, const gchar *url
EMsgComposerHdrs* e_msg_composer_get_hdrs (EMsgComposer *composer);
void e_msg_composer_set_saved (EMsgComposer *composer);
-void e_msg_composer_set_send_options (EMsgComposer *composer,
+void e_msg_composer_set_send_options (EMsgComposer *composer,
gboolean send_enable);
const gchar * e_msg_composer_get_raw_message_text (EMsgComposer *composer);
diff --git a/composer/evolution-composer.c b/composer/evolution-composer.c
index adfc0bb1ef..5c20c3a6aa 100644
--- a/composer/evolution-composer.c
+++ b/composer/evolution-composer.c
@@ -69,7 +69,7 @@ corba_recipientlist_to_destv (const GNOME_Evolution_Composer_RecipientList *cl)
if (*recip->name)
e_destination_set_name (destv[i], recip->name);
e_destination_set_email (destv[i], recip->address);
-
+
}
destv[cl->_length] = NULL;
@@ -92,38 +92,38 @@ impl_Composer_set_headers (PortableServer_Servant servant,
EAccount *account;
EIterator *iter;
int found = 0;
-
+
bonobo_object = bonobo_object_from_servant (servant);
composer = EVOLUTION_COMPOSER (bonobo_object);
-
+
account = mail_config_get_account_by_name (from);
if (!account) {
accounts = mail_config_get_accounts ();
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
-
+
if (!g_ascii_strcasecmp (account->id->address, from)) {
found = TRUE;
break;
}
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
-
+
if (!found)
account = mail_config_get_default_account ();
}
-
+
tov = corba_recipientlist_to_destv (to);
ccv = corba_recipientlist_to_destv (cc);
bccv = corba_recipientlist_to_destv (bcc);
-
+
e_msg_composer_set_headers (composer->composer, account->name,
tov, ccv, bccv, subject);
-
+
e_destination_freev (tov);
e_destination_freev (ccv);
e_destination_freev (bccv);
@@ -159,7 +159,7 @@ impl_Composer_set_body (PortableServer_Servant servant,
if (!g_ascii_strcasecmp (mime_type, "text/plain")) {
char *htmlbody = camel_text_to_html (body, CAMEL_MIME_FILTER_TOHTML_PRE, 0);
-
+
e_msg_composer_set_body_text (composer->composer, htmlbody, -1);
g_free (htmlbody);
} else if (!g_ascii_strcasecmp (mime_type, "text/html"))
@@ -330,20 +330,20 @@ enum_objects (BonoboItemHandler *handler, gpointer data, CORBA_Environment *ev)
}
#endif
-static Bonobo_Unknown
+static Bonobo_Unknown
get_object (BonoboItemHandler *h, const char *item_name, gboolean only_if_exists,
gpointer data, CORBA_Environment *ev)
{
EvolutionComposer *composer = data;
GSList *options, *l;
-
+
options = bonobo_item_option_parse (item_name);
for (l = options; l; l = l->next){
BonoboItemOption *option = l->data;
if (strcmp (option->key, "visible") == 0){
gboolean show = 1;
-
+
if (option->value)
show = atoi (option->value);
@@ -362,7 +362,7 @@ evolution_composer_construct (EvolutionComposer *composer,
GNOME_Evolution_Composer corba_object)
{
BonoboObject *item_handler;
-
+
g_return_if_fail (composer != NULL);
g_return_if_fail (EVOLUTION_IS_COMPOSER (composer));
g_return_if_fail (corba_object != CORBA_OBJECT_NIL);
diff --git a/composer/listener.c b/composer/listener.c
index 9bfd11a13d..474ac5f64f 100644
--- a/composer/listener.c
+++ b/composer/listener.c
@@ -7,12 +7,12 @@
This program is free software; you can redistribute it and/or
modify it under the terms of version 2 of the GNU General Public
License as published by the Free Software Foundation.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
@@ -83,7 +83,7 @@ impl_event (PortableServer_Servant _servant,
}
} else if (!strcmp (name, "image_url")) {
gchar *url;
-
+
if ((url = e_msg_composer_resolve_image_url (l->composer, BONOBO_ARG_GET_STRING (arg)))) {
rv = bonobo_arg_new (BONOBO_ARG_STRING);
BONOBO_ARG_SET_STRING (rv, url);
@@ -92,22 +92,22 @@ impl_event (PortableServer_Servant _servant,
}
} else if (!strcmp (name, "delete")) {
e_msg_composer_delete (l->composer);
-
+
} else if (!strcmp (name, "url_requested")) {
GNOME_GtkHTML_Editor_URLRequestEvent *e = arg->_value;
CamelMimePart *part;
GByteArray *ba;
CamelStream *cstream;
CamelDataWrapper *wrapper;
-
+
if (!e->url || e->stream == CORBA_OBJECT_NIL)
return get_any_null ();
part = e_msg_composer_url_requested (l->composer, e->url);
-
+
if (!part)
return get_any_null ();
-
+
/* Write the data to a CamelStreamMem... */
ba = g_byte_array_new ();
cstream = camel_stream_mem_new_with_byte_array (ba);
@@ -116,7 +116,7 @@ impl_event (PortableServer_Servant _servant,
bonobo_stream_client_write (e->stream, ba->data, ba->len, ev);
camel_object_unref (cstream);
-
+
} else if (!strcmp (name, "link_clicked")) {
e_msg_composer_link_clicked (l->composer, BONOBO_ARG_GET_STRING (arg));
}
@@ -149,6 +149,6 @@ listener_new (EMsgComposer *composer)
listener = g_object_new (EDITOR_LISTENER_TYPE, NULL);
listener->composer = composer;
-
+
return listener;
}
diff --git a/composer/listener.h b/composer/listener.h
index a66d707ffd..d9f13454c0 100644
--- a/composer/listener.h
+++ b/composer/listener.h
@@ -7,12 +7,12 @@
This program is free software; you can redistribute it and/or
modify it under the terms of version 2 of the GNU General Public
License as published by the Free Software Foundation.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-
+
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
diff --git a/e-util/e-bconf-map.c b/e-util/e-bconf-map.c
index 039121a1fa..b41bbe1cde 100644
--- a/e-util/e-bconf-map.c
+++ b/e-util/e-bconf-map.c
@@ -58,12 +58,12 @@ e_bconf_hex_decode (const char *val)
{
const unsigned char *p = (const unsigned char *) val;
char *o, *res;
-
+
o = res = g_malloc (strlen (val) / 2 + 1);
for (p = (const unsigned char *)val; (p[0] && p[1]); p += 2)
*o++ = (hexnib[p[0]] << 4) | hexnib[p[1]];
*o = 0;
-
+
return res;
}
@@ -72,7 +72,7 @@ e_bconf_url_decode (const char *val)
{
const unsigned char *p = (const unsigned char *) val;
char *o, *res, c;
-
+
o = res = g_malloc (strlen (val) + 1);
while (*p) {
c = *p++;
@@ -84,7 +84,7 @@ e_bconf_url_decode (const char *val)
*o++ = c;
}
*o = 0;
-
+
return res;
}
@@ -95,13 +95,13 @@ e_bconf_get_path (xmlDocPtr doc, const char *path)
xmlNodePtr root;
char *val;
int found;
-
+
root = doc->children;
if (strcmp ((char *)root->name, "bonobo-config") != 0) {
g_warning ("not bonobo-config xml file");
return NULL;
}
-
+
root = root->children;
while (root) {
if (!strcmp ((char *)root->name, "section")) {
@@ -113,7 +113,7 @@ e_bconf_get_path (xmlDocPtr doc, const char *path)
}
root = root->next;
}
-
+
return root;
}
@@ -123,7 +123,7 @@ e_bconf_get_entry (xmlNodePtr root, const char *name)
xmlNodePtr node = root->children;
int found;
char *val;
-
+
while (node) {
if (!strcmp ((char *)node->name, "entry")) {
val = (char *)xmlGetProp (node, (const unsigned char *)"name");
@@ -134,7 +134,7 @@ e_bconf_get_entry (xmlNodePtr root, const char *name)
}
node = node->next;
}
-
+
return node;
}
@@ -143,12 +143,12 @@ e_bconf_get_value (xmlNodePtr root, const char *name)
{
xmlNodePtr node = e_bconf_get_entry (root, name);
char *prop, *val = NULL;
-
+
if (node && (prop = (char *)xmlGetProp (node, (const unsigned char *)"value"))) {
val = g_strdup (prop);
xmlFree (prop);
}
-
+
return val;
}
@@ -156,13 +156,13 @@ char *
e_bconf_get_bool (xmlNodePtr root, const char *name)
{
char *val, *res;
-
+
if ((val = e_bconf_get_value (root, name))) {
res = g_strdup (val[0] == '1' ? "true" : "false");
g_free (val);
} else
res = NULL;
-
+
return res;
}
@@ -170,13 +170,13 @@ char *
e_bconf_get_long (xmlNodePtr root, const char *name)
{
char *val, *res;
-
+
if ((val = e_bconf_get_value (root, name))) {
res = g_strdup (val);
g_free (val);
} else
res = NULL;
-
+
return res;
}
@@ -184,13 +184,13 @@ char *
e_bconf_get_string (xmlNodePtr root, const char *name)
{
char *val, *res;
-
+
if ((val = e_bconf_get_value (root, name))) {
res = e_bconf_hex_decode (val);
g_free (val);
} else
res = NULL;
-
+
return res;
}
@@ -221,17 +221,17 @@ bconf_lookup_enum (xmlNodePtr root, const char *name, e_bconf_map_t *map)
{
int index = 0, i;
char *val;
-
+
if ((val = e_bconf_get_value (root, name))) {
index = atoi (val);
g_free (val);
}
-
+
for (i = 0; map->child[i].from; i++) {
if (i == index)
return g_strdup (map->child[i].from);
}
-
+
return NULL;
}
@@ -245,7 +245,7 @@ get_name (const char *in, int index)
{
GString *out = g_string_new ("");
char c, *res;
-
+
while ((c = *in++)) {
if (c == '%') {
c = *in++;
@@ -261,10 +261,10 @@ get_name (const char *in, int index)
g_string_append_c (out, c);
}
}
-
+
res = out->str;
g_string_free (out, FALSE);
-
+
return res;
}
@@ -273,7 +273,7 @@ build_xml (xmlNodePtr root, e_bconf_map_t *map, int index, xmlNodePtr source)
{
char *name, *value;
xmlNodePtr node;
-
+
while (map->type != E_BCONF_MAP_END) {
if ((map->type & E_BCONF_MAP_MASK) == E_BCONF_MAP_CHILD) {
node = xmlNewChild (root, NULL, (unsigned char *)map->to, NULL);
@@ -281,16 +281,16 @@ build_xml (xmlNodePtr root, e_bconf_map_t *map, int index, xmlNodePtr source)
} else {
name = get_name (map->from, index);
value = lookup_table[(map->type & E_BCONF_MAP_MASK) - 1] (source, name, map);
-
+
d(printf ("key '%s=%s' -> ", name, value));
-
+
if (map->type & E_BCONF_MAP_CONTENT) {
if (value && value[0])
xmlNewTextChild (root, NULL, (unsigned char *)map->to, (unsigned char *)value);
} else {
xmlSetProp (root, (unsigned char *)map->to, (unsigned char *)value);
}
-
+
g_free (value);
g_free (name);
}
@@ -308,7 +308,7 @@ e_bconf_import_xml_blob (GConfClient *gconf, xmlDocPtr config_xmldb, e_bconf_map
int count = 0, i;
GSList *list, *l;
char *val;
-
+
source = e_bconf_get_path (config_xmldb, bconf_path);
if (source) {
list = NULL;
@@ -316,37 +316,37 @@ e_bconf_import_xml_blob (GConfClient *gconf, xmlDocPtr config_xmldb, e_bconf_map
count = atoi (val);
g_free (val);
}
-
+
d(printf("Found %d blobs at %s\n", count, bconf_path));
-
+
for (i = 0; i < count; i++) {
xmlDocPtr doc;
xmlNodePtr root;
xmlChar *xmlbuf;
int n;
-
+
doc = xmlNewDoc ((const unsigned char *)"1.0");
root = xmlNewDocNode (doc, NULL, (unsigned char *)name, NULL);
xmlDocSetRootElement (doc, root);
-
+
/* This could be set with a MAP_UID type ... */
if (idparam) {
char buf[16];
-
+
sprintf (buf, "%d", i);
xmlSetProp (root, (unsigned char *)idparam, (unsigned char *)buf);
}
-
+
build_xml (root, map, i, source);
-
+
xmlDocDumpMemory (doc, &xmlbuf, &n);
xmlFreeDoc (doc);
-
+
list = g_slist_append (list, xmlbuf);
}
-
+
gconf_client_set_list (gconf, gconf_path, GCONF_VALUE_STRING, list, NULL);
-
+
while (list) {
l = list->next;
xmlFree (list->data);
@@ -356,7 +356,7 @@ e_bconf_import_xml_blob (GConfClient *gconf, xmlDocPtr config_xmldb, e_bconf_map
} else {
g_warning ("could not find '%s' in old config database, skipping", bconf_path);
}
-
+
return 0;
}
@@ -372,13 +372,13 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *
GSList *list, *l;
char buf[32];
int i, j, k;
-
+
/* process all flat config */
for (i = 0; remap_list[i].root; i++) {
d(printf ("Path: %s\n", remap_list[i].root));
if (!(source = e_bconf_get_path (config_xmldb, remap_list[i].root)))
continue;
-
+
map = remap_list[i].map;
for (j = 0; map[j].from; j++) {
if (map[j].type & E_GCONF_MAP_LIST) {
@@ -401,12 +401,12 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *
list = g_slist_append (list, e_bconf_hex_decode (val));
break;
}
-
+
g_free (val);
k++;
}
} while (val);
-
+
if (list) {
path = g_strdup_printf ("/apps/evolution/%s", map[j].to);
gconf_client_set_list (gconf, path, gconf_type[map[j].type & E_GCONF_MAP_MASK], list, NULL);
@@ -415,7 +415,7 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *
g_slist_foreach (list, (GFunc) g_free, NULL);
g_slist_free (list);
}
-
+
continue;
} else if (map[j].type == E_GCONF_MAP_ANYLIST) {
val = NULL;
@@ -423,13 +423,13 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *
if (!(val = e_bconf_get_value (source, map[j].from)))
continue;
}
-
+
d(printf (" %s = '%s' -> %s [%d]\n",
map[j].from,
val == NULL ? "(null)" : val,
map[j].to,
map[j].type));
-
+
path = g_strdup_printf ("/apps/evolution/%s", map[j].to);
switch (map[j].type) {
case E_GCONF_MAP_BOOL:
@@ -455,13 +455,13 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *
case E_GCONF_MAP_STRLIST: {
char *v = e_bconf_hex_decode (val);
char **t = g_strsplit (v, " !<-->!", 8196);
-
+
list = NULL;
for (k = 0; t[k]; k++) {
list = g_slist_append (list, t[k]);
d(printf (" [%d] = '%s'\n", k, t[k]));
}
-
+
gconf_client_set_list (gconf, path, GCONF_VALUE_STRING, list, NULL);
g_slist_free (list);
g_strfreev (t);
@@ -470,12 +470,12 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *
case E_GCONF_MAP_ANYLIST: {
xmlNodePtr node = source->children;
list = NULL;
-
+
/* find the entry node */
while (node) {
if (!strcmp ((char *)node->name, "entry")) {
int found;
-
+
if ((tmp = (char *)xmlGetProp (node, (const unsigned char *)"name"))) {
found = strcmp ((char *)tmp, map[j].from) == 0;
xmlFree (tmp);
@@ -483,10 +483,10 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *
break;
}
}
-
+
node = node->next;
}
-
+
/* find the the any block */
if (node) {
node = node->children;
@@ -496,7 +496,7 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *
node = node->next;
}
}
-
+
/* skip to the value inside it */
if (node) {
node = node->children;
@@ -506,7 +506,7 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *
node = node->next;
}
}
-
+
if (node) {
node = node->children;
while (node) {
@@ -515,7 +515,7 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *
node = node->next;
}
}
-
+
/* & store */
if (list) {
gconf_client_set_list (gconf, path, GCONF_VALUE_STRING, list, NULL);
@@ -526,19 +526,19 @@ e_bconf_import (GConfClient *gconf, xmlDocPtr config_xmldb, e_gconf_map_list_t *
list = l;
}
}
-
+
break; }
case E_GCONF_MAP_COLOUR:
sprintf (buf, "#%06x", atoi (val) & 0xffffff);
gconf_client_set_string (gconf, path, buf, NULL);
break;
}
-
+
/* FIXME: handle errors */
g_free (path);
g_free (val);
}
}
-
+
return 0;
}
diff --git a/e-util/e-bit-array.c b/e-util/e-bit-array.c
index a4af5e76b5..572f0d4009 100644
--- a/e-util/e-bit-array.c
+++ b/e-util/e-bit-array.c
@@ -153,7 +153,7 @@ eba_dispose (GObject *object)
(* G_OBJECT_CLASS (e_bit_array_parent_class)->dispose) (object);
}
-/**
+/**
* e_selection_model_is_row_selected
* @selection: #EBitArray to check
* @n: The row to check
@@ -172,7 +172,7 @@ e_bit_array_value_at (EBitArray *eba,
return (eba->data[BOX(n)] >> OFFSET(n)) & 0x1;
}
-/**
+/**
* e_selection_model_foreach
* @selection: #EBitArray to traverse
* @callback: The callback function to call back.
@@ -181,7 +181,7 @@ e_bit_array_value_at (EBitArray *eba,
* This routine calls the given callback function once for each
* selected row, passing closure as the closure.
*/
-void
+void
e_bit_array_foreach (EBitArray *eba,
EForeachFunc callback,
gpointer closure)
@@ -202,7 +202,7 @@ e_bit_array_foreach (EBitArray *eba,
}
}
-/**
+/**
* e_selection_model_clear
* @selection: #EBitArray to clear
*
@@ -219,7 +219,7 @@ e_bit_array_clear(EBitArray *eba)
#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
*
@@ -253,7 +253,7 @@ e_bit_array_selected_count (EBitArray *eba)
return count;
}
-/**
+/**
* e_selection_model_select_all
* @selection: #EBitArray to select all
*
@@ -264,10 +264,10 @@ void
e_bit_array_select_all (EBitArray *eba)
{
int i;
-
+
if (!eba->data)
eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
-
+
for (i = 0; i < (eba->bit_count + 31) / 32; i ++) {
eba->data[i] = ONES;
}
@@ -285,7 +285,7 @@ e_bit_array_select_all (EBitArray *eba)
}
}
-/**
+/**
* e_selection_model_invert_selection
* @selection: #EBitArray to invert
*
@@ -299,7 +299,7 @@ e_bit_array_invert_selection (EBitArray *eba)
if (!eba->data)
eba->data = g_new0 (guint32, (eba->bit_count + 31) / 32);
-
+
for (i = 0; i < (eba->bit_count + 31) / 32; i ++) {
eba->data[i] = ~eba->data[i];
}
diff --git a/e-util/e-bit-array.h b/e-util/e-bit-array.h
index 0c7ba61199..b15e50a581 100644
--- a/e-util/e-bit-array.h
+++ b/e-util/e-bit-array.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-bit-array.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/e-util/e-categories-config.c b/e-util/e-categories-config.c
index 16a7671155..9907f557e3 100644
--- a/e-util/e-categories-config.c
+++ b/e-util/e-categories-config.c
@@ -78,22 +78,22 @@ e_categories_config_open_dialog_for_entry (GtkEntry *entry)
GtkDialog *dialog;
const char *text;
int result;
-
+
g_return_if_fail (entry != NULL);
g_return_if_fail (GTK_IS_ENTRY (entry));
-
+
text = gtk_entry_get_text (GTK_ENTRY (entry));
dialog = GTK_DIALOG (e_categories_dialog_new (text));
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET (entry))));
-
+
/* run the dialog */
result = gtk_dialog_run (dialog);
-
+
if (result == GTK_RESPONSE_OK) {
text = e_categories_dialog_get_categories (E_CATEGORIES_DIALOG (dialog));
gtk_entry_set_text (GTK_ENTRY (entry), text);
}
-
+
gtk_object_destroy (GTK_OBJECT (dialog));
}
diff --git a/e-util/e-config-listener.c b/e-util/e-config-listener.c
index 44ed9c0447..b40b8e170a 100644
--- a/e-util/e-config-listener.c
+++ b/e-util/e-config-listener.c
@@ -572,7 +572,7 @@ e_config_listener_remove_dir (EConfigListener *cl, const char *dir)
slist = gconf_client_all_entries (cl->priv->db, dir, NULL);
for (iter = slist; iter != NULL; iter = iter->next) {
GConfEntry *entry = iter->data;
-
+
key = gconf_entry_get_key (entry);
gconf_client_unset (cl->priv->db, key, NULL);
gconf_entry_free (entry);
diff --git a/e-util/e-config.c b/e-util/e-config.c
index 484630cd1d..79e87c84b6 100644
--- a/e-util/e-config.c
+++ b/e-util/e-config.c
@@ -47,7 +47,7 @@
#include <glib/gi18n.h>
-#define d(x)
+#define d(x)
struct _EConfigFactory {
struct _EConfigFactory *next, *prev;
@@ -179,10 +179,10 @@ ep_base_init(GObjectClass *klass)
/**
* e_config_get_type:
- *
+ *
* Standard GObject method. Used to subclass for the concrete
* implementations.
- *
+ *
* Return value: EConfig type.
**/
GType
@@ -211,9 +211,9 @@ e_config_get_type(void)
* @type: The type of configuration manager, @E_CONFIG_BOOK or
* @E_CONFIG_DRUID.
* @id: The name of the configuration window this manager drives.
- *
+ *
* Used by implementing classes to initialise base parameters.
- *
+ *
* Return value: @ep is returned.
**/
EConfig *e_config_construct(EConfig *ep, int type, const char *id)
@@ -238,7 +238,7 @@ EConfig *e_config_construct(EConfig *ep, int type, const char *id)
* @freefunc: If supplied, called to free the item list (and/or items)
* once they are no longer needed.
* @data: Data for the callback methods.
- *
+ *
* Add new EConfigItems to the configuration window. Nothing will be
* done with them until the widget is built.
*
@@ -264,7 +264,7 @@ e_config_add_items(EConfig *ec, GSList *items, EConfigItemsFunc commitfunc, ECon
* @pageid: pageid to check.
* @check: checking callback.
* @data: user-data for the callback.
- *
+ *
* Add a page-checking function callback. It will be called to validate the
* data in the given page or pages. If @pageid is NULL then it will be called
* to validate every page, or the whole configuration window.
@@ -678,7 +678,7 @@ ec_rebuild(EConfig *emp)
}
frame = g_object_new(gtk_frame_get_type(),
- "shadow_type", GTK_SHADOW_NONE,
+ "shadow_type", GTK_SHADOW_NONE,
"label_widget", label,
"child", g_object_new(gtk_alignment_get_type(),
"left_padding", 12,
@@ -772,7 +772,7 @@ ec_rebuild(EConfig *emp)
* e_config_set_target:
* @emp: An initialised EConfig.
* @target: A target allocated from @emp.
- *
+ *
* Sets the target object for the config window. Generally the target
* is set only once, and will supply its own "changed" signal which
* can be used to drive the modal. This is a virtual method so that
@@ -800,12 +800,12 @@ ec_widget_destroy(GtkWidget *w, EConfig *ec)
/**
* e_config_create_widget:
* @emp: An initialised EConfig object.
- *
+ *
* Create the widget described by @emp. Only the core widget
* appropriate for the given type is created, i.e. a GtkNotebook for
* the E_CONFIG_BOOK type and a GnomeDruid for the E_CONFIG_DRUID
* type.
- *
+ *
* This object will be self-driving, but will not close itself once
* complete.
*
@@ -877,7 +877,7 @@ ec_dialog_response(GtkWidget *d, int id, EConfig *ec)
* @emp: Initialised and configured EMConfig derived instance.
* @parent: Parent window or NULL.
* @title: Title of window or dialog.
- *
+ *
* Create a managed GtkWindow object from @emp. This window will be
* fully driven by the EConfig @emp. If @emp.type is
* @E_CONFIG_DRUID, then this will be a toplevel GtkWindow containing
@@ -886,7 +886,7 @@ ec_dialog_response(GtkWidget *d, int id, EConfig *ec)
*
* Unless reffed otherwise, the management object @emp will be
* finalised when the widget is.
- *
+ *
* Return value: The window widget. This is also stored in @emp.window.
**/
GtkWidget *
@@ -949,9 +949,9 @@ ec_idle_handler_for_rebuild (gpointer data)
/**
* e_config_target_changed:
- * @emp:
- * @how:
- *
+ * @emp:
+ * @how:
+ *
* Indicate that the target has changed. This may be called by the
* self-aware target itself, or by the driving code. If @how is
* %E_CONFIG_TARGET_CHANGED_REBUILD, then the entire configuration
@@ -987,8 +987,8 @@ void e_config_target_changed(EConfig *emp, e_config_target_change_t how)
/**
* e_config_abort:
- * @ec:
- *
+ * @ec:
+ *
* Signify that the stateful configuration changes must be discarded
* to all listeners. This is used by self-driven druid or notebook, or
* may be used by code using the widget directly.
@@ -1007,8 +1007,8 @@ void e_config_abort(EConfig *ec)
/**
* e_config_commit:
- * @ec:
- *
+ * @ec:
+ *
* Signify that the stateful configuration changes should be saved.
* This is used by the self-driven druid or notebook, or may be used
* by code driving the widget directly.
@@ -1027,12 +1027,12 @@ void e_config_commit(EConfig *ec)
/**
* e_config_page_check:
- * @ec:
+ * @ec:
* @pageid: The path of the page item.
- *
+ *
* Check that a given page is complete. If @pageid is NULL, then check
* the whole config. No check is made that the page actually exists.
- *
+ *
* Return value: FALSE if the data is inconsistent/incomplete.
**/
gboolean e_config_page_check(EConfig *ec, const char *pageid)
@@ -1052,11 +1052,11 @@ gboolean e_config_page_check(EConfig *ec, const char *pageid)
/**
* e_config_page_get:
- * @ec:
+ * @ec:
* @pageid: The path of the page item.
- *
+ *
* Retrieve the page widget corresponding to @pageid.
- *
+ *
* Return value: The page widget. It will be the root GtkNotebook
* container or the GnomeDruidPage object.
**/
@@ -1077,12 +1077,12 @@ GtkWidget *e_config_page_get(EConfig *ec, const char *pageid)
/**
* e_config_page_next:
- * @ec:
+ * @ec:
* @pageid: The path of the page item.
- *
+ *
* Find the path of the next visible page after @pageid. If @pageid
* is NULL then find the first visible page.
- *
+ *
* Return value: The path of the next page, or @NULL if @pageid was the
* last configured and visible page.
**/
@@ -1108,12 +1108,12 @@ const char *e_config_page_next(EConfig *ec, const char *pageid)
/**
* e_config_page_next:
- * @ec:
+ * @ec:
* @pageid: The path of the page item.
- *
+ *
* Find the path of the previous visible page before @pageid. If @pageid
* is NULL then find the last visible page.
- *
+ *
* Return value: The path of the previous page, or @NULL if @pageid was the
* first configured and visible page.
**/
@@ -1147,12 +1147,12 @@ const char *e_config_page_prev(EConfig *ec, const char *pageid)
* @func: An EConfigFactoryFunc to call when the window @id is being
* created.
* @data: Callback data.
- *
+ *
* Add a config factory which will be called to add_items() any
* extra items's if wants to, to the current Config window.
*
* TODO: Make the id a pattern?
- *
+ *
* Return value: A handle to the factory.
**/
EConfigFactory *
@@ -1171,7 +1171,7 @@ e_config_class_add_factory(EConfigClass *klass, const char *id, EConfigFactoryFu
/**
* e_config_class_remove_factory:
* @f: Handle from :class_add_factory() call.
- *
+ *
* Remove a config factory. The handle @f may only be removed once.
**/
void
@@ -1187,7 +1187,7 @@ e_config_class_remove_factory(EConfigClass *klass, EConfigFactory *f)
* @ep: Parent EConfig object.
* @type: type, up to implementor
* @size: Size of object to allocate.
- *
+ *
* Allocate a new config target suitable for this class. Implementing
* classes will define the actual content of the target.
**/
@@ -1212,7 +1212,7 @@ void *e_config_target_new(EConfig *ep, int type, size_t size)
* e_config_target_free:
* @ep: Parent EConfig object.
* @o: The target to fre.
- *
+ *
* Free a target. The implementing class can override this method to
* free custom targets.
**/
@@ -1291,10 +1291,10 @@ ech_check(EConfig *ec, const char *pageid, void *data)
{
struct _EConfigHookGroup *group = data;
EConfigHookPageCheckData hdata;
-
+
if (!group->hook->hook.plugin->enabled)
return TRUE;
-
+
hdata.config = ec;
hdata.target = ec->target;
hdata.pageid = pageid?pageid:"";
@@ -1496,16 +1496,16 @@ emph_class_init(EPluginHookClass *klass)
/**
* e_config_hook_get_type:
- *
+ *
* Standard GObject function to get the object type.
- *
+ *
* Return value: The EConfigHook class type.
**/
GType
e_config_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EConfigHookClass), NULL, NULL, (GClassInitFunc) emph_class_init, NULL, NULL,
@@ -1515,7 +1515,7 @@ e_config_hook_get_type(void)
emph_parent_class = g_type_class_ref(e_plugin_hook_get_type());
type = g_type_register_static(e_plugin_hook_get_type(), "EConfigHook", &info, 0);
}
-
+
return type;
}
@@ -1525,7 +1525,7 @@ e_config_hook_get_type(void)
* @klass: The dervied EconfigHook class.
* @map: A map used to describe a single EConfigTarget type for this
* class.
- *
+ *
* Add a targe tmap to a concrete derived class of EConfig. The
* target map enumates the target types available for the implenting
* class.
diff --git a/e-util/e-config.h b/e-util/e-config.h
index c7f37a8e10..ffd4896c9d 100644
--- a/e-util/e-config.h
+++ b/e-util/e-config.h
@@ -62,11 +62,11 @@ typedef struct _GtkWidget * (*EConfigItemFactoryFunc)(EConfig *ec, EConfigItem *
/**
* enum _e_config_target_changed_t - Target changed mode.
- *
+ *
* @E_CONFIG_TARGET_CHANGED_STATE: A state of the target has changed.
* @E_CONFIG_TARGET_CHANGED_REBUILD: A state of the target has
* changed, and the UI must be reconfigured as a result.
- *
+ *
* How the target has changed. If @E_CONFIG_TARGET_CHANGED_REBUILD then a
* widget reconfigure is necessary, otherwise it is used to check if
* the widget is complete yet.
@@ -79,7 +79,7 @@ enum _e_config_target_change_t {
/**
* enum _e_config_t - configuration item type.
- *
+ *
* @E_CONFIG_BOOK: A notebook item. Only one of this or
* @E_CONFIG_DRUID may be included in the item list for the entire
* configuration description.
@@ -105,7 +105,7 @@ enum _e_config_target_change_t {
* section defined in the configuration system.
* @E_CONFIG_ITEM_TABLE: A configuration item with a parent
* @E_CONFIG_SECTION_TABLE.
- *
+ *
* A configuration item type for each configuration item added to the
* EConfig object. These are merged from all contributors to the
* configuration window, and then processed to form the combined
@@ -127,7 +127,7 @@ enum _e_config_t {
/**
* struct _EConfigItem - A configuration item.
- *
+ *
* @type: The configuration item type.
* @path: An absolute path positioning this item in the configuration
* window. This will be used as a sort key for an ASCII sort to
@@ -151,11 +151,11 @@ struct _EConfigItem {
/**
* struct _EConfigTarget - configuration context.
- *
+ *
* @config: The parent object.
* @widget: A target-specific parent widget.
* @type: The type of target, defined by implementing classes.
- *
+ *
* The base target object is used as the parent and placeholder for
* configuration context for a given configuration window. It is
* subclassed by implementing classes to provide domain-specific
@@ -172,7 +172,7 @@ struct _EConfigTarget {
/**
* struct _EConfig - A configuration management object.
- *
+ *
* @object: Superclass.
* @priv: Private data.
* @type: Either @E_CONFIG_BOOK or @E_CONFIG_DRIUD, describing the
@@ -186,7 +186,7 @@ struct _EConfigTarget {
* @window: If :create_window() is called, then the containing
* toplevel GtkDialog or GtkWindow appropriate for the @type of
* configuration window created.
- *
+ *
**/
struct _EConfig {
GObject object;
@@ -205,7 +205,7 @@ struct _EConfig {
/**
* struct _EConfigClass - Configuration management abstract class.
- *
+ *
* @object_class: Superclass.
* @factories: A list of factories registered on this type of
* configuration manager.
@@ -214,7 +214,7 @@ struct _EConfig {
* into changes on the target to propery drive the manager.
* @target_free: A virtual method used to free the target in an
* implementation-defined way.
- *
+ *
**/
struct _EConfigClass {
GObjectClass object_class;
@@ -279,7 +279,7 @@ typedef void (*EConfigHookItemFactoryFunc)(struct _EPlugin *plugin, EConfigHookI
/**
* struct _EConfigHookItemFactoryData - Factory marshalling structure.
- *
+ *
* @config: The parent EConfig. This is also available in
* @target->config but is here as a convenience. (TODO: do we need this).
* @item: The corresponding configuration item.
@@ -303,12 +303,12 @@ struct _EConfigHookItemFactoryData {
/**
* struct _EConfigHookPageCheckData - Check callback data.
- *
- * @config:
+ *
+ * @config:
* @target: The current configuration target. This is also available
* on @config->target.
* @pageid: Name of page to validate, or "" means check all configuration.
- *
+ *
**/
struct _EConfigHookPageCheckData {
EConfig *config;
@@ -318,7 +318,7 @@ struct _EConfigHookPageCheckData {
/**
* struct _EConfigHookGroup - A group of configuration items.
- *
+ *
* @hook: Parent object.
* @id: The configuration window to which these items apply.
* @target_type: The target type expected by the items. This is
@@ -345,11 +345,11 @@ struct _EConfigHookGroup {
/**
* struct _EConfigHook - Plugin hook for configuration windows.
- *
+ *
* @hook: Superclass.
* @groups: A list of EConfigHookGroup's of all configuration windows
* this plugin hooks into.
- *
+ *
**/
struct _EConfigHook {
EPluginHook hook;
@@ -360,7 +360,7 @@ struct _EConfigHook {
/**
* struct _EConfigHookClass - Abstract class for configuration window
* plugin hooks.
- *
+ *
* @hook_class: Superclass.
* @target_map: A table of EConfigHookTargetMap structures describing
* the possible target types supported by this class.
@@ -369,7 +369,7 @@ struct _EConfigHook {
*
* This is an abstract class defining the plugin hook point for
* configuration windows.
- *
+ *
**/
struct _EConfigHookClass {
EPluginHookClass hook_class;
diff --git a/e-util/e-corba-utils.c b/e-util/e-corba-utils.c
index 9fa5dc1d15..b688de6294 100644
--- a/e-util/e-corba-utils.c
+++ b/e-util/e-corba-utils.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* e-html-utils.c
-*
+*
* Copyright (C) 2000 Ximian, Inc.
* Author: Ettore Perazzoli <ettore@ximian.com>
*
diff --git a/e-util/e-corba-utils.h b/e-util/e-corba-utils.h
index b93c70d41f..91fb305d52 100644
--- a/e-util/e-corba-utils.h
+++ b/e-util/e-corba-utils.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* e-corba-utils.h
- *
+ *
* Copyright (C) 2000 Ximian, Inc.
* Author: Ettore Perazzoli <ettore@ximian.com>
*
diff --git a/e-util/e-cursor.c b/e-util/e-cursor.c
index 22d265ce7b..fa7fa991f9 100644
--- a/e-util/e-cursor.c
+++ b/e-util/e-cursor.c
@@ -32,13 +32,13 @@
* e_cursor_set:
* @widget: Any widget in a window, to which busy cursor has to be set
* cursor: The type of cursor to be set defined in e-cursor.h
- *
+ *
* Sets the cursor specified, to the top level window of the given widget.
- * It is not window aware, so if you popup a window, it will not have
+ * It is not window aware, so if you popup a window, it will not have
* busy cursor set. That has to be handled seperately with a new call to this
* function.
*
- * Return value:
+ * Return value:
**/
void e_cursor_set (GtkWidget *widget, ECursorType cursor)
{
diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c
index 6aa5da34be..1c75dc83e5 100644
--- a/e-util/e-dialog-utils.c
+++ b/e-util/e-dialog-utils.c
@@ -82,7 +82,7 @@ e_notice (gpointer parent, GtkMessageType type, const char *format, ...)
str);
va_end (args);
g_free (str);
-
+
if (parent)
e_dialog_set_transient_for (GTK_WINDOW (dialog), parent);
gtk_dialog_run (GTK_DIALOG (dialog));
@@ -117,7 +117,7 @@ e_notice_with_xid (GdkNativeWindow parent, GtkMessageType type, const char *form
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
va_end (args);
g_free (str);
-
+
if (parent)
e_dialog_set_transient_for_xid (GTK_WINDOW (dialog), parent);
gtk_dialog_run (GTK_DIALOG (dialog));
@@ -158,7 +158,7 @@ window_is_wm_toplevel (Display *display, Window window)
* e_dialog_set_transient_for:
* @dialog: a dialog window
* @parent_widget: the parent for @dialog
- *
+ *
* This sets the parent for @dialog to be @parent_widget. Unlike
* gtk_window_set_transient_for(), this doesn't need @parent_widget to
* be the actual toplevel, and also works if @parent_widget is
@@ -218,7 +218,7 @@ dialog_realized (GtkWindow *dialog, gpointer xid)
* e_dialog_set_transient_for_xid:
* @dialog: a dialog window
* @xid: the X Window parent
- *
+ *
* Like e_dialog_set_transient_for(), but use an XID to specify the
* parent window.
**/
@@ -263,7 +263,7 @@ save_ok (GtkWidget *widget, gpointer data)
GtkWidget *fs;
char **filename = data;
char *uri;
-
+
fs = gtk_widget_get_toplevel (widget);
uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (fs));
@@ -271,7 +271,7 @@ save_ok (GtkWidget *widget, gpointer data)
e_file_update_save_path(gtk_file_chooser_get_current_folder_uri(GTK_FILE_CHOOSER(fs)), TRUE);
*filename = uri;
}
-
+
gtk_main_quit ();
}
@@ -293,13 +293,13 @@ e_file_dialog_save (const char *title, const char *fname)
selection = e_file_get_save_filesel(NULL, title, fname, GTK_FILE_CHOOSER_ACTION_SAVE);
g_signal_connect (G_OBJECT (selection), "response", G_CALLBACK (filechooser_response), &filename);
-
+
gtk_widget_show (GTK_WIDGET (selection));
gtk_grab_add (GTK_WIDGET (selection));
gtk_main ();
-
+
gtk_widget_destroy (GTK_WIDGET (selection));
-
+
return filename;
}
@@ -309,13 +309,13 @@ save_folder_ok (GtkWidget *widget, gpointer data)
GtkWidget *fs;
char **filename = data;
char *uri;
-
+
fs = gtk_widget_get_toplevel (widget);
uri = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (fs));
-
+
e_file_update_save_path(uri, FALSE);
*filename = uri;
-
+
gtk_main_quit ();
}
@@ -336,13 +336,13 @@ e_file_dialog_save_folder (const char *title)
selection = e_file_get_save_filesel(NULL, title, NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
g_signal_connect (G_OBJECT (selection), "response", G_CALLBACK (folderchooser_response), &filename);
-
+
gtk_widget_show (GTK_WIDGET (selection));
gtk_grab_add (GTK_WIDGET (selection));
gtk_main ();
-
+
gtk_widget_destroy (GTK_WIDGET (selection));
-
+
return filename;
}
diff --git a/e-util/e-dialog-widgets.c b/e-util/e-dialog-widgets.c
index 36ade95803..20f7db5ce5 100644
--- a/e-util/e-dialog-widgets.c
+++ b/e-util/e-dialog-widgets.c
@@ -58,7 +58,7 @@ dialog_destroy_cb (DialogHooks *hooks, GObject *dialog)
{
g_slist_free (hooks->whooks);
hooks->whooks = NULL;
-
+
g_free (hooks);
g_object_set_data (dialog, "dialog-hooks", NULL);
}
@@ -70,14 +70,14 @@ static DialogHooks *
get_dialog_hooks (GtkWidget *dialog)
{
DialogHooks *hooks;
-
+
hooks = g_object_get_data ((GObject *) dialog, "dialog-hooks");
if (!hooks) {
hooks = g_new0 (DialogHooks, 1);
g_object_set_data ((GObject *) dialog, "dialog-hooks", hooks);
g_object_weak_ref ((GObject *) dialog, (GWeakNotify) dialog_destroy_cb, hooks);
}
-
+
return hooks;
}
@@ -88,11 +88,11 @@ static int
value_to_index (const int *value_map, int value)
{
int i;
-
+
for (i = 0; value_map[i] != -1; i++)
if (value_map[i] == value)
return i;
-
+
return -1;
}
@@ -103,15 +103,15 @@ static int
index_to_value (const int *value_map, int index)
{
int i;
-
+
/* We do this the hard way, i.e. not as a simple array reference, to
* check for correctness.
*/
-
+
for (i = 0; value_map[i] != -1; i++)
if (i == index)
return value_map[i];
-
+
return -1;
}
@@ -121,12 +121,12 @@ hook_radio (GtkWidget *dialog, GtkRadioButton *radio, gpointer value_var, gpoint
{
const int *value_map;
int *value;
-
+
/* Set the value */
-
+
value = (int *) value_var;
value_map = (const int *) info;
-
+
e_dialog_radio_set (GTK_WIDGET (radio), *value, value_map);
}
@@ -136,10 +136,10 @@ get_radio_value (GtkRadioButton *radio, gpointer value_var, gpointer info)
{
int *value;
const int *value_map;
-
+
value = (int *) value_var;
value_map = (const int *) info;
-
+
*value = e_dialog_radio_get (GTK_WIDGET (radio), value_map);
}
@@ -149,12 +149,12 @@ hook_option_menu (GtkWidget *dialog, GtkOptionMenu *omenu, gpointer value_var, g
{
const int *value_map;
int *value;
-
+
/* Set the value */
-
+
value = (int *) value_var;
value_map = (const int *) info;
-
+
e_dialog_option_menu_set (GTK_WIDGET (omenu), *value, value_map);
}
@@ -164,10 +164,10 @@ get_option_menu_value (GtkOptionMenu *omenu, gpointer value_var, gpointer info)
{
const int *value_map;
int *value;
-
+
value = (int *) value_var;
value_map = (const int *) info;
-
+
*value = e_dialog_option_menu_get (GTK_WIDGET (omenu), value_map);
}
@@ -176,9 +176,9 @@ static void
hook_toggle (GtkWidget *dialog, GtkToggleButton *toggle, gpointer value_var, gpointer info)
{
gboolean *value;
-
+
/* Set the value */
-
+
value = (gboolean *) value_var;
e_dialog_toggle_set (GTK_WIDGET (toggle), *value);
}
@@ -188,7 +188,7 @@ static void
get_toggle_value (GtkToggleButton *toggle, gpointer value_var, gpointer info)
{
gboolean *value;
-
+
value = (gboolean *) value_var;
*value = e_dialog_toggle_get (GTK_WIDGET (toggle));
}
@@ -199,14 +199,14 @@ hook_spin_button (GtkWidget *dialog, GtkSpinButton *spin, gpointer value_var, gp
{
double *value;
GtkAdjustment *adj;
-
+
/* Set the value */
-
+
value = (double *) value_var;
e_dialog_spin_set (GTK_WIDGET (spin), *value);
-
+
/* Hook to changed */
-
+
adj = gtk_spin_button_get_adjustment (spin);
}
@@ -215,7 +215,7 @@ static void
get_spin_button_value (GtkSpinButton *spin, gpointer value_var, gpointer info)
{
double *value;
-
+
value = (double *) value_var;
*value = e_dialog_spin_get_double (GTK_WIDGET (spin));
}
@@ -225,11 +225,11 @@ static void
hook_editable (GtkWidget *dialog, GtkEditable *editable, gpointer value_var, gpointer info)
{
char **value;
-
+
/* Set the value */
-
+
value = (char **) value_var;
-
+
e_dialog_editable_set (GTK_WIDGET (editable), *value);
}
@@ -238,11 +238,11 @@ static void
get_editable_value (GtkEditable *editable, gpointer value_var, gpointer data)
{
char **value;
-
+
value = (char **) value_var;
if (*value)
g_free (*value);
-
+
*value = e_dialog_editable_get (GTK_WIDGET (editable));
}
@@ -250,19 +250,19 @@ get_editable_value (GtkEditable *editable, gpointer value_var, gpointer data)
* e_dialog_editable_set:
* @widget: A #GtkEditable widget.
* @value: String value.
- *
+ *
* Sets the string value inside a #GtkEditable-derived widget.
**/
void
e_dialog_editable_set (GtkWidget *widget, const char *value)
{
int pos = 0;
-
+
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_EDITABLE (widget));
-
+
gtk_editable_delete_text (GTK_EDITABLE (widget), 0, -1);
-
+
if (value)
gtk_editable_insert_text (GTK_EDITABLE (widget), value, strlen (value), &pos);
}
@@ -270,9 +270,9 @@ e_dialog_editable_set (GtkWidget *widget, const char *value)
/**
* e_dialog_editable_get:
* @widget: A #GtkEditable widget.
- *
+ *
* Queries the string value inside a #GtkEditable-derived widget.
- *
+ *
* Return value: String value. You should free it when you are done with it.
* This function can return NULL if the string could not be converted from
* GTK+'s encoding into UTF8.
@@ -282,7 +282,7 @@ e_dialog_editable_get (GtkWidget *widget)
{
g_return_val_if_fail (widget != NULL, NULL);
g_return_val_if_fail (GTK_IS_EDITABLE (widget), NULL);
-
+
return gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1);
}
@@ -291,7 +291,7 @@ e_dialog_editable_get (GtkWidget *widget)
* @widget: A #GtkRadioButton in a radio button group.
* @value: Enumerated value.
* @value_map: Map from enumeration values to array indices.
- *
+ *
* Sets the selected item in a radio group. The specified @widget can be any of
* the #GtkRadioButtons in the group. Each radio button should correspond to an
* enumeration value; the specified @value will be mapped to an integer from
@@ -305,24 +305,24 @@ e_dialog_radio_set (GtkWidget *widget, int value, const int *value_map)
{
GSList *group, *l;
int i;
-
+
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_RADIO_BUTTON (widget));
g_return_if_fail (value_map != NULL);
-
+
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget));
-
+
i = value_to_index (value_map, value);
if (i != -1) {
/* Groups are built by prepending items, so the list ends up in reverse
* order; we need to flip the index around.
*/
i = g_slist_length (group) - i - 1;
-
+
l = g_slist_nth (group, i);
if (!l)
g_message ("e_dialog_radio_set(): could not find index %d in radio group!", i);
-
+
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (l->data), TRUE);
} else
g_message ("e_dialog_radio_set(): could not find value %d in value map!", value);
@@ -332,11 +332,11 @@ e_dialog_radio_set (GtkWidget *widget, int value, const int *value_map)
* e_dialog_radio_get:
* @widget: A #GtkRadioButton in a radio button group.
* @value_map: Map from enumeration values to array indices.
- *
+ *
* Queries the selected item in a #GtkRadioButton group. Please read the
* description of e_dialog_radio_set() to see how @value_map maps enumeration
* values to button indices.
- *
+ *
* Return value: Enumeration value which corresponds to the selected item in the
* radio group.
**/
@@ -345,33 +345,33 @@ e_dialog_radio_get (GtkWidget *widget, const int *value_map)
{
GSList *group, *l;
int i, v;
-
+
g_return_val_if_fail (widget != NULL, -1);
g_return_val_if_fail (GTK_IS_RADIO_BUTTON (widget), -1);
g_return_val_if_fail (value_map != NULL, -1);
-
+
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget));
-
+
for (i = 0, l = group; l; l = l->next, i++) {
widget = GTK_WIDGET (l->data);
-
+
if (GTK_TOGGLE_BUTTON (widget)->active)
break;
}
-
+
g_return_val_if_fail (l != NULL, -1);
-
+
/* Groups are built by prepending items, so the list ends up in reverse
* order; we need to flip the index around.
*/
i = g_slist_length (group) - i - 1;
-
+
v = index_to_value (value_map, i);
if (v == -1) {
g_message ("e_dialog_radio_get(): could not find index %d in value map!", i);
return -1;
}
-
+
return v;
}
@@ -379,7 +379,7 @@ e_dialog_radio_get (GtkWidget *widget, const int *value_map)
* e_dialog_toggle_set:
* @widget: A #GtkToggleButton.
* @value: Toggle value.
- *
+ *
* Sets the value of a #GtkToggleButton-derived widget. This should not be used
* for radio buttons; it is more convenient to use use e_dialog_radio_set()
* instead.
@@ -389,18 +389,18 @@ e_dialog_toggle_set (GtkWidget *widget, gboolean value)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_TOGGLE_BUTTON (widget));
-
+
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value);
}
/**
* e_dialog_toggle_get:
* @widget: A #GtkToggleButton.
- *
+ *
* Queries the value of a #GtkToggleButton-derived widget. This should not be
* used for radio buttons; it is more convenient to use e_dialog_radio_get()
* instead.
- *
+ *
* Return value: Toggle value.
**/
gboolean
@@ -408,7 +408,7 @@ e_dialog_toggle_get (GtkWidget *widget)
{
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (widget), FALSE);
-
+
return GTK_TOGGLE_BUTTON (widget)->active;
}
@@ -416,19 +416,19 @@ e_dialog_toggle_get (GtkWidget *widget)
* e_dialog_spin_set:
* @widget: A #GtkSpinButton.
* @value: Numeric value.
- *
+ *
* Sets the value of a #GtkSpinButton widget.
**/
void
e_dialog_spin_set (GtkWidget *widget, double value)
{
GtkAdjustment *adj;
-
+
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_SPIN_BUTTON (widget));
-
+
adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
-
+
adj->value = value;
g_signal_emit_by_name (adj, "value_changed", 0);
}
@@ -436,19 +436,19 @@ e_dialog_spin_set (GtkWidget *widget, double value)
/**
* e_dialog_spin_get_double:
* @widget: A #GtkSpinButton.
- *
+ *
* Queries the floating-point value of a #GtkSpinButton widget.
- *
+ *
* Return value: Numeric value.
**/
double
e_dialog_spin_get_double (GtkWidget *widget)
{
GtkAdjustment *adj;
-
+
g_return_val_if_fail (widget != NULL, 0.0);
g_return_val_if_fail (GTK_IS_SPIN_BUTTON (widget), 0.0);
-
+
adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (widget));
return adj->value;
}
@@ -456,19 +456,19 @@ e_dialog_spin_get_double (GtkWidget *widget)
/**
* e_dialog_spin_get_int:
* @widget: A #GtkSpinButton.
- *
+ *
* Queries the integer value of a #GtkSpinButton widget.
- *
+ *
* Return value: Numeric value.
**/
int
e_dialog_spin_get_int (GtkWidget *widget)
{
double value;
-
+
g_return_val_if_fail (widget != NULL, -1);
g_return_val_if_fail (GTK_IS_SPIN_BUTTON (widget), -1);
-
+
value = e_dialog_spin_get_double (widget);
return (int) floor (value);
}
@@ -478,7 +478,7 @@ e_dialog_spin_get_int (GtkWidget *widget)
* @widget: A #GtkOptionMenu.
* @value: Enumerated value.
* @value_map: Map from enumeration values to array indices.
- *
+ *
* Sets the selected item in a #GtkOptionMenu. Please read the description of
* e_dialog_radio_set() to see how @value_map maps enumeration values to item
* indices.
@@ -487,13 +487,13 @@ void
e_dialog_option_menu_set (GtkWidget *widget, int value, const int *value_map)
{
int i;
-
+
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_OPTION_MENU (widget));
g_return_if_fail (value_map != NULL);
-
+
i = value_to_index (value_map, value);
-
+
if (i != -1)
gtk_option_menu_set_history (GTK_OPTION_MENU (widget), i);
else
@@ -505,11 +505,11 @@ e_dialog_option_menu_set (GtkWidget *widget, int value, const int *value_map)
* e_dialog_option_menu_get:
* @widget: A #GtkOptionMenu.
* @value_map: Map from enumeration values to array indices.
- *
+ *
* Queries the selected item in a #GtkOptionMenu. Please read the description
* of e_dialog_radio_set() to see how @value_map maps enumeration values to item
* indices.
- *
+ *
* Return value: Enumeration value which corresponds to the selected item in the
* option menu.
**/
@@ -522,31 +522,31 @@ e_dialog_option_menu_get (GtkWidget *widget, const int *value_map)
GList *l;
int i;
int v;
-
+
g_return_val_if_fail (widget != NULL, -1);
g_return_val_if_fail (GTK_IS_OPTION_MENU (widget), -1);
g_return_val_if_fail (value_map != NULL, -1);
-
+
menu = GTK_MENU (gtk_option_menu_get_menu (GTK_OPTION_MENU (widget)));
-
+
active = gtk_menu_get_active (menu);
g_return_val_if_fail (active != NULL, -1);
-
+
children = GTK_MENU_SHELL (menu)->children;
-
+
for (i = 0, l = children; l; l = l->next, i++) {
if (GTK_WIDGET (l->data) == active)
break;
}
-
+
g_return_val_if_fail (l != NULL, -1);
-
+
v = index_to_value (value_map, i);
if (v == -1) {
g_message ("e_dialog_option_menu_get(): could not find index %d in value map!", i);
return -1;
}
-
+
return v;
}
@@ -611,7 +611,7 @@ e_dialog_combo_box_get (GtkWidget *widget, const int *value_map)
* e_dialog_dateedit_set:
* @widget: A #GnomeDateEdit widget.
* @t: Date/time value.
- *
+ *
* Sets the value of a #GnomeDateEdit widget.
**/
void
@@ -619,16 +619,16 @@ e_dialog_dateedit_set (GtkWidget *widget, time_t t)
{
g_return_if_fail (widget != NULL);
g_return_if_fail (GNOME_IS_DATE_EDIT (widget));
-
+
gnome_date_edit_set_time (GNOME_DATE_EDIT (widget), t);
}
/**
* e_dialog_dateedit_get:
* @widget: A #GnomeDateEdit widget.
- *
+ *
* Queries the value of a #GnomeDateEdit widget.
- *
+ *
* Return value: Date/time value.
**/
time_t
@@ -636,7 +636,7 @@ e_dialog_dateedit_get (GtkWidget *widget)
{
g_return_val_if_fail (widget != NULL, -1);
g_return_val_if_fail (GNOME_IS_DATE_EDIT (widget), -1);
-
+
return gnome_date_edit_get_time (GNOME_DATE_EDIT (widget));
}
@@ -647,7 +647,7 @@ e_dialog_dateedit_get (GtkWidget *widget)
* @value_var: Pointer to the variable that the @widget will control.
* @info: NULL for most widgets, or an integer value map array (see
* e_dialog_radio_set() for details).
- *
+ *
* Hooks a widget from a dialog box to the variable it will modify. Supported
* widgets are: #GtkEditable (char *), #GtkRadioButton (int/value_map pair; see
* e_dialog_radio_set() for more information), #GtkTogglebutton (gboolean),
@@ -671,18 +671,18 @@ e_dialog_widget_hook_value (GtkWidget *dialog, GtkWidget *widget,
{
DialogHooks *hooks;
WidgetHook *wh;
-
+
g_return_val_if_fail (dialog != NULL, FALSE);
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
g_return_val_if_fail (value_var != NULL, FALSE);
-
+
hooks = get_dialog_hooks (dialog);
-
+
/* First check if it is a "group" widget, like a radio button or an
* option menu. Then we check for normal ungrouped widgets.
*/
-
+
if (GTK_IS_RADIO_BUTTON (widget))
hook_radio (dialog, GTK_RADIO_BUTTON (widget), value_var, info);
else if (GTK_IS_OPTION_MENU (widget))
@@ -695,14 +695,14 @@ e_dialog_widget_hook_value (GtkWidget *dialog, GtkWidget *widget,
hook_editable (dialog, GTK_EDITABLE (widget), value_var, info);
else
return FALSE;
-
+
wh = g_new (WidgetHook, 1);
wh->widget = widget;
wh->value_var = value_var;
wh->info = info;
-
+
hooks->whooks = g_slist_prepend (hooks->whooks, wh);
-
+
return TRUE;
}
@@ -710,7 +710,7 @@ e_dialog_widget_hook_value (GtkWidget *dialog, GtkWidget *widget,
* e_dialog_get_values:
* @dialog: A dialog box whose widgets have been hooked to the appropriate
* variables with e_dialog_widget_hook_value().
- *
+ *
* Makes every widget in a @dialog that was hooked with
* e_dialog_widget_hook_value() apply its value to its corresponding variable.
* The typical usage is to call this function in the handler for the "OK" button
@@ -721,16 +721,16 @@ e_dialog_get_values (GtkWidget *dialog)
{
DialogHooks *hooks;
GSList *l;
-
+
g_return_if_fail (dialog != NULL);
-
+
hooks = get_dialog_hooks (dialog);
-
+
for (l = hooks->whooks; l; l = l->next) {
WidgetHook *wh;
-
+
wh = l->data;
-
+
if (GTK_IS_RADIO_BUTTON (wh->widget))
get_radio_value (GTK_RADIO_BUTTON (wh->widget), wh->value_var, wh->info);
else if (GTK_IS_OPTION_MENU (wh->widget))
@@ -754,10 +754,10 @@ e_dialog_get_values (GtkWidget *dialog)
* @value_var: Pointer to the variable that the widget will control.
* @info: NULL for most widgets, or an integer value map array (see
* e_dialog_radio_set() for details).
- *
+ *
* Similar to e_dialog_widget_hook_value(), but uses the widget from a #GladeXML
* data structure.
- *
+ *
* Return value: TRUE if the type of the specified widget is supported, FALSE
* otherwise.
**/
@@ -766,19 +766,19 @@ e_dialog_xml_widget_hook_value (GladeXML *xml, GtkWidget *dialog, const char *wi
gpointer value_var, gpointer info)
{
GtkWidget *widget;
-
+
g_return_val_if_fail (xml != NULL, FALSE);
g_return_val_if_fail (GLADE_IS_XML (xml), FALSE);
g_return_val_if_fail (dialog != NULL, FALSE);
g_return_val_if_fail (widget_name != NULL, FALSE);
g_return_val_if_fail (value_var != NULL, FALSE);
-
+
widget = glade_xml_get_widget (xml, widget_name);
if (!widget) {
g_message ("e_dialog_xml_widget_hook_value(): could not find widget `%s' in "
"Glade data!", widget_name);
return FALSE;
}
-
+
return e_dialog_widget_hook_value (dialog, widget, value_var, info);
}
diff --git a/e-util/e-error.c b/e-util/e-error.c
index 9f2a768c9b..94ad35f31a 100644
--- a/e-util/e-error.c
+++ b/e-util/e-error.c
@@ -45,7 +45,7 @@
#include "e-util-private.h"
#include "e-error.h"
-#define d(x)
+#define d(x)
struct _e_error_button {
struct _e_error_button *next;
@@ -110,7 +110,7 @@ static int
map_response(const char *name)
{
int i;
-
+
for (i=0;i<sizeof(response_map)/sizeof(response_map[0]);i++)
if (!strcmp(name, response_map[i].name))
return response_map[i].id;
@@ -169,7 +169,7 @@ ee_load(const char *path)
char *tmp;
d(printf("loading error file %s\n", path));
-
+
doc = e_xml_parse_file (path);
if (doc == NULL) {
g_warning("Error file '%s' not found", path);
@@ -239,7 +239,7 @@ ee_load(const char *path)
e->default_response = map_response(tmp);
xmlFree(tmp);
}
-
+
tmp = (char *)xmlGetProp(error, (const unsigned char *)"scroll");
if (tmp) {
if (!strcmp(tmp, "yes"))
@@ -550,9 +550,9 @@ e_error_newv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap)
gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *)scroll, w);
gtk_box_pack_start((GtkBox *)hbox, scroll, FALSE, FALSE, 0);
gtk_window_set_default_size ((GtkWindow *)dialog, 360, 180);
- } else
+ } else
gtk_box_pack_start((GtkBox *)hbox, w, FALSE, FALSE, 0);
-
+
gtk_widget_show_all(hbox);
gtk_box_pack_start((GtkBox *)dialog->vbox, hbox, TRUE, TRUE, 0);
@@ -562,16 +562,16 @@ e_error_newv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap)
/**
* e_error_new:
- * @parent:
+ * @parent:
* @tag: error identifier
* @arg0: The first argument for the error formatter. The list must
* be NULL terminated.
- *
+ *
* Creates a new error widget. The @tag argument is used to determine
* which error to use, it is in the format domain:error-id. The NULL
* terminated list of arguments, starting with @arg0 is used to fill
* out the error definition.
- *
+ *
* Return value: A GtkDialog which can be used for showing an error
* dialog asynchronously.
**/
@@ -604,13 +604,13 @@ e_error_runv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap)
/**
* e_error_run:
- * @parent:
- * @tag:
- * @arg0:
- *
+ * @parent:
+ * @tag:
+ * @arg0:
+ *
* Sets up, displays, runs and destroys a standard evolution error
* dialog based on @tag, which is in the format domain:error-id.
- *
+ *
* Return value: The response id of the button pressed.
**/
int
@@ -638,8 +638,8 @@ remove_parent(GtkWidget *w, GtkWidget *parent)
/**
* e_error_default_parent:
- * @parent:
- *
+ * @parent:
+ *
* Bit of a hack, set a default parent that will be used to parent any
* error boxes if none is supplied.
*
diff --git a/e-util/e-event.c b/e-util/e-event.c
index 363cc7f91f..5ac51d10ee 100644
--- a/e-util/e-event.c
+++ b/e-util/e-event.c
@@ -132,9 +132,9 @@ ep_class_init(GObjectClass *klass)
/**
* e_event_get_type:
- *
+ *
* Standard GObject type function. Used to subclass EEvent.
- *
+ *
* Return value: The EEvent type.
**/
GType
@@ -161,9 +161,9 @@ e_event_get_type(void)
* e_event_construct:
* @ep: An instantiated but uninitialised EEvent.
* @id: Event manager id.
- *
+ *
* Construct the base event instance with standard parameters.
- *
+ *
* Return value: Returns @ep.
**/
EEvent *e_event_construct(EEvent *ep, const char *id)
@@ -179,7 +179,7 @@ EEvent *e_event_construct(EEvent *ep, const char *id)
* @items: A list of EEventItems event listeners to register on this event manager.
* @freefunc: A function called when the @items list is no longer needed.
* @data: callback data for @freefunc and for item event handlers.
- *
+ *
* Adds @items to the list of events listened to on the event manager @emp.
*
* Return value: An opaque key which can later be passed to remove_items.
@@ -206,9 +206,9 @@ e_event_add_items(EEvent *emp, GSList *items, EEventItemsFunc freefunc, void *da
/**
* e_event_remove_items:
- * @emp:
- * @handle:
- *
+ * @emp:
+ * @handle:
+ *
* Remove items previously added. They MUST have been previously
* added, and may only be removed once.
**/
@@ -226,7 +226,7 @@ e_event_remove_items(EEvent *emp, void *handle)
g_slist_foreach(emp->priv->sorted, (GFunc)g_free, NULL);
g_slist_free(emp->priv->sorted);
emp->priv->sorted = NULL;
- }
+ }
}
static int
@@ -248,7 +248,7 @@ ee_cmp(const void *ap, const void *bp)
* @ee: An initialised EEvent, potentially with registered event listeners.
* @id: Event name. This will be compared against EEventItem.id.
* @target: The target describing the event context. This will be implementation defined.
- *
+ *
* Emit an event. @target will automatically be freed once its
* emission is complete.
**/
@@ -272,7 +272,7 @@ e_event_emit(EEvent *emp, const char *id, EEventTarget *target)
for (;node->next;node=node->next) {
GSList *l = node->events;
-
+
for (;l;l=g_slist_next(l)) {
struct _event_info *info;
@@ -312,7 +312,7 @@ e_event_emit(EEvent *emp, const char *id, EEventTarget *target)
* @ep: An initialised EEvent instance.
* @type: type, up to implementor
* @size: The size of memory to allocate. This must be >= sizeof(EEventTarget).
- *
+ *
* Allocate a new event target suitable for this class. It is up to
* the implementation to define the available target types and their
* structure.
@@ -338,7 +338,7 @@ void *e_event_target_new(EEvent *ep, int type, size_t size)
* e_event_target_free:
* @ep: An initialised EEvent instance on which this target was allocated.
* @o: The target to free.
- *
+ *
* Free a target. This invokes the virtual free method on the EEventClass.
**/
void
@@ -526,17 +526,17 @@ emph_class_init(EPluginHookClass *klass)
/**
* e_event_hook_get_type:
- *
+ *
* Standard GObject function to get the EEvent object type. Used to
* subclass EEventHook.
- *
+ *
* Return value: The type of the event hook class.
**/
GType
e_event_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EEventHookClass), NULL, NULL, (GClassInitFunc) emph_class_init, NULL, NULL,
@@ -546,7 +546,7 @@ e_event_hook_get_type(void)
emph_parent_class = g_type_class_ref(e_plugin_hook_get_type());
type = g_type_register_static(e_plugin_hook_get_type(), "EEventHook", &info, 0);
}
-
+
return type;
}
@@ -555,7 +555,7 @@ e_event_hook_get_type(void)
* @klass: The derived EEventHook class.
* @map: A map used to describe a single EEventTarget type for this
* class.
- *
+ *
* Add a target map to a concrete derived class of EEvent. The target
* map enumerates a single target type and th eenable mask bit names,
* so that the type can be loaded automatically by the base EEvent class.
diff --git a/e-util/e-event.h b/e-util/e-event.h
index d75d550767..e7cafbc33f 100644
--- a/e-util/e-event.h
+++ b/e-util/e-event.h
@@ -49,10 +49,10 @@ typedef void (*EEventFactoryFunc)(EEvent *ee, void *);
/**
* enum _e_event_t - Event type.
- *
+ *
* @E_EVENT_PASS: A passthrough event handler which only receives the event.
* @E_EVENT_SINK: A sink event handler swallows all events it processes.
- *
+ *
* The event type defines what type of event listener this is.
*
* Events should normally be @E_EVENT_PASS.
@@ -64,7 +64,7 @@ enum _e_event_t {
/**
* struct _EEventItem - An event listener item.
- *
+ *
* @type: The type of the event listener.
* @priority: A signed number signifying the priority of the event
* listener. 0 should be used normally. This is used to order event
@@ -78,7 +78,7 @@ enum _e_event_t {
* @user_data: Callback data.
* @enable: Target-specific mask to qualify the receipt of events.
* This is target and implementation specific.
- *
+ *
* An EEventItem defines a specific event listening point on a given
* EEvent object. When an event is broadcast onto an EEvent handler,
* any matching EEventItems will be invoked in priority order.
@@ -95,7 +95,7 @@ struct _EEventItem {
/**
* struct _EEventTarget - Base EventTarget.
- *
+ *
* @event: Parent object.
* @type: Target type. Defined by the implementation.
* @mask: Mask of this target. This is defined by the implementation,
@@ -104,7 +104,7 @@ struct _EEventItem {
* This defined a base EventTarget. This must be subclassed by
* implementations to provide contextual data for events, and define
* the enablement qualifiers.
- *
+ *
**/
struct _EEventTarget {
struct _EEvent *event; /* used for virtual methods */
@@ -117,7 +117,7 @@ struct _EEventTarget {
/**
* struct _EEvent - An Event Manager.
- *
+ *
* @object: Superclass.
* @priv: Private data.
* @id: Id of this event manager.
@@ -138,7 +138,7 @@ struct _EEvent {
/**
* struct _EEventClass - Event management type.
- *
+ *
* @object_class: Superclass.
* @target_free: Virtual method to free the target.
*
@@ -187,7 +187,7 @@ typedef void (*EEventHookFunc)(struct _EPlugin *plugin, EEventTarget *target);
/**
* struct _EEventHook - An event hook.
- *
+ *
* @hook: Superclass.
*
* The EEventHook class loads and manages the meta-data required to
@@ -202,13 +202,13 @@ struct _EEventHook {
};
/**
- * struct _EEventHookClass -
- *
- * @hook_class:
+ * struct _EEventHookClass -
+ *
+ * @hook_class:
* @target_map: Table of EPluginHookTargetMaps which enumerate the
* target types and enable bits of the implementing class.
* @event: The EEvent instance on which all loaded events must be registered.
- *
+ *
* The EEventHookClass is an empty event hooking class, which must be
* subclassed and initialised before use.
*
diff --git a/e-util/e-folder-map.c b/e-util/e-folder-map.c
index 31ae5ffb8e..6c6e07e263 100644
--- a/e-util/e-folder-map.c
+++ b/e-util/e-folder-map.c
@@ -45,25 +45,25 @@ is_type_folder (const char *metadata, const char *search_type)
xmlNodePtr node;
xmlDocPtr doc;
char *type;
-
+
doc = e_xml_parse_file (metadata);
if (!doc) {
g_warning ("Cannot parse `%s'", metadata);
return FALSE;
}
-
+
if (!(node = xmlDocGetRootElement (doc))) {
g_warning ("`%s' corrupt: document contains no root node", metadata);
xmlFreeDoc (doc);
return FALSE;
}
-
+
if (!node->name || strcmp ((char *)node->name, "efolder") != 0) {
g_warning ("`%s' corrupt: root node is not 'efolder'", metadata);
xmlFreeDoc (doc);
return FALSE;
}
-
+
node = node->children;
while (node != NULL) {
if (node->name && !strcmp ((char *)node->name, "type")) {
@@ -71,20 +71,20 @@ is_type_folder (const char *metadata, const char *search_type)
if (!strcmp (type, search_type)) {
xmlFreeDoc (doc);
xmlFree (type);
-
+
return TRUE;
}
-
+
xmlFree (type);
-
+
break;
}
-
+
node = node->next;
}
-
+
xmlFreeDoc (doc);
-
+
return FALSE;
}
@@ -101,7 +101,7 @@ e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list)
g_free (path);
return;
}
-
+
if (!is_type_folder (path, type)) {
g_free (path);
goto try_subdirs;
@@ -109,8 +109,8 @@ e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list)
d(g_message ("Found '%s'", dirname));
*dir_list = g_slist_prepend (*dir_list, g_strdup (dirname));
-
- g_free (path);
+
+ g_free (path);
try_subdirs:
@@ -119,32 +119,32 @@ e_folder_map_dir (const char *dirname, const char *type, GSList **dir_list)
g_free (path);
return;
}
-
+
if (!(dir = g_dir_open (path, 0, &error))) {
g_warning ("cannot open `%s': %s", path, error->message);
g_error_free (error);
g_free (path);
return;
}
-
+
while ((name = g_dir_read_name (dir))) {
char *full_path;
-
+
if (*name == '.')
continue;
-
+
full_path = g_build_filename (path, name, NULL);
if (!g_file_test (full_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
g_free (full_path);
continue;
}
-
+
e_folder_map_dir (full_path, type, dir_list);
g_free (full_path);
}
-
+
g_dir_close (dir);
-
+
g_free (path);
}
@@ -152,34 +152,34 @@ GSList *
e_folder_map_local_folders (char *local_dir, char *type)
{
const char *name;
- GDir *dir;
+ GDir *dir;
GSList *dir_list = NULL;
GError *error = NULL;
-
+
if (!(dir = g_dir_open (local_dir, 0, &error))) {
g_warning ("cannot open `%s': %s", local_dir, error->message);
g_error_free (error);
return NULL;
}
-
+
while ((name = g_dir_read_name (dir))) {
char *full_path;
-
+
if (*name == '.')
continue;
-
+
full_path = g_build_filename (local_dir, name, NULL);
d(g_message ("Looking in %s", full_path));
if (!g_file_test (full_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
g_free (full_path);
continue;
}
-
+
e_folder_map_dir (full_path, type, &dir_list);
g_free (full_path);
}
-
+
g_dir_close (dir);
return dir_list;
diff --git a/e-util/e-fsutils.c b/e-util/e-fsutils.c
index cb126df0cf..97118eddd0 100644
--- a/e-util/e-fsutils.c
+++ b/e-util/e-fsutils.c
@@ -51,10 +51,10 @@
/**
* e_fsutils_usage:
- * @path:
- *
+ * @path:
+ *
* Calculate the amount of disk space used by a given path.
- *
+ *
* Return value: The number of 1024 byte blocks used by the
* filesystem.
**/
@@ -118,10 +118,10 @@ fail:
/**
* e_fsutils_avail:
- * @path:
- *
+ * @path:
+ *
* Find the available disk space at the given path.
- *
+ *
* Return value: -1 if it could not be determined, otherwise the
* number of disk blocks, expressed as system-independent, 1024 byte
* blocks.
diff --git a/e-util/e-gui-utils.c b/e-util/e-gui-utils.c
index 18f9c9b50f..5a828dedf6 100644
--- a/e-util/e-gui-utils.c
+++ b/e-util/e-gui-utils.c
@@ -69,7 +69,7 @@ GtkWidget *e_create_image_widget(gchar *name,
{
GtkWidget *alignment = NULL;
GtkWidget *w;
-
+
if (string1) {
w = e_icon_factory_get_image (string1, E_ICON_SIZE_DIALOG);
diff --git a/e-util/e-html-utils.h b/e-util/e-html-utils.h
index 9d2262f9a7..73f40c9977 100644
--- a/e-util/e-html-utils.h
+++ b/e-util/e-html-utils.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* e-html-utils.c */
-/*
+/*
* Copyright (C) 2000 Ximian, Inc.
* Author: Dan Winship <danw@ximian.com>
*
diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c
index 52a7f14e82..78b8122cdd 100644
--- a/e-util/e-icon-factory.c
+++ b/e-util/e-icon-factory.c
@@ -110,22 +110,22 @@ load_icon (const char *icon_key, const char *icon_name, int size, int scale)
int width;
GDir *dir;
char *x;
-
+
if (!(dir = g_dir_open (EVOLUTION_ICONSDIR, 0, NULL))) {
goto done;
}
-
+
/* scan icon directories looking for an icon with a size >= the size we need. */
while ((dent = g_dir_read_name (dir))) {
if (!(dent[0] >= '1' && dent[0] <= '9'))
continue;
-
+
if (((width = strtol (dent, &x, 10)) < size) || *x != 'x')
continue;
-
+
if (((strtol (x + 1, &x, 10)) != width) || *x != '\0')
continue;
-
+
/* if the icon exists in this directory, we can [use/scale] it */
g_free (filename);
basename = g_strconcat (icon_name, ".png", NULL);
@@ -137,7 +137,7 @@ load_icon (const char *icon_key, const char *icon_name, int size, int scale)
if ((unscaled = gdk_pixbuf_new_from_file (filename, NULL)))
break;
}
-
+
g_dir_close (dir);
} else {
gchar *size_x_size;
@@ -213,8 +213,8 @@ e_icon_factory_init (void)
icon_theme = gtk_icon_theme_get_default ();
gtk_icon_theme_append_search_path (icon_theme,
- EVOLUTION_DATADIR G_DIR_SEPARATOR_S
- "evolution" G_DIR_SEPARATOR_S
+ EVOLUTION_DATADIR G_DIR_SEPARATOR_S
+ "evolution" G_DIR_SEPARATOR_S
BASE_VERSION G_DIR_SEPARATOR_S "icons");
g_signal_connect (
icon_theme, "changed",
@@ -386,12 +386,12 @@ e_icon_factory_get_icon_list (const char *icon_name)
for (i = 0; i < G_N_ELEMENTS (icon_list_sizes); i++) {
size = icon_list_sizes[i];
sprintf (icon_key, "%dx%d/%s", size, size, icon_name);
-
+
if (!(icon = g_hash_table_lookup (name_to_icon, icon_key))) {
if ((icon = load_icon (icon_key, icon_name, size, FALSE)))
g_hash_table_insert (name_to_icon, icon->name, icon);
}
-
+
if (icon && icon->pixbuf) {
list = g_list_prepend (list, icon->pixbuf);
g_object_ref (icon->pixbuf);
diff --git a/e-util/e-import.c b/e-util/e-import.c
index 7cf02c07e5..92a54f59ac 100644
--- a/e-util/e-import.c
+++ b/e-util/e-import.c
@@ -47,7 +47,7 @@
#include <glib/gi18n.h>
-#define d(x)
+#define d(x)
#define _PRIVATE(o) (g_type_instance_get_private ((GTypeInstance *)o, e_import_get_type()))
@@ -124,10 +124,10 @@ ep_base_init(GObjectClass *klass)
/**
* e_import_get_type:
- *
+ *
* Standard GObject method. Used to subclass for the concrete
* implementations.
- *
+ *
* Return value: EImport type.
**/
GType
@@ -154,9 +154,9 @@ e_import_get_type(void)
* e_import_construct:
* @ep: The instance to initialise.
* @id: The name of the instance.
- *
+ *
* Used by implementing classes to initialise base parameters.
- *
+ *
* Return value: @ep is returned.
**/
EImport *e_import_construct(EImport *ep, const char *id)
@@ -175,13 +175,13 @@ EImport *e_import_new(const char *id)
/**
* e_import_import:
- * @ei:
+ * @ei:
* @t: Target to import.
* @im: Importer to use.
* @status: Status callback, called with progress information.
* @done: Complete callback, will always be called once complete.
* @data:
- *
+ *
* Run the import function of the selected importer. Once the
* importer has finished, it MUST call the e_import_complete()
* function. This allows importers to run in synchronous or
@@ -213,11 +213,11 @@ void e_import_cancel(EImport *ei, EImportTarget *t, EImportImporter *im)
* @ei:
* @target: Target of interest
* @im: Importer to get widget of
- *
+ *
* Gets a widget that the importer uses to configure its
* destination. This widget should be packed into a container
* widget. It should not be shown_all.
- *
+ *
* Return value: NULL if the importer doesn't support/require
* a destination.
**/
@@ -232,9 +232,9 @@ e_import_get_widget(EImport *ei, EImportTarget *target, EImportImporter *im)
/**
* e_import_complete:
- * @ei:
+ * @ei:
* @target: Target just completed (unused currently)
- *
+ *
* Signify that an import is complete. This must be called by
* importer implementations when they are done.
**/
@@ -252,14 +252,14 @@ void e_import_status(EImport *ei, EImportTarget *target, const char *what, int p
/**
* e_import_get_importers:
- * @emp:
- * @target:
- *
+ * @emp:
+ * @target:
+ *
* Get a list of importers. If @target is supplied, then only
* importers which support the type and location specified by the
* target are listed. If @target is NULL, then all importers are
* listed.
- *
+ *
* Return value: A list of importers. The list should be freed when
* no longer needed.
**/
@@ -292,7 +292,7 @@ e_import_get_importers(EImport *emp, EImportTarget *target)
* @freefunc: If supplied, called to free the importer node
* when it is no longer needed.
* @data: Data for the callback.
- *
+ *
**/
void
e_import_class_add_importer(EImportClass *klass, EImportImporter *importer, EImportImporterFunc freefunc, void *data)
@@ -343,7 +343,7 @@ void e_import_class_remove_importer(EImportClass *klass, EImportImporter *f)
* @ep: Parent EImport object.
* @type: type, up to implementor
* @size: Size of object to allocate.
- *
+ *
* Allocate a new import target suitable for this class. Implementing
* classes will define the actual content of the target.
**/
@@ -369,7 +369,7 @@ void *e_import_target_new(EImport *ep, int type, size_t size)
* e_import_target_free:
* @ep: Parent EImport object.
* @o: The target to fre.
- *
+ *
* Free a target. The implementing class can override this method to
* free custom targets.
**/
@@ -583,7 +583,7 @@ emph_class_init(EPluginHookClass *klass)
/** @HookClass: Evolution Importers
* @Id: org.gnome.evolution.import:1.0
* @Target: EImportTarget
- *
+ *
* A hook for data importers.
**/
@@ -600,16 +600,16 @@ emph_class_init(EPluginHookClass *klass)
/**
* e_import_hook_get_type:
- *
+ *
* Standard GObject function to get the object type.
- *
+ *
* Return value: The EImportHook class type.
**/
GType
e_import_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EImportHookClass), NULL, NULL, (GClassInitFunc) emph_class_init, NULL, NULL,
@@ -619,7 +619,7 @@ e_import_hook_get_type(void)
emph_parent_class = g_type_class_ref(e_plugin_hook_get_type());
type = g_type_register_static(e_plugin_hook_get_type(), "EImportHook", &info, 0);
}
-
+
return type;
}
@@ -629,7 +629,7 @@ e_import_hook_get_type(void)
* @klass: The dervied EimportHook class.
* @map: A map used to describe a single EImportTarget type for this
* class.
- *
+ *
* Add a targe tmap to a concrete derived class of EImport. The
* target map enumates the target types available for the implenting
* class.
diff --git a/e-util/e-import.h b/e-util/e-import.h
index 40bd29655a..15f2e3aea8 100644
--- a/e-util/e-import.h
+++ b/e-util/e-import.h
@@ -60,8 +60,8 @@ enum _e_import_target_t {
};
/**
- * struct _EImportImporter -
- *
+ * struct _EImportImporter -
+ *
* @type: target type
* @priority: Priority of importer. Higher values will be processed first.
* @supported: Callback to see if this target is supported by the importer.
@@ -90,13 +90,13 @@ struct _EImportImporter {
/**
* struct _EImportTarget - importation context.
- *
+ *
* @import: The parent object.
* @type: The type of target, defined by implementing classes.
* @data: This can be used to store run-time information
* about this target. Any allocated data must be set so
* as to free it when the target is freed.
- *
+ *
* The base target object is used as the parent and placeholder for
* import context for a given importer.
**/
@@ -128,7 +128,7 @@ struct _EImportTargetHome {
/**
* struct _EImport - An importer management object.
- *
+ *
* @object: Superclass.
* @id: ID of importer.
* @status: Status callback of current running import.
@@ -148,7 +148,7 @@ struct _EImport {
/**
* struct _EImportClass - Importer manager abstract class.
- *
+ *
* @object_class: Superclass.
* @factories: A list of factories registered on this type of
* importuration manager.
@@ -157,7 +157,7 @@ struct _EImport {
* into changes on the target to propery drive the manager.
* @target_free: A virtual method used to free the target in an
* implementation-defined way.
- *
+ *
**/
struct _EImportClass {
GObjectClass object_class;
@@ -223,11 +223,11 @@ struct _EImportHookImporter {
/**
* struct _EImportHook - Plugin hook for importuration windows.
- *
+ *
* @hook: Superclass.
* @groups: A list of EImportHookGroup's of all importuration windows
* this plugin hooks into.
- *
+ *
**/
struct _EImportHook {
EPluginHook hook;
@@ -238,7 +238,7 @@ struct _EImportHook {
/**
* struct _EImportHookClass - Abstract class for importuration window
* plugin hooks.
- *
+ *
* @hook_class: Superclass.
* @target_map: A table of EImportHookTargetMap structures describing
* the possible target types supported by this class.
@@ -247,7 +247,7 @@ struct _EImportHook {
*
* This is an abstract class defining the plugin hook point for
* importuration windows.
- *
+ *
**/
struct _EImportHookClass {
EPluginHookClass hook_class;
diff --git a/e-util/e-menu.c b/e-util/e-menu.c
index c9e6d098b4..0582d35c96 100644
--- a/e-util/e-menu.c
+++ b/e-util/e-menu.c
@@ -148,9 +148,9 @@ em_base_init(GObjectClass *klass)
/**
* e_menu_get_type:
- *
+ *
* Standard GObject type function. Used to subclass this type only.
- *
+ *
* Return value: The EMenu object type.
**/
GType
@@ -178,9 +178,9 @@ e_menu_get_type(void)
* e_menu_construct:
* @em: An instantiated but uninitislied EPopup.
* @menuid: The unique identifier for this menu.
- *
+ *
* Construct the base menu instance based on the parameters.
- *
+ *
* Return value: Returns @em.
**/
EMenu *e_menu_construct(EMenu *em, const char *menuid)
@@ -225,7 +225,7 @@ EMenu *e_menu_construct(EMenu *em, const char *menuid)
* associated with the menus.
* @freefunc: If supplied, called when the menu items are no longer needed.
* @data: user-data passed to @freefunc and activate callbacks.
- *
+ *
* Add new EMenuItems to the menu's. This may be called any number of
* times before the menu is first activated to hook onto any of the
* menu items defined for that view.
@@ -281,9 +281,9 @@ e_menu_add_items(EMenu *emp, GSList *items, GSList *uifiles, GSList *pixmaps, EM
/**
* e_menu_remove_items:
- * @emp:
- * @handle:
- *
+ * @emp:
+ * @handle:
+ *
* Remove menu items previously added.
**/
void
@@ -298,7 +298,7 @@ e_menu_remove_items(EMenu *emp, void *handle)
if (emp->uic) {
for (l = node->items;l;l=g_slist_next(l)) {
EMenuItem *item = l->data;
-
+
bonobo_ui_component_remove_verb(emp->uic, item->verb);
}
}
@@ -341,7 +341,7 @@ em_activate(BonoboUIComponent *uic, void *data, const char *cname)
* @em: An initialised EMenu.
* @uic: The BonoboUI component for this views menu's.
* @act: If %TRUE, then the control is being activated.
- *
+ *
* This is called by the owner of the component, control, or view to
* pass on the activate or deactivate control signals. If the view is
* being activated then the callbacks and menu items are setup,
@@ -424,7 +424,7 @@ void e_menu_activate(EMenu *em, struct _BonoboUIComponent *uic, int act)
* e_menu_update_target:
* @em: An initialised EMenu.
* @tp: Target, after this call the menu owns the target.
- *
+ *
* Change the target for the menu. Once the target is changed, the
* sensitivity state of the menu items managed by @em is re-evaluated
* and the physical menu's updated to reflect it.
@@ -477,13 +477,13 @@ void e_menu_update_target(EMenu *em, void *tp)
* called on all menus.
* @func: An EMenuFactoryFunc callback.
* @data: Callback data for @func.
- *
+ *
* Add a menu factory which will be called when the menu @menuid is
* created. The factory is free to add new items as it wishes to the
* menu provided in the callback.
*
* TODO: Make the menuid a pattern?
- *
+ *
* Return value: A handle to the factory.
**/
EMenuFactory *
@@ -515,7 +515,7 @@ e_menu_class_add_factory(EMenuClass *klass, const char *menuid, EMenuFactoryFunc
* e_menu_class_remove_factory:
* @klass: Class on which the factory was originally added.
* @f: Factory handle.
- *
+ *
* Remove a popup factory. This must only be called once, and must
* only be called using a valid factory handle @f. After this call,
* @f is undefined.
@@ -533,7 +533,7 @@ e_menu_class_remove_factory(EMenuClass *klass, EMenuFactory *f)
* @ep: An EMenu to which this target applies.
* @type: Target type, up to implementation.
* @size: Size of memory to allocate. Must be >= sizeof(EMenuTarget).
- *
+ *
* Allocate a new menu target suitable for this class. @size is used
* to specify the actual target size, which may vary depending on the
* implementing class.
@@ -559,7 +559,7 @@ void *e_menu_target_new(EMenu *ep, int type, size_t size)
* e_menu_target_free:
* @ep: EMenu on which the target was allocated.
* @o: Tareget to free.
- *
+ *
* Free a target.
**/
void
@@ -886,17 +886,17 @@ emph_class_init(EPluginHookClass *klass)
/**
* e_menu_hook_get_type:
- *
+ *
* Standard GObject function to get the object type. Used to subclass
* EMenuHook.
- *
+ *
* Return value: The type of the menu hook class.
**/
GType
e_menu_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMenuHookClass), NULL, NULL, (GClassInitFunc) emph_class_init, NULL, NULL,
@@ -906,7 +906,7 @@ e_menu_hook_get_type(void)
emph_parent_class = g_type_class_ref(e_plugin_hook_get_type());
type = g_type_register_static(e_plugin_hook_get_type(), "EMenuHook", &info, 0);
}
-
+
return type;
}
@@ -914,7 +914,7 @@ e_menu_hook_get_type(void)
* e_menu_hook_class_add_target_map:
* @klass: The derived EMenuHook class.
* @map: A map used to describe a single EMenuTarget for this class.
- *
+ *
* Adds a target map to a concrete derived class of EMenu. The target
* map enumerates a single target type, and the enable mask bit names,
* so that the type can be loaded automatically by the EMenu class.
diff --git a/e-util/e-menu.h b/e-util/e-menu.h
index 2692878172..c5548a335b 100644
--- a/e-util/e-menu.h
+++ b/e-util/e-menu.h
@@ -53,13 +53,13 @@ typedef void (*EMenuItemsFunc)(EMenu *, GSList *items, GSList *uifiles, GSList *
/**
* enum _e_menu_t - Menu item type.
- *
+ *
* @E_MENU_ITEM: Normal menu item.
* @E_MENU_TOGGLE: Toggle menu item.
* @E_MENU_RADIO: unimplemented.
* @E_MENU_TYPE_MASK: Mask used to separate item type from option bits.
* @E_MENU_ACTIVE: Whether a toggle item is active.
- *
+ *
* The type of menu items which are supported by the menu system.
**/
enum _e_menu_t {
@@ -72,7 +72,7 @@ enum _e_menu_t {
/**
* struct _EMenuItem - A BonoboUI menu item.
- *
+ *
* @type: Menu item type. %E_MENU_ITEM or %E_MENU_TOGGLE.
* @path: BonoboUI Path to the menu item.
* @verb: BonoboUI verb for the menu item.
@@ -82,7 +82,7 @@ enum _e_menu_t {
* @user_data: User data for item.
* @visible: Visibility mask, unimplemented.
* @enable: Sensitivity mask, combined with the target mask.
- *
+ *
* An EMenuItem defines a single menu item. This menu item is used to
* hook onto callbacks from the bonobo menus, but not to build or
* merge the menu itself.
@@ -99,7 +99,7 @@ struct _EMenuItem {
/**
* struct _EMenuPixmap - A menu icon holder.
- *
+ *
* @command: The path to the command or verb to which this pixmap belongs.
* @name: The name of the icon. Either an icon-theme name or the full
* pathname of the icon.
@@ -119,11 +119,11 @@ struct _EMenuPixmap {
/**
* struct _EMenuUIFile - A meu UI file holder.
- *
+ *
* @appdir: TODO; should this be handled internally.
* @appname: TODO; should this be handled internally.
* @filename: The filename of the BonoboUI XML menu definition.
- *
+ *
* These values are passed directly to bonobo_ui_util_set_ui() when
* the menu is activated.
**/
@@ -135,7 +135,7 @@ struct _EMenuUIFile {
/**
* struct _EMenuTarget - A BonoboUI menu target definition.
- *
+ *
* @menu: The parent menu object, used for virtual methods on the target.
* @widget: The parent widget where available. In some cases the type
* of this object is part of the published api for the target, in
@@ -144,7 +144,7 @@ struct _EMenuUIFile {
* @type: Target type. This will be defined by the implementation.
* @mask: Target mask. This is used to sensitise show items based on
* their definition in EMenuItem.
- *
+ *
* An EMenuTarget defines the context for a specific view instance.
* It is used to enable and show menu items, and to provide contextual
* data to menu invocations.
@@ -156,20 +156,20 @@ struct _EMenuTarget {
guint32 type; /* for implementors */
guint32 mask; /* enable/visible mask */
-
+
/* implementation fields follow */
};
/**
* struct _EMenu - A BonoboUI menu manager object.
- *
+ *
* @object: Superclass.
* @priv: Private data.
* @menuid: The id of this menu instance.
* @uic: The current BonoboUIComponent which stores the actual menu
* items this object manages.
* @target: The current target for the view.
- *
+ *
* The EMenu manager object manages the mappings between EMenuItems
* and the BonoboUI menus loaded from UI files.
**/
@@ -183,8 +183,8 @@ struct _EMenu {
};
/**
- * struct _EMenuClass -
- *
+ * struct _EMenuClass -
+ *
* @object_class: Superclass type.
* @factories: A list of factories for this particular class of main menu.
* @target_free: Virtual method to free the menu target. The base
@@ -245,7 +245,7 @@ typedef void (*EMenuHookFunc)(struct _EPlugin *plugin, EMenuTarget *target);
/**
* struct _EMenuHookMenu - A group of items targetting a specific menu.
- *
+ *
* @hook: Parent pointer.
* @id: The identifier of the menu or view to which these items belong.
* @target_type: The target number of the type of target these menu
@@ -254,7 +254,7 @@ typedef void (*EMenuHookFunc)(struct _EPlugin *plugin, EMenuTarget *target);
* @uis: A list of filenames of the BonoboUI files that need to be
* loaded for an active view.
* @pixmaps: A list of EMenuHookPixmap structures for the menus.
- *
+ *
* This structure is used to keep track of all of the items that a
* plugin wishes to add to specific menu. This is used internally by
* a factory method defined by the EMenuHook to add the right menu
@@ -271,7 +271,7 @@ struct _EMenuHookMenu {
/**
* struct _EMenuHook - A BonoboUI menu hook.
- *
+ *
* @hook: Superclass.
* @menus: A list of EMenuHookMenus for all menus registered on this
* hook type.
@@ -287,13 +287,13 @@ struct _EMenuHook {
/**
* struct _EMenuHookClass - Menu hook type.
- *
+ *
* @hook_class: Superclass type.
* @target_map: Table of EluginHookTargetMaps which enumerate the
* target types and enable bits of the implementing class.
* @menu_class: The EMenuClass of the corresponding popup manager for
* implementing the class.
- *
+ *
* The EMenuHookClass is an empty concrete class. It must be
* subclassed and initialised appropriately to perform useful work.
*
diff --git a/e-util/e-mktemp.c b/e-util/e-mktemp.c
index 02a3e784fd..9ff294f929 100644
--- a/e-util/e-mktemp.c
+++ b/e-util/e-mktemp.c
@@ -107,10 +107,10 @@ get_dir (gboolean make)
GString *path;
time_t now = time(NULL);
static time_t last = 0;
-
+
#ifdef TEMP_HOME
char *tmpdir = NULL;
- tmpdir = g_build_filename(g_get_home_dir(), ".evolution",
+ tmpdir = g_build_filename(g_get_home_dir(), ".evolution",
"cache", "tmp", NULL);
path = g_string_new(tmpdir);
if (make && g_mkdir_with_parents(tmpdir, 0777) == -1) {
@@ -123,20 +123,20 @@ get_dir (gboolean make)
g_string_append_printf (path, "%d", (int) getuid ());
if (make) {
int ret;
-
+
/* shoot now, ask questions later */
ret = g_mkdir (path->str, S_IRWXU);
if (ret == -1) {
if (errno == EEXIST) {
struct stat st;
-
+
if (g_stat (path->str, &st) == -1) {
/* reset errno */
errno = EEXIST;
g_string_free (path, TRUE);
return NULL;
}
-
+
/* make sure this is a directory and belongs to us... */
if (!S_ISDIR (st.st_mode) || st.st_uid != getuid ()) {
/* eek! this is bad... */
@@ -150,7 +150,7 @@ get_dir (gboolean make)
}
}
}
-#endif
+#endif
d(printf("temp dir '%s'\n", path ? path->str : "(null)"));
@@ -168,20 +168,20 @@ e_mktemp (const char *template)
{
GString *path;
char *ret;
-
+
path = get_dir (TRUE);
if (!path)
return NULL;
-
+
g_string_append_c (path, '/');
if (template)
g_string_append (path, template);
else
g_string_append (path, "unknown-XXXXXX");
-
+
ret = mktemp (path->str);
g_string_free(path, ret == NULL);
-
+
return ret;
}
@@ -191,20 +191,20 @@ e_mkstemp (const char *template)
{
GString *path;
int fd;
-
+
path = get_dir (TRUE);
if (!path)
return -1;
-
+
g_string_append_c (path, '/');
if (template)
g_string_append (path, template);
else
g_string_append (path, "unknown-XXXXXX");
-
+
fd = g_mkstemp (path->str);
g_string_free(path, TRUE);
-
+
return fd;
}
@@ -214,17 +214,17 @@ e_mkdtemp (const char *template)
{
GString *path;
char *tmpdir;
-
+
path = get_dir (TRUE);
if (!path)
return NULL;
-
+
g_string_append_c (path, '/');
if (template)
g_string_append (path, template);
else
g_string_append (path, "unknown-XXXXXX");
-
+
#ifdef HAVE_MKDTEMP
tmpdir = mkdtemp (path->str);
#else
@@ -235,6 +235,6 @@ e_mkdtemp (const char *template)
}
#endif
g_string_free(path, tmpdir == NULL);
-
+
return tmpdir;
}
diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c
index 3276337679..8c6f6a826c 100644
--- a/e-util/e-pilot-map.c
+++ b/e-util/e-pilot-map.c
@@ -30,7 +30,7 @@
#include "e-pilot-map.h"
-typedef struct
+typedef struct
{
char *uid;
gboolean archived;
@@ -65,7 +65,7 @@ real_e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean
if (pid != 0) {
new_pid = g_new (guint32, 1);
*new_pid = pid;
- }
+ }
new_uid = g_strdup (uid);
/* Values */
@@ -76,13 +76,13 @@ real_e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean
if (touch)
pnode->touched = TRUE;
}
-
+
unode = g_new0 (EPilotMapUidNode, 1);
unode->pid = pid;
unode->archived = archived;
if (touch)
unode->touched = TRUE;
-
+
/* Insertion */
if (pid != 0)
g_hash_table_insert (map->pid_map, new_pid, pnode);
@@ -93,14 +93,14 @@ static void
map_set_node_timet (xmlNodePtr node, const char *name, time_t t)
{
char *tstring;
-
+
tstring = g_strdup_printf ("%ld", t);
xmlSetProp (node, (unsigned char *)name, (unsigned char *)tstring);
g_free (tstring);
}
static void
-map_sax_start_element (void *data, const xmlChar *name,
+map_sax_start_element (void *data, const xmlChar *name,
const xmlChar **attrs)
{
EPilotMap *map = (EPilotMap *)data;
@@ -108,15 +108,15 @@ map_sax_start_element (void *data, const xmlChar *name,
if (!strcmp ((char *)name, "PilotMap")) {
while (attrs && *attrs != NULL) {
const xmlChar **val = attrs;
-
+
val++;
- if (!strcmp ((char *)*attrs, "timestamp"))
+ if (!strcmp ((char *)*attrs, "timestamp"))
map->since = (time_t)strtoul ((char *)*val, NULL, 0);
attrs = ++val;
}
}
-
+
if (!strcmp ((char *)name, "map")) {
const char *uid = NULL;
guint32 pid = 0;
@@ -124,17 +124,17 @@ map_sax_start_element (void *data, const xmlChar *name,
while (attrs && *attrs != NULL) {
const xmlChar **val = attrs;
-
+
val++;
- if (!strcmp ((char *)*attrs, "uid"))
+ if (!strcmp ((char *)*attrs, "uid"))
uid = (char *)*val;
-
+
if (!strcmp ((char *)*attrs, "pilot_id"))
pid = strtoul ((char *)*val, NULL, 0);
if (!strcmp ((char *)*attrs, "archived"))
archived = strtoul ((char *)*val, NULL, 0)== 1 ? TRUE : FALSE;
-
+
attrs = ++val;
}
@@ -156,7 +156,7 @@ map_write_foreach (gpointer key, gpointer value, gpointer data)
if (wd->touched_only && !unode->touched)
return;
-
+
mnode = xmlNewChild (root, NULL, (const unsigned char *)"map", NULL);
xmlSetProp (mnode, (const unsigned char *)"uid", (unsigned char *)uid);
@@ -172,38 +172,38 @@ map_write_foreach (gpointer key, gpointer value, gpointer data)
}
}
-gboolean
+gboolean
e_pilot_map_pid_is_archived (EPilotMap *map, guint32 pid)
{
EPilotMapPidNode *pnode;
g_return_val_if_fail (map != NULL, FALSE);
-
+
pnode = g_hash_table_lookup (map->pid_map, &pid);
if (pnode == NULL)
return FALSE;
-
+
return pnode->archived;
}
-gboolean
+gboolean
e_pilot_map_uid_is_archived (EPilotMap *map, const char *uid)
{
EPilotMapUidNode *unode;
g_return_val_if_fail (map != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
-
+
unode = g_hash_table_lookup (map->uid_map, uid);
if (unode == NULL)
return FALSE;
-
+
return unode->archived;
}
-void
+void
e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean archived)
{
EPilotMapPidNode *pnode;
@@ -228,7 +228,7 @@ e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean archi
real_e_pilot_map_insert (map, pid, uid, archived, TRUE);
}
-void
+void
e_pilot_map_remove_by_pid (EPilotMap *map, guint32 pid)
{
EPilotMapPidNode *pnode;
@@ -247,7 +247,7 @@ e_pilot_map_remove_by_pid (EPilotMap *map, guint32 pid)
g_hash_table_remove (map->pid_map, &pid);
}
-void
+void
e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid)
{
EPilotMapPidNode *pnode;
@@ -267,28 +267,28 @@ e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid)
}
-guint32
-e_pilot_map_lookup_pid (EPilotMap *map, const char *uid, gboolean touch)
+guint32
+e_pilot_map_lookup_pid (EPilotMap *map, const char *uid, gboolean touch)
{
EPilotMapUidNode *unode = NULL;
g_return_val_if_fail (map != NULL, 0);
g_return_val_if_fail (uid != NULL, 0);
-
+
unode = g_hash_table_lookup (map->uid_map, uid);
if (unode == NULL)
return 0;
-
+
if (touch) {
EPilotMapPidNode *pnode = NULL;
-
+
pnode = g_hash_table_lookup (map->pid_map, &unode->pid);
if (pnode != NULL)
pnode->touched = TRUE;
- unode->touched = TRUE;
+ unode->touched = TRUE;
}
-
+
return unode->pid;
}
@@ -298,26 +298,26 @@ e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid, gboolean touch)
EPilotMapPidNode *pnode = NULL;
g_return_val_if_fail (map != NULL, NULL);
-
+
pnode = g_hash_table_lookup (map->pid_map, &pid);
if (pnode == NULL)
return NULL;
-
+
if (touch) {
EPilotMapUidNode *unode = NULL;
-
+
unode = g_hash_table_lookup (map->uid_map, pnode->uid);
g_return_val_if_fail (unode != NULL, NULL);
-
+
unode->touched = TRUE;
pnode->touched = TRUE;
}
-
+
return pnode->uid;
}
-int
+int
e_pilot_map_read (const char *filename, EPilotMap **map)
{
xmlSAXHandler handler;
@@ -349,12 +349,12 @@ e_pilot_map_read (const char *filename, EPilotMap **map)
}
new_map->write_touched_only = FALSE;
-
+
*map = new_map;
-
+
return 0;
}
-
+
int
e_pilot_map_write (const char *filename, EPilotMap *map)
{
@@ -364,7 +364,7 @@ e_pilot_map_write (const char *filename, EPilotMap *map)
g_return_val_if_fail (filename != NULL, -1);
g_return_val_if_fail (map != NULL, -1);
-
+
doc = xmlNewDoc ((const unsigned char *)"1.0");
if (doc == NULL) {
g_warning ("Pilot map file could not be created\n");
@@ -377,7 +377,7 @@ e_pilot_map_write (const char *filename, EPilotMap *map)
wd.touched_only = map->write_touched_only;
wd.root = xmlDocGetRootElement(doc);
g_hash_table_foreach (map->uid_map, map_write_foreach, &wd);
-
+
/* Write the file */
xmlSetDocCompressMode (doc, 0);
ret = e_xml_save_file (filename, doc);
@@ -385,7 +385,7 @@ e_pilot_map_write (const char *filename, EPilotMap *map)
g_warning ("Pilot map file '%s' could not be saved\n", filename);
return -1;
}
-
+
xmlFreeDoc (doc);
return 0;
@@ -403,7 +403,7 @@ e_pilot_map_clear (EPilotMap *map)
map->write_touched_only = FALSE;
}
-void
+void
e_pilot_map_destroy (EPilotMap *map)
{
g_return_if_fail (map != NULL);
diff --git a/e-util/e-pilot-util.c b/e-util/e-pilot-util.c
index dff11b14c7..b9e1bcb0e4 100644
--- a/e-util/e-pilot-util.c
+++ b/e-util/e-pilot-util.c
@@ -36,7 +36,7 @@ e_pilot_utf8_to_pchar (const char *string)
if (!string)
return NULL;
-
+
res = convert_ToPilotChar ("UTF-8", string, strlen (string), &pstring);
if (res != 0)
@@ -53,12 +53,12 @@ e_pilot_utf8_from_pchar (const char *string)
if (!string)
return NULL;
-
+
res = convert_FromPilotChar ("UTF-8", string, strlen (string), &ustring);
-
+
if (res != 0)
ustring = strdup (string);
-
+
return ustring;
}
@@ -76,7 +76,7 @@ e_pilot_get_sync_source (ESourceList *source_list)
for (s = e_source_group_peek_sources (group); s; s = s->next) {
ESource *source = E_SOURCE (s->data);
-
+
if (e_source_get_property (source, "pilot-sync"))
return source;
}
@@ -89,7 +89,7 @@ void
e_pilot_set_sync_source (ESourceList *source_list, ESource *source)
{
GSList *g;
-
+
g_return_if_fail (source_list != NULL);
g_return_if_fail (E_IS_SOURCE_LIST (source_list));
diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c
index bdfe12c9b1..054298a942 100644
--- a/e-util/e-plugin.c
+++ b/e-util/e-plugin.c
@@ -270,17 +270,17 @@ ep_class_init(EPluginClass *klass)
/**
* e_plugin_get_type:
- *
+ *
* Standard GObject type function. This is only an abstract class, so
* you can only use this to subclass EPlugin.
- *
+ *
* Return value: The type.
**/
GType
e_plugin_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
char *path, *col, *p;
@@ -300,7 +300,7 @@ e_plugin_get_type(void)
path = g_build_filename(g_get_home_dir(), ".eplugins", NULL);
}
-
+
p = path;
while ((col = strchr(p, G_SEARCHPATH_SEPARATOR))) {
*col++ = 0;
@@ -310,7 +310,7 @@ e_plugin_get_type(void)
e_plugin_add_load_path(p);
g_free(path);
}
-
+
return type;
}
@@ -437,7 +437,7 @@ ep_load_pending(EPlugin *ep, EPluginHookClass *type)
if (class) {
if (strcmp(class, type->id) == 0) {
hook = g_object_new(G_OBJECT_CLASS_TYPE(type), NULL);
-
+
/* Don't bother loading hooks for plugins that are not anyway enabled */
if (ep->enabled) {
res = type->construct(hook, ep, node);
@@ -470,7 +470,7 @@ ep_load_pending(EPlugin *ep, EPluginHookClass *type)
/**
* e_plugin_add_load_path:
* @path: The path to add to search for plugins.
- *
+ *
* Add a path to be searched when e_plugin_load_plugins() is called.
* By default the system plugin directory and ~/.eplugins is used as
* the search path unless overriden by the environmental variable
@@ -489,10 +489,10 @@ e_plugin_add_load_path(const char *path)
/**
* e_plugin_load_plugins:
- *
+ *
* Scan the search path, looking for plugin definitions, and load them
* into memory.
- *
+ *
* Return value: Returns -1 if an error occurred.
**/
int
@@ -537,7 +537,7 @@ e_plugin_load_plugins(void)
/**
* e_plugin_register_type:
* @type: The GObject type of the plugin loader.
- *
+ *
* Register a new plugin type with the plugin system. Each type must
* subclass EPlugin and must override the type member of the
* EPluginClass with a unique name.
@@ -608,10 +608,10 @@ ep_list_plugin(void *key, void *val, void *dat)
/**
* e_plugin_list_plugins: List all plugins.
- *
+ *
* Static class method to retrieve a list of all current plugins. They
* are listed in no particular order.
- *
+ *
* Return value: A GSList of all plugins, they must be
* g_object_unref'd and the list freed.
**/
@@ -631,9 +631,9 @@ e_plugin_list_plugins(void)
* @ep: An EPlugin derived object.
* @root: The XML root node of the sub-tree containing the plugin
* definition.
- *
+ *
* Helper to invoke the construct virtual method.
- *
+ *
* Return value: The return from the construct virtual method.
**/
int
@@ -644,15 +644,15 @@ e_plugin_construct(EPlugin *ep, xmlNodePtr root)
/**
* e_plugin_invoke:
- * @ep:
+ * @ep:
* @name: The name of the function to invoke. The format of this name
* will depend on the EPlugin type and its language conventions.
* @data: The argument to the function. Its actual type depends on
* the hook on which the function resides. It is up to the called
* function to get this right.
- *
+ *
* Helper to invoke the invoke virtual method.
- *
+ *
* Return value: The return of the plugin invocation.
**/
void *
@@ -668,9 +668,9 @@ e_plugin_invoke(EPlugin *ep, const char *name, void *data)
/**
* e_plugin_enable:
- * @ep:
- * @state:
- *
+ * @ep:
+ * @state:
+ *
* Set the enable state of a plugin.
*
* THIS IS NOT FULLY IMPLEMENTED YET
@@ -686,8 +686,8 @@ e_plugin_enable(EPlugin *ep, int state)
/**
* e_plugin_configure:
-* @ep:
-*
+* @ep:
+*
*
**/
@@ -703,11 +703,11 @@ e_plugin_configure (EPlugin *ep)
* e_plugin_xml_prop:
* @node: An XML node.
* @id: The name of the property to retrieve.
- *
+ *
* A static helper function to look up a property on an XML node, and
* ensure it is allocated in GLib system memory. If GLib isn't using
* the system malloc then it must copy the property value.
- *
+ *
* Return value: The property, allocated in GLib memory, or NULL if no
* such property exists.
**/
@@ -732,10 +732,10 @@ e_plugin_xml_prop(xmlNodePtr node, const char *id)
* @node: An XML node.
* @id: The name of the property to retrieve.
* @domain: The translation domain for this string.
- *
+ *
* A static helper function to look up a property on an XML node, and
* translate it based on @domain.
- *
+ *
* Return value: The property, allocated in GLib memory, or NULL if no
* such property exists.
**/
@@ -760,11 +760,11 @@ e_plugin_xml_prop_domain(xmlNodePtr node, const char *id, const char *domain)
* @id: The name of the property to retrieve.
* @def: A default value if the property doesn't exist. Can be used
* to determine if the property isn't set.
- *
+ *
* A static helper function to look up a property on an XML node as an
* integer. If the property doesn't exist, then @def is returned as a
* default value instead.
- *
+ *
* Return value: The value if set, or @def if not.
**/
int
@@ -780,12 +780,12 @@ e_plugin_xml_int(xmlNodePtr node, const char *id, int def)
/**
* e_plugin_xml_content:
- * @node:
- *
+ * @node:
+ *
* A static helper function to retrieve the entire textual content of
* an XML node, and ensure it is allocated in GLib system memory. If
* GLib isn't using the system malloc them it must copy the content.
- *
+ *
* Return value: The node content, allocated in GLib memory.
**/
char *
@@ -806,13 +806,13 @@ e_plugin_xml_content(xmlNodePtr node)
/**
* e_plugin_xml_content_domain:
- * @node:
+ * @node:
* @domain:
- *
+ *
* A static helper function to retrieve the entire textual content of
* an XML node, and ensure it is allocated in GLib system memory. If
* GLib isn't using the system malloc them it must copy the content.
- *
+ *
* Return value: The node content, allocated in GLib memory.
**/
char *
@@ -852,7 +852,7 @@ epl_loadmodule(EPlugin *ep)
{
if (epl->module == NULL) {
EPluginLibEnableFunc enable;
-
+
if ((epl->module = g_module_open(epl->location, 0)) == NULL) {
g_warning("can't load plugin '%s'", g_module_error());
return -1;
@@ -1015,18 +1015,18 @@ epl_class_init(EPluginClass *klass)
/**
* e_plugin_lib_get_type:
- *
+ *
* Standard GObject function to retrieve the EPluginLib type. Use to
* register the type with the plugin system if you want to use shared
* library plugins.
- *
+ *
* Return value: The EPluginLib type.
**/
GType
e_plugin_lib_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EPluginLibClass), NULL, NULL, (GClassInitFunc) epl_class_init, NULL, NULL,
@@ -1036,7 +1036,7 @@ e_plugin_lib_get_type(void)
epl_parent_class = g_type_class_ref(e_plugin_get_type());
type = g_type_register_static(e_plugin_get_type(), "EPluginLib", &info, 0);
}
-
+
return type;
}
@@ -1072,17 +1072,17 @@ eph_class_init(EPluginHookClass *klass)
/**
* e_plugin_hook_get_type:
- *
+ *
* Standard GObject function to retrieve the EPluginHook type. Since
* EPluginHook is an abstract class, this is only used to subclass it.
- *
+ *
* Return value: The EPluginHook type.
**/
GType
e_plugin_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EPluginHookClass), NULL, NULL, (GClassInitFunc) eph_class_init, NULL, NULL,
@@ -1092,15 +1092,15 @@ e_plugin_hook_get_type(void)
eph_parent_class = g_type_class_ref(G_TYPE_OBJECT);
type = g_type_register_static(G_TYPE_OBJECT, "EPluginHook", &info, 0);
}
-
+
return type;
}
/**
* e_plugin_hook_enable: Set hook enabled state.
- * @eph:
- * @state:
- *
+ * @eph:
+ * @state:
+ *
* Set the enabled state of the plugin hook. This is called by the
* plugin code.
*
@@ -1114,8 +1114,8 @@ e_plugin_hook_enable(EPluginHook *eph, int state)
/**
* e_plugin_hook_register_type:
- * @type:
- *
+ * @type:
+ *
* Register a new plugin hook type with the plugin system. Each type
* must subclass EPluginHook and must override the id member of the
* EPluginHookClass with a unique identification string.
@@ -1195,7 +1195,7 @@ e_plugin_hook_register_type(GType type)
* @map: A zero-fill terminated array of EPluginHookTargeKeys used to
* map a string with a bit value.
* @prop: The property name.
- *
+ *
* This is a static helper function which looks up a property @prop on
* the XML node @root, and then uses the @map table to convert it into
* a bitmask. The property value is a comma separated list of
@@ -1241,17 +1241,17 @@ e_plugin_hook_mask(xmlNodePtr root, const struct _EPluginHookTargetKey *map, con
/**
* e_plugin_hook_id:
- * @root:
- * @map:
- * @prop:
- *
+ * @root:
+ * @map:
+ * @prop:
+ *
* This is a static helper function which looks up a property @prop on
* the XML node @root, and then uses the @map table to convert it into
* an integer.
*
* This is used as a helper wherever you need to represent an
* enumerated value in the XML.
- *
+ *
* Return value: If the @prop value is in @map, then the corresponding
* integer value, if not, then ~0.
**/
@@ -1352,7 +1352,7 @@ epth_class_init(EPluginHookClass *klass)
/**
* e_plugin_type_hook_get_type:
- *
+ *
* Get the type for the plugin plugin hook.
*
* Return value: The type of the plugin type hook.
@@ -1361,7 +1361,7 @@ GType
e_plugin_type_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EPluginTypeHookClass), NULL, NULL, (GClassInitFunc) epth_class_init, NULL, NULL,
@@ -1371,6 +1371,6 @@ e_plugin_type_hook_get_type(void)
epth_parent_class = g_type_class_ref(e_plugin_hook_get_type());
type = g_type_register_static(e_plugin_hook_get_type(), "EPluginTypeHook", &info, 0);
}
-
+
return type;
}
diff --git a/e-util/e-plugin.h b/e-util/e-plugin.h
index e1dc1f29fd..1d628dacd4 100644
--- a/e-util/e-plugin.h
+++ b/e-util/e-plugin.h
@@ -22,7 +22,7 @@ struct _EPluginAuthor {
/**
* struct _EPlugin - An EPlugin instance.
- *
+ *
* @object: Superclass.
* @id: Unique identifier for plugin instance.
* @path: Filename where the xml definition resides.
@@ -34,7 +34,7 @@ struct _EPluginAuthor {
* @hooks: A list of the EPluginHooks this plugin requires.
* @enabled: Whether the plugin is enabled or not. This is not fully
* implemented.
- *
+ *
* The base EPlugin object is used to represent each plugin directly.
* All of the plugin's hooks are loaded and managed through this
* object.
@@ -56,8 +56,8 @@ struct _EPlugin {
};
/**
- * struct _EPluginClass -
- *
+ * struct _EPluginClass -
+ *
* @class: Superclass.
* @type: The plugin type. This is used by the plugin loader to
* determine which plugin object to instantiate to handle the plugin.
@@ -126,18 +126,18 @@ typedef int (*EPluginLibEnableFunc)(EPluginLib *ep, int enable);
typedef int (*EPluginLibConfigureFunc)(EPluginLib *ep);
/**
- * struct _EPluginLib -
- *
+ * struct _EPluginLib -
+ *
* @plugin: Superclass.
* @location: The filename of the shared object.
* @module: The GModule once it is loaded.
- *
+ *
* This is a concrete EPlugin class. It loads and invokes dynamically
* loaded libraries using GModule. The shared object isn't loaded
* until the first callback is invoked.
*
* When the plugin is loaded, and if it exists, "e_plugin_lib_enable"
- * will be invoked to initialise the
+ * will be invoked to initialise the
**/
struct _EPluginLib {
EPlugin plugin;
@@ -147,10 +147,10 @@ struct _EPluginLib {
};
/**
- * struct _EPluginLibClass -
- *
+ * struct _EPluginLibClass -
+ *
* @plugin_class: Superclass.
- *
+ *
* The plugin library needs no additional class data.
**/
struct _EPluginLibClass {
@@ -169,11 +169,11 @@ typedef struct _EPluginHookTargetMap EPluginHookTargetMap;
typedef struct _EPluginHookTargetKey EPluginHookTargetKey;
/**
- * struct _EPluginHookTargetKey -
- *
+ * struct _EPluginHookTargetKey -
+ *
* @key: Enumeration value as a string.
* @value: Enumeration value as an integer.
- *
+ *
* A multi-purpose string to id mapping structure used with various
* helper functions to simplify plugin hook subclassing.
**/
@@ -183,8 +183,8 @@ struct _EPluginHookTargetKey {
};
/**
- * struct _EPluginHookTargetMap -
- *
+ * struct _EPluginHookTargetMap -
+ *
* @type: The string id of the target.
* @id: The integer id of the target. Maps directly to the type field
* of the various plugin type target id's.
@@ -202,10 +202,10 @@ struct _EPluginHookTargetMap {
/**
* struct _EPluginHook - A plugin hook.
- *
+ *
* @object: Superclass.
* @plugin: The parent object.
- *
+ *
* An EPluginHook is used as a container for each hook a given plugin
* is listening to.
**/
@@ -216,8 +216,8 @@ struct _EPluginHook {
};
/**
- * struct _EPluginHookClass -
- *
+ * struct _EPluginHookClass -
+ *
* @class: Superclass.
* @id: The plugin hook type. This must be overriden by each subclass
* and is used as a key when loading hook definitions. This string
@@ -227,7 +227,7 @@ struct _EPluginHook {
* @construct: Virtual method used to initialise the object when
* loaded.
* @enable: Virtual method used to enable or disable the hook.
- *
+ *
* The EPluginHookClass represents each hook type. The type of the
* class is registered in a global table and is used to instantiate a
* container for each hook.
diff --git a/e-util/e-popup.c b/e-util/e-popup.c
index c607b9045c..edeb6cebdc 100644
--- a/e-util/e-popup.c
+++ b/e-util/e-popup.c
@@ -164,9 +164,9 @@ ep_base_init(GObjectClass *klass)
/**
* e_popup_get_type:
- *
+ *
* Standard GObject type function.
- *
+ *
* Return value: The EPopup object type.
**/
GType
@@ -192,11 +192,11 @@ e_popup_get_type(void)
/**
* e_popup_new - Create an targetless popup menu manager.
* @menuid: Unique ID for this menu.
- *
+ *
* Create a targetless popup menu object. This can be used as a
* helper for creating popup menu's with no target. Such popup menu's
* wont be very pluggable.
- *
+ *
* Return value: A new EPopup.
**/
EPopup *e_popup_new(const char *menuid)
@@ -212,9 +212,9 @@ EPopup *e_popup_new(const char *menuid)
* e_popup_construct:
* @ep: An instantiated but uninitialised EPopup.
* @menuid: The menu identifier.
- *
+ *
* Construct the base popup instance with standard parameters.
- *
+ *
* Return value: Returns @ep.
**/
EPopup *e_popup_construct(EPopup *ep, const char *menuid)
@@ -233,7 +233,7 @@ EPopup *e_popup_construct(EPopup *ep, const char *menuid)
* longer needed.
* @data: user-data passed to @freefunc, and passed to all activate
* methods.
- *
+ *
* Add new EPopupItems to the menus. Any with the same path
* will override previously defined menu items, at menu building
* time. This may be called any number of times before the menu is
@@ -385,7 +385,7 @@ ep_build_tree(struct _item_node *inode, guint32 mask)
break;
case E_POPUP_RADIO: {
char *ppath = inode->parent?inode->parent->item->path:NULL;
-
+
menuitem = (GtkMenuItem *)gtk_radio_menu_item_new(g_hash_table_lookup(group_hash, ppath));
g_hash_table_insert(group_hash, ppath, gtk_radio_menu_item_get_group((GtkRadioMenuItem *)menuitem));
gtk_check_menu_item_set_active((GtkCheckMenuItem *)menuitem, item->type & E_POPUP_ACTIVE);
@@ -565,12 +565,12 @@ ep_popup_done(GtkWidget *w, EPopup *emp)
* @target: If set, the target of the selection. Static menu
* items will be added. The target will be freed once complete.
* @mask: Enable/disable and visibility mask.
- *
+ *
* Like popup_create_menu, but automatically sets up the menu
* so that it is destroyed once a selection takes place, and
* the EPopup is unreffed. This is the normal entry point as it
* automates most memory management for popup menus.
- *
+ *
* Return value: A menu, to popup.
**/
GtkMenu *
@@ -597,11 +597,11 @@ e_popup_create_menu_once(EPopup *emp, EPopupTarget *target, guint32 mask)
*
* This is a class-static method used to register factory callbacks
* against specific menu's.
- *
+ *
* The factory method will be invoked before the menu is created.
* This way, the factory may add any additional menu items it wishes
* based on the context supplied in the @target.
- *
+ *
* Return value: A handle to the factory which can be used to remove
* it later.
**/
@@ -622,7 +622,7 @@ e_popup_class_add_factory(EPopupClass *klass, const char *menuid, EPopupFactoryF
* e_popup_class_remove_factory:
* @klass: The EPopup derived class.
* @f: The factory handle returned by e_popup_class_add_factory().
- *
+ *
* Remove a popup menu factory. If it has not been added, or it has
* already been removed, then the result is undefined (i.e. it will
* crash).
@@ -644,7 +644,7 @@ e_popup_class_remove_factory(EPopupClass *klass, EPopupFactory *f)
* @type: type, defined by the implementing class.
* @size: The size of memory to allocate for the target. It must be
* equal or greater than the size of EPopupTarget.
- *
+ *
* Allocate a new popup target suitable for this popup type.
**/
void *e_popup_target_new(EPopup *ep, int type, size_t size)
@@ -668,7 +668,7 @@ void *e_popup_target_new(EPopup *ep, int type, size_t size)
* e_popup_target_free:
* @ep: An EPopup derived object.
* @o: The target, previously allocated by e_popup_target_new().
- *
+ *
* Free the target against @ep. Note that targets are automatically
* freed if they are passed to the menu creation functions, so this is
* only required if you are using the target for other purposes.
@@ -912,7 +912,7 @@ emph_class_init(EPluginHookClass *klass)
/**
* e_popup_hook_get_type:
- *
+ *
* Standard GObject function to get the object type. Used to subclass
* EPopupHook.
*
@@ -922,7 +922,7 @@ GType
e_popup_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EPopupHookClass), NULL, NULL, (GClassInitFunc) emph_class_init, NULL, NULL,
@@ -932,7 +932,7 @@ e_popup_hook_get_type(void)
emph_parent_class = g_type_class_ref(e_plugin_hook_get_type());
type = g_type_register_static(e_plugin_hook_get_type(), "EPopupHook", &info, 0);
}
-
+
return type;
}
@@ -941,7 +941,7 @@ e_popup_hook_get_type(void)
* @klass: The derived EPopupHook class.
* @map: A map used to describe a single EPopupTarget type for this
* class.
- *
+ *
* Add a target map to a concrete derived class of EPopup. The target
* map enumerates a single target type and the enable mask bit names,
* so that the type can be loaded automatically by the EPopup class.
diff --git a/e-util/e-popup.h b/e-util/e-popup.h
index e6d12cb9d4..a4928c035c 100644
--- a/e-util/e-popup.h
+++ b/e-util/e-popup.h
@@ -148,12 +148,12 @@ struct _EPopupTarget {
/**
* struct _EPopup - A Popup menu manager.
- *
+ *
* @object: Superclass, GObject.
* @priv: Private data.
* @menuid: The id of this menu instance.
* @target: The current target during the display of the popup menu.
- *
+ *
* The EPopup manager object. Each popup menu is built using this
* one-off object which is created each time the popup is invoked.
*/
@@ -168,15 +168,15 @@ struct _EPopup {
};
/**
- * struct _EPopupClass -
- *
+ * struct _EPopupClass -
+ *
* @object_class: Superclass type.
* @factories: A list of factories for this particular class of popup
* menu.
* @target_free: Virtual method to free the popup target. The base
* class frees the allocation and unrefs the popup pointer
* structure.
- *
+ *
* The EPopup class definition. This should be sub-classed for each
* component that wants to provide hookable popup menus. The
* sub-class only needs to know how to allocate and free the various target
@@ -229,15 +229,15 @@ typedef struct _EPluginHookTargetKey EPopupHookTargetMask;
typedef void (*EPopupHookFunc)(struct _EPlugin *plugin, EPopupTarget *target);
/**
- * struct _EPopupHookMenu -
- *
+ * struct _EPopupHookMenu -
+ *
* @hook: Parent pointer.
* @id: The identifier of the menu to which these items belong.
* @target_type: The target number of the type of target these menu
* items expect. It will generally also be defined by the menu id.
* @items: A list of EPopupItems.
* @factory: If supplied, a function to call
- *
+ *
* The structure used to keep track of all of the items that a plugin
* wishes to add to a given menu. This is used internally by a factory
* method set on EPlugin to add the right menu items to a given menu.
@@ -252,7 +252,7 @@ struct _EPopupHookMenu {
/**
* struct _EPopupHook - A popup menu hook.
- *
+ *
* @hook: Superclass.
* @menus: A list of EPopupHookMenus, for all menus registered on
* this hook type.
@@ -267,14 +267,14 @@ struct _EPopupHook {
};
/**
- * struct _EPopupHookClass -
- *
+ * struct _EPopupHookClass -
+ *
* @hook_class: Superclass.
* @target_map: Table of EPluginHookTargetMaps which enumerate the
* target types and enable bits of the implementing class.
* @popup_class: The EPopupClass of the corresponding popup manager
* for the implementing class.
- *
+ *
* The EPopupHookClass is a concrete class, however it is empty on its
* own. It needs to be sub-classed and initialised appropriately.
*
diff --git a/e-util/e-print.c b/e-util/e-print.c
index 204b621286..57d089f779 100644
--- a/e-util/e-print.c
+++ b/e-util/e-print.c
@@ -58,7 +58,7 @@ load_settings (void)
GtkPrintSettings *settings;
GSList *list;
GError *error = NULL;
-
+
client = gconf_client_get_default ();
settings = gtk_print_settings_new ();
@@ -83,9 +83,9 @@ save_settings (GtkPrintSettings *settings)
GConfClient *client;
GSList *list = NULL;
GError *error = NULL;
-
+
client = gconf_client_get_default ();
-
+
gtk_print_settings_foreach (
settings, (GtkPrintSettingsFunc) pack_settings, &list);
gconf_client_set_list (
@@ -96,7 +96,7 @@ save_settings (GtkPrintSettings *settings)
}
g_slist_foreach (list, (GFunc) g_free, NULL);
g_slist_free (list);
-
+
g_object_unref (client);
}
@@ -113,7 +113,7 @@ load_page_setup (GtkPrintSettings *settings)
if (paper_size != NULL)
gtk_page_setup_set_paper_size_and_default_margins (
page_setup, paper_size);
-
+
return page_setup;
}
diff --git a/e-util/e-print.h b/e-util/e-print.h
index 9102ddb9f5..740989a79b 100644
--- a/e-util/e-print.h
+++ b/e-util/e-print.h
@@ -31,4 +31,4 @@ void e_print_run_page_setup_dialog (GtkWindow *parent);
G_END_DECLS
-#endif
+#endif
diff --git a/e-util/e-profile-event.c b/e-util/e-profile-event.c
index 9c86f72b60..023f76746e 100644
--- a/e-util/e-profile-event.c
+++ b/e-util/e-profile-event.c
@@ -92,11 +92,11 @@ e_profile_event_get_type(void)
/**
* e_profile_event_peek:
- * @void:
- *
+ * @void:
+ *
* Get the singular instance of the profile event handler.
- *
- * Return value:
+ *
+ * Return value:
**/
EProfileEvent *e_profile_event_peek(void)
{
@@ -185,7 +185,7 @@ GType
e_profile_event_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EProfileEventHookClass), NULL, NULL, (GClassInitFunc) emeh_class_init, NULL, NULL,
@@ -195,6 +195,6 @@ e_profile_event_hook_get_type(void)
emeh_parent_class = g_type_class_ref(e_event_hook_get_type());
type = g_type_register_static(e_event_hook_get_type(), "EProfileEventHook", &info, 0);
}
-
+
return type;
}
diff --git a/e-util/e-request.c b/e-util/e-request.c
index a0fb9cfac3..beb52686e9 100644
--- a/e-util/e-request.c
+++ b/e-util/e-request.c
@@ -39,9 +39,9 @@
* @title: the dialog title (in the locale character set)
* @prompt: the prompt (in the locale character set)
* @default: default value (in UTF8)
- *
+ *
* Request a string from the user.
- *
+ *
* Return value: %NULL if the user cancelled the dialog, the inserted
* string (in UTF8) otherwise. The string must be freed by the caller.
**/
@@ -56,10 +56,10 @@ e_request_string (GtkWindow *parent,
GtkWidget *dialog;
GtkWidget *entry;
GtkWidget *vbox;
-
+
g_return_val_if_fail (title != NULL, NULL);
g_return_val_if_fail (prompt != NULL, NULL);
-
+
dialog = gtk_dialog_new_with_buttons (title, parent,
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
@@ -68,13 +68,13 @@ e_request_string (GtkWindow *parent,
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_window_set_default_size (GTK_WINDOW (dialog), 275, -1);
- gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
vbox = GTK_DIALOG (dialog)->vbox;
-
+
prompt_label = gtk_label_new (prompt);
gtk_box_pack_start (GTK_BOX (vbox), prompt_label, TRUE, TRUE, 6);
- gtk_box_set_spacing (GTK_BOX (vbox), 6);
+ gtk_box_set_spacing (GTK_BOX (vbox), 6);
entry = gtk_entry_new ();
gtk_entry_set_text (GTK_ENTRY (entry), default_string);
@@ -82,14 +82,14 @@ e_request_string (GtkWindow *parent,
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), entry, TRUE, TRUE, 3);
- atk_object_set_description (gtk_widget_get_accessible (entry), prompt);
+ atk_object_set_description (gtk_widget_get_accessible (entry), prompt);
gtk_widget_grab_focus (entry);
-
+
gtk_widget_show (prompt_label);
gtk_widget_show (entry);
gtk_widget_show (dialog);
-
+
switch (gtk_dialog_run (GTK_DIALOG (dialog))) {
case GTK_RESPONSE_OK:
text = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
@@ -100,6 +100,6 @@ e_request_string (GtkWindow *parent,
}
gtk_widget_destroy (dialog);
-
+
return text;
}
diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c
index cbdf138a95..8acd9af451 100644
--- a/e-util/e-signature-list.c
+++ b/e-util/e-signature-list.c
@@ -61,7 +61,7 @@ GType
e_signature_list_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
GTypeInfo type_info = {
sizeof (ESignatureListClass),
@@ -72,10 +72,10 @@ e_signature_list_get_type (void)
0,
(GInstanceInitFunc) e_signature_list_init,
};
-
+
type = g_type_register_static (E_TYPE_LIST, "ESignatureList", &type_info, 0);
}
-
+
return type;
}
@@ -84,13 +84,13 @@ static void
e_signature_list_class_init (ESignatureListClass *klass)
{
GObjectClass *object_class = (GObjectClass *) klass;
-
+
parent_class = g_type_class_ref (E_TYPE_LIST);
-
+
/* virtual method override */
object_class->dispose = e_signature_list_dispose;
object_class->finalize = e_signature_list_finalize;
-
+
/* signals */
signals[SIGNATURE_ADDED] =
g_signal_new ("signature-added",
@@ -131,14 +131,14 @@ static void
e_signature_list_dispose (GObject *object)
{
ESignatureList *list = (ESignatureList *) object;
-
+
if (list->priv->gconf) {
if (list->priv->notify_id != 0)
gconf_client_notify_remove (list->priv->gconf, list->priv->notify_id);
g_object_unref (list->priv->gconf);
list->priv->gconf = NULL;
}
-
+
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -146,9 +146,9 @@ static void
e_signature_list_finalize (GObject *object)
{
ESignatureList *list = (ESignatureList *) object;
-
+
g_free (list->priv);
-
+
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -156,13 +156,13 @@ static GSList *
add_autogen (ESignatureList *list, GSList *new_sigs)
{
ESignature *autogen;
-
+
autogen = e_signature_new ();
autogen->name = g_strdup ("Autogenerated");
autogen->autogen = TRUE;
-
+
e_list_append (E_LIST (list), autogen);
-
+
return g_slist_prepend (new_sigs, autogen);
}
@@ -178,9 +178,9 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
EIterator *iter;
gboolean found;
char *uid;
-
+
old_sigs = e_list_duplicate (E_LIST (signature_list));
-
+
list = gconf_client_get_list (client, "/apps/evolution/mail/signatures", GCONF_VALUE_STRING, NULL);
for (l = list; l; l = l->next) {
found = FALSE;
@@ -196,16 +196,16 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
e_iterator_delete (iter);
if (e_signature_set_from_xml (signature, l->data))
g_signal_emit (signature_list, signals[SIGNATURE_CHANGED], 0, signature);
-
+
have_autogen |= signature->autogen;
-
+
break;
}
}
-
+
g_object_unref (iter);
}
-
+
if (!found) {
/* Must be a new signature */
signature = e_signature_new_from_xml (l->data);
@@ -214,20 +214,20 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
signature->uid = e_uid_new ();
resave = TRUE;
}
-
+
e_list_append (E_LIST (signature_list), signature);
new_sigs = g_slist_prepend (new_sigs, signature);
}
-
+
g_free (uid);
}
-
+
if (!have_autogen) {
new_sigs = add_autogen (signature_list, new_sigs);
have_autogen = TRUE;
resave = TRUE;
}
-
+
if (new_sigs != NULL) {
/* Now emit signals for each added signature. */
l = g_slist_reverse (new_sigs);
@@ -240,17 +240,17 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry,
l = n;
}
}
-
+
/* Anything left in old_sigs must have been deleted */
for (iter = e_list_get_iterator (old_sigs); e_iterator_is_valid (iter); e_iterator_next (iter)) {
signature = (ESignature *) e_iterator_get (iter);
e_list_remove (E_LIST (signature_list), signature);
g_signal_emit (signature_list, signals[SIGNATURE_REMOVED], 0, signature);
}
-
+
g_object_unref (iter);
g_object_unref (old_sigs);
-
+
signature_list->priv->resave = resave;
}
@@ -258,9 +258,9 @@ static void *
copy_func (const void *data, void *closure)
{
GObject *object = (GObject *)data;
-
+
g_object_ref (object);
-
+
return object;
}
@@ -289,12 +289,12 @@ ESignatureList *
e_signature_list_new (GConfClient *gconf)
{
ESignatureList *signature_list;
-
+
g_return_val_if_fail (GCONF_IS_CLIENT (gconf), NULL);
-
+
signature_list = g_object_new (E_TYPE_SIGNATURE_LIST, NULL);
e_signature_list_construct (signature_list, gconf);
-
+
return signature_list;
}
@@ -302,29 +302,29 @@ void
e_signature_list_construct (ESignatureList *signature_list, GConfClient *gconf)
{
g_return_if_fail (GCONF_IS_CLIENT (gconf));
-
+
e_list_construct (E_LIST (signature_list), copy_func, free_func, NULL);
signature_list->priv->gconf = gconf;
g_object_ref (gconf);
-
+
gconf_client_add_dir (signature_list->priv->gconf,
"/apps/evolution/mail/signatures",
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
+
signature_list->priv->notify_id =
gconf_client_notify_add (signature_list->priv->gconf,
"/apps/evolution/mail/signatures",
gconf_signatures_changed, signature_list,
NULL, NULL);
-
+
gconf_signatures_changed (signature_list->priv->gconf,
signature_list->priv->notify_id,
NULL, signature_list);
-
+
if (signature_list->priv->resave) {
e_signature_list_save (signature_list);
signature_list->priv->resave = FALSE;
- }
+ }
}
@@ -341,27 +341,27 @@ e_signature_list_save (ESignatureList *signature_list)
ESignature *signature;
EIterator *iter;
char *xmlbuf;
-
+
for (iter = e_list_get_iterator (E_LIST (signature_list));
e_iterator_is_valid (iter);
e_iterator_next (iter)) {
signature = (ESignature *) e_iterator_get (iter);
-
+
if ((xmlbuf = e_signature_to_xml (signature)))
list = g_slist_append (list, xmlbuf);
}
-
+
g_object_unref (iter);
-
+
gconf_client_set_list (signature_list->priv->gconf,
"/apps/evolution/mail/signatures",
GCONF_VALUE_STRING, list, NULL);
-
+
while (list) {
g_free (list->data);
list = g_slist_remove (list, list->data);
}
-
+
gconf_client_suggest_sync (signature_list->priv->gconf, NULL);
}
@@ -370,7 +370,7 @@ e_signature_list_save (ESignatureList *signature_list)
* e_signature_list_add:
* @signatures: signature list
* @signature: signature to add
- *
+ *
* Add an signature to the signature list. Will emit the signature-changed
* event.
**/
@@ -386,7 +386,7 @@ e_signature_list_add (ESignatureList *signatures, ESignature *signature)
* e_signature_list_change:
* @signatures: signature list
* @signature: signature to change
- *
+ *
* Signal that the details of an signature have changed.
**/
void
@@ -401,7 +401,7 @@ e_signature_list_change (ESignatureList *signatures, ESignature *signature)
* e_signature_list_remove:
* @signatures: signature list
* @signature: signature
- *
+ *
* Remove an signature from the signature list, and emit the
* signature-removed signal. If the signature was the default signature,
* then reset the default to the first signature.
@@ -422,13 +422,13 @@ e_signature_list_remove (ESignatureList *signatures, ESignature *signature)
* @signatures: signature list
* @type: Type of search.
* @key: Search key.
- *
+ *
* Perform a search of the signature list on a single key.
*
* @type must be set from one of the following search types:
* E_SIGNATURE_FIND_NAME - Find a signature by signature name.
* E_SIGNATURE_FIND_UID - Find a signature based on UID
- *
+ *
* Return value: The signature or NULL if it doesn't exist.
**/
const ESignature *
@@ -436,20 +436,20 @@ e_signature_list_find (ESignatureList *signatures, e_signature_find_t type, cons
{
const ESignature *signature = NULL;
EIterator *it;
-
+
/* this could use a callback for more flexibility ...
... but this makes the common cases easier */
-
+
if (!key)
return NULL;
-
+
for (it = e_list_get_iterator ((EList *) signatures);
e_iterator_is_valid (it);
e_iterator_next (it)) {
int found = 0;
-
+
signature = (const ESignature *) e_iterator_get (it);
-
+
switch (type) {
case E_SIGNATURE_FIND_NAME:
found = strcmp (signature->name, key) == 0;
@@ -458,14 +458,14 @@ e_signature_list_find (ESignatureList *signatures, e_signature_find_t type, cons
found = strcmp (signature->uid, key) == 0;
break;
}
-
+
if (found)
break;
-
+
signature = NULL;
}
-
+
g_object_unref (it);
-
+
return signature;
}
diff --git a/e-util/e-signature-list.h b/e-util/e-signature-list.h
index 6dae824616..d79963672a 100644
--- a/e-util/e-signature-list.h
+++ b/e-util/e-signature-list.h
@@ -46,13 +46,13 @@ typedef enum {
struct _ESignatureList {
EList parent_object;
-
+
struct _ESignatureListPrivate *priv;
};
struct _ESignatureListClass {
EListClass parent_class;
-
+
/* signals */
void (* signature_added) (ESignatureList *, ESignature *);
void (* signature_changed) (ESignatureList *, ESignature *);
diff --git a/e-util/e-signature.c b/e-util/e-signature.c
index 9803ba7389..c062468174 100644
--- a/e-util/e-signature.c
+++ b/e-util/e-signature.c
@@ -50,7 +50,7 @@ GType
e_signature_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
GTypeInfo type_info = {
sizeof (ESignatureClass),
@@ -61,10 +61,10 @@ e_signature_get_type (void)
0,
(GInstanceInitFunc) e_signature_init,
};
-
+
type = g_type_register_static (G_TYPE_OBJECT, "ESignature", &type_info, 0);
}
-
+
return type;
}
@@ -72,9 +72,9 @@ static void
e_signature_class_init (ESignatureClass *klass)
{
GObjectClass *object_class = (GObjectClass *) klass;
-
+
parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
+
/* virtual method override */
object_class->finalize = e_signature_finalize;
}
@@ -89,11 +89,11 @@ static void
e_signature_finalize (GObject *object)
{
ESignature *sig = (ESignature *) object;
-
+
g_free (sig->uid);
g_free (sig->name);
g_free (sig->filename);
-
+
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -108,10 +108,10 @@ ESignature *
e_signature_new (void)
{
ESignature *signature;
-
+
signature = g_object_new (E_TYPE_SIGNATURE, NULL);
signature->uid = e_uid_new ();
-
+
return signature;
}
@@ -127,13 +127,13 @@ ESignature *
e_signature_new_from_xml (const char *xml)
{
ESignature *signature;
-
+
signature = g_object_new (E_TYPE_SIGNATURE, NULL);
if (!e_signature_set_from_xml (signature, xml)) {
g_object_unref (signature);
return NULL;
}
-
+
return signature;
}
@@ -143,17 +143,17 @@ xml_set_bool (xmlNodePtr node, const char *name, gboolean *val)
{
gboolean bool;
char *buf;
-
+
if ((buf = (char *)xmlGetProp (node, (const unsigned char *)name))) {
bool = (!strcmp (buf, "true") || !strcmp (buf, "yes"));
xmlFree (buf);
-
+
if (bool != *val) {
*val = bool;
return TRUE;
}
}
-
+
return FALSE;
}
@@ -161,11 +161,11 @@ static gboolean
xml_set_prop (xmlNodePtr node, const char *name, char **val)
{
char *buf, *new_val;
-
+
buf = (char *)xmlGetProp (node, (const unsigned char *)name);
new_val = g_strdup (buf);
xmlFree (buf);
-
+
/* We can use strcmp here whether the value is UTF8 or
* not, since we only care if the bytes changed.
*/
@@ -183,11 +183,11 @@ static gboolean
xml_set_content (xmlNodePtr node, char **val)
{
char *buf, *new_val;
-
+
buf = (char *)xmlNodeGetContent (node);
new_val = g_strdup (buf);
xmlFree (buf);
-
+
/* We can use strcmp here whether the value is UTF8 or
* not, since we only care if the bytes changed.
*/
@@ -216,19 +216,19 @@ e_signature_uid_from_xml (const char *xml)
xmlNodePtr node;
xmlDocPtr doc;
char *uid = NULL;
-
+
if (!(doc = xmlParseDoc ((unsigned char *) xml)))
return NULL;
-
+
node = doc->children;
if (strcmp ((char *)node->name, "signature") != 0) {
xmlFreeDoc (doc);
return NULL;
}
-
+
xml_set_prop (node, "uid", &uid);
xmlFreeDoc (doc);
-
+
return uid;
}
@@ -250,22 +250,22 @@ e_signature_set_from_xml (ESignature *signature, const char *xml)
xmlDocPtr doc;
gboolean bool;
char *buf;
-
+
if (!(doc = xmlParseDoc ((unsigned char *) xml)))
return FALSE;
-
+
node = doc->children;
if (strcmp ((char *)node->name, "signature") != 0) {
xmlFreeDoc (doc);
return FALSE;
}
-
+
if (!signature->uid)
xml_set_prop (node, "uid", &signature->uid);
-
+
changed |= xml_set_prop (node, "name", &signature->name);
changed |= xml_set_bool (node, "auto", &signature->autogen);
-
+
if (signature->autogen) {
/* we're done */
g_free (signature->filename);
@@ -273,10 +273,10 @@ e_signature_set_from_xml (ESignature *signature, const char *xml)
signature->script = FALSE;
signature->html = FALSE;
xmlFreeDoc (doc);
-
+
return changed;
}
-
+
buf = NULL;
xml_set_prop (node, "format", &buf);
if (buf && !strcmp (buf, "text/html"))
@@ -284,12 +284,12 @@ e_signature_set_from_xml (ESignature *signature, const char *xml)
else
bool = FALSE;
g_free (buf);
-
+
if (signature->html != bool) {
signature->html = bool;
changed = TRUE;
}
-
+
cur = node->children;
while (cur) {
if (!strcmp ((char *)cur->name, "filename")) {
@@ -305,12 +305,12 @@ e_signature_set_from_xml (ESignature *signature, const char *xml)
}
break;
}
-
+
cur = cur->next;
}
-
+
xmlFreeDoc (doc);
-
+
return changed;
}
@@ -330,19 +330,19 @@ e_signature_to_xml (ESignature *signature)
xmlNodePtr root, node;
xmlDocPtr doc;
int n;
-
+
doc = xmlNewDoc ((const unsigned char *)"1.0");
-
+
root = xmlNewDocNode (doc, NULL, (const unsigned char *)"signature", NULL);
xmlDocSetRootElement (doc, root);
-
+
xmlSetProp (root, (const unsigned char *)"name", (unsigned char *)signature->name);
xmlSetProp (root, (const unsigned char *)"uid", (unsigned char *)signature->uid);
xmlSetProp (root, (const unsigned char *)"auto", (const unsigned char *)(signature->autogen ? "true" : "false"));
-
+
if (!signature->autogen) {
xmlSetProp (root, (const unsigned char *)"format", (const unsigned char *)(signature->html ? "text/html" : "text/plain"));
-
+
if (signature->filename) {
node = xmlNewTextChild (root, NULL, (const unsigned char *)"filename", (unsigned char *)signature->filename);
if (signature->script)
@@ -352,16 +352,16 @@ e_signature_to_xml (ESignature *signature)
/* this is to make Evolution-1.4 and older 1.5 versions happy */
xmlSetProp (root, (const unsigned char *)"format", (const unsigned char *)"text/html");
}
-
+
xmlDocDumpMemory (doc, &xmlbuf, &n);
xmlFreeDoc (doc);
-
+
/* remap to glib memory */
tmp = g_malloc (n + 1);
memcpy (tmp, xmlbuf, n);
tmp[n] = '\0';
xmlFree (xmlbuf);
-
+
return tmp;
}
diff --git a/e-util/e-signature.h b/e-util/e-signature.h
index a7e1d9d207..5de0d64a66 100644
--- a/e-util/e-signature.h
+++ b/e-util/e-signature.h
@@ -42,11 +42,11 @@ typedef struct _ESignatureClass ESignatureClass;
struct _ESignature {
GObject parent_object;
-
+
gboolean autogen;
gboolean script;
gboolean html;
-
+
char *filename;
char *name;
char *uid;
@@ -54,7 +54,7 @@ struct _ESignature {
struct _ESignatureClass {
GObjectClass parent_class;
-
+
};
diff --git a/e-util/e-sorter-array.c b/e-util/e-sorter-array.c
index 6098efef03..3a2eaffe3c 100644
--- a/e-util/e-sorter-array.c
+++ b/e-util/e-sorter-array.c
@@ -242,7 +242,7 @@ e_sorter_array_class_init (ESorterArrayClass *klass)
sorter_class->model_to_sorted = esa_model_to_sorted ;
sorter_class->sorted_to_model = esa_sorted_to_model ;
sorter_class->get_model_to_sorted_array = esa_get_model_to_sorted_array ;
- sorter_class->get_sorted_to_model_array = esa_get_sorted_to_model_array ;
+ sorter_class->get_sorted_to_model_array = esa_get_sorted_to_model_array ;
sorter_class->needs_sorting = esa_needs_sorting ;
}
diff --git a/e-util/e-sorter-array.h b/e-util/e-sorter-array.h
index 9d5f7fad1b..a695b0d394 100644
--- a/e-util/e-sorter-array.h
+++ b/e-util/e-sorter-array.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-sorter-array.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/e-util/e-sorter.c b/e-util/e-sorter.c
index 992afe68f4..89e9eca459 100644
--- a/e-util/e-sorter.c
+++ b/e-util/e-sorter.c
@@ -60,7 +60,7 @@ ESorter *
e_sorter_new (void)
{
ESorter *es = g_object_new (E_SORTER_TYPE, NULL);
-
+
return es;
}
diff --git a/e-util/e-sorter.h b/e-util/e-sorter.h
index 732061dc1a..c43a93ff5c 100644
--- a/e-util/e-sorter.h
+++ b/e-util/e-sorter.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-sorter.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -47,14 +47,14 @@ typedef struct {
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;
diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c
index b39b56df16..dfde0cf446 100644
--- a/e-util/e-text-event-processor-emacs-like.c
+++ b/e-util/e-text-event-processor-emacs-like.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text-event-processor-emacs-like.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -185,7 +185,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
command.value = event->motion.position;
}
break;
- case GDK_KEY_PRESS:
+ case GDK_KEY_PRESS:
{
ETextEventProcessorEventKey key = event->key;
command.time = event->key.time;
@@ -236,7 +236,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
else
command.position = E_TEP_FORWARD_CHARACTER;
break;
-
+
case GDK_BackSpace:
command.action = E_TEP_DELETE;
if (key.state & GDK_CONTROL_MASK)
@@ -272,7 +272,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
command.action = E_TEP_COPY;
command.position = E_TEP_SELECTION;
g_signal_emit_by_name (tep, "command", &command);
-
+
command.action = E_TEP_DELETE;
command.position = E_TEP_SELECTION;
break;
@@ -285,7 +285,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
command.action = E_TEP_COPY;
command.position = E_TEP_SELECTION;
g_signal_emit_by_name (tep, "command", &command);
-
+
command.action = E_TEP_DELETE;
command.position = E_TEP_SELECTION;
} else {
@@ -436,7 +436,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
if ((key.state & GDK_CONTROL_MASK) && !(key.state & GDK_MOD1_MASK)) {
if ((key.keyval >= 'A') && (key.keyval <= 'Z'))
key.keyval -= 'A' - 'a';
-
+
if ((key.keyval >= 'a') && (key.keyval <= 'z')) {
command.position = control_keys[(int) (key.keyval - 'a')].position;
if (control_keys[(int) (key.keyval - 'a')].action != E_TEP_MOVE)
@@ -453,16 +453,16 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
command.action = E_TEP_COPY;
command.position = E_TEP_SELECTION;
g_signal_emit_by_name (tep, "command", &command);
-
+
command.action = E_TEP_DELETE;
command.position = E_TEP_SELECTION;
}
-
+
break;
} else if ((key.state & GDK_MOD1_MASK) && !(key.state & GDK_CONTROL_MASK)) {
if ((key.keyval >= 'A') && (key.keyval <= 'Z'))
key.keyval -= 'A' - 'a';
-
+
if ((key.keyval >= 'a') && (key.keyval <= 'z')) {
command.position = alt_keys[(int) (key.keyval - 'a')].position;
if (alt_keys[(int) (key.keyval - 'a')].action != E_TEP_MOVE)
@@ -479,7 +479,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
command.position = E_TEP_SELECTION;
command.value = strlen(key.string);
command.string = key.string;
-
+
} else {
command.action = E_TEP_NOP;
}
diff --git a/e-util/e-text-event-processor-emacs-like.h b/e-util/e-text-event-processor-emacs-like.h
index c6020cb993..9726ab3a06 100644
--- a/e-util/e-text-event-processor-emacs-like.h
+++ b/e-util/e-text-event-processor-emacs-like.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text-event-processor-emacs-like.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -48,7 +48,7 @@ typedef struct _ETextEventProcessorEmacsLikeClass ETextEventProcessorEmacsLikeC
struct _ETextEventProcessorEmacsLike
{
ETextEventProcessor parent;
-
+
/* object specific fields */
guint mouse_down : 1;
};
diff --git a/e-util/e-text-event-processor-types.h b/e-util/e-text-event-processor-types.h
index 0966044806..ba68cae113 100644
--- a/e-util/e-text-event-processor-types.h
+++ b/e-util/e-text-event-processor-types.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text-event-processor-types.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -69,7 +69,7 @@ typedef enum {
E_TEP_INSERT,
E_TEP_CAPS,
-
+
E_TEP_COPY,
E_TEP_PASTE,
E_TEP_GET_SELECTION,
diff --git a/e-util/e-text-event-processor.c b/e-util/e-text-event-processor.c
index a46301db73..a1121adbad 100644
--- a/e-util/e-text-event-processor.c
+++ b/e-util/e-text-event-processor.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text-event-processor.c
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/e-util/e-text-event-processor.h b/e-util/e-text-event-processor.h
index b2219923f7..f3b408fb3d 100644
--- a/e-util/e-text-event-processor.h
+++ b/e-util/e-text-event-processor.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text-event-processor.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/e-util/e-util-private.h b/e-util/e-util-private.h
index dfb8965cd1..69128c67b5 100644
--- a/e-util/e-util-private.h
+++ b/e-util/e-util-private.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-util-private.h: Private functions for Evolution (not just for libeutil)
* Copyright 2005, Novell, Inc.
*
diff --git a/e-util/e-util.c b/e-util/e-util.c
index c27e2a60d8..2515e78eb2 100644
--- a/e-util/e-util.c
+++ b/e-util/e-util.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-util.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -62,9 +62,9 @@ e_str_without_underscores (const char *s)
char *new_string;
const char *sp;
char *dp;
-
+
new_string = g_malloc (strlen (s) + 1);
-
+
dp = new_string;
for (sp = s; *sp != '\0'; sp ++) {
if (*sp != '_') {
@@ -78,7 +78,7 @@ e_str_without_underscores (const char *s)
}
}
*dp = 0;
-
+
return new_string;
}
@@ -91,7 +91,7 @@ e_str_compare (gconstpointer x, gconstpointer y)
else
return x ? -1 : 1;
}
-
+
return strcmp (x, y);
}
@@ -128,7 +128,7 @@ e_collate_compare (gconstpointer x, gconstpointer y)
else
return x ? -1 : 1;
}
-
+
return g_utf8_collate (x, y);
}
@@ -154,7 +154,7 @@ e_write_file_uri (const gchar *filename, const gchar *data)
g_warning ("Couldn't save item");
return 1;
}
-
+
while (length > 0) {
gnome_vfs_write(handle, data, length, &bytes);
if (bytes > 0) {
@@ -348,7 +348,7 @@ e_format_number_float (gfloat number)
gchar *value;
locality = localeconv();
-
+
int_part = floor (number);
str_intpart = do_format_number_as_float ((gdouble) int_part);
@@ -418,7 +418,7 @@ e_bsearch (gconstpointer key,
l = idx + 1;
}
*start = l;
-
+
l = lsave;
u = usave;
}
@@ -508,7 +508,7 @@ e_strftime_fix_am_pm (gchar *str, gsize max, const gchar *fmt,
return(ret);
}
-gsize
+gsize
e_utf8_strftime_fix_am_pm (gchar *str, gsize max, const gchar *fmt,
const struct tm *tm)
{
@@ -551,7 +551,7 @@ e_utf8_strftime_fix_am_pm (gchar *str, gsize max, const gchar *fmt,
* @nptr: the string to convert to a numeric value.
* @endptr: if non-NULL, it returns the character after
* the last character used in the conversion.
- *
+ *
* Converts a string to a gdouble value. This function detects
* strings either in the standard C locale or in the current locale.
*
@@ -562,7 +562,7 @@ e_utf8_strftime_fix_am_pm (gchar *str, gsize max, const gchar *fmt,
*
* To convert from a double to a string in a locale-insensitive way, use
* @g_ascii_dtostr.
- *
+ *
* Return value: the gdouble value.
**/
gdouble
@@ -611,10 +611,10 @@ e_flexible_strtod (const gchar *nptr, gchar **endptr)
if (*p == '.') {
decimal_point_pos = p++;
-
+
while (isxdigit ((guchar)*p))
p++;
-
+
if (*p == 'p' || *p == 'P')
p++;
if (*p == '+' || *p == '-')
@@ -647,7 +647,7 @@ e_flexible_strtod (const gchar *nptr, gchar **endptr)
}
}
/* For the other cases, we need not convert the decimal point */
-
+
if (!decimal_point_pos)
return strtod (nptr, endptr);
@@ -685,14 +685,14 @@ e_flexible_strtod (const gchar *nptr, gchar **endptr)
* @buffer: A buffer to place the resulting string in
* @buf_len: The length of the buffer.
* @format: The printf-style format to use for the
- * code to use for converting.
+ * code to use for converting.
* @d: The double to convert
*
* Converts a double to a string, using the '.' as
* decimal_point. To format the number you pass in
* a printf-style formating string. Allowed conversion
- * specifiers are eEfFgG.
- *
+ * specifiers are eEfFgG.
+ *
* If you want to generates enough precision that converting
* the string back using @g_strtod gives the same machine-number
* (on machines with IEEE compatible 64bit doubles) use the format
@@ -715,9 +715,9 @@ e_ascii_dtostr (gchar *buffer, gint buf_len, const gchar *format, gdouble d)
g_return_val_if_fail (buffer != NULL, NULL);
g_return_val_if_fail (format[0] == '%', NULL);
g_return_val_if_fail (strpbrk (format + 1, "'l%") == NULL, NULL);
-
+
format_char = format[strlen (format) - 1];
-
+
g_return_val_if_fail (format_char == 'e' || format_char == 'E' ||
format_char == 'f' || format_char == 'F' ||
format_char == 'g' || format_char == 'G',
@@ -830,7 +830,7 @@ get_font_options (void)
/* Antialiasing */
antialiasing = gconf_client_get_string (gconf,
"/desktop/gnome/font_rendering/antialiasing", NULL);
- if (antialiasing == NULL)
+ if (antialiasing == NULL)
cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_DEFAULT);
else {
if (strcmp (antialiasing, "grayscale") == 0)
diff --git a/e-util/e-util.h b/e-util/e-util.h
index bd23e2bb8a..c2983f454f 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-util.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/e-util/e-win32-reloc.c b/e-util/e-win32-reloc.c
index b9066c8edc..67a41abe43 100644
--- a/e-util/e-win32-reloc.c
+++ b/e-util/e-win32-reloc.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-win32-reloc.c: Support relocatable installation on Win32
* Copyright 2005, Novell, Inc.
*
@@ -94,8 +94,8 @@ replace_prefix (const char *runtime_prefix,
static void
setup (void)
{
- char *full_prefix;
- char *cp_prefix;
+ char *full_prefix;
+ char *cp_prefix;
G_LOCK (mutex);
if (localedir != NULL) {
diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c
index 1a737626a8..1bd5a530d0 100644
--- a/e-util/e-xml-utils.c
+++ b/e-util/e-xml-utils.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-xml-utils.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -128,7 +128,7 @@ e_xml_get_child_by_name_by_lang_list_with_score (const xmlNode *parent,
xmlFree (lang);
if (*best_lang_score == 0) {
return best_node;
- }
+ }
}
return best_node;
diff --git a/e-util/e-xml-utils.h b/e-util/e-xml-utils.h
index ee87d84cd9..b5bce7540a 100644
--- a/e-util/e-xml-utils.h
+++ b/e-util/e-xml-utils.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-xml-utils.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/filter/filter-code.c b/filter/filter-code.c
index 38c14010ec..9dc1927846 100644
--- a/filter/filter-code.c
+++ b/filter/filter-code.c
@@ -42,7 +42,7 @@ GType
filter_code_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (FilterCodeClass),
@@ -55,10 +55,10 @@ filter_code_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) filter_code_init,
};
-
+
type = g_type_register_static (FILTER_TYPE_INPUT, "FilterCode", &info, 0);
}
-
+
return type;
}
@@ -67,11 +67,11 @@ filter_code_class_init (FilterCodeClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
+
parent_class = g_type_class_ref (FILTER_TYPE_INPUT);
-
+
object_class->finalize = filter_code_finalise;
-
+
/* override methods */
fe_class->build_code = build_code;
fe_class->format_sexp = format_sexp;
@@ -94,7 +94,7 @@ filter_code_finalise (GObject *obj)
* filter_code_new:
*
* Create a new FilterCode object.
- *
+ *
* Return value: A new #FilterCode object.
**/
FilterCode *
diff --git a/filter/filter-code.h b/filter/filter-code.h
index bbf3954ac6..386ea72196 100644
--- a/filter/filter-code.h
+++ b/filter/filter-code.h
@@ -42,9 +42,9 @@ struct _FilterCode {
struct _FilterCodeClass {
FilterInputClass parent_class;
-
+
/* virtual methods */
-
+
/* signals */
};
diff --git a/filter/filter-colour.c b/filter/filter-colour.c
index 250d9f6594..1d3a670b1f 100644
--- a/filter/filter-colour.c
+++ b/filter/filter-colour.c
@@ -52,7 +52,7 @@ GType
filter_colour_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (FilterColourClass),
@@ -65,10 +65,10 @@ filter_colour_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) filter_colour_init,
};
-
+
type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterColour", &info, 0);
}
-
+
return type;
}
@@ -77,11 +77,11 @@ filter_colour_class_init (FilterColourClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
+
parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
+
object_class->finalize = filter_colour_finalise;
-
+
/* override methods */
fe_class->eq = colour_eq;
fe_class->xml_create = xml_create;
@@ -108,7 +108,7 @@ filter_colour_finalise (GObject *obj)
* filter_colour_new:
*
* Create a new FilterColour object.
- *
+ *
* Return value: A new #FilterColour object.
**/
FilterColour *
@@ -199,7 +199,7 @@ get_widget (FilterElement *fe)
g_signal_connect (
G_OBJECT (color_button), "color_set",
G_CALLBACK (set_color), fe);
-
+
return color_button;
}
diff --git a/filter/filter-colour.h b/filter/filter-colour.h
index 70fb2952ec..8ebb7f0ec3 100644
--- a/filter/filter-colour.h
+++ b/filter/filter-colour.h
@@ -38,15 +38,15 @@ typedef struct _FilterColourClass FilterColourClass;
struct _FilterColour {
FilterElement parent_object;
-
+
GdkColor color;
};
struct _FilterColourClass {
FilterElementClass parent_class;
-
+
/* virtual methods */
-
+
/* signals */
};
diff --git a/filter/filter-datespec.c b/filter/filter-datespec.c
index 328b7597dd..8bf1a914b7 100644
--- a/filter/filter-datespec.c
+++ b/filter/filter-datespec.c
@@ -105,7 +105,7 @@ GType
filter_datespec_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (FilterDatespecClass),
@@ -118,10 +118,10 @@ filter_datespec_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) filter_datespec_init,
};
-
+
type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterDatespec", &info, 0);
}
-
+
return type;
}
@@ -130,11 +130,11 @@ filter_datespec_class_init (FilterDatespecClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
+
parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
+
object_class->finalize = filter_datespec_finalise;
-
+
/* override methods */
fe_class->validate = validate;
fe_class->eq = date_eq;
@@ -157,9 +157,9 @@ static void
filter_datespec_finalise (GObject *obj)
{
FilterDatespec *fd = (FilterDatespec *) obj;
-
+
g_free (fd->priv);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -167,7 +167,7 @@ filter_datespec_finalise (GObject *obj)
* filter_datespec_new:
*
* Create a new FilterDatespec object.
- *
+ *
* Return value: A new #FilterDatespec object.
**/
FilterDatespec *
@@ -181,7 +181,7 @@ validate (FilterElement *fe)
{
FilterDatespec *fds = (FilterDatespec *) fe;
gboolean valid;
-
+
valid = fds->type != FDST_UNKNOWN;
if (!valid) {
/* FIXME: FilterElement should probably have a
@@ -190,7 +190,7 @@ validate (FilterElement *fe)
here. */
e_error_run(NULL, "filter:no-date", NULL);
}
-
+
return valid;
}
@@ -198,7 +198,7 @@ static int
date_eq (FilterElement *fe, FilterElement *cm)
{
FilterDatespec *fd = (FilterDatespec *)fe, *cd = (FilterDatespec *)cm;
-
+
return FILTER_ELEMENT_CLASS (parent_class)->eq(fe, cm)
&& (fd->type == cd->type)
&& (fd->value == cd->value);
@@ -217,19 +217,19 @@ xml_encode (FilterElement *fe)
xmlNodePtr value, work;
FilterDatespec *fds = (FilterDatespec *)fe;
char str[32];
-
+
d(printf ("Encoding datespec as xml\n"));
-
+
value = xmlNewNode (NULL, (const unsigned char *)"value");
xmlSetProp (value, (const unsigned char *)"name", (unsigned char *)fe->name);
xmlSetProp (value, (const unsigned char *)"type", (const unsigned char *)"datespec");
-
+
work = xmlNewChild (value, NULL, (const unsigned char *)"datespec", NULL);
sprintf (str, "%d", fds->type);
xmlSetProp (work, (const unsigned char *)"type", (unsigned char *)str);
sprintf (str, "%d", (int)fds->value);
xmlSetProp (work, (const unsigned char *)"value", (unsigned char *)str);
-
+
return value;
}
@@ -239,12 +239,12 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
FilterDatespec *fds = (FilterDatespec *)fe;
xmlNodePtr n;
xmlChar *val;
-
+
d(printf ("Decoding datespec from xml %p\n", fe));
-
+
xmlFree (fe->name);
fe->name = (char *)xmlGetProp (node, (const unsigned char *)"name");
-
+
n = node->children;
while (n) {
if (!strcmp ((char *)n->name, "datespec")) {
@@ -258,7 +258,7 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
}
n = n->next;
}
-
+
return 0;
}
@@ -271,7 +271,7 @@ get_best_span (time_t val)
if (val % timespans[i].seconds == 0)
return i;
}
-
+
return 0;
}
@@ -281,7 +281,7 @@ set_button (FilterDatespec *fds)
{
char buf[128];
char *label = buf;
-
+
switch (fds->type) {
case FDST_UNKNOWN:
label = _("<click here to select a date>");
@@ -291,7 +291,7 @@ set_button (FilterDatespec *fds)
break;
case FDST_SPECIFIED: {
struct tm tm;
-
+
localtime_r(&fds->value, &tm);
/* strftime for date filter display, only needs to show a day date (i.e. no time) */
strftime(buf, sizeof(buf), _("%d-%b-%Y"), &tm);
@@ -301,7 +301,7 @@ set_button (FilterDatespec *fds)
label = _("now");
else {
int span, count;
-
+
span = get_best_span(fds->value);
count = fds->value / timespans[span].seconds;
sprintf(buf, ngettext(timespans[span].past_singular, timespans[span].past_plural, count), count);
@@ -312,14 +312,14 @@ set_button (FilterDatespec *fds)
label = _("now");
else {
int span, count;
-
+
span = get_best_span(fds->value);
count = fds->value / timespans[span].seconds;
sprintf(buf, ngettext(timespans[span].future_singular, timespans[span].future_plural, count), count);
}
break;
}
-
+
gtk_label_set_text((GtkLabel *)fds->priv->label_button, label);
}
@@ -327,12 +327,12 @@ static void
get_values (FilterDatespec *fds)
{
struct _FilterDatespecPrivate *p = PRIV(fds);
-
+
switch(fds->priv->type) {
case FDST_SPECIFIED: {
guint year, month, day;
struct tm tm;
-
+
gtk_calendar_get_date((GtkCalendar *)p->calendar_specify, &year, &month, &day);
memset(&tm, 0, sizeof(tm));
tm.tm_mday = day;
@@ -344,7 +344,7 @@ get_values (FilterDatespec *fds)
case FDST_X_FUTURE:
case FDST_X_AGO: {
int val;
-
+
val = gtk_spin_button_get_value_as_int((GtkSpinButton *)p->spin_relative);
fds->value = timespans[p->span].seconds * val;
break; }
@@ -352,7 +352,7 @@ get_values (FilterDatespec *fds)
default:
break;
}
-
+
fds->type = p->type;
}
@@ -362,11 +362,11 @@ set_values (FilterDatespec *fds)
int note_type;
struct _FilterDatespecPrivate *p = PRIV(fds);
-
+
p->type = fds->type==FDST_UNKNOWN ? FDST_NOW : fds->type;
note_type = fds->type==FDST_X_FUTURE ? FDST_X_AGO : fds->type; // FUTURE and AGO use the same notebook pages/etc.
-
+
switch (p->type) {
case FDST_NOW:
case FDST_UNKNOWN:
@@ -375,7 +375,7 @@ set_values (FilterDatespec *fds)
case FDST_SPECIFIED:
{
struct tm tm;
-
+
localtime_r(&fds->value, &tm);
gtk_calendar_select_month((GtkCalendar*)p->calendar_specify, tm.tm_mon, tm.tm_year + 1900);
gtk_calendar_select_day((GtkCalendar*)p->calendar_specify, tm.tm_mday);
@@ -394,7 +394,7 @@ set_values (FilterDatespec *fds)
gtk_option_menu_set_history((GtkOptionMenu*)p->option_past_future, 1);
break;
}
-
+
gtk_notebook_set_current_page ((GtkNotebook*) p->notebook_type, note_type);
gtk_option_menu_set_history ((GtkOptionMenu*) p->option_type, note_type);
}
@@ -415,7 +415,7 @@ static void
set_option_relative (GtkMenu *menu, FilterDatespec *fds)
{
GtkWidget *w;
-
+
w = gtk_menu_get_active (menu);
fds->priv->span = g_list_index (GTK_MENU_SHELL (menu)->children, w);
}
@@ -424,7 +424,7 @@ static void
set_option_past_future (GtkMenu *menu, FilterDatespec *fds)
{
GtkWidget *w;
-
+
w = gtk_menu_get_active (menu);
if(g_list_index (GTK_MENU_SHELL (menu)->children, w) == 0)
fds->type = fds->priv->type = FDST_X_AGO;
@@ -442,11 +442,11 @@ button_clicked (GtkButton *button, FilterDatespec *fds)
char *filter_glade = g_build_filename (EVOLUTION_GLADEDIR,
"filter.glade",
NULL);
-
+
gui = glade_xml_new (filter_glade, "filter_datespec", NULL);
g_free (filter_glade);
toplevel = glade_xml_get_widget (gui, "filter_datespec");
-
+
dialog = (GtkDialog *) gtk_dialog_new ();
gtk_window_set_title ((GtkWindow *) dialog, _("Select a time to compare against"));
gtk_dialog_add_buttons (dialog,
@@ -454,30 +454,30 @@ button_clicked (GtkButton *button, FilterDatespec *fds)
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_has_separator (dialog, FALSE);
-
+
p->notebook_type = glade_xml_get_widget (gui, "notebook_type");
p->option_type = glade_xml_get_widget (gui, "option_type");
p->calendar_specify = glade_xml_get_widget (gui, "calendar_specify");
p->spin_relative = glade_xml_get_widget (gui, "spin_relative");
p->option_relative = glade_xml_get_widget (gui, "option_relative");
p->option_past_future = glade_xml_get_widget (gui, "option_past_future");
-
+
set_values (fds);
-
+
g_signal_connect (GTK_OPTION_MENU (p->option_type)->menu, "deactivate",
G_CALLBACK (set_option_type), fds);
g_signal_connect (GTK_OPTION_MENU (p->option_relative)->menu, "deactivate",
G_CALLBACK (set_option_relative), fds);
g_signal_connect (GTK_OPTION_MENU (p->option_past_future)->menu, "deactivate",
G_CALLBACK (set_option_past_future), fds);
-
+
gtk_box_pack_start ((GtkBox *) dialog->vbox, toplevel, TRUE, TRUE, 3);
-
+
if (gtk_dialog_run (dialog) == GTK_RESPONSE_OK) {
get_values (fds);
set_button (fds);
}
-
+
gtk_widget_destroy ((GtkWidget *)dialog);
}
@@ -486,32 +486,32 @@ get_widget (FilterElement *fe)
{
FilterDatespec *fds = (FilterDatespec *)fe;
GtkWidget *button;
-
+
fds->priv->label_button = gtk_label_new ("");
gtk_misc_set_alignment (GTK_MISC (fds->priv->label_button), 0.5, 0.5);
set_button(fds);
-
+
button = gtk_button_new();
gtk_container_add (GTK_CONTAINER (button), fds->priv->label_button);
g_signal_connect (button, "clicked", G_CALLBACK (button_clicked), fds);
-
+
gtk_widget_show (button);
gtk_widget_show (fds->priv->label_button);
-
+
return button;
}
-static void
+static void
build_code (FilterElement *fe, GString *out, struct _FilterPart *fp)
{
return;
}
-static void
+static void
format_sexp (FilterElement *fe, GString *out)
{
FilterDatespec *fds = (FilterDatespec *)fe;
-
+
switch (fds->type) {
case FDST_UNKNOWN:
g_warning ("user hasn't selected a datespec yet!");
diff --git a/filter/filter-datespec.h b/filter/filter-datespec.h
index 97676bfb5f..a243da9994 100644
--- a/filter/filter-datespec.h
+++ b/filter/filter-datespec.h
@@ -48,14 +48,14 @@ typedef enum _FilterDatespec_type {
struct _FilterDatespec {
FilterElement parent;
struct _FilterDatespecPrivate *priv;
-
+
FilterDatespec_type type;
-
+
/* either a timespan, an absolute time, or 0
* depending on type -- the above mapping to
* (X_FUTURE, X_AGO, SPECIFIED, NOW)
*/
-
+
time_t value;
};
diff --git a/filter/filter-element.c b/filter/filter-element.c
index 2c075f835d..74e55ba422 100644
--- a/filter/filter-element.c
+++ b/filter/filter-element.c
@@ -53,7 +53,7 @@ GType
filter_element_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (FilterElementClass),
@@ -68,7 +68,7 @@ filter_element_get_type (void)
};
type = g_type_register_static (G_TYPE_OBJECT, "FilterElement", &info, 0);
}
-
+
return type;
}
@@ -76,9 +76,9 @@ static void
filter_element_class_init (FilterElementClass *klass)
{
parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
+
((GObjectClass *)klass)->finalize = filter_element_finalise;
-
+
/* override methods */
klass->validate = validate;
klass->eq = element_eq;
@@ -97,9 +97,9 @@ static void
filter_element_finalise (GObject *obj)
{
FilterElement *o = (FilterElement *)obj;
-
+
xmlFree (o->name);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -107,7 +107,7 @@ filter_element_finalise (GObject *obj)
* filter_element_new:
*
* Create a new FilterElement object.
- *
+ *
* Return value: A new #FilterElement object.
**/
FilterElement *
@@ -126,7 +126,7 @@ int
filter_element_eq (FilterElement *fe, FilterElement *cm)
{
FilterElementClass *klass;
-
+
klass = FILTER_ELEMENT_GET_CLASS (fe);
return (klass == FILTER_ELEMENT_GET_CLASS (cm)) && klass->eq (fe, cm);
}
@@ -135,7 +135,7 @@ filter_element_eq (FilterElement *fe, FilterElement *cm)
* filter_element_xml_create:
* @fe: filter element
* @node: xml node
- *
+ *
* Create a new filter element based on an xml definition of
* that element.
**/
@@ -148,10 +148,10 @@ filter_element_xml_create (FilterElement *fe, xmlNodePtr node)
/**
* filter_element_xml_encode:
* @fe: filter element
- *
+ *
* Encode the values of a filter element into xml format.
- *
- * Return value:
+ *
+ * Return value:
**/
xmlNodePtr
filter_element_xml_encode (FilterElement *fe)
@@ -163,10 +163,10 @@ filter_element_xml_encode (FilterElement *fe)
* filter_element_xml_decode:
* @fe: filter element
* @node: xml node
- *
+ *
* Decode the values of a fitler element from xml format.
- *
- * Return value:
+ *
+ * Return value:
**/
int
filter_element_xml_decode (FilterElement *fe, xmlNodePtr node)
@@ -177,10 +177,10 @@ filter_element_xml_decode (FilterElement *fe, xmlNodePtr node)
/**
* filter_element_clone:
* @fe: filter element
- *
+ *
* Clones the FilterElement @fe.
- *
- * Return value:
+ *
+ * Return value:
**/
FilterElement *
filter_element_clone (FilterElement *fe)
@@ -192,10 +192,10 @@ filter_element_clone (FilterElement *fe)
* filter_element_get_widget:
* @fe: filter element
* @node: xml node
- *
+ *
* Create a widget to represent this element.
- *
- * Return value:
+ *
+ * Return value:
**/
GtkWidget *
filter_element_get_widget (FilterElement *fe)
@@ -207,8 +207,8 @@ filter_element_get_widget (FilterElement *fe)
* filter_element_build_code:
* @fe: filter element
* @out: output buffer
- * @ff:
- *
+ * @ff:
+ *
* Add the code representing this element to the output string @out.
**/
void
@@ -221,7 +221,7 @@ filter_element_build_code (FilterElement *fe, GString *out, struct _FilterPart *
* filter_element_format_sexp:
* @fe: filter element
* @out: output buffer
- *
+ *
* Format the value(s) of this element in a method suitable for the context of
* sexp where it is used. Usually as space separated, double-quoted strings.
**/
@@ -262,12 +262,12 @@ clone (FilterElement *fe)
{
xmlNodePtr node;
FilterElement *new;
-
+
new = (FilterElement *) g_object_new (G_OBJECT_TYPE (fe), NULL, NULL);
node = filter_element_xml_encode (fe);
filter_element_xml_decode (new, node);
xmlFreeNodeList (node);
-
+
return new;
}
diff --git a/filter/filter-element.h b/filter/filter-element.h
index 6f2409de36..4ed4377aec 100644
--- a/filter/filter-element.h
+++ b/filter/filter-element.h
@@ -43,7 +43,7 @@ typedef FilterElement *(*FilterElementFunc)(void *data);
struct _FilterElement {
GObject parent_object;
-
+
char *name;
gpointer data;
};
@@ -52,22 +52,22 @@ struct _FilterPart;
struct _FilterElementClass {
GObjectClass parent_class;
-
+
/* virtual methods */
gboolean (*validate) (FilterElement *fe);
int (*eq) (FilterElement *fe, FilterElement *cm);
-
+
void (*xml_create) (FilterElement *, xmlNodePtr);
xmlNodePtr (*xml_encode) (FilterElement *);
int (*xml_decode) (FilterElement *, xmlNodePtr);
-
+
FilterElement *(*clone) (FilterElement *fe);
void (*copy_value)(FilterElement *fe, FilterElement *se);
GtkWidget *(*get_widget) (FilterElement *);
void (*build_code) (FilterElement *, GString *, struct _FilterPart *ff);
void (*format_sexp) (FilterElement *, GString *);
-
+
/* signals */
};
diff --git a/filter/filter-file.c b/filter/filter-file.c
index 3fc797dff5..0418a36a2d 100644
--- a/filter/filter-file.c
+++ b/filter/filter-file.c
@@ -62,7 +62,7 @@ GType
filter_file_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (FilterFileClass),
@@ -75,10 +75,10 @@ filter_file_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) filter_file_init,
};
-
+
type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterFile", &info, 0);
}
-
+
return type;
}
@@ -87,11 +87,11 @@ filter_file_class_init (FilterFileClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
+
parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
+
object_class->finalize = filter_file_finalise;
-
+
/* override methods */
fe_class->validate = validate;
fe_class->eq = file_eq;
@@ -113,10 +113,10 @@ static void
filter_file_finalise (GObject *obj)
{
FilterFile *ff = (FilterFile *) obj;
-
+
xmlFree (ff->type);
g_free (ff->path);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -124,7 +124,7 @@ filter_file_finalise (GObject *obj)
* filter_file_new:
*
* Create a new FilterFile object.
- *
+ *
* Return value: A new #FilterFile object.
**/
FilterFile *
@@ -138,10 +138,10 @@ FilterFile *
filter_file_new_type_name (const char *type)
{
FilterFile *file;
-
+
file = filter_file_new ();
file->type = (char *)xmlStrdup ((xmlChar *)type);
-
+
return file;
}
@@ -156,7 +156,7 @@ static gboolean
validate (FilterElement *fe)
{
FilterFile *file = (FilterFile *) fe;
-
+
if (!file->path) {
/* FIXME: FilterElement should probably have a
GtkWidget member pointing to the value gotten with
@@ -166,9 +166,9 @@ validate (FilterElement *fe)
return FALSE;
}
-
+
/* FIXME: do more to validate command-lines? */
-
+
if (strcmp (file->type, "file") == 0) {
if (!g_file_test (file->path, G_FILE_TEST_IS_REGULAR)) {
/* FIXME: FilterElement should probably have a
@@ -176,7 +176,7 @@ validate (FilterElement *fe)
::get_widget() so that we can get the parent window
here. */
e_error_run(NULL, "filter:bad-file", file->path, NULL);
-
+
return FALSE;
}
} else if (strcmp (file->type, "command") == 0) {
@@ -184,7 +184,7 @@ validate (FilterElement *fe)
be an empty string */
return file->path[0] != '\0';
}
-
+
return TRUE;
}
@@ -192,7 +192,7 @@ static int
file_eq (FilterElement *fe, FilterElement *cm)
{
FilterFile *ff = (FilterFile *)fe, *cf = (FilterFile *)cm;
-
+
return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
&& ((ff->path && cf->path && strcmp (ff->path, cf->path) == 0)
|| (ff->path == NULL && cf->path == NULL))
@@ -213,18 +213,18 @@ xml_encode (FilterElement *fe)
FilterFile *file = (FilterFile *) fe;
xmlNodePtr cur, value;
char *type;
-
+
type = file->type ? file->type : "file";
-
+
d(printf ("Encoding %s as xml\n", type));
-
+
value = xmlNewNode (NULL, (const unsigned char *)"value");
xmlSetProp (value, (const unsigned char *)"name", (unsigned char *)fe->name);
xmlSetProp (value, (const unsigned char *)"type", (unsigned char *)type);
-
+
cur = xmlNewChild (value, NULL, (unsigned char *)type, NULL);
xmlNodeSetContent (cur, (unsigned char *)file->path);
-
+
return value;
}
@@ -234,37 +234,37 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
FilterFile *file = (FilterFile *)fe;
char *name, *str, *type;
xmlNodePtr n;
-
+
name = (char *)xmlGetProp (node, (const unsigned char *)"name");
type = (char *)xmlGetProp (node, (const unsigned char *)"type");
-
+
d(printf("Decoding %s from xml %p\n", type, fe));
d(printf ("Name = %s\n", name));
-
+
xmlFree (fe->name);
fe->name = name;
xmlFree (file->type);
file->type = type;
-
+
g_free (file->path);
file->path = NULL;
-
+
n = node->children;
while (n != NULL) {
if (!strcmp ((char *)n->name, type)) {
str = (char *)xmlNodeGetContent (n);
file->path = g_strdup (str ? str : "");
xmlFree (str);
-
+
d(printf (" '%s'\n", file->path));
break;
} else if (n->type == XML_ELEMENT_NODE) {
g_warning ("Unknown node type '%s' encountered decoding a %s\n", n->name, type);
}
-
+
n = n->next;
}
-
+
return 0;
}
@@ -273,7 +273,7 @@ filename_changed (GtkWidget *widget, FilterElement *fe)
{
FilterFile *file = (FilterFile *) fe;
const char *new;
-
+
new = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
g_free (file->path);
file->path = g_strdup (new);
@@ -287,7 +287,7 @@ get_widget (FilterElement *fe)
filewidget = (GtkWidget *) gtk_file_chooser_button_new (_("Choose a file"), GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewidget), file->path);
- g_signal_connect (GTK_FILE_CHOOSER_BUTTON (filewidget), "selection-changed",
+ g_signal_connect (GTK_FILE_CHOOSER_BUTTON (filewidget), "selection-changed",
G_CALLBACK (filename_changed), fe);
return filewidget;
}
@@ -302,6 +302,6 @@ static void
format_sexp (FilterElement *fe, GString *out)
{
FilterFile *file = (FilterFile *) fe;
-
+
e_sexp_encode_string (out, file->path);
}
diff --git a/filter/filter-file.h b/filter/filter-file.h
index ced47eb56f..3b82a32ae0 100644
--- a/filter/filter-file.h
+++ b/filter/filter-file.h
@@ -43,16 +43,16 @@ typedef struct _FilterFileClass FilterFileClass;
struct _FilterFile {
FilterElement parent_object;
-
+
char *type;
char *path;
};
struct _FilterFileClass {
FilterElementClass parent_class;
-
+
/* virtual methods */
-
+
/* signals */
};
diff --git a/filter/filter-input.c b/filter/filter-input.c
index 59fa507945..8dd775673a 100644
--- a/filter/filter-input.c
+++ b/filter/filter-input.c
@@ -59,7 +59,7 @@ GType
filter_input_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (FilterInputClass),
@@ -72,10 +72,10 @@ filter_input_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) filter_input_init,
};
-
+
type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterInput", &info, 0);
}
-
+
return type;
}
@@ -84,11 +84,11 @@ filter_input_class_init (FilterInputClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
+
parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
+
object_class->finalize = filter_input_finalise;
-
+
/* override methods */
fe_class->validate = validate;
fe_class->eq = input_eq;
@@ -110,11 +110,11 @@ static void
filter_input_finalise (GObject *obj)
{
FilterInput *fi = (FilterInput *) obj;
-
+
xmlFree (fi->type);
g_list_foreach (fi->values, (GFunc)g_free, NULL);
g_list_free (fi->values);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -122,7 +122,7 @@ filter_input_finalise (GObject *obj)
* filter_input_new:
*
* Create a new FilterInput object.
- *
+ *
* Return value: A new #FilterInput object.
**/
FilterInput *
@@ -135,12 +135,12 @@ FilterInput *
filter_input_new_type_name (const char *type)
{
FilterInput *fi;
-
+
fi = filter_input_new ();
fi->type = (char *)xmlStrdup ((xmlChar *)type);
-
+
d(printf("new type %s = %p\n", type, fi));
-
+
return fi;
}
@@ -148,7 +148,7 @@ void
filter_input_set_value (FilterInput *fi, const char *value)
{
GList *l;
-
+
d(printf("set_value '%s'\n", value));
l = fi->values;
@@ -157,7 +157,7 @@ filter_input_set_value (FilterInput *fi, const char *value)
l = g_list_next (l);
}
g_list_free (fi->values);
-
+
fi->values = g_list_append (NULL, g_strdup (value));
}
@@ -166,37 +166,37 @@ validate (FilterElement *fe)
{
FilterInput *fi = (FilterInput *)fe;
gboolean valid = TRUE;
-
+
if (fi->values && !strcmp (fi->type, "regex")) {
const char *pattern;
regex_t regexpat;
int regerr;
-
+
pattern = fi->values->data;
-
+
if ((regerr = regcomp (&regexpat, pattern, REG_EXTENDED | REG_NEWLINE | REG_ICASE))) {
size_t reglen;
char *regmsg;
-
- /* regerror gets called twice to get the full error string
+
+ /* regerror gets called twice to get the full error string
length to do proper posix error reporting */
reglen = regerror (regerr, &regexpat, 0, 0);
regmsg = g_malloc0 (reglen + 1);
regerror (regerr, &regexpat, regmsg, reglen);
-
+
/* FIXME: FilterElement should probably have a
GtkWidget member pointing to the value gotten with
::get_widget() so that we can get the parent window
here. */
e_error_run(NULL, "filter:bad-regexp", pattern, regmsg, NULL);
g_free (regmsg);
-
+
valid = FALSE;
}
-
+
regfree (&regexpat);
}
-
+
return valid;
}
@@ -204,13 +204,13 @@ static int
list_eq (GList *al, GList *bl)
{
int truth = TRUE;
-
+
while (truth && al && bl) {
truth = strcmp ((char *) al->data, (char *) bl->data) == 0;
al = al->next;
bl = bl->next;
}
-
+
return truth && al == NULL && bl == NULL;
}
@@ -218,7 +218,7 @@ static int
input_eq (FilterElement *fe, FilterElement *cm)
{
FilterInput *fi = (FilterInput *)fe, *ci = (FilterInput *)cm;
-
+
return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
&& strcmp (fi->type, ci->type) == 0
&& list_eq (fi->values, ci->values);
@@ -238,11 +238,11 @@ xml_encode (FilterElement *fe)
GList *l;
FilterInput *fi = (FilterInput *)fe;
char *type;
-
+
type = fi->type ? fi->type : "string";
-
+
d(printf ("Encoding %s as xml\n", type));
-
+
value = xmlNewNode (NULL, (const unsigned char *)"value");
xmlSetProp (value, (const unsigned char *)"name", (unsigned char *)fe->name);
xmlSetProp (value, (const unsigned char *)"type", (unsigned char *)type);
@@ -250,16 +250,16 @@ xml_encode (FilterElement *fe)
while (l) {
xmlNodePtr cur;
xmlChar *str = l->data;
-
+
cur = xmlNewChild (value, NULL, (unsigned char *)type, NULL);
-
+
str = xmlEncodeEntitiesReentrant (NULL, str);
xmlNodeSetContent (cur, str);
xmlFree (str);
-
+
l = l->next;
}
-
+
return value;
}
@@ -270,7 +270,7 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
char *name, *str, *type;
xmlNodePtr n;
GList *l;
-
+
l = fi->values;
while (l) {
g_free (l->data);
@@ -281,7 +281,7 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
name = (char *)xmlGetProp (node, (const unsigned char *)"name");
type = (char *)xmlGetProp (node, (const unsigned char *)"type");
-
+
d(printf("Decoding %s from xml %p\n", type, fe));
d(printf ("Name = %s\n", name));
xmlFree (fe->name);
@@ -293,7 +293,7 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
if (!strcmp ((char *)n->name, type)) {
if (!(str = (char *)xmlNodeGetContent (n)))
str = (char *)xmlStrdup ((const unsigned char *)"");
-
+
d(printf (" '%s'\n", str));
fi->values = g_list_append (fi->values, g_strdup (str));
xmlFree (str);
@@ -302,7 +302,7 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
}
n = n->next;
}
-
+
return 0;
}
@@ -312,9 +312,9 @@ entry_changed (GtkEntry *entry, FilterElement *fe)
FilterInput *fi = (FilterInput *) fe;
const char *new;
GList *l;
-
+
new = gtk_entry_get_text (entry);
-
+
d(printf("entry_changed '%s'\n", new));
/* NOTE: entry only supports a single value ... */
@@ -323,9 +323,9 @@ entry_changed (GtkEntry *entry, FilterElement *fe)
g_free (l->data);
l = l->next;
}
-
+
g_list_free (fi->values);
-
+
fi->values = g_list_append (NULL, g_strdup (new));
}
@@ -334,13 +334,13 @@ get_widget (FilterElement *fe)
{
GtkWidget *entry;
FilterInput *fi = (FilterInput *)fe;
-
+
entry = gtk_entry_new ();
if (fi->values && fi->values->data)
gtk_entry_set_text (GTK_ENTRY (entry), (const char *) fi->values->data);
-
+
g_signal_connect (entry, "changed", G_CALLBACK (entry_changed), fe);
-
+
return entry;
}
@@ -357,7 +357,7 @@ format_sexp (FilterElement *fe, GString *out)
GList *l;
d(printf("format_sexp, first elem=%p\n", fi->values));
-
+
l = fi->values;
while (l) {
e_sexp_encode_string (out, l->data);
diff --git a/filter/filter-input.h b/filter/filter-input.h
index d791a32eca..e958b9b9fa 100644
--- a/filter/filter-input.h
+++ b/filter/filter-input.h
@@ -38,16 +38,16 @@ typedef struct _FilterInputClass FilterInputClass;
struct _FilterInput {
FilterElement parent_object;
-
+
char *type; /* name of type */
GList *values; /* strings */
};
struct _FilterInputClass {
FilterElementClass parent_class;
-
+
/* virtual methods */
-
+
/* signals */
};
diff --git a/filter/filter-int.c b/filter/filter-int.c
index a6c4bbd9a5..ace5040747 100644
--- a/filter/filter-int.c
+++ b/filter/filter-int.c
@@ -54,7 +54,7 @@ GType
filter_int_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (FilterIntClass),
@@ -67,10 +67,10 @@ filter_int_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) filter_int_init,
};
-
+
type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterInt", &info, 0);
}
-
+
return type;
}
@@ -79,11 +79,11 @@ filter_int_class_init (FilterIntClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
+
parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
+
object_class->finalize = filter_int_finalise;
-
+
/* override methods */
fe_class->eq = int_eq;
fe_class->clone = int_clone;
@@ -106,9 +106,9 @@ static void
filter_int_finalise (GObject *obj)
{
FilterInt *fi = (FilterInt *) obj;
-
+
g_free (fi->type);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -116,7 +116,7 @@ filter_int_finalise (GObject *obj)
* filter_int_new:
*
* Create a new FilterInt object.
- *
+ *
* Return value: A new #FilterInt object.
**/
FilterInt *
@@ -129,13 +129,13 @@ FilterInt *
filter_int_new_type (const char *type, int min, int max)
{
FilterInt *fi;
-
+
fi = filter_int_new ();
-
+
fi->type = g_strdup (type);
fi->min = min;
fi->max = max;
-
+
return fi;
}
@@ -179,18 +179,18 @@ xml_encode (FilterElement *fe)
FilterInt *fs = (FilterInt *)fe;
char intval[32];
const char *type;
-
+
type = fs->type?fs->type:"integer";
-
+
d(printf("Encoding %s as xml\n", type));
-
+
value = xmlNewNode (NULL, (const unsigned char *)"value");
xmlSetProp (value, (const unsigned char *)"name", (unsigned char *)fe->name);
xmlSetProp (value, (const unsigned char *)"type", (unsigned char *)type);
-
+
sprintf(intval, "%d", fs->val);
xmlSetProp (value, (unsigned char *)type, (unsigned char *)intval);
-
+
return value;
}
@@ -200,20 +200,20 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
FilterInt *fs = (FilterInt *)fe;
char *name, *type;
char *intval;
-
+
d(printf("Decoding integer from xml %p\n", fe));
-
+
name = (char *)xmlGetProp (node, (const unsigned char *)"name");
d(printf ("Name = %s\n", name));
xmlFree (fe->name);
fe->name = name;
-
+
type = (char *)xmlGetProp(node, (const unsigned char *)"type");
d(printf ("Type = %s\n", type));
g_free(fs->type);
fs->type = g_strdup(type);
xmlFree(type);
-
+
intval = (char *)xmlGetProp (node, (unsigned char *)(fs->type ? fs->type : "integer"));
if (intval) {
d(printf ("Value = %s\n", intval));
@@ -223,7 +223,7 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
d(printf ("Value = ?unknown?\n"));
fs->val = 0;
}
-
+
return 0;
}
@@ -231,7 +231,7 @@ static void
spin_changed (GtkWidget *spin, FilterElement *fe)
{
FilterInt *fs = (FilterInt *)fe;
-
+
fs->val = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin));
}
@@ -241,16 +241,16 @@ get_widget (FilterElement *fe)
GtkWidget *spin;
GtkObject *adjustment;
FilterInt *fs = (FilterInt *)fe;
-
+
adjustment = gtk_adjustment_new (0.0, (gfloat)fs->min, (gfloat)fs->max, 1.0, 1.0, 1.0);
spin = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), fs->max>fs->min+1000?5.0:1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
-
+
if (fs->val)
gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), (gfloat) fs->val);
-
+
g_signal_connect (spin, "value-changed", G_CALLBACK (spin_changed), fe);
-
+
return spin;
}
diff --git a/filter/filter-int.h b/filter/filter-int.h
index 501adc4114..375a8508f1 100644
--- a/filter/filter-int.h
+++ b/filter/filter-int.h
@@ -38,7 +38,7 @@ typedef struct _FilterIntClass FilterIntClass;
struct _FilterInt {
FilterElement parent_object;
-
+
char *type;
int val;
int min;
@@ -47,9 +47,9 @@ struct _FilterInt {
struct _FilterIntClass {
FilterElementClass parent_class;
-
+
/* virtual methods */
-
+
/* signals */
};
diff --git a/filter/filter-label.c b/filter/filter-label.c
index 4d997e7378..ca0ae005fe 100644
--- a/filter/filter-label.c
+++ b/filter/filter-label.c
@@ -39,7 +39,7 @@
#include <libedataserver/e-sexp.h>
#include "e-util/e-util.h"
-#define d(x)
+#define d(x)
static void xml_create (FilterElement *fe, xmlNodePtr node);
@@ -55,7 +55,7 @@ GType
filter_label_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (FilterLabelClass),
@@ -68,10 +68,10 @@ filter_label_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) filter_label_init,
};
-
+
type = g_type_register_static (FILTER_TYPE_OPTION, "FilterLabel", &info, 0);
}
-
+
return type;
}
@@ -80,11 +80,11 @@ filter_label_class_init (FilterLabelClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
+
parent_class = g_type_class_ref (FILTER_TYPE_OPTION);
-
+
object_class->finalize = filter_label_finalise;
-
+
/* override methods */
fe_class->xml_create = xml_create;
}
@@ -105,7 +105,7 @@ filter_label_finalise (GObject *obj)
* filter_label_new:
*
* Create a new FilterLabel object.
- *
+ *
* Return value: A new #FilterLabel object.
**/
FilterLabel *
@@ -143,12 +143,12 @@ int
filter_label_index (const char *label)
{
int i;
-
+
for (i = 0; i < sizeof (labels) / sizeof (labels[0]); i++) {
if (strcmp (labels[i].value, label) == 0)
return i;
}
-
+
return -1;
}
@@ -160,26 +160,26 @@ xml_create (FilterElement *fe, xmlNodePtr node)
GSList *list, *l;
char *title, *p, *nounderscores_title;
int i = 0;
-
+
FILTER_ELEMENT_CLASS (parent_class)->xml_create (fe, node);
-
+
gconf = gconf_client_get_default ();
-
+
l = list = gconf_client_get_list (gconf, "/apps/evolution/mail/labels", GCONF_VALUE_STRING, NULL);
while (l != NULL) {
title = (char *) l->data;
if ((p = strrchr (title, ':')))
*p++ = '\0';
-
+
nounderscores_title = e_str_without_underscores (title);
-
+
filter_option_add (fo, i < 5 ? labels[i++].value : (p ? p : "#ffffff"), nounderscores_title, NULL);
g_free (title);
g_free (nounderscores_title);
-
+
l = l->next;
}
g_slist_free (list);
-
+
g_object_unref (gconf);
}
diff --git a/filter/filter-label.h b/filter/filter-label.h
index 6a60e6f760..cacd10bdb1 100644
--- a/filter/filter-label.h
+++ b/filter/filter-label.h
@@ -43,14 +43,14 @@ typedef struct _FilterLabelClass FilterLabelClass;
struct _FilterLabel {
FilterOption parent_object;
-
+
};
struct _FilterLabelClass {
FilterOptionClass parent_class;
-
+
/* virtual methods */
-
+
/* signals */
};
diff --git a/filter/filter-option.c b/filter/filter-option.c
index 7fc8e1602a..2aea362bbc 100644
--- a/filter/filter-option.c
+++ b/filter/filter-option.c
@@ -57,7 +57,7 @@ GType
filter_option_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (FilterOptionClass),
@@ -70,10 +70,10 @@ filter_option_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) filter_option_init,
};
-
+
type = g_type_register_static (FILTER_TYPE_ELEMENT, "FilterOption", &info, 0);
}
-
+
return type;
}
@@ -82,11 +82,11 @@ filter_option_class_init (FilterOptionClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
FilterElementClass *fe_class = FILTER_ELEMENT_CLASS (klass);
-
+
parent_class = g_type_class_ref (FILTER_TYPE_ELEMENT);
-
+
object_class->finalize = filter_option_finalise;
-
+
/* override methods */
fe_class->eq = option_eq;
fe_class->xml_create = xml_create;
@@ -117,10 +117,10 @@ static void
filter_option_finalise (GObject *obj)
{
FilterOption *fo = (FilterOption *) obj;
-
+
g_list_foreach (fo->options, (GFunc)free_option, NULL);
g_list_free (fo->options);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -128,7 +128,7 @@ filter_option_finalise (GObject *obj)
* filter_option_new:
*
* Create a new FilterOption object.
- *
+ *
* Return value: A new #FilterOption object.
**/
FilterOption *
@@ -142,7 +142,7 @@ find_option (FilterOption *fo, const char *name)
{
GList *l = fo->options;
struct _filter_option *op;
-
+
while (l) {
op = l->data;
if (!strcmp (name, op->value)) {
@@ -150,7 +150,7 @@ find_option (FilterOption *fo, const char *name)
}
l = g_list_next (l);
}
-
+
return NULL;
}
@@ -158,7 +158,7 @@ void
filter_option_set_current (FilterOption *option, const char *name)
{
g_return_if_fail (IS_FILTER_OPTION(option));
-
+
option->current = find_option (option, name);
}
@@ -167,15 +167,15 @@ struct _filter_option *
filter_option_add(FilterOption *fo, const char *value, const char *title, const char *code)
{
struct _filter_option *op;
-
+
g_return_val_if_fail (IS_FILTER_OPTION(fo), NULL);
g_return_val_if_fail(find_option(fo, value) == NULL, NULL);
-
+
op = g_malloc(sizeof(*op));
op->title = g_strdup(title);
op->value = g_strdup(value);
op->code = g_strdup(code);
-
+
fo->options = g_list_append(fo->options, op);
if (fo->current == NULL)
fo->current = op;
@@ -187,7 +187,7 @@ static int
option_eq(FilterElement *fe, FilterElement *cm)
{
FilterOption *fo = (FilterOption *)fe, *co = (FilterOption *)cm;
-
+
return FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm)
&& ((fo->current && co->current && strcmp(fo->current->value, co->current->value) == 0)
|| (fo->current == NULL && co->current == NULL));
@@ -198,15 +198,15 @@ xml_create (FilterElement *fe, xmlNodePtr node)
{
FilterOption *fo = (FilterOption *)fe;
xmlNodePtr n, work;
-
+
/* parent implementation */
FILTER_ELEMENT_CLASS (parent_class)->xml_create (fe, node);
-
+
n = node->children;
while (n) {
if (!strcmp ((char *)n->name, "option")) {
char *tmp, *value, *title = NULL, *code = NULL;
-
+
value = (char *)xmlGetProp (n, (const unsigned char *)"value");
work = n->children;
while (work) {
@@ -214,7 +214,7 @@ xml_create (FilterElement *fe, xmlNodePtr node)
if (!title) {
if (!(tmp = (char *)xmlNodeGetContent (work)))
tmp = (char *)xmlStrdup ((const unsigned char *)"");
-
+
title = g_strdup (tmp);
xmlFree (tmp);
}
@@ -222,14 +222,14 @@ xml_create (FilterElement *fe, xmlNodePtr node)
if (!code) {
if (!(tmp = (char*)xmlNodeGetContent (work)))
tmp = (char *)xmlStrdup ((const unsigned char *)"");
-
+
code = g_strdup (tmp);
xmlFree (tmp);
}
}
work = work->next;
}
-
+
filter_option_add (fo, value, title, code);
xmlFree (value);
g_free (title);
@@ -246,14 +246,14 @@ xml_encode (FilterElement *fe)
{
xmlNodePtr value;
FilterOption *fo = (FilterOption *)fe;
-
+
d(printf ("Encoding option as xml\n"));
value = xmlNewNode (NULL, (const unsigned char *)"value");
xmlSetProp (value, (const unsigned char *)"name", (unsigned char *)fe->name);
xmlSetProp (value, (const unsigned char *)"type", (unsigned char *)fo->type);
if (fo->current)
xmlSetProp (value, (const unsigned char *)"value", (unsigned char *)fo->current->value);
-
+
return value;
}
@@ -262,7 +262,7 @@ xml_decode (FilterElement *fe, xmlNodePtr node)
{
FilterOption *fo = (FilterOption *)fe;
char *value;
-
+
d(printf ("Decoding option from xml\n"));
xmlFree (fe->name);
fe->name = (char *)xmlGetProp (node, (const unsigned char *)"name");
@@ -280,7 +280,7 @@ static void
option_changed (GtkWidget *widget, FilterElement *fe)
{
FilterOption *fo = (FilterOption *)fe;
-
+
fo->current = g_object_get_data ((GObject *) widget, "option");
}
@@ -295,7 +295,7 @@ get_widget (FilterElement *fe)
GList *l = fo->options;
struct _filter_option *op;
int index = 0, current = 0;
-
+
menu = gtk_menu_new ();
while (l) {
op = l->data;
@@ -310,19 +310,19 @@ get_widget (FilterElement *fe)
} else if (!first) {
first = item;
}
-
+
l = g_list_next (l);
index++;
}
-
+
omenu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
-
+
if (first)
g_signal_emit_by_name (first, "activate", fe);
-
+
gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current);
-
+
return omenu;
}
@@ -330,9 +330,9 @@ static void
build_code (FilterElement *fe, GString *out, struct _FilterPart *ff)
{
FilterOption *fo = (FilterOption *)fe;
-
+
d(printf ("building option code %p, current = %p\n", fo, fo->current));
-
+
if (fo->current && fo->current->code)
filter_part_expand_code (ff, fo->current->code, out);
}
@@ -341,7 +341,7 @@ static void
format_sexp (FilterElement *fe, GString *out)
{
FilterOption *fo = (FilterOption *)fe;
-
+
if (fo->current)
e_sexp_encode_string (out, fo->current->value);
}
@@ -352,9 +352,9 @@ clone (FilterElement *fe)
FilterOption *fo = (FilterOption *)fe, *new;
GList *l;
struct _filter_option *op, *newop;
-
+
d(printf ("cloning option\n"));
-
+
new = FILTER_OPTION (FILTER_ELEMENT_CLASS (parent_class)->clone (fe));
l = fo->options;
while (l) {
@@ -364,8 +364,8 @@ clone (FilterElement *fe)
new->current = newop;
l = l->next;
}
-
+
d(printf ("cloning option code %p, current = %p\n", new, new->current));
-
+
return (FilterElement *) new;
}
diff --git a/filter/filter-option.h b/filter/filter-option.h
index 60f7eb2619..58f984d8e4 100644
--- a/filter/filter-option.h
+++ b/filter/filter-option.h
@@ -44,18 +44,18 @@ struct _filter_option {
struct _FilterOption {
FilterElement parent_object;
-
+
const char *type; /* static memory, type name written to xml */
-
+
GList *options;
struct _filter_option *current;
};
struct _FilterOptionClass {
FilterElementClass parent_class;
-
+
/* virtual methods */
-
+
/* signals */
};
diff --git a/filter/filter-part.c b/filter/filter-part.c
index 6ac8ddd842..91bd6655d6 100644
--- a/filter/filter-part.c
+++ b/filter/filter-part.c
@@ -50,7 +50,7 @@ GType
filter_part_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (FilterPartClass),
@@ -63,10 +63,10 @@ filter_part_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) filter_part_init,
};
-
+
type = g_type_register_static (G_TYPE_OBJECT, "FilterPart", &info, 0);
}
-
+
return type;
}
@@ -74,9 +74,9 @@ static void
filter_part_class_init (FilterPartClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+
parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
+
object_class->finalize = filter_part_finalise;
}
@@ -91,18 +91,18 @@ filter_part_finalise (GObject *obj)
{
FilterPart *fp = (FilterPart *) obj;
GList *l;
-
+
l = fp->elements;
while (l) {
g_object_unref (l->data);
l = l->next;
}
-
+
g_list_free (fp->elements);
g_free (fp->name);
g_free (fp->title);
g_free (fp->code);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -110,7 +110,7 @@ filter_part_finalise (GObject *obj)
* filter_part_new:
*
* Create a new FilterPart object.
- *
+ *
* Return value: A new #FilterPart object.
**/
FilterPart *
@@ -124,16 +124,16 @@ filter_part_validate (FilterPart *fp)
{
gboolean correct = TRUE;
GList *l;
-
+
l = fp->elements;
while (l && correct) {
FilterElement *fe = l->data;
-
+
correct = filter_element_validate (fe);
-
+
l = l->next;
}
-
+
return correct;
}
@@ -142,25 +142,25 @@ filter_part_eq (FilterPart *fp, FilterPart *fc)
{
int truth;
GList *al, *bl;
-
+
truth = ((fp->name && fc->name && strcmp(fp->name, fc->name) == 0)
|| (fp->name == NULL && fc->name == NULL))
&& ((fp->title && fc->title && strcmp(fp->title, fc->title) == 0)
|| (fp->title == NULL && fc->title == NULL))
&& ((fp->code && fc->code && strcmp(fp->code, fc->code) == 0)
|| (fp->code == NULL && fc->code == NULL));
-
+
al = fp->elements;
bl = fc->elements;
while (truth && al && bl) {
FilterElement *a = al->data, *b = bl->data;
-
+
truth = filter_element_eq(a, b);
-
+
al = al->next;
bl = bl->next;
}
-
+
return truth && al == NULL && bl == NULL;
}
@@ -170,12 +170,12 @@ filter_part_xml_create (FilterPart *ff, xmlNodePtr node, RuleContext *rc)
xmlNodePtr n;
char *type, *str;
FilterElement *el;
-
+
str = (char *)xmlGetProp (node, (const unsigned char *)"name");
ff->name = g_strdup (str);
if (str)
xmlFree (str);
-
+
n = node->children;
while (n) {
if (!strcmp ((char *)n->name, "input")) {
@@ -209,7 +209,7 @@ filter_part_xml_create (FilterPart *ff, xmlNodePtr node, RuleContext *rc)
}
n = n->next;
}
-
+
return 0;
}
@@ -219,9 +219,9 @@ filter_part_xml_encode (FilterPart *fp)
GList *l;
FilterElement *fe;
xmlNodePtr part, value;
-
+
g_return_val_if_fail (fp != NULL, NULL);
-
+
part = xmlNewNode (NULL, (const unsigned char *)"part");
xmlSetProp (part, (const unsigned char *)"name", (unsigned char *)fp->name);
l = fp->elements;
@@ -231,7 +231,7 @@ filter_part_xml_encode (FilterPart *fp)
xmlAddChild (part, value);
l = g_list_next (l);
}
-
+
return part;
}
@@ -242,10 +242,10 @@ filter_part_xml_decode (FilterPart *fp, xmlNodePtr node)
FilterElement *fe;
xmlNodePtr n;
char *name;
-
+
g_return_val_if_fail (fp != NULL, -1);
g_return_val_if_fail (node != NULL, -1);
-
+
n = node->children;
while (n) {
if (!strcmp ((char *)n->name, "value")) {
@@ -259,7 +259,7 @@ filter_part_xml_decode (FilterPart *fp, xmlNodePtr node)
}
n = n->next;
}
-
+
return 0;
}
@@ -269,7 +269,7 @@ filter_part_clone (FilterPart *fp)
FilterPart *new;
GList *l;
FilterElement *fe, *ne;
-
+
new = (FilterPart *) g_object_new (G_OBJECT_TYPE (fp), NULL, NULL);
new->name = g_strdup (fp->name);
new->title = g_strdup (fp->title);
@@ -281,7 +281,7 @@ filter_part_clone (FilterPart *fp)
new->elements = g_list_append (new->elements, ne);
l = g_list_next (l);
}
-
+
return new;
}
@@ -291,9 +291,9 @@ filter_part_copy_values (FilterPart *dst, FilterPart *src)
{
GList *dstl, *srcl, *dstt;
FilterElement *de, *se;
-
+
/* NOTE: we go backwards, it just works better that way */
-
+
/* for each source type, search the dest type for
a matching type in the same order */
srcl = g_list_last (src->elements);
@@ -310,7 +310,7 @@ filter_part_copy_values (FilterPart *dst, FilterPart *src)
}
dstt = dstt->prev;
}
-
+
srcl = srcl->prev;
}
}
@@ -320,17 +320,17 @@ filter_part_find_element (FilterPart *ff, const char *name)
{
GList *l = ff->elements;
FilterElement *fe;
-
+
if (name == NULL)
return NULL;
-
+
while (l) {
fe = l->data;
if (fe->name && !strcmp (fe->name, name))
return fe;
l = g_list_next (l);
}
-
+
return NULL;
}
@@ -342,28 +342,28 @@ filter_part_get_widget (FilterPart *ff)
GList *l = ff->elements;
FilterElement *fe;
GtkWidget *w;
-
+
hbox = gtk_hbox_new (FALSE, 3);
-
+
while (l) {
fe = l->data;
w = filter_element_get_widget (fe);
if (w)
gtk_box_pack_start (GTK_BOX (hbox), w, IS_FILTER_FILE (fe), IS_FILTER_FILE (fe), 3);
-
+
l = g_list_next (l);
}
-
+
gtk_widget_show_all (hbox);
-
+
return hbox;
}
/**
* filter_part_build_code:
- * @ff:
- * @out:
- *
+ * @ff:
+ * @out:
+ *
* Outputs the code of a part.
**/
void
@@ -371,10 +371,10 @@ filter_part_build_code (FilterPart *ff, GString *out)
{
GList *l = ff->elements;
FilterElement *fe;
-
+
if (ff->code)
filter_part_expand_code (ff, ff->code, out);
-
+
while (l) {
fe = l->data;
filter_element_build_code (fe, out, ff);
@@ -384,9 +384,9 @@ filter_part_build_code (FilterPart *ff, GString *out)
/**
* filter_part_build_code_list:
- * @l:
- * @out:
- *
+ * @l:
+ * @out:
+ *
* Construct a list of the filter parts code into
* a single string.
**/
@@ -394,7 +394,7 @@ void
filter_part_build_code_list (GList *l, GString *out)
{
FilterPart *fp;
-
+
while (l) {
fp = l->data;
filter_part_build_code (fp, out);
@@ -405,20 +405,20 @@ filter_part_build_code_list (GList *l, GString *out)
/**
* filter_part_find_list:
- * @l:
- * @name:
- *
+ * @l:
+ * @name:
+ *
* Find a filter part stored in a list.
- *
- * Return value:
+ *
+ * Return value:
**/
FilterPart *
filter_part_find_list (GList *l, const char *name)
{
FilterPart *part;
-
+
d(printf ("Find part named %s\n", name));
-
+
while (l) {
part = l->data;
if (!strcmp (part->name, name)) {
@@ -427,18 +427,18 @@ filter_part_find_list (GList *l, const char *name)
}
l = l->next;
}
-
+
return NULL;
}
/**
* filter_part_next_list:
- * @l:
+ * @l:
* @last: The last item retrieved, or NULL to start
* from the beginning of the list.
- *
+ *
* Iterate through a filter part list.
- *
+ *
* Return value: The next value in the list, or NULL if the
* list is expired.
**/
@@ -446,7 +446,7 @@ FilterPart *
filter_part_next_list (GList *l, FilterPart *last)
{
GList *node = l;
-
+
if (last != NULL) {
node = g_list_find (node, last);
if (node == NULL)
@@ -454,19 +454,19 @@ filter_part_next_list (GList *l, FilterPart *last)
else
node = node->next;
}
-
+
if (node)
return node->data;
-
+
return NULL;
}
/**
* filter_part_expand_code:
- * @ff:
- * @str:
- * @out:
- *
+ * @ff:
+ * @str:
+ * @out:
+ *
* Expands the variables in string @str based on the values of the part.
**/
void
@@ -476,7 +476,7 @@ filter_part_expand_code (FilterPart *ff, const char *source, GString *out)
char *name = alloca (32);
int len, namelen = 32;
FilterElement *fe;
-
+
start = source;
while (start && (newstart = strstr (start, "${"))
&& (end = strstr (newstart+2, "}")) ) {
@@ -513,34 +513,34 @@ int main(int argc, char **argv)
xmlNodePtr node;
FilterPart *ff;
GString *code;
-
+
gnome_init ("test", "0.0", argc, argv);
-
+
system = xmlParseFile ("form.xml");
if (system == NULL) {
printf("i/o error\n");
return 1;
}
-
+
ff = filter_part_new ();
filter_part_xml_create (ff, system->root);
-
+
w = filter_part_get_widget (ff);
-
+
dialog = gtk_dialog_new ();
gtk_dialog_add_buttons ((GtkDialog *) dialog, GTK_BUTTONS_OK, NULL);
gtk_dialog_set_has_separator ((GtkDialog *) dialog, FALSE);
gtk_window_set_title ((GtkWindow *) dialog, _("Test"));
gtk_window_set_policy ((GtkWindow *) dialog, FALSE, TRUE, FALSE);
gtk_box_pack_start ((GtkBox *) dialog->vbox, w, TRUE, TRUE, 0);
-
+
gtk_dialog_run ((GtkDialog *) dialog);
gtk_widget_destroy (dialog);
-
+
code = g_string_new ("");
filter_part_build_code (ff, code);
printf("code is:\n%s\n", code->str);
-
+
return 0;
}
#endif
diff --git a/filter/filter-part.h b/filter/filter-part.h
index 57de141d79..580cfaf29c 100644
--- a/filter/filter-part.h
+++ b/filter/filter-part.h
@@ -43,7 +43,7 @@ typedef struct _FilterPartClass FilterPartClass;
struct _FilterPart {
GObject parent_object;
struct _FilterPartPrivate *priv;
-
+
char *name;
char *title;
char *code;
@@ -52,9 +52,9 @@ struct _FilterPart {
struct _FilterPartClass {
GObjectClass parent_class;
-
+
/* virtual methods */
-
+
/* signals */
};
diff --git a/filter/filter-rule.c b/filter/filter-rule.c
index b656ee9a1b..81fb3e8861 100644
--- a/filter/filter-rule.c
+++ b/filter/filter-rule.c
@@ -67,7 +67,7 @@ GType
filter_rule_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (FilterRuleClass),
@@ -80,10 +80,10 @@ filter_rule_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) filter_rule_init,
};
-
+
type = g_type_register_static (G_TYPE_OBJECT, "FilterRule", &info, 0);
}
-
+
return type;
}
@@ -91,11 +91,11 @@ static void
filter_rule_class_init (FilterRuleClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+
parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
+
object_class->finalize = filter_rule_finalise;
-
+
/* override methods */
klass->validate = validate;
klass->eq = rule_eq;
@@ -104,7 +104,7 @@ filter_rule_class_init (FilterRuleClass *klass)
klass->build_code = build_code;
klass->copy = rule_copy;
klass->get_widget = get_widget;
-
+
/* signals */
signals[CHANGED] =
g_signal_new ("changed",
@@ -127,14 +127,14 @@ static void
filter_rule_finalise (GObject *obj)
{
FilterRule *fr = (FilterRule *) obj;
-
+
g_free (fr->name);
g_free (fr->source);
g_list_foreach (fr->parts, (GFunc)g_object_unref, NULL);
g_list_free (fr->parts);
-
+
g_free (fr->priv);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -142,7 +142,7 @@ filter_rule_finalise (GObject *obj)
* filter_rule_new:
*
* Create a new FilterRule object.
- *
+ *
* Return value: A new #FilterRule object.
**/
FilterRule *
@@ -155,12 +155,12 @@ FilterRule *
filter_rule_clone (FilterRule *base)
{
FilterRule *rule;
-
+
g_return_val_if_fail (IS_FILTER_RULE (base), NULL);
-
+
rule = g_object_new (G_OBJECT_TYPE (base), NULL, NULL);
filter_rule_copy (rule, base);
-
+
return rule;
}
@@ -168,14 +168,14 @@ void
filter_rule_set_name (FilterRule *fr, const char *name)
{
g_return_if_fail (IS_FILTER_RULE (fr));
-
+
if ((fr->name && name && strcmp (fr->name, name) == 0)
|| (fr->name == NULL && name == NULL))
return;
-
+
g_free (fr->name);
fr->name = g_strdup (name);
-
+
filter_rule_emit_changed (fr);
}
@@ -183,14 +183,14 @@ void
filter_rule_set_source (FilterRule *fr, const char *source)
{
g_return_if_fail (IS_FILTER_RULE (fr));
-
+
if ((fr->source && source && strcmp (fr->source, source) == 0)
|| (fr->source == NULL && source == NULL))
return;
-
+
g_free (fr->source);
fr->source = g_strdup (source);
-
+
filter_rule_emit_changed (fr);
}
@@ -207,17 +207,17 @@ validate (FilterRule *fr)
{
int valid = TRUE;
GList *parts;
-
+
if (!fr->name || !*fr->name) {
/* FIXME: FilterElement should probably have a
GtkWidget member pointing to the value gotten with
::get_widget() so that we can get the parent window
here. */
e_error_run(NULL, "filter:no-name", NULL);
-
+
return FALSE;
}
-
+
/* validate rule parts */
parts = fr->parts;
valid = parts != NULL;
@@ -225,7 +225,7 @@ validate (FilterRule *fr)
valid = filter_part_validate ((FilterPart *) parts->data);
parts = parts->next;
}
-
+
return valid;
}
@@ -234,7 +234,7 @@ filter_rule_eq (FilterRule *fr, FilterRule *cm)
{
g_return_val_if_fail (IS_FILTER_RULE (fr), 0);
g_return_val_if_fail (IS_FILTER_RULE (cm), 0);
-
+
return (FILTER_RULE_GET_CLASS (fr) == FILTER_RULE_GET_CLASS (cm))
&& FILTER_RULE_GET_CLASS (fr)->eq (fr, cm);
}
@@ -243,15 +243,15 @@ static int
list_eq(GList *al, GList *bl)
{
int truth = TRUE;
-
+
while (truth && al && bl) {
FilterPart *a = al->data, *b = bl->data;
-
+
truth = filter_part_eq (a, b);
al = al->next;
bl = bl->next;
}
-
+
return truth && al == NULL && bl == NULL;
}
@@ -271,7 +271,7 @@ xmlNodePtr
filter_rule_xml_encode (FilterRule *fr)
{
g_return_val_if_fail (IS_FILTER_RULE (fr), NULL);
-
+
return FILTER_RULE_GET_CLASS (fr)->xml_encode (fr);
}
@@ -280,7 +280,7 @@ xml_encode (FilterRule *fr)
{
xmlNodePtr node, set, work;
GList *l;
-
+
node = xmlNewNode (NULL, (const unsigned char *)"rule");
switch (fr->grouping) {
case FILTER_GROUP_ALL:
@@ -314,13 +314,13 @@ xml_encode (FilterRule *fr)
/* set to the default filter type */
xmlSetProp (node, (const unsigned char *)"source", (const unsigned char *)"incoming");
}
-
+
if (fr->name) {
work = xmlNewNode (NULL, (const unsigned char *)"title");
xmlNodeSetContent (work, (unsigned char *)fr->name);
xmlAddChild (node, work);
}
-
+
set = xmlNewNode (NULL, (const unsigned char *)"partset");
xmlAddChild (node, set);
l = fr->parts;
@@ -329,7 +329,7 @@ xml_encode (FilterRule *fr)
xmlAddChild (set, work);
l = l->next;
}
-
+
return node;
}
@@ -339,7 +339,7 @@ load_set (xmlNodePtr node, FilterRule *fr, RuleContext *f)
xmlNodePtr work;
char *rulename;
FilterPart *part;
-
+
work = node->children;
while (work) {
if (!strcmp ((char *)work->name, "part")) {
@@ -364,17 +364,17 @@ int
filter_rule_xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f)
{
int res;
-
+
g_return_val_if_fail (IS_FILTER_RULE (fr), 0);
g_return_val_if_fail (IS_RULE_CONTEXT (f), 0);
g_return_val_if_fail (node != NULL, 0);
-
- fr->priv->frozen++;
+
+ fr->priv->frozen++;
res = FILTER_RULE_GET_CLASS (fr)->xml_decode (fr, node, f);
fr->priv->frozen--;
-
+
filter_rule_emit_changed (fr);
-
+
return res;
}
@@ -384,12 +384,12 @@ xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f)
xmlNodePtr work;
char *grouping;
char *source;
-
+
if (fr->name) {
g_free (fr->name);
fr->name = NULL;
}
-
+
grouping = (char *)xmlGetProp (node, (const unsigned char *)"grouping");
if (!strcmp (grouping, "any"))
fr->grouping = FILTER_GROUP_ANY;
@@ -410,7 +410,7 @@ xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f)
fr->threading = FILTER_THREAD_SINGLE;
xmlFree (grouping);
}
-
+
g_free (fr->source);
source = (char *)xmlGetProp (node, (const unsigned char *)"source");
if (source) {
@@ -420,7 +420,7 @@ xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f)
/* default filter type */
fr->source = g_strdup ("incoming");
}
-
+
work = node->children;
while (work) {
if (!strcmp ((char *)work->name, "partset")) {
@@ -428,7 +428,7 @@ xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f)
} else if (!strcmp ((char *)work->name, "title") || !strcmp ((char *)work->name, "_title")) {
if (!fr->name) {
char *str, *decstr;
-
+
str = (char *)xmlNodeGetContent (work);
decstr = g_strdup (str);
if (str)
@@ -438,7 +438,7 @@ xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f)
}
work = work->next;
}
-
+
return 0;
}
@@ -446,13 +446,13 @@ static void
rule_copy (FilterRule *dest, FilterRule *src)
{
GList *node;
-
+
g_free (dest->name);
dest->name = g_strdup (src->name);
-
+
g_free (dest->source);
dest->source = g_strdup (src->source);
-
+
dest->grouping = src->grouping;
dest->threading = src->threading;
@@ -461,7 +461,7 @@ rule_copy (FilterRule *dest, FilterRule *src)
g_list_free (dest->parts);
dest->parts = NULL;
}
-
+
node = src->parts;
while (node) {
FilterPart *part;
@@ -477,9 +477,9 @@ filter_rule_copy (FilterRule *dest, FilterRule *src)
{
g_return_if_fail (IS_FILTER_RULE (dest));
g_return_if_fail (IS_FILTER_RULE (src));
-
+
FILTER_RULE_GET_CLASS (dest)->copy (dest, src);
-
+
filter_rule_emit_changed (dest);
}
@@ -488,9 +488,9 @@ filter_rule_add_part (FilterRule *fr, FilterPart *fp)
{
g_return_if_fail (IS_FILTER_RULE (fr));
g_return_if_fail (IS_FILTER_PART (fp));
-
+
fr->parts = g_list_append (fr->parts, fp);
-
+
filter_rule_emit_changed (fr);
}
@@ -499,9 +499,9 @@ filter_rule_remove_part (FilterRule *fr, FilterPart *fp)
{
g_return_if_fail (IS_FILTER_RULE (fr));
g_return_if_fail (IS_FILTER_PART (fp));
-
+
fr->parts = g_list_remove (fr->parts, fp);
-
+
filter_rule_emit_changed (fr);
}
@@ -509,18 +509,18 @@ void
filter_rule_replace_part (FilterRule *fr, FilterPart *fp, FilterPart *new)
{
GList *l;
-
+
g_return_if_fail (IS_FILTER_RULE (fr));
g_return_if_fail (IS_FILTER_PART (fp));
g_return_if_fail (IS_FILTER_PART (new));
-
+
l = g_list_find (fr->parts, fp);
if (l) {
l->data = new;
} else {
fr->parts = g_list_append (fr->parts, new);
}
-
+
filter_rule_emit_changed (fr);
}
@@ -529,9 +529,9 @@ filter_rule_build_code (FilterRule *fr, GString *out)
{
g_return_if_fail (IS_FILTER_RULE (fr));
g_return_if_fail (out != NULL);
-
+
FILTER_RULE_GET_CLASS (fr)->build_code (fr, out);
-
+
d(printf ("build_code: [%s](%d)", out->str, out->len));
}
@@ -539,7 +539,7 @@ void
filter_rule_emit_changed(FilterRule *fr)
{
g_return_if_fail (IS_FILTER_RULE (fr));
-
+
if (fr->priv->frozen == 0)
g_signal_emit (fr, signals[CHANGED], 0);
}
@@ -574,7 +574,7 @@ build_code (FilterRule *fr, GString *out)
default:
g_warning ("Invalid grouping");
}
-
+
filter_part_build_code_list (fr->parts, out);
g_string_append (out, ")\n");
@@ -606,16 +606,16 @@ option_activate (GtkMenuItem *item, struct _part_data *data)
{
FilterPart *part = g_object_get_data ((GObject *) item, "part");
FilterPart *newpart;
-
+
/* dont update if we haven't changed */
if (!strcmp (part->title, data->part->title))
return;
-
+
/* here we do a widget shuffle, throw away the old widget/rulepart,
and create another */
if (data->partwidget)
gtk_container_remove (GTK_CONTAINER (data->container), data->partwidget);
-
+
newpart = filter_part_clone (part);
filter_part_copy_values (newpart, data->part);
filter_rule_replace_part (data->fr, data->part, newpart);
@@ -624,7 +624,7 @@ 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, TRUE, TRUE, 0);
-
+
g_object_set_data ((GObject *) data->container, "part", newpart);
}
@@ -639,21 +639,21 @@ get_rule_part_widget (RuleContext *f, FilterPart *newpart, FilterRule *fr)
GtkWidget *p;
int index = 0, current = 0;
struct _part_data *data;
-
+
data = g_malloc0 (sizeof (*data));
data->fr = fr;
data->f = f;
data->part = newpart;
-
+
hbox = gtk_hbox_new (FALSE, 0);
/* only set to automatically clean up the memory */
g_object_set_data_full ((GObject *) hbox, "data", data, g_free);
-
+
p = filter_part_get_widget (newpart);
-
+
data->partwidget = p;
data->container = hbox;
-
+
menu = gtk_menu_new ();
/* sigh, this is a little ugly */
while ((part = rule_context_next_part (f, part))) {
@@ -664,21 +664,21 @@ get_rule_part_widget (RuleContext *f, FilterPart *newpart, FilterRule *fr)
gtk_widget_show (item);
if (!strcmp (newpart->title, part->title))
current = index;
-
+
index++;
}
-
+
omenu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current);
gtk_widget_show (omenu);
-
+
gtk_box_pack_start (GTK_BOX (hbox), omenu, FALSE, FALSE, 0);
if (p)
gtk_box_pack_start (GTK_BOX (hbox), p, TRUE, TRUE, 0);
-
+
gtk_widget_show_all (hbox);
-
+
return hbox;
}
@@ -693,17 +693,17 @@ less_parts (GtkWidget *button, struct _rule_data *data)
{
FilterPart *part;
GtkWidget *rule;
-
+
if (g_list_length (data->fr->parts) < 1)
return;
-
+
rule = g_object_get_data ((GObject *) button, "rule");
part = g_object_get_data ((GObject *) rule, "part");
-
+
/* remove the part from the list */
filter_rule_remove_part (data->fr, part);
g_object_unref (part);
-
+
/* and from the display */
gtk_container_remove (GTK_CONTAINER (data->parts), rule);
gtk_container_remove (GTK_CONTAINER (data->parts), button);
@@ -713,10 +713,10 @@ static void
attach_rule (GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row)
{
GtkWidget *remove;
-
+
gtk_table_attach (GTK_TABLE (data->parts), rule, 0, 1, row, row + 1,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
+
remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
g_object_set_data ((GObject *) remove, "rule", rule);
g_object_set_data ((GObject *) rule, "part", part);
@@ -724,7 +724,7 @@ attach_rule (GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row
g_signal_connect (remove, "clicked", G_CALLBACK (less_parts), data);
gtk_table_attach (GTK_TABLE (data->parts), remove, 1, 2, row, row + 1,
0, 0, 0, 0);
-
+
gtk_widget_show (remove);
}
@@ -732,28 +732,28 @@ static void
more_parts (GtkWidget *button, struct _rule_data *data)
{
FilterPart *new;
-
+
/* first make sure that the last part is ok */
if (data->fr->parts) {
FilterPart *part;
GList *l;
-
+
l = g_list_last (data->fr->parts);
part = l->data;
if (!filter_part_validate (part))
return;
}
-
+
/* create a new rule entry, use the first type of rule */
new = rule_context_next_part (data->f, NULL);
if (new) {
GtkWidget *w;
int rows;
-
+
new = filter_part_clone (new);
filter_rule_add_part (data->fr, new);
w = get_rule_part_widget (data->f, new, data->fr);
-
+
rows = GTK_TABLE (data->parts)->nrows;
gtk_table_resize (GTK_TABLE (data->parts), rows + 1, 2);
attach_rule (w, data, new, rows);
@@ -792,7 +792,7 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
FilterPart *part;
struct _rule_data *data;
int rows, i;
-
+
/* this stuff should probably be a table, but the
rule parts need to be a vbox */
vbox = gtk_vbox_new (FALSE, 6);
@@ -809,10 +809,10 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
} else {
gtk_entry_set_text (GTK_ENTRY (name), fr->name);
}
-
+
/* evil kludgy hack because gtk sucks */
g_signal_connect (name, "realize", G_CALLBACK (grab_focus), name);
-
+
hbox = gtk_hbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), name, TRUE, TRUE, 0);
@@ -843,20 +843,20 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
inframe = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), inframe, TRUE, TRUE, 0);
-
+
/* this is the parts table, it should probably be inside a scrolling list */
rows = g_list_length (fr->parts);
parts = gtk_table_new (rows, 2, FALSE);
-
+
/* data for the parts part of the display */
data = g_malloc0 (sizeof (*data));
data->f = f;
data->fr = fr;
data->parts = parts;
-
+
/* only set to automatically clean up the memory */
g_object_set_data_full ((GObject *) vbox, "data", data, g_free);
-
+
hbox = gtk_hbox_new (FALSE, 3);
add = gtk_button_new_with_mnemonic (_("A_dd Filter Criteria"));
@@ -869,19 +869,19 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
label = gtk_label_new_with_mnemonic (_("_Find items:"));
menu = gtk_menu_new ();
-
+
for (i=0;i<2;i++) {
item = gtk_menu_item_new_with_label(_(thread_types[i]));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
}
-
+
omenu = gtk_option_menu_new ();
gtk_label_set_mnemonic_widget ((GtkLabel *)label, omenu);
gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), fr->grouping);
gtk_widget_show (omenu);
-
+
gtk_box_pack_end (GTK_BOX (hbox), omenu, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
@@ -893,27 +893,27 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
label = gtk_label_new_with_mnemonic (_("I_nclude threads"));
menu = gtk_menu_new ();
-
+
for (i=0;i<5;i++) {
item = gtk_menu_item_new_with_label(_(thread_types[i]));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
}
-
+
omenu = gtk_option_menu_new ();
gtk_label_set_mnemonic_widget ((GtkLabel *)label, omenu);
gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), fr->threading);
gtk_widget_show (omenu);
-
+
gtk_box_pack_end (GTK_BOX (hbox), omenu, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
g_signal_connect(omenu, "changed", G_CALLBACK(fr_threading_changed), fr);
}
-
+
gtk_box_pack_start (GTK_BOX (inframe), hbox, FALSE, FALSE, 3);
-
+
l = fr->parts;
i = 0;
while (l) {
@@ -923,20 +923,20 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
attach_rule (w, data, part, i++);
l = g_list_next (l);
}
-
+
hadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0, 1.0, 1.0);
vadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0, 1.0, 1.0);
scrolledwindow = gtk_scrolled_window_new (GTK_ADJUSTMENT (hadj), GTK_ADJUSTMENT (vadj));
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
-
+
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledwindow), parts);
-
+
gtk_box_pack_start (GTK_BOX (inframe), scrolledwindow, TRUE, TRUE, 3);
-
+
gtk_widget_show_all (vbox);
-
+
return vbox;
}
@@ -944,7 +944,7 @@ FilterRule *
filter_rule_next_list (GList *l, FilterRule *last, const char *source)
{
GList *node = l;
-
+
if (last != NULL) {
node = g_list_find (node, last);
if (node == NULL)
@@ -952,20 +952,20 @@ filter_rule_next_list (GList *l, FilterRule *last, const char *source)
else
node = node->next;
}
-
+
if (source) {
while (node) {
FilterRule *rule = node->data;
-
+
if (rule->source && strcmp (rule->source, source) == 0)
break;
node = node->next;
}
}
-
+
if (node)
return node->data;
-
+
return NULL;
}
@@ -974,13 +974,13 @@ filter_rule_find_list (GList * l, const char *name, const char *source)
{
while (l) {
FilterRule *rule = l->data;
-
+
if (strcmp (rule->name, name) == 0)
if (source == NULL || (rule->source != NULL && strcmp (rule->source, source) == 0))
return rule;
l = l->next;
}
-
+
return NULL;
}
diff --git a/filter/filter-rule.h b/filter/filter-rule.h
index 9e30b6e84b..19c3f0941a 100644
--- a/filter/filter-rule.h
+++ b/filter/filter-rule.h
@@ -63,10 +63,10 @@ enum _filter_threading_t {
struct _FilterRule {
GObject parent_object;
struct _FilterRulePrivate *priv;
-
+
char *name;
char *source;
-
+
enum _filter_grouping_t grouping;
enum _filter_threading_t threading;
@@ -76,20 +76,20 @@ struct _FilterRule {
struct _FilterRuleClass {
GObjectClass parent_class;
-
+
/* virtual methods */
int (*validate) (FilterRule *);
int (*eq) (FilterRule *fr, FilterRule *cm);
-
+
xmlNodePtr (*xml_encode) (FilterRule *);
int (*xml_decode) (FilterRule *, xmlNodePtr, struct _RuleContext *);
-
+
void (*build_code) (FilterRule *, GString *out);
-
+
void (*copy) (FilterRule *dest, FilterRule *src);
-
+
GtkWidget *(*get_widget) (FilterRule *fr, struct _RuleContext *f);
-
+
/* signals */
void (*changed) (FilterRule *fr);
};
diff --git a/filter/rule-context.c b/filter/rule-context.c
index 55d53bc078..3cf6bbe6d2 100644
--- a/filter/rule-context.c
+++ b/filter/rule-context.c
@@ -53,7 +53,7 @@
#include "filter-rule.h"
#include "rule-context.h"
-#define d(x)
+#define d(x)
static int load(RuleContext *rc, const char *system, const char *user);
static int save(RuleContext *rc, const char *user);
@@ -88,7 +88,7 @@ GType
rule_context_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(RuleContextClass),
@@ -101,10 +101,10 @@ rule_context_get_type(void)
0, /* n_preallocs */
(GInstanceInitFunc) rule_context_init,
};
-
+
type = g_type_register_static(G_TYPE_OBJECT, "RuleContext", &info, 0);
}
-
+
return type;
}
@@ -112,11 +112,11 @@ static void
rule_context_class_init(RuleContextClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
-
+
parent_class = g_type_class_ref(G_TYPE_OBJECT);
-
+
object_class->finalize = rule_context_finalise;
-
+
/* override methods */
klass->load = load;
klass->save = save;
@@ -135,7 +135,7 @@ rule_context_class_init(RuleContextClass *klass)
NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
-
+
signals[RULE_REMOVED] =
g_signal_new("rule_removed",
RULE_TYPE_CONTEXT,
@@ -145,7 +145,7 @@ rule_context_class_init(RuleContextClass *klass)
NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
-
+
signals[CHANGED] =
g_signal_new("changed",
RULE_TYPE_CONTEXT,
@@ -161,7 +161,7 @@ static void
rule_context_init(RuleContext *rc)
{
rc->priv = g_malloc0(sizeof(*rc->priv));
-
+
rc->part_set_map = g_hash_table_new(g_str_hash, g_str_equal);
rc->rule_set_map = g_hash_table_new(g_str_hash, g_str_equal);
@@ -186,24 +186,24 @@ static void
rule_context_finalise(GObject *obj)
{
RuleContext *rc =(RuleContext *) obj;
-
+
g_list_foreach(rc->rule_set_list, (GFunc)free_rule_set, NULL);
g_list_free(rc->rule_set_list);
g_hash_table_destroy(rc->rule_set_map);
-
+
g_list_foreach(rc->part_set_list, (GFunc)free_part_set, NULL);
g_list_free(rc->part_set_list);
g_hash_table_destroy(rc->part_set_map);
-
+
g_free(rc->error);
-
+
g_list_foreach(rc->parts, (GFunc)g_object_unref, NULL);
g_list_free(rc->parts);
g_list_foreach(rc->rules, (GFunc)g_object_unref, NULL);
g_list_free(rc->rules);
g_free(rc->priv);
-
+
G_OBJECT_CLASS(parent_class)->finalize(obj);
}
@@ -211,7 +211,7 @@ rule_context_finalise(GObject *obj)
* rule_context_new:
*
* Create a new RuleContext object.
- *
+ *
* Return value: A new #RuleContext object.
**/
RuleContext *
@@ -224,9 +224,9 @@ void
rule_context_add_part_set(RuleContext *rc, const char *setname, GType part_type, RCPartFunc append, RCNextPartFunc next)
{
struct _part_set_map *map;
-
+
g_return_if_fail (g_hash_table_lookup(rc->part_set_map, setname) == NULL);
-
+
map = g_malloc0(sizeof(*map));
map->type = part_type;
map->append = append;
@@ -241,9 +241,9 @@ void
rule_context_add_rule_set(RuleContext *rc, const char *setname, GType rule_type, RCRuleFunc append, RCNextRuleFunc next)
{
struct _rule_set_map *map;
-
+
g_return_if_fail (g_hash_table_lookup(rc->rule_set_map, setname) == NULL);
-
+
map = g_malloc0(sizeof(*map));
map->type = rule_type;
map->append = append;
@@ -256,43 +256,43 @@ rule_context_add_rule_set(RuleContext *rc, const char *setname, GType rule_type,
/**
* rule_context_set_error:
- * @f:
- * @error:
- *
+ * @f:
+ * @error:
+ *
* Set the text error for the context, or NULL to clear it.
**/
static void
rule_context_set_error(RuleContext *rc, char *error)
{
g_return_if_fail (rc);
-
+
g_free(rc->error);
rc->error = error;
}
/**
* rule_context_load:
- * @f:
- * @system:
- * @user:
+ * @f:
+ * @system:
+ * @user:
*
* Load a rule context from a system and user description file.
- *
- * Return value:
+ *
+ * Return value:
**/
int
rule_context_load(RuleContext *rc, const char *system, const char *user)
{
int res;
-
+
g_return_val_if_fail (rc, -1);
-
+
d(printf("rule_context: loading %s %s\n", system, user));
-
+
rc->priv->frozen++;
res = RULE_CONTEXT_GET_CLASS(rc)->load(rc, system, user);
rc->priv->frozen--;
-
+
return res;
}
@@ -305,9 +305,9 @@ load(RuleContext *rc, const char *system, const char *user)
struct _rule_set_map *rule_map;
rule_context_set_error(rc, NULL);
-
+
d(printf("loading rules %s %s\n", system, user));
-
+
systemdoc = e_xml_parse_file (system);
if (systemdoc == NULL) {
rule_context_set_error(rc, g_strdup_printf("Unable to load system rules '%s': %s",
@@ -338,7 +338,7 @@ load(RuleContext *rc, const char *system, const char *user)
while (rule) {
if (!strcmp((char *)rule->name, "part")) {
FilterPart *part = FILTER_PART(g_object_new(part_map->type, NULL, NULL));
-
+
if (filter_part_xml_create(part, rule, rc) == 0) {
part_map->append(rc, part);
} else {
@@ -355,7 +355,7 @@ load(RuleContext *rc, const char *system, const char *user)
d(printf("checking node: %s\n", rule->name));
if (!strcmp((char *)rule->name, "rule")) {
FilterRule *part = FILTER_RULE(g_object_new(rule_map->type, NULL, NULL));
-
+
if (filter_rule_xml_decode(part, rule, rc) == 0) {
part->system = TRUE;
rule_map->append(rc, part);
@@ -369,7 +369,7 @@ load(RuleContext *rc, const char *system, const char *user)
}
set = set->next;
}
-
+
/* now load actual rules */
if (userdoc) {
root = xmlDocGetRootElement(userdoc);
@@ -384,7 +384,7 @@ load(RuleContext *rc, const char *system, const char *user)
d(printf("checking node: %s\n", rule->name));
if (!strcmp((char *)rule->name, "rule")) {
FilterRule *part = FILTER_RULE(g_object_new(rule_map->type, NULL, NULL));
-
+
if (filter_rule_xml_decode(part, rule, rc) == 0) {
rule_map->append(rc, part);
} else {
@@ -401,25 +401,25 @@ load(RuleContext *rc, const char *system, const char *user)
xmlFreeDoc(userdoc);
xmlFreeDoc(systemdoc);
-
+
return 0;
}
/**
* rule_context_save:
- * @f:
- * @user:
- *
+ * @f:
+ * @user:
+ *
* Save a rule context to disk.
- *
- * Return value:
+ *
+ * Return value:
**/
int
rule_context_save(RuleContext *rc, const char *user)
{
g_return_val_if_fail (rc, -1);
g_return_val_if_fail (user, -1);
-
+
return RULE_CONTEXT_GET_CLASS(rc)->save(rc, user);
}
@@ -432,7 +432,7 @@ save(RuleContext *rc, const char *user)
FilterRule *rule;
struct _rule_set_map *map;
int ret;
-
+
doc = xmlNewDoc((const unsigned char *)"1.0");
/* FIXME: set character encoding to UTF-8? */
root = xmlNewDocNode(doc, NULL, (const unsigned char *)"filteroptions", NULL);
@@ -452,31 +452,31 @@ save(RuleContext *rc, const char *user)
}
l = g_list_next(l);
}
-
+
ret = e_xml_save_file(user, doc);
-
+
xmlFreeDoc(doc);
-
+
return ret;
}
/**
* rule_context_revert:
- * @f:
- * @user:
+ * @f:
+ * @user:
*
* Reverts a rule context from a user description file. Assumes the
* system description file is unchanged from when it was loaded.
- *
- * Return value:
+ *
+ * Return value:
**/
int
rule_context_revert(RuleContext *rc, const char *user)
{
g_return_val_if_fail (rc, 0);
-
+
d(printf("rule_context: restoring %s\n", user));
-
+
return RULE_CONTEXT_GET_CLASS(rc)->revert(rc, user);
}
@@ -525,18 +525,18 @@ revert(RuleContext *rc, const char *user)
GHashTable *source_hash;
xmlDocPtr userdoc;
FilterRule *frule;
-
+
rule_context_set_error(rc, NULL);
-
+
d(printf("restoring rules %s\n", user));
-
+
userdoc = e_xml_parse_file (user);
if (userdoc == NULL)
/* clear out anythign we have? */
return 0;
-
+
source_hash = g_hash_table_new((GHashFunc)source_hashf, (GCompareFunc)source_eqf);
-
+
/* setup stuff we have now */
/* Note that we assume there is only 1 set of rules in a given rule context,
although other parts of the code dont assume this */
@@ -550,7 +550,7 @@ revert(RuleContext *rc, const char *user)
}
g_hash_table_insert(rest_data->rules, frule->name, frule);
}
-
+
/* make what we have, match what we load */
set = xmlDocGetRootElement(userdoc);
set = set?set->children:NULL;
@@ -564,7 +564,7 @@ revert(RuleContext *rc, const char *user)
d(printf("checking node: %s\n", rule->name));
if (!strcmp((char *)rule->name, "rule")) {
FilterRule *part = FILTER_RULE(g_object_new(rule_map->type, NULL, NULL));
-
+
if (filter_rule_xml_decode(part, rule, rc) == 0) {
/* use the revert data to keep track of the right rank of this rule part */
rest_data = g_hash_table_lookup(source_hash, part->source);
@@ -577,7 +577,7 @@ revert(RuleContext *rc, const char *user)
if (frule) {
if (rc->priv->frozen == 0 && !filter_rule_eq(frule, part))
filter_rule_copy(frule, part);
-
+
g_object_unref(part);
rule_context_rank_rule(rc, frule, frule->source, rest_data->rank);
g_hash_table_remove(rest_data->rules, frule->name);
@@ -596,13 +596,13 @@ revert(RuleContext *rc, const char *user)
}
set = set->next;
}
-
+
xmlFreeDoc(userdoc);
-
+
/* remove any we still have that weren't in the file */
g_hash_table_foreach(source_hash, (GHFunc)revert_source_remove, rc);
g_hash_table_destroy(source_hash);
-
+
return 0;
}
@@ -611,7 +611,7 @@ rule_context_find_part(RuleContext *rc, const char *name)
{
g_return_val_if_fail (rc, NULL);
g_return_val_if_fail (name, NULL);
-
+
d(printf("find part : "));
return filter_part_find_list(rc->parts, name);
}
@@ -620,13 +620,13 @@ FilterPart *
rule_context_create_part(RuleContext *rc, const char *name)
{
FilterPart *part;
-
+
g_return_val_if_fail (rc, NULL);
g_return_val_if_fail (name, NULL);
-
+
if ((part = rule_context_find_part(rc, name)))
return filter_part_clone(part);
-
+
return NULL;
}
@@ -634,7 +634,7 @@ FilterPart *
rule_context_next_part(RuleContext *rc, FilterPart *last)
{
g_return_val_if_fail (rc, NULL);
-
+
return filter_part_next_list(rc->parts, last);
}
@@ -642,7 +642,7 @@ FilterRule *
rule_context_next_rule(RuleContext *rc, FilterRule *last, const char *source)
{
g_return_val_if_fail (rc, NULL);
-
+
return filter_rule_next_list(rc->rules, last, source);
}
@@ -651,7 +651,7 @@ rule_context_find_rule(RuleContext *rc, const char *name, const char *source)
{
g_return_val_if_fail (name, NULL);
g_return_val_if_fail (rc, NULL);
-
+
return filter_rule_find_list(rc->rules, name, source);
}
@@ -660,7 +660,7 @@ rule_context_add_part(RuleContext *rc, FilterPart *part)
{
g_return_if_fail (rc);
g_return_if_fail (part);
-
+
rc->parts = g_list_append(rc->parts, part);
}
@@ -669,11 +669,11 @@ rule_context_add_rule(RuleContext *rc, FilterRule *new)
{
g_return_if_fail (rc);
g_return_if_fail (new);
-
+
d(printf("add rule '%s'\n", new->name));
-
+
rc->rules = g_list_append(rc->rules, new);
-
+
if (rc->priv->frozen == 0) {
g_signal_emit(rc, signals[RULE_ADDED], 0, new);
g_signal_emit(rc, signals[CHANGED], 0);
@@ -686,7 +686,7 @@ new_rule_response(GtkWidget *dialog, int button, RuleContext *context)
if (button == GTK_RESPONSE_OK) {
FilterRule *rule = g_object_get_data((GObject *) dialog, "rule");
char *user = g_object_get_data((GObject *) dialog, "path");
-
+
if (!filter_rule_validate(rule)) {
/* no need to popup a dialog because the validate code does that. */
return;
@@ -697,13 +697,13 @@ new_rule_response(GtkWidget *dialog, int button, RuleContext *context)
return;
}
-
+
g_object_ref(rule);
rule_context_add_rule(context, rule);
if (user)
rule_context_save(context, user);
}
-
+
gtk_widget_destroy(dialog);
}
@@ -713,38 +713,38 @@ rule_context_add_rule_gui(RuleContext *rc, FilterRule *rule, const char *title,
{
GtkDialog *dialog;
GtkWidget *widget;
-
+
d(printf("add rule gui '%s'\n", rule->name));
-
+
g_return_if_fail (rc);
g_return_if_fail (rule);
-
+
widget = filter_rule_get_widget(rule, rc);
gtk_widget_show(widget);
-
+
dialog =(GtkDialog *) gtk_dialog_new();
gtk_dialog_add_buttons(dialog,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_has_separator (dialog, FALSE);
-
+
gtk_window_set_title((GtkWindow *) dialog, title);
gtk_window_set_default_size((GtkWindow *) dialog, 600, 400);
gtk_window_set_resizable((GtkWindow *) dialog, TRUE);
-
+
gtk_box_pack_start((GtkBox *) dialog->vbox, widget, TRUE, TRUE, 0);
-
+
g_object_set_data_full((GObject *) dialog, "rule", rule, g_object_unref);
if (path)
g_object_set_data_full((GObject *) dialog, "path", g_strdup(path), g_free);
-
+
g_signal_connect(dialog, "response", G_CALLBACK(new_rule_response), rc);
-
+
g_object_ref(rc);
-
+
g_object_set_data_full((GObject *) dialog, "context", rc, g_object_unref);
-
+
gtk_widget_show((GtkWidget *) dialog);
}
@@ -753,11 +753,11 @@ rule_context_remove_rule(RuleContext *rc, FilterRule *rule)
{
g_return_if_fail (rc);
g_return_if_fail (rule);
-
+
d(printf("remove rule '%s'\n", rule->name));
-
+
rc->rules = g_list_remove(rc->rules, rule);
-
+
if (rc->priv->frozen == 0) {
g_signal_emit(rc, signals[RULE_REMOVED], 0, rule);
g_signal_emit(rc, signals[CHANGED], 0);
@@ -769,33 +769,33 @@ rule_context_rank_rule(RuleContext *rc, FilterRule *rule, const char *source, in
{
GList *node;
int i = 0, index = 0;
-
+
g_return_if_fail (rc);
g_return_if_fail (rule);
-
+
if (rule_context_get_rank_rule (rc, rule, source) == rank)
return;
-
+
rc->rules = g_list_remove(rc->rules, rule);
node = rc->rules;
while (node) {
FilterRule *r = node->data;
-
+
if (i == rank) {
rc->rules = g_list_insert(rc->rules, rule, index);
if (rc->priv->frozen == 0)
g_signal_emit(rc, signals[CHANGED], 0);
-
+
return;
}
-
- index++;
+
+ index++;
if (source == NULL || (r->source && strcmp(r->source, source) == 0))
i++;
-
+
node = node->next;
}
-
+
rc->rules = g_list_append(rc->rules, rule);
if (rc->priv->frozen == 0)
g_signal_emit(rc, signals[CHANGED], 0);
@@ -806,27 +806,27 @@ rule_context_get_rank_rule(RuleContext *rc, FilterRule *rule, const char *source
{
GList *node;
int i = 0;
-
+
g_return_val_if_fail (rc, -1);
g_return_val_if_fail (rule, -1);
-
+
d(printf("getting rank of rule '%s'\n", rule->name));
-
+
node = rc->rules;
while (node) {
FilterRule *r = node->data;
-
+
d(printf(" checking against rule '%s' rank '%d'\n", r->name, i));
-
+
if (r == rule)
return i;
-
+
if (source == NULL || (r->source && strcmp(r->source, source) == 0))
i++;
-
+
node = node->next;
}
-
+
return -1;
}
@@ -835,26 +835,26 @@ rule_context_find_rank_rule(RuleContext *rc, int rank, const char *source)
{
GList *node;
int i = 0;
-
+
g_return_val_if_fail (rc, NULL);
-
+
d(printf("getting rule at rank %d source '%s'\n", rank, source?source:"<any>"));
-
+
node = rc->rules;
while (node) {
FilterRule *r = node->data;
-
+
d(printf(" checking against rule '%s' rank '%d'\n", r->name, i));
-
+
if (source == NULL || (r->source && strcmp(r->source, source) == 0)) {
if (rank == i)
return r;
i++;
}
-
+
node = node->next;
}
-
+
return NULL;
}
@@ -886,9 +886,9 @@ void
rule_context_free_uri_list(RuleContext *rc, GList *uris)
{
GList *l = uris, *n;
-
+
/* TODO: should be virtual */
-
+
while (l) {
n = l->next;
g_free(l->data);
@@ -934,12 +934,12 @@ new_element(RuleContext *rc, const char *type)
/**
* rule_context_new_element:
- * @rc:
- * @name:
- *
+ * @rc:
+ * @name:
+ *
* create a new filter element based on name.
- *
- * Return value:
+ *
+ * Return value:
**/
FilterElement *
rule_context_new_element(RuleContext *rc, const char *name)
diff --git a/filter/rule-context.h b/filter/rule-context.h
index c65990d97e..14da2806fd 100644
--- a/filter/rule-context.h
+++ b/filter/rule-context.h
@@ -50,14 +50,14 @@ enum {
struct _RuleContext {
GObject parent_object;
struct _RuleContextPrivate *priv;
-
+
char *error; /* string version of error */
guint32 flags; /* capability flags */
GList *parts;
GList *rules;
-
+
GHashTable *part_set_map; /* map set types to part types */
GList *part_set_list;
GHashTable *rule_set_map; /* map set types to rule types */
@@ -73,12 +73,12 @@ struct _RuleContextClass {
int (*load) (RuleContext *rc, const char *system, const char *user);
int (*save) (RuleContext *rc, const char *user);
int (*revert) (RuleContext *rc, const char *user);
-
+
GList *(*delete_uri) (RuleContext *rc, const char *uri, GCompareFunc cmp);
GList *(*rename_uri) (RuleContext *rc, const char *olduri, const char *newuri, GCompareFunc cmp);
FilterElement *(*new_element)(RuleContext *rc, const char *name);
-
+
/* signals */
void (*rule_added) (RuleContext *rc, FilterRule *rule);
void (*rule_removed) (RuleContext *rc, FilterRule *rule);
diff --git a/filter/rule-editor.c b/filter/rule-editor.c
index 8320399618..fac0f6ba4c 100644
--- a/filter/rule-editor.c
+++ b/filter/rule-editor.c
@@ -76,7 +76,7 @@ GtkType
rule_editor_get_type (void)
{
static GtkType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (RuleEditorClass),
@@ -89,13 +89,13 @@ rule_editor_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) rule_editor_init,
};
-
+
/* TODO: Remove when it works (or never will) */
enable_undo = getenv ("EVOLUTION_RULE_UNDO") != NULL;
-
+
type = g_type_register_static (gtk_dialog_get_type (), "RuleEditor", &info, 0);
}
-
+
return type;
}
@@ -104,12 +104,12 @@ rule_editor_class_init (RuleEditorClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkObjectClass *object_class = (GtkObjectClass *) klass;
-
+
parent_class = g_type_class_ref(gtk_dialog_get_type ());
-
+
gobject_class->finalize = rule_editor_finalise;
object_class->destroy = rule_editor_destroy;
-
+
/* override methods */
klass->set_source = set_source;
klass->set_sensitive = set_sensitive;
@@ -127,10 +127,10 @@ rule_editor_finalise (GObject *obj)
{
RuleEditor *re = (RuleEditor *)obj;
RuleEditorUndo *undo, *next;
-
+
g_object_unref (re->context);
g_free (re->priv);
-
+
undo = re->undo_log;
while (undo) {
next = undo->next;
@@ -138,7 +138,7 @@ rule_editor_finalise (GObject *obj)
g_free (undo);
undo = next;
}
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -146,12 +146,12 @@ static void
rule_editor_destroy (GtkObject *obj)
{
RuleEditor *re = (RuleEditor *) obj;
-
+
if (re->dialog) {
gtk_widget_destroy (GTK_WIDGET (re->dialog));
re->dialog = NULL;
}
-
+
((GtkObjectClass *)(parent_class))->destroy (obj);
}
@@ -159,7 +159,7 @@ rule_editor_destroy (GtkObject *obj)
* rule_editor_new:
*
* Create a new RuleEditor object.
- *
+ *
* Return value: A new #RuleEditor object.
**/
RuleEditor *
@@ -170,13 +170,13 @@ rule_editor_new (RuleContext *rc, const char *source, const char *label)
char *filter_glade = g_build_filename (EVOLUTION_GLADEDIR,
"filter.glade",
NULL);
-
+
gui = glade_xml_new (filter_glade, "rule_editor", NULL);
g_free (filter_glade);
rule_editor_construct (re, rc, gui, source, label);
- gtk_widget_hide(glade_xml_get_widget (gui, "filter_source"));
+ gtk_widget_hide(glade_xml_get_widget (gui, "filter_source"));
g_object_unref (gui);
-
+
return re;
}
@@ -206,11 +206,11 @@ create_rule (RuleEditor *re)
{
FilterRule *rule = filter_rule_new ();
FilterPart *part;
-
+
/* create a rule with 1 part in it */
part = rule_context_next_part (re->context, NULL);
filter_rule_add_part (rule, filter_part_clone (part));
-
+
return rule;
}
@@ -221,9 +221,9 @@ editor_destroy (RuleEditor *re, GObject *deadbeef)
g_object_unref (re->edit);
re->edit = NULL;
}
-
+
re->dialog = NULL;
-
+
gtk_widget_set_sensitive (GTK_WIDGET (re), TRUE);
rule_editor_set_sensitive (re);
}
@@ -252,7 +252,7 @@ rule_editor_play_undo (RuleEditor *re)
{
RuleEditorUndo *undo, *next;
FilterRule *rule;
-
+
re->undo_active = TRUE;
undo = re->undo_log;
re->undo_log = NULL;
@@ -288,7 +288,7 @@ rule_editor_play_undo (RuleEditor *re)
rule_context_rank_rule (re->context, rule, re->source, undo->rank);
break;
}
-
+
g_object_unref (undo->rule);
g_free (undo);
undo = next;
@@ -304,7 +304,7 @@ editor_response (GtkWidget *dialog, int button, RuleEditor *re)
rule_editor_play_undo (re);
else {
RuleEditorUndo *undo, *next;
-
+
undo = re->undo_log;
re->undo_log = NULL;
while (undo) {
@@ -323,38 +323,38 @@ add_editor_response (GtkWidget *dialog, int button, RuleEditor *re)
GtkTreeSelection *selection;
GtkTreePath *path;
GtkTreeIter iter;
-
+
if (button == GTK_RESPONSE_OK) {
if (!filter_rule_validate (re->edit)) {
/* no need to popup a dialog because the validate code does that. */
return;
}
-
+
if (rule_context_find_rule (re->context, re->edit->name, re->edit->source)) {
e_error_run((GtkWindow *)dialog, "filter:bad-name-notunique", re->edit->name, NULL);
return;
}
-
+
g_object_ref (re->edit);
-
+
gtk_list_store_append (re->model, &iter);
gtk_list_store_set (re->model, &iter, 0, re->edit->name, 1, re->edit, -1);
selection = gtk_tree_view_get_selection (re->list);
gtk_tree_selection_select_iter (selection, &iter);
-
+
/* scroll to the newly added row */
path = gtk_tree_model_get_path ((GtkTreeModel *) re->model, &iter);
gtk_tree_view_scroll_to_cell (re->list, path, NULL, TRUE, 1.0, 0.0);
gtk_tree_path_free (path);
-
+
re->current = re->edit;
rule_context_add_rule (re->context, re->current);
-
+
g_object_ref (re->current);
rule_editor_add_undo (re, RULE_EDITOR_LOG_ADD, re->current,
rule_context_get_rank_rule (re->context, re->current, re->current->source), 0);
}
-
+
gtk_widget_destroy (dialog);
}
@@ -362,29 +362,29 @@ static void
rule_add (GtkWidget *widget, RuleEditor *re)
{
GtkWidget *rules;
-
+
if (re->edit != NULL)
return;
-
+
re->edit = rule_editor_create_rule (re);
filter_rule_set_source (re->edit, re->source);
rules = filter_rule_get_widget (re->edit, re->context);
-
+
re->dialog = gtk_dialog_new ();
gtk_dialog_add_buttons ((GtkDialog *) re->dialog,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_has_separator ((GtkDialog *) re->dialog, FALSE);
-
+
gtk_window_set_title ((GtkWindow *) re->dialog, _("Add Rule"));
gtk_window_set_default_size (GTK_WINDOW (re->dialog), 650, 400);
gtk_window_set_resizable (GTK_WINDOW (re->dialog), TRUE);
gtk_window_set_transient_for ((GtkWindow *) re->dialog, (GtkWindow *) re);
gtk_container_set_border_width ((GtkContainer *) re->dialog, 6);
-
+
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (re->dialog)->vbox), rules, TRUE, TRUE, 3);
-
+
g_signal_connect (re->dialog, "response", G_CALLBACK (add_editor_response), re);
g_object_weak_ref ((GObject *) re->dialog, (GWeakNotify) editor_destroy, re);
@@ -392,7 +392,7 @@ rule_add (GtkWidget *widget, RuleEditor *re)
dialog_rule_changed (re->edit, re->dialog);
gtk_widget_set_sensitive (GTK_WIDGET (re), FALSE);
-
+
gtk_widget_show (re->dialog);
}
@@ -403,37 +403,37 @@ edit_editor_response (GtkWidget *dialog, int button, RuleEditor *re)
GtkTreePath *path;
GtkTreeIter iter;
int pos;
-
+
if (button == GTK_RESPONSE_OK) {
if (!filter_rule_validate (re->edit)) {
/* no need to popup a dialog because the validate code does that. */
return;
}
-
+
rule = rule_context_find_rule (re->context, re->edit->name, re->edit->source);
if (rule != NULL && rule != re->current) {
e_error_run((GtkWindow *)dialog, "filter:bad-name-notunique", rule->name, NULL);
-
+
return;
}
-
+
pos = rule_context_get_rank_rule (re->context, re->current, re->source);
if (pos != -1) {
path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, pos);
gtk_tree_model_get_iter (GTK_TREE_MODEL (re->model), &iter, path);
gtk_tree_path_free (path);
-
+
gtk_list_store_set (re->model, &iter, 0, re->edit->name, -1);
-
+
rule_editor_add_undo (re, RULE_EDITOR_LOG_EDIT, filter_rule_clone (re->current),
pos, 0);
-
+
/* replace the old rule with the new rule */
filter_rule_copy (re->current, re->edit);
}
}
-
+
gtk_widget_destroy (dialog);
}
@@ -441,29 +441,29 @@ static void
rule_edit (GtkWidget *widget, RuleEditor *re)
{
GtkWidget *rules;
-
+
if (re->current == NULL || re->edit != NULL)
return;
-
+
re->edit = filter_rule_clone (re->current);
-
+
rules = filter_rule_get_widget (re->edit, re->context);
-
+
re->dialog = gtk_dialog_new ();
gtk_dialog_add_buttons ((GtkDialog *) re->dialog,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_has_separator ((GtkDialog *) re->dialog, FALSE);
-
+
gtk_window_set_title ((GtkWindow *) re->dialog, _("Edit Rule"));
gtk_window_set_default_size (GTK_WINDOW (re->dialog), 650, 400);
gtk_window_set_resizable (GTK_WINDOW (re->dialog), TRUE);
gtk_widget_set_parent_window (GTK_WIDGET (re->dialog), GTK_WIDGET (re)->window);
gtk_container_set_border_width ((GtkContainer *) re->dialog, 6);
-
+
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (re->dialog)->vbox), rules, TRUE, TRUE, 3);
-
+
g_signal_connect (re->dialog, "response", G_CALLBACK (edit_editor_response), re);
g_object_weak_ref ((GObject *) re->dialog, (GWeakNotify) editor_destroy, re);
@@ -471,7 +471,7 @@ rule_edit (GtkWidget *widget, RuleEditor *re)
dialog_rule_changed (re->edit, re->dialog);
gtk_widget_set_sensitive (GTK_WIDGET (re), FALSE);
-
+
gtk_widget_show (re->dialog);
}
@@ -482,50 +482,50 @@ rule_delete (GtkWidget *widget, RuleEditor *re)
GtkTreePath *path;
GtkTreeIter iter;
int pos, len;
-
+
d(printf ("delete rule\n"));
pos = rule_context_get_rank_rule (re->context, re->current, re->source);
if (pos != -1) {
rule_context_remove_rule (re->context, re->current);
-
+
path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, pos);
gtk_tree_model_get_iter (GTK_TREE_MODEL (re->model), &iter, path);
gtk_list_store_remove (re->model, &iter);
gtk_tree_path_free (path);
-
+
rule_editor_add_undo (re, RULE_EDITOR_LOG_REMOVE, re->current,
rule_context_get_rank_rule (re->context, re->current, re->current->source), 0);
-#if 0
+#if 0
g_object_unref (re->current);
#endif
re->current = NULL;
-
+
/* now select the next rule */
len = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (re->model), NULL);
pos = pos >= len ? len - 1 : pos;
-
+
if (pos >= 0) {
path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, pos);
gtk_tree_model_get_iter (GTK_TREE_MODEL (re->model), &iter, path);
gtk_tree_path_free (path);
-
+
/* select the new row */
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (re->list));
gtk_tree_selection_select_iter (selection, &iter);
-
+
/* scroll to the selected row */
path = gtk_tree_model_get_path ((GtkTreeModel *) re->model, &iter);
gtk_tree_view_scroll_to_cell (re->list, path, NULL, FALSE, 0.0, 0.0);
gtk_tree_path_free (path);
-
+
/* update our selection state */
cursor_changed (re->list, re);
return;
}
}
-
+
rule_editor_set_sensitive (re);
}
@@ -536,38 +536,38 @@ rule_move (RuleEditor *re, int from, int to)
GtkTreePath *path;
GtkTreeIter iter;
FilterRule *rule;
-
+
g_object_ref (re->current);
rule_editor_add_undo (re, RULE_EDITOR_LOG_RANK, re->current,
rule_context_get_rank_rule (re->context, re->current, re->source), to);
-
+
d(printf ("moving %d to %d\n", from, to));
rule_context_rank_rule (re->context, re->current, re->source, to);
-
+
path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, from);
gtk_tree_model_get_iter (GTK_TREE_MODEL (re->model), &iter, path);
gtk_tree_path_free (path);
-
+
gtk_tree_model_get (GTK_TREE_MODEL (re->model), &iter, 1, &rule, -1);
g_return_if_fail (rule != NULL);
-
+
/* remove and then re-insert the row at the new location */
gtk_list_store_remove (re->model, &iter);
gtk_list_store_insert (re->model, &iter, to);
-
+
/* set the data on the row */
gtk_list_store_set (re->model, &iter, 0, rule->name, 1, rule, -1);
-
+
/* select the row */
selection = gtk_tree_view_get_selection (re->list);
gtk_tree_selection_select_iter (selection, &iter);
-
+
/* scroll to the selected row */
path = gtk_tree_model_get_path ((GtkTreeModel *) re->model, &iter);
gtk_tree_view_scroll_to_cell (re->list, path, NULL, FALSE, 0.0, 0.0);
gtk_tree_path_free (path);
-
+
rule_editor_set_sensitive (re);
}
@@ -586,7 +586,7 @@ static void
rule_up (GtkWidget *widget, RuleEditor *re)
{
int pos;
-
+
d(printf ("up rule\n"));
pos = rule_context_get_rank_rule (re->context, re->current, re->source);
if (pos > 0)
@@ -597,7 +597,7 @@ static void
rule_down (GtkWidget *widget, RuleEditor *re)
{
int pos;
-
+
d(printf ("down rule\n"));
pos = rule_context_get_rank_rule (re->context, re->current, re->source);
if (pos >= 0)
@@ -642,17 +642,17 @@ set_sensitive (RuleEditor *re)
{
FilterRule *rule = NULL;
int index = -1, count = 0;
-
+
while ((rule = rule_context_next_rule (re->context, rule, re->source))) {
if (rule == re->current)
index = count;
count++;
}
-
+
d(printf("index = %d count=%d\n", index, count));
-
+
count--;
-
+
gtk_widget_set_sensitive (GTK_WIDGET (re->priv->buttons[BUTTON_EDIT]), index != -1);
gtk_widget_set_sensitive (GTK_WIDGET (re->priv->buttons[BUTTON_DELETE]), index != -1);
gtk_widget_set_sensitive (GTK_WIDGET (re->priv->buttons[BUTTON_TOP]), index > 0);
@@ -675,13 +675,13 @@ cursor_changed (GtkTreeView *treeview, RuleEditor *re)
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
-
+
selection = gtk_tree_view_get_selection (re->list);
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
gtk_tree_model_get (GTK_TREE_MODEL (re->model), &iter, 1, &re->current, -1);
-
+
g_return_if_fail (re->current);
-
+
rule_editor_set_sensitive (re);
}
}
@@ -692,9 +692,9 @@ double_click (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *colum
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
-
+
selection = gtk_tree_view_get_selection (re->list);
- if (gtk_tree_selection_get_selected (selection, &model, &iter))
+ if (gtk_tree_selection_get_selected (selection, &model, &iter))
gtk_tree_model_get (GTK_TREE_MODEL (re->model), &iter, 1, &re->current, -1);
if (re->current)
@@ -706,16 +706,16 @@ set_source (RuleEditor *re, const char *source)
{
FilterRule *rule = NULL;
GtkTreeIter iter;
-
+
gtk_list_store_clear (re->model);
-
+
d(printf("Checking for rules that are of type %s\n", source ? source : "<nil>"));
while ((rule = rule_context_next_rule (re->context, rule, source)) != NULL) {
d(printf("Adding row '%s'\n", rule->name));
gtk_list_store_append (re->model, &iter);
gtk_list_store_set (re->model, &iter, 0, rule->name, 1, rule, -1);
}
-
+
g_free (re->source);
re->source = g_strdup (source);
re->current = NULL;
@@ -732,34 +732,34 @@ rule_editor_treeview_new (char *widget_name, char *string1, char *string2, int i
GtkTreeSelection *selection;
GtkCellRenderer *renderer;
GtkListStore *model;
-
+
scrolled = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled), GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
+
model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
table = gtk_tree_view_new_with_model ((GtkTreeModel *) model);
gtk_tree_view_set_headers_visible ((GtkTreeView *) table, FALSE);
-
+
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes ((GtkTreeView *) table, -1,
_("Rule name"), renderer,
"text", 0, NULL);
-
+
selection = gtk_tree_view_get_selection ((GtkTreeView *) table);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
-
+
gtk_container_add (GTK_CONTAINER (scrolled), table);
-
+
g_object_set_data ((GObject *) scrolled, "table", table);
g_object_set_data ((GObject *) scrolled, "model", model);
-
+
gtk_widget_show (scrolled);
gtk_widget_show (table);
g_object_unref (model);
-
+
return scrolled;
}
@@ -769,10 +769,10 @@ rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, cons
GtkWidget *w;
int i;
char *tmp;
-
+
re->context = context;
g_object_ref (context);
-
+
gtk_window_set_resizable ((GtkWindow *) re, TRUE);
gtk_window_set_default_size ((GtkWindow *) re, 350, 400);
gtk_widget_realize ((GtkWidget *) re);
@@ -785,11 +785,11 @@ rule_editor_construct (RuleEditor *re, RuleContext *context, GladeXML *gui, cons
re->priv->buttons[i] = (GtkButton *) (w = glade_xml_get_widget (gui, edit_buttons[i].name));
g_signal_connect (w, "clicked", edit_buttons[i].func, re);
}
-
+
w = glade_xml_get_widget (gui, "rule_list");
re->list = (GtkTreeView *) g_object_get_data ((GObject *) w, "table");
re->model = (GtkListStore *) g_object_get_data ((GObject *) w, "model");
-
+
g_signal_connect (re->list, "cursor-changed", G_CALLBACK (cursor_changed), re);
g_signal_connect (re->list, "row-activated", G_CALLBACK (double_click), re);
diff --git a/filter/rule-editor.h b/filter/rule-editor.h
index e7a21eb157..90a979205a 100644
--- a/filter/rule-editor.h
+++ b/filter/rule-editor.h
@@ -43,33 +43,33 @@ typedef struct _RuleEditorUndo RuleEditorUndo;
struct _RuleEditor {
GtkDialog parent_object;
-
+
GtkListStore *model;
GtkTreeView *list;
-
+
RuleContext *context;
FilterRule *current;
FilterRule *edit; /* for editing/adding rules, so we only do 1 at a time */
-
+
GtkWidget *dialog;
-
+
char *source;
-
+
struct _RuleEditorUndo *undo_log; /* cancel/undo log */
unsigned int undo_active:1; /* we're performing undo */
-
+
struct _RuleEditorPrivate *priv;
};
struct _RuleEditorClass {
GtkDialogClass parent_class;
-
+
/* virtual methods */
void (*set_sensitive) (RuleEditor *);
void (*set_source) (RuleEditor *, const char *source);
-
+
FilterRule *(*create_rule) (RuleEditor *);
-
+
/* signals */
};
@@ -82,7 +82,7 @@ enum {
struct _RuleEditorUndo {
struct _RuleEditorUndo *next;
-
+
unsigned int type;
FilterRule *rule;
int rank;
diff --git a/iconv-detect.c b/iconv-detect.c
index e95d525d5c..019bb63dea 100644
--- a/iconv-detect.c
+++ b/iconv-detect.c
@@ -26,7 +26,7 @@
enum {
ISO_UNSUPPORTED = 0,
-
+
/* iso-8859-1 */
ISO_DASH_D_DASH_D_LOWER = (1 << 0),
ISO_DASH_D_DASH_D = (1 << 1),
@@ -34,7 +34,7 @@ enum {
ISO_D_D = (1 << 3),
ISO_UNDER_D_DASH_D = (1 << 4),
NO_ISO_D_DASH_D = (1 << 5),
-
+
/* iso-10646-1 */
/*ISO_DASH_D_DASH_D_LOWER = (1 << 0),*/
/*ISO_DASH_D_DASH_D = (1 << 1),*/
@@ -43,7 +43,7 @@ enum {
ISO_DASH_D = (1 << 4),
ISO_D = (1 << 5),
UCS4 = (1 << 6),
-
+
/* iso-2022-jp */
ISO_DASH_D_DASH_S_LOWER = (1 << 0),
ISO_DASH_D_DASH_S = (1 << 1),
@@ -97,13 +97,13 @@ int main (int argc, char **argv)
iconv_t cd;
FILE *fp;
int i;
-
+
fp = fopen ("iconv-detect.h", "w");
if (fp == NULL)
exit (255);
-
+
fprintf (fp, "/* This is an auto-generated header, DO NOT EDIT! */\n\n");
-
+
iso8859 = ISO_UNSUPPORTED;
info = iso8859_tests;
/*printf ("#define DEFAULT_ISO_FORMAT(iso,codepage)\t");*/
@@ -117,7 +117,7 @@ int main (int argc, char **argv)
break;
}
}
-
+
if (iso8859 == ISO_UNSUPPORTED) {
fprintf (stderr, "System doesn't support any ISO-8859-1 formats\n");
fprintf (fp, "#define ICONV_ISO_D_FORMAT \"%s\"\n", info[0].format);
@@ -127,7 +127,7 @@ int main (int argc, char **argv)
} else {
fprintf (fp, "#define ICONV_ISO_D_FORMAT \"%s\"\n", info[i].format);
}
-
+
iso2022 = ISO_UNSUPPORTED;
info = iso2022_tests;
/*printf ("#define ISO_2022_FORMAT(iso,codepage)\t");*/
@@ -141,7 +141,7 @@ int main (int argc, char **argv)
break;
}
}
-
+
if (iso2022 == ISO_UNSUPPORTED) {
fprintf (stderr, "System doesn't support any ISO-2022 formats\n");
fprintf (fp, "#define ICONV_ISO_S_FORMAT \"%s\"\n", info[0].format);
@@ -151,7 +151,7 @@ int main (int argc, char **argv)
} else {
fprintf (fp, "#define ICONV_ISO_S_FORMAT \"%s\"\n", info[i].format);
}
-
+
iso10646 = ISO_UNSUPPORTED;
info = iso10646_tests;
/*printf ("#define ISO_10646_FORMAT(iso,codepage)\t");*/
@@ -168,7 +168,7 @@ int main (int argc, char **argv)
break;
}
}
-
+
/* we don't need a printf format for iso-10646 because there is only 1 */
if (iso10646 == ISO_UNSUPPORTED) {
fprintf (stderr, "System doesn't support any ISO-10646-1 formats\n");
@@ -179,8 +179,8 @@ int main (int argc, char **argv)
} else {
fprintf (fp, "#define ICONV_10646 \"%s\"\n", info[i].charset);
}
-
+
fclose (fp);
-
+
exit (0);
}
diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c
index 9b508280e2..d10e5846dc 100644
--- a/mail/e-searching-tokenizer.c
+++ b/mail/e-searching-tokenizer.c
@@ -14,12 +14,12 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -41,7 +41,7 @@
#include "libedataserver/e-memory.h"
#include "libedataserver/e-msgport.h"
-#define d(x)
+#define d(x)
enum {
MATCH_SIGNAL,
@@ -144,7 +144,7 @@ loop:
r<<=1;
m<<=5;
} while (r & 0x40);
-
+
*ptr = p;
v &= ~m;
@@ -224,7 +224,7 @@ struct _trie {
EMemChunk *match_chunks;
};
-static void
+static void
dump_trie(struct _state *s, int d)
{
char *p = alloca(d*2+1);
@@ -232,7 +232,7 @@ dump_trie(struct _state *s, int d)
memset(p, ' ', d*2);
p[d*2]=0;
-
+
printf("%s[state] %p: %d fail->%p\n", p, s, s->final, s->fail);
m = s->matches;
while (m) {
@@ -359,7 +359,7 @@ build_trie(int nocase, int len, unsigned char **words)
q = q->next;
}
}
-
+
d(printf("After failure analysis\n"));
d(dump_trie(&trie->root, 0));
@@ -971,18 +971,18 @@ e_searching_tokenizer_finalise (GObject *obj)
{
ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (obj);
struct _ESearchingTokenizerPrivate *p = st->priv;
-
+
search_info_free (p->primary);
search_info_free (p->secondary);
if (p->engine)
searcher_free(p->engine);
-
- /* again wtf?
+
+ /* again wtf?
shared_state_unref (st->priv->shared);
*/
-
+
g_free (p);
-
+
if (G_OBJECT_CLASS (parent_class)->finalize)
G_OBJECT_CLASS (parent_class)->finalize(obj);
}
@@ -992,9 +992,9 @@ e_searching_tokenizer_class_init (ESearchingTokenizerClass *klass)
{
GObjectClass *obj_class = (GObjectClass *) klass;
HTMLTokenizerClass *tok_class = HTML_TOKENIZER_CLASS (klass);
-
+
parent_class = g_type_class_ref (HTML_TYPE_TOKENIZER);
-
+
signals[MATCH_SIGNAL] =
g_signal_new ("match",
E_TYPE_SEARCHING_TOKENIZER,
@@ -1004,12 +1004,12 @@ e_searching_tokenizer_class_init (ESearchingTokenizerClass *klass)
NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
+
obj_class->finalize = e_searching_tokenizer_finalise;
-
+
tok_class->begin = e_searching_tokenizer_begin;
tok_class->end = e_searching_tokenizer_end;
-
+
tok_class->peek_token = e_searching_tokenizer_peek_token;
tok_class->next_token = e_searching_tokenizer_next_token;
tok_class->has_more = e_searching_tokenizer_has_more;
@@ -1026,7 +1026,7 @@ e_searching_tokenizer_init (ESearchingTokenizer *st)
p->primary = search_info_new();
search_info_set_flags(p->primary, SEARCH_BOLD, SEARCH_CASE|SEARCH_BOLD);
search_info_set_colour(p->primary, "red");
-
+
p->secondary = search_info_new();
search_info_set_flags(p->secondary, SEARCH_BOLD, SEARCH_CASE|SEARCH_BOLD);
search_info_set_colour(p->secondary, "purple");
@@ -1036,7 +1036,7 @@ GType
e_searching_tokenizer_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (ESearchingTokenizerClass),
@@ -1047,10 +1047,10 @@ e_searching_tokenizer_get_type (void)
0,
(GInstanceInitFunc) e_searching_tokenizer_init,
};
-
+
type = g_type_register_static (HTML_TYPE_TOKENIZER, "ESearchingTokenizer", &info, 0);
}
-
+
return type;
}
@@ -1067,7 +1067,7 @@ e_searching_tokenizer_new (void)
static char *get_token(HTMLTokenizer *t)
{
HTMLTokenizerClass *klass = HTML_TOKENIZER_CLASS (parent_class);
-
+
return klass->has_more(t) ? klass->next_token(t) : NULL;
}
@@ -1132,19 +1132,19 @@ e_searching_tokenizer_next_token (HTMLTokenizer *tok)
ESearchingTokenizer *st = E_SEARCHING_TOKENIZER (tok);
int oldmatched;
char *token;
-
+
/* If no search is active, just use the default method. */
if (st->priv->engine == NULL)
return HTML_TOKENIZER_CLASS (parent_class)->next_token (tok);
-
+
oldmatched = st->priv->engine->matchcount;
-
+
token = searcher_next_token(st->priv->engine);
/* not sure if this has to be accurate or just say we had some matches */
if (oldmatched != st->priv->engine->matchcount)
g_signal_emit (st, signals[MATCH_SIGNAL], 0);
-
+
return token;
}
@@ -1170,22 +1170,22 @@ e_searching_tokenizer_clone (HTMLTokenizer *tok)
{
ESearchingTokenizer *orig_st = E_SEARCHING_TOKENIZER (tok);
ESearchingTokenizer *new_st = E_SEARCHING_TOKENIZER (e_searching_tokenizer_new ());
-
+
search_info_free(new_st->priv->primary);
search_info_free(new_st->priv->secondary);
-
+
new_st->priv->primary = search_info_clone(orig_st->priv->primary);
new_st->priv->secondary = search_info_clone(orig_st->priv->secondary);
-
+
/* what the fucking what???? */
#if 0
shared_state_ref (orig_st->priv->shared);
shared_state_unref (new_st->priv->shared);
new_st->priv->shared = orig_st->priv->shared;
#endif
-
+
g_signal_connect_swapped (new_st, "match", G_CALLBACK(matched), orig_st);
-
+
return HTML_TOKENIZER (new_st);
}
/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
@@ -1194,7 +1194,7 @@ void
e_searching_tokenizer_set_primary_search_string (ESearchingTokenizer *st, const gchar *search_str)
{
g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
+
search_info_clear(st->priv->primary);
search_info_add_string(st->priv->primary, search_str);
}
@@ -1203,7 +1203,7 @@ void
e_searching_tokenizer_add_primary_search_string (ESearchingTokenizer *st, const gchar *search_str)
{
g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
+
search_info_add_string(st->priv->primary, search_str);
}
@@ -1211,7 +1211,7 @@ void
e_searching_tokenizer_set_primary_case_sensitivity (ESearchingTokenizer *st, gboolean iscase)
{
g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
+
search_info_set_flags(st->priv->primary, iscase?SEARCH_CASE:0, SEARCH_CASE);
}
@@ -1219,7 +1219,7 @@ void
e_searching_tokenizer_set_secondary_search_string (ESearchingTokenizer *st, const gchar *search_str)
{
g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
+
search_info_clear(st->priv->secondary);
search_info_add_string(st->priv->secondary, search_str);
}
@@ -1228,7 +1228,7 @@ void
e_searching_tokenizer_add_secondary_search_string (ESearchingTokenizer *st, const gchar *search_str)
{
g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
+
search_info_add_string(st->priv->secondary, search_str);
}
@@ -1236,7 +1236,7 @@ void
e_searching_tokenizer_set_secondary_case_sensitivity (ESearchingTokenizer *st, gboolean iscase)
{
g_return_if_fail (st && E_IS_SEARCHING_TOKENIZER (st));
-
+
search_info_set_flags(st->priv->secondary, iscase?SEARCH_CASE:0, SEARCH_CASE);
}
@@ -1245,9 +1245,9 @@ gint
e_searching_tokenizer_match_count (ESearchingTokenizer *st)
{
g_return_val_if_fail (E_IS_SEARCHING_TOKENIZER (st), -1);
-
+
if (st->priv->engine && st->priv->primary->strv->len)
return st->priv->engine->matchcount;
-
+
return 0;
}
diff --git a/mail/e-searching-tokenizer.h b/mail/e-searching-tokenizer.h
index 96aa39640c..9b690d1f46 100644
--- a/mail/e-searching-tokenizer.h
+++ b/mail/e-searching-tokenizer.h
@@ -12,12 +12,12 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -43,13 +43,13 @@ struct _ESearchingTokenizerPrivate;
struct _ESearchingTokenizer {
HTMLTokenizer parent;
-
+
struct _ESearchingTokenizerPrivate *priv;
};
struct _ESearchingTokenizerClass {
HTMLTokenizerClass parent_class;
-
+
void (*match) (ESearchingTokenizer *);
};
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index d748750bde..a15d6f877a 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -153,17 +153,17 @@ typedef struct _EMAccountEditorPrivate {
guint sig_removed_id;
guint sig_changed_id;
const char *sig_uid;
-
+
/* incoming mail */
EMAccountEditorService source;
-
+
/* extra incoming config */
CamelProvider *extra_provider;
GSList *extra_items; /* this is freed by the econfig automatically */
/* outgoing mail */
EMAccountEditorService transport;
-
+
/* account management */
GtkEntry *identity_entries[5];
struct _GtkToggleButton *default_account;
@@ -275,14 +275,14 @@ em_account_editor_get_type(void)
/**
* em_account_editor_new:
- * @account:
- * @type:
- *
+ * @account:
+ * @type:
+ *
* Create a new account editor. If @account is NULL then this is to
* create a new account, else @account is copied to a working
* structure and is for editing an existing account.
- *
- * Return value:
+ *
+ * Return value:
**/
EMAccountEditor *em_account_editor_new(EAccount *account, em_account_editor_t type, char *id)
{
@@ -320,12 +320,12 @@ is_email (const char *address)
/* This is supposed to check if the address's domain could be
an FQDN but alas, it's not worth the pain and suffering. */
const char *at;
-
+
at = strchr (address, '@');
/* make sure we have an '@' and that it's not the first or last char */
if (!at || at == address || *(at + 1) == '\0')
return FALSE;
-
+
return TRUE;
}
@@ -391,7 +391,7 @@ emae_display_license(EMAccountEditor *emae, CamelProvider *prov)
char *tmp;
GtkResponseType response = GTK_RESPONSE_NONE;
char *gladefile;
-
+
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"mail-dialogs.glade",
NULL);
@@ -407,8 +407,8 @@ emae_display_license(EMAccountEditor *emae, CamelProvider *prov)
g_signal_connect(glade_xml_get_widget(xml, "license_checkbutton"),
"toggled", G_CALLBACK(emae_license_state), dialog);
- tmp = g_strdup_printf(_("\nPlease read carefully the license agreement\n"
- "for %s displayed below\n"
+ tmp = g_strdup_printf(_("\nPlease read carefully the license agreement\n"
+ "for %s displayed below\n"
"and tick the check box for accepting it\n"), prov->license);
gtk_label_set_text((GtkLabel *)glade_xml_get_widget(xml, "license_top_label"), tmp);
g_free(tmp);
@@ -424,7 +424,7 @@ emae_display_license(EMAccountEditor *emae, CamelProvider *prov)
gtk_widget_destroy(dialog);
g_object_unref(xml);
-
+
return (response == GTK_RESPONSE_ACCEPT);
}
@@ -438,14 +438,14 @@ emae_check_license(EMAccountEditor *emae, CamelProvider *prov)
GSList *providers_list, *l;
providers_list = gconf_client_get_list (gconf, "/apps/evolution/mail/licenses", GCONF_VALUE_STRING, NULL);
-
+
for (l = providers_list, accepted = FALSE; l && !accepted; l = g_slist_next(l))
accepted = (strcmp((char *)l->data, prov->protocol) == 0);
if (!accepted
&& (accepted = emae_display_license(emae, prov)) == TRUE) {
providers_list = g_slist_append(providers_list, g_strdup(prov->protocol));
- gconf_client_set_list(gconf,
+ gconf_client_set_list(gconf,
"/apps/evolution/mail/licenses",
GCONF_VALUE_STRING,
providers_list, NULL);
@@ -463,7 +463,7 @@ default_folders_clicked (GtkButton *button, gpointer user_data)
{
EMAccountEditor *emae = user_data;
const char *uri;
-
+
uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
em_folder_selection_button_set_selection((EMFolderSelectionButton *)emae->priv->drafts_folder_button, uri);
emae_account_folder_changed((EMFolderSelectionButton *)emae->priv->drafts_folder_button, emae);
@@ -771,7 +771,7 @@ emae_setup_receipt_policy (EMAccountEditor *emae, GladeXML *xml)
EAccountReceiptPolicy current = emae->account->receipt_policy;
static struct {
EAccountReceiptPolicy policy;
- char *label;
+ char *label;
} receipt_policies[] = {
{ E_ACCOUNT_RECEIPT_NEVER, N_("Never") },
{ E_ACCOUNT_RECEIPT_ALWAYS, N_("Always") },
@@ -789,9 +789,9 @@ emae_setup_receipt_policy (EMAccountEditor *emae, GladeXML *xml)
1, receipt_policies[i].policy,
-1);
if (current == receipt_policies[i].policy)
- active = i;
+ active = i;
}
-
+
gtk_combo_box_set_model(dropdown, (GtkTreeModel *)store);
gtk_combo_box_set_active(dropdown, active);
@@ -1021,7 +1021,7 @@ emae_url_set_hostport(CamelURL *url, const char *txt)
{
const char *port;
char *host;
-
+
/* FIXME: what if this was a raw IPv6 address? */
if (txt && (port = strchr(txt, ':'))) {
camel_url_set_port(url, atoi(port+1));
@@ -1174,16 +1174,16 @@ emae_service_url_path_changed(EMAccountEditorService *service, void (*setval)(Ca
GtkTreeModel *model;
GtkTreeIter iter;
CamelServiceAuthType *authtype;
-
+
CamelURL *url = emae_account_url(service->emae, emae_service_info[service->type].account_uri_key);
const char *text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
setval(url, (text && text[0])?text:NULL);
-
+
if (text && text[0] && setval == camel_url_set_user) {
dropdown = service->authtype;
if(dropdown) {
- id = gtk_combo_box_get_active (dropdown);
+ id = gtk_combo_box_get_active (dropdown);
if (id != -1) {
model = gtk_combo_box_get_model (dropdown);
if (gtk_tree_model_iter_nth_child (model, &iter, NULL, id)) {
@@ -1194,7 +1194,7 @@ emae_service_url_path_changed(EMAccountEditorService *service, void (*setval)(Ca
}
}
}
-
+
emae_uri_changed(service, url);
camel_url_free(url);
}
@@ -1274,7 +1274,7 @@ emae_service_provider_changed(EMAccountEditorService *service)
enable = e_account_writable_option(service->emae->account, service->provider->protocol, "use_ssl");
gtk_widget_set_sensitive((GtkWidget *)service->use_ssl, enable);
-
+
enable = e_account_writable(service->emae->account, emae_service_info[service->type].save_passwd_key);
gtk_widget_set_sensitive((GtkWidget *)service->remember, enable);
@@ -1293,7 +1293,7 @@ emae_service_provider_changed(EMAccountEditorService *service)
if (j == 0) {
if (dwidget == NULL && enable)
dwidget = w;
-
+
if (info->setval && !hide)
info->setval(url, enable?gtk_entry_get_text((GtkEntry *)w):NULL);
}
@@ -1319,7 +1319,7 @@ emae_service_provider_changed(EMAccountEditorService *service)
camel_url_set_authmech(url, NULL);
}
}
-
+
emae_refresh_authtype(service->emae, service);
if (service->needs_auth && !CAMEL_PROVIDER_NEEDS(service->provider, CAMEL_URL_PART_AUTH))
gtk_widget_show((GtkWidget *)service->needs_auth);
@@ -1410,7 +1410,7 @@ emae_refresh_providers(EMAccountEditor *emae, EMAccountEditorService *service)
current[len] = 0;
}
}
-
+
store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
i = 0;
@@ -1549,7 +1549,7 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service)
} else {
avail = TRUE;
}
-
+
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter, 0, authtype->name, 1, authtype, 2, !avail, -1);
@@ -1800,7 +1800,7 @@ emae_identity_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
#endif
gtk_widget_hide(glade_xml_get_widget(xml, "sigAddNew"));
}
-
+
w = glade_xml_get_widget(xml, item->label);
if (((EConfig *)gui->config)->type == E_CONFIG_DRUID) {
GladeXML *druidxml;
@@ -2269,7 +2269,7 @@ emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
/* Special Folders "Reset Defaults" button */
gui->restore_folders_button = (GtkButton *)glade_xml_get_widget (xml, "default_folders_button");
g_signal_connect (gui->restore_folders_button, "clicked", G_CALLBACK (default_folders_clicked), emae);
-
+
/* Always Cc/Bcc */
emae_account_toggle(emae, "always_cc", E_ACCOUNT_CC_ALWAYS, xml);
emae_account_entry(emae, "cc_addrs", E_ACCOUNT_CC_ADDRS, xml);
@@ -2280,8 +2280,8 @@ emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
gtk_widget_set_sensitive( (GtkWidget *)gui->sent_folder_button,
e_account_writable(emae->account, E_ACCOUNT_SENT_FOLDER_URI)
- &&
- (emae->priv->source.provider ? !(emae->priv->source.provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER): TRUE)
+ &&
+ (emae->priv->source.provider ? !(emae->priv->source.provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER): TRUE)
);
gtk_widget_set_sensitive((GtkWidget *)gui->restore_folders_button,
@@ -2291,7 +2291,7 @@ emae_defaults_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
/* Receipt policy */
emae_setup_receipt_policy (emae, xml);
-
+
w = glade_xml_get_widget(xml, item->label);
gtk_notebook_append_page((GtkNotebook *)parent, w, gtk_label_new(_("Defaults")));
@@ -2328,7 +2328,7 @@ emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
emae_account_toggle(emae, "pgp_always_sign", E_ACCOUNT_PGP_ALWAYS_SIGN, xml);
emae_account_toggle(emae, "pgp_no_imip_sign", E_ACCOUNT_PGP_NO_IMIP_SIGN, xml);
emae_account_toggle(emae, "pgp_always_trust", E_ACCOUNT_PGP_ALWAYS_TRUST, xml);
-
+
#if defined (HAVE_NSS)
/* TODO: this should handle its entry separately? */
gui->smime_sign_key = emae_account_entry(emae, "smime_sign_key", E_ACCOUNT_SMIME_SIGN_KEY, xml);
@@ -2352,7 +2352,7 @@ emae_security_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, st
{
/* Since we don't have NSS, hide the S/MIME config options */
GtkWidget *frame;
-
+
frame = glade_xml_get_widget(xml, "smime_vbox");
gtk_widget_destroy(frame);
}
@@ -2435,7 +2435,7 @@ emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
NULL);
druidxml = glade_xml_new(gladefile, "management_page", NULL);
g_free (gladefile);
-
+
page = glade_xml_get_widget(druidxml, "management_page");
gtk_widget_reparent(w, ((GnomeDruidPageStandard *)page)->vbox);
@@ -2629,10 +2629,10 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data)
}
}
- /*
- Setting a flag on the Account if it is marked as default. It is done in this way instead of
- using a temporary variable so as to keep track of which account is marked as default in case of
- editing multiple accounts at a time
+ /*
+ Setting a flag on the Account if it is marked as default. It is done in this way instead of
+ using a temporary variable so as to keep track of which account is marked as default in case of
+ editing multiple accounts at a time
*/
if (gtk_toggle_button_get_active(emae->priv->default_account))
g_object_set_data (G_OBJECT (emae->account), "default_flagged", GINT_TO_POINTER(1));
@@ -2680,10 +2680,10 @@ add_new_store (char *uri, CamelStore *store, void *user_data)
{
MailComponent *component = mail_component_peek ();
EAccount *account = user_data;
-
+
if (store == NULL)
return;
-
+
mail_component_add_store (component, store, account->name);
}
diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c
index bb453d4ea8..dc9f71aaf4 100644
--- a/mail/em-account-prefs.c
+++ b/mail/em-account-prefs.c
@@ -66,7 +66,7 @@ GType
em_account_prefs_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
GTypeInfo type_info = {
sizeof (EMAccountPrefsClass),
@@ -77,10 +77,10 @@ em_account_prefs_get_type (void)
0,
(GInstanceInitFunc) em_account_prefs_init,
};
-
+
type = g_type_register_static (gtk_vbox_get_type (), "EMAccountPrefs", &type_info, 0);
}
-
+
return type;
}
@@ -89,11 +89,11 @@ em_account_prefs_class_init (EMAccountPrefsClass *klass)
{
GtkObjectClass *gtk_object_class = (GtkObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
-
+
parent_class = g_type_class_ref (gtk_vbox_get_type ());
-
+
gtk_object_class->destroy = em_account_prefs_destroy;
-
+
object_class->finalize = em_account_prefs_finalise;
}
@@ -108,9 +108,9 @@ static void
em_account_prefs_destroy (GtkObject *obj)
{
EMAccountPrefs *prefs = (EMAccountPrefs *) obj;
-
+
prefs->destroyed = TRUE;
-
+
GTK_OBJECT_CLASS (parent_class)->destroy (obj);
}
@@ -118,9 +118,9 @@ static void
em_account_prefs_finalise (GObject *obj)
{
EMAccountPrefs *prefs = (EMAccountPrefs *) obj;
-
+
g_object_unref (prefs->gui);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -129,10 +129,10 @@ account_add_finished (EMAccountPrefs *prefs, GObject *deadbeef)
{
/* Either Cancel or Finished was clicked in the druid so reload the accounts */
prefs->druid = NULL;
-
+
if (!prefs->destroyed)
mail_accounts_load (prefs);
-
+
g_object_unref (prefs);
}
@@ -142,7 +142,7 @@ static void
account_add_clicked (GtkButton *button, gpointer user_data)
{
EMAccountPrefs *prefs = (EMAccountPrefs *) user_data;
-
+
if (prefs->druid == NULL) {
EMAccountEditor *emae;
@@ -171,10 +171,10 @@ static void
account_edit_finished (EMAccountPrefs *prefs, GObject *deadbeef)
{
prefs->editor = NULL;
-
+
if (!prefs->destroyed)
mail_accounts_load (prefs);
-
+
g_object_unref (prefs);
}
@@ -182,17 +182,17 @@ static void
account_edit_clicked (GtkButton *button, gpointer user_data)
{
EMAccountPrefs *prefs = (EMAccountPrefs *) user_data;
-
+
if (prefs->editor == NULL) {
GtkTreeSelection *selection;
EAccount *account = NULL;
GtkTreeModel *model;
GtkTreeIter iter;
-
+
selection = gtk_tree_view_get_selection (prefs->table);
if (gtk_tree_selection_get_selected (selection, &model, &iter))
gtk_tree_model_get (model, &iter, 3, &account, -1);
-
+
if (account && !account->parent_uid && !mail_config_has_proxies (account)) {
EMAccountEditor *emae;
@@ -229,37 +229,37 @@ account_delete_clicked (GtkButton *button, gpointer user_data)
GtkTreeIter iter;
int ans;
gboolean has_proxies = FALSE;
-
+
selection = gtk_tree_view_get_selection (prefs->table);
if (gtk_tree_selection_get_selected (selection, &model, &iter))
gtk_tree_model_get (model, &iter, 3, &account, -1);
-
+
/* make sure we have a valid account selected and that we aren't editing anything... */
if (account == NULL || prefs->editor != NULL)
return;
has_proxies = mail_config_has_proxies (account);
ans = e_error_run(PREFS_WINDOW(prefs), has_proxies?"mail:ask-delete-account-with-proxies":"mail:ask-delete-account",NULL);
-
+
if (ans == GTK_RESPONSE_YES) {
int len;
-
+
/* remove it from the folder-tree in the shell */
if (account->enabled && account->source && account->source->url)
mail_component_remove_store_by_uri (mail_component_peek (), account->source->url);
-
+
/* remove all the proxies account has created*/
if (has_proxies)
mail_config_remove_account_proxies (account);
-
+
/* remove it from the config file */
mail_config_remove_account (account);
accounts = mail_config_get_accounts ();
-
+
mail_config_write ();
-
+
gtk_list_store_remove ((GtkListStore *) model, &iter);
-
+
len = e_list_length ((EList *) accounts);
if (len > 0) {
if ( !gtk_list_store_iter_is_valid ((GtkListStore *) model, &iter))
@@ -283,16 +283,16 @@ account_default_clicked (GtkButton *button, gpointer user_data)
EAccount *account = NULL;
GtkTreeModel *model;
GtkTreeIter iter;
-
+
selection = gtk_tree_view_get_selection (prefs->table);
if (gtk_tree_selection_get_selected (selection, &model, &iter))
gtk_tree_model_get (model, &iter, 3, &account, -1);
-
+
if (account) {
mail_config_set_default_account (account);
-
+
mail_config_write ();
-
+
mail_accounts_load (prefs);
}
}
@@ -309,7 +309,7 @@ account_able_changed(EAccount *account)
mail_component_load_store_by_uri (component,
account->source->url,
account->name);
- else
+ else
mail_component_remove_store_by_uri (component, account->source->url);
}
@@ -324,13 +324,13 @@ account_able_clicked (GtkButton *button, gpointer user_data)
EAccount *account;
GtkTreeModel *model;
GtkTreeIter iter;
-
+
selection = gtk_tree_view_get_selection (prefs->table);
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
gtk_tree_model_get (model, &iter, 3, &account, -1);
account->enabled = !account->enabled;
gtk_list_store_set ((GtkListStore *) model, &iter, 0, account->enabled, -1);
-
+
gtk_button_set_label (prefs->mail_able, account->enabled ? _("Di_sable") : _("E_nable"));
/* let the rest of the application know it changed */
@@ -348,26 +348,26 @@ account_able_toggled (GtkCellRendererToggle *renderer, char *arg1, gpointer user
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
-
+
path = gtk_tree_path_new_from_string (arg1);
model = gtk_tree_view_get_model (prefs->table);
selection = gtk_tree_view_get_selection (prefs->table);
-
+
if (gtk_tree_model_get_iter (model, &iter, path)) {
gtk_tree_model_get (model, &iter, 3, &account, -1);
if (mail_config_has_proxies (account)) {
- int ans;
+ int ans;
ans = e_error_run(PREFS_WINDOW(prefs), "mail:ask-delete-proxy-accounts",NULL);
- if (ans == GTK_RESPONSE_NO) {
+ if (ans == GTK_RESPONSE_NO) {
gtk_tree_path_free (path);
return;
- }
+ }
mail_config_remove_account_proxies (account);
- gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_edit), 1);
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_edit), 1);
}
account->enabled = !account->enabled;
@@ -419,8 +419,8 @@ account_cursor_change (GtkTreeSelection *selection, EMAccountPrefs *prefs)
} else {
gtk_widget_set_sensitive (GTK_WIDGET (prefs), FALSE);
}
-
- if( url != NULL )
+
+ if( url != NULL )
gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_edit), !mail_config_has_proxies(account));
gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_delete), state);
@@ -444,25 +444,25 @@ mail_accounts_load (EMAccountPrefs *prefs)
EIterator *node;
int row = 0;
GtkTreeSelection *selection;
-
+
model = (GtkListStore *) gtk_tree_view_get_model (prefs->table);
gtk_list_store_clear (model);
-
+
default_account = mail_config_get_default_account ();
-
+
accounts = mail_config_get_accounts ();
node = e_list_get_iterator ((EList *) accounts);
selection = gtk_tree_view_get_selection(prefs->table);
-
+
while (e_iterator_is_valid (node)) {
EAccount *account;
CamelURL *url;
-
+
account = (EAccount *) e_iterator_get (node);
if (!account->parent_uid) {
url = account->source && account->source->url ? camel_url_new (account->source->url, NULL) : NULL;
-
+
gtk_list_store_append (model, &iter);
if (account == default_account) {
/* translators: default account indicator */
@@ -479,19 +479,19 @@ mail_accounts_load (EMAccountPrefs *prefs)
3, account,
-1);
g_free (name);
-
+
if (url)
camel_url_free (url);
-
+
/* select the first row by default */
if (row == 0 && !prefs->changed)
- gtk_tree_selection_select_iter (selection, &iter);
+ gtk_tree_selection_select_iter (selection, &iter);
row++;
}
-
+
e_iterator_next (node);
}
-
+
g_object_unref (node);
}
@@ -507,23 +507,23 @@ em_account_prefs_treeview_new (char *widget_name, char *string1, char *string2,
GtkTreeSelection *selection;
GtkCellRenderer *renderer;
GtkListStore *model;
-
+
scrolled = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled), GTK_SHADOW_IN);
-
+
renderer = gtk_cell_renderer_toggle_new ();
g_object_set ((GObject *) renderer, "activatable", TRUE, NULL);
-
+
model = gtk_list_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER);
table = gtk_tree_view_new_with_model ((GtkTreeModel *) model);
g_object_unref (model);
gtk_tree_view_insert_column_with_attributes ((GtkTreeView *) table, -1, _("Enabled"),
renderer, "active", 0, NULL);
-
+
g_object_set_data ((GObject *) scrolled, "renderer", renderer);
-
+
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes ((GtkTreeView *) table, -1, _("Account name"),
renderer, "text", 1, NULL);
@@ -534,18 +534,18 @@ em_account_prefs_treeview_new (char *widget_name, char *string1, char *string2,
gtk_tree_view_set_headers_visible ((GtkTreeView *) table, TRUE);
atk_object_set_name (gtk_widget_get_accessible (table), _("Mail Accounts"));
-
+
/* FIXME: column auto-resize? */
/* Is this needed?
gtk_tree_view_column_set_alignment (gtk_tree_view_get_column (prefs->table, 0), 1.0);*/
-
+
gtk_container_add (GTK_CONTAINER (scrolled), table);
-
+
g_object_set_data ((GObject *) scrolled, "table", table);
-
+
gtk_widget_show (scrolled);
gtk_widget_show (table);
-
+
return scrolled;
}
@@ -556,7 +556,7 @@ em_account_prefs_construct (EMAccountPrefs *prefs)
GtkCellRenderer *renderer;
GladeXML *gui;
char *gladefile;
-
+
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"mail-config.glade",
NULL);
@@ -564,20 +564,20 @@ em_account_prefs_construct (EMAccountPrefs *prefs)
g_free (gladefile);
prefs->gui = gui;
-
+
/* get our toplevel widget */
toplevel = glade_xml_get_widget (gui, "toplevel");
-
+
/* reparent */
g_object_ref (toplevel);
gtk_container_remove (GTK_CONTAINER (toplevel->parent), toplevel);
gtk_container_add (GTK_CONTAINER (prefs), toplevel);
g_object_unref (toplevel);
-
+
widget = glade_xml_get_widget (gui, "etableMailAccounts");
-
+
prefs->table = (GtkTreeView *) g_object_get_data ((GObject *) widget, "table");
-
+
renderer = g_object_get_data ((GObject *) widget, "renderer");
g_signal_connect (renderer, "toggled", G_CALLBACK (account_able_toggled), prefs);
@@ -587,16 +587,16 @@ em_account_prefs_construct (EMAccountPrefs *prefs)
prefs->mail_add = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountAdd"));
g_signal_connect (prefs->mail_add, "clicked", G_CALLBACK (account_add_clicked), prefs);
-
+
prefs->mail_edit = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountEdit"));
g_signal_connect (prefs->mail_edit, "clicked", G_CALLBACK (account_edit_clicked), prefs);
-
+
prefs->mail_delete = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountDelete"));
g_signal_connect (prefs->mail_delete, "clicked", G_CALLBACK (account_delete_clicked), prefs);
-
+
prefs->mail_default = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountDefault"));
g_signal_connect (prefs->mail_default, "clicked", G_CALLBACK (account_default_clicked), prefs);
-
+
prefs->mail_able = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountAble"));
g_signal_connect (prefs->mail_able, "clicked", G_CALLBACK (account_able_clicked), prefs);
@@ -611,10 +611,10 @@ GtkWidget *
em_account_prefs_new (GNOME_Evolution_Shell shell)
{
EMAccountPrefs *new;
-
+
new = (EMAccountPrefs *) g_object_new (em_account_prefs_get_type (), NULL);
em_account_prefs_construct (new);
new->shell = shell;
-
+
return (GtkWidget *) new;
}
diff --git a/mail/em-account-prefs.h b/mail/em-account-prefs.h
index c7209f67a5..e3fc4c65e4 100644
--- a/mail/em-account-prefs.h
+++ b/mail/em-account-prefs.h
@@ -53,31 +53,31 @@ typedef struct _EMAccountPrefsClass EMAccountPrefsClass;
struct _EMAccountPrefs {
GtkVBox parent_object;
-
+
GNOME_Evolution_Shell shell;
-
+
GladeXML *gui;
-
+
GtkWidget *druid;
GtkWidget *editor;
-
+
GtkTreeView *table;
-
+
GtkButton *mail_add;
GtkButton *mail_edit;
GtkButton *mail_delete;
GtkButton *mail_default;
GtkButton *mail_able;
-
+
guint destroyed : 1;
guint changed : 1;
};
struct _EMAccountPrefsClass {
GtkVBoxClass parent_class;
-
+
/* signals */
-
+
};
diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c
index 15944bad72..4839e4e1f6 100644
--- a/mail/em-composer-prefs.c
+++ b/mail/em-composer-prefs.c
@@ -87,7 +87,7 @@ GType
em_composer_prefs_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (EMComposerPrefsClass),
@@ -98,10 +98,10 @@ em_composer_prefs_get_type (void)
0,
(GInstanceInitFunc) em_composer_prefs_init,
};
-
+
type = g_type_register_static (gtk_vbox_get_type (), "EMComposerPrefs", &info, 0);
}
-
+
return type;
}
@@ -110,9 +110,9 @@ em_composer_prefs_class_init (EMComposerPrefsClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
-
+
parent_class = g_type_class_ref (gtk_vbox_get_type ());
-
+
object_class->destroy = em_composer_prefs_destroy;
gobject_class->finalize = em_composer_prefs_finalise;
}
@@ -131,12 +131,12 @@ static void
em_composer_prefs_finalise (GObject *obj)
{
EMComposerPrefs *prefs = (EMComposerPrefs *) obj;
-
+
g_object_unref (prefs->gui);
g_object_unref (prefs->enabled_pixbuf);
-
+
g_hash_table_destroy (prefs->sig_hash);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -145,24 +145,24 @@ em_composer_prefs_destroy (GtkObject *obj)
{
EMComposerPrefs *prefs = (EMComposerPrefs *) obj;
ESignatureList *signatures;
-
+
signatures = mail_config_get_signatures ();
-
+
if (prefs->sig_added_id != 0) {
g_signal_handler_disconnect (signatures, prefs->sig_added_id);
prefs->sig_added_id = 0;
}
-
+
if (prefs->sig_removed_id != 0) {
g_signal_handler_disconnect (signatures, prefs->sig_removed_id);
prefs->sig_removed_id = 0;
}
-
+
if (prefs->sig_changed_id != 0) {
g_signal_handler_disconnect (signatures, prefs->sig_changed_id);
prefs->sig_changed_id = 0;
}
-
+
GTK_OBJECT_CLASS (parent_class)->destroy (obj);
}
@@ -171,26 +171,26 @@ static void
sig_load_preview (EMComposerPrefs *prefs, ESignature *sig)
{
char *str;
-
+
if (!sig) {
gtk_html_load_from_string (GTK_HTML (prefs->sig_preview), " ", 1);
return;
}
-
+
if (sig->script)
str = mail_config_signature_run_script (sig->filename);
else
str = e_msg_composer_get_sig_file_content (sig->filename, sig->html);
if (!str)
str = g_strdup ("");
-
+
/* printf ("HTML: %s\n", str); */
if (sig->html) {
gtk_html_load_from_string (GTK_HTML (prefs->sig_preview), str, strlen (str));
} else {
GtkHTMLStream *stream;
int len;
-
+
len = strlen (str);
stream = gtk_html_begin_content (GTK_HTML (prefs->sig_preview), "text/html; charset=utf-8");
gtk_html_write (GTK_HTML (prefs->sig_preview), stream, "<PRE>", 5);
@@ -199,7 +199,7 @@ sig_load_preview (EMComposerPrefs *prefs, ESignature *sig)
gtk_html_write (GTK_HTML (prefs->sig_preview), stream, "</PRE>", 6);
gtk_html_end (GTK_HTML (prefs->sig_preview), stream, GTK_HTML_STREAM_OK);
}
-
+
g_free (str);
}
@@ -210,19 +210,19 @@ signature_added (ESignatureList *signatures, ESignature *sig, EMComposerPrefs *p
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
-
+
/* autogen signature is special */
if (sig->autogen)
return;
-
+
model = gtk_tree_view_get_model (prefs->sig_list);
gtk_list_store_append ((GtkListStore *) model, &iter);
gtk_list_store_set ((GtkListStore *) model, &iter, 0, sig->name, 1, sig, -1);
-
+
path = gtk_tree_model_get_path (model, &iter);
row = gtk_tree_row_reference_new (model, path);
gtk_tree_path_free (path);
-
+
g_hash_table_insert (prefs->sig_hash, sig, row);
}
@@ -233,19 +233,19 @@ signature_removed (ESignatureList *signatures, ESignature *sig, EMComposerPrefs
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
-
+
if (!(row = g_hash_table_lookup (prefs->sig_hash, sig)))
return;
-
+
model = gtk_tree_view_get_model (prefs->sig_list);
path = gtk_tree_row_reference_get_path (row);
g_hash_table_remove (prefs->sig_hash, sig);
-
+
if (!gtk_tree_model_get_iter (model, &iter, path)) {
gtk_tree_path_free (path);
return;
}
-
+
gtk_list_store_remove ((GtkListStore *) model, &iter);
}
@@ -258,22 +258,22 @@ signature_changed (ESignatureList *signatures, ESignature *sig, EMComposerPrefs
GtkTreePath *path;
GtkTreeIter iter;
ESignature *cur;
-
+
if (!(row = g_hash_table_lookup (prefs->sig_hash, sig)))
return;
-
+
model = gtk_tree_view_get_model (prefs->sig_list);
path = gtk_tree_row_reference_get_path (row);
-
+
if (!gtk_tree_model_get_iter (model, &iter, path)) {
gtk_tree_path_free (path);
return;
}
-
+
gtk_tree_path_free (path);
-
+
gtk_list_store_set ((GtkListStore *) model, &iter, 0, sig->name, -1);
-
+
selection = gtk_tree_view_get_selection (prefs->sig_list);
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
gtk_tree_model_get (model, &iter, 1, &cur, -1);
@@ -290,36 +290,36 @@ sig_edit_cb (GtkWidget *widget, EMComposerPrefs *prefs)
GtkWidget *parent;
GtkTreeIter iter;
ESignature *sig;
-
+
selection = gtk_tree_view_get_selection (prefs->sig_list);
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
return;
-
+
gtk_tree_model_get (model, &iter, 1, &sig, -1);
-
+
if (!sig->script) {
/* normal signature */
if (!sig->filename || *sig->filename == '\0') {
g_free (sig->filename);
sig->filename = g_strdup (_("Unnamed"));
}
-
+
parent = gtk_widget_get_toplevel ((GtkWidget *) prefs);
parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
-
+
mail_signature_editor (sig, (GtkWindow *) parent, FALSE);
} else {
/* signature script */
GtkWidget *entry;
-
+
entry = glade_xml_get_widget (prefs->sig_script_gui, "filechooserbutton_add_script");
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (entry), sig->filename);
-
+
entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name");
gtk_entry_set_text (GTK_ENTRY (entry), sig->name);
-
+
g_object_set_data ((GObject *) entry, "sig", sig);
-
+
gtk_window_present ((GtkWindow *) prefs->sig_script_dialog);
}
}
@@ -328,12 +328,12 @@ void
em_composer_prefs_new_signature (GtkWindow *parent, gboolean html)
{
ESignature *sig;
-
+
sig = mail_config_signature_new (NULL, FALSE, html);
mail_signature_editor (sig, parent, TRUE);
}
-static void
+static void
sig_delete_cb (GtkWidget *widget, EMComposerPrefs *prefs)
{
GtkTreeSelection *selection;
@@ -356,13 +356,13 @@ sig_add_cb (GtkWidget *widget, EMComposerPrefs *prefs)
GConfClient *gconf;
gboolean send_html;
GtkWidget *parent;
-
+
gconf = mail_config_get_gconf_client ();
send_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/send_html", NULL);
-
+
parent = gtk_widget_get_toplevel ((GtkWidget *) prefs);
parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
-
+
em_composer_prefs_new_signature ((GtkWindow *) parent, send_html);
gtk_widget_grab_focus ((GtkWidget *)prefs->sig_list);
}
@@ -374,19 +374,19 @@ sig_add_script_response (GtkWidget *widget, int button, EMComposerPrefs *prefs)
GtkWidget *entry;
const char *name;
int argc;
-
+
if (button == GTK_RESPONSE_ACCEPT) {
entry = glade_xml_get_widget (prefs->sig_script_gui, "filechooserbutton_add_script");
script = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (entry));
-
+
entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name");
name = gtk_entry_get_text (GTK_ENTRY (entry));
if (script && *script && g_shell_parse_argv (script, &argc, &argv, NULL)) {
struct stat st;
-
+
if (g_stat (argv[0], &st) == 0 && S_ISREG (st.st_mode) && g_access (argv[0], X_OK) == 0) {
ESignature *sig;
-
+
if ((sig = g_object_get_data ((GObject *) entry, "sig"))) {
/* we're just editing an existing signature script */
g_free (sig->name);
@@ -397,27 +397,27 @@ sig_add_script_response (GtkWidget *widget, int button, EMComposerPrefs *prefs)
} else {
sig = mail_config_signature_new (script, TRUE, TRUE);
sig->name = g_strdup (name);
-
+
e_signature_list_add (mail_config_get_signatures (), sig);
g_object_unref (sig);
}
-
+
mail_config_save_signatures();
gtk_widget_hide (prefs->sig_script_dialog);
g_strfreev (argv);
g_free (script);
-
+
return;
}
}
-
+
e_error_run((GtkWindow *)prefs->sig_script_dialog, "mail:signature-notscript", argv ? argv[0] : script, NULL);
g_strfreev (argv);
g_free (script);
return;
}
-
+
gtk_widget_hide (widget);
}
@@ -425,12 +425,12 @@ static void
sig_add_script_cb (GtkWidget *widget, EMComposerPrefs *prefs)
{
GtkWidget *entry;
-
+
entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name");
gtk_entry_set_text (GTK_ENTRY (entry), _("Unnamed"));
-
+
g_object_set_data ((GObject *) entry, "sig", NULL);
-
+
gtk_window_present ((GtkWindow *) prefs->sig_script_dialog);
}
@@ -441,14 +441,14 @@ sig_selection_changed (GtkTreeSelection *selection, EMComposerPrefs *prefs)
GtkTreeIter iter;
ESignature *sig;
int state;
-
+
state = gtk_tree_selection_get_selected (selection, &model, &iter);
if (state) {
gtk_tree_model_get (model, &iter, 1, &sig, -1);
sig_load_preview (prefs, sig);
} else
sig_load_preview (prefs, NULL);
-
+
gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_delete, state);
gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_edit, state);
}
@@ -459,27 +459,27 @@ sig_fill_list (EMComposerPrefs *prefs)
ESignatureList *signatures;
GtkListStore *model;
EIterator *it;
-
+
model = (GtkListStore *) gtk_tree_view_get_model (prefs->sig_list);
gtk_list_store_clear (model);
-
+
signatures = mail_config_get_signatures ();
it = e_list_get_iterator ((EList *) signatures);
-
+
while (e_iterator_is_valid (it)) {
ESignature *sig;
-
+
sig = (ESignature *) e_iterator_get (it);
signature_added (signatures, sig, prefs);
-
+
e_iterator_next (it);
}
-
+
g_object_unref (it);
-
+
gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_edit, FALSE);
gtk_widget_set_sensitive ((GtkWidget *) prefs->sig_delete, FALSE);
-
+
prefs->sig_added_id = g_signal_connect (signatures, "signature-added", G_CALLBACK (signature_added), prefs);
prefs->sig_removed_id = g_signal_connect (signatures, "signature-removed", G_CALLBACK (signature_removed), prefs);
prefs->sig_changed_id = g_signal_connect (signatures, "signature-changed", G_CALLBACK (signature_changed), prefs);
@@ -493,7 +493,7 @@ url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle)
ssize_t size;
int fd;
char *filename;
-
+
if (!strncmp (url, "file:", 5))
filename = g_filename_from_uri (url, NULL, NULL);
else
@@ -512,7 +512,7 @@ url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle)
}
} else
status = GTK_HTML_STREAM_ERROR;
-
+
gtk_html_end (html, handle, status);
if (fd > 0)
close (fd);
@@ -542,37 +542,37 @@ spell_set_ui (EMComposerPrefs *prefs)
gboolean go;
char *lang;
int i;
-
+
prefs->spell_active = FALSE;
-
+
/* setup the language list */
if (!(lang = gconf_client_get_string (prefs->gconf, GNOME_SPELL_GCONF_DIR "/language", &err)) || err) {
g_free (lang);
g_clear_error (&err);
lang = g_strdup (e_iconv_locale_language ());
}
-
+
present = g_hash_table_new (g_str_hash, g_str_equal);
if (lang && (strv = g_strsplit (lang, " ", 0))) {
for (i = 0; strv[i]; i++)
g_hash_table_insert (present, strv[i], strv[i]);
}
-
+
g_free (lang);
-
+
model = (GtkListStore *) gtk_tree_view_get_model (prefs->language);
for (go = gtk_tree_model_get_iter_first ((GtkTreeModel *) model, &iter); go;
go = gtk_tree_model_iter_next ((GtkTreeModel *) model, &iter)) {
char *abbr;
-
+
gtk_tree_model_get ((GtkTreeModel *) model, &iter, 2, &abbr, -1);
gtk_list_store_set (model, &iter, 0, g_hash_table_lookup (present, abbr) != NULL, -1);
}
-
+
g_hash_table_destroy (present);
if (strv != NULL)
g_strfreev (strv);
-
+
color.red = gconf_client_get_int (prefs->gconf,
GNOME_SPELL_GCONF_DIR "/spell_error_color_red", NULL);
color.green = gconf_client_get_int (prefs->gconf,
@@ -580,7 +580,7 @@ spell_set_ui (EMComposerPrefs *prefs)
color.blue = gconf_client_get_int (prefs->gconf,
GNOME_SPELL_GCONF_DIR "/spell_error_color_blue", NULL);
gtk_color_button_set_color (GTK_COLOR_BUTTON (prefs->color), &color);
-
+
prefs->spell_active = TRUE;
}
@@ -609,36 +609,36 @@ spell_get_language_str (EMComposerPrefs *prefs)
GtkTreeIter iter;
GString *str;
char *rv;
-
+
model = (GtkListStore *) gtk_tree_view_get_model (prefs->language);
if (!gtk_tree_model_get_iter_first ((GtkTreeModel *) model, &iter))
return NULL;
-
+
str = g_string_new ("");
-
+
do {
gboolean state;
char *abbr;
-
+
gtk_tree_model_get ((GtkTreeModel *) model, &iter, 0, &state, 2, &abbr, -1);
-
+
if (state) {
if (str->len)
g_string_append_c (str, ' ');
g_string_append (str, abbr);
}
-
+
if (!gtk_tree_model_iter_next ((GtkTreeModel *) model, &iter))
break;
} while (1);
-
+
rv = str->str;
g_string_free (str, FALSE);
-
+
return rv;
}
-static void
+static void
spell_language_toggled (GtkCellRendererToggle *renderer, const char *path_string, EMComposerPrefs *prefs)
{
GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
@@ -646,12 +646,12 @@ spell_language_toggled (GtkCellRendererToggle *renderer, const char *path_string
GtkTreeIter iter;
gboolean enabled;
char *str;
-
+
model = gtk_tree_view_get_model (prefs->language);
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (model, &iter, 0, &enabled, -1);
gtk_list_store_set ((GtkListStore *) model, &iter, 0, !enabled, -1);
-
+
str = spell_get_language_str (prefs);
gconf_client_set_string (prefs->gconf, GNOME_SPELL_GCONF_DIR "/language", str ? str : "", NULL);
g_free (str);
@@ -666,9 +666,9 @@ spell_setup (EMComposerPrefs *prefs)
GtkTreeIter iter;
GtkWidget *widget;
int i;
-
+
model = (GtkListStore *) gtk_tree_view_get_model (prefs->language);
-
+
if (prefs->language_seq) {
for (i = 0; i < prefs->language_seq->_length; i++) {
gtk_list_store_append (model, &iter);
@@ -678,9 +678,9 @@ spell_setup (EMComposerPrefs *prefs)
-1);
}
}
-
+
spell_set_ui (prefs);
-
+
widget = glade_xml_get_widget (prefs->gui, "colorButtonSpellCheckColor");
g_signal_connect (widget, "color_set", G_CALLBACK (spell_color_set), prefs);
}
@@ -691,28 +691,28 @@ spell_setup_check_options (EMComposerPrefs *prefs)
GNOME_Spell_Dictionary dict;
CORBA_Environment ev;
char *dictionary_id;
-
+
dictionary_id = "OAFIID:GNOME_Spell_Dictionary:" SPELL_API_VERSION;
dict = bonobo_activation_activate_from_id (dictionary_id, 0, NULL, NULL);
if (dict == CORBA_OBJECT_NIL) {
g_warning ("Cannot activate %s", dictionary_id);
-
+
return FALSE;
}
-
+
CORBA_exception_init (&ev);
prefs->language_seq = GNOME_Spell_Dictionary_getLanguages (dict, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
prefs->language_seq = NULL;
CORBA_exception_free (&ev);
-
+
if (prefs->language_seq == NULL)
return FALSE;
-
+
gconf_client_add_dir (prefs->gconf, GNOME_SPELL_GCONF_DIR, GCONF_CLIENT_PRELOAD_NONE, NULL);
-
+
spell_setup (prefs);
-
+
return TRUE;
}
@@ -725,9 +725,9 @@ static void
attach_style_info (GtkWidget *item, gpointer user_data)
{
int *style = user_data;
-
+
g_object_set_data ((GObject *) item, "style", GINT_TO_POINTER (*style));
-
+
(*style)++;
}
@@ -735,7 +735,7 @@ static void
toggle_button_toggled (GtkToggleButton *toggle, EMComposerPrefs *prefs)
{
const char *key;
-
+
key = g_object_get_data ((GObject *) toggle, "key");
gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL);
}
@@ -745,10 +745,10 @@ style_activate (GtkWidget *item, EMComposerPrefs *prefs)
{
const char *key;
int style;
-
+
key = g_object_get_data ((GObject *) item, "key");
style = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "style"));
-
+
gconf_client_set_int (prefs->gconf, key, style, NULL);
}
@@ -757,11 +757,11 @@ charset_activate (GtkWidget *item, EMComposerPrefs *prefs)
{
GtkWidget *menu;
char *string;
-
+
menu = gtk_option_menu_get_menu (prefs->charset);
if (!(string = e_charset_picker_get_charset (menu)))
string = g_strdup (e_iconv_locale_charset ());
-
+
gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/composer/charset", string, NULL);
g_free (string);
}
@@ -771,9 +771,9 @@ option_menu_connect (EMComposerPrefs *prefs, GtkOptionMenu *omenu, GCallback cal
{
GtkWidget *menu, *item;
GList *items;
-
+
menu = gtk_option_menu_get_menu (omenu);
-
+
items = GTK_MENU_SHELL (menu)->children;
while (items) {
item = items->data;
@@ -781,7 +781,7 @@ option_menu_connect (EMComposerPrefs *prefs, GtkOptionMenu *omenu, GCallback cal
g_signal_connect (item, "activate", callback, prefs);
items = items->next;
}
-
+
if (!gconf_client_key_is_writable (prefs->gconf, key, NULL))
gtk_widget_set_sensitive ((GtkWidget *) omenu, FALSE);
}
@@ -790,13 +790,13 @@ static void
toggle_button_init (EMComposerPrefs *prefs, GtkToggleButton *toggle, int not, const char *key)
{
gboolean bool;
-
+
bool = gconf_client_get_bool (prefs->gconf, key, NULL);
gtk_toggle_button_set_active (toggle, not ? !bool : bool);
-
+
g_object_set_data ((GObject *) toggle, "key", (void *) key);
g_signal_connect (toggle, "toggled", G_CALLBACK (toggle_button_toggled), prefs);
-
+
if (!gconf_client_key_is_writable (prefs->gconf, key, NULL))
gtk_widget_set_sensitive ((GtkWidget *) toggle, FALSE);
}
@@ -832,8 +832,8 @@ emcp_free(EConfig *ec, GSList *items, void *data)
}
static gboolean
-signature_key_press (GtkTreeView *tree_view, GdkEventKey *event, EMComposerPrefs *prefs)
-{
+signature_key_press (GtkTreeView *tree_view, GdkEventKey *event, EMComposerPrefs *prefs)
+{
gboolean ret = FALSE;
/* No need to care about anything other than DEL key */
@@ -845,16 +845,16 @@ signature_key_press (GtkTreeView *tree_view, GdkEventKey *event, EMComposerPrefs
return ret;
}
-static gboolean
+static gboolean
sig_tree_event_cb (GtkTreeView *tree_view, GdkEvent *event, EMComposerPrefs *prefs)
{
gboolean ret = FALSE;
-
+
if (event->type == GDK_2BUTTON_PRESS) {
sig_edit_cb ((GtkWidget *)tree_view, prefs);
ret = TRUE;
- }
-
+ }
+
return ret;
}
@@ -874,9 +874,9 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
GSList *l;
int i;
char *gladefile;
-
+
prefs->gconf = mail_config_get_gconf_client ();
-
+
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"mail-config.glade",
NULL);
@@ -900,24 +900,24 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
e_config_add_items((EConfig *)ec, l, NULL, NULL, emcp_free, prefs);
/* General tab */
-
+
/* Default Behavior */
prefs->send_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkSendHTML"));
toggle_button_init (prefs, prefs->send_html, FALSE,
"/apps/evolution/mail/composer/send_html");
-
+
prefs->prompt_empty_subject = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptEmptySubject"));
toggle_button_init (prefs, prefs->prompt_empty_subject, FALSE,
"/apps/evolution/mail/prompts/empty_subject");
-
+
prefs->prompt_bcc_only = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptBccOnly"));
toggle_button_init (prefs, prefs->prompt_bcc_only, FALSE,
"/apps/evolution/mail/prompts/only_bcc");
-
+
prefs->auto_smileys = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkAutoSmileys"));
toggle_button_init (prefs, prefs->auto_smileys, FALSE,
"/apps/evolution/mail/composer/magic_smileys");
-
+
prefs->top_signature = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkTopSignature"));
toggle_button_init (prefs, prefs->top_signature, FALSE,
"/apps/evolution/mail/composer/top_signature");
@@ -925,7 +925,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
prefs->spell_check = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEnableSpellChecking"));
toggle_button_init (prefs, prefs->spell_check, FALSE,
"/apps/evolution/mail/composer/inline_spelling");
-
+
prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset"));
buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/composer/charset", NULL);
menu = e_charset_picker_new (buf && *buf ? buf : e_iconv_locale_charset ());
@@ -933,7 +933,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
option_menu_connect (prefs, prefs->charset, G_CALLBACK (charset_activate),
"/apps/evolution/mail/composer/charset");
g_free (buf);
-
+
/* Spell Checking: GNOME Spell part */
prefs->color = GTK_COLOR_BUTTON (glade_xml_get_widget (gui, "colorButtonSpellCheckColor"));
prefs->language = GTK_TREE_VIEW (glade_xml_get_widget (gui, "listSpellCheckLanguage"));
@@ -945,7 +945,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
"active", 0,
NULL);
g_signal_connect (cell_renderer, "toggled", G_CALLBACK (spell_language_toggled), prefs);
-
+
gtk_tree_view_insert_column_with_attributes (prefs->language, -1, _("Language(s)"),
gtk_cell_renderer_text_new (),
"text", 1,
@@ -958,7 +958,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
gtk_widget_hide (GTK_WIDGET (prefs->color));
gtk_widget_hide (GTK_WIDGET (prefs->language));
}
-
+
/* Forwards and Replies */
prefs->forward_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuForwardStyle"));
style = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/format/forward_style", NULL);
@@ -968,7 +968,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
attach_style_info, &style);
option_menu_connect (prefs, prefs->forward_style, G_CALLBACK (style_activate),
"/apps/evolution/mail/format/forward_style");
-
+
prefs->reply_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuReplyStyle"));
style = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/format/reply_style", NULL);
gtk_option_menu_set_history (prefs->reply_style, style);
@@ -977,14 +977,14 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
attach_style_info, &style);
option_menu_connect (prefs, prefs->reply_style, G_CALLBACK (style_activate),
"/apps/evolution/mail/format/reply_style");
-
+
/* Signatures */
dialog = (GtkDialog *) gtk_dialog_new ();
-
+
gtk_widget_realize ((GtkWidget *) dialog);
gtk_container_set_border_width ((GtkContainer *)dialog->action_area, 12);
gtk_container_set_border_width ((GtkContainer *)dialog->vbox, 0);
-
+
prefs->sig_script_dialog = (GtkWidget *) dialog;
gtk_dialog_add_buttons (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
@@ -993,19 +993,19 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
g_signal_connect (dialog, "response", G_CALLBACK (sig_add_script_response), prefs);
widget = glade_xml_get_widget (prefs->sig_script_gui, "vbox_add_script_signature");
gtk_box_pack_start ((GtkBox *) dialog->vbox, widget, TRUE, TRUE, 0);
-
+
prefs->sig_add = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureAdd"));
g_signal_connect (prefs->sig_add, "clicked", G_CALLBACK (sig_add_cb), prefs);
-
+
prefs->sig_add_script = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureAddScript"));
g_signal_connect (prefs->sig_add_script, "clicked", G_CALLBACK (sig_add_script_cb), prefs);
-
+
prefs->sig_edit = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureEdit"));
g_signal_connect (prefs->sig_edit, "clicked", G_CALLBACK (sig_edit_cb), prefs);
-
+
prefs->sig_delete = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureDelete"));
g_signal_connect (prefs->sig_delete, "clicked", G_CALLBACK (sig_delete_cb), prefs);
-
+
prefs->sig_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "listSignatures"));
model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
gtk_tree_view_set_model (prefs->sig_list, (GtkTreeModel *)model);
@@ -1017,9 +1017,9 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
g_signal_connect (selection, "changed", G_CALLBACK (sig_selection_changed), prefs);
g_signal_connect (prefs->sig_list, "event", G_CALLBACK (sig_tree_event_cb), prefs);
-
+
sig_fill_list (prefs);
-
+
/* preview GtkHTML widget */
widget = glade_xml_get_widget (gui, "scrolled-sig");
prefs->sig_preview = (GtkHTML *) gtk_html_new ();
@@ -1032,7 +1032,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs)
e_config_set_target((EConfig *)ec, (EConfigTarget *)target);
toplevel = e_config_create_widget((EConfig *)ec);
gtk_container_add (GTK_CONTAINER (prefs), toplevel);
-
+
g_signal_connect (prefs->sig_list, "key-press-event", G_CALLBACK(signature_key_press), prefs);
}
@@ -1040,9 +1040,9 @@ GtkWidget *
em_composer_prefs_new (void)
{
EMComposerPrefs *new;
-
+
new = (EMComposerPrefs *) g_object_new (em_composer_prefs_get_type (), NULL);
em_composer_prefs_construct (new);
-
+
return (GtkWidget *) new;
}
diff --git a/mail/em-composer-prefs.h b/mail/em-composer-prefs.h
index e6e3638dd9..9a34dcda0a 100644
--- a/mail/em-composer-prefs.h
+++ b/mail/em-composer-prefs.h
@@ -55,36 +55,36 @@ struct _GtkWindow;
struct _EMComposerPrefs {
GtkVBox parent_object;
-
+
struct _GConfClient *gconf;
-
+
struct _GladeXML *gui;
-
+
/* General tab */
-
+
/* Default Behavior */
struct _GtkToggleButton *send_html;
struct _GtkToggleButton *auto_smileys;
struct _GtkToggleButton *prompt_empty_subject;
struct _GtkToggleButton *prompt_bcc_only;
struct _GtkOptionMenu *charset;
-
+
struct _GtkToggleButton *spell_check;
struct _GtkColorButton *color;
struct _GtkTreeView *language;
CORBA_sequence_GNOME_Spell_Language *language_seq;
gboolean spell_active;
-
+
struct _GdkPixbuf *enabled_pixbuf;
-
+
/* Forwards and Replies */
struct _GtkOptionMenu *forward_style;
struct _GtkOptionMenu *reply_style;
struct _GtkToggleButton *top_signature;
-
+
/* Keyboard Shortcuts */
struct _GtkOptionMenu *shortcuts_type;
-
+
/* Signatures */
struct _GtkTreeView *sig_list;
GHashTable *sig_hash;
@@ -93,10 +93,10 @@ struct _EMComposerPrefs {
struct _GtkButton *sig_edit;
struct _GtkButton *sig_delete;
struct _GtkHTML *sig_preview;
-
+
struct _GladeXML *sig_script_gui;
struct _GtkWidget *sig_script_dialog;
-
+
guint sig_added_id;
guint sig_removed_id;
guint sig_changed_id;
@@ -104,9 +104,9 @@ struct _EMComposerPrefs {
struct _EMComposerPrefsClass {
GtkVBoxClass parent_class;
-
+
/* signals */
-
+
};
GType em_composer_prefs_get_type (void);
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index ab3e6c7812..580c9650f9 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -70,10 +70,10 @@ static EAccount * guess_account (CamelMimeMessage *message, CamelFolder *folder)
struct emcs_t {
unsigned int ref_count;
-
+
CamelFolder *drafts_folder;
char *drafts_uid;
-
+
CamelFolder *folder;
guint32 flags, set;
char *uid;
@@ -83,7 +83,7 @@ static struct emcs_t *
emcs_new (void)
{
struct emcs_t *emcs;
-
+
emcs = g_new (struct emcs_t, 1);
emcs->ref_count = 1;
emcs->drafts_folder = NULL;
@@ -92,7 +92,7 @@ emcs_new (void)
emcs->flags = 0;
emcs->set = 0;
emcs->uid = NULL;
-
+
return emcs;
}
@@ -102,7 +102,7 @@ free_emcs (struct emcs_t *emcs)
if (emcs->drafts_folder)
camel_object_unref (emcs->drafts_folder);
g_free (emcs->drafts_uid);
-
+
if (emcs->folder)
camel_object_unref (emcs->folder);
g_free (emcs->uid);
@@ -135,14 +135,14 @@ ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EDestination **recip
gboolean res;
GString *str;
int i;
-
+
str = g_string_new("");
for (i = 0; recipients[i] != NULL; ++i) {
if (!e_destination_get_html_mail_pref (recipients[i])) {
const char *name;
-
+
name = e_destination_get_textrep (recipients[i], FALSE);
-
+
g_string_append_printf (str, " %s\n", name);
}
}
@@ -173,7 +173,7 @@ ask_confirm_for_only_bcc (EMsgComposer *composer, gboolean hidden_list_case)
realizing it. To try to avoid being totally confusing, I've changed
this dialog to provide slightly different text in that case, to
better explain what the hell is going on. */
-
+
return em_utils_prompt_user((GtkWindow *)composer, "/apps/evolution/mail/prompts/only_bcc",
hidden_list_case?"mail:ask-send-only-bcc-contact":"mail:ask-send-only-bcc", NULL);
}
@@ -190,9 +190,9 @@ composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag
{
struct emcs_t *emcs;
struct _send_data *send = data;
-
+
emcs = send->emcs;
-
+
if (queued) {
if (emcs && emcs->drafts_folder) {
/* delete the old draft message */
@@ -204,7 +204,7 @@ composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag
g_free (emcs->drafts_uid);
emcs->drafts_uid = NULL;
}
-
+
if (emcs && emcs->folder) {
/* set any replied flags etc */
camel_folder_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
@@ -214,9 +214,9 @@ composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag
g_free (emcs->uid);
emcs->uid = NULL;
}
-
+
gtk_widget_destroy (GTK_WIDGET (send->composer));
-
+
if (send->send && camel_session_is_online (session)) {
/* queue a message send */
mail_send ();
@@ -228,20 +228,20 @@ composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag
0, NULL, em_utils_composer_send_cb, NULL);
g_signal_handlers_disconnect_matched (send->composer, G_SIGNAL_MATCH_FUNC, 0,
0, NULL, em_utils_composer_save_draft_cb, NULL);
-
+
/* reconnect to the signals using a non-NULL emcs for the callback data */
em_composer_utils_setup_default_callbacks (send->composer);
}
-
+
e_msg_composer_set_enable_autosave (send->composer, TRUE);
gtk_widget_show (GTK_WIDGET (send->composer));
}
-
+
camel_message_info_free (info);
-
+
if (send->emcs)
emcs_unref (send->emcs);
-
+
g_object_unref (send->composer);
g_free (send);
}
@@ -262,23 +262,23 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
GList *postlist;
EMEvent *eme;
EMEventTargetComposer *target;
-
+
gconf = mail_config_get_gconf_client ();
-
+
/* We should do all of the validity checks based on the composer, and not on
the created message, as extra interaction may occur when we get the message
(e.g. to get a passphrase to sign a message) */
-
+
/* get the message recipients */
recipients = e_msg_composer_get_recipients (composer);
-
+
cia = camel_internet_address_new ();
-
+
/* see which ones are visible/present, etc */
if (recipients) {
for (i = 0; recipients[i] != NULL; i++) {
const char *addr = e_destination_get_address (recipients[i]);
-
+
if (addr && addr[0]) {
camel_address_decode ((CamelAddress *) cia, addr);
if (camel_address_length ((CamelAddress *) cia) > 0) {
@@ -294,12 +294,12 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
}
}
}
-
+
recipients_bcc = e_msg_composer_get_bcc (composer);
if (recipients_bcc) {
for (i = 0; recipients_bcc[i] != NULL; i++) {
const char *addr = e_destination_get_address (recipients_bcc[i]);
-
+
if (addr && addr[0]) {
camel_address_decode ((CamelAddress *) cia, addr);
if (camel_address_length ((CamelAddress *) cia) > 0) {
@@ -308,65 +308,65 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
}
}
}
-
+
e_destination_freev (recipients_bcc);
}
-
+
camel_object_unref (cia);
postlist = e_msg_composer_hdrs_get_post_to(e_msg_composer_get_hdrs (composer));
num_post = g_list_length(postlist);
g_list_foreach(postlist, (GFunc)g_free, NULL);
g_list_free(postlist);
-
+
/* I'm sensing a lack of love, er, I mean recipients. */
if (num == 0 && num_post == 0) {
e_error_run((GtkWindow *)composer, "mail:send-no-recipients", NULL);
goto finished;
}
-
+
if (num > 0 && (num == num_bcc || shown == 0)) {
- /* this means that the only recipients are Bcc's */
+ /* this means that the only recipients are Bcc's */
if (!ask_confirm_for_only_bcc (composer, shown == 0))
goto finished;
}
-
+
send_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/composer/send_html", NULL);
confirm_html = gconf_client_get_bool (gconf, "/apps/evolution/mail/prompts/unwanted_html", NULL);
-
+
/* Only show this warning if our default is to send html. If it isn't, we've
manually switched into html mode in the composer and (presumably) had a good
reason for doing this. */
if (e_msg_composer_get_send_html (composer) && send_html && confirm_html) {
gboolean html_problem = FALSE;
-
+
if (recipients) {
for (i = 0; recipients[i] != NULL && !html_problem; i++) {
if (!e_destination_get_html_mail_pref (recipients[i]))
html_problem = TRUE;
}
}
-
+
if (html_problem) {
html_problem = !ask_confirm_for_unwanted_html_mail (composer, recipients);
if (html_problem)
goto finished;
}
}
-
+
/* Check for no subject */
subject = e_msg_composer_get_subject (composer);
if (subject == NULL || subject[0] == '\0') {
if (!ask_confirm_for_empty_subject (composer))
goto finished;
}
-
+
/** @Event: composer.presendchecks
* @Title: Composer PreSend Checks
* @Target: EMEventTargetMessage
- *
+ *
* composer.presendchecks is emitted during pre-checks for the message just before sending.
- * Since the e-plugin framework doesn't provide a way to return a value from the plugin,
+ * Since the e-plugin framework doesn't provide a way to return a value from the plugin,
* use 'presend_check_status' to set whether the check passed / failed.
*/
eme = em_event_peek();
@@ -382,10 +382,10 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
message = e_msg_composer_get_message (composer, save_html_object_data);
if (message == NULL)
goto finished;
-
+
/* Add info about the sending account */
account = e_msg_composer_get_preferred_account (composer);
-
+
if (account) {
/* FIXME: Why isn't this crap just in e_msg_composer_get_message? */
camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Account", account->uid);
@@ -393,18 +393,18 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data)
camel_medium_set_header (CAMEL_MEDIUM (message), "X-Evolution-Fcc", account->sent_folder_uri);
if (account->id->organization && *account->id->organization) {
char *org;
-
+
org = camel_header_encode_string ((const unsigned char *)account->id->organization);
camel_medium_set_header (CAMEL_MEDIUM (message), "Organization", org);
g_free (org);
}
}
-
+
finished:
-
+
if (recipients)
e_destination_freev (recipients);
-
+
return message;
}
@@ -428,11 +428,11 @@ em_utils_composer_send_cb (EMsgComposer *composer, gpointer user_data)
mail_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX);
camel_object_ref (mail_folder);
-
+
/* mail the message */
info = camel_message_info_new(NULL);
camel_message_info_set_flags(info, CAMEL_MESSAGE_SEEN, ~0);
-
+
send = g_malloc (sizeof (*send));
send->emcs = user_data;
if (send->emcs)
@@ -443,7 +443,7 @@ em_utils_composer_send_cb (EMsgComposer *composer, gpointer user_data)
gtk_widget_hide (GTK_WIDGET (composer));
e_msg_composer_set_enable_autosave (composer, FALSE);
-
+
mail_append_mail (mail_folder, message, info, composer_send_queued_cb, send);
camel_object_unref (mail_folder);
camel_object_unref (message);
@@ -462,23 +462,23 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i
{
struct _save_draft_info *sdi = user_data;
struct emcs_t *emcs;
-
+
if (!ok)
goto done;
e_msg_composer_set_saved (sdi->composer);
-
+
if ((emcs = sdi->emcs) == NULL) {
emcs = emcs_new ();
-
+
/* disconnect the previous signal handlers */
g_signal_handlers_disconnect_by_func (sdi->composer, G_CALLBACK (em_utils_composer_send_cb), NULL);
g_signal_handlers_disconnect_by_func (sdi->composer, G_CALLBACK (em_utils_composer_save_draft_cb), NULL);
-
+
/* reconnect to the signals using a non-NULL emcs for the callback data */
em_composer_utils_setup_default_callbacks (sdi->composer);
}
-
+
if (emcs->drafts_folder) {
/* delete the original draft message */
camel_folder_set_message_flags (emcs->drafts_folder, emcs->drafts_uid,
@@ -489,7 +489,7 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i
g_free (emcs->drafts_uid);
emcs->drafts_uid = NULL;
}
-
+
if (emcs->folder) {
/* set the replied flags etc */
camel_folder_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
@@ -498,16 +498,16 @@ save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *i
g_free (emcs->uid);
emcs->uid = NULL;
}
-
+
if (appended_uid) {
camel_object_ref (folder);
emcs->drafts_folder = folder;
emcs->drafts_uid = g_strdup (appended_uid);
}
-
+
if (sdi->quit)
gtk_widget_destroy (GTK_WIDGET (sdi->composer));
-
+
done:
g_object_unref (sdi->composer);
if (sdi->emcs)
@@ -520,7 +520,7 @@ static void
save_draft_folder (char *uri, CamelFolder *folder, gpointer data)
{
CamelFolder **save = data;
-
+
if (folder) {
*save = folder;
camel_object_ref (folder);
@@ -556,10 +556,10 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer, int quit, gpointer user
if (account && account->drafts_folder_uri &&
strcmp (account->drafts_folder_uri, default_drafts_folder_uri) != 0) {
int id;
-
+
id = mail_get_folder (account->drafts_folder_uri, 0, save_draft_folder, &folder, mail_thread_new);
mail_msg_wait (id);
-
+
if (!folder || !account->enabled) {
if (e_error_run((GtkWindow *)composer, "mail:ask-default-drafts", NULL) != GTK_RESPONSE_YES) {
g_object_unref(composer);
@@ -569,7 +569,7 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer, int quit, gpointer user
g_free(sdi);
return;
}
-
+
folder = drafts_folder;
camel_object_ref (drafts_folder);
}
@@ -577,7 +577,7 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer, int quit, gpointer user
folder = drafts_folder;
camel_object_ref (folder);
}
-
+
info = camel_message_info_new(NULL);
camel_message_info_set_flags(info, CAMEL_MESSAGE_DRAFT | CAMEL_MESSAGE_SEEN, ~0);
@@ -591,9 +591,9 @@ em_composer_utils_setup_callbacks (EMsgComposer *composer, CamelFolder *folder,
guint32 flags, guint32 set, CamelFolder *drafts, const char *drafts_uid)
{
struct emcs_t *emcs;
-
+
emcs = emcs_new ();
-
+
if (folder && uid) {
camel_object_ref (folder);
emcs->folder = folder;
@@ -601,16 +601,16 @@ em_composer_utils_setup_callbacks (EMsgComposer *composer, CamelFolder *folder,
emcs->flags = flags;
emcs->set = set;
}
-
+
if (drafts && drafts_uid) {
camel_object_ref (drafts);
emcs->drafts_folder = drafts;
emcs->drafts_uid = g_strdup (drafts_uid);
}
-
+
g_signal_connect (composer, "send", G_CALLBACK (em_utils_composer_send_cb), emcs);
g_signal_connect (composer, "save-draft", G_CALLBACK (em_utils_composer_save_draft_cb), emcs);
-
+
g_object_weak_ref ((GObject *) composer, (GWeakNotify) composer_destroy_cb, emcs);
}
@@ -677,12 +677,12 @@ em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri)
{
EMsgComposer *composer;
EAccount *account = NULL;
-
+
if (url != NULL)
composer = e_msg_composer_new_from_url (url);
else
composer = e_msg_composer_new ();
-
+
em_composer_utils_setup_default_callbacks (composer);
if (fromuri
@@ -691,7 +691,7 @@ em_utils_compose_new_message_with_mailto (const char *url, const char *fromuri)
e_msg_composer_unset_changed (composer);
e_msg_composer_drop_editor_undo (composer);
-
+
gtk_widget_show ((GtkWidget *) composer);
gdk_window_raise (((GtkWidget *) composer)->window);
}
@@ -709,28 +709,28 @@ em_utils_post_to_folder (CamelFolder *folder)
{
EMsgComposer *composer;
EAccount *account;
-
+
composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_POST);
-
+
if (folder != NULL) {
char *url = mail_tools_folder_to_url (folder);
-
+
e_msg_composer_hdrs_set_post_to (e_msg_composer_get_hdrs (composer), url);
g_free (url);
-
+
url = camel_url_to_string (CAMEL_SERVICE (folder->parent_store)->url, CAMEL_URL_HIDE_ALL);
account = mail_config_get_account_by_source_url (url);
g_free (url);
-
+
if (account)
e_msg_composer_hdrs_set_from_account (e_msg_composer_get_hdrs(composer), account->name);
}
-
+
em_composer_utils_setup_default_callbacks (composer);
-
+
e_msg_composer_unset_changed (composer);
e_msg_composer_drop_editor_undo (composer);
-
+
gtk_widget_show ((GtkWidget *) composer);
}
@@ -746,17 +746,17 @@ void
em_utils_post_to_url (const char *url)
{
EMsgComposer *composer;
-
+
composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_POST);
-
+
if (url != NULL)
e_msg_composer_hdrs_set_post_to (e_msg_composer_get_hdrs (composer), url);
-
+
em_composer_utils_setup_default_callbacks (composer);
-
+
e_msg_composer_unset_changed (composer);
e_msg_composer_drop_editor_undo (composer);
-
+
gtk_widget_show ((GtkWidget *) composer);
}
@@ -771,7 +771,7 @@ edit_message (CamelMimeMessage *message, CamelFolder *drafts, const char *uid)
em_composer_utils_setup_callbacks (composer, NULL, NULL, 0, 0, drafts, uid);
e_msg_composer_unset_changed (composer);
e_msg_composer_drop_editor_undo (composer);
-
+
gtk_widget_show (GTK_WIDGET (composer));
}
@@ -786,7 +786,7 @@ void
em_utils_edit_message (CamelMimeMessage *message)
{
g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
-
+
edit_message (message, NULL, NULL);
}
@@ -795,13 +795,13 @@ edit_messages (CamelFolder *folder, GPtrArray *uids, GPtrArray *msgs, void *user
{
gboolean replace = GPOINTER_TO_INT (user_data);
int i;
-
+
if (msgs == NULL)
return;
-
+
for (i = 0; i < msgs->len; i++) {
camel_medium_remove_header (CAMEL_MEDIUM (msgs->pdata[i]), "X-Mailer");
-
+
if (replace)
edit_message (msgs->pdata[i], folder, uids->pdata[i]);
else
@@ -822,7 +822,7 @@ em_utils_edit_messages (CamelFolder *folder, GPtrArray *uids, gboolean replace)
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
-
+
mail_get_messages (folder, uids, edit_messages, GINT_TO_POINTER (replace));
}
@@ -831,7 +831,7 @@ static void
forward_attached (CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, char *subject, const char *fromuri)
{
EMsgComposer *composer;
-
+
composer = create_new_composer (subject, fromuri);
if (composer == NULL)
return;
@@ -839,7 +839,7 @@ forward_attached (CamelFolder *folder, GPtrArray *messages, CamelMimePart *part,
e_msg_composer_attach (composer, part);
e_msg_composer_unset_changed (composer);
e_msg_composer_drop_editor_undo (composer);
-
+
gtk_widget_show (GTK_WIDGET (composer));
}
@@ -868,7 +868,7 @@ em_utils_forward_attached (CamelFolder *folder, GPtrArray *uids, const char *fro
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
-
+
mail_build_attachment (folder, uids, forward_attached_cb, g_strdup(fromuri));
}
@@ -893,9 +893,9 @@ forward_non_attached (GPtrArray *messages, int style, const char *fromuri)
message = messages->pdata[i];
subject = mail_tool_generate_forward_subject (message);
-
+
text = em_utils_message_to_html (message, _("-------- Forwarded Message --------"), flags, &len, NULL);
-
+
if (text) {
composer = create_new_composer (subject, fromuri);
@@ -906,12 +906,12 @@ forward_non_attached (GPtrArray *messages, int style, const char *fromuri)
e_msg_composer_set_body_text (composer, text, len);
e_msg_composer_unset_changed (composer);
e_msg_composer_drop_editor_undo (composer);
-
+
gtk_widget_show (GTK_WIDGET (composer));
}
g_free (text);
}
-
+
g_free (subject);
}
}
@@ -936,7 +936,7 @@ em_utils_forward_inline (CamelFolder *folder, GPtrArray *uids, const char *fromu
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
-
+
mail_get_messages (folder, uids, forward_inline, g_strdup(fromuri));
}
@@ -961,7 +961,7 @@ em_utils_forward_quoted (CamelFolder *folder, GPtrArray *uids, const char *fromu
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
-
+
mail_get_messages (folder, uids, forward_quoted, g_strdup(fromuri));
}
@@ -981,20 +981,20 @@ em_utils_forward_message (CamelMimeMessage *message, const char *fromuri)
GConfClient *gconf;
char *subject;
int mode;
-
+
messages = g_ptr_array_new ();
g_ptr_array_add (messages, message);
-
+
gconf = mail_config_get_gconf_client ();
mode = gconf_client_get_int (gconf, "/apps/evolution/mail/format/forward_style", NULL);
-
+
switch (mode) {
case MAIL_CONFIG_FORWARD_ATTACHED:
default:
part = mail_tool_make_message_attachment (message);
-
+
subject = mail_tool_generate_forward_subject (message);
-
+
forward_attached (NULL, messages, part, subject, fromuri);
camel_object_unref (part);
g_free (subject);
@@ -1006,7 +1006,7 @@ em_utils_forward_message (CamelMimeMessage *message, const char *fromuri)
forward_non_attached (messages, MAIL_CONFIG_FORWARD_QUOTED, fromuri);
break;
}
-
+
g_ptr_array_free (messages, TRUE);
}
@@ -1023,10 +1023,10 @@ em_utils_forward_messages (CamelFolder *folder, GPtrArray *uids, const char *fro
{
GConfClient *gconf;
int mode;
-
+
gconf = mail_config_get_gconf_client ();
mode = gconf_client_get_int (gconf, "/apps/evolution/mail/format/forward_style", NULL);
-
+
switch (mode) {
case MAIL_CONFIG_FORWARD_ATTACHED:
default:
@@ -1048,19 +1048,19 @@ redirect_get_composer (CamelMimeMessage *message)
{
EMsgComposer *composer;
EAccount *account;
-
+
/* QMail will refuse to send a message if it finds one of
it's Delivered-To headers in the message, so remove all
Delivered-To headers. Fixes bug #23635. */
while (camel_medium_get_header (CAMEL_MEDIUM (message), "Delivered-To"))
camel_medium_remove_header (CAMEL_MEDIUM (message), "Delivered-To");
-
+
account = guess_account (message, NULL);
-
+
composer = e_msg_composer_new_redirect (message, account ? account->name : NULL);
-
+
em_composer_utils_setup_default_callbacks (composer);
-
+
return composer;
}
@@ -1075,11 +1075,11 @@ void
em_utils_redirect_message (CamelMimeMessage *message)
{
EMsgComposer *composer;
-
+
g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
-
+
composer = redirect_get_composer (message);
-
+
gtk_widget_show (GTK_WIDGET (composer));
e_msg_composer_unset_changed (composer);
e_msg_composer_drop_editor_undo (composer);
@@ -1090,7 +1090,7 @@ redirect_msg (CamelFolder *folder, const char *uid, CamelMimeMessage *message, v
{
if (message == NULL)
return;
-
+
em_utils_redirect_message (message);
}
@@ -1107,7 +1107,7 @@ em_utils_redirect_message_by_uid (CamelFolder *folder, const char *uid)
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uid != NULL);
-
+
mail_get_message (folder, uid, redirect_msg, NULL, mail_thread_new);
}
@@ -1151,7 +1151,7 @@ em_utils_handle_receipt (CamelFolder *folder, const char *uid, CamelMimeMessage
camel_message_info_set_user_flag(info, "receipt-handled", TRUE);
camel_message_info_free(info);
-
+
account = guess_account(msg, folder);
/* TODO: should probably decode/format the address, it could be in rfc2047 format */
@@ -1161,7 +1161,7 @@ em_utils_handle_receipt (CamelFolder *folder, const char *uid, CamelMimeMessage
while (camel_mime_is_lwsp(*addr))
addr++;
}
-
+
if (account && (account->receipt_policy == E_ACCOUNT_RECEIPT_ALWAYS || account->receipt_policy == E_ACCOUNT_RECEIPT_ASK)
&& e_error_run (NULL, "mail:ask-receipt", addr, camel_mime_message_get_subject(msg)) == GTK_RESPONSE_YES)
em_utils_send_receipt(folder, msg);
@@ -1187,7 +1187,7 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
CamelDataWrapper *receipt_text, *receipt_data;
CamelContentType *type;
CamelInternetAddress *addr;
- CamelStream *stream;
+ CamelStream *stream;
CamelFolder *out_folder;
CamelMessageInfo *info;
const char *message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-ID");
@@ -1201,27 +1201,27 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
if (!receipt_address)
return;
-
+
/* Collect information for the receipt */
-
+
/* We use camel_header_msgid_generate () to get a canonical
* hostname, then skip the part leading to '@' */
hostname = strchr ((fake_msgid = camel_header_msgid_generate ()), '@');
hostname++;
-
+
self_address = account->id->address;
if (!message_id)
message_id = "";
if (!message_date)
message_date ="";
-
+
/* Create toplevel container */
camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (body),
"multipart/report;"
"report-type=\"disposition-notification\"");
- camel_multipart_set_boundary (body, NULL);
-
+ camel_multipart_set_boundary (body, NULL);
+
/* Create textual receipt */
receipt_text = camel_data_wrapper_new ();
type = camel_content_type_new ("text", "plain");
@@ -1234,20 +1234,20 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
self_address, message_subject, message_date);
camel_data_wrapper_construct_from_stream (receipt_text, stream);
camel_object_unref (stream);
-
+
part = camel_mime_part_new ();
camel_medium_set_content_object (CAMEL_MEDIUM (part), receipt_text);
camel_object_unref (receipt_text);
camel_multipart_add_part (body, part);
- camel_object_unref (part);
-
+ camel_object_unref (part);
+
/* Create the machine-readable receipt */
receipt_data = camel_data_wrapper_new ();
stream = camel_stream_mem_new ();
part = camel_mime_part_new ();
ua = g_strdup_printf ("%s; %s", hostname, "Evolution " VERSION SUB_VERSION " " VERSION_COMMENT);
- recipient = g_strdup_printf ("rfc822; %s", self_address);
+ recipient = g_strdup_printf ("rfc822; %s", self_address);
type = camel_content_type_new ("message", "disposition-notification");
camel_data_wrapper_set_mime_type_field (CAMEL_DATA_WRAPPER (part), type);
@@ -1260,27 +1260,27 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
g_free (ua);
g_free (recipient);
g_free (fake_msgid);
-
+
camel_data_wrapper_construct_from_stream (receipt_data, stream);
camel_object_unref (stream);
camel_medium_set_content_object (CAMEL_MEDIUM (part), receipt_data);
camel_object_unref (receipt_data);
camel_multipart_add_part (body, part);
- camel_object_unref (part);
-
+ camel_object_unref (part);
+
/* Finish creating the message */
camel_medium_set_content_object (CAMEL_MEDIUM (receipt), CAMEL_DATA_WRAPPER (body));
camel_object_unref (body);
-
+
receipt_subject = g_strdup_printf ("Delivery Notification for: \"%s\"", message_subject);
camel_mime_message_set_subject (receipt, receipt_subject);
g_free (receipt_subject);
-
+
addr = camel_internet_address_new ();
camel_address_decode (CAMEL_ADDRESS (addr), self_address);
camel_mime_message_set_from (receipt, addr);
camel_object_unref (addr);
-
+
addr = camel_internet_address_new ();
camel_address_decode (CAMEL_ADDRESS (addr), receipt_address);
camel_mime_message_set_recipients (receipt, CAMEL_RECIPIENT_TYPE_TO, addr);
@@ -1288,11 +1288,11 @@ em_utils_send_receipt (CamelFolder *folder, CamelMimeMessage *message)
camel_medium_set_header (CAMEL_MEDIUM (receipt), "Return-Path", "<>");
if(account) {
- camel_medium_set_header (CAMEL_MEDIUM (receipt),
+ camel_medium_set_header (CAMEL_MEDIUM (receipt),
"X-Evolution-Account", account->uid);
- camel_medium_set_header (CAMEL_MEDIUM (receipt),
+ camel_medium_set_header (CAMEL_MEDIUM (receipt),
"X-Evolution-Transport", account->transport->url);
- camel_medium_set_header (CAMEL_MEDIUM (receipt),
+ camel_medium_set_header (CAMEL_MEDIUM (receipt),
"X-Evolution-Fcc", account->sent_folder_uri);
}
@@ -1312,19 +1312,19 @@ generate_account_hash (void)
EAccount *account, *def;
EAccountList *accounts;
EIterator *iter;
-
+
accounts = mail_config_get_accounts ();
account_hash = g_hash_table_new (camel_strcase_hash, camel_strcase_equal);
-
+
def = mail_config_get_default_account ();
-
+
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
-
+
if (account->id->address) {
EAccount *acnt;
-
+
/* Accounts with identical email addresses that are enabled
* take precedence over the accounts that aren't. If all
* accounts with matching email addresses are disabled, then
@@ -1336,20 +1336,20 @@ generate_account_hash (void)
g_hash_table_remove (account_hash, acnt->id->address);
acnt = NULL;
}
-
+
if (!acnt)
g_hash_table_insert (account_hash, (char *) account->id->address, (void *) account);
}
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
/* The default account has to be there if none of the enabled accounts are present */
if (g_hash_table_size (account_hash) == 0 && def && def->id->address)
g_hash_table_insert (account_hash, (char *) def->id->address, (void *) def);
-
+
return account_hash;
}
@@ -1358,33 +1358,33 @@ em_utils_camel_address_to_destination (CamelInternetAddress *iaddr)
{
EDestination *dest, **destv;
int n, i, j;
-
+
if (iaddr == NULL)
return NULL;
-
+
if ((n = camel_address_length ((CamelAddress *) iaddr)) == 0)
return NULL;
-
+
destv = g_malloc (sizeof (EDestination *) * (n + 1));
for (i = 0, j = 0; i < n; i++) {
const char *name, *addr;
-
+
if (camel_internet_address_get (iaddr, i, &name, &addr)) {
dest = e_destination_new ();
e_destination_set_name (dest, name);
e_destination_set_email (dest, addr);
-
+
destv[j++] = dest;
}
}
-
+
if (j == 0) {
g_free (destv);
return NULL;
}
-
+
destv[j] = NULL;
-
+
return destv;
}
@@ -1397,7 +1397,7 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
EDestination **tov, **ccv;
EMsgComposer *composer;
char *subject;
-
+
g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
g_return_val_if_fail (to == NULL || CAMEL_IS_INTERNET_ADDRESS (to), NULL);
g_return_val_if_fail (cc == NULL || CAMEL_IS_INTERNET_ADDRESS (cc), NULL);
@@ -1425,9 +1425,9 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
}
e_msg_composer_set_headers (composer, account ? account->name : NULL, tov, ccv, NULL, subject);
-
+
g_free (subject);
-
+
/* add post-to, if nessecary */
if (postto && camel_address_length((CamelAddress *)postto)) {
char *store_url = NULL;
@@ -1444,28 +1444,28 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
g_free(post);
g_free (store_url);
}
-
+
/* Add In-Reply-To and References. */
message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-Id");
references = camel_medium_get_header (CAMEL_MEDIUM (message), "References");
if (message_id) {
char *reply_refs;
-
+
e_msg_composer_add_header (composer, "In-Reply-To", message_id);
-
+
if (references)
reply_refs = g_strdup_printf ("%s %s", references, message_id);
else
reply_refs = g_strdup (message_id);
-
+
e_msg_composer_add_header (composer, "References", reply_refs);
g_free (reply_refs);
} else if (references) {
e_msg_composer_add_header (composer, "References", references);
}
-
+
e_msg_composer_drop_editor_undo (composer);
-
+
return composer;
}
@@ -1501,7 +1501,7 @@ guess_account (CamelMimeMessage *message, CamelFolder *folder)
account_hash = generate_account_hash ();
for (j=0;account == NULL && j<2;j++) {
const CamelInternetAddress *to;
-
+
to = camel_mime_message_get_recipients(message, types[j]);
if (to) {
for (i = 0; camel_internet_address_get(to, i, NULL, &tmp); i++) {
@@ -1532,7 +1532,7 @@ get_reply_sender (CamelMimeMessage *message, CamelInternetAddress *to, CamelNNTP
const CamelInternetAddress *reply_to;
const char *name, *addr, *posthdr;
int i;
-
+
/* check whether there is a 'Newsgroups: ' header in there */
if (postto
&& ((posthdr = camel_medium_get_header((CamelMedium *)message, "Followup-To"))
@@ -1540,11 +1540,11 @@ get_reply_sender (CamelMimeMessage *message, CamelInternetAddress *to, CamelNNTP
camel_address_decode((CamelAddress *)postto, posthdr);
return;
}
-
+
reply_to = camel_mime_message_get_reply_to (message);
if (!reply_to)
reply_to = camel_mime_message_get_from (message);
-
+
if (reply_to) {
for (i = 0; camel_internet_address_get (reply_to, i, &name, &addr); i++)
camel_internet_address_add (to, name, addr);
@@ -1556,38 +1556,38 @@ get_reply_list (CamelMimeMessage *message, CamelInternetAddress *to)
{
const char *header, *p;
char *addr;
-
+
/* Examples:
- *
+ *
* List-Post: <mailto:list@host.com>
* List-Post: <mailto:moderator@host.com?subject=list%20posting>
* List-Post: NO (posting not allowed on this list)
*/
if (!(header = camel_medium_get_header ((CamelMedium *) message, "List-Post")))
return FALSE;
-
+
while (*header == ' ' || *header == '\t')
header++;
-
+
/* check for NO */
if (!g_ascii_strncasecmp (header, "NO", 2))
return FALSE;
-
+
/* Search for the first mailto angle-bracket enclosed URL.
* (See rfc2369, Section 2, paragraph 3 for details) */
if (!(header = camel_strstrcase (header, "<mailto:")))
return FALSE;
-
+
header += 8;
-
+
p = header;
while (*p && !strchr ("?>", *p))
p++;
-
- addr = g_strndup (header, p - header);
+
+ addr = g_strndup (header, p - header);
camel_internet_address_add(to, NULL, addr);
g_free (addr);
-
+
return TRUE;
}
@@ -1596,7 +1596,7 @@ concat_unique_addrs (CamelInternetAddress *dest, const CamelInternetAddress *src
{
const char *name, *addr;
int i;
-
+
for (i = 0; camel_internet_address_get (src, i, &name, &addr); i++) {
if (!g_hash_table_lookup (rcpt_hash, addr)) {
camel_internet_address_add (dest, name, addr);
@@ -1612,7 +1612,7 @@ get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInterne
const char *name, *addr, *posthdr;
GHashTable *rcpt_hash;
int i;
-
+
/* check whether there is a 'Newsgroups: ' header in there */
if (postto) {
if ((posthdr = camel_medium_get_header((CamelMedium *)message, "Followup-To")))
@@ -1620,16 +1620,16 @@ get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInterne
if ((posthdr = camel_medium_get_header((CamelMedium *)message, "Newsgroups")))
camel_address_decode((CamelAddress *)postto, posthdr);
}
-
+
rcpt_hash = generate_account_hash ();
-
+
reply_to = camel_mime_message_get_reply_to (message);
if (!reply_to)
reply_to = camel_mime_message_get_from (message);
-
+
to_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
cc_addrs = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
-
+
if (reply_to) {
for (i = 0; camel_internet_address_get (reply_to, i, &name, &addr); i++) {
/* ignore references to the Reply-To address in the To and Cc lists */
@@ -1637,16 +1637,16 @@ get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInterne
/* In the case that we are doing a Reply-To-All, we do not want
to include the user's email address because replying to oneself
is kinda silly. */
-
+
camel_internet_address_add (to, name, addr);
g_hash_table_insert (rcpt_hash, (char *) addr, GINT_TO_POINTER (1));
}
}
}
-
+
concat_unique_addrs (cc, to_addrs, rcpt_hash);
concat_unique_addrs (cc, cc_addrs, rcpt_hash);
-
+
/* promote the first Cc: address to To: if To: is empty */
if (camel_address_length ((CamelAddress *) to) == 0 && camel_address_length ((CamelAddress *)cc) > 0) {
camel_internet_address_get (cc, 0, &name, &addr);
@@ -1660,7 +1660,7 @@ get_reply_all (CamelMimeMessage *message, CamelInternetAddress *to, CamelInterne
|| camel_internet_address_get(cc_addrs, 0, &name, &addr))) {
camel_internet_address_add(to, name, addr);
}
-
+
g_hash_table_destroy (rcpt_hash);
}
@@ -1688,14 +1688,14 @@ format_sender (GString *str, const char *attr, CamelMimeMessage *message)
{
const CamelInternetAddress *sender;
const char *name, *addr;
-
+
sender = camel_mime_message_get_from (message);
if (sender != NULL && camel_address_length (CAMEL_ADDRESS (sender)) > 0) {
camel_internet_address_get (sender, 0, &name, &addr);
} else {
name = _("an unknown sender");
}
-
+
if (name && !strcmp (attr, "{SenderName}")) {
g_string_append (str, name);
} else if (addr && !strcmp (attr, "{SenderEMail}")) {
@@ -1753,9 +1753,9 @@ attribution_format (const char *format, CamelMimeMessage *message)
struct tm tm;
time_t date;
int type;
-
+
str = g_string_new ("");
-
+
date = camel_mime_message_get_date (message, &tzone);
if (date == CAMEL_MESSAGE_DATE_CURRENT) {
@@ -1767,35 +1767,35 @@ attribution_format (const char *format, CamelMimeMessage *message)
time (&date);
tzone = 0;
}
-
+
/* Convert to UTC */
date += (tzone / 100) * 60 * 60;
date += (tzone % 100) * 60;
-
+
gmtime_r (&date, &tm);
-
+
start = inptr = format;
while (*inptr != '\0') {
start = inptr;
while (*inptr && strncmp (inptr, "${", 2) != 0)
inptr++;
-
+
g_string_append_len (str, start, inptr - start);
-
+
if (*inptr == '\0')
break;
-
+
start = ++inptr;
while (*inptr && *inptr != '}')
inptr++;
-
+
if (*inptr != '}') {
/* broken translation */
g_string_append_len (str, "${", 2);
inptr = start + 1;
continue;
}
-
+
inptr++;
len = inptr - start;
type = ATTRIB_UNKNOWN;
@@ -1805,7 +1805,7 @@ attribution_format (const char *format, CamelMimeMessage *message)
break;
}
}
-
+
switch (type) {
case ATTRIB_CUSTOM:
attribvars[i].v.formatter (str, attribvars[i].name, message);
@@ -1853,10 +1853,10 @@ attribution_format (const char *format, CamelMimeMessage *message)
break;
}
}
-
+
s = str->str;
g_string_free (str, FALSE);
-
+
return s;
}
@@ -1867,9 +1867,9 @@ composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat *
CamelMimePart *part;
GConfClient *gconf;
ssize_t len;
-
+
gconf = mail_config_get_gconf_client ();
-
+
switch (gconf_client_get_int (gconf, "/apps/evolution/mail/format/reply_style", NULL)) {
case MAIL_CONFIG_REPLY_DO_NOT_QUOTE:
/* do nothing */
@@ -1896,7 +1896,7 @@ composer_set_body (EMsgComposer *composer, CamelMimeMessage *message, EMFormat *
g_free (text);
break;
}
-
+
e_msg_composer_drop_editor_undo (composer);
}
@@ -1963,7 +1963,7 @@ em_utils_reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage
/** @Event: message.replying
* @Title: Message being replied to
* @Target: EMEventTargetMessage
- *
+ *
* message.replying is emitted when a user starts replying to a message.
*/
@@ -1974,10 +1974,10 @@ em_utils_reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage
to = camel_internet_address_new();
cc = camel_internet_address_new();
-
+
account = guess_account (message, folder);
flags = CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_SEEN;
-
+
switch (mode) {
case REPLY_MODE_SENDER:
if (folder)
@@ -1998,7 +1998,7 @@ em_utils_reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage
get_reply_all(message, to, cc, postto);
break;
}
-
+
composer = reply_get_composer (message, account, to, cc, folder, postto);
e_msg_composer_add_message_attachments (composer, message, TRUE);
@@ -2006,11 +2006,11 @@ em_utils_reply_to_message(CamelFolder *folder, const char *uid, CamelMimeMessage
camel_object_unref(postto);
camel_object_unref(to);
camel_object_unref(cc);
-
+
composer_set_body (composer, message, source);
-
+
em_composer_utils_setup_callbacks (composer, folder, uid, flags, flags, NULL, NULL);
-
+
gtk_widget_show (GTK_WIDGET (composer));
e_msg_composer_unset_changed (composer);
}
@@ -2030,13 +2030,13 @@ post_reply_to_message (CamelFolder *folder, const char *uid, CamelMimeMessage *m
EAccount *account;
char *real_uid;
guint32 flags;
-
+
if (message == NULL)
return;
-
+
if (CAMEL_IS_VEE_FOLDER (folder)) {
CamelMessageInfo *info;
-
+
info = camel_folder_get_message_info (folder, uid);
real_folder = camel_vee_folder_get_location ((CamelVeeFolder *) folder, (struct _CamelVeeMessageInfo *) info, &real_uid);
camel_folder_free_message_info (folder, info);
@@ -2045,18 +2045,18 @@ post_reply_to_message (CamelFolder *folder, const char *uid, CamelMimeMessage *m
camel_object_ref (folder);
real_uid = g_strdup (uid);
}
-
+
account = guess_account (message, real_folder);
flags = CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_SEEN;
-
+
to = camel_internet_address_new();
get_reply_sender (message, to, NULL);
-
+
composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_MAIL_POST);
-
+
/* construct the tov/ccv */
tov = em_utils_camel_address_to_destination (to);
-
+
/* Set the subject of the new message. */
if ((subject = (char *) camel_mime_message_get_subject (message))) {
if (g_ascii_strncasecmp (subject, "Re: ", 4) != 0)
@@ -2066,45 +2066,45 @@ post_reply_to_message (CamelFolder *folder, const char *uid, CamelMimeMessage *m
} else {
subject = g_strdup ("");
}
-
+
e_msg_composer_set_headers (composer, account ? account->name : NULL, tov, NULL, NULL, subject);
-
+
g_free (subject);
-
+
url = mail_tools_folder_to_url (real_folder);
e_msg_composer_hdrs_set_post_to (e_msg_composer_get_hdrs(composer), url);
g_free (url);
-
+
/* Add In-Reply-To and References. */
message_id = camel_medium_get_header (CAMEL_MEDIUM (message), "Message-Id");
references = camel_medium_get_header (CAMEL_MEDIUM (message), "References");
if (message_id) {
char *reply_refs;
-
+
e_msg_composer_add_header (composer, "In-Reply-To", message_id);
-
+
if (references)
reply_refs = g_strdup_printf ("%s %s", references, message_id);
else
reply_refs = g_strdup (message_id);
-
+
e_msg_composer_add_header (composer, "References", reply_refs);
g_free (reply_refs);
} else if (references) {
e_msg_composer_add_header (composer, "References", references);
}
-
+
e_msg_composer_drop_editor_undo (composer);
-
+
e_msg_composer_add_message_attachments (composer, message, TRUE);
-
+
composer_set_body (composer, message, NULL);
-
+
em_composer_utils_setup_callbacks (composer, real_folder, real_uid, flags, flags, NULL, NULL);
-
- gtk_widget_show (GTK_WIDGET (composer));
+
+ gtk_widget_show (GTK_WIDGET (composer));
e_msg_composer_unset_changed (composer);
-
+
camel_object_unref (real_folder);
camel_object_unref(to);
g_free (real_uid);
@@ -2124,6 +2124,6 @@ em_utils_post_reply_to_message_by_uid (CamelFolder *folder, const char *uid)
{
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uid != NULL);
-
+
mail_get_message (folder, uid, post_reply_to_message, NULL, mail_thread_new);
}
diff --git a/mail/em-config.c b/mail/em-config.c
index ef3f793563..80869faa4b 100644
--- a/mail/em-config.c
+++ b/mail/em-config.c
@@ -104,7 +104,7 @@ emp_target_free(EConfig *ep, EConfigTarget *t)
break; }
case EM_CONFIG_TARGET_ACCOUNT: {
EMConfigTargetAccount *s = (EMConfigTargetAccount *)t;
-
+
if (((EMConfig *)ep)->priv->account_changed_id) {
g_signal_handler_disconnect(s->account, ((EMConfig *)ep)->priv->account_changed_id);
((EMConfig *)ep)->priv->account_changed_id = 0;
@@ -157,7 +157,7 @@ emp_set_target(EConfig *ep, EConfigTarget *t)
break; }
case EM_CONFIG_TARGET_ACCOUNT: {
EMConfigTargetAccount *s = (EMConfigTargetAccount *)t;
-
+
((EMConfig *)ep)->priv->account_changed_id = g_signal_connect(s->account, "changed", G_CALLBACK(emp_account_changed), ep);
break; }
}
@@ -306,7 +306,7 @@ GType
em_config_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMConfigHookClass), NULL, NULL, (GClassInitFunc) emph_class_init, NULL, NULL,
@@ -316,6 +316,6 @@ em_config_hook_get_type(void)
emph_parent_class = g_type_class_ref(e_config_hook_get_type());
type = g_type_register_static(e_config_hook_get_type(), "EMConfigHook", &info, 0);
}
-
+
return type;
}
diff --git a/mail/em-event.c b/mail/em-event.c
index a690c25763..173d7d18fd 100644
--- a/mail/em-event.c
+++ b/mail/em-event.c
@@ -80,7 +80,7 @@ eme_target_free(EEvent *ep, EEventTarget *t)
break; }
case EM_EVENT_TARGET_COMPOSER : {
EMEventTargetComposer *s = (EMEventTargetComposer *)t;
-
+
if (s->composer)
g_object_unref (s->composer);
break; }
@@ -119,11 +119,11 @@ em_event_get_type(void)
/**
* em_event_peek:
- * @void:
- *
+ * @void:
+ *
* Get the singular instance of the mail event handler.
- *
- * Return value:
+ *
+ * Return value:
**/
EMEvent *em_event_peek(void)
{
@@ -249,7 +249,7 @@ GType
em_event_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMEventHookClass), NULL, NULL, (GClassInitFunc) emeh_class_init, NULL, NULL,
@@ -259,6 +259,6 @@ em_event_hook_get_type(void)
emeh_parent_class = g_type_class_ref(e_event_hook_get_type());
type = g_type_register_static(e_event_hook_get_type(), "EMEventHook", &info, 0);
}
-
+
return type;
}
diff --git a/mail/em-event.h b/mail/em-event.h
index 4279565c19..3db64e8cb4 100644
--- a/mail/em-event.h
+++ b/mail/em-event.h
@@ -98,7 +98,7 @@ typedef struct _EMEventTargetSendReceive EMEventTargetSendReceive;
struct _EMEventTargetSendReceive {
EEventTarget target;
-
+
struct _GtkWidget *table;
gpointer data;
int row;
diff --git a/mail/em-filter-context.c b/mail/em-filter-context.c
index 75b7e6a605..6c11261d12 100644
--- a/mail/em-filter-context.c
+++ b/mail/em-filter-context.c
@@ -35,7 +35,7 @@
/* For poking into filter-folder guts */
#include "em-filter-folder-element.h"
-#define d(x)
+#define d(x)
static void em_filter_context_class_init(EMFilterContextClass *klass);
static void em_filter_context_init(EMFilterContext *fc);
@@ -51,7 +51,7 @@ GType
em_filter_context_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMFilterContextClass),
@@ -64,10 +64,10 @@ em_filter_context_get_type(void)
0, /* n_preallocs */
(GInstanceInitFunc) em_filter_context_init,
};
-
+
type = g_type_register_static(RULE_TYPE_CONTEXT, "EMFilterContext", &info, 0);
}
-
+
return type;
}
@@ -76,11 +76,11 @@ em_filter_context_class_init(EMFilterContextClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
RuleContextClass *rc_class = RULE_CONTEXT_CLASS(klass);
-
+
parent_class = g_type_class_ref(RULE_TYPE_CONTEXT);
-
+
object_class->finalize = em_filter_context_finalise;
-
+
/* override methods */
rc_class->rename_uri = filter_rename_uri;
rc_class->delete_uri = filter_delete_uri;
@@ -95,7 +95,7 @@ em_filter_context_init(EMFilterContext *fc)
rule_context_add_part_set((RuleContext *) fc, "actionset", filter_part_get_type(),
(RCPartFunc) em_filter_context_add_action,
(RCNextPartFunc) em_filter_context_next_action);
-
+
rule_context_add_rule_set((RuleContext *) fc, "ruleset", em_filter_rule_get_type(),
(RCRuleFunc) rule_context_add_rule, rule_context_next_rule);
}
@@ -104,10 +104,10 @@ static void
em_filter_context_finalise(GObject *obj)
{
EMFilterContext *fc = (EMFilterContext *)obj;
-
+
g_list_foreach(fc->actions, (GFunc)g_object_unref, NULL);
g_list_free(fc->actions);
-
+
G_OBJECT_CLASS(parent_class)->finalize(obj);
}
@@ -115,7 +115,7 @@ em_filter_context_finalise(GObject *obj)
* em_filter_context_new:
*
* Create a new EMFilterContext object.
- *
+ *
* Return value: A new #EMFilterContext object.
**/
EMFilterContext *
@@ -142,10 +142,10 @@ FilterPart *
em_filter_context_create_action(EMFilterContext *fc, const char *name)
{
FilterPart *part;
-
+
if ((part = em_filter_context_find_action(fc, name)))
return filter_part_clone(part);
-
+
return NULL;
}
@@ -165,33 +165,33 @@ filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GComp
FilterElement *element;
int count = 0;
GList *changed = NULL;
-
+
d(printf("uri '%s' renamed to '%s'\n", olduri, newuri));
-
+
/* For all rules, for all actions, for all elements, rename any folder elements */
/* Yes we could do this inside each part itself, but not today */
rule = NULL;
while ((rule = rule_context_next_rule(rc, rule, NULL))) {
int rulecount = 0;
-
+
d(printf("checking rule '%s'\n", rule->name));
-
+
l = EM_FILTER_RULE(rule)->actions;
while (l) {
action = l->data;
-
+
d(printf("checking action '%s'\n", action->name));
-
+
el = action->elements;
while (el) {
element = el->data;
-
+
d(printf("checking element '%s'\n", element->name));
if (EM_IS_FILTER_FOLDER_ELEMENT(element)) {
d(printf(" is folder, existing uri = '%s'\n",
FILTER_FOLDER(element)->uri));
}
-
+
if (EM_IS_FILTER_FOLDER_ELEMENT(element)
&& cmp(((EMFilterFolderElement *)element)->uri, olduri)) {
d(printf(" Changed!\n"));
@@ -202,17 +202,17 @@ filter_rename_uri(RuleContext *rc, const char *olduri, const char *newuri, GComp
}
l = l->next;
}
-
+
if (rulecount) {
changed = g_list_append(changed, g_strdup(rule->name));
filter_rule_emit_changed(rule);
}
-
+
count += rulecount;
}
-
+
/* might need to call parent class, if it did anything ... parent_class->rename_uri(f, olduri, newuri, cmp); */
-
+
return changed;
}
@@ -221,40 +221,40 @@ filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
{
/* We basically do similar to above, but when we find it,
Remove the action, and if thats the last action, this might create an empty rule? remove the rule? */
-
+
FilterRule *rule;
GList *l, *el;
FilterPart *action;
FilterElement *element;
int count = 0;
GList *deleted = NULL;
-
+
d(printf("uri '%s' deleted\n", uri));
-
+
/* For all rules, for all actions, for all elements, check deleted folder elements */
/* Yes we could do this inside each part itself, but not today */
rule = NULL;
while ((rule = rule_context_next_rule(rc, rule, NULL))) {
int recorded = 0;
-
+
d(printf("checking rule '%s'\n", rule->name));
-
+
l = EM_FILTER_RULE(rule)->actions;
while (l) {
action = l->data;
-
+
d(printf("checking action '%s'\n", action->name));
-
+
el = action->elements;
while (el) {
element = el->data;
-
+
d(printf("checking element '%s'\n", element->name));
if (EM_IS_FILTER_FOLDER_ELEMENT(element)) {
d(printf(" is folder, existing uri = '%s'\n",
FILTER_FOLDER(element)->uri));
}
-
+
if (EM_IS_FILTER_FOLDER_ELEMENT(element)
&& cmp(((EMFilterFolderElement *)element)->uri, uri)) {
d(printf(" Deleted!\n"));
@@ -274,9 +274,9 @@ filter_delete_uri(RuleContext *rc, const char *uri, GCompareFunc cmp)
;
}
}
-
+
/* TODO: could call parent and merge lists */
-
+
return deleted;
}
diff --git a/mail/em-filter-context.h b/mail/em-filter-context.h
index f2a5581f8b..051e600bd7 100644
--- a/mail/em-filter-context.h
+++ b/mail/em-filter-context.h
@@ -37,7 +37,7 @@ typedef struct _EMFilterContextClass EMFilterContextClass;
struct _EMFilterContext {
RuleContext parent_object;
-
+
GList *actions;
};
diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c
index 4c5703dcd9..aff4bda747 100644
--- a/mail/em-filter-editor.c
+++ b/mail/em-filter-editor.c
@@ -49,7 +49,7 @@ GtkType
em_filter_editor_get_type (void)
{
static GtkType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (EMFilterEditorClass),
@@ -62,10 +62,10 @@ em_filter_editor_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) em_filter_editor_init,
};
-
+
type = g_type_register_static (RULE_TYPE_EDITOR, "EMFilterEditor", &info, 0);
}
-
+
return type;
}
@@ -74,11 +74,11 @@ em_filter_editor_class_init (EMFilterEditorClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
RuleEditorClass *re_class = (RuleEditorClass *) klass;
-
+
parent_class = g_type_class_ref (rule_editor_get_type ());
-
+
gobject_class->finalize = em_filter_editor_finalise;
-
+
/* override methods */
re_class->create_rule = create_rule;
}
@@ -99,7 +99,7 @@ em_filter_editor_finalise (GObject *obj)
* em_filter_editor_new:
*
* Create a new EMFilterEditor object.
- *
+ *
* Return value: A new #EMFilterEditor object.
**/
EMFilterEditor *
@@ -117,7 +117,7 @@ em_filter_editor_new (EMFilterContext *fc, const EMFilterSource *source_names)
em_filter_editor_construct (fe, fc, gui, source_names);
g_object_unref (gui);
-
+
return fe;
}
@@ -125,10 +125,10 @@ static void
select_source (GtkMenuItem *mi, EMFilterEditor *fe)
{
char *source;
-
+
source = g_object_get_data(G_OBJECT(mi), "source");
g_return_if_fail (source);
-
+
rule_editor_set_source ((RuleEditor *)fe, source);
}
@@ -137,11 +137,11 @@ em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *g
{
GtkWidget *menu, *item, *omenu;
int i;
-
+
omenu = glade_xml_get_widget (gui, "filter_source");
gtk_option_menu_remove_menu (GTK_OPTION_MENU (omenu));
menu = gtk_menu_new ();
-
+
for (i = 0; source_names[i].source; i++) {
item = gtk_menu_item_new_with_label(source_names[i].name);
g_object_set_data_full((GObject *)item, "source", g_strdup(source_names[i].source), g_free);
@@ -151,7 +151,7 @@ em_filter_editor_construct (EMFilterEditor *fe, EMFilterContext *fc, GladeXML *g
}
gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
gtk_widget_show (omenu);
-
+
rule_editor_construct ((RuleEditor *) fe, (RuleContext *) fc, gui, source_names[0].source, _("_Filter Rules"));
}
@@ -160,13 +160,13 @@ create_rule (RuleEditor *re)
{
FilterRule *rule = filter_rule_new ();
FilterPart *part;
-
+
/* create a rule with 1 part & 1 action in it */
rule = (FilterRule *)em_filter_rule_new ();
part = rule_context_next_part (re->context, NULL);
filter_rule_add_part (rule, filter_part_clone (part));
part = em_filter_context_next_action ((EMFilterContext *)re->context, NULL);
em_filter_rule_add_action ((EMFilterRule *)rule, filter_part_clone (part));
-
+
return rule;
}
diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c
index 0b038294a2..e159296640 100644
--- a/mail/em-filter-folder-element.c
+++ b/mail/em-filter-folder-element.c
@@ -58,7 +58,7 @@ GType
em_filter_folder_element_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMFilterFolderElementClass),
@@ -71,10 +71,10 @@ em_filter_folder_element_get_type(void)
0, /* n_preallocs */
(GInstanceInitFunc)em_filter_folder_element_init,
};
-
+
type = g_type_register_static(FILTER_TYPE_ELEMENT, "EMFilterFolderElement", &info, 0);
}
-
+
return type;
}
@@ -83,11 +83,11 @@ em_filter_folder_element_class_init(EMFilterFolderElementClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
FilterElementClass *fe_class = FILTER_ELEMENT_CLASS(klass);
-
+
parent_class = g_type_class_ref(FILTER_TYPE_ELEMENT);
-
+
object_class->finalize = em_filter_folder_element_finalise;
-
+
/* override methods */
fe_class->validate = validate;
fe_class->eq = folder_eq;
@@ -110,9 +110,9 @@ static void
em_filter_folder_element_finalise(GObject *obj)
{
EMFilterFolderElement *ff = (EMFilterFolderElement *)obj;
-
+
g_free(ff->uri);
-
+
G_OBJECT_CLASS(parent_class)->finalize(obj);
}
@@ -120,7 +120,7 @@ em_filter_folder_element_finalise(GObject *obj)
* em_filter_folder_element_new:
*
* Create a new EMFilterFolderElement object.
- *
+ *
* Return value: A new #EMFilterFolderElement object.
**/
EMFilterFolderElement *
@@ -140,7 +140,7 @@ static gboolean
validate(FilterElement *fe)
{
EMFilterFolderElement *ff = (EMFilterFolderElement *)fe;
-
+
if (ff->uri && *ff->uri) {
return TRUE;
} else {
@@ -173,16 +173,16 @@ xml_encode(FilterElement *fe)
{
xmlNodePtr value, work;
EMFilterFolderElement *ff = (EMFilterFolderElement *)fe;
-
+
d(printf("Encoding folder as xml\n"));
-
+
value = xmlNewNode(NULL, (unsigned const char *)"value");
xmlSetProp(value, (unsigned const char *)"name", (unsigned char *)fe->name);
xmlSetProp(value, (unsigned const char *)"type", (unsigned const char *)"folder");
-
+
work = xmlNewChild(value, NULL, (unsigned const char *)"folder", NULL);
xmlSetProp(work, (unsigned const char *)"uri", (unsigned const char *)ff->uri);
-
+
return value;
}
@@ -191,17 +191,17 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
{
EMFilterFolderElement *ff = (EMFilterFolderElement *)fe;
xmlNodePtr n;
-
+
d(printf("Decoding folder from xml %p\n", fe));
-
+
xmlFree(fe->name);
fe->name = (char *)xmlGetProp(node, (unsigned const char *)"name");
-
+
n = node->children;
while(n) {
if (!strcmp((char *)n->name, "folder")) {
char *uri;
-
+
uri = (char *)xmlGetProp(n, (unsigned const char *)"uri");
g_free(ff->uri);
ff->uri = g_strdup(uri);
@@ -210,7 +210,7 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
}
n = n->next;
}
-
+
return 0;
}
@@ -222,7 +222,7 @@ folder_selected(EMFolderSelectionButton *button, EMFilterFolderElement *ff)
uri = em_folder_selection_button_get_selection(button);
g_free(ff->uri);
ff->uri = uri!=NULL?em_uri_from_camel(uri):NULL;
-
+
gdk_window_raise(GTK_WIDGET(gtk_widget_get_ancestor(GTK_WIDGET(button), GTK_TYPE_WINDOW))->window);
}
@@ -237,10 +237,10 @@ get_widget(FilterElement *fe)
button = em_folder_selection_button_new(_("Select Folder"), NULL);
em_folder_selection_button_set_selection(EM_FOLDER_SELECTION_BUTTON(button), uri);
g_free(uri);
-
+
gtk_widget_show(button);
g_signal_connect(button, "selected", G_CALLBACK(folder_selected), ff);
-
+
return button;
}
@@ -254,7 +254,7 @@ static void
format_sexp(FilterElement *fe, GString *out)
{
EMFilterFolderElement *ff = (EMFilterFolderElement *)fe;
-
+
e_sexp_encode_string(out, ff->uri);
}
diff --git a/mail/em-filter-folder-element.h b/mail/em-filter-folder-element.h
index f59d76c901..042ab5d504 100644
--- a/mail/em-filter-folder-element.h
+++ b/mail/em-filter-folder-element.h
@@ -36,7 +36,7 @@ typedef struct _EMFilterFolderElementClass EMFilterFolderElementClass;
struct _EMFilterFolderElement {
FilterElement parent_object;
-
+
char *uri;
};
diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c
index 1815e0dcdb..aaec41ba3b 100644
--- a/mail/em-filter-rule.c
+++ b/mail/em-filter-rule.c
@@ -52,7 +52,7 @@ GType
em_filter_rule_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMFilterRuleClass),
@@ -65,10 +65,10 @@ em_filter_rule_get_type(void)
0, /* n_preallocs */
(GInstanceInitFunc)em_filter_rule_init,
};
-
+
type = g_type_register_static(FILTER_TYPE_RULE, "EMFilterRule", &info, 0);
}
-
+
return type;
}
@@ -77,11 +77,11 @@ em_filter_rule_class_init(EMFilterRuleClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
FilterRuleClass *fr_class =(FilterRuleClass *)klass;
-
+
parent_class = g_type_class_ref(FILTER_TYPE_RULE);
-
+
object_class->finalize = em_filter_rule_finalise;
-
+
/* override methods */
fr_class->validate = validate;
fr_class->eq = filter_eq;
@@ -111,10 +111,10 @@ static void
em_filter_rule_finalise(GObject *obj)
{
EMFilterRule *ff =(EMFilterRule *) obj;
-
+
unref_list(ff->actions);
g_list_free(ff->actions);
-
+
G_OBJECT_CLASS(parent_class)->finalize(obj);
}
@@ -122,7 +122,7 @@ em_filter_rule_finalise(GObject *obj)
* em_filter_rule_new:
*
* Create a new EMFilterRule object.
- *
+ *
* Return value: A new #EMFilterRule object.
**/
EMFilterRule *
@@ -135,7 +135,7 @@ void
em_filter_rule_add_action(EMFilterRule *fr, FilterPart *fp)
{
fr->actions = g_list_append(fr->actions, fp);
-
+
filter_rule_emit_changed((FilterRule *)fr);
}
@@ -143,7 +143,7 @@ void
em_filter_rule_remove_action(EMFilterRule *fr, FilterPart *fp)
{
fr->actions = g_list_remove(fr->actions, fp);
-
+
filter_rule_emit_changed((FilterRule *)fr);
}
@@ -151,14 +151,14 @@ void
em_filter_rule_replace_action(EMFilterRule *fr, FilterPart *fp, FilterPart *new)
{
GList *l;
-
+
l = g_list_find(fr->actions, fp);
if (l) {
l->data = new;
} else {
fr->actions = g_list_append(fr->actions, new);
}
-
+
filter_rule_emit_changed((FilterRule *)fr);
}
@@ -176,16 +176,16 @@ validate(FilterRule *fr)
EMFilterRule *ff =(EMFilterRule *)fr;
GList *parts;
int valid;
-
+
valid = FILTER_RULE_CLASS(parent_class)->validate(fr);
-
+
/* validate rule actions */
parts = ff->actions;
while (parts && valid) {
valid = filter_part_validate((FilterPart *)parts->data);
parts = parts->next;
}
-
+
return valid;
}
@@ -193,15 +193,15 @@ static int
list_eq(GList *al, GList *bl)
{
int truth = TRUE;
-
+
while (truth && al && bl) {
FilterPart *a = al->data, *b = bl->data;
-
+
truth = filter_part_eq(a, b);
al = al->next;
bl = bl->next;
}
-
+
return truth && al == NULL && bl == NULL;
}
@@ -218,7 +218,7 @@ xml_encode(FilterRule *fr)
EMFilterRule *ff =(EMFilterRule *)fr;
xmlNodePtr node, set, work;
GList *l;
-
+
node = FILTER_RULE_CLASS(parent_class)->xml_encode(fr);
g_return_val_if_fail (node != NULL, NULL);
set = xmlNewNode(NULL, (const unsigned char *)"actionset");
@@ -229,7 +229,7 @@ xml_encode(FilterRule *fr)
xmlAddChild(set, work);
l = l->next;
}
-
+
return node;
}
@@ -240,7 +240,7 @@ load_set(xmlNodePtr node, EMFilterRule *ff, RuleContext *rc)
xmlNodePtr work;
char *rulename;
FilterPart *part;
-
+
work = node->children;
while (work) {
if (!strcmp((char *)work->name, "part")) {
@@ -267,11 +267,11 @@ xml_decode(FilterRule *fr, xmlNodePtr node, RuleContext *rc)
EMFilterRule *ff =(EMFilterRule *)fr;
xmlNodePtr work;
int result;
-
+
result = FILTER_RULE_CLASS(parent_class)->xml_decode(fr, node, rc);
if (result != 0)
return result;
-
+
work = node->children;
while (work) {
if (!strcmp((char *)work->name, "actionset")) {
@@ -279,7 +279,7 @@ xml_decode(FilterRule *fr, xmlNodePtr node, RuleContext *rc)
}
work = work->next;
}
-
+
return 0;
}
@@ -288,25 +288,25 @@ rule_copy(FilterRule *dest, FilterRule *src)
{
EMFilterRule *fdest, *fsrc;
GList *node;
-
+
fdest =(EMFilterRule *)dest;
fsrc =(EMFilterRule *)src;
-
+
if (fdest->actions) {
g_list_foreach(fdest->actions, (GFunc)g_object_unref, NULL);
g_list_free(fdest->actions);
fdest->actions = NULL;
}
-
+
node = fsrc->actions;
while (node) {
FilterPart *part = node->data;
-
+
g_object_ref(part);
fdest->actions = g_list_append(fdest->actions, part);
node = node->next;
}
-
+
FILTER_RULE_CLASS(parent_class)->copy(dest, src);
}
@@ -327,16 +327,16 @@ option_activate(GtkMenuItem *item, struct _part_data *data)
{
FilterPart *part = g_object_get_data((GObject *)item, "part");
FilterPart *newpart;
-
+
/* dont update if we haven't changed */
if (!strcmp(part->title, data->part->title))
return;
-
+
/* here we do a widget shuffle, throw away the old widget/rulepart,
and create another */
if (data->partwidget)
gtk_container_remove(GTK_CONTAINER(data->container), data->partwidget);
-
+
newpart = filter_part_clone(part);
filter_part_copy_values(newpart, data->part);
em_filter_rule_replace_action((EMFilterRule *)data->fr, data->part, newpart);
@@ -345,7 +345,7 @@ 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, TRUE, TRUE, 0);
-
+
g_object_set_data((GObject *)data->container, "part", newpart);
}
@@ -360,44 +360,44 @@ get_rule_part_widget(EMFilterContext *f, FilterPart *newpart, FilterRule *fr)
GtkWidget *p;
int index = 0, current = 0;
struct _part_data *data;
-
+
data = g_malloc0(sizeof(*data));
data->fr = fr;
data->f = f;
data->part = newpart;
-
+
hbox = gtk_hbox_new(FALSE, 0);
p = filter_part_get_widget(newpart);
-
+
data->partwidget = p;
data->container = hbox;
-
+
menu = gtk_menu_new();
while ((part = em_filter_context_next_action(f, part))) {
item = gtk_menu_item_new_with_label(_(part->title));
-
+
g_object_set_data((GObject *)item, "part", part);
g_signal_connect(item, "activate", G_CALLBACK(option_activate), data);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
gtk_widget_show(item);
-
+
if (!strcmp(newpart->title, part->title))
current = index;
-
+
index++;
}
-
+
omenu = gtk_option_menu_new();
gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu);
gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), current);
gtk_widget_show(omenu);
-
+
gtk_box_pack_start(GTK_BOX(hbox), omenu, FALSE, FALSE, 0);
if (p)
gtk_box_pack_start(GTK_BOX(hbox), p, TRUE, TRUE, 0);
-
+
gtk_widget_show_all(hbox);
-
+
return hbox;
}
@@ -413,18 +413,18 @@ less_parts(GtkWidget *button, struct _rule_data *data)
FilterPart *part;
GtkWidget *rule;
GList *l;
-
+
l =((EMFilterRule *)data->fr)->actions;
if (g_list_length(l) < 2)
return;
-
+
rule = g_object_get_data((GObject *)button, "rule");
part = g_object_get_data((GObject *)rule, "part");
-
+
/* remove the part from the list */
em_filter_rule_remove_action((EMFilterRule *)data->fr, part);
g_object_unref(part);
-
+
/* and from the display */
gtk_container_remove(GTK_CONTAINER(data->parts), rule);
gtk_container_remove(GTK_CONTAINER(data->parts), button);
@@ -434,10 +434,10 @@ static void
attach_rule(GtkWidget *rule, struct _rule_data *data, FilterPart *part, int row)
{
GtkWidget *remove;
-
+
gtk_table_attach(GTK_TABLE(data->parts), rule, 0, 1, row, row + 1,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
+
remove = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
g_object_set_data((GObject *)remove, "rule", rule);
g_object_set_data((GObject *)rule, "part", part);
@@ -452,17 +452,17 @@ static void
more_parts(GtkWidget *button, struct _rule_data *data)
{
FilterPart *new;
-
+
/* create a new rule entry, use the first type of rule */
new = em_filter_context_next_action((EMFilterContext *)data->f, NULL);
if (new) {
GtkWidget *w;
guint16 rows;
-
+
new = filter_part_clone(new);
em_filter_rule_add_action((EMFilterRule *)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);
@@ -482,11 +482,11 @@ get_widget(FilterRule *fr, RuleContext *rc)
EMFilterRule *ff =(EMFilterRule *)fr;
int rows, i = 0;
gchar *msg;
-
+
widget = FILTER_RULE_CLASS(parent_class)->get_widget(fr, rc);
-
+
/* and now for the action area */
- msg = g_strdup_printf("<b>%s</b>", _("Then"));
+ msg = g_strdup_printf("<b>%s</b>", _("Then"));
label = gtk_label_new(msg);
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
@@ -504,24 +504,24 @@ get_widget(FilterRule *fr, RuleContext *rc)
inframe = gtk_vbox_new(FALSE, 6);
gtk_box_pack_start(GTK_BOX(hbox), inframe, TRUE, TRUE, 0);
-
+
rows = g_list_length(ff->actions);
parts = gtk_table_new(rows, 2, FALSE);
data = g_malloc0(sizeof(*data));
data->f =(EMFilterContext *)rc;
data->fr = fr;
data->parts = parts;
-
+
hbox = gtk_hbox_new(FALSE, 3);
-
+
add = gtk_button_new_with_mnemonic (_("Add Ac_tion"));
gtk_button_set_image (GTK_BUTTON (add), gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON));
/* gtk_button_set_relief(GTK_BUTTON(add), GTK_RELIEF_NONE); */
g_signal_connect(add, "clicked", G_CALLBACK(more_parts), data);
gtk_box_pack_start(GTK_BOX(hbox), add, FALSE, FALSE, 0);
-
+
gtk_box_pack_start(GTK_BOX(inframe), hbox, FALSE, FALSE, 3);
-
+
l = ff->actions;
while (l) {
part = l->data;
@@ -530,20 +530,20 @@ get_widget(FilterRule *fr, RuleContext *rc)
attach_rule(w, data, part, i++);
l = l->next;
}
-
+
hadj = gtk_adjustment_new(0.0, 0.0, 1.0, 1.0 ,1.0, 1.0);
vadj = gtk_adjustment_new(0.0, 0.0, 1.0, 1.0 ,1.0, 1.0);
scrolledwindow = gtk_scrolled_window_new(GTK_ADJUSTMENT(hadj), GTK_ADJUSTMENT(vadj));
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
+
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolledwindow), parts);
-
+
gtk_box_pack_start(GTK_BOX(inframe), scrolledwindow, TRUE, TRUE, 0);
-
+
/*gtk_box_pack_start(GTK_BOX(inframe), parts, FALSE, FALSE, 3);*/
-
+
gtk_widget_show_all(widget);
-
+
return widget;
}
diff --git a/mail/em-filter-rule.h b/mail/em-filter-rule.h
index 75c4b2834a..93953cd56b 100644
--- a/mail/em-filter-rule.h
+++ b/mail/em-filter-rule.h
@@ -36,7 +36,7 @@ typedef struct _EMFilterRuleClass EMFilterRuleClass;
struct _EMFilterRule {
FilterRule parent_object;
-
+
GList *actions;
};
diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c
index 2d6c551e2a..316e7f8435 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -73,7 +73,7 @@ GType
em_filter_source_element_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMFilterSourceElementClass),
@@ -86,10 +86,10 @@ em_filter_source_element_get_type(void)
0, /* n_preallocs */
(GInstanceInitFunc)em_filter_source_element_init,
};
-
+
type = g_type_register_static(FILTER_TYPE_ELEMENT, "EMFilterSourceElement", &info, 0);
}
-
+
return type;
}
@@ -98,11 +98,11 @@ em_filter_source_element_class_init(EMFilterSourceElementClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
FilterElementClass *fe_class = FILTER_ELEMENT_CLASS(klass);
-
+
parent_class = g_type_class_ref(FILTER_TYPE_ELEMENT);
-
+
object_class->finalize = em_filter_source_element_finalize;
-
+
/* override methods */
fe_class->eq = source_eq;
fe_class->xml_create = xml_create;
@@ -127,7 +127,7 @@ em_filter_source_element_finalize(GObject *obj)
{
EMFilterSourceElement *fs = (EMFilterSourceElement *)obj;
GList *i = fs->priv->sources;
-
+
while (i) {
SourceInfo *info = i->data;
g_free(info->account_name);
@@ -137,12 +137,12 @@ em_filter_source_element_finalize(GObject *obj)
g_free(info);
i = g_list_next(i);
}
-
+
g_list_free(fs->priv->sources);
g_free(fs->priv->current_url);
g_free(fs->priv);
-
+
G_OBJECT_CLASS(parent_class)->finalize(obj);
}
@@ -156,7 +156,7 @@ static int
source_eq(FilterElement *fe, FilterElement *cm)
{
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe, *cs = (EMFilterSourceElement *)cm;
-
+
return FILTER_ELEMENT_CLASS(parent_class)->eq(fe, cm)
&&((fs->priv->current_url && cs->priv->current_url
&& strcmp(fs->priv->current_url, cs->priv->current_url)== 0)
@@ -174,16 +174,16 @@ static xmlNodePtr
xml_encode(FilterElement *fe)
{
xmlNodePtr value;
-
+
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
-
+
value = xmlNewNode(NULL, (const unsigned char *)"value");
xmlSetProp(value, (const unsigned char *)"name", (unsigned char *)fe->name);
xmlSetProp(value, (const unsigned char *)"type", (const unsigned char *)"uri");
-
+
if (fs->priv->current_url)
xmlNewTextChild(value, NULL, (const unsigned char *)"uri", (unsigned char *)fs->priv->current_url);
-
+
return value;
}
@@ -193,23 +193,23 @@ xml_decode(FilterElement *fe, xmlNodePtr node)
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
CamelURL *url;
char *uri;
-
+
node = node->children;
while (node != NULL) {
if (!strcmp((char *)node->name, "uri")) {
uri = (char *)xmlNodeGetContent(node);
url = camel_url_new(uri, NULL);
xmlFree(uri);
-
+
g_free(fs->priv->current_url);
fs->priv->current_url = camel_url_to_string(url, CAMEL_URL_HIDE_ALL);
camel_url_free(url);
break;
}
-
+
node = node->next;
}
-
+
return 0;
}
@@ -219,16 +219,16 @@ clone(FilterElement *fe)
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
EMFilterSourceElement *cpy = em_filter_source_element_new();
GList *i;
-
+
((FilterElement *)cpy)->name = (char *)xmlStrdup((unsigned char *)fe->name);
-
+
cpy->priv->current_url = g_strdup(fs->priv->current_url);
-
+
for (i = fs->priv->sources; i != NULL; i = g_list_next(i)) {
SourceInfo *info = (SourceInfo *)i->data;
em_filter_source_element_add_source(cpy, info->account_name, info->name, info->address, info->url);
}
-
+
return (FilterElement *)cpy;
}
@@ -236,7 +236,7 @@ static void
source_changed(GtkWidget *item, EMFilterSourceElement *fs)
{
SourceInfo *info = (SourceInfo *)g_object_get_data((GObject *)item, "source");
-
+
g_free(fs->priv->current_url);
fs->priv->current_url = g_strdup(info->url);
}
@@ -251,60 +251,60 @@ get_widget(FilterElement *fe)
GList *i;
SourceInfo *first = NULL;
int index, current_index;
-
+
if (fs->priv->sources == NULL)
em_filter_source_element_get_sources(fs);
-
+
menu = gtk_menu_new();
-
+
index = 0;
current_index = -1;
-
+
for (i = fs->priv->sources; i != NULL; i = g_list_next(i)) {
SourceInfo *info = (SourceInfo *)i->data;
char *label;
-
+
if (info->url != NULL) {
if (first == NULL)
first = info;
-
+
if (info->account_name && strcmp(info->account_name, info->address))
label = g_strdup_printf("%s <%s>(%s)", info->name,
info->address, info->account_name);
else
label = g_strdup_printf("%s <%s>", info->name, info->address);
-
+
item = gtk_menu_item_new_with_label(label);
g_free(label);
-
+
g_object_set_data((GObject *)item, "source", info);
g_signal_connect(item, "activate", G_CALLBACK(source_changed), fs);
-
+
gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
gtk_widget_show(item);
-
+
if (fs->priv->current_url && !strcmp(info->url, fs->priv->current_url))
current_index = index;
-
+
index++;
}
}
-
+
omenu = gtk_option_menu_new();
gtk_option_menu_set_menu(GTK_OPTION_MENU(omenu), menu);
-
+
if (current_index >= 0) {
gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), current_index);
} else {
gtk_option_menu_set_history(GTK_OPTION_MENU(omenu), 0);
g_free(fs->priv->current_url);
-
+
if (first)
fs->priv->current_url = g_strdup(first->url);
else
fs->priv->current_url = NULL;
}
-
+
return omenu;
}
@@ -318,7 +318,7 @@ static void
format_sexp(FilterElement *fe, GString *out)
{
EMFilterSourceElement *fs = (EMFilterSourceElement *)fe;
-
+
e_sexp_encode_string(out, fs->priv->current_url);
}
@@ -328,15 +328,15 @@ em_filter_source_element_add_source(EMFilterSourceElement *fs, const char *accou
const char *addr, const char *url)
{
SourceInfo *info;
-
+
g_return_if_fail(EM_IS_FILTER_SOURCE_ELEMENT(fs));
-
+
info = g_new0(SourceInfo, 1);
info->account_name = g_strdup(account_name);
info->name = g_strdup(name);
info->address = g_strdup(addr);
info->url = g_strdup(url);
-
+
fs->priv->sources = g_list_append(fs->priv->sources, info);
}
@@ -349,12 +349,12 @@ em_filter_source_element_get_sources(EMFilterSourceElement *fs)
EIterator *it;
char *uri;
CamelURL *url;
-
+
/* should this get the global object from mail? */
gconf = gconf_client_get_default();
accounts = e_account_list_new(gconf);
g_object_unref(gconf);
-
+
for (it = e_list_get_iterator((EList *)accounts);
e_iterator_is_valid(it);
e_iterator_next(it)) {
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 28fb4ae19a..9bbb62e30f 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -115,16 +115,16 @@ struct _EMFolderBrowserPrivate {
double default_scroll_position;
guint idle_scroll_id;
guint list_scrolled_id;
-
+
guint vpane_resize_id;
guint list_built_id; /* hook onto list-built for delayed 'select first unread' stuff */
-
+
char *select_uid;
guint folder_changed_id;
guint show_wide:1;
gboolean scope_restricted;
-
+
EMMenu *menu; /* toplevel menu manager */
};
@@ -241,7 +241,7 @@ emfb_pane_realised(GtkWidget *w, EMFolderBrowser *emfb)
GConfClient *gconf;
gconf = mail_config_get_gconf_client ();
-
+
if (emfb->priv->show_wide)
gtk_paned_set_position((GtkPaned *)emfb->vpane, gconf_client_get_int(gconf, "/apps/evolution/mail/display/hpaned_size", NULL));
else
@@ -260,9 +260,9 @@ emfb_pane_button_release_event(GtkWidget *w, GdkEventButton *e, EMFolderBrowser
else
gconf_client_set_int(gconf, "/apps/evolution/mail/display/paned_size",
gtk_paned_get_position(GTK_PANED(w)), NULL);
-
+
}
-
+
return FALSE;
}
@@ -288,7 +288,7 @@ generate_viewoption_menu (GtkWidget *emfv)
str = e_str_without_underscores (_(emfb_view_items[i].search.text));
menu_item = gtk_image_menu_item_new_with_label (str);
if (emfb_view_items[i].image)
- gtk_image_menu_item_set_image ((GtkImageMenuItem *)menu_item, e_icon_factory_get_image (emfb_view_items[i].image, E_ICON_SIZE_MENU));
+ gtk_image_menu_item_set_image ((GtkImageMenuItem *)menu_item, e_icon_factory_get_image (emfb_view_items[i].image, E_ICON_SIZE_MENU));
g_free (str);
} else {
menu_item = gtk_menu_item_new ();
@@ -311,24 +311,24 @@ generate_viewoption_menu (GtkWidget *emfv)
GdkColor colour;
GdkGC *gc;
GtkWidget *image;
-
+
gdk_color_parse(label->colour, &colour);
gdk_colormap_alloc_color(gdk_colormap_get_system(), &colour, FALSE, TRUE);
-
+
pixmap = gdk_pixmap_new(((GtkWidget *)emfv)->window, 16, 16, -1);
gc = gdk_gc_new(((GtkWidget *)emfv)->window);
gdk_gc_set_foreground(gc, &colour);
gdk_draw_rectangle(pixmap, gc, TRUE, 0, 0, 16, 16);
- g_object_unref(gc);
-
- image = gtk_image_new_from_pixmap(pixmap, NULL);
+ g_object_unref(gc);
+
+ image = gtk_image_new_from_pixmap(pixmap, NULL);
str = e_str_without_underscores (label->name);
menu_item = gtk_image_menu_item_new_with_label (str);
g_free (str);
- gtk_image_menu_item_set_image ((GtkImageMenuItem *)menu_item, image);
+ gtk_image_menu_item_set_image ((GtkImageMenuItem *)menu_item, image);
g_object_set_data (G_OBJECT (menu_item), "EsbItemId",
GINT_TO_POINTER (VIEW_LABEL));
-
+
g_object_set_data (G_OBJECT (menu_item), "LabelTag",
g_strdup(label->tag));
}
@@ -343,7 +343,7 @@ generate_viewoption_menu (GtkWidget *emfv)
str = e_str_without_underscores (_(temp_view_items[i].search.text));
menu_item = gtk_image_menu_item_new_with_label (str);
if (temp_view_items[i].image)
- gtk_image_menu_item_set_image ((GtkImageMenuItem *)menu_item, e_icon_factory_get_image (temp_view_items[i].image, E_ICON_SIZE_MENU));
+ gtk_image_menu_item_set_image ((GtkImageMenuItem *)menu_item, e_icon_factory_get_image (temp_view_items[i].image, E_ICON_SIZE_MENU));
g_free (str);
} else {
menu_item = gtk_menu_item_new ();
@@ -369,13 +369,13 @@ viewoption_menu_generator ()
ESearchBarItem dup_item;
GSList *l;
- for (i = 0; emfb_view_items[i].search.id != -1; i++)
+ for (i = 0; emfb_view_items[i].search.id != -1; i++)
g_array_append_vals (menu, &emfb_view_items[i], 1);
for (l = mail_config_get_labels(); l; l = l->next) {
ESearchBarItem item;
MailConfigLabel *label = l->data;
-
+
item.text = label->name;
item.id = VIEW_LABEL;
@@ -397,9 +397,9 @@ emfb_realize (GtkWidget *widget)
EMFolderBrowser *emfb = (EMFolderBrowser *)widget;
menu = generate_viewoption_menu(widget);
- e_search_bar_set_viewoption_menu ((ESearchBar *)emfb->search, menu);
+ e_search_bar_set_viewoption_menu ((ESearchBar *)emfb->search, menu);
}
-
+
static void
html_scroll (GtkHTML *html,
GtkOrientation orientation,
@@ -413,10 +413,10 @@ html_scroll (GtkHTML *html,
if (scroll_type == GTK_SCROLL_PAGE_FORWARD) {
gtk_widget_grab_focus ((GtkWidget *)((EMFolderView *) emfb)->list);
- message_list_select(((EMFolderView *) emfb)->list, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN);
+ message_list_select(((EMFolderView *) emfb)->list, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN);
} else if (scroll_type == GTK_SCROLL_PAGE_BACKWARD) {
gtk_widget_grab_focus ((GtkWidget *)((EMFolderView *) emfb)->list);
- message_list_select(((EMFolderView *) emfb)->list, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN);
+ message_list_select(((EMFolderView *) emfb)->list, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN);
}
}
static void
@@ -455,11 +455,11 @@ emfb_init(GObject *o)
const char *systemrules = g_object_get_data (G_OBJECT (search_context), "system");
const char *userrules = g_object_get_data (G_OBJECT (search_context), "user");
EFilterBar *efb;
-
+
emfb->search = e_filter_bar_new(search_context, systemrules, userrules, emfb_search_config_search, emfb);
efb = (EFilterBar *)emfb->search;
efb->account_search_vf = NULL;
- efb->all_account_search_vf = NULL;
+ efb->all_account_search_vf = NULL;
e_search_bar_set_menu ((ESearchBar *)emfb->search, emfb_search_items);
e_search_bar_set_scopeoption ((ESearchBar *)emfb->search, emfb_search_scope_items);
e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, FALSE);
@@ -470,7 +470,7 @@ emfb_init(GObject *o)
p->search_menu_activated_id = g_signal_connect(emfb->search, "menu_activated", G_CALLBACK(emfb_search_menu_activated), emfb);
p->search_activated_id = g_signal_connect(emfb->search, "search_activated", G_CALLBACK(emfb_search_search_activated), emfb);
g_signal_connect(emfb->search, "search_cleared", G_CALLBACK(emfb_search_search_cleared), NULL);
-
+
gtk_box_pack_start((GtkBox *)emfb, (GtkWidget *)emfb->search, FALSE, TRUE, 0);
}
@@ -483,7 +483,7 @@ emfb_init(GObject *o)
gtk_widget_show(emfb->vpane);
gtk_box_pack_start_defaults((GtkBox *)emfb, emfb->vpane);
-
+
gtk_paned_add1((GtkPaned *)emfb->vpane, (GtkWidget *)emfb->view.list);
gtk_widget_show((GtkWidget *)emfb->view.list);
@@ -510,7 +510,7 @@ static void
emfb_finalise(GObject *o)
{
EMFolderBrowser *emfb = (EMFolderBrowser *)o;
-
+
g_free (emfb->priv->select_uid);
g_free (emfb->priv);
@@ -526,12 +526,12 @@ emfb_destroy(GtkObject *o)
g_signal_handler_disconnect(((EMFolderView *)emfb)->list, emfb->priv->list_built_id);
emfb->priv->list_built_id = 0;
}
-
+
if (emfb->priv->list_scrolled_id) {
g_signal_handler_disconnect (((EMFolderView *) emfb)->list, emfb->priv->list_scrolled_id);
emfb->priv->list_scrolled_id = 0;
}
-
+
if (emfb->priv->idle_scroll_id) {
g_source_remove (emfb->priv->idle_scroll_id);
emfb->priv->idle_scroll_id = 0;
@@ -539,7 +539,7 @@ emfb_destroy(GtkObject *o)
if (emfb->view.folder && emfb->priv->folder_changed_id)
camel_object_remove_event(emfb->view.folder, emfb->priv->folder_changed_id);
-
+
((GtkObjectClass *)emfb_parent)->destroy(o);
}
@@ -604,7 +604,7 @@ GtkWidget *em_folder_browser_new(void)
* @Class: org.gnome.evolution.mail.bonobomenu:1.0
* @Target: EMMenuTargetSelect
*
- * The main menu of mail view of the main application window.
+ * The main menu of mail view of the main application window.
* If the folder is NULL (not selected), the target will be empty, not NULL.
*/
((EMFolderView *)emfb)->menu = em_menu_new("org.gnome.evolution.mail.browser");
@@ -620,12 +620,12 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, TRUE);
emfb->priv->scope_restricted = FALSE;
}
-
+
return;
}
-
+
emfb->view.preview_active = state;
-
+
if (state) {
GConfClient *gconf = mail_config_get_gconf_client ();
int paned_size /*, y*/;
@@ -639,8 +639,8 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
if (emfb->view.list->cursor_uid) {
char *uid = g_alloca(strlen(emfb->view.list->cursor_uid)+1);
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, TRUE);
- emfb->priv->scope_restricted = FALSE;
+ e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, TRUE);
+ emfb->priv->scope_restricted = FALSE;
strcpy(uid, emfb->view.list->cursor_uid);
em_folder_view_set_message(&emfb->view, uid, FALSE);
}
@@ -655,7 +655,7 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
emfb->view.displayed_uid = NULL;
gtk_widget_hide(emfb->priv->preview);
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, FALSE);
+ e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, FALSE);
emfb->priv->scope_restricted = TRUE;
/*
mail_display_set_message (emfb->mail_display, NULL, NULL, NULL);
@@ -713,22 +713,22 @@ static void
emfb_search_menu_activated(ESearchBar *esb, int id, EMFolderBrowser *emfb)
{
EFilterBar *efb = (EFilterBar *)esb;
-
+
d(printf("menu activated\n"));
-
+
switch (id) {
case ESB_SAVE:
d(printf("Save vfolder\n"));
if (efb->current_query) {
- FilterRule *rule = vfolder_clone_rule(efb->current_query);
+ FilterRule *rule = vfolder_clone_rule(efb->current_query);
char *name, *text;
-
+
text = e_search_bar_get_text(esb);
name = g_strdup_printf("%s %s", rule->name, (text&&text[0])?text:"''");
g_free (text);
filter_rule_set_name(rule, name);
g_free (name);
-
+
filter_rule_set_source(rule, FILTER_SOURCE_INCOMING);
em_vfolder_rule_add_source((EMVFolderRule *)rule, emfb->view.folder_uri);
vfolder_gui_add_rule((EMVFolderRule *)rule);
@@ -750,7 +750,7 @@ emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char
partl = rule->parts;
while (partl) {
FilterPart *part = partl->data;
-
+
if (!strcmp(part->name, "subject")) {
FilterInput *input = (FilterInput *)filter_part_find_element(part, "subject");
if (input)
@@ -759,7 +759,7 @@ emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char
FilterInput *input = (FilterInput *)filter_part_find_element(part, "word");
if (input)
filter_input_set_value(input, query);
-
+
words = camel_search_words_split((unsigned char *)query);
for (i=0;i<words->len;i++)
strings = g_slist_prepend(strings, g_strdup(words->words[i]->word));
@@ -773,7 +773,7 @@ emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char
if (input)
filter_input_set_value(input, query);
}
-
+
partl = partl->next;
}
@@ -826,7 +826,7 @@ get_view_query (ESearchBar *esb)
case VIEW_NO_LABEL:
/* FIXME : cannot hard code this query */
view_sexp = "(and (match-all (not (= (user-tag \"label\") \"important\")))"
- "(match-all (not (= (user-tag \"label\") \"work\"))) (match-all (not (= (user-tag \"label\") \"personal\")))"
+ "(match-all (not (= (user-tag \"label\") \"work\"))) (match-all (not (= (user-tag \"label\") \"personal\")))"
"(match-all (not (= (user-tag \"label\") \"todo\"))) (match-all (not (= (user-tag \"label\") \"later\"))) ))";
break;
case VIEW_LABEL:
@@ -949,14 +949,14 @@ vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList
{
struct _setup_msg *m;
int id;
-
+
m = mail_msg_new(&vfolder_setup_op, NULL, sizeof (*m));
m->folder = folder;
camel_object_ref(folder);
m->query = g_strdup(query);
m->sources_uri = sources_uri;
m->sources_folder = sources_folder;
-
+
id = m->msg.seq;
e_thread_put(mail_thread_queued_slow, (EMsg *)m);
@@ -981,7 +981,7 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
if (emfv->list == NULL || emfv->folder == NULL)
return;
-
+
id = e_search_bar_get_search_scope (esb);
switch (id) {
@@ -1013,11 +1013,11 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
break;
}
- g_object_get (esb, "query", &search_word, NULL);
+ g_object_get (esb, "query", &search_word, NULL);
if (efb->account_search_vf && !strcmp (search_word, ((CamelVeeFolder *) efb->account_search_vf)->expression) ) {
break;
}
- gtk_widget_set_sensitive (esb->scopeoption, FALSE);
+ gtk_widget_set_sensitive (esb->scopeoption, FALSE);
/* Disable the folder tree */
g_signal_emit (emfb, folder_browser_signals [ACCOUNT_SEARCH_ACTIVATED], 0);
@@ -1044,12 +1044,12 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
folder_uri = mail_tools_folder_to_url ((CamelFolder *)efb->account_search_vf);
emfb_set_search_folder (emfv, (CamelFolder *)efb->account_search_vf, folder_uri);
g_free (folder_uri);
- g_free (storeuri);
+ g_free (storeuri);
} else {
/* Reuse the existing search folder */
camel_vee_folder_set_expression((CamelVeeFolder *)efb->account_search_vf, search_word);
}
-
+
break;
case E_FILTERBAR_ALL_ACCOUNTS_ID:
@@ -1061,18 +1061,18 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
efb->all_account_search_vf=NULL;
}
g_signal_emit (emfb, folder_browser_signals [ACCOUNT_SEARCH_CLEARED], 0);
- gtk_widget_set_sensitive (esb->scopeoption, TRUE);
+ gtk_widget_set_sensitive (esb->scopeoption, TRUE);
break;
}
g_object_get (esb, "query", &search_word, NULL);
-
+
if (search_word && efb->all_account_search_vf && !strcmp (search_word, ((CamelVeeFolder *) efb->all_account_search_vf)->expression) ) {
/* No real search apart from the existing one */
break;
}
-
- gtk_widget_set_sensitive (esb->scopeoption, FALSE);
+
+ gtk_widget_set_sensitive (esb->scopeoption, FALSE);
g_signal_emit (emfb, folder_browser_signals [ACCOUNT_SEARCH_ACTIVATED], 0);
if (!efb->all_account_search_vf) {
@@ -1121,13 +1121,13 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
/* Reuse the existing search folder */
camel_vee_folder_set_expression((CamelVeeFolder *)efb->all_account_search_vf, search_word);
}
-
+
break;
}
g_object_get (esb, "state", &search_state, NULL);
camel_object_meta_set (emfv->folder, "evolution:search_state", search_state);
camel_object_state_write (emfv->folder);
-
+
/* Merge the view and search expresion*/
view_sexp = get_view_query (esb);
g_object_get (esb, "query", &search_word, NULL);
@@ -1159,7 +1159,7 @@ emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev,
gboolean state, folder_choose = TRUE;
if ((ev->key.state & GDK_CONTROL_MASK) != 0)
return FALSE;
-
+
switch (ev->key.keyval) {
case GDK_space:
if (!emfb->view.preview->caret_mode) {
@@ -1167,11 +1167,11 @@ emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev,
if (!state) {
folder_choose = message_list_select(((EMFolderView *) emfb)->list, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN);
if (!folder_choose)
- folder_choose = message_list_select(((EMFolderView *) emfb)->list,
+ folder_choose = message_list_select(((EMFolderView *) emfb)->list,
MESSAGE_LIST_SELECT_NEXT | MESSAGE_LIST_SELECT_WRAP, 0, CAMEL_MESSAGE_SEEN);
}
- } else
+ } else
em_utils_adjustment_page(gtk_scrolled_window_get_vadjustment((GtkScrolledWindow *)emfb->priv->scroll), TRUE);
break;
case GDK_BackSpace:
@@ -1180,7 +1180,7 @@ emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev,
if (!state) {
folder_choose = message_list_select(((EMFolderView *) emfb)->list, MESSAGE_LIST_SELECT_PREVIOUS, 0, CAMEL_MESSAGE_SEEN);
if (!folder_choose)
- folder_choose = message_list_select(((EMFolderView *) emfb)->list,
+ folder_choose = message_list_select(((EMFolderView *) emfb)->list,
MESSAGE_LIST_SELECT_PREVIOUS | MESSAGE_LIST_SELECT_WRAP, 0, CAMEL_MESSAGE_SEEN);
}
@@ -1190,7 +1190,7 @@ emfb_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev,
default:
return FALSE;
}
-
+
if (!folder_choose && !emfb->view.preview->caret_mode) {
//check for unread messages. if yes .. rewindback to the folder
EMFolderTree *emft = g_object_get_data((GObject*)emfb, "foldertree");
@@ -1216,10 +1216,10 @@ emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *e
return;
if (uid && *uid && emfb->priv->scope_restricted && emfb->view.preview_active) {
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, TRUE);
+ e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, TRUE);
emfb->priv->scope_restricted = FALSE;
} else if ( !(uid && *uid) && !emfb->priv->scope_restricted) {
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, FALSE);
+ e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, FALSE);
emfb->priv->scope_restricted = TRUE;
}
@@ -1272,7 +1272,7 @@ static void
emfb_edit_invert_selection(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderView *emfv = data;
-
+
message_list_invert_selection(emfv->list);
}
@@ -1280,7 +1280,7 @@ static void
emfb_edit_select_all(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderView *emfv = data;
-
+
message_list_select_all(emfv->list);
gtk_widget_grab_focus ((GtkWidget *)emfv->list);
}
@@ -1289,7 +1289,7 @@ static void
emfb_edit_select_thread(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderView *emfv = data;
-
+
message_list_select_thread(emfv->list);
}
@@ -1411,7 +1411,7 @@ emfb_folder_create(BonoboUIComponent *uid, void *data, const char *path)
if ((fi = em_folder_tree_get_selected_folder_info (tree)) != NULL) {
em_folder_utils_create_folder(fi, tree);
camel_folder_info_free(fi);
- }
+ }
} else {
em_folder_utils_create_folder(NULL, tree);
}
@@ -1452,7 +1452,7 @@ static void
emfb_view_hide_read(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderView *emfv = data;
-
+
message_list_hide_add(emfv->list, "(match-all (system-flag \"seen\"))", ML_HIDE_SAME, ML_HIDE_SAME);
}
@@ -1501,7 +1501,7 @@ static void
emfb_tools_filters(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderBrowser *emfb = data;
-
+
em_utils_edit_filters ((GtkWidget *) emfb);
}
@@ -1559,7 +1559,7 @@ static BonoboUIVerb emfb_verbs[] = {
/* ViewThreaded is a toggle */
BONOBO_UI_UNSAFE_VERB ("ViewThreadsExpandAll", emfb_expand_all_threads),
- BONOBO_UI_UNSAFE_VERB ("ViewThreadsCollapseAll", emfb_collapse_all_threads),
+ BONOBO_UI_UNSAFE_VERB ("ViewThreadsCollapseAll", emfb_collapse_all_threads),
BONOBO_UI_UNSAFE_VERB ("FolderCopy", emfb_folder_copy),
BONOBO_UI_UNSAFE_VERB ("FolderMove", emfb_folder_move),
@@ -1574,7 +1574,7 @@ static BonoboUIVerb emfb_verbs[] = {
BONOBO_UI_UNSAFE_VERB ("ToolsSubscriptions", emfb_tools_subscriptions),
BONOBO_UI_UNSAFE_VERB ("ToolsVFolders", emfb_tools_vfolders),
BONOBO_UI_UNSAFE_VERB ("FocusSearch", emfb_focus_search),
-
+
/* ViewPreview is a toggle */
BONOBO_UI_VERB_END
@@ -1620,7 +1620,7 @@ emfb_view_threaded(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_
/* FIXME: do set_threaded via meta-data listener on folder? */
message_list_set_threaded(emfv->list, state[0] != '0');
-
+
/* FIXME: update selection state? */
}
@@ -1679,13 +1679,13 @@ emfb_list_scrolled (MessageList *ml, EMFolderBrowser *emfb)
EMFolderView *emfv = (EMFolderView *) emfb;
double position;
char *state;
-
+
position = message_list_get_scrollbar_position (ml);
state = g_strdup_printf ("%f", position);
-
+
if (camel_object_meta_set (emfv->folder, "evolution:list_scroll_position", state))
camel_object_state_write (emfv->folder);
-
+
g_free (state);
}
@@ -1695,20 +1695,20 @@ scroll_idle_cb (EMFolderBrowser *emfb)
EMFolderView *emfv = (EMFolderView *) emfb;
double position;
char *state;
-
+
if ((state = camel_object_meta_get (emfv->folder, "evolution:list_scroll_position"))) {
position = strtod (state, NULL);
g_free (state);
} else {
position = emfb->priv->default_scroll_position;
}
-
+
message_list_set_scrollbar_position (emfv->list, position);
-
+
emfb->priv->list_scrolled_id = g_signal_connect (emfv->list, "message_list_scrolled", G_CALLBACK (emfb_list_scrolled), emfb);
-
+
emfb->priv->idle_scroll_id = 0;
-
+
return FALSE;
}
@@ -1754,10 +1754,10 @@ emfb_list_built (MessageList *ml, EMFolderBrowser *emfb)
{
EMFolderView *emfv = (EMFolderView *) emfb;
double position = 0.0f;
-
+
g_signal_handler_disconnect (ml, emfb->priv->list_built_id);
emfb->priv->list_built_id = 0;
-
+
if (emfv->list->cursor_uid == NULL) {
if (emfb->priv->select_uid) {
CamelMessageInfo *mi;
@@ -1771,7 +1771,7 @@ emfb_list_built (MessageList *ml, EMFolderBrowser *emfb)
g_free (emfb->priv->select_uid);
emfb->priv->select_uid = NULL;
}
-
+
/* change the default to the current position */
position = message_list_get_scrollbar_position (ml);
} else {
@@ -1780,9 +1780,9 @@ emfb_list_built (MessageList *ml, EMFolderBrowser *emfb)
/*message_list_select (ml, MESSAGE_LIST_SELECT_NEXT, 0, CAMEL_MESSAGE_SEEN, TRUE);*/
}
}
-
+
emfb->priv->default_scroll_position = position;
-
+
/* FIXME: this is a gross workaround for an etable bug that I can't fix - bug #55303 */
/* this needs to be a lower priority than anything in e-table-item/e-canvas, since
* e_canvas_item_region_show_relay() uses a timeout, we have to use a timeout of the
@@ -1797,14 +1797,14 @@ emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
{
EMFolderBrowser *emfb = (EMFolderBrowser *) emfv;
char *state;
-
+
message_list_freeze(emfv->list);
-
+
if (emfb->priv->list_scrolled_id) {
g_signal_handler_disconnect (emfv->list, emfb->priv->list_scrolled_id);
emfb->priv->list_scrolled_id = 0;
}
-
+
if (emfb->priv->idle_scroll_id) {
g_source_remove (emfb->priv->idle_scroll_id);
emfb->priv->idle_scroll_id = 0;
@@ -1824,7 +1824,7 @@ emfb_set_search_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
"<column source=\"7\"/> <column source=\"13\"/> "
"<grouping><leaf column=\"7\" ascending=\"false\"/> </grouping> </ETableState>";
e_tree_set_state (((MessageList *)emfv->list)->tree, state);
-
+
message_list_thaw(emfv->list);
}
@@ -1834,14 +1834,14 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
{
EMFolderBrowser *emfb = (EMFolderBrowser *) emfv;
struct _EMFolderBrowserPrivate *p = emfb->priv;
-
+
message_list_freeze(emfv->list);
-
+
if (emfb->priv->list_scrolled_id) {
g_signal_handler_disconnect (emfv->list, emfb->priv->list_scrolled_id);
emfb->priv->list_scrolled_id = 0;
}
-
+
if (emfb->priv->idle_scroll_id) {
g_source_remove (emfb->priv->idle_scroll_id);
emfb->priv->idle_scroll_id = 0;
@@ -1853,7 +1853,7 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
}
emfb_parent->set_folder(emfv, folder, uri);
-
+
/* This is required since we get activated the first time
before the folder is open and need to override the
defaults */
@@ -1862,7 +1862,7 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
int state;
gboolean safe;
GConfClient *gconf = mail_config_get_gconf_client();
-
+
safe = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/safe_list", NULL);
if (safe) {
if (camel_object_meta_set(emfv->folder, "evolution:show_preview", "0") &&
@@ -1886,7 +1886,7 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
em_folder_browser_show_preview(emfb, state);
if (emfv->uic)
bonobo_ui_component_set_prop(emfv->uic, "/commands/ViewPreview", "state", state?"1":"0", NULL);
-
+
if ((sstate = camel_object_meta_get(folder, "evolution:thread_list"))) {
state = sstate[0] != '0';
g_free(sstate);
@@ -1895,10 +1895,10 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
message_list_set_threaded(emfv->list, state);
if (emfv->uic) {
bonobo_ui_component_set_prop(emfv->uic, "/commands/ViewThreaded", "state", state?"1":"0", NULL);
- bonobo_ui_component_set_prop(emfv->uic, "/commands/ViewThreadsCollapseAll", "sensitive", state?"1":"0", NULL);
- bonobo_ui_component_set_prop(emfv->uic, "/commands/ViewThreadsExpandAll", "sensitive", state?"1":"0", NULL);
+ bonobo_ui_component_set_prop(emfv->uic, "/commands/ViewThreadsCollapseAll", "sensitive", state?"1":"0", NULL);
+ bonobo_ui_component_set_prop(emfv->uic, "/commands/ViewThreadsExpandAll", "sensitive", state?"1":"0", NULL);
}
-
+
if (emfv->uic) {
state = (folder->folder_flags & CAMEL_FOLDER_IS_TRASH) == 0;
bonobo_ui_component_set_prop(emfv->uic, "/commands/HideDeleted", "sensitive", state?"1":"0", NULL);
@@ -1908,7 +1908,7 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
sstate = camel_object_meta_get(folder, "evolution:search_state");
g_object_set(emfb->search, "state", sstate, NULL);
g_free(sstate);
-
+
/* set the query manually, so we dont pop up advanced or saved search stuff */
if ((sstate = camel_object_meta_get (folder, "evolution:selected_uid"))) {
@@ -1917,7 +1917,7 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
g_free(p->select_uid);
p->select_uid = NULL;
}
-
+
if (emfv->list->cursor_uid == NULL && emfb->priv->list_built_id == 0)
p->list_built_id = g_signal_connect(emfv->list, "message_list_built", G_CALLBACK (emfb_list_built), emfv);
}
@@ -1949,7 +1949,7 @@ emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
g_signal_handler_block(emfb->vpane, emfb->priv->vpane_resize_id);
gtk_paned_set_position((GtkPaned *)emfb->vpane, gconf_client_get_int (gconf, emfb->priv->show_wide ? "/apps/evolution/mail/display/hpaned_size": "/apps/evolution/mail/display/paned_size", NULL));
g_signal_handler_unblock(emfb->vpane, emfb->priv->vpane_resize_id);
-
+
/* (Pre)view toggle */
if (emfv->folder
&& (sstate = camel_object_meta_get(emfv->folder, "evolution:show_preview"))) {
@@ -1962,7 +1962,7 @@ emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
bonobo_ui_component_set_prop(uic, "/commands/ViewPreview", "state", state?"1":"0", NULL);
em_folder_browser_show_preview((EMFolderBrowser *)emfv, state);
bonobo_ui_component_add_listener(uic, "ViewPreview", emfb_view_preview, emfv);
-
+
/* Stop button */
state = mail_msg_active((unsigned int)-1);
bonobo_ui_component_set_prop(uic, "/commands/MailStop", "sensitive", state?"1":"0", NULL);
@@ -1991,8 +1991,8 @@ emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
}
bonobo_ui_component_set_prop(uic, "/commands/ViewThreaded", "state", state?"1":"0", NULL);
- bonobo_ui_component_set_prop(uic, "/commands/ViewThreadsCollapseAll", "sensitive", state?"1":"0", NULL);
- bonobo_ui_component_set_prop(uic, "/commands/ViewThreadsExpandAll", "sensitive", state?"1":"0", NULL);
+ bonobo_ui_component_set_prop(uic, "/commands/ViewThreadsCollapseAll", "sensitive", state?"1":"0", NULL);
+ bonobo_ui_component_set_prop(uic, "/commands/ViewThreadsExpandAll", "sensitive", state?"1":"0", NULL);
bonobo_ui_component_add_listener(uic, "ViewThreaded", emfb_view_threaded, emfv);
message_list_set_threaded(emfv->list, state);
@@ -2002,9 +2002,9 @@ emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
bonobo_ui_component_set_prop(uic, "/commands/ViewBelow", "state", "0", NULL);
} else {
bonobo_ui_component_set_prop(uic, "/commands/ViewAfter", "state", "0", NULL);
- bonobo_ui_component_set_prop(uic, "/commands/ViewBelow", "state", "1", NULL);
+ bonobo_ui_component_set_prop(uic, "/commands/ViewBelow", "state", "1", NULL);
}
-
+
bonobo_ui_component_add_listener(uic, "ViewAfter", emfb_show_next, emfv);
bonobo_ui_component_add_listener(uic, "ViewBelow", emfb_show_below, emfv);
/* em_folder_browser_show_wide((EMFolderBrowser *)emfv, state); */
@@ -2018,7 +2018,7 @@ emfb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
e_search_bar_set_ui_component((ESearchBar *)((EMFolderBrowser *)emfv)->search, uic);
} else {
const BonoboUIVerb *v;
-
+
for (v = &emfb_verbs[0]; v->cname; v++)
bonobo_ui_component_remove_verb(uic, v->cname);
diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c
index 697641f7cd..98adb08588 100644
--- a/mail/em-folder-properties.c
+++ b/mail/em-folder-properties.c
@@ -84,10 +84,10 @@ emfp_commit(EConfig *ec, GSList *items, void *data)
struct _prop_data *prop_data = data;
CamelArgV *argv = prop_data->argv;
int i;
-
+
for (i = 0; i < argv->argc; i++) {
CamelArg *arg = &argv->argv[i];
-
+
switch (arg->tag & CAMEL_ARG_TYPE) {
case CAMEL_ARG_BOO:
arg->ca_int = gtk_toggle_button_get_active ((GtkToggleButton *) prop_data->widgets[i]);
@@ -101,7 +101,7 @@ emfp_commit(EConfig *ec, GSList *items, void *data)
break;
}
}
-
+
camel_object_setv (prop_data->object, NULL, argv);
}
@@ -110,7 +110,7 @@ emfp_free(EConfig *ec, GSList *items, void *data)
{
struct _prop_data *prop_data = data;
int i;
-
+
g_slist_free(items);
for (i = 0; i < prop_data->argv->argc; i++) {
@@ -120,7 +120,7 @@ emfp_free(EConfig *ec, GSList *items, void *data)
camel_object_free (prop_data->object, CAMEL_FOLDER_PROPERTIES, prop_data->properties);
camel_object_free (prop_data->object, CAMEL_FOLDER_NAME, prop_data->name);
-
+
camel_object_unref (prop_data->object);
g_free (prop_data->argv);
@@ -150,7 +150,7 @@ emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
gtk_widget_show (label);
gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5);
gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0);
-
+
sprintf(countstr, "%d", prop_data->unread);
label = gtk_label_new (countstr);
gtk_widget_show (label);
@@ -164,7 +164,7 @@ emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
gtk_widget_show (label);
gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5);
gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0);
-
+
sprintf(countstr, "%d", prop_data->total);
label = gtk_label_new (countstr);
gtk_widget_show (label);
@@ -177,7 +177,7 @@ emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
i = 0;
while (l) {
CamelProperty *prop = l->data;
-
+
switch (prop->tag & CAMEL_ARG_TYPE) {
case CAMEL_ARG_BOO:
w = gtk_check_button_new_with_label (prop->description);
@@ -191,7 +191,7 @@ emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5);
gtk_widget_show (label);
gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row + 1, GTK_FILL, 0, 0, 0);
-
+
w = gtk_entry_new ();
gtk_widget_show (w);
if (prop_data->argv->argv[i].ca_str) {
@@ -206,7 +206,7 @@ emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent,
g_warning ("This shouldn't be reached\n");
break;
}
-
+
row++;
l = l->next;
i++;
@@ -250,16 +250,16 @@ emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data)
camel_object_ref (folder);
/*
- Get number of VISIBLE and DELETED messages, instead of TOTAL messages. VISIBLE+DELETED
+ Get number of VISIBLE and DELETED messages, instead of TOTAL messages. VISIBLE+DELETED
gives the correct count that matches the label below the Send & Receive button
*/
camel_object_get (folder, NULL, CAMEL_FOLDER_PROPERTIES, &prop_data->properties, CAMEL_FOLDER_NAME, &prop_data->name,
CAMEL_FOLDER_VISIBLE, &prop_data->total, CAMEL_FOLDER_UNREAD, &prop_data->unread, CAMEL_FOLDER_DELETED, &deleted, NULL);
-
+
gconf = mail_config_get_gconf_client ();
hide_deleted = !gconf_client_get_bool(gconf, "/apps/evolution/mail/display/show_deleted", NULL);
- /*
+ /*
Do the calculation only for those accounts that support VTRASHes
*/
if (store->flags & CAMEL_STORE_VTRASH) {
@@ -302,20 +302,20 @@ emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data)
argv->argc = count;
arggetv = g_malloc0 (sizeof (*arggetv) + (count - CAMEL_ARGV_MAX) * sizeof (arggetv->argv[0]));
arggetv->argc = count;
-
+
i = 0;
l = prop_data->properties;
while (l) {
CamelProperty *prop = l->data;
-
+
argv->argv[i].tag = prop->tag;
arggetv->argv[i].tag = prop->tag;
arggetv->argv[i].ca_ptr = &argv->argv[i].ca_ptr;
-
+
l = l->next;
i++;
}
-
+
camel_object_getv (prop_data->object, NULL, arggetv);
g_free (arggetv);
prop_data->argv = argv;
@@ -351,7 +351,7 @@ emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data)
gtk_box_pack_start ((GtkBox *) ((GtkDialog *) dialog)->vbox, w, TRUE, TRUE, 0);
/* we do 'apply on ok' ... since instant apply may apply some very long running tasks */
-
+
g_signal_connect (dialog, "response", G_CALLBACK (emfp_dialog_response), prop_data);
gtk_widget_show (dialog);
}
@@ -359,9 +359,9 @@ emfp_dialog_got_folder (char *uri, CamelFolder *folder, void *data)
/**
* em_folder_properties_show:
* @parent: parent window for dialogue (currently unused)
- * @folder:
- * @uri:
- *
+ * @folder:
+ * @uri:
+ *
* Show folder properties for @folder and @uri. If @folder is passed
* as NULL, then the folder @uri will be loaded first.
**/
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index 0cb4b437d6..1a6406943f 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -53,13 +53,13 @@ struct _EMFolderSelectionButtonPrivate {
GtkWidget *label;
GtkWidget *selector;
-
+
char *uri; /* for single-select mode */
GList *uris; /* for multi-select mode */
-
+
char *title;
char *caption;
-
+
gboolean multiple_select;
};
@@ -74,7 +74,7 @@ GType
em_folder_selection_button_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (EMFolderSelectionButtonClass),
@@ -87,10 +87,10 @@ em_folder_selection_button_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) em_folder_selection_button_init,
};
-
+
type = g_type_register_static (GTK_TYPE_BUTTON, "EMFolderSelectionButton", &info, 0);
}
-
+
return type;
}
@@ -100,13 +100,13 @@ em_folder_selection_button_class_init (EMFolderSelectionButtonClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
GtkButtonClass *button_class = GTK_BUTTON_CLASS (klass);
-
+
parent_class = g_type_class_ref (GTK_TYPE_BUTTON);
-
+
object_class->finalize = em_folder_selection_button_finalize;
gtk_object_class->destroy = em_folder_selection_button_destroy;
button_class->clicked = em_folder_selection_button_clicked;
-
+
signals[SELECTED] = g_signal_new ("selected",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
@@ -118,7 +118,7 @@ em_folder_selection_button_class_init (EMFolderSelectionButtonClass *klass)
static void
set_contents_unselected (EMFolderSelectionButton *button)
-{
+{
gtk_image_set_from_pixbuf (GTK_IMAGE (button->priv->icon), NULL);
gtk_label_set_text (GTK_LABEL (button->priv->label), _("<click here to select a folder>"));
}
@@ -128,7 +128,7 @@ set_contents (EMFolderSelectionButton *button)
{
struct _EMFolderSelectionButtonPrivate *priv = button->priv;
char *folder_name = em_utils_folder_name_from_uri (priv->uri);
-
+
if (folder_name) {
gtk_label_set_text (GTK_LABEL (priv->label), _(folder_name));
g_free (folder_name);
@@ -142,27 +142,27 @@ em_folder_selection_button_init (EMFolderSelectionButton *emfsb)
{
struct _EMFolderSelectionButtonPrivate *priv;
GtkWidget *box;
-
+
priv = g_new0 (struct _EMFolderSelectionButtonPrivate, 1);
emfsb->priv = priv;
-
+
priv->multiple_select = FALSE;
-
+
box = gtk_hbox_new (FALSE, 4);
-
+
priv->icon = gtk_image_new ();
gtk_widget_show (priv->icon);
gtk_box_pack_start (GTK_BOX (box), priv->icon, FALSE, TRUE, 0);
-
+
priv->label = gtk_label_new ("");
gtk_widget_show (priv->label);
gtk_label_set_justify (GTK_LABEL (priv->label), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (box), priv->label, TRUE, TRUE, 0);
-
+
gtk_widget_show (box);
gtk_container_add (GTK_CONTAINER (emfsb), box);
-
+
set_contents (emfsb);
}
@@ -187,12 +187,12 @@ em_folder_selection_button_finalize (GObject *obj)
GList *lst = ((EMFolderSelectionButton*) obj)->priv->uris;
g_list_foreach (lst, (GFunc) g_free, NULL);
g_list_free (lst);
-
+
g_free (priv->title);
g_free (priv->caption);
g_free (priv->uri);
g_free (priv);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -202,17 +202,17 @@ emfsb_selector_response (EMFolderSelector *emfs, int response, EMFolderSelection
if (response == GTK_RESPONSE_OK) {
if (button->priv->multiple_select) {
GList *uris = em_folder_selector_get_selected_uris (emfs);
-
+
em_folder_selection_button_set_selection_mult (button, uris);
g_signal_emit (button, signals[SELECTED], 0);
} else {
const char *uri = em_folder_selector_get_selected_uri (emfs);
-
+
em_folder_selection_button_set_selection (button, uri);
g_signal_emit (button, signals[SELECTED], 0);
}
}
-
+
gtk_widget_destroy ((GtkWidget *) emfs);
}
@@ -223,7 +223,7 @@ em_folder_selection_button_clicked (GtkButton *button)
EMFolderTreeModel *model;
EMFolderTree *emft;
GtkWidget *dialog;
-
+
if (GTK_BUTTON_CLASS (parent_class)->clicked != NULL)
(* GTK_BUTTON_CLASS (parent_class)->clicked) (button);
@@ -252,10 +252,10 @@ GtkWidget *
em_folder_selection_button_new (const char *title, const char *caption)
{
EMFolderSelectionButton *button = g_object_new (EM_TYPE_FOLDER_SELECTION_BUTTON, NULL);
-
+
button->priv->title = g_strdup (title);
button->priv->caption = g_strdup (caption);
-
+
return GTK_WIDGET (button);
}
@@ -263,14 +263,14 @@ void
em_folder_selection_button_set_selection (EMFolderSelectionButton *button, const char *uri)
{
struct _EMFolderSelectionButtonPrivate *priv = button->priv;
-
+
g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button));
-
+
if (priv->uri != uri) {
g_free (priv->uri);
priv->uri = g_strdup (uri);
}
-
+
set_contents (button);
}
@@ -278,7 +278,7 @@ const char *
em_folder_selection_button_get_selection (EMFolderSelectionButton *button)
{
g_return_val_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button), NULL);
-
+
return button->priv->uri;
}
@@ -287,20 +287,20 @@ em_folder_selection_button_set_selection_mult (EMFolderSelectionButton *button,
{
struct _EMFolderSelectionButtonPrivate *priv = button->priv;
char *caption, *tmp, *tmp2;
-
+
g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button));
-
+
if (priv->uris) {
g_list_foreach (priv->uris, (GFunc) g_free, NULL);
g_list_free (priv->uris);
priv->uris = NULL;
}
-
+
priv->uris = uris;
-
+
/* compile the name */
caption = g_strdup ("");
-
+
while (uris) {
tmp = em_utils_folder_name_from_uri (uris->data);
if (tmp) {
@@ -316,12 +316,12 @@ em_folder_selection_button_set_selection_mult (EMFolderSelectionButton *button,
priv->uris = g_list_remove (priv->uris, uris->data);
}
}
-
+
if (caption[0])
gtk_label_set_text (GTK_LABEL (priv->label), caption + 2);
else
set_contents_unselected (button);
-
+
g_free (caption);
}
@@ -329,7 +329,7 @@ GList *
em_folder_selection_button_get_selection_mult (EMFolderSelectionButton *button)
{
g_return_val_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button), NULL);
-
+
return button->priv->uris;
}
diff --git a/mail/em-folder-selection-button.h b/mail/em-folder-selection-button.h
index 172c97c28c..5077f86f2a 100644
--- a/mail/em-folder-selection-button.h
+++ b/mail/em-folder-selection-button.h
@@ -42,15 +42,15 @@ typedef struct _EMFolderSelectionButtonClass EMFolderSelectionButtonClass;
struct _EMFolderSelectionButton {
GtkButton parent;
-
+
struct _EMFolderSelectionButtonPrivate *priv;
};
struct _EMFolderSelectionButtonClass {
GtkButtonClass parent_class;
-
+
/* Signals. */
-
+
void (* selected) (EMFolderSelectionButton *button);
};
diff --git a/mail/em-folder-selection.c b/mail/em-folder-selection.c
index d5d4430545..fb8ce56f1d 100644
--- a/mail/em-folder-selection.c
+++ b/mail/em-folder-selection.c
@@ -62,23 +62,23 @@ em_select_folder (GtkWindow *parent_window, const char *title, const char *oklab
EMFolderTreeModel *model;
GtkWidget *dialog;
EMFolderTree *emft;
-
+
model = mail_component_peek_tree_model (mail_component_peek ());
emft = (EMFolderTree *) em_folder_tree_new_with_model (model);
if (exclude)
em_folder_tree_set_excluded_func(emft, exclude, user_data);
else
em_folder_tree_set_excluded (emft, EMFT_EXCLUDE_NOSELECT|EMFT_EXCLUDE_VIRTUAL|EMFT_EXCLUDE_VTRASH);
-
+
dialog = em_folder_selector_new(emft, EM_FOLDER_SELECTOR_CAN_CREATE, title, NULL, oklabel);
-
+
d = g_malloc0(sizeof(*d));
d->data = user_data;
d->done = done;
g_signal_connect(dialog, "response", G_CALLBACK (emfs_selector_response), d);
g_object_set_data_full((GObject *)dialog, "e-select-data", d, (GDestroyNotify)g_free);
gtk_widget_show(dialog);
-
+
if (default_uri)
em_folder_selector_set_selected((EMFolderSelector *)dialog, default_uri);
}
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index 3294c4fa5a..eb1cfa19bd 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -67,7 +67,7 @@ GType
em_folder_selector_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (EMFolderSelectorClass),
@@ -80,10 +80,10 @@ em_folder_selector_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) em_folder_selector_init,
};
-
+
type = g_type_register_static (GTK_TYPE_DIALOG, "EMFolderSelector", &info, 0);
}
-
+
return type;
}
@@ -92,9 +92,9 @@ em_folder_selector_class_init (EMFolderSelectorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
-
+
parent_class = g_type_class_ref (GTK_TYPE_DIALOG);
-
+
object_class->finalize = em_folder_selector_finalize;
gtk_object_class->destroy = em_folder_selector_destroy;
}
@@ -111,13 +111,13 @@ em_folder_selector_destroy (GtkObject *obj)
{
EMFolderSelector *emfs = (EMFolderSelector *) obj;
EMFolderTreeModel *model;
-
+
if (emfs->created_id != 0) {
model = em_folder_tree_get_model (emfs->emft);
g_signal_handler_disconnect (model, emfs->created_id);
emfs->created_id = 0;
}
-
+
GTK_OBJECT_CLASS (parent_class)->destroy (obj);
}
@@ -125,11 +125,11 @@ static void
em_folder_selector_finalize (GObject *obj)
{
EMFolderSelector *emfs = (EMFolderSelector *) obj;
-
+
g_free (emfs->selected_path);
g_free (emfs->selected_uri);
g_free (emfs->created_uri);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -138,10 +138,10 @@ emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs)
{
if (response != EM_FOLDER_SELECTOR_RESPONSE_NEW)
return;
-
+
g_object_set_data ((GObject *)emfs->emft, "select", GUINT_TO_POINTER (1));
em_folder_utils_create_folder(NULL, emfs->emft);
-
+
g_signal_stop_emission_by_name (emfs, "response");
}
@@ -151,10 +151,10 @@ emfs_create_name_changed (GtkEntry *entry, EMFolderSelector *emfs)
char *path;
const char *text = NULL;
gboolean active;
-
+
if (emfs->name_entry->text_length > 0)
text = gtk_entry_get_text (emfs->name_entry);
-
+
path = em_folder_tree_get_selected_uri(emfs->emft);
active = text && path && !strchr (text, '/');
g_free(path);
@@ -181,42 +181,42 @@ void
em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel)
{
GtkWidget *label;
-
+
gtk_window_set_modal (GTK_WINDOW (emfs), FALSE);
gtk_window_set_default_size (GTK_WINDOW (emfs), 350, 300);
gtk_window_set_title (GTK_WINDOW (emfs), title);
gtk_container_set_border_width (GTK_CONTAINER (emfs), 6);
-
+
gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (emfs)->vbox), 6);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (emfs)->vbox), 6);
-
+
emfs->flags = flags;
if (flags & EM_FOLDER_SELECTOR_CAN_CREATE) {
gtk_dialog_add_button (GTK_DIALOG (emfs), GTK_STOCK_NEW, EM_FOLDER_SELECTOR_RESPONSE_NEW);
g_signal_connect (emfs, "response", G_CALLBACK (emfs_response), emfs);
}
-
+
gtk_dialog_add_buttons (GTK_DIALOG (emfs), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
oklabel?oklabel:GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
-
+
gtk_dialog_set_response_sensitive (GTK_DIALOG (emfs), GTK_RESPONSE_OK, FALSE);
gtk_dialog_set_default_response (GTK_DIALOG (emfs), GTK_RESPONSE_OK);
-
+
emfs->emft = emft;
gtk_widget_show ((GtkWidget *) emft);
-
+
g_signal_connect (emfs->emft, "folder-selected", G_CALLBACK (folder_selected_cb), emfs);
g_signal_connect (emfs->emft, "folder-activated", G_CALLBACK (folder_activated_cb), emfs);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (emfs)->vbox), (GtkWidget *)emft, TRUE, TRUE, 6);
-
+
if (text != NULL) {
label = gtk_label_new (text);
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
+ gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_widget_show (label);
-
+
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (emfs)->vbox), label, FALSE, TRUE, 6);
}
-
+
gtk_widget_grab_focus ((GtkWidget *) emfs->emft);
}
@@ -224,10 +224,10 @@ GtkWidget *
em_folder_selector_new (EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel)
{
EMFolderSelector *emfs;
-
+
emfs = g_object_new (em_folder_selector_get_type (), NULL);
em_folder_selector_construct (emfs, emft, flags, title, text, oklabel);
-
+
return (GtkWidget *) emfs;
}
@@ -238,10 +238,10 @@ emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs)
if (emfs->name_entry->text_length > 0) {
char *path;
const char *text;
-
+
text = gtk_entry_get_text (emfs->name_entry);
path = em_folder_tree_get_selected_uri(emfs->emft);
-
+
if (text && path && !strchr (text, '/'))
g_signal_emit_by_name (emfs, "response", GTK_RESPONSE_OK);
g_free(path);
@@ -253,15 +253,15 @@ em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const char *ti
{
EMFolderSelector *emfs;
GtkWidget *hbox, *w;
-
+
/* remove the CREATE flag if it is there since that's the
* whole purpose of this dialog */
flags &= ~EM_FOLDER_SELECTOR_CAN_CREATE;
-
+
emfs = g_object_new (em_folder_selector_get_type (), NULL);
em_folder_selector_construct (emfs, emft, flags, title, text, _("Create"));
em_folder_tree_set_excluded(emft, EMFT_EXCLUDE_NOINFERIORS);
-
+
hbox = gtk_hbox_new (FALSE, 0);
w = gtk_label_new_with_mnemonic (_("Folder _name:"));
gtk_box_pack_start ((GtkBox *) hbox, w, FALSE, FALSE, 6);
@@ -271,11 +271,11 @@ em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const char *ti
g_signal_connect (emfs->name_entry, "activate", G_CALLBACK (emfs_create_name_activate), emfs);
gtk_box_pack_start ((GtkBox *) hbox, (GtkWidget *) emfs->name_entry, TRUE, FALSE, 6);
gtk_widget_show_all (hbox);
-
+
gtk_box_pack_start ((GtkBox *) ((GtkDialog *) emfs)->vbox, hbox, FALSE, TRUE, 0);
-
+
gtk_widget_grab_focus ((GtkWidget *) emfs->name_entry);
-
+
return (GtkWidget *) emfs;
}
@@ -297,28 +297,28 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
{
char *uri;
const char *name;
-
+
if (!(uri = em_folder_tree_get_selected_uri (emfs->emft))) {
d(printf ("no selected folder?\n"));
return NULL;
}
-
+
if (uri && emfs->name_entry) {
CamelProvider *provider;
CamelURL *url;
char *newpath;
-
+
provider = camel_provider_get(uri, NULL);
-
+
name = gtk_entry_get_text (emfs->name_entry);
-
+
url = camel_url_new (uri, NULL);
if (provider && (provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)) {
if (url->fragment)
newpath = g_strdup_printf ("%s/%s", url->fragment, name);
else
newpath = g_strdup (name);
-
+
camel_url_set_fragment (url, newpath);
} else {
char *path;
@@ -331,17 +331,17 @@ em_folder_selector_get_selected_uri (EMFolderSelector *emfs)
} else
newpath = path;
}
-
+
g_free (emfs->selected_path);
emfs->selected_path = newpath;
-
+
g_free (emfs->selected_uri);
emfs->selected_uri = camel_url_to_string (url, 0);
-
+
camel_url_free (url);
uri = emfs->selected_uri;
}
-
+
return uri;
}
@@ -361,7 +361,7 @@ const char *
em_folder_selector_get_selected_path (EMFolderSelector *emfs)
{
char *uri, *path;
-
+
if (emfs->selected_path) {
/* already did the work in a previous call */
return emfs->selected_path;
@@ -377,7 +377,7 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs)
if (emfs->name_entry) {
const char *name;
char *newpath;
-
+
name = gtk_entry_get_text (emfs->name_entry);
newpath = g_strdup_printf ("%s/%s", path?path:"", name);
diff --git a/mail/em-folder-selector.h b/mail/em-folder-selector.h
index 1b5a0d31c9..7df2743c7c 100644
--- a/mail/em-folder-selector.h
+++ b/mail/em-folder-selector.h
@@ -42,21 +42,21 @@ typedef struct _EMFolderSelectorClass EMFolderSelectorClass;
struct _EMFolderSelector {
GtkDialog parent;
-
+
guint32 flags;
struct _EMFolderTree *emft;
-
+
struct _GtkEntry *name_entry;
char *selected_path;
char *selected_uri;
-
+
char *created_uri;
guint created_id;
};
struct _EMFolderSelectorClass {
GtkDialogClass parent_class;
-
+
};
enum {
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 9048969fef..5f4c67fc6e 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -100,7 +100,7 @@ GType
em_folder_tree_model_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (EMFolderTreeModelClass),
@@ -123,15 +123,15 @@ em_folder_tree_model_get_type (void)
NULL,
NULL
};
-
+
type = g_type_register_static (GTK_TYPE_TREE_STORE, "EMFolderTreeModel", &info, 0);
-
+
g_type_add_interface_static (type, GTK_TYPE_TREE_MODEL,
&tree_model_info);
g_type_add_interface_static (type, GTK_TYPE_TREE_SORTABLE,
&sortable_info);
}
-
+
return type;
}
@@ -140,11 +140,11 @@ static void
em_folder_tree_model_class_init (EMFolderTreeModelClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+
parent_class = g_type_class_ref (GTK_TYPE_TREE_STORE);
-
+
object_class->finalize = em_folder_tree_model_finalize;
-
+
/* signals */
signals[LOADING_ROW] =
g_signal_new ("loading-row",
@@ -156,7 +156,7 @@ em_folder_tree_model_class_init (EMFolderTreeModelClass *klass)
G_TYPE_NONE, 2,
G_TYPE_POINTER,
G_TYPE_POINTER);
-
+
signals[LOADED_ROW] =
g_signal_new ("loaded-row",
G_OBJECT_CLASS_TYPE (object_class),
@@ -167,7 +167,7 @@ em_folder_tree_model_class_init (EMFolderTreeModelClass *klass)
G_TYPE_NONE, 2,
G_TYPE_POINTER,
G_TYPE_POINTER);
-
+
signals[FOLDER_ADDED] =
g_signal_new ("folder-added",
G_OBJECT_CLASS_TYPE (object_class),
@@ -189,12 +189,12 @@ sort_cb (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data
gboolean is_store;
guint32 aflags, bflags;
int rv = -2;
-
+
gtk_tree_model_get (model, a, COL_BOOL_IS_STORE, &is_store,
COL_POINTER_CAMEL_STORE, &store,
COL_STRING_DISPLAY_NAME, &aname, COL_UINT_FLAGS, &aflags, -1);
gtk_tree_model_get (model, b, COL_STRING_DISPLAY_NAME, &bname, COL_UINT_FLAGS, &bflags, -1);
-
+
if (is_store) {
/* On This Computer is always first and Search Folders is always last */
if (!strcmp (aname, _("On This Computer")))
@@ -218,19 +218,19 @@ sort_cb (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data
else if ((bflags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_INBOX)
rv = 1;
}
-
+
if (aname == NULL) {
if (bname == NULL)
rv = 0;
} else if (bname == NULL)
rv = 1;
-
+
if (rv == -2)
rv = g_utf8_collate (aname, bname);
-
+
g_free (aname);
g_free (bname);
-
+
return rv;
}
@@ -242,7 +242,7 @@ store_info_free (struct _EMFolderTreeModelStoreInfo *si)
camel_object_remove_event (si->store, si->renamed_id);
camel_object_remove_event (si->store, si->subscribed_id);
camel_object_remove_event (si->store, si->unsubscribed_id);
-
+
g_free (si->display_name);
camel_object_unref (si->store);
gtk_tree_row_reference_free (si->row);
@@ -262,9 +262,9 @@ em_folder_tree_model_init (EMFolderTreeModel *model)
g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
(GDestroyNotify) gtk_tree_row_reference_free);
-
+
gtk_tree_sortable_set_default_sort_func ((GtkTreeSortable *) model, sort_cb, NULL, NULL);
-
+
model->accounts = mail_config_get_accounts ();
model->account_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
model->account_changed_id = g_signal_connect (model->accounts, "account-changed", G_CALLBACK (account_changed), model);
@@ -275,18 +275,18 @@ static void
em_folder_tree_model_finalize (GObject *obj)
{
EMFolderTreeModel *model = (EMFolderTreeModel *) obj;
-
+
g_free (model->filename);
if (model->state)
xmlFreeDoc (model->state);
-
+
g_hash_table_destroy (model->store_hash);
g_hash_table_destroy (model->uri_hash);
-
+
g_hash_table_destroy (model->account_hash);
g_signal_handler_disconnect (model->accounts, model->account_changed_id);
g_signal_handler_disconnect (model->accounts, model->account_removed_id);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -308,22 +308,22 @@ static void
em_folder_tree_model_load_state (EMFolderTreeModel *model, const char *filename)
{
xmlNodePtr root, node;
-
+
if (model->state)
xmlFreeDoc (model->state);
-
+
if ((model->state = e_xml_parse_file (filename)))
return;
-
+
/* setup some defaults - expand "Local Folders" and "Search Folders" */
model->state = xmlNewDoc ((const unsigned char *)"1.0");
root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
xmlDocSetRootElement (model->state, root);
-
+
node = xmlNewChild (root, NULL, (const unsigned char *)"node", NULL);
xmlSetProp (node, (const unsigned char *)"name", (const unsigned char *)"local");
xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)"true");
-
+
node = xmlNewChild (root, NULL, (const unsigned char *)"node", NULL);
xmlSetProp (node, (const unsigned char *)"name", (const unsigned char *)"vfolder");
xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)"true");
@@ -335,17 +335,17 @@ em_folder_tree_model_new (const char *evolution_dir)
{
EMFolderTreeModel *model;
char *filename;
-
+
model = g_object_new (EM_TYPE_FOLDER_TREE_MODEL, NULL);
gtk_tree_store_set_column_types ((GtkTreeStore *) model, NUM_COLUMNS, col_types);
gtk_tree_sortable_set_sort_column_id ((GtkTreeSortable *) model,
GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID,
GTK_SORT_ASCENDING);
-
+
filename = g_build_filename (evolution_dir, "mail", "config", "folder-tree-expand-state.xml", NULL);
em_folder_tree_model_load_state (model, filename);
model->filename = filename;
-
+
return model;
}
@@ -359,31 +359,31 @@ account_changed (EAccountList *accounts, EAccount *account, gpointer user_data)
CamelStore *store;
CamelException ex;
char *uri;
-
+
if (!(si = g_hash_table_lookup (model->account_hash, account)))
return;
-
+
em_folder_tree_model_remove_store (model, si->store);
-
+
/* check if store needs to be added at all*/
if (!account->enabled ||!(uri = account->source->url))
return;
-
+
camel_exception_init (&ex);
if (!(provider = camel_provider_get(uri, &ex))) {
camel_exception_clear (&ex);
return;
}
-
+
/* make sure the new store belongs in the tree */
if (!(provider->flags & CAMEL_PROVIDER_IS_STORAGE))
return;
-
+
if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex))) {
camel_exception_clear (&ex);
return;
}
-
+
em_folder_tree_model_add_store (model, store, account->name);
camel_object_unref (store);
}
@@ -393,10 +393,10 @@ account_removed (EAccountList *accounts, EAccount *account, gpointer user_data)
{
EMFolderTreeModel *model = user_data;
struct _EMFolderTreeModelStoreInfo *si;
-
+
if (!(si = g_hash_table_lookup (model->account_hash, account)))
return;
-
+
em_folder_tree_model_remove_store (model, si->store);
}
@@ -417,15 +417,15 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
if (!fully_loaded)
load = fi->child == NULL && !(fi->flags & (CAMEL_FOLDER_NOCHILDREN | CAMEL_FOLDER_NOINFERIORS));
-
+
path = gtk_tree_model_get_path ((GtkTreeModel *) model, iter);
uri_row = gtk_tree_row_reference_new ((GtkTreeModel *) model, path);
path_row = gtk_tree_row_reference_copy (uri_row);
gtk_tree_path_free (path);
-
+
g_hash_table_insert (model->uri_hash, g_strdup (fi->uri), uri_row);
g_hash_table_insert (si->full_hash, g_strdup (fi->full_name), path_row);
-
+
/* HACK: if we have the folder, and its the outbox folder, we need the total count, not unread */
/* HACK2: We do the same to the draft folder */
/* This is duplicated in mail-folder-cache too, should perhaps be functionised */
@@ -433,26 +433,26 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
if (mail_note_get_folder_from_uri(fi->uri, &folder) && folder) {
if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)) {
int total;
-
+
if ((total = camel_folder_get_message_count (folder)) > 0) {
int deleted = camel_folder_get_deleted_message_count (folder);
-
+
if (deleted != -1)
total -= deleted;
}
-
+
unread = total > 0 ? total : 0;
- }
+ }
if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)) {
int total;
-
+
if ((total = camel_folder_get_message_count (folder)) > 0) {
int deleted = camel_folder_get_deleted_message_count (folder);
-
+
if (deleted != -1)
total -= deleted;
}
-
+
unread = total > 0 ? total : 0;
}
camel_object_unref(folder);
@@ -489,7 +489,7 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
if (unread != ~0)
gtk_tree_store_set ((GtkTreeStore *) model, iter, COL_UINT_UNREAD, unread, -1);
-
+
if (load) {
/* create a placeholder node for our subfolders... */
gtk_tree_store_append ((GtkTreeStore *) model, &sub, iter);
@@ -502,31 +502,31 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite
COL_STRING_URI, NULL,
COL_UINT_UNREAD, 0,
-1);
-
+
path = gtk_tree_model_get_path ((GtkTreeModel *) model, iter);
g_signal_emit (model, signals[LOADING_ROW], 0, path, iter);
gtk_tree_path_free (path);
return;
}
-
+
if (fi->child) {
fi = fi->child;
-
+
do {
gtk_tree_store_append ((GtkTreeStore *) model, &sub, iter);
-
+
if (!emitted) {
path = gtk_tree_model_get_path ((GtkTreeModel *) model, iter);
g_signal_emit (model, signals[LOADED_ROW], 0, path, iter);
gtk_tree_path_free (path);
emitted = TRUE;
}
-
+
em_folder_tree_model_set_folder_info (model, &sub, si, fi, fully_loaded);
fi = fi->next;
} while (fi);
}
-
+
if (!emitted) {
path = gtk_tree_model_get_path ((GtkTreeModel *) model, iter);
g_signal_emit (model, signals[LOADED_ROW], 0, path, iter);
@@ -547,11 +547,11 @@ folder_subscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel *mo
if (!(si = g_hash_table_lookup (model->store_hash, store)))
goto done;
-
+
/* make sure we don't already know about it? */
if (g_hash_table_lookup (si->full_hash, fi->full_name))
goto done;
-
+
/* get our parent folder's path */
dirname = alloca(strlen(fi->full_name)+1);
strcpy(dirname, fi->full_name);
@@ -562,36 +562,36 @@ folder_subscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel *mo
} else {
*p = 0;
row = g_hash_table_lookup (si->full_hash, dirname);
-
+
/* if row is NULL, don't bother adding to the tree,
* when the user expands enough nodes - it will be
* added auto-magically */
if (row == NULL)
goto done;
}
-
+
path = gtk_tree_row_reference_get_path (row);
if (!(gtk_tree_model_get_iter ((GtkTreeModel *) model, &parent, path))) {
gtk_tree_path_free (path);
goto done;
}
-
+
gtk_tree_path_free (path);
-
+
/* make sure parent's subfolders have already been loaded */
gtk_tree_model_get ((GtkTreeModel *) model, &parent, COL_BOOL_LOAD_SUBDIRS, &load, -1);
if (load)
goto done;
-
+
/* append a new node */
gtk_tree_store_append ((GtkTreeStore *) model, &iter, &parent);
-
+
em_folder_tree_model_set_folder_info (model, &iter, si, fi, TRUE);
g_signal_emit (model, signals[FOLDER_ADDED], 0, fi->full_name, fi->uri);
-
+
done:
-
+
camel_object_unref (store);
camel_folder_info_free (fi);
}
@@ -600,7 +600,7 @@ static void
folder_subscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
{
CamelFolderInfo *fi;
-
+
camel_object_ref (store);
fi = camel_folder_info_clone (event_data);
mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) folder_subscribed, store, fi, model);
@@ -613,23 +613,23 @@ folder_unsubscribed (CamelStore *store, CamelFolderInfo *fi, EMFolderTreeModel *
GtkTreeRowReference *row;
GtkTreePath *path;
GtkTreeIter iter;
-
+
if (!(si = g_hash_table_lookup (model->store_hash, store)))
goto done;
-
+
if (!(row = g_hash_table_lookup (si->full_hash, fi->full_name)))
goto done;
-
+
path = gtk_tree_row_reference_get_path (row);
if (!(gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, path))) {
gtk_tree_path_free (path);
goto done;
}
-
+
em_folder_tree_model_remove_folders (model, si, &iter);
-
+
done:
-
+
camel_object_unref (store);
camel_folder_info_free (fi);
}
@@ -638,7 +638,7 @@ static void
folder_unsubscribed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
{
CamelFolderInfo *fi;
-
+
camel_object_ref (store);
fi = camel_folder_info_clone (event_data);
mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) folder_unsubscribed, store, fi, model);
@@ -652,7 +652,7 @@ folder_created_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model
/* we only want created events to do more work if we don't support subscriptions */
if (camel_store_supports_subscriptions (store))
return;
-
+
camel_object_ref (store);
fi = camel_folder_info_clone (event_data);
mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) folder_subscribed, store, fi, model);
@@ -662,11 +662,11 @@ static void
folder_deleted_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
{
CamelFolderInfo *fi;
-
+
/* we only want deleted events to do more work if we don't support subscriptions */
if (camel_store_supports_subscriptions (store))
return;
-
+
camel_object_ref (store);
fi = camel_folder_info_clone (event_data);
mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) folder_unsubscribed_cb, store, fi, model);
@@ -683,18 +683,18 @@ folder_renamed (CamelStore *store, CamelRenameInfo *info, EMFolderTreeModel *mod
if (!(si = g_hash_table_lookup (model->store_hash, store)))
goto done;
-
+
if (!(row = g_hash_table_lookup (si->full_hash, info->old_base)))
goto done;
-
+
path = gtk_tree_row_reference_get_path (row);
if (!(gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, path))) {
gtk_tree_path_free (path);
goto done;
}
-
+
em_folder_tree_model_remove_folders (model, si, &iter);
-
+
parent = g_strdup(info->new->full_name);
p = strrchr(parent, '/');
if (p)
@@ -712,25 +712,25 @@ folder_renamed (CamelStore *store, CamelRenameInfo *info, EMFolderTreeModel *mod
g_free (parent);
goto done;
}
-
+
path = gtk_tree_row_reference_get_path (row);
}
-
+
g_free (parent);
-
+
if (!gtk_tree_model_get_iter ((GtkTreeModel *) model, &root, path)) {
gtk_tree_path_free (path);
- g_warning ("This shouldn't be reached\n");
+ g_warning ("This shouldn't be reached\n");
goto done;
}
-
+
gtk_tree_store_append ((GtkTreeStore *) model, &iter, &root);
em_folder_tree_model_set_folder_info (model, &iter, si, info->new, TRUE);
-
+
done:
-
+
camel_object_unref (store);
-
+
g_free (info->old_base);
camel_folder_info_free (info->new);
g_free (info);
@@ -740,13 +740,13 @@ static void
folder_renamed_cb (CamelStore *store, void *event_data, EMFolderTreeModel *model)
{
CamelRenameInfo *rinfo, *info = event_data;
-
+
camel_object_ref (store);
-
+
rinfo = g_new0 (CamelRenameInfo, 1);
rinfo->old_base = g_strdup (info->old_base);
rinfo->new = camel_folder_info_clone (info->new);
-
+
mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) folder_renamed, store, rinfo, model);
}
@@ -759,18 +759,18 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, con
GtkTreePath *path;
EAccount *account;
char *uri;
-
+
g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
g_return_if_fail (CAMEL_IS_STORE (store));
g_return_if_fail (display_name != NULL);
-
+
if ((si = g_hash_table_lookup (model->store_hash, store)))
em_folder_tree_model_remove_store (model, store);
-
+
uri = camel_url_to_string (((CamelService *) store)->url, CAMEL_URL_HIDE_ALL);
-
+
account = mail_config_get_account_by_source_url (uri);
-
+
/* add the store to the tree */
gtk_tree_store_append ((GtkTreeStore *) model, &iter, NULL);
gtk_tree_store_set ((GtkTreeStore *) model, &iter,
@@ -780,10 +780,10 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, con
COL_BOOL_LOAD_SUBDIRS, TRUE,
COL_BOOL_IS_STORE, TRUE,
COL_STRING_URI, uri, -1);
-
+
path = gtk_tree_model_get_path ((GtkTreeModel *) model, &iter);
row = gtk_tree_row_reference_new ((GtkTreeModel *) model, path);
-
+
si = g_new (struct _EMFolderTreeModelStoreInfo, 1);
si->display_name = g_strdup (display_name);
camel_object_ref (store);
@@ -796,7 +796,7 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, con
(GDestroyNotify) gtk_tree_row_reference_free);
g_hash_table_insert (model->store_hash, store, si);
g_hash_table_insert (model->account_hash, account, si);
-
+
/* each store has folders... but we don't load them until the user demands them */
root = iter;
gtk_tree_store_append ((GtkTreeStore *) model, &iter, &root);
@@ -809,9 +809,9 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, con
COL_STRING_URI, NULL,
COL_UINT_UNREAD, 0,
-1);
-
+
g_free (uri);
-
+
/* listen to store events */
#define CAMEL_CALLBACK(func) ((CamelObjectEventHookFunc) func)
si->created_id = camel_object_hook_event (store, "folder_created", CAMEL_CALLBACK (folder_created_cb), model);
@@ -819,7 +819,7 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model, CamelStore *store, con
si->renamed_id = camel_object_hook_event (store, "folder_renamed", CAMEL_CALLBACK (folder_renamed_cb), model);
si->subscribed_id = camel_object_hook_event (store, "folder_subscribed", CAMEL_CALLBACK (folder_subscribed_cb), model);
si->unsubscribed_id = camel_object_hook_event (store, "folder_unsubscribed", CAMEL_CALLBACK (folder_unsubscribed_cb), model);
-
+
g_signal_emit (model, signals[LOADED_ROW], 0, path, &root);
gtk_tree_path_free (path);
}
@@ -839,13 +839,13 @@ static void
em_folder_tree_model_remove_store_info (EMFolderTreeModel *model, CamelStore *store)
{
struct _EMFolderTreeModelStoreInfo *si;
-
+
g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
g_return_if_fail (CAMEL_IS_STORE (store));
-
+
if (!(si = g_hash_table_lookup (model->store_hash, store)))
return;
-
+
g_hash_table_remove (model->store_hash, si->store);
g_hash_table_remove (model->account_hash, si->account);
}
@@ -857,32 +857,32 @@ em_folder_tree_model_remove_folders (EMFolderTreeModel *model, struct _EMFolderT
char *uri, *full_name;
gboolean is_store, go;
GtkTreeIter iter;
-
+
if (gtk_tree_model_iter_children ((GtkTreeModel *) model, &iter, toplevel)) {
do {
GtkTreeIter next = iter;
-
+
go = gtk_tree_model_iter_next ((GtkTreeModel *) model, &next);
em_folder_tree_model_remove_folders (model, si, &iter);
iter = next;
} while (go);
}
-
+
gtk_tree_model_get ((GtkTreeModel *) model, toplevel, COL_STRING_URI, &uri,
COL_STRING_FULL_NAME, &full_name,
COL_BOOL_IS_STORE, &is_store, -1);
if (full_name)
g_hash_table_remove (si->full_hash, full_name);
-
+
if (uri)
em_folder_tree_model_remove_uri (model, uri);
-
+
gtk_tree_store_remove ((GtkTreeStore *) model, toplevel);
-
+
if (is_store)
em_folder_tree_model_remove_store_info (model, si->store);
-
+
g_free (full_name);
g_free (uri);
}
@@ -894,17 +894,17 @@ em_folder_tree_model_remove_store (EMFolderTreeModel *model, CamelStore *store)
struct _EMFolderTreeModelStoreInfo *si;
GtkTreePath *path;
GtkTreeIter iter;
-
+
g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
g_return_if_fail (CAMEL_IS_STORE (store));
-
+
if (!(si = g_hash_table_lookup (model->store_hash, store)))
return;
-
+
path = gtk_tree_row_reference_get_path (si->row);
gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, path);
gtk_tree_path_free (path);
-
+
/* recursively remove subfolders and finally the toplevel store */
em_folder_tree_model_remove_folders (model, si, &iter);
}
@@ -915,7 +915,7 @@ find_xml_node (xmlNodePtr root, const char *name)
{
xmlNodePtr node;
char *nname;
-
+
node = root->children;
while (node != NULL) {
if (!strcmp ((char *)node->name, "node")) {
@@ -924,13 +924,13 @@ find_xml_node (xmlNodePtr root, const char *name)
xmlFree (nname);
return node;
}
-
+
xmlFree (nname);
}
-
+
node = node->next;
}
-
+
return node;
}
@@ -948,31 +948,31 @@ em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key)
node = model->state ? model->state->children : NULL;
if (!node || strcmp ((char *)node->name, "tree-state") != 0)
return FALSE;
-
+
name = buf = g_alloca (strlen (key) + 1);
p = g_stpcpy (buf, key);
if (p[-1] == '/')
p[-1] = '\0';
p = NULL;
-
+
do {
if ((p = strchr (name, '/')))
*p = '\0';
-
+
if ((node = find_xml_node (node, name))) {
gboolean expanded;
-
+
buf = (char *)xmlGetProp (node, (const unsigned char *)"expand");
expanded = buf && !strcmp ((char *)buf, "true");
xmlFree (buf);
-
+
if (!expanded || p == NULL)
return expanded;
}
-
+
name = p ? p + 1 : NULL;
} while (name && node);
-
+
return FALSE;
}
@@ -983,41 +983,41 @@ em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gb
xmlNodePtr node, parent;
const char *name;
char *buf, *p;
-
+
if (model->state == NULL)
model->state = xmlNewDoc ((const unsigned char *)"1.0");
-
+
if (!model->state->children) {
node = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
xmlDocSetRootElement (model->state, node);
} else {
node = model->state->children;
}
-
+
name = buf = g_alloca (strlen (key) + 1);
p = g_stpcpy (buf, key);
if (p[-1] == '/')
p[-1] = '\0';
p = NULL;
-
+
do {
parent = node;
if ((p = strchr (name, '/')))
*p = '\0';
-
+
if (!(node = find_xml_node (node, name))) {
if (!expanded) {
/* node doesn't exist, so we don't need to set expanded to FALSE */
return;
}
-
+
/* node (or parent node) doesn't exist, need to add it */
node = xmlNewChild (parent, NULL, (const unsigned char *)"node", NULL);
xmlSetProp (node, (const unsigned char *)"name", (unsigned char *)name);
}
-
+
xmlSetProp (node, (const unsigned char *)"expand", (const unsigned char *)(expanded || p ? "true" : "false"));
-
+
name = p ? p + 1 : NULL;
} while (name);
}
@@ -1049,7 +1049,7 @@ emftm_uri_to_key (const char *uri)
} else {
const char *path;
EAccount *account;
-
+
if (((CamelService *)store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)
path = url->fragment;
else
@@ -1119,18 +1119,18 @@ void
em_folder_tree_model_save_state (EMFolderTreeModel *model)
{
char *dirname;
-
+
if (model->state == NULL)
return;
-
+
dirname = g_path_get_dirname (model->filename);
if (g_mkdir_with_parents (dirname, 0777) == -1 && errno != EEXIST) {
g_free (dirname);
return;
}
-
+
g_free (dirname);
-
+
e_xml_save_file (model->filename, model->state);
}
@@ -1140,28 +1140,28 @@ expand_foreach_r (EMFolderTreeModel *model, xmlNodePtr parent, const char *dirna
{
xmlNodePtr node = parent->children;
char *path, *name, *expand;
-
+
while (node != NULL) {
if (!strcmp ((char *)node->name, "node")) {
name = (char *)xmlGetProp (node, (const unsigned char *)"name");
expand = (char *)xmlGetProp (node, (const unsigned char *)"expand");
-
+
if (expand && name && !strcmp ((char *)expand, "true")) {
if (dirname)
path = g_strdup_printf ("%s/%s", dirname, name);
else
path = g_strdup (name);
-
+
func (model, path, user_data);
if (node->children)
expand_foreach_r (model, node, path, func, user_data);
g_free (path);
}
-
+
xmlFree (expand);
xmlFree (name);
}
-
+
node = node->next;
}
}
@@ -1170,11 +1170,11 @@ void
em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, void *user_data)
{
xmlNodePtr root;
-
+
root = model->state ? model->state->children : NULL;
if (!root || !root->children || strcmp ((char *)root->name, "tree-state") != 0)
return;
-
+
expand_foreach_r (model, root, NULL, func, user_data);
}
@@ -1197,12 +1197,12 @@ em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store,
u(printf(" can't find store\n"));
return FALSE;
}
-
+
if (!(row = g_hash_table_lookup (si->full_hash, full))) {
u(printf(" can't find row\n"));
return FALSE;
}
-
+
tree_path = gtk_tree_row_reference_get_path (row);
if (!gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, tree_path)) {
gtk_tree_path_free (tree_path);
@@ -1210,7 +1210,7 @@ em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store,
}
gtk_tree_path_free (tree_path);
-
+
gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, COL_UINT_FLAGS, &flags, -1);
if ((flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_INBOX)
@@ -1226,7 +1226,7 @@ em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *sto
GtkTreeRowReference *row;
GtkTreePath *tree_path;
GtkTreeIter iter;
-
+
g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
g_return_if_fail (CAMEL_IS_STORE (store));
g_return_if_fail (full != NULL);
@@ -1235,25 +1235,25 @@ em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *sto
if (unread < 0)
return;
-
+
if (!(si = g_hash_table_lookup (model->store_hash, store))) {
u(printf(" can't find store\n"));
return;
}
-
+
if (!(row = g_hash_table_lookup (si->full_hash, full))) {
u(printf(" can't find row\n"));
return;
}
-
+
tree_path = gtk_tree_row_reference_get_path (row);
if (!gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, tree_path)) {
gtk_tree_path_free (tree_path);
return;
}
-
+
gtk_tree_path_free (tree_path);
-
+
gtk_tree_store_set ((GtkTreeStore *) model, &iter, COL_UINT_UNREAD, unread, -1);
}
@@ -1263,25 +1263,25 @@ em_folder_tree_model_get_selected (EMFolderTreeModel *model)
{
xmlNodePtr node;
char *buf, *uri;
-
+
node = model->state ? model->state->children : NULL;
if (!node || strcmp ((char *)node->name, "tree-state") != 0)
return NULL;
-
+
node = node->children;
while (node != NULL) {
if (!strcmp ((char *)node->name, "selected"))
break;
node = node->next;
}
-
+
if (node == NULL)
return NULL;
-
+
buf = (char *)xmlGetProp (node, (unsigned char *)"uri");
uri = g_strdup (buf);
xmlFree (buf);
-
+
if (uri && !*uri) {
g_free (uri);
return NULL;
@@ -1294,26 +1294,26 @@ void
em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri)
{
xmlNodePtr root, node;
-
+
if (model->state == NULL)
model->state = xmlNewDoc ((unsigned char *)"1.0");
-
+
if (!model->state->children) {
root = xmlNewDocNode (model->state, NULL, (const unsigned char *)"tree-state", NULL);
xmlDocSetRootElement (model->state, root);
} else {
root = model->state->children;
}
-
+
node = root->children;
while (node != NULL) {
if (!strcmp ((char *)node->name, "selected"))
break;
node = node->next;
}
-
+
if (node == NULL)
node = xmlNewChild (root, NULL, (const unsigned char *)"selected", NULL);
-
+
xmlSetProp (node, (const unsigned char *)"uri", (unsigned char *)uri);
}
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h
index 9c5a4124d2..5360ed4390 100644
--- a/mail/em-folder-tree-model.h
+++ b/mail/em-folder-tree-model.h
@@ -70,9 +70,9 @@ struct _EMFolderTreeModelStoreInfo {
GtkTreeRowReference *row;
GHashTable *full_hash; /* maps CamelFolderInfo::full_name's to GtkTreeRowReferences */
EAccount *account;
-
+
char *display_name;
-
+
unsigned int created_id;
unsigned int deleted_id;
unsigned int renamed_id;
@@ -82,13 +82,13 @@ struct _EMFolderTreeModelStoreInfo {
struct _EMFolderTreeModel {
GtkTreeStore parent_object;
-
+
char *filename; /* state filename */
xmlDocPtr state; /* saved expanded state from previous session */
-
+
GHashTable *store_hash; /* maps CamelStore's to store-info's */
GHashTable *uri_hash; /* maps URI's to GtkTreeRowReferences */
-
+
EAccountList *accounts;
GHashTable *account_hash; /* maps accounts to store-info's */
gulong account_changed_id;
@@ -97,20 +97,20 @@ struct _EMFolderTreeModel {
struct _EMFolderTreeModelClass {
GtkTreeStoreClass parent_class;
-
+
/* signals */
void (* loading_row) (EMFolderTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter);
-
+
void (* loaded_row) (EMFolderTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter);
-
+
void (* folder_added) (EMFolderTreeModel *model,
const char *path,
const char *uri);
-
+
void (* store_added) (EMFolderTreeModel *model,
const char *uri);
};
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index acf317a15c..adf8616755 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -86,10 +86,10 @@ struct _selected_uri {
struct _EMFolderTreePrivate {
GtkTreeView *treeview;
EMFolderTreeModel *model;
-
+
GSList *select_uris; /* selected_uri structures of each path pending selection. */
GHashTable *select_uris_table; /*Removed as they're encountered, so use this to find uri's not presnet but selected */
-
+
guint32 excluded;
gboolean (*excluded_func)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, void *data);
void *excluded_data;
@@ -99,16 +99,16 @@ struct _EMFolderTreePrivate {
* else has set the cursor, otherwise
* we need to set it when we set the
* selection */
-
+
guint save_state_id;
-
+
guint autoscroll_id;
guint autoexpand_id;
GtkTreeRowReference *autoexpand_row;
-
+
guint loading_row_id;
guint loaded_row_id;
-
+
GtkTreeRowReference *drag_row;
};
@@ -183,7 +183,7 @@ GType
em_folder_tree_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (EMFolderTreeClass),
@@ -196,10 +196,10 @@ em_folder_tree_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) em_folder_tree_init,
};
-
+
type = g_type_register_static (GTK_TYPE_VBOX, "EMFolderTree", &info, 0);
}
-
+
return type;
}
@@ -209,14 +209,14 @@ em_folder_tree_class_init (EMFolderTreeClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkObjectClass *gtk_object_class = GTK_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-
+
parent_class = g_type_class_ref (GTK_TYPE_VBOX);
-
+
object_class->finalize = em_folder_tree_finalize;
gtk_object_class->destroy = em_folder_tree_destroy;
widget_class->popup_menu = emft_popup_menu;
-
+
signals[FOLDER_SELECTED] =
g_signal_new ("folder-selected",
G_OBJECT_CLASS_TYPE (object_class),
@@ -228,7 +228,7 @@ em_folder_tree_class_init (EMFolderTreeClass *klass)
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_UINT);
-
+
signals[FOLDER_ACTIVATED] =
g_signal_new ("folder-activated",
G_OBJECT_CLASS_TYPE (object_class),
@@ -246,20 +246,20 @@ subdirs_contain_unread (GtkTreeModel *model, GtkTreeIter *root)
{
unsigned int unread;
GtkTreeIter iter;
-
+
if (!gtk_tree_model_iter_children (model, &iter, root))
return FALSE;
-
+
do {
gtk_tree_model_get (model, &iter, COL_UINT_UNREAD, &unread, -1);
if (unread)
return TRUE;
-
+
if (gtk_tree_model_iter_has_child (model, &iter))
if (subdirs_contain_unread (model, &iter))
return TRUE;
} while (gtk_tree_model_iter_next (model, &iter));
-
+
return FALSE;
}
@@ -287,7 +287,7 @@ render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
GdkPixbuf *pixbuf = NULL;
gboolean is_store;
guint32 flags;
-
+
if (!initialised) {
folder_icons[FOLDER_ICON_NORMAL] = e_icon_factory_get_icon ("folder", E_ICON_SIZE_MENU);
folder_icons[FOLDER_ICON_INBOX] = e_icon_factory_get_icon ("mail-inbox", E_ICON_SIZE_MENU);
@@ -298,10 +298,10 @@ render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
folder_icons[FOLDER_ICON_SHARED_BY_ME] = e_icon_factory_get_icon ("stock_shared-by-me", E_ICON_SIZE_MENU);
folder_icons[FOLDER_ICON_SENT] = e_icon_factory_get_icon ("mail-sent", E_ICON_SIZE_MENU);
folder_icons[FOLDER_ICON_VIRTUAL] = e_icon_factory_get_icon ("folder-saved-search", E_ICON_SIZE_MENU);
-
+
initialised = TRUE;
}
-
+
gtk_tree_model_get (model, iter, COL_BOOL_IS_STORE, &is_store, COL_UINT_FLAGS, &flags, -1);
if (!is_store) {
@@ -322,9 +322,9 @@ render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
pixbuf = folder_icons[FOLDER_ICON_SENT];
break;
default:
- if (flags & CAMEL_FOLDER_SHARED_TO_ME)
+ if (flags & CAMEL_FOLDER_SHARED_TO_ME)
pixbuf = folder_icons[FOLDER_ICON_SHARED_TO_ME];
- else if (flags & CAMEL_FOLDER_SHARED_BY_ME)
+ else if (flags & CAMEL_FOLDER_SHARED_BY_ME)
pixbuf = folder_icons[FOLDER_ICON_SHARED_BY_ME];
else if (flags & CAMEL_FOLDER_VIRTUAL)
pixbuf = folder_icons[FOLDER_ICON_VIRTUAL];
@@ -332,7 +332,7 @@ render_pixbuf (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
pixbuf = folder_icons[FOLDER_ICON_NORMAL];
}
}
-
+
g_object_set (renderer, "pixbuf", pixbuf, "visible", !is_store, NULL);
}
@@ -344,16 +344,16 @@ render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
unsigned int unread;
char *display;
char *name;
-
+
gtk_tree_model_get (model, iter, COL_STRING_DISPLAY_NAME, &name,
COL_BOOL_IS_STORE, &is_store,
COL_UINT_UNREAD, &unread, -1);
-
+
if (!(bold = is_store || unread)) {
if (gtk_tree_model_iter_has_child (model, iter))
bold = subdirs_contain_unread (model, iter);
}
-
+
if (!is_store && unread) {
/* Translators: This is the string used for displaying the
* folder names in folder trees. "%s" will be replaced by
@@ -374,11 +374,11 @@ render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
g_free (name);
} else
display = name;
-
+
g_object_set (renderer, "text", display,
"weight", bold ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL,
NULL);
-
+
g_free (display);
}
@@ -424,7 +424,7 @@ static void
em_folder_tree_init (EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv;
-
+
priv = g_new0 (struct _EMFolderTreePrivate, 1);
priv->select_uris_table = g_hash_table_new(g_str_hash, g_str_equal);
priv->treeview = NULL;
@@ -447,7 +447,7 @@ em_folder_tree_finalize (GObject *obj)
}
g_free (emft->priv);
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -456,38 +456,38 @@ em_folder_tree_destroy (GtkObject *obj)
{
EMFolderTree *emft = (EMFolderTree *) obj;
struct _EMFolderTreePrivate *priv = emft->priv;
-
+
if (priv->loading_row_id != 0) {
g_signal_handler_disconnect (priv->model, priv->loading_row_id);
priv->loading_row_id = 0;
}
-
+
if (priv->loaded_row_id != 0) {
g_signal_handler_disconnect (priv->model, priv->loaded_row_id);
priv->loaded_row_id = 0;
}
-
+
if (priv->save_state_id != 0) {
g_source_remove (priv->save_state_id);
emft_save_state (emft);
}
-
+
if (priv->autoscroll_id != 0) {
g_source_remove (priv->autoscroll_id);
priv->autoscroll_id = 0;
}
-
+
if (priv->autoexpand_id != 0) {
gtk_tree_row_reference_free (priv->autoexpand_row);
priv->autoexpand_row = NULL;
-
+
g_source_remove (priv->autoexpand_id);
priv->autoexpand_id = 0;
}
-
+
priv->treeview = NULL;
priv->model = NULL;
-
+
GTK_OBJECT_CLASS (parent_class)->destroy (obj);
}
@@ -501,24 +501,24 @@ folder_tree_new (EMFolderTree *emft, EMFolderTreeModel *model)
gboolean side_bar_search;
GConfClient *gconf;
- gconf = mail_config_get_gconf_client ();
+ gconf = mail_config_get_gconf_client ();
side_bar_search = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/side_bar_search", NULL);
-
+
tree = gtk_tree_view_new_with_model ((GtkTreeModel *) model);
GTK_WIDGET_SET_FLAGS(tree, GTK_CAN_FOCUS);
-
+
column = gtk_tree_view_column_new ();
gtk_tree_view_append_column ((GtkTreeView *) tree, column);
-
+
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_tree_view_column_pack_start (column, renderer, FALSE);
gtk_tree_view_column_set_cell_data_func (column, renderer, render_pixbuf, NULL, NULL);
-
+
renderer = gtk_cell_renderer_text_new ();
g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
gtk_tree_view_column_pack_start (column, renderer, TRUE);
gtk_tree_view_column_set_cell_data_func (column, renderer, render_display_name, NULL, NULL);
-
+
selection = gtk_tree_view_get_selection ((GtkTreeView *) tree);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
gtk_tree_selection_set_select_function(selection, emft_select_func, emft, NULL);
@@ -536,29 +536,29 @@ em_folder_tree_construct (EMFolderTree *emft, EMFolderTreeModel *model)
struct _EMFolderTreePrivate *priv = emft->priv;
GtkTreeSelection *selection;
GtkWidget *scrolled;
-
+
scrolled = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled), GTK_SHADOW_IN);
-
+
priv->model = model;
priv->treeview = folder_tree_new (emft, model);
gtk_widget_show ((GtkWidget *) priv->treeview);
-
+
g_signal_connect (priv->model, "row-changed", G_CALLBACK (emft_model_row_changed), emft);
g_signal_connect (priv->treeview, "row-expanded", G_CALLBACK (emft_tree_row_expanded), emft);
g_signal_connect (priv->treeview, "test-collapse-row", G_CALLBACK (emft_tree_test_collapse_row), emft);
g_signal_connect (priv->treeview, "row-activated", G_CALLBACK (emft_tree_row_activated), emft);
g_signal_connect (priv->treeview, "button-press-event", G_CALLBACK (emft_tree_button_press), emft);
g_signal_connect (priv->treeview, "key-press-event", G_CALLBACK (emft_tree_user_event), emft);
-
+
selection = gtk_tree_view_get_selection ((GtkTreeView *) priv->treeview);
g_signal_connect (selection, "changed", G_CALLBACK (emft_tree_selection_changed), emft);
-
+
gtk_container_add ((GtkContainer *) scrolled, (GtkWidget *) priv->treeview);
gtk_widget_show (scrolled);
-
+
gtk_box_pack_start ((GtkBox *) emft, scrolled, TRUE, TRUE, 0);
}
@@ -567,16 +567,16 @@ em_folder_tree_new (void)
{
EMFolderTreeModel *model;
EMFolderTree *emft;
-
+
model = em_folder_tree_model_new (mail_component_peek_base_directory (mail_component_peek ()));
emft = (EMFolderTree *) em_folder_tree_new_with_model (model);
g_object_unref (model);
-
+
return (GtkWidget *) emft;
}
/* NOTE: Removes and frees the selected uri structure */
-static void
+static void
emft_select_uri(EMFolderTree *emft, GtkTreePath *path, struct _selected_uri *u)
{
struct _EMFolderTreePrivate *priv = emft->priv;
@@ -613,47 +613,47 @@ emft_expand_node (EMFolderTreeModel *model, const char *key, EMFolderTree *emft)
n = strlen (key);
else
n = (p - key);
-
+
uid = g_alloca (n + 1);
memcpy (uid, key, n);
uid[n] = '\0';
-
+
if ((account = mail_config_get_account_by_uid (uid)) && account->enabled) {
CamelException ex;
-
+
camel_exception_init (&ex);
store = (CamelStore *) camel_session_get_service (session, account->source->url, CAMEL_PROVIDER_STORE, &ex);
camel_exception_clear (&ex);
-
+
if (store == NULL)
return;
} else if (!strcmp (uid, "vfolder")) {
if (!(store = vfolder_store))
return;
-
+
camel_object_ref (store);
} else if (!strcmp (uid, "local")) {
if (!(store = mail_component_peek_local_store (NULL)))
return;
-
+
camel_object_ref (store);
} else {
return;
}
-
+
if (!(si = g_hash_table_lookup (priv->model->store_hash, store))) {
camel_object_unref (store);
return;
}
-
+
camel_object_unref (store);
-
+
if (p != NULL) {
if (!(row = g_hash_table_lookup (si->full_hash, p + 1)))
return;
} else
row = si->row;
-
+
path = gtk_tree_row_reference_get_path (row);
gtk_tree_view_expand_row (priv->treeview, path, FALSE);
@@ -682,7 +682,7 @@ emft_maybe_expand_row (EMFolderTreeModel *model, GtkTreePath *tree_path, GtkTree
COL_POINTER_CAMEL_STORE, &store,
COL_BOOL_IS_STORE, &is_store,
-1);
-
+
si = g_hash_table_lookup (model->store_hash, store);
if ((account = mail_config_get_account_by_name (si->display_name))) {
key = g_strdup_printf ("%s/%s", account->uid, full_name ? full_name : "");
@@ -720,19 +720,19 @@ em_folder_tree_new_with_model (EMFolderTreeModel *model)
{
EMFolderTree *emft;
AtkObject *a11y;
-
+
emft = g_object_new (EM_TYPE_FOLDER_TREE, NULL);
em_folder_tree_construct (emft, model);
g_object_ref (model);
-
+
em_folder_tree_model_expand_foreach (model, (EMFTModelExpandFunc)emft_expand_node, emft);
-
+
emft->priv->loading_row_id = g_signal_connect (model, "loading-row", G_CALLBACK (emft_maybe_expand_row), emft);
emft->priv->loaded_row_id = g_signal_connect (model, "loaded-row", G_CALLBACK (emft_maybe_expand_row), emft);
a11y = gtk_widget_get_accessible (GTK_WIDGET (emft->priv->treeview));
atk_object_set_name (a11y, _("Mail Folder Tree"));
-
+
return (GtkWidget *) emft;
}
@@ -744,15 +744,15 @@ tree_drag_begin (GtkWidget *widget, GdkDragContext *context, EMFolderTree *emft)
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
-
+
selection = gtk_tree_view_get_selection ((GtkTreeView *) widget);
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
return;
-
+
path = gtk_tree_model_get_path (model, &iter);
priv->drag_row = gtk_tree_row_reference_new (model, path);
gtk_tree_path_free (path);
-
+
/* FIXME: set a drag icon? */
}
@@ -766,10 +766,10 @@ tree_drag_data_delete(GtkWidget *widget, GdkDragContext *context, EMFolderTree *
CamelStore *store;
CamelException ex;
GtkTreeIter iter;
-
+
if (!priv->drag_row || (src_path = gtk_tree_row_reference_get_path (priv->drag_row)))
return;
-
+
if (!gtk_tree_model_get_iter((GtkTreeModel *)priv->model, &iter, src_path))
goto fail;
@@ -777,10 +777,10 @@ tree_drag_data_delete(GtkWidget *widget, GdkDragContext *context, EMFolderTree *
COL_POINTER_CAMEL_STORE, &store,
COL_STRING_FULL_NAME, &full_name,
COL_BOOL_IS_STORE, &is_store, -1);
-
+
if (is_store)
goto fail;
-
+
camel_exception_init(&ex);
camel_store_delete_folder(store, full_name, &ex);
if (camel_exception_is_set(&ex))
@@ -800,24 +800,24 @@ tree_drag_data_get(GtkWidget *widget, GdkDragContext *context, GtkSelectionData
CamelStore *store;
CamelException ex;
GtkTreeIter iter;
-
+
if (!priv->drag_row || !(src_path = gtk_tree_row_reference_get_path(priv->drag_row)))
return;
-
+
if (!gtk_tree_model_get_iter((GtkTreeModel *)priv->model, &iter, src_path))
goto fail;
-
+
gtk_tree_model_get((GtkTreeModel *)priv->model, &iter,
COL_POINTER_CAMEL_STORE, &store,
COL_STRING_FULL_NAME, &full_name,
COL_STRING_URI, &uri, -1);
-
+
/* make sure user isn't trying to drag on a placeholder row */
if (full_name == NULL)
goto fail;
-
+
camel_exception_init(&ex);
-
+
switch (info) {
case DND_DRAG_TYPE_FOLDER:
/* dragging to a new location in the folder tree */
@@ -827,7 +827,7 @@ tree_drag_data_get(GtkWidget *widget, GdkDragContext *context, GtkSelectionData
/* dragging to nautilus or something, probably */
if ((folder = camel_store_get_folder(store, full_name, 0, &ex))) {
GPtrArray *uids = camel_folder_get_uids(folder);
-
+
em_utils_selection_set_urilist(selection, folder, uids);
camel_folder_free_uids(folder, uids);
camel_object_unref(folder);
@@ -836,7 +836,7 @@ tree_drag_data_get(GtkWidget *widget, GdkDragContext *context, GtkSelectionData
default:
abort();
}
-
+
if (camel_exception_is_set(&ex))
camel_exception_clear(&ex);
fail:
@@ -849,7 +849,7 @@ fail:
/* Drop handling */
struct _DragDataReceivedAsync {
struct _mail_msg msg;
-
+
/* input data */
GdkDragContext *context;
@@ -860,7 +860,7 @@ struct _DragDataReceivedAsync {
char *full_name;
guint32 action;
guint info;
-
+
unsigned int move:1;
unsigned int moved:1;
unsigned int aborted:1;
@@ -886,17 +886,17 @@ emft_drop_async_desc (struct _mail_msg *mm, int done)
struct _DragDataReceivedAsync *m = (struct _DragDataReceivedAsync *) mm;
CamelURL *url;
char *buf;
-
+
if (m->info == DND_DROP_TYPE_FOLDER) {
url = camel_url_new ((char *)m->selection->data, NULL);
-
+
if (m->move)
buf = g_strdup_printf (_("Moving folder %s"), url->fragment ? url->fragment : url->path + 1);
else
buf = g_strdup_printf (_("Copying folder %s"), url->fragment ? url->fragment : url->path + 1);
-
+
camel_url_free (url);
-
+
return buf;
} else {
if (m->move)
@@ -911,7 +911,7 @@ emft_drop_async_drop (struct _mail_msg *mm)
{
struct _DragDataReceivedAsync *m = (struct _DragDataReceivedAsync *) mm;
CamelFolder *folder;
-
+
/* for types other than folder, we can't drop to the root path */
if (m->info == DND_DROP_TYPE_FOLDER) {
/* copy or move (aka rename) a folder */
@@ -945,7 +945,7 @@ static void
emft_drop_async_free (struct _mail_msg *mm)
{
struct _DragDataReceivedAsync *m = (struct _DragDataReceivedAsync *) mm;
-
+
g_object_unref(m->context);
camel_object_unref(m->store);
g_free(m->full_name);
@@ -1025,23 +1025,23 @@ tree_drag_data_received(GtkWidget *widget, GdkDragContext *context, int x, int y
if (!gtk_tree_view_get_dest_row_at_pos (priv->treeview, x, y, &dest_path, &pos))
return;
-
+
/* this means we are receiving no data */
if (!selection->data || selection->length == -1) {
gtk_drag_finish(context, FALSE, FALSE, GDK_CURRENT_TIME);
return;
}
-
+
if (!gtk_tree_model_get_iter((GtkTreeModel *)priv->model, &iter, dest_path)) {
gtk_drag_finish(context, FALSE, FALSE, GDK_CURRENT_TIME);
return;
}
-
+
gtk_tree_model_get((GtkTreeModel *)priv->model, &iter,
COL_POINTER_CAMEL_STORE, &store,
COL_BOOL_IS_STORE, &is_store,
COL_STRING_FULL_NAME, &full_name, -1);
-
+
/* make sure user isn't try to drop on a placeholder row */
if (full_name == NULL && !is_store) {
gtk_drag_finish (context, FALSE, FALSE, GDK_CURRENT_TIME);
@@ -1105,61 +1105,61 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
gboolean is_store;
GtkTreeIter iter;
GList *targets;
-
+
/* This is a bit of a mess, but should handle all the cases properly */
if (!gtk_tree_model_get_iter((GtkTreeModel *)p->model, &iter, path))
return GDK_NONE;
-
+
gtk_tree_model_get((GtkTreeModel *)p->model, &iter, COL_BOOL_IS_STORE, &is_store,
COL_STRING_FULL_NAME, &full_name,
COL_POINTER_CAMEL_STORE, &dstore,
COL_STRING_URI, &uri, -1);
-
+
local = mail_component_peek_local_store (NULL);
-
+
targets = context->targets;
-
+
/* Check for special destinations */
if (uri && full_name) {
#if 0
/* only allow copying/moving folders (not messages) into the local Outbox */
if (dstore == local && !strcmp (full_name, "Outbox")) {
GdkAtom xfolder;
-
+
xfolder = drop_atoms[DND_DROP_TYPE_FOLDER];
while (targets != NULL) {
if (targets->data == (gpointer) xfolder) {
atom = xfolder;
goto done;
}
-
+
targets = targets->next;
}
-
+
goto done;
}
#endif
-
+
/* don't allow copying/moving into the UNMATCHED vfolder */
if (!strncmp (uri, "vfolder:", 8) && !strcmp (full_name, CAMEL_UNMATCHED_NAME))
goto done;
-
+
/* don't allow copying/moving into a vTrash/vJunk folder */
if (!strcmp (full_name, CAMEL_VTRASH_NAME)
|| !strcmp (full_name, CAMEL_VJUNK_NAME))
goto done;
}
-
+
if (p->drag_row) {
GtkTreePath *src_path = gtk_tree_row_reference_get_path(p->drag_row);
-
+
if (src_path) {
if (gtk_tree_model_get_iter((GtkTreeModel *)p->model, &iter, src_path))
gtk_tree_model_get((GtkTreeModel *)p->model, &iter,
COL_POINTER_CAMEL_STORE, &sstore,
COL_STRING_URI, &src_uri, -1);
-
+
/* can't dnd onto itself or below itself - bad things happen,
no point dragging to where we were either */
if (gtk_tree_path_compare(path, src_path) == 0
@@ -1169,16 +1169,16 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
gtk_tree_path_free(src_path);
goto done;
}
-
+
gtk_tree_path_free(src_path);
}
}
-
+
/* Check for special sources, and vfolder stuff */
if (src_uri) {
CamelURL *url;
char *url_path;
-
+
/* FIXME: this is a total hack, but i think all we can do at present */
/* Check for dragging from special folders which can't be moved/copied */
url = camel_url_new(src_uri, NULL);
@@ -1187,9 +1187,9 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
/* don't allow moving any of the the local special folders */
if (sstore == local && is_special_local_folder (url_path)) {
GdkAtom xfolder;
-
+
camel_url_free (url);
-
+
/* TODO: not sure if this is legal, but it works, force copy for special local folders */
context->suggested_action = GDK_ACTION_COPY;
xfolder = drop_atoms[DND_DROP_TYPE_FOLDER];
@@ -1198,19 +1198,19 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
atom = xfolder;
goto done;
}
-
+
targets = targets->next;
}
-
+
goto done;
}
-
+
/* don't allow copying/moving of the UNMATCHED vfolder */
if (!strcmp (url->protocol, "vfolder") && !strcmp (url_path, CAMEL_UNMATCHED_NAME)) {
camel_url_free (url);
goto done;
}
-
+
/* don't allow copying/moving of any vTrash/vJunk folder nor maildir 'inbox' */
if (strcmp(url_path, CAMEL_VTRASH_NAME) == 0
|| strcmp(url_path, CAMEL_VJUNK_NAME) == 0
@@ -1221,7 +1221,7 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
}
}
camel_url_free(url);
-
+
/* Search Folders can only be dropped into other Search Folders */
if (strncmp(src_uri, "vfolder:", 8) == 0) {
/* TODO: not sure if this is legal, but it works, force move only for vfolders */
@@ -1236,11 +1236,11 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
atom = xfolder;
goto done;
}
-
+
targets = targets->next;
}
}
-
+
goto done;
}
}
@@ -1250,7 +1250,7 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
goto done;
/* Now we either have a store or a normal folder */
-
+
if (is_store) {
GdkAtom xfolder;
@@ -1260,12 +1260,12 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
atom = xfolder;
goto done;
}
-
+
targets = targets->next;
}
} else {
int i;
-
+
while (targets != NULL) {
for (i = 0; i < NUM_DROP_TYPES; i++) {
if (targets->data == (gpointer) drop_atoms[i]) {
@@ -1273,16 +1273,16 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
goto done;
}
}
-
+
targets = targets->next;
}
}
-
+
done:
-
+
g_free (full_name);
g_free (uri);
-
+
return atom;
}
@@ -1294,28 +1294,28 @@ tree_drag_drop (GtkWidget *widget, GdkDragContext *context, int x, int y, guint
int cell_x, cell_y;
GtkTreePath *path;
GdkAtom target;
-
+
if (priv->autoscroll_id != 0) {
g_source_remove (priv->autoscroll_id);
priv->autoscroll_id = 0;
}
-
+
if (priv->autoexpand_id != 0) {
gtk_tree_row_reference_free (priv->autoexpand_row);
priv->autoexpand_row = NULL;
-
+
g_source_remove (priv->autoexpand_id);
priv->autoexpand_id = 0;
}
-
+
if (!gtk_tree_view_get_path_at_pos (priv->treeview, x, y, &path, &column, &cell_x, &cell_y))
return FALSE;
-
+
target = emft_drop_target(emft, context, path);
gtk_tree_path_free (path);
if (target == GDK_NONE)
return FALSE;
-
+
return TRUE;
}
@@ -1323,7 +1323,7 @@ static void
tree_drag_end (GtkWidget *widget, GdkDragContext *context, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
-
+
if (priv->drag_row) {
gtk_tree_row_reference_free (priv->drag_row);
priv->drag_row = NULL;
@@ -1336,20 +1336,20 @@ static void
tree_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time, EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
-
+
if (priv->autoscroll_id != 0) {
g_source_remove (priv->autoscroll_id);
priv->autoscroll_id = 0;
}
-
+
if (priv->autoexpand_id != 0) {
gtk_tree_row_reference_free (priv->autoexpand_row);
priv->autoexpand_row = NULL;
-
+
g_source_remove (priv->autoexpand_id);
priv->autoexpand_id = 0;
}
-
+
gtk_tree_view_set_drag_dest_row(emft->priv->treeview, NULL, GTK_TREE_VIEW_DROP_BEFORE);
}
@@ -1365,29 +1365,29 @@ tree_autoscroll (EMFolderTree *emft)
GdkWindow *window;
int offset, y;
float value;
-
+
/* get the y pointer position relative to the treeview */
window = gtk_tree_view_get_bin_window (priv->treeview);
gdk_window_get_pointer (window, NULL, &y, NULL);
-
+
/* rect is in coorinates relative to the scrolled window relative to the treeview */
gtk_tree_view_get_visible_rect (priv->treeview, &rect);
-
+
/* move y into the same coordinate system as rect */
y += rect.y;
-
+
/* see if we are near the top edge */
if ((offset = y - (rect.y + 2 * SCROLL_EDGE_SIZE)) > 0) {
/* see if we are near the bottom edge */
if ((offset = y - (rect.y + rect.height - 2 * SCROLL_EDGE_SIZE)) < 0)
return TRUE;
}
-
+
vadjustment = gtk_tree_view_get_vadjustment (priv->treeview);
-
+
value = CLAMP (vadjustment->value + offset, 0.0, vadjustment->upper - vadjustment->page_size);
gtk_adjustment_set_value (vadjustment, value);
-
+
return TRUE;
}
@@ -1396,11 +1396,11 @@ tree_autoexpand (EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
GtkTreePath *path;
-
+
path = gtk_tree_row_reference_get_path (priv->autoexpand_row);
gtk_tree_view_expand_row (priv->treeview, path, FALSE);
gtk_tree_path_free (path);
-
+
return TRUE;
}
@@ -1415,19 +1415,19 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guin
GtkTreeIter iter;
GdkAtom target;
int i;
-
+
if (!gtk_tree_view_get_dest_row_at_pos(priv->treeview, x, y, &path, &pos))
return FALSE;
-
+
if (priv->autoscroll_id == 0)
priv->autoscroll_id = g_timeout_add (150, (GSourceFunc) tree_autoscroll, emft);
-
+
gtk_tree_model_get_iter (model, &iter, path);
-
+
if (gtk_tree_model_iter_has_child (model, &iter) && !gtk_tree_view_row_expanded (priv->treeview, path)) {
if (priv->autoexpand_id != 0) {
GtkTreePath *autoexpand_path;
-
+
autoexpand_path = gtk_tree_row_reference_get_path (priv->autoexpand_row);
if (gtk_tree_path_compare (autoexpand_path, path) != 0) {
/* row changed, restart timer */
@@ -1436,7 +1436,7 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guin
g_source_remove (priv->autoexpand_id);
priv->autoexpand_id = g_timeout_add (600, (GSourceFunc) tree_autoexpand, emft);
}
-
+
gtk_tree_path_free (autoexpand_path);
} else {
priv->autoexpand_id = g_timeout_add (600, (GSourceFunc) tree_autoexpand, emft);
@@ -1445,7 +1445,7 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guin
} else if (priv->autoexpand_id != 0) {
gtk_tree_row_reference_free (priv->autoexpand_row);
priv->autoexpand_row = NULL;
-
+
g_source_remove (priv->autoexpand_id);
priv->autoexpand_id = 0;
}
@@ -1473,9 +1473,9 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guin
}
gtk_tree_path_free(path);
-
+
gdk_drag_status(context, action, time);
-
+
return action != 0;
}
@@ -1485,14 +1485,14 @@ em_folder_tree_enable_drag_and_drop (EMFolderTree *emft)
struct _EMFolderTreePrivate *priv;
static int setup = 0;
int i;
-
+
g_return_if_fail (EM_IS_FOLDER_TREE (emft));
-
+
priv = emft->priv;
if (!setup) {
for (i=0; i<NUM_DRAG_TYPES; i++)
drag_atoms[i] = gdk_atom_intern(drag_types[i].target, FALSE);
-
+
for (i=0; i<NUM_DROP_TYPES; i++)
drop_atoms[i] = gdk_atom_intern(drop_types[i].target, FALSE);
@@ -1501,7 +1501,7 @@ em_folder_tree_enable_drag_and_drop (EMFolderTree *emft)
gtk_drag_source_set((GtkWidget *)priv->treeview, GDK_BUTTON1_MASK, drag_types, NUM_DRAG_TYPES, GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_ASK);
gtk_drag_dest_set((GtkWidget *)priv->treeview, GTK_DEST_DEFAULT_ALL, drop_types, NUM_DROP_TYPES, GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_ASK);
-
+
g_signal_connect (priv->treeview, "drag-begin", G_CALLBACK (tree_drag_begin), emft);
g_signal_connect (priv->treeview, "drag-data-delete", G_CALLBACK (tree_drag_data_delete), emft);
g_signal_connect (priv->treeview, "drag-data-get", G_CALLBACK (tree_drag_data_get), emft);
@@ -1516,7 +1516,7 @@ void
em_folder_tree_set_multiselect (EMFolderTree *tree, gboolean mode)
{
GtkTreeSelection *sel = gtk_tree_view_get_selection ((GtkTreeView *) tree->priv->treeview);
-
+
tree->priv->do_multiselect = mode;
gtk_tree_selection_set_mode (sel, mode ? GTK_SELECTION_MULTIPLE : GTK_SELECTION_SINGLE);
}
@@ -1551,14 +1551,14 @@ em_folder_tree_get_selected_uris (EMFolderTree *emft)
if (gtk_tree_model_get_iter(model, &iter, path)) {
char *uri;
-
+
gtk_tree_model_get(model, &iter, COL_STRING_URI, &uri, -1);
list = g_list_prepend (list, uri);
}
gtk_tree_path_free(path);
}
g_list_free(rows);
-
+
return g_list_reverse (list);
}
@@ -1567,7 +1567,7 @@ get_selected_uris_path_iterate (GtkTreeModel *model, GtkTreePath *treepath, GtkT
{
GList **list = (GList **) data;
char *full_name;
-
+
gtk_tree_model_get (model, iter, COL_STRING_FULL_NAME, &full_name, -1);
*list = g_list_append (*list, full_name);
}
@@ -1577,9 +1577,9 @@ em_folder_tree_get_selected_paths (EMFolderTree *emft)
{
GtkTreeSelection *selection = gtk_tree_view_get_selection (emft->priv->treeview);
GList *list = NULL;
-
+
gtk_tree_selection_selected_foreach (selection, get_selected_uris_path_iterate, &list);
-
+
return list;
}
@@ -1626,7 +1626,7 @@ em_folder_tree_set_selected_list (EMFolderTree *emft, GList *list, gboolean expa
const char *path;
char *expand_key, *end;
EAccount *account;
-
+
if (((CamelService *)u->store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)
path = url->fragment;
else
@@ -1671,16 +1671,16 @@ static void
dump_fi (CamelFolderInfo *fi, int depth)
{
int i;
-
+
while (fi != NULL) {
for (i = 0; i < depth; i++)
fputs (" ", stdout);
-
+
printf ("path='%s'; full_name='%s'\n", fi->path, fi->full_name);
-
+
if (fi->child)
dump_fi (fi->child, depth + 1);
-
+
fi = fi->sibling;
}
}
@@ -1688,14 +1688,14 @@ dump_fi (CamelFolderInfo *fi, int depth)
struct _EMFolderTreeGetFolderInfo {
struct _mail_msg msg;
-
+
/* input data */
GtkTreeRowReference *root;
EMFolderTree *emft;
CamelStore *store;
guint32 flags;
char *top;
-
+
/* output data */
CamelFolderInfo *fi;
};
@@ -1717,7 +1717,7 @@ emft_get_folder_info__get (struct _mail_msg *mm)
{
struct _EMFolderTreeGetFolderInfo *m = (struct _EMFolderTreeGetFolderInfo *) mm;
guint32 flags = m->flags | CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
-
+
m->fi = camel_store_get_folder_info (m->store, m->top, flags, &mm->ex);
}
@@ -1732,15 +1732,15 @@ emft_get_folder_info__got (struct _mail_msg *mm)
GtkTreeStore *model;
GtkTreePath *path;
gboolean is_store;
-
+
/* check that we haven't been destroyed */
if (priv->treeview == NULL)
return;
-
+
/* check that our parent folder hasn't been deleted/unsubscribed */
if (!gtk_tree_row_reference_valid (m->root))
return;
-
+
if (!(si = g_hash_table_lookup (priv->model->store_hash, m->store))) {
/* store has been removed in the interim - do nothing */
return;
@@ -1760,7 +1760,7 @@ emft_get_folder_info__got (struct _mail_msg *mm)
}
gtk_tree_path_free (path);
-
+
/* make sure we still need to load the tree subfolders... */
gtk_tree_model_get ((GtkTreeModel *) model, &root,
COL_BOOL_IS_STORE, &is_store,
@@ -1768,7 +1768,7 @@ emft_get_folder_info__got (struct _mail_msg *mm)
/* get the first child (which will be a dummy node) */
gtk_tree_model_iter_children ((GtkTreeModel *) model, &iter, &root);
-
+
/* FIXME: camel's IMAP code is totally on crack here, @top's
* folder info should be @fi and fi->child should be what we
* want to fill our tree with... *sigh* */
@@ -1777,11 +1777,11 @@ emft_get_folder_info__got (struct _mail_msg *mm)
fi = m->fi->next;
} else
fi = m->fi;
-
+
if (fi == NULL) {
/* no children afterall... remove the "Loading..." placeholder node */
emft_update_model_expanded_state (priv, &root, FALSE);
-
+
if (is_store) {
path = gtk_tree_model_get_path ((GtkTreeModel *) model, &root);
gtk_tree_view_collapse_row (priv->treeview, path);
@@ -1793,15 +1793,15 @@ emft_get_folder_info__got (struct _mail_msg *mm)
}
} else {
int fully_loaded = (m->flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE) ? TRUE : FALSE;
-
+
do {
em_folder_tree_model_set_folder_info (priv->model, &iter, si, fi, fully_loaded);
-
+
if ((fi = fi->next) != NULL)
gtk_tree_store_append (model, &iter, &root);
} while (fi != NULL);
}
-
+
gtk_tree_store_set (model, &root, COL_BOOL_LOAD_SUBDIRS, FALSE, -1);
emft_queue_save_state (m->emft);
}
@@ -1810,9 +1810,9 @@ static void
emft_get_folder_info__free (struct _mail_msg *mm)
{
struct _EMFolderTreeGetFolderInfo *m = (struct _EMFolderTreeGetFolderInfo *) mm;
-
+
camel_store_free_folder_info (m->store, m->fi);
-
+
gtk_tree_row_reference_free (m->root);
g_object_unref(m->emft);
camel_object_unref (m->store);
@@ -1835,13 +1835,13 @@ emft_update_model_expanded_state (struct _EMFolderTreePrivate *priv, GtkTreeIter
EAccount *account;
char *full_name;
char *key;
-
+
gtk_tree_model_get ((GtkTreeModel *) priv->model, iter,
COL_STRING_FULL_NAME, &full_name,
COL_POINTER_CAMEL_STORE, &store,
COL_BOOL_IS_STORE, &is_store,
-1);
-
+
si = g_hash_table_lookup (priv->model->store_hash, store);
if ((account = mail_config_get_account_by_name (si->display_name))) {
key = g_strdup_printf ("%s/%s", account->uid, full_name ? full_name : "");
@@ -1852,7 +1852,7 @@ emft_update_model_expanded_state (struct _EMFolderTreePrivate *priv, GtkTreeIter
/* local store */
key = g_strdup_printf ("local/%s", full_name ? full_name : "");
}
-
+
em_folder_tree_model_set_expanded (priv->model, key, expanded);
g_free (full_name);
g_free (key);
@@ -1865,7 +1865,7 @@ emft_model_row_changed (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *ite
GtkTreeIter child_iter = *iter;
g_signal_handlers_block_by_func (model, emft_model_row_changed, emft);
-
+
/* Folders are displayed with a bold weight to indicate that
they contain unread messages. We signal that parent rows
have changed here to update them. */
@@ -1878,7 +1878,7 @@ emft_model_row_changed (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *ite
gtk_tree_path_free (parent_path);
child_iter = parent_iter;
}
-
+
g_signal_handlers_unblock_by_func (model, emft_model_row_changed, emft);
}
@@ -1891,17 +1891,17 @@ emft_tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *t
CamelStore *store;
char *full_name;
gboolean load;
-
+
model = gtk_tree_view_get_model (treeview);
-
+
gtk_tree_model_get (model, root,
COL_STRING_FULL_NAME, &full_name,
COL_POINTER_CAMEL_STORE, &store,
COL_BOOL_LOAD_SUBDIRS, &load,
-1);
-
+
emft_update_model_expanded_state (priv, root, TRUE);
-
+
if (!load) {
emft_queue_save_state (emft);
g_free (full_name);
@@ -1909,7 +1909,7 @@ emft_tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *t
}
gtk_tree_store_set((GtkTreeStore *)model, root, COL_BOOL_LOAD_SUBDIRS, FALSE, -1);
-
+
m = mail_msg_new (&get_folder_info_op, NULL, sizeof (struct _EMFolderTreeGetFolderInfo));
m->root = gtk_tree_row_reference_new (model, tree_path);
camel_object_ref (store);
@@ -1918,7 +1918,7 @@ emft_tree_row_expanded (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePath *t
g_object_ref(emft);
m->top = full_name;
m->flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE|CAMEL_STORE_FOLDER_INFO_FAST;
-
+
e_thread_put (mail_thread_new, (EMsg *) m);
}
@@ -1928,17 +1928,17 @@ emft_tree_test_collapse_row (GtkTreeView *treeview, GtkTreeIter *root, GtkTreePa
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter cursor;
-
+
selection = gtk_tree_view_get_selection (treeview);
if (gtk_tree_selection_get_selected (selection, &model, &cursor)) {
/* select the collapsed node IFF it is a parent of the currently selected folder */
if (gtk_tree_store_is_ancestor ((GtkTreeStore *) model, root, &cursor))
gtk_tree_view_set_cursor (treeview, tree_path, NULL, FALSE);
}
-
+
emft_update_model_expanded_state (emft->priv, root, FALSE);
emft_queue_save_state (emft);
-
+
return FALSE;
}
@@ -1950,18 +1950,18 @@ emft_tree_row_activated (GtkTreeView *treeview, GtkTreePath *tree_path, GtkTreeV
char *full_name, *uri;
GtkTreeIter iter;
guint32 flags;
-
+
if (!emft_select_func(NULL, model, tree_path, FALSE, emft))
return;
-
+
if (!gtk_tree_model_get_iter (model, &iter, tree_path))
return;
-
+
gtk_tree_model_get (model, &iter, COL_STRING_FULL_NAME, &full_name,
COL_STRING_URI, &uri, COL_UINT_FLAGS, &flags, -1);
emft_clear_selected_list(emft);
-
+
g_signal_emit (emft, signals[FOLDER_SELECTED], 0, full_name, uri, flags);
g_signal_emit (emft, signals[FOLDER_ACTIVATED], 0, full_name, uri);
@@ -2020,7 +2020,7 @@ static void
selfunc (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
{
struct _emft_selection_data *dat = (struct _emft_selection_data *) data;
-
+
dat->model = model;
if (!dat->set)
*(dat->iter) = *iter;
@@ -2031,7 +2031,7 @@ static gboolean
emft_selection_get_selected (GtkTreeSelection *selection, GtkTreeModel **model, GtkTreeIter *iter)
{
struct _emft_selection_data dat = { NULL, iter, FALSE };
-
+
if (gtk_tree_selection_get_mode (selection) == GTK_SELECTION_MULTIPLE) {
gtk_tree_selection_selected_foreach (selection, selfunc, &dat);
if (model)
@@ -2046,7 +2046,7 @@ static void
emft_popup_delete_folder (EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderTree *emft = data;
- CamelFolder *folder;
+ CamelFolder *folder;
if ((folder = em_folder_tree_get_selected_folder (emft)) != NULL) {
em_folder_utils_delete_folder(folder);
@@ -2095,11 +2095,11 @@ emft_popup_properties (EPopup *ep, EPopupItem *pitem, void *data)
GtkTreeModel *model;
GtkTreeIter iter;
char *uri;
-
+
selection = gtk_tree_view_get_selection (priv->treeview);
if (!emft_selection_get_selected (selection, &model, &iter))
return;
-
+
gtk_tree_model_get (model, &iter, COL_STRING_URI, &uri, -1);
em_folder_properties_show (NULL, NULL, uri);
g_free (uri);
@@ -2114,7 +2114,7 @@ static EPopupItem emft_popup_items[] = {
#endif
{ E_POPUP_ITEM, "10.emc.00", N_("_Copy..."), emft_popup_copy, NULL, "stock_folder-copy", 0, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT },
{ E_POPUP_ITEM, "10.emc.01", N_("_Move..."), emft_popup_move, NULL, "stock_folder-move", 0, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_DELETE },
-
+
{ E_POPUP_BAR, "20.emc" },
/* FIXME: need to disable for nochildren folders */
{ E_POPUP_ITEM, "20.emc.00", N_("_New Folder..."), emft_popup_new_folder, NULL, "folder-new", 0, EM_POPUP_FOLDER_INFERIORS },
@@ -2124,7 +2124,7 @@ static EPopupItem emft_popup_items[] = {
{ E_POPUP_ITEM, "20.emc.03", N_("Re_fresh"), emft_popup_refresh_folder, NULL, "view-refresh", EM_POPUP_FOLDER_NONSTATIC, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT},
{ E_POPUP_ITEM, "20.emc.04", N_("Fl_ush Outbox"), emft_popup_flush_outbox, NULL, "mail-send", EM_POPUP_FOLDER_OUTBOX, 0 },
-
+
{ E_POPUP_BAR, "80.emc" },
{ E_POPUP_ITEM, "80.emc.00", N_("_Properties"), emft_popup_properties, NULL, "document-properties", 0, EM_POPUP_FOLDER_FOLDER|EM_POPUP_FOLDER_SELECT }
};
@@ -2165,7 +2165,7 @@ emft_popup (EMFolderTree *emft, GdkEvent *event)
selection = gtk_tree_view_get_selection (treeview);
if (!emft_selection_get_selected (selection, &model, &iter))
return FALSE;
-
+
gtk_tree_model_get (model, &iter, COL_POINTER_CAMEL_STORE, &store,
COL_STRING_URI, &uri, COL_STRING_FULL_NAME, &full_name,
COL_BOOL_IS_STORE, &isstore, COL_UINT_FLAGS, &folder_type_flags, -1);
@@ -2176,7 +2176,7 @@ emft_popup (EMFolderTree *emft, GdkEvent *event)
g_free (uri);
return FALSE;
}
-
+
/* TODO: em_popup_target_folder_new? */
if (isstore) {
flags |= EM_POPUP_FOLDER_STORE;
@@ -2184,11 +2184,11 @@ emft_popup (EMFolderTree *emft, GdkEvent *event)
flags |= EM_POPUP_FOLDER_FOLDER;
local = mail_component_peek_local_store (NULL);
-
+
/* don't allow deletion of special local folders */
if (!(store == local && is_special_local_folder (full_name)))
flags |= EM_POPUP_FOLDER_DELETE;
-
+
/* hack for vTrash/vJunk */
if (!strcmp (full_name, CAMEL_VTRASH_NAME) || !strcmp (full_name, CAMEL_VJUNK_NAME))
info_flags |= CAMEL_FOLDER_VIRTUAL | CAMEL_FOLDER_NOINFERIORS;
@@ -2206,34 +2206,34 @@ emft_popup (EMFolderTree *emft, GdkEvent *event)
* This is the context menu shown on the folder tree.
*/
emp = em_popup_new ("org.gnome.evolution.mail.foldertree.popup");
-
+
/* FIXME: pass valid fi->flags here */
target = em_popup_target_new_folder (emp, uri, info_flags, flags);
-
+
for (i = 0; i < sizeof (emft_popup_items) / sizeof (emft_popup_items[0]); i++)
menus = g_slist_prepend (menus, &emft_popup_items[i]);
-
+
if ((folder_type_flags & CAMEL_FOLDER_TYPE_MASK) == CAMEL_FOLDER_TYPE_TRASH)
menus = g_slist_prepend (menus, &trash_popup_item);
e_popup_add_items ((EPopup *)emp, menus, NULL, emft_popup_free, emft);
menu = e_popup_create_menu_once ((EPopup *)emp, (EPopupTarget *)target, 0);
-
+
if (event == NULL || event->type == GDK_KEY_PRESS) {
/* FIXME: menu pos function */
gtk_menu_popup (menu, NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time());
} else {
gtk_menu_popup (menu, NULL, NULL, NULL, NULL, event->button.button, event->button.time);
}
-
+
g_free (full_name);
g_free (uri);
return TRUE;
}
-static gboolean
+static gboolean
emft_popup_menu (GtkWidget *widget)
{
return emft_popup (EM_FOLDER_TREE (widget), NULL);
@@ -2247,26 +2247,26 @@ emft_tree_button_press (GtkTreeView *treeview, GdkEventButton *event, EMFolderTr
/* this centralises working out when the user's done something */
emft_tree_user_event(treeview, (GdkEvent *)event, emft);
-
+
if (event->button != 3 && !(event->button == 1 && event->type == GDK_2BUTTON_PRESS))
return FALSE;
-
+
if (!gtk_tree_view_get_path_at_pos (treeview, (int) event->x, (int) event->y, &tree_path, NULL, NULL, NULL))
return FALSE;
-
+
/* select/focus the row that was right-clicked or double-clicked */
selection = gtk_tree_view_get_selection (treeview);
gtk_tree_selection_select_path(selection, tree_path);
gtk_tree_view_set_cursor (treeview, tree_path, NULL, FALSE);
-
+
if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) {
emft_tree_row_activated (treeview, tree_path, NULL, emft);
gtk_tree_path_free (tree_path);
return TRUE;
}
-
+
gtk_tree_path_free (tree_path);
-
+
return emft_popup (emft, (GdkEvent *)event);
}
@@ -2294,10 +2294,10 @@ emft_tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft)
GtkTreeModel *model;
GtkTreeIter iter;
guint32 flags;
-
+
if (!emft_selection_get_selected (selection, &model, &iter)) {
em_folder_tree_model_set_selected (emft->priv->model, NULL);
- g_signal_emit (emft, signals[FOLDER_SELECTED], 0, NULL, NULL, 0);
+ g_signal_emit (emft, signals[FOLDER_SELECTED], 0, NULL, NULL, 0);
emft_queue_save_state (emft);
return;
}
@@ -2340,7 +2340,7 @@ em_folder_tree_select_next_path (EMFolderTree *emft, gboolean skip_read_folders)
current_path = gtk_tree_model_get_path (model, &iter);
- do {
+ do {
if (gtk_tree_model_iter_has_child (model, &iter)) {
gtk_tree_model_iter_children (model, &child, &iter);
path = gtk_tree_model_get_path (model, &child);
@@ -2370,7 +2370,7 @@ em_folder_tree_select_next_path (EMFolderTree *emft, gboolean skip_read_folders)
}
if (path) {
- if (!gtk_tree_view_row_expanded (emft->priv->treeview, path))
+ if (!gtk_tree_view_row_expanded (emft->priv->treeview, path))
gtk_tree_view_expand_to_path (emft->priv->treeview, path);
gtk_tree_selection_select_path(selection, path);
@@ -2380,14 +2380,14 @@ em_folder_tree_select_next_path (EMFolderTree *emft, gboolean skip_read_folders)
priv->cursor_set = TRUE;
}
gtk_tree_view_scroll_to_cell (priv->treeview, path, NULL, TRUE, 0.5f, 0.0f);
- }
+ }
return;
}
-static GtkTreeIter
+static GtkTreeIter
get_last_child (GtkTreeModel *model, GtkTreeIter *iter)
{
- GtkTreeIter *child = g_new0 (GtkTreeIter, 1);
+ GtkTreeIter *child = g_new0 (GtkTreeIter, 1);
gboolean has_child = gtk_tree_model_iter_has_child (model, iter);
if (gtk_tree_model_iter_next (model, iter)) {
@@ -2428,7 +2428,7 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders)
{
gtk_tree_model_get_iter_first (model, &iter);
iter = get_last_child (model,&iter);
- path = gtk_tree_model_get_path (model, &iter);
+ path = gtk_tree_model_get_path (model, &iter);
}
} else {
gtk_tree_model_get_iter (model, &iter, path);
@@ -2459,7 +2459,7 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders)
priv->cursor_set = TRUE;
}
gtk_tree_view_scroll_to_cell (priv->treeview, path, NULL, TRUE, 0.5f, 0.0f);
- }
+ }
return;
}
@@ -2477,7 +2477,7 @@ em_folder_tree_get_selected_uri (EMFolderTree *emft)
selection = gtk_tree_view_get_selection(emft->priv->treeview);
if (gtk_tree_selection_get_selected(selection, &model, &iter))
gtk_tree_model_get(model, &iter, COL_STRING_URI, &uri, -1);
-
+
return uri;
}
@@ -2494,7 +2494,7 @@ em_folder_tree_get_selected_path (EMFolderTree *emft)
selection = gtk_tree_view_get_selection(emft->priv->treeview);
if (gtk_tree_selection_get_selected(selection, &model, &iter))
gtk_tree_model_get(model, &iter, COL_STRING_FULL_NAME, &name, -1);
-
+
return name;
}
@@ -2543,8 +2543,8 @@ em_folder_tree_get_selected_folder_info (EMFolderTree *emft)
selection = gtk_tree_view_get_selection(emft->priv->treeview);
if (gtk_tree_selection_get_selected(selection, &model, &iter))
gtk_tree_model_get (model, &iter, COL_POINTER_CAMEL_STORE, &store,
- COL_STRING_FULL_NAME, &full_name,
- COL_STRING_DISPLAY_NAME, &name,
+ COL_STRING_FULL_NAME, &full_name,
+ COL_STRING_DISPLAY_NAME, &name,
COL_STRING_URI, &uri, -1);
fi = g_new0(CamelFolderInfo, 1);
@@ -2573,7 +2573,7 @@ EMFolderTreeModel *
em_folder_tree_get_model (EMFolderTree *emft)
{
g_return_val_if_fail (EM_IS_FOLDER_TREE (emft), NULL);
-
+
return emft->priv->model;
}
@@ -2593,10 +2593,10 @@ static gboolean
emft_save_state (EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
-
+
em_folder_tree_model_save_state (priv->model);
priv->save_state_id = 0;
-
+
return FALSE;
}
@@ -2605,9 +2605,9 @@ static void
emft_queue_save_state (EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
-
+
if (priv->save_state_id != 0)
return;
-
+
priv->save_state_id = g_timeout_add (1000, (GSourceFunc) emft_save_state, emft);
}
diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h
index ae7511fbe8..3fe3aa5f81 100644
--- a/mail/em-folder-tree.h
+++ b/mail/em-folder-tree.h
@@ -61,7 +61,7 @@ struct _EMFolderTree {
struct _EMFolderTreeClass {
GtkVBoxClass parent_class;
-
+
/* signals */
void (* folder_activated) (EMFolderTree *emft, const char *full_name, const char *uri);
void (* folder_selected) (EMFolderTree *emft, const char *full_name, const char *uri, guint32 flags);
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index 3fe2587195..03d070540b 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -86,14 +86,14 @@ emfu_is_special_local_folder (const char *name)
struct _EMCopyFolders {
struct _mail_msg msg;
-
+
/* input data */
CamelStore *fromstore;
CamelStore *tostore;
-
+
char *frombase;
char *tobase;
-
+
int delete;
};
@@ -101,7 +101,7 @@ static char *
emft_copy_folders__desc (struct _mail_msg *mm, int complete)
{
struct _EMCopyFolders *m = (struct _EMCopyFolders *) mm;
-
+
return g_strdup_printf (_("Copying `%s' to `%s'"), m->frombase, m->tobase);
}
@@ -115,42 +115,42 @@ emft_copy_folders__copy (struct _mail_msg *mm)
CamelFolderInfo *fi;
const char *tmp;
int fromlen;
-
+
if (!(fi = camel_store_get_folder_info (m->fromstore, m->frombase, flags, &mm->ex)))
return;
-
+
pending = g_list_append (pending, fi);
-
+
toname = g_string_new ("");
fromname = g_string_new ("");
-
+
tmp = strrchr (m->frombase, '/');
if (tmp == NULL)
fromlen = 0;
else
fromlen = tmp - m->frombase + 1;
-
+
d(printf ("top name is '%s'\n", fi->full_name));
-
+
while (pending) {
CamelFolderInfo *info = pending->data;
-
+
pending = g_list_remove_link (pending, pending);
while (info) {
CamelFolder *fromfolder, *tofolder;
GPtrArray *uids;
int deleted = 0;
-
+
if (info->child)
pending = g_list_append (pending, info->child);
-
+
if (m->tobase[0])
g_string_printf (toname, "%s/%s", m->tobase, info->full_name + fromlen);
else
g_string_printf (toname, "%s", info->full_name + fromlen);
-
+
d(printf ("Copying from '%s' to '%s'\n", info->full_name, toname->str));
-
+
/* This makes sure we create the same tree, e.g. from a nonselectable source */
/* Not sure if this is really the 'right thing', e.g. for spool stores, but it makes the ui work */
if ((info->flags & CAMEL_FOLDER_NOSELECT) == 0) {
@@ -159,69 +159,69 @@ emft_copy_folders__copy (struct _mail_msg *mm)
camel_store_rename_folder (m->fromstore, info->full_name, toname->str, &mm->ex);
if (camel_exception_is_set (&mm->ex))
goto exception;
-
+
/* this folder no longer exists, unsubscribe it */
if (camel_store_supports_subscriptions (m->fromstore))
camel_store_unsubscribe_folder (m->fromstore, info->full_name, NULL);
-
+
deleted = 1;
} else {
if (!(fromfolder = camel_store_get_folder (m->fromstore, info->full_name, 0, &mm->ex)))
goto exception;
-
+
if (!(tofolder = camel_store_get_folder (m->tostore, toname->str, CAMEL_STORE_FOLDER_CREATE, &mm->ex))) {
camel_object_unref (fromfolder);
goto exception;
}
-
+
uids = camel_folder_get_uids (fromfolder);
camel_folder_transfer_messages_to (fromfolder, uids, tofolder, NULL, m->delete, &mm->ex);
camel_folder_free_uids (fromfolder, uids);
-
+
if (m->delete)
camel_folder_sync(fromfolder, TRUE, NULL);
-
+
camel_object_unref (fromfolder);
camel_object_unref (tofolder);
}
}
-
+
if (camel_exception_is_set (&mm->ex))
goto exception;
else if (m->delete && !deleted)
deleting = g_list_prepend (deleting, info);
-
+
/* subscribe to the new folder if appropriate */
if (camel_store_supports_subscriptions (m->tostore)
&& !camel_store_folder_subscribed (m->tostore, toname->str))
camel_store_subscribe_folder (m->tostore, toname->str, NULL);
-
+
info = info->next;
}
}
-
+
/* delete the folders in reverse order from how we copyied them, if we are deleting any */
l = deleting;
while (l) {
CamelFolderInfo *info = l->data;
-
+
d(printf ("deleting folder '%s'\n", info->full_name));
-
+
/* FIXME: we need to do something with the exception
since otherwise the users sees a failed operation
with no error message or even any warnings */
if (camel_store_supports_subscriptions (m->fromstore))
camel_store_unsubscribe_folder (m->fromstore, info->full_name, NULL);
-
+
camel_store_delete_folder (m->fromstore, info->full_name, NULL);
l = l->next;
}
-
+
exception:
-
+
camel_store_free_folder_info (m->fromstore, fi);
g_list_free (deleting);
-
+
g_string_free (toname, TRUE);
g_string_free (fromname, TRUE);
}
@@ -230,10 +230,10 @@ static void
emft_copy_folders__free (struct _mail_msg *mm)
{
struct _EMCopyFolders *m = (struct _EMCopyFolders *) mm;
-
+
camel_object_unref (m->fromstore);
camel_object_unref (m->tostore);
-
+
g_free (m->frombase);
g_free (m->tobase);
}
@@ -284,7 +284,7 @@ emfu_copy_folder_selected (const char *uri, void *data)
g_free (cfd);
return;
}
-
+
camel_exception_init (&ex);
if (!(fromstore = camel_session_get_store (session, cfd->fi->uri, &ex))) {
@@ -292,13 +292,13 @@ emfu_copy_folder_selected (const char *uri, void *data)
cfd->delete?"mail:no-move-folder-notexist":"mail:no-copy-folder-notexist", cfd->fi->full_name, uri, ex.desc, NULL);
goto fail;
}
-
+
if (cfd->delete && fromstore == mail_component_peek_local_store (NULL) && emfu_is_special_local_folder (cfd->fi->full_name)) {
e_error_run(NULL,
"mail:no-rename-special-folder", cfd->fi->full_name, NULL);
goto fail;
}
-
+
if (!(tostore = camel_session_get_store (session, uri, &ex))) {
e_error_run(NULL,
cfd->delete?"mail:no-move-folder-to-notexist":"mail:no-copy-folder-to-notexist", cfd->fi->full_name, uri, ex.desc, NULL);
@@ -314,7 +314,7 @@ emfu_copy_folder_selected (const char *uri, void *data)
tobase = "";
em_folder_utils_copy_folders(fromstore, cfd->fi->full_name, tostore, tobase, cfd->delete);
-
+
camel_url_free (url);
fail:
if (fromstore)
@@ -361,7 +361,7 @@ void
em_folder_utils_copy_folder(CamelFolderInfo *folderinfo, int delete)
{
struct _copy_folder_data *cfd;
-
+
cfd = g_malloc (sizeof (*cfd));
cfd->fi = folderinfo;
cfd->delete = delete;
@@ -376,40 +376,40 @@ emfu_delete_rec (CamelStore *store, CamelFolderInfo *fi, CamelException *ex)
{
while (fi) {
CamelFolder *folder;
-
+
if (fi->child) {
emfu_delete_rec (store, fi->child, ex);
if (camel_exception_is_set (ex))
return;
}
-
+
d(printf ("deleting folder '%s'\n", fi->full_name));
-
+
/* shouldn't camel do this itself? */
if (camel_store_supports_subscriptions (store))
camel_store_unsubscribe_folder (store, fi->full_name, NULL);
-
+
if (!(folder = camel_store_get_folder (store, fi->full_name, 0, ex)))
return;
-
+
if (!CAMEL_IS_VEE_FOLDER (folder)) {
GPtrArray *uids = camel_folder_get_uids (folder);
int i;
-
+
camel_folder_freeze (folder);
for (i = 0; i < uids->len; i++)
camel_folder_delete_message (folder, uids->pdata[i]);
-
+
camel_folder_free_uids (folder, uids);
-
+
camel_folder_sync (folder, TRUE, NULL);
camel_folder_thaw (folder);
}
-
+
camel_store_delete_folder (store, fi->full_name, ex);
if (camel_exception_is_set (ex))
return;
-
+
fi = fi->next;
}
}
@@ -419,11 +419,11 @@ emfu_delete_folders (CamelStore *store, const char *full_name, CamelException *e
{
guint32 flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE | CAMEL_STORE_FOLDER_INFO_FAST | CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
CamelFolderInfo *fi;
-
+
fi = camel_store_get_folder_info (store, full_name, flags, ex);
if (camel_exception_is_set (ex))
return;
-
+
emfu_delete_rec (store, fi, ex);
camel_store_free_folder_info (store, fi);
}
@@ -434,10 +434,10 @@ emfu_delete_response (GtkWidget *dialog, int response, gpointer data)
CamelStore *store;
CamelException ex;
char *full_name;
-
+
full_name = g_object_get_data ((GObject *) dialog, "full_name");
store = g_object_get_data ((GObject *) dialog, "store");
-
+
if (response == GTK_RESPONSE_OK) {
camel_exception_init (&ex);
emfu_delete_folders (store, full_name, &ex);
@@ -447,7 +447,7 @@ emfu_delete_response (GtkWidget *dialog, int response, gpointer data)
camel_exception_clear (&ex);
}
}
-
+
gtk_widget_destroy (dialog);
}
@@ -459,7 +459,7 @@ em_folder_utils_delete_folder (CamelFolder *folder)
GtkWidget *dialog;
local = mail_component_peek_local_store (NULL);
-
+
if (folder->parent_store == local && emfu_is_special_local_folder (folder->full_name)) {
e_error_run(NULL, "mail:no-delete-special-folder", folder->full_name, NULL);
return;
@@ -495,12 +495,12 @@ em_folder_utils_rename_folder (CamelFolder *folder)
"mail:no-rename-special-folder", folder->full_name, NULL);
return;
}
-
+
if ((p = strrchr (folder->full_name, '/')))
base_len = (size_t) (p - folder->full_name);
else
base_len = 0;
-
+
prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), folder->name);
while (!done) {
new_name = e_request_string (NULL, _("Rename Folder"), prompt, folder->name);
@@ -515,7 +515,7 @@ em_folder_utils_rename_folder (CamelFolder *folder)
CamelFolderInfo *fi;
CamelException ex;
char *path, *tmp;
-
+
if (base_len > 0) {
path = g_malloc (base_len + strlen (new_name) + 2);
memcpy (path, folder->full_name, base_len);
@@ -525,7 +525,7 @@ em_folder_utils_rename_folder (CamelFolder *folder)
} else {
path = g_strdup (new_name);
}
-
+
camel_exception_init (&ex);
if ((fi = camel_store_get_folder_info (folder->parent_store, path, CAMEL_STORE_FOLDER_INFO_FAST, &ex)) != NULL) {
camel_store_free_folder_info (folder->parent_store, fi);
@@ -533,12 +533,12 @@ em_folder_utils_rename_folder (CamelFolder *folder)
"mail:no-rename-folder-exists", folder->name, new_name, NULL);
} else {
const char *oldpath, *newpath;
-
+
oldpath = folder->full_name;
newpath = path;
-
+
d(printf ("renaming %s to %s\n", oldpath, newpath));
-
+
camel_exception_clear (&ex);
camel_store_rename_folder (folder->parent_store, oldpath, newpath, &ex);
if (camel_exception_is_set (&ex)) {
@@ -546,36 +546,36 @@ em_folder_utils_rename_folder (CamelFolder *folder)
"mail:no-rename-folder", oldpath, newpath, ex.desc, NULL);
camel_exception_clear (&ex);
}
-
+
done = TRUE;
}
-
+
g_free (path);
}
-
+
g_free (new_name);
}
}
struct _EMCreateFolder {
struct _mail_msg msg;
-
+
/* input data */
CamelStore *store;
char *full_name;
char *parent;
char *name;
-
+
/* output data */
CamelFolderInfo *fi;
-
+
/* callback data */
void (* done) (CamelFolderInfo *fi, void *user_data);
void *user_data;
};
/* Temporary Structure to hold data to pass across function */
-struct _EMCreateFolderTempData
+struct _EMCreateFolderTempData
{
EMFolderTree * emft;
EMFolderSelector * emfs;
@@ -586,7 +586,7 @@ static char *
emfu_create_folder__desc (struct _mail_msg *mm, int done)
{
struct _EMCreateFolder *m = (struct _EMCreateFolder *) mm;
-
+
return g_strdup_printf (_("Creating folder `%s'"), m->full_name);
}
@@ -594,9 +594,9 @@ static void
emfu_create_folder__create (struct _mail_msg *mm)
{
struct _EMCreateFolder *m = (struct _EMCreateFolder *) mm;
-
+
d(printf ("creating folder parent='%s' name='%s' full_name='%s'\n", m->parent, m->name, m->full_name));
-
+
if ((m->fi = camel_store_create_folder (m->store, m->parent, m->name, &mm->ex))) {
if (camel_store_supports_subscriptions (m->store))
camel_store_subscribe_folder (m->store, m->full_name, &mm->ex);
@@ -607,7 +607,7 @@ static void
emfu_create_folder__created (struct _mail_msg *mm)
{
struct _EMCreateFolder *m = (struct _EMCreateFolder *) mm;
-
+
if (m->done)
m->done (m->fi, m->user_data);
}
@@ -616,7 +616,7 @@ static void
emfu_create_folder__free (struct _mail_msg *mm)
{
struct _EMCreateFolder *m = (struct _EMCreateFolder *) mm;
-
+
camel_store_free_folder_info (m->store, m->fi);
camel_object_unref (m->store);
g_free (m->full_name);
@@ -639,7 +639,7 @@ emfu_create_folder_real (CamelStore *store, const char *full_name, void (* done)
struct _EMCreateFolder *m;
const char *parent;
int id;
-
+
namebuf = g_strdup (full_name);
if (!(name = strrchr (namebuf, '/'))) {
name = namebuf;
@@ -648,7 +648,7 @@ emfu_create_folder_real (CamelStore *store, const char *full_name, void (* done)
*name++ = '\0';
parent = namebuf;
}
-
+
m = mail_msg_new (&create_folder_op, NULL, sizeof (struct _EMCreateFolder));
camel_object_ref (store);
m->store = store;
@@ -657,12 +657,12 @@ emfu_create_folder_real (CamelStore *store, const char *full_name, void (* done)
m->name = g_strdup (name);
m->user_data = user_data;
m->done = done;
-
+
g_free (namebuf);
-
+
id = m->msg.seq;
e_thread_put (mail_thread_new, (EMsg *) m);
-
+
return id;
}
@@ -672,11 +672,11 @@ new_folder_created_cb (CamelFolderInfo *fi, void *user_data)
struct _EMCreateFolderTempData *emcftd=user_data;
if (fi){
gtk_widget_destroy ((GtkWidget *) emcftd->emfs);
-
+
/* Exapnding newly created folder */
if (emcftd->emft)
- em_folder_tree_set_selected ((EMFolderTree *) emcftd->emft, emcftd->uri, GPOINTER_TO_INT(g_object_get_data ((GObject *)emcftd->emft, "select")) ? FALSE : TRUE);
- }
+ em_folder_tree_set_selected ((EMFolderTree *) emcftd->emft, emcftd->uri, GPOINTER_TO_INT(g_object_get_data ((GObject *)emcftd->emft, "select")) ? FALSE : TRUE);
+ }
g_object_unref (emcftd->emfs);
g_free (emcftd->uri);
g_free (emcftd);
@@ -690,7 +690,7 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs, int response, gpointer d
CamelException ex;
CamelStore *store;
struct _EMCreateFolderTempData *emcftd;
-
+
if (response != GTK_RESPONSE_OK) {
gtk_widget_destroy ((GtkWidget *) emfs);
return;
@@ -728,11 +728,11 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs, int response, gpointer d
emcftd->emfs = emfs;
emcftd->uri = g_strdup (uri);
emcftd->emft = (EMFolderTree *) data;
-
+
g_object_ref (emfs);
emfu_create_folder_real (si->store, path, new_folder_created_cb, emcftd);
}
-
+
camel_object_unref (store);
camel_exception_clear (&ex);
}
@@ -746,7 +746,7 @@ em_folder_utils_create_folder (CamelFolderInfo *folderinfo, EMFolderTree *emft)
model = mail_component_peek_tree_model (mail_component_peek ());
folder_tree = (EMFolderTree *) em_folder_tree_new_with_model (model);
-
+
dialog = em_folder_selector_create_new (folder_tree, 0, _("Create folder"), _("Specify where to create the folder:"));
if (folderinfo != NULL)
em_folder_selector_set_selected ((EMFolderSelector *) dialog, folderinfo->uri);
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 5ec86facb3..0d7eed1236 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -86,7 +86,7 @@
#include "e-util/e-dialog-utils.h"
#include "e-util/e-icon-factory.h"
#include "e-util/e-print.h"
-#include "e-util/e-profile-event.h"
+#include "e-util/e-profile-event.h"
#include "e-util/e-util-private.h"
#include "filter/filter-rule.h"
@@ -272,14 +272,14 @@ emfv_init(GObject *o)
EMFolderView *emfv = (EMFolderView *)o;
struct _EMFolderViewPrivate *p;
extern CamelSession *session;
-
+
gtk_box_set_homogeneous (GTK_BOX (emfv), FALSE);
p = emfv->priv = g_malloc0(sizeof(struct _EMFolderViewPrivate));
emfv->statusbar_active = TRUE;
emfv->list_active = FALSE;
-
+
emfv->ui_files = g_slist_append(NULL,
g_build_filename (EVOLUTION_UIDIR,
"evolution-mail-message.xml",
@@ -400,20 +400,20 @@ static void
emfv_class_init(GObjectClass *klass)
{
klass->finalize = emfv_finalise;
-
+
((GtkObjectClass *) klass)->destroy = emfv_destroy;
-
+
((GtkWidgetClass *) klass)->popup_menu = emfv_popup_menu;
-
+
((EMFolderViewClass *) klass)->update_message_style = TRUE;
-
+
((EMFolderViewClass *)klass)->set_folder = emfv_set_folder;
((EMFolderViewClass *)klass)->set_folder_uri = emfv_set_folder_uri;
((EMFolderViewClass *)klass)->set_message = emfv_set_message;
((EMFolderViewClass *)klass)->activate = emfv_activate;
((EMFolderViewClass *)klass)->on_url = emfv_on_url;
-
+
signals[EMFV_ON_URL] = g_signal_new ("on-url",
G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST,
@@ -480,7 +480,7 @@ em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set)
if (emfv->folder == NULL)
return 0;
-
+
uids = message_list_get_selected(emfv->list);
camel_folder_freeze(emfv->folder);
@@ -489,7 +489,7 @@ em_folder_view_mark_selected(EMFolderView *emfv, guint32 mask, guint32 set)
message_list_free_uids(emfv->list, uids);
camel_folder_thaw(emfv->folder);
-
+
return i;
}
@@ -499,7 +499,7 @@ em_folder_view_open_selected(EMFolderView *emfv)
{
GPtrArray *uids, *views;
int i = 0;
-
+
uids = message_list_get_selected(emfv->list);
if (uids->len >= 10) {
@@ -589,10 +589,10 @@ emfv_setup_view_instance(EMFolderView *emfv)
struct _EMFolderViewPrivate *p = emfv->priv;
gboolean outgoing, show_wide;
char *id;
-
+
g_return_if_fail (emfv->folder);
g_return_if_fail (emfv->folder_uri);
-
+
if (collection == NULL) {
ETableSpecification *spec;
GalViewFactory *factory;
@@ -602,9 +602,9 @@ emfv_setup_view_instance(EMFolderView *emfv)
char *etspecfile;
collection = gal_view_collection_new ();
-
+
gal_view_collection_set_title (collection, _("Mail"));
-
+
evolution_dir = mail_component_peek_base_directory (mail_component_peek ());
galviewsmaildir = g_build_filename (EVOLUTION_GALVIEWSDIR,
"mail",
@@ -613,7 +613,7 @@ emfv_setup_view_instance(EMFolderView *emfv)
gal_view_collection_set_storage_directories (collection, galviewsmaildir, dir);
g_free (dir);
g_free (galviewsmaildir);
-
+
spec = e_table_specification_new ();
etspecfile = g_build_filename (EVOLUTION_ETSPECDIR,
"message-list.etspec",
@@ -622,12 +622,12 @@ emfv_setup_view_instance(EMFolderView *emfv)
g_error ("Unable to load ETable specification file "
"for mail");
g_free (etspecfile);
-
+
factory = gal_view_factory_etable_new (spec);
g_object_unref (spec);
gal_view_collection_add_factory (collection, factory);
g_object_unref (factory);
-
+
gal_view_collection_load (collection);
}
@@ -640,18 +640,18 @@ emfv_setup_view_instance(EMFolderView *emfv)
g_object_unref(p->view_menus);
p->view_menus = NULL;
}
-
+
/* TODO: should this go through mail-config api? */
id = mail_config_folder_to_safe_url (emfv->folder);
p->view_instance = gal_view_instance_new (collection, id);
-
+
show_wide = em_folder_browser_get_wide ((EMFolderBrowser *) emfv);
if (show_wide) {
char *safe_id, *filename;
-
+
/* Force to use the wide view */
g_free (p->view_instance->custom_filename);
- g_free (p->view_instance->current_view_filename);
+ g_free (p->view_instance->current_view_filename);
safe_id = g_strdup (id);
e_filename_make_safe (safe_id);
filename = g_strdup_printf ("custom_wide_view-%s.xml", safe_id);
@@ -662,11 +662,11 @@ emfv_setup_view_instance(EMFolderView *emfv)
g_free (safe_id);
}
g_free (id);
-
+
outgoing = em_utils_folder_is_drafts (emfv->folder, emfv->folder_uri)
|| em_utils_folder_is_sent (emfv->folder, emfv->folder_uri)
|| em_utils_folder_is_outbox (emfv->folder, emfv->folder_uri);
-
+
if (outgoing) {
if (show_wide)
gal_view_instance_set_default_view(p->view_instance, "Wide_View_Sent");
@@ -675,9 +675,9 @@ emfv_setup_view_instance(EMFolderView *emfv)
} else if (show_wide) {
gal_view_instance_set_default_view(p->view_instance, "Wide_View_Normal");
}
-
+
gal_view_instance_load(p->view_instance);
-
+
if (!gal_view_instance_exists(p->view_instance)) {
struct stat st;
char *path;
@@ -688,7 +688,7 @@ emfv_setup_view_instance(EMFolderView *emfv)
ETableState *state;
GalView *view;
char *etspecfile;
-
+
spec = e_table_specification_new ();
etspecfile = g_build_filename (EVOLUTION_ETSPECDIR,
"message-list.etspec",
@@ -697,22 +697,22 @@ emfv_setup_view_instance(EMFolderView *emfv)
g_free (etspecfile);
view = gal_view_etable_new (spec, "");
g_object_unref (spec);
-
+
state = e_table_state_new ();
e_table_state_load_from_file (state, path);
gal_view_etable_set_state (GAL_VIEW_ETABLE (view), state);
g_object_unref (state);
-
+
gal_view_instance_set_custom_view(p->view_instance, view);
g_object_unref (view);
}
-
+
g_free (path);
}
g_signal_connect(p->view_instance, "display_view", G_CALLBACK(emfv_list_display_view), emfv);
emfv_list_display_view(p->view_instance, gal_view_instance_get_current_view(p->view_instance), emfv);
-
+
if (emfv->list_active && emfv->uic) {
p->view_menus = gal_view_menus_new(p->view_instance);
gal_view_menus_apply(p->view_menus, emfv->uic, NULL);
@@ -733,20 +733,20 @@ emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
&& (em_utils_folder_is_drafts(folder, uri)
|| em_utils_folder_is_sent(folder, uri)
|| em_utils_folder_is_outbox(folder, uri)));
-
+
if (folder == emfv->folder)
return;
if (emfv->priv->selected_id)
g_source_remove(emfv->priv->selected_id);
-
+
if (emfv->preview)
em_format_format ((EMFormat *) emfv->preview, NULL, NULL, NULL);
-
+
message_list_set_folder(emfv->list, folder, uri, isout);
g_free(emfv->folder_uri);
emfv->folder_uri = uri ? g_strdup(uri):NULL;
-
+
if (emfv->folder) {
emfv->hide_deleted = emfv->list->hidedeleted; /* <- a bit nasty but makes it track the display better */
mail_sync_folder (emfv->folder, NULL, NULL);
@@ -755,12 +755,12 @@ emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
emfv->folder = folder;
if (folder) {
- /* We need to set this up to get the right view options for the message-list,
+ /* We need to set this up to get the right view options for the message-list,
* even if we're not showing it */
emfv_setup_view_instance(emfv);
camel_object_ref(folder);
}
-
+
emfv_enable_menus(emfv);
/* TODO: should probably be called after all processing, not just this class's impl */
@@ -771,7 +771,7 @@ static void
emfv_got_folder(char *uri, CamelFolder *folder, void *data)
{
EMFolderView *emfv = data;
-
+
em_folder_view_set_folder(emfv, folder, uri);
}
@@ -837,7 +837,7 @@ emfv_popup_edit (EPopup *ep, EPopupItem *pitem, void *data)
if (!em_utils_check_user_can_send_mail((GtkWidget *)emfv))
return;
-
+
uids = message_list_get_selected(emfv->list);
em_utils_edit_messages (emfv->folder, uids, FALSE);
}
@@ -847,7 +847,7 @@ emfv_popup_saveas(EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderView *emfv = data;
GPtrArray *uids;
-
+
uids = message_list_get_selected(emfv->list);
em_utils_save_messages((GtkWidget *)emfv, emfv->folder, uids);
}
@@ -881,7 +881,7 @@ emfv_popup_source(EPopup *ep, EPopupItem *pitem, void *data)
EMFolderView *emfv = data;
EMMessageBrowser *emmb;
GPtrArray *uids;
-
+
uids = message_list_get_selected(emfv->list);
emmb = (EMMessageBrowser *)em_message_browser_window_new();
@@ -953,7 +953,7 @@ emfv_popup_flag_completed(EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderView *emfv = data;
GPtrArray *uids;
-
+
uids = message_list_get_selected(emfv->list);
em_utils_flag_for_followup_completed((GtkWidget *)emfv, emfv->folder, uids);
@@ -985,7 +985,7 @@ emfv_popup_mark_unread(EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderView *emfv = data;
em_folder_view_mark_selected(emfv, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, 0);
-
+
if (emfv->list->seen_id) {
g_source_remove(emfv->list->seen_id);
emfv->list->seen_id = 0;
@@ -1011,7 +1011,7 @@ emfv_popup_mark_junk (EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderView *emfv = data;
int count;
-
+
count = em_folder_view_mark_selected(emfv,
CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN,
CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN);
@@ -1024,7 +1024,7 @@ emfv_popup_mark_nojunk (EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderView *emfv = data;
int count;
-
+
count = em_folder_view_mark_selected(emfv,
CAMEL_MESSAGE_JUNK|CAMEL_MESSAGE_JUNK_LEARN,
CAMEL_MESSAGE_JUNK_LEARN);
@@ -1074,12 +1074,12 @@ emfv_delete_msg_response (GtkWidget *dialog, int response, gpointer data)
_("Mail Deletion Failed"),
_("You do not have sufficient permissions to delete this mail."));
gtk_html_stream_close(hstream, GTK_HTML_STREAM_OK);
- } else
+ } else
e_error_run (NULL, "mail:no-delete-permission", "", "");
count = -1;
break;
- } else
+ } else
camel_folder_set_message_flags(emfv->folder, uids->pdata[count], CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_SEEN|CAMEL_MESSAGE_DELETED );
}
@@ -1144,14 +1144,14 @@ static void
emfv_popup_move_cb(const char *uri, void *data)
{
struct _move_data *d = data;
-
+
if (uri) {
g_free (default_xfer_messages_uri);
default_xfer_messages_uri = g_strdup (uri);
mail_transfer_messages(d->emfv->folder, d->uids, d->delete, uri, 0, NULL, NULL);
} else
em_utils_uids_free(d->uids);
-
+
g_object_unref(d->emfv);
g_free(d);
}
@@ -1161,13 +1161,13 @@ emfv_popup_move(EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderView *emfv = data;
struct _move_data *d;
-
+
d = g_malloc(sizeof(*d));
d->emfv = emfv;
g_object_ref(emfv);
d->uids = message_list_get_selected(emfv->list);
d->delete = TRUE;
-
+
em_select_folder ((GtkWindow *) emfv, _("Select folder"), _("_Move"), default_xfer_messages_uri, NULL, emfv_popup_move_cb, d);
}
@@ -1176,13 +1176,13 @@ emfv_popup_copy(EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderView *emfv = data;
struct _move_data *d;
-
+
d = g_malloc(sizeof(*d));
d->emfv = emfv;
g_object_ref(emfv);
d->uids = message_list_get_selected(emfv->list);
d->delete = FALSE;
-
+
em_select_folder ((GtkWindow *) emfv, _("Select folder"), _("C_opy"), default_xfer_messages_uri, NULL, emfv_popup_move_cb, d);
}
@@ -1309,7 +1309,7 @@ static EPopupItem emfv_popup_items[] = {
{ E_POPUP_ITEM, "70.emfv.07", N_("Fla_g Completed"), emfv_popup_flag_completed, NULL, "stock_mail-flag-for-followup-done", EM_POPUP_SELECT_FLAG_COMPLETED|EM_FOLDER_VIEW_SELECT_LISTONLY },
{ E_POPUP_ITEM, "70.emfv.08", N_("Cl_ear Flag"), emfv_popup_flag_clear, NULL, NULL, EM_POPUP_SELECT_FLAG_CLEAR|EM_FOLDER_VIEW_SELECT_LISTONLY },
-
+
{ E_POPUP_BAR, "90.filter", NULL, NULL, NULL, NULL },
{ E_POPUP_SUBMENU, "90.filter.00", N_("Crea_te Rule From Message"), NULL, NULL, NULL, EM_POPUP_SELECT_ONE|EM_FOLDER_VIEW_SELECT_LISTONLY },
{ E_POPUP_ITEM, "90.filter.00/00.00", N_("Search Folder from _Subject"), emfv_popup_vfolder_subject, NULL, NULL, EM_POPUP_SELECT_ONE|EM_FOLDER_VIEW_SELECT_LISTONLY },
@@ -1317,7 +1317,7 @@ static EPopupItem emfv_popup_items[] = {
{ E_POPUP_ITEM, "90.filter.00/00.02", N_("Search Folder from _Recipients"), emfv_popup_vfolder_recipients, NULL, NULL, EM_POPUP_SELECT_ONE|EM_FOLDER_VIEW_SELECT_LISTONLY },
{ E_POPUP_ITEM, "90.filter.00/00.03", N_("Search Folder from Mailing _List"),
emfv_popup_vfolder_mlist, NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_MAILING_LIST|EM_FOLDER_VIEW_SELECT_LISTONLY },
-
+
{ E_POPUP_BAR, "90.filter.00/10", NULL, NULL, NULL, NULL },
{ E_POPUP_ITEM, "90.filter.00/10.00", N_("Filter on Sub_ject"), emfv_popup_filter_subject, NULL, NULL, EM_POPUP_SELECT_ONE|EM_FOLDER_VIEW_SELECT_LISTONLY },
{ E_POPUP_ITEM, "90.filter.00/10.01", N_("Filter on Sen_der"), emfv_popup_filter_sender, NULL, NULL, EM_POPUP_SELECT_ONE|EM_FOLDER_VIEW_SELECT_LISTONLY },
@@ -1346,7 +1346,7 @@ emfv_popup_items_free(EPopup *ep, GSList *items, void *data)
{
g_slist_free(items);
}
-
+
static void
emfv_popup(EMFolderView *emfv, GdkEvent *event, int on_display)
{
@@ -1379,7 +1379,7 @@ emfv_popup(EMFolderView *emfv, GdkEvent *event, int on_display)
GdkPixmap *pixmap;
GdkColor colour;
GdkGC *gc;
-
+
item = g_malloc0(sizeof(*item));
item->type = E_POPUP_IMAGE;
item->path = g_strdup_printf("60.label.00/00.label.%02d", i++);
@@ -1391,7 +1391,7 @@ emfv_popup(EMFolderView *emfv, GdkEvent *event, int on_display)
gdk_color_parse(label->colour, &colour);
gdk_colormap_alloc_color(gdk_colormap_get_system(), &colour, FALSE, TRUE);
-
+
pixmap = gdk_pixmap_new(((GtkWidget *)emfv)->window, 16, 16, -1);
gc = gdk_gc_new(((GtkWidget *)emfv)->window);
gdk_gc_set_foreground(gc, &colour);
@@ -1459,7 +1459,7 @@ static void
emfv_empty_trash(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderView *emfv = data;
-
+
em_utils_empty_trash (gtk_widget_get_toplevel ((GtkWidget *) emfv));
}
@@ -1515,11 +1515,11 @@ emfv_select_all_text(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderView *emfv = data;
gboolean selected;
-
+
gtk_html_select_all (((EMFormatHTML *)emfv->preview)->html);
selected = gtk_html_command (((EMFormatHTML *)emfv->preview)->html, "is-selection-active");
- bonobo_ui_component_set_prop(emfv->uic, "/commands/EditCopy", "sensitive", selected?"1":"0", NULL);
-
+ bonobo_ui_component_set_prop(emfv->uic, "/commands/EditCopy", "sensitive", selected?"1":"0", NULL);
+
}
static void
@@ -1536,7 +1536,7 @@ static void
emfv_mail_next_flagged(BonoboUIComponent *uid, void *data, const char *path)
{
EMFolderView *emfv = data;
-
+
message_list_select(emfv->list, MESSAGE_LIST_SELECT_NEXT|MESSAGE_LIST_SELECT_WRAP, CAMEL_MESSAGE_FLAGGED, CAMEL_MESSAGE_FLAGGED);
}
@@ -1587,10 +1587,10 @@ emfv_message_forward_attached (BonoboUIComponent *uic, void *data, const char *p
{
EMFolderView *emfv = data;
GPtrArray *uids;
-
+
if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
return;
-
+
uids = message_list_get_selected (emfv->list);
em_utils_forward_attached (emfv->folder, uids, emfv->folder_uri);
}
@@ -1600,10 +1600,10 @@ emfv_message_forward_inline (BonoboUIComponent *uic, void *data, const char *pat
{
EMFolderView *emfv = data;
GPtrArray *uids;
-
+
if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
return;
-
+
uids = message_list_get_selected (emfv->list);
em_utils_forward_inline (emfv->folder, uids, emfv->folder_uri);
}
@@ -1613,10 +1613,10 @@ emfv_message_forward_quoted (BonoboUIComponent *uic, void *data, const char *pat
{
EMFolderView *emfv = data;
GPtrArray *uids;
-
+
if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
return;
-
+
uids = message_list_get_selected (emfv->list);
em_utils_forward_quoted (emfv->folder, uids, emfv->folder_uri);
}
@@ -1625,13 +1625,13 @@ static void
emfv_message_redirect (BonoboUIComponent *uic, void *data, const char *path)
{
EMFolderView *emfv = data;
-
+
if (emfv->list->cursor_uid == NULL)
return;
-
+
if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
return;
-
+
em_utils_redirect_message_by_uid (emfv->folder, emfv->list->cursor_uid);
}
@@ -1639,13 +1639,13 @@ static void
emfv_message_post_reply (BonoboUIComponent *uic, void *data, const char *path)
{
EMFolderView *emfv = data;
-
+
if (emfv->list->cursor_uid == NULL)
return;
-
+
if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
return;
-
+
em_utils_post_reply_to_message_by_uid (emfv->folder, emfv->list->cursor_uid);
}
@@ -1692,10 +1692,10 @@ emfv_message_reply(EMFolderView *emfv, int mode)
{
char *html = NULL;
gint len;
-
+
if (emfv->list->cursor_uid == NULL)
return;
-
+
if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
return;
@@ -1704,10 +1704,10 @@ emfv_message_reply(EMFolderView *emfv, int mode)
&& len && html[0] && html_contains_nonwhitespace (html, len)) {
CamelMimeMessage *msg, *src;
struct _camel_header_raw *header;
-
+
src = (CamelMimeMessage *)((EMFormat *)emfv->preview)->message;
msg = camel_mime_message_new();
-
+
/* need to strip content- headers */
header = ((CamelMimePart *)src)->headers;
while (header) {
@@ -1731,7 +1731,7 @@ static void
emfv_message_search(BonoboUIComponent *uic, void *data, const char *path)
{
EMFolderView *emfv = data;
-
+
if (!emfv->list_active) /* We are in new mail window */
em_format_html_display_search(emfv->preview);
else {
@@ -1795,10 +1795,10 @@ static void
filter_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *user_data)
{
struct _filter_data *data = user_data;
-
+
if (msg)
filter_gui_add_from_message (msg, data->source, data->type);
-
+
filter_data_free (data);
}
@@ -1806,11 +1806,11 @@ static void
filter_type_uid (CamelFolder *folder, const char *uid, const char *source, int type)
{
struct _filter_data *data;
-
+
data = g_malloc0 (sizeof (*data));
data->type = type;
data->source = source;
-
+
mail_get_message (folder, uid, filter_type_got_message, data, mail_thread_new);
}
@@ -1819,18 +1819,18 @@ filter_type_current (EMFolderView *emfv, int type)
{
const char *source;
GPtrArray *uids;
-
+
if (em_utils_folder_is_sent (emfv->folder, emfv->folder_uri)
|| em_utils_folder_is_outbox (emfv->folder, emfv->folder_uri))
source = FILTER_SOURCE_OUTGOING;
else
source = FILTER_SOURCE_INCOMING;
-
+
uids = message_list_get_selected (emfv->list);
-
+
if (uids->len == 1)
filter_type_uid (emfv->folder, (char *) uids->pdata[0], source, type);
-
+
em_utils_uids_free (uids);
}
@@ -1843,10 +1843,10 @@ static void
vfolder_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *user_data)
{
struct _filter_data *data = user_data;
-
+
if (msg)
vfolder_gui_add_from_message (msg, data->type, data->uri);
-
+
filter_data_free (data);
}
@@ -1855,9 +1855,9 @@ emp_uri_popup_vfolder_sender(EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderView *emfv = data;
EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target;
- CamelURL *url;
+ CamelURL *url;
CamelInternetAddress *addr;
-
+
url = camel_url_new(t->uri, NULL);
if (url == NULL) {
g_warning("cannot parse url '%s'", t->uri);
@@ -1870,9 +1870,9 @@ emp_uri_popup_vfolder_sender(EPopup *ep, EPopupItem *pitem, void *data)
vfolder_gui_add_from_address (addr, AUTO_FROM, emfv->folder_uri);
camel_object_unref (addr);
}
-
- camel_url_free(url);
-
+
+ camel_url_free(url);
+
}
@@ -1881,9 +1881,9 @@ emp_uri_popup_vfolder_recipient(EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderView *emfv = data;
EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target;
- CamelURL *url;
+ CamelURL *url;
CamelInternetAddress *addr;
-
+
url = camel_url_new(t->uri, NULL);
if (url == NULL) {
g_warning("cannot parse url '%s'", t->uri);
@@ -1897,18 +1897,18 @@ emp_uri_popup_vfolder_recipient(EPopup *ep, EPopupItem *pitem, void *data)
camel_object_unref (addr);
}
- camel_url_free(url);
+ camel_url_free(url);
}
static void
vfolder_type_uid (CamelFolder *folder, const char *uid, const char *uri, int type)
{
struct _filter_data *data;
-
+
data = g_malloc0 (sizeof (*data));
data->type = type;
data->uri = g_strdup (uri);
-
+
mail_get_message (folder, uid, vfolder_type_got_message, data, mail_thread_new);
}
@@ -1916,12 +1916,12 @@ static void
vfolder_type_current (EMFolderView *emfv, int type)
{
GPtrArray *uids;
-
+
uids = message_list_get_selected (emfv->list);
-
+
if (uids->len == 1)
vfolder_type_uid (emfv->folder, (char *) uids->pdata[0], emfv->folder_uri, type);
-
+
em_utils_uids_free (uids);
}
@@ -2128,7 +2128,7 @@ emfv_view_mode(BonoboUIComponent *uic, const char *path, Bonobo_UIComponent_Even
if (EM_FOLDER_VIEW_GET_CLASS (emfv)->update_message_style) {
GConfClient *gconf = mail_config_get_gconf_client ();
-
+
gconf_client_set_int (gconf, "/apps/evolution/mail/display/message_style", i, NULL);
}
}
@@ -2197,10 +2197,10 @@ emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
bonobo_ui_component_add_listener(uic, "ViewFullHeaders", emfv_view_mode, emfv);
/* bonobo_ui_component_add_listener(uic, "ViewSource", emfv_view_mode, emfv); */
em_format_set_mode((EMFormat *)emfv->preview, style);
-
+
if (emfv->folder)
bonobo_ui_component_set_prop(uic, "/commands/MessageEdit", "sensitive", "0", NULL);
-
+
/* default charset used in mail view */
e_charset_picker_bonobo_ui_populate (uic, "/menu/View", _("Default"), emfv_charset_changed, emfv);
@@ -2304,9 +2304,9 @@ em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, int on_display
/* See bug 352980 */
/* See bug #54770 */
- /* if (!emfv->hide_deleted)
+ /* if (!emfv->hide_deleted)
t->target.mask &= ~EM_POPUP_SELECT_DELETE;*/
-
+
return t;
}
@@ -2314,7 +2314,7 @@ void
em_folder_view_set_statusbar (EMFolderView *emfv, gboolean statusbar)
{
g_return_if_fail (emfv);
-
+
emfv->statusbar_active = statusbar;
if (statusbar && emfv->uic)
@@ -2347,7 +2347,7 @@ static void
mst_free (struct mst_t *mst)
{
mst->emfv->list->seen_id = 0;
-
+
g_free (mst->uid);
g_free (mst);
}
@@ -2358,10 +2358,10 @@ do_mark_seen (gpointer user_data)
struct mst_t *mst = user_data;
EMFolderView *emfv = mst->emfv;
MessageList *list = emfv->list;
-
+
if (mst->uid && list->cursor_uid && !strcmp (mst->uid, list->cursor_uid))
emfv_set_seen (emfv, mst->uid);
-
+
return FALSE;
}
@@ -2371,7 +2371,7 @@ emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeM
EMFolderView *emfv = data;
EMEvent *eme;
EMEventTargetMessage *target;
-
+
if (emfv->preview == NULL) {
emfv->priv->nomarkseen = FALSE;
emfv_enable_menus(emfv);
@@ -2387,7 +2387,7 @@ emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeM
/** @Event: message.reading
* @Title: Viewing a message
* @Target: EMEventTargetMessage
- *
+ *
* message.reading is emitted whenever a user views a message.
*/
/* TODO: do we emit a message.reading with no message when we're looking at nothing or don't care? */
@@ -2399,15 +2399,15 @@ emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeM
if (emfv->list->seen_id)
g_source_remove(emfv->list->seen_id);
-
+
if (msg && emfv->mark_seen && !emfv->priv->nomarkseen) {
if (emfv->mark_seen_timeout > 0) {
struct mst_t *mst;
-
+
mst = g_new (struct mst_t, 1);
mst->emfv = emfv;
mst->uid = g_strdup (uid);
-
+
emfv->list->seen_id = g_timeout_add_full(G_PRIORITY_DEFAULT_IDLE, emfv->mark_seen_timeout,
(GSourceFunc)do_mark_seen, mst, (GDestroyNotify)mst_free);
} else {
@@ -2425,7 +2425,7 @@ emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeM
gtk_html_stream_close(hstream, GTK_HTML_STREAM_OK);
camel_exception_clear(ex);
}
-
+
emfv->priv->nomarkseen = FALSE;
emfv_enable_menus(emfv);
g_object_unref (emfv);
@@ -2440,11 +2440,11 @@ emfv_spin(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
if (!strcmp(eb->classid, "spinner")) {
GtkWidget *box, *label;
gchar *msg = g_strdup_printf("<b>%s</b>", _("Retrieving Message..."));
-
+
label = gtk_label_new (NULL);
gtk_label_set_markup ((GtkLabel *)label, msg);
box = gtk_hbox_new (FALSE, 0);
- g_free (msg);
+ g_free (msg);
ep = e_spinner_new ();
e_spinner_set_size ((ESpinner *)ep, GTK_ICON_SIZE_SMALL_TOOLBAR);
@@ -2455,7 +2455,7 @@ emfv_spin(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
gtk_container_add ((GtkContainer *)eb, box);
gtk_widget_show_all ((GtkWidget *)eb);
-
+
g_signal_handlers_disconnect_by_func(efh, emfv_spin, NULL);
}
@@ -2595,7 +2595,7 @@ emfv_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev,
default:
return FALSE;
}
-
+
return TRUE;
}
@@ -2605,14 +2605,14 @@ emfv_popup_menu (GtkWidget *widget)
gboolean ret = FALSE;
EMFolderView *emfv = (EMFolderView *)widget;
- /* Try to bring up menu for preview html object.
- Currently we cannot directly connect to html's "popup_menu" signal
+ /* Try to bring up menu for preview html object.
+ Currently we cannot directly connect to html's "popup_menu" signal
since it doesn't work.
*/
-
+
if (GTK_WIDGET_HAS_FOCUS (emfv->preview->formathtml.html))
ret = em_format_html_display_popup_menu (emfv->preview);
-
+
if (!ret)
emfv_popup (emfv, NULL, FALSE);
@@ -2632,7 +2632,7 @@ emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const char *uri, EMFolderVie
{
if (!strncmp (uri, "##", 2))
return;
-
+
if (!g_ascii_strncasecmp (uri, "mailto:", 7)) {
em_utils_compose_new_message_with_mailto (uri, emfv->folder_uri);
} else if (*uri == '#') {
@@ -2643,9 +2643,9 @@ emfv_format_link_clicked(EMFormatHTMLDisplay *efhd, const char *uri, EMFolderVie
/* ignore */
} else {
GError *err = NULL;
-
+
gnome_url_show (uri, &err);
-
+
if (err) {
g_warning ("gnome_url_show: %s", err->message);
g_error_free (err);
@@ -2818,13 +2818,13 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
char *tkey;
g_return_if_fail (gconf_entry_get_key (entry) != NULL);
-
+
if (!(value = gconf_entry_get_value (entry)))
return;
-
+
tkey = strrchr(entry->key, '/');
g_return_if_fail (tkey != NULL);
-
+
switch(GPOINTER_TO_INT(g_hash_table_lookup(emfv_setting_key, tkey+1))) {
case EMFV_ANIMATE_IMAGES:
em_format_html_display_set_animate(emfv->preview, gconf_value_get_bool (value));
@@ -2854,7 +2854,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
case EMFV_MESSAGE_STYLE:
if (EM_FOLDER_VIEW_GET_CLASS (emfv)->update_message_style) {
int style = gconf_value_get_int (value);
-
+
if (style < EM_FORMAT_NORMAL || style > EM_FORMAT_SOURCE)
style = EM_FORMAT_NORMAL;
em_format_set_mode((EMFormat *)emfv->preview, style);
@@ -2880,7 +2880,7 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
while (p) {
EMMailerPrefsHeader *h;
char *xml = (char *)p->data;
-
+
h = em_mailer_prefs_header_from_xml(xml);
if (h && h->enabled) {
em_format_add_header(emf, h->name, EM_FORMAT_HEADER_BOLD);
@@ -2904,45 +2904,45 @@ emfv_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry, EMFold
if (emf->message)
em_format_redraw(emf);
- break; }
+ break; }
case EMFV_PHOTO_LOCAL: {
EMFormat *emf = (EMFormat *)emfv->preview;
emf->photo_local = gconf_value_get_bool (value);
- break; }
+ break; }
case EMFV_SHOW_PREVIEW: {
gboolean state_gconf, state_camel;
char *ret;
- /* If emfv->folder hasn't been initialized, do nothing */
+ /* If emfv->folder hasn't been initialized, do nothing */
if (!emfv->folder)
return;
-
+
state_gconf = gconf_value_get_bool (value);
if (state_gconf == FALSE)
emfv_enable_menus (emfv);
-
+
if ((ret = camel_object_meta_get (emfv->folder, "evolution:show_preview"))) {
state_camel = (ret[0] != '0');
g_free (ret);
if (state_gconf == state_camel)
return;
}
-
+
if (camel_object_meta_set (emfv->folder, "evolution:show_preview", state_gconf ? "1" : "0"))
camel_object_state_write (emfv->folder);
em_folder_browser_show_preview ((EMFolderBrowser *)emfv, state_gconf);
bonobo_ui_component_set_prop (emfv->uic, "/commands/ViewPreview", "state", state_gconf ? "1" : "0", NULL);
break; }
- case EMFV_SHOW_DELETED: {
+ case EMFV_SHOW_DELETED: {
gboolean state;
state = gconf_value_get_bool (value);
em_folder_view_set_hide_deleted (emfv, !state);
/* Set the prop only if the component has already been
- * activated. */
- if (emfv->uic)
+ * activated. */
+ if (emfv->uic)
bonobo_ui_component_set_prop (emfv->uic, "/commands/HideDeleted", "state", state ? "0" : "1", NULL);
break; }
case EMFV_THREAD_LIST: {
@@ -3068,9 +3068,9 @@ emfv_on_url_cb (GObject *emitter, const char *url, EMFolderView *emfv)
} else
nice_url = g_strdup_printf (_("Click to open %s"), url);
}
-
+
g_signal_emit (emfv, signals[EMFV_ON_URL], 0, url, nice_url);
-
+
g_free (nice_url);
}
@@ -3078,10 +3078,10 @@ static gboolean
emfv_on_html_button_released_cb (GtkHTML *html, GdkEventButton *button, EMFolderView *emfv)
{
gboolean selected;
-
+
selected = gtk_html_command (html, "is-selection-active");
bonobo_ui_component_set_prop(emfv->uic, "/commands/EditCopy", "sensitive", selected?"1":"0", NULL);
-
+
return FALSE;
}
-
+
diff --git a/mail/em-folder-view.h b/mail/em-folder-view.h
index 75416acd8c..82032477dd 100644
--- a/mail/em-folder-view.h
+++ b/mail/em-folder-view.h
@@ -90,7 +90,7 @@ struct _EMFolderView {
struct _BonoboUIComponent *uic; /* if we're active, this will be set */
GSList *enable_map; /* bonobo menu enable map, entries are 0-terminated EMFolderViewEnable arryas
TODO: should this be on class? */
-
+
int mark_seen_timeout; /* local copy of gconf stuff */
guint mark_seen:1;
guint preview_active:1; /* is preview being used */
@@ -101,10 +101,10 @@ struct _EMFolderView {
struct _EMFolderViewClass {
GtkVBoxClass parent_class;
-
+
/* behaviour definition */
guint update_message_style:1;
-
+
/* if used as a control, used to activate/deactivate custom menu's */
void (*activate)(EMFolderView *, struct _BonoboUIComponent *uic, int state);
diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c
index 019c409b97..8b2f49f91e 100644
--- a/mail/em-format-hook.c
+++ b/mail/em-format-hook.c
@@ -253,7 +253,7 @@ GType
em_format_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMFormatHookClass), NULL, NULL, (GClassInitFunc) emfh_class_init, NULL, NULL,
@@ -263,7 +263,7 @@ em_format_hook_get_type(void)
emfh_parent_class = g_type_class_ref(e_plugin_hook_get_type());
type = g_type_register_static(e_plugin_hook_get_type(), "EMFormatHook", &info, 0);
}
-
+
return type;
}
diff --git a/mail/em-format-hook.h b/mail/em-format-hook.h
index b4c7731dd4..387330b69e 100644
--- a/mail/em-format-hook.h
+++ b/mail/em-format-hook.h
@@ -65,9 +65,9 @@ struct _EMFormatHookGroup {
/**
* struct _EMFormatHook - Mail formatter hook.
- *
- * @hook:
- * @groups:
+ *
+ * @hook:
+ * @groups:
*
* The Mail formatter hook links all of the plugin formatter hooks
* into the relevent formatter classes.
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index b48d97630a..bc876815dd 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -121,7 +121,7 @@
#define localtime_r(tp,tmp) (localtime(tp)?(*(tmp)=*localtime(tp),(tmp)):0)
#endif
-#define d(x)
+#define d(x)
#define EFHD_TABLE_OPEN "<table>"
@@ -174,10 +174,10 @@ struct _attach_puri {
/* Embedded Frame */
GtkHTMLEmbedded *html;
-
+
/* Attachment */
EAttachment *attachment;
-
+
/* image stuff */
int fit_width;
int fit_height;
@@ -186,7 +186,7 @@ struct _attach_puri {
/* Optional Text Mem Stream */
CamelStreamMem *mstream;
-
+
/* Signed / Encrypted */
camel_cipher_validity_sign_t sign;
camel_cipher_validity_encrypt_t encrypt;
@@ -260,7 +260,7 @@ efhd_gtkhtml_realise(GtkHTML *html, EMFormatHTMLDisplay *efhd)
}
efhd->formathtml.body_colour = ((r<<16) | (g<< 8) | b) & 0xffffff;
-
+
#undef SCALE
#define SCALE (174)
/* choose a suitably darker or lighter colour */
@@ -359,13 +359,13 @@ efhd_class_init(GObjectClass *klass)
((EMFormatClass *)klass)->format_error = efhd_format_error;
((EMFormatClass *)klass)->format_source = efhd_format_source;
((EMFormatClass *)klass)->format_attachment = efhd_format_attachment;
- ((EMFormatClass *)klass)->format_optional = efhd_format_optional;
+ ((EMFormatClass *)klass)->format_optional = efhd_format_optional;
((EMFormatClass *)klass)->format_secure = efhd_format_secure;
((EMFormatClass *)klass)->complete = efhd_complete;
klass->finalize = efhd_finalise;
- efhd_signals[EFHD_LINK_CLICKED] =
+ efhd_signals[EFHD_LINK_CLICKED] =
g_signal_new("link_clicked",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST,
@@ -374,7 +374,7 @@ efhd_class_init(GObjectClass *klass)
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
- efhd_signals[EFHD_POPUP_EVENT] =
+ efhd_signals[EFHD_POPUP_EVENT] =
g_signal_new("popup_event",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST,
@@ -385,7 +385,7 @@ efhd_class_init(GObjectClass *klass)
GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE,
G_TYPE_POINTER, G_TYPE_POINTER);
- efhd_signals[EFHD_ON_URL] =
+ efhd_signals[EFHD_ON_URL] =
g_signal_new("on_url",
G_TYPE_FROM_CLASS(klass),
G_SIGNAL_RUN_LAST,
@@ -433,7 +433,7 @@ efhd_scroll_event(GtkWidget *w, GdkEventScroll *event, EMFormatHTMLDisplay *efhd
}
else if(event->direction == GDK_SCROLL_DOWN)
{
- gtk_html_zoom_out (efhd->formathtml.html);
+ gtk_html_zoom_out (efhd->formathtml.html);
}
return TRUE;
}
@@ -519,7 +519,7 @@ efhd_update_matches(EMFormatHTMLDisplay *efhd)
gtk_label_set_text((GtkLabel *)p->search_matches_label, str);
}
gtk_widget_show((GtkWidget *)p->search_matches_label);
-
+
}
static void
@@ -613,7 +613,7 @@ efhd_search_case_toggled(GtkWidget *w, EMFormatHTMLDisplay *efhd)
efhd_search_response(w, efhd);
}
-static gboolean
+static gboolean
efhd_key_pressed (GtkWidget *w, GdkEventKey *event, EMFormatHTMLDisplay *efhd)
{
if (event->keyval == GDK_Escape){
@@ -696,7 +696,7 @@ em_format_html_get_search_dialog (EMFormatHTMLDisplay *efhd)
gtk_widget_show (p->search_matches_label);
gtk_box_pack_start (GTK_BOX (hbox2), p->search_matches_label, TRUE, TRUE, 0);
p->search_dialog = GTK_HBOX (hbox2);
-
+
p->search_wrap = FALSE;
g_signal_connect (p->search_entry, "activate", G_CALLBACK(efhd_search_response), efhd);
@@ -716,19 +716,19 @@ set_focus_cb (GtkWidget *window, GtkWidget *widget, EMFormatHTMLDisplay *efhd)
{
struct _EMFormatHTMLDisplayPrivate *p = efhd->priv;
GtkWidget *sbar = GTK_WIDGET (p->search_dialog);
-
+
while (widget != NULL && widget != sbar) {
widget = widget->parent;
}
- if (widget != sbar)
+ if (widget != sbar)
efhd_search_destroy(widget, efhd);
}
/**
* em_format_html_display_search:
- * @efhd:
- *
+ * @efhd:
+ *
* Run an interactive search dialogue.
**/
void
@@ -751,8 +751,8 @@ em_format_html_display_search(EMFormatHTMLDisplay *efhd)
}
/**
* em_format_html_display_search_with:
- * @efhd:
- *
+ * @efhd:
+ *
* Run an interactive search dialogue.
**/
void
@@ -762,7 +762,7 @@ em_format_html_display_search_with (EMFormatHTMLDisplay *efhd, char *word)
if (p->search_dialog){
gtk_widget_show ( (GtkWidget *)(p->search_dialog));
-
+
/* Set the query */
gtk_entry_set_text (GTK_ENTRY (p->search_entry), word);
gtk_widget_hide ( (GtkWidget *) p->search_entry_box);
@@ -845,7 +845,7 @@ efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormat
if (uri && !strncmp (uri, "##", 2))
return TRUE;
-
+
if (uri) {
puri = em_format_find_puri((EMFormat *)efhd, uri);
d(printf("poup event, uri = '%s' part = '%p'\n", uri, puri?puri->part:NULL));
@@ -858,7 +858,7 @@ efhd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormat
return res;
}
-gboolean
+gboolean
em_format_html_display_popup_menu (EMFormatHTMLDisplay *efhd)
{
GtkHTML *html;
@@ -1038,7 +1038,7 @@ efhd_xpkcs7mime_add_cert_table(GtkWidget *vbox, EDList *certlist, struct _smime_
if (info->email)
l = info->email;
}
-
+
if (l) {
GtkWidget *w;
#if defined(HAVE_NSS)
@@ -1070,10 +1070,10 @@ efhd_xpkcs7mime_add_cert_table(GtkWidget *vbox, EDList *certlist, struct _smime_
#endif
n++;
}
-
+
info = info->next;
}
-
+
gtk_box_pack_start((GtkBox *)vbox, (GtkWidget *)table, TRUE, TRUE, 6);
}
@@ -1204,10 +1204,10 @@ efhd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Came
|| valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE)) {
char *classid;
struct _smime_pobject *pobj;
-
+
camel_stream_printf (stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0%s><tr>",
smime_sign_colour[valid->sign.status]);
-
+
classid = g_strdup_printf("smime:///em-format-html/%s/icon/signed", emf->part_id->str);
pobj = (struct _smime_pobject *)em_format_html_add_pobject((EMFormatHTML *)emf, sizeof(*pobj), classid, part, efhd_xpkcs7mime_button);
pobj->valid = camel_cipher_validity_clone(valid);
@@ -1231,7 +1231,7 @@ efhd_image(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormat
{
char *classid;
struct _attach_puri *info;
-
+
classid = g_strdup_printf("image%s", ((EMFormat *)efh)->part_id->str);
info = (struct _attach_puri *)em_format_add_puri((EMFormat *)efh, sizeof(*info), classid, part, efhd_attachment_frame);
em_format_html_add_pobject(efh, sizeof(EMFormatHTMLPObject), classid, part, efhd_attachment_image);
@@ -1393,7 +1393,7 @@ static void efhd_message_prefix(EMFormat *emf, CamelStream *stream, CamelMimePar
now = time(NULL);
if (now > date)
camel_stream_printf(stream, "<b>%s</b>&nbsp;", _("Overdue:"));
-
+
localtime_r(&date, &due_tm);
e_utf8_strftime_fix_am_pm(due_date, sizeof (due_date), _("by %B %d, %Y, %l:%M %p"), &due_tm);
camel_stream_printf(stream, "%s %s", flag, due_date);
@@ -1471,7 +1471,7 @@ static void
efhd_popup_place_widget(GtkMenu *menu, int *x, int *y, gboolean *push_in, gpointer user_data)
{
GtkWidget *w = user_data;
-
+
gdk_window_get_origin(gtk_widget_get_parent_window(w), x, y);
*x += w->allocation.x + w->allocation.width;
*y += w->allocation.y;
@@ -1519,7 +1519,7 @@ efhd_attachment_popup(GtkWidget *w, GdkEventButton *event, struct _attach_puri *
}
e_popup_add_items((EPopup *)emp, menus, NULL, efhd_menu_items_free, info);
-
+
menu = e_popup_create_menu_once((EPopup *)emp, (EPopupTarget *)target, 0);
if (event)
gtk_menu_popup(menu, NULL, NULL, NULL, NULL, event->button, event->time);
@@ -1600,7 +1600,7 @@ static void
efhd_drag_data_delete(GtkWidget *w, GdkDragContext *drag, EMFormatHTMLPObject *pobject)
{
char *uri;
-
+
uri = g_object_get_data((GObject *)w, "e-drag-uri");
if (uri) {
/* NB: this doesn't kill the dnd directory */
@@ -1665,9 +1665,9 @@ efhd_change_cursor(GtkWidget *w, GdkEventCrossing *event, struct _attach_puri *i
static void
efhd_image_fit_width(GtkWidget *widget, GdkEventButton *event, struct _attach_puri *info)
-{
+{
int width;
-
+
width = ((GtkWidget *)((EMFormatHTML *)info->puri.format)->html)->allocation.width - 12;
if (info->shown && info->image) {
@@ -1679,11 +1679,11 @@ efhd_image_fit_width(GtkWidget *widget, GdkEventButton *event, struct _attach_pu
} else {
info->fit_width = 0;
e_cursor_set(widget->window, E_CURSOR_ZOOM_OUT);
- }
+ }
}
} else {
info->fit_width = width;
- e_cursor_set (widget->window, E_CURSOR_ZOOM_IN);
+ e_cursor_set (widget->window, E_CURSOR_ZOOM_IN);
}
}
@@ -1709,7 +1709,7 @@ efhd_image_unallocate (struct _EMFormatPURI * puri)
static gboolean
efhd_attachment_image(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject)
{
- GtkWidget *box;
+ GtkWidget *box;
EMFormatHTMLJob *job;
struct _attach_puri *info;
GdkPixbuf *pixbuf;
@@ -1724,13 +1724,13 @@ efhd_attachment_image(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObjec
info->image = (GtkImage *)gtk_image_new();
info->html = eb;
info->puri.free = efhd_image_unallocate;
-
+
pixbuf = em_icon_stream_get_image(pobject->classid, info->fit_width, info->fit_height);
if (pixbuf) {
gtk_image_set_from_pixbuf(info->image, pixbuf);
g_object_unref(pixbuf);
} else {
- job = em_format_html_job_new(efh, efhd_write_icon_job, pobject);
+ job = em_format_html_job_new(efh, efhd_write_icon_job, pobject);
job->stream = (CamelStream *)em_icon_stream_new((GtkImage *)info->image, pobject->classid, info->fit_width, info->fit_height, TRUE);
em_format_html_job_queue(efh, job);
}
@@ -1742,10 +1742,10 @@ efhd_attachment_image(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObjec
gtk_container_add((GtkContainer *)eb, box);
g_signal_connect(eb, "size_allocate", G_CALLBACK(efhd_image_resized), info);
-
+
simple_type = camel_content_type_simple(((CamelDataWrapper *)pobject->part)->mime_type);
camel_strdown(simple_type);
-
+
drag_types[0].target = simple_type;
gtk_drag_source_set(box, GDK_BUTTON1_MASK, drag_types, sizeof(drag_types)/sizeof(drag_types[0]), GDK_ACTION_COPY);
g_free(simple_type);
@@ -1756,7 +1756,7 @@ efhd_attachment_image(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObjec
g_signal_connect(box, "button_press_event", G_CALLBACK(efhd_image_popup), info);
g_signal_connect(box, "enter-notify-event", G_CALLBACK(efhd_change_cursor), info);
g_signal_connect(box, "popup_menu", G_CALLBACK(efhd_attachment_popup_menu), info);
- g_signal_connect(box, "button-press-event", G_CALLBACK(efhd_image_fit_width), info);
+ g_signal_connect(box, "button-press-event", G_CALLBACK(efhd_image_fit_width), info);
return TRUE;
}
@@ -1802,7 +1802,7 @@ efhd_attachment_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje
guint count = GPOINTER_TO_UINT(tmp);
char *ext;
char *tmp_file = g_strdup (file);
-
+
if ((ext = strrchr(tmp_file, '.'))) {
ext[0] = 0;
new_file = g_strdup_printf("%s(%d).%s", tmp_file, count++, ext+1);
@@ -1818,17 +1818,17 @@ efhd_attachment_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje
g_hash_table_insert (efhd->priv->files, g_strdup(file), GUINT_TO_POINTER(1));
}
- /* Store the status of encryption / signature on the attachment for emblem display
+ /* Store the status of encryption / signature on the attachment for emblem display
* FIXME: May not work well always
*/
new->sign = info->sign;
new->encrypt = info->encrypt;
-
+
/* Add the attachment to the bar.*/
e_attachment_bar_add_attachment(E_ATTACHMENT_BAR(efhd->priv->attachment_bar), new);
efhd_attachment_bar_refresh(efhd);
}
-
+
mainbox = gtk_hbox_new(FALSE, 0);
button = gtk_button_new();
@@ -1881,7 +1881,7 @@ efhd_attachment_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje
}
} else {
GdkPixbuf *pixbuf, *mini;
-
+
if ((pixbuf = e_icon_for_mime_type (simple_type, 24))) {
if ((mini = gdk_pixbuf_scale_simple (pixbuf, 24, 24, GDK_INTERP_BILINEAR))) {
gtk_image_set_from_pixbuf ((GtkImage *) w, mini);
@@ -1946,7 +1946,7 @@ efhd_bonobo_object(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *
CamelDataWrapper *wrapper;
Bonobo_ServerInfo *component;
GtkWidget *embedded;
- Bonobo_PersistStream persist;
+ Bonobo_PersistStream persist;
CORBA_Environment ev;
CamelStreamMem *cstream;
BonoboStream *bstream;
@@ -1961,7 +1961,7 @@ efhd_bonobo_object(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *
CORBA_free(component);
if (embedded == NULL)
return FALSE;
-
+
CORBA_exception_init(&ev);
control_frame = bonobo_widget_get_control_frame((BonoboWidget *)embedded);
@@ -1976,23 +1976,23 @@ efhd_bonobo_object(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *
*/
const CamelInternetAddress *from;
char *from_address;
-
+
from = camel_mime_message_get_from((CamelMimeMessage *)((EMFormat *)efh)->message);
from_address = camel_address_encode((CamelAddress *)from);
bonobo_property_bag_client_set_value_string(prop_bag, "from_address", from_address, &ev);
g_free(from_address);
-
+
Bonobo_Unknown_unref(prop_bag, &ev);
}
-
+
persist = (Bonobo_PersistStream)Bonobo_Unknown_queryInterface(bonobo_widget_get_objref((BonoboWidget *)embedded),
"IDL:Bonobo/PersistStream:1.0", &ev);
if (persist == CORBA_OBJECT_NIL) {
g_object_ref_sink(embedded);
- CORBA_exception_free(&ev);
+ CORBA_exception_free(&ev);
return FALSE;
}
-
+
/* Write the data to a CamelStreamMem... */
cstream = (CamelStreamMem *)camel_stream_mem_new();
wrapper = camel_medium_get_content_object((CamelMedium *)pobject->part);
@@ -2003,11 +2003,11 @@ efhd_bonobo_object(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *
} else {
camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) cstream);
}
-
+
/* ...convert the CamelStreamMem to a BonoboStreamMem... */
bstream = bonobo_stream_mem_create((char *)cstream->buffer->data, cstream->buffer->len, TRUE, FALSE);
camel_object_unref(cstream);
-
+
/* ...and hydrate the PersistStream from the BonoboStream. */
Bonobo_PersistStream_load(persist,
bonobo_object_corba_objref(BONOBO_OBJECT (bstream)),
@@ -2015,17 +2015,17 @@ efhd_bonobo_object(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *
bonobo_object_unref(BONOBO_OBJECT (bstream));
Bonobo_Unknown_unref(persist, &ev);
CORBA_Object_release(persist, &ev);
-
+
if (ev._major != CORBA_NO_EXCEPTION) {
g_object_ref_sink(embedded);
- CORBA_exception_free(&ev);
+ CORBA_exception_free(&ev);
return FALSE;
}
CORBA_exception_free(&ev);
-
+
gtk_widget_show(embedded);
gtk_container_add(GTK_CONTAINER (eb), embedded);
-
+
return TRUE;
}
@@ -2099,7 +2099,7 @@ attachment_bar_arrow_clicked(GtkWidget *w, EMFormatHTMLDisplay *efhd)
} else {
gtk_widget_hide(efhd->priv->attachment_box);
gtk_widget_show(efhd->priv->forward);
- gtk_widget_hide(efhd->priv->down);
+ gtk_widget_hide(efhd->priv->down);
}
}
@@ -2133,17 +2133,17 @@ efhd_bar_popup_position(GtkMenu *menu, int *x, int *y, gboolean *push_in, gpoint
GnomeIconList *icon_list = user_data;
GList *selection;
GnomeCanvasPixbuf *image;
-
+
gdk_window_get_origin (((GtkWidget*) bar)->window, x, y);
-
+
selection = gnome_icon_list_get_selection (icon_list);
if (selection == NULL)
return;
-
+
image = gnome_icon_list_get_icon_pixbuf_item (icon_list, GPOINTER_TO_INT(selection->data));
if (image == NULL)
return;
-
+
/* Put menu to the center of icon. */
*x += (int)(image->item.x1 + image->item.x2) / 2;
*y += (int)(image->item.y1 + image->item.y2) / 2;
@@ -2157,7 +2157,7 @@ efhd_bar_save_selected(EPopup *ep, EPopupItem *item, void *data)
GSList *parts = NULL;
attachment_parts = e_attachment_bar_get_selected(E_ATTACHMENT_BAR(efhd->priv->attachment_bar));
-
+
for (tmp = attachment_parts; tmp; tmp=tmp->next)
parts = g_slist_prepend(parts, ((EAttachment *)tmp->data)->body);
@@ -2199,11 +2199,11 @@ efhd_bar_button_press_event(EAttachmentBar *bar, GdkEventButton *event, EMFormat
/* Add something like save-selected, foward selected attachments in a mail etc....*/
list = e_attachment_bar_get_selected(bar);
-
+
/* Lets not propagate any more the r-click which is intended to us*/
if ( g_slist_length (list) == 0)
return TRUE;
-
+
target = (EPopupTarget *)em_popup_target_new_attachments(emp, list);
for (i=0; i<2; i++)
menus = g_slist_prepend(menus, &efhd_bar_menu_items[i]);
@@ -2220,7 +2220,7 @@ efhd_bar_button_press_event(EAttachmentBar *bar, GdkEventButton *event, EMFormat
}
static gboolean
-efhd_bar_popup_menu_event (EAttachmentBar *bar, EMFormat *emf)
+efhd_bar_popup_menu_event (EAttachmentBar *bar, EMFormat *emf)
{
return efhd_bar_button_press_event(bar, NULL, emf);
}
@@ -2241,12 +2241,12 @@ efhd_attachment_bar_refresh (EMFormatHTMLDisplay *efhd)
txt = g_strdup_printf(ngettext("%d at_tachment", "%d at_tachments", nattachments), nattachments);
gtk_label_set_text_with_mnemonic ((GtkLabel *)efhd->priv->label, txt);
g_free (txt);
-
+
/* Show the bar even when the first attachment is added */
if (nattachments == 1) {
gtk_widget_show_all (efhd->priv->attachment_area);
gtk_label_set_text_with_mnemonic ((GtkLabel *)efhd->priv->save_txt, _("S_ave"));
-
+
if (efhd->priv->show_bar) {
gtk_widget_show(efhd->priv->down);
gtk_widget_hide(efhd->priv->forward);
@@ -2256,7 +2256,7 @@ efhd_attachment_bar_refresh (EMFormatHTMLDisplay *efhd)
gtk_widget_hide(efhd->priv->attachment_box);
}
} else if (nattachments > 1) {
- gtk_label_set_text_with_mnemonic ((GtkLabel *)efhd->priv->save_txt, _("S_ave All"));
+ gtk_label_set_text_with_mnemonic ((GtkLabel *)efhd->priv->save_txt, _("S_ave All"));
}
}
}
@@ -2270,7 +2270,7 @@ efhd_bar_resize(GtkWidget *w, GtkAllocation *event, EMFormatHTML *efh)
gtk_widget_size_request (efhd->priv->attachment_bar, &req);
width = ((GtkWidget *) efh->html)->allocation.width - 16;
-
+
/* Update the width of the bar when the width is greater than 1*/
if (width > 0)
e_attachment_bar_set_width(E_ATTACHMENT_BAR(efhd->priv->attachment_bar), width);
@@ -2289,7 +2289,7 @@ efhd_bar_scroll_event(GtkWidget *w, GdkEventScroll *event, EMFormatHTMLDisplay *
return TRUE;
}
-gboolean
+gboolean
efhd_mnemonic_show_bar (GtkWidget *widget, gboolean focus, GtkWidget *efhd)
{
attachment_bar_arrow_clicked (NULL, (EMFormatHTMLDisplay *)efhd);
@@ -2309,7 +2309,7 @@ efhd_add_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobjec
scroll = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
((EAttachmentBar *)priv->attachment_bar)->expand = TRUE;
-
+
priv->forward = gtk_arrow_new(GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
priv->down = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE);
hbox3 = gtk_hbox_new (FALSE, 0);
@@ -2345,10 +2345,10 @@ efhd_add_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobjec
/* FIXME: What if the text is more?. Should we reduce the text with appending ...?
* or resize the bar? How to figure out that, it needs more space? */
bar_width = ((GtkWidget *)efh->html)->parent->allocation.width - /* FIXME */16;
- gtk_widget_set_size_request (priv->attachment_bar,
+ gtk_widget_set_size_request (priv->attachment_bar,
bar_width > 0 ? bar_width : 0,
84 /* FIXME: Default show only one row, Dont hardcode size*/);
-
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start ((GtkBox *)vbox, hbox2, FALSE, FALSE, 2);
gtk_box_pack_start ((GtkBox *)vbox, priv->attachment_box, TRUE, TRUE, 2);
@@ -2359,7 +2359,7 @@ efhd_add_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobjec
/* Lets hide it by default and show only when there are attachments */
priv->attachment_area = vbox;
gtk_widget_hide_all (priv->attachment_area);
-
+
g_signal_connect (priv->arrow, "clicked", G_CALLBACK(attachment_bar_arrow_clicked), efh);
g_signal_connect (priv->attachment_bar, "button_press_event", G_CALLBACK(efhd_bar_button_press_event), efhd);
g_signal_connect (priv->attachment_bar, "popup-menu", G_CALLBACK(efhd_bar_popup_menu_event), efhd);
@@ -2443,16 +2443,16 @@ efhd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part,
g_free(classid);
}
-static void
+static void
efhd_optional_button_show (GtkWidget *widget, GtkWidget *w)
{
GtkWidget *label = g_object_get_data (G_OBJECT (widget), "text-label");
-
+
if (GTK_WIDGET_VISIBLE (w)) {
gtk_widget_hide (w);
gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("View _Unformatted"));
} else {
- gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("Hide _Unformatted"));
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (label), _("Hide _Unformatted"));
gtk_widget_show (w);
}
}
@@ -2480,9 +2480,9 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
if (!info || info->forward) {
g_warning ("unable to expand the attachment\n");
return TRUE;
- }
+ }
- scroll = gtk_scrolled_window_new (NULL, NULL);
+ scroll = gtk_scrolled_window_new (NULL, NULL);
mainbox = gtk_hbox_new(FALSE, 0);
button = gtk_button_new();
@@ -2500,7 +2500,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
gtk_widget_set_sensitive(button, FALSE);
GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS);
}
-
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start(GTK_BOX (mainbox), button, FALSE, FALSE, 6);
@@ -2513,7 +2513,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
gtk_box_pack_start (GTK_BOX (hbox), gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE), TRUE, TRUE, 2);
gtk_widget_show_all (hbox);
gtk_container_add (GTK_CONTAINER (button), GTK_WIDGET (hbox));
-
+
a11y = gtk_widget_get_accessible (button);
atk_object_set_name (a11y, _("Attachment"));
@@ -2546,7 +2546,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
if (!info->shown)
gtk_widget_hide (scroll);
-
+
gtk_widget_show (vbox);
gtk_container_add(GTK_CONTAINER (eb), vbox);
info->handle = NULL;
@@ -2560,7 +2560,7 @@ efhd_format_optional(EMFormat *emf, CamelStream *fstream, CamelMimePart *part, C
char *classid, *html;
struct _attach_puri *info;
CamelStream *stream = ((CamelStreamFilter *) fstream)->source;
-
+
classid = g_strdup_printf("optional%s", emf->part_id->str);
info = (struct _attach_puri *)em_format_add_puri(emf, sizeof(*info), classid, part, efhd_attachment_frame);
em_format_html_add_pobject((EMFormatHTML *)emf, sizeof(EMFormatHTMLPObject), classid, part, efhd_attachment_optional);
@@ -2584,7 +2584,7 @@ efhd_format_optional(EMFormat *emf, CamelStream *fstream, CamelMimePart *part, C
"</font></h3></td></tr></table>\n");
camel_stream_write_string(stream,
"<table cellspacing=0 cellpadding=0>"
- "<tr>");
+ "<tr>");
camel_stream_printf(stream, "<td><object classid=\"%s\"></object></td></tr></table>", classid);
g_free(html);
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 400cf5fad5..228a8aa3ef 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -156,7 +156,7 @@ efh_init(GObject *o)
gtk_html_set_default_content_type(efh->html, "text/html; charset=utf-8");
gtk_html_set_editable(efh->html, FALSE);
-
+
g_signal_connect(efh->html, "destroy", G_CALLBACK(efh_gtkhtml_destroy), efh);
g_signal_connect(efh->html, "url_requested", G_CALLBACK(efh_url_requested), efh);
g_signal_connect(efh->html, "object_requested", G_CALLBACK(efh_object_requested), efh);
@@ -236,7 +236,7 @@ efh_class_init(GObjectClass *klass)
((EMFormatClass *)klass)->format_attachment = efh_format_attachment;
((EMFormatClass *)klass)->format_secure = efh_format_secure;
((EMFormatClass *)klass)->busy = efh_busy;
-
+
klass->finalize = efh_finalise;
}
@@ -526,7 +526,7 @@ static void emfh_gethttp(struct _EMFormatHTMLJob *job, int cancelled)
} else if (n < 0 && costream) {
camel_data_cache_remove(emfh_http_cache, EMFH_HTTP_CACHE_PATH, job->u.uri, NULL);
camel_object_unref(costream);
- costream = NULL;
+ costream = NULL;
}
} while (n>0);
@@ -584,7 +584,7 @@ efh_url_requested(GtkHTML *html, const char *url, GtkHTMLStream *handle, EMForma
char *data = NULL;
gsize length = 0;
gboolean status;
-
+
status = g_file_get_contents (url, &data, &length, NULL);
if (status)
gtk_html_stream_write (handle, data, length);
@@ -669,13 +669,13 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel
char *classid, *iconpath;
const char *icon;
CamelMimePart *iconpart;
-
+
camel_stream_printf (stream, "<table border=0 width=\"100%%\" cellpadding=3 cellspacing=0%s><tr>",
smime_sign_colour[valid->sign.status]);
-
+
classid = g_strdup_printf("smime:///em-format-html/%s/icon/signed", emf->part_id->str);
camel_stream_printf(stream, "<td valign=\"top\"><img src=\"%s\"></td><td valign=\"top\" width=\"100%%\">", classid);
-
+
if (valid->sign.status != 0)
icon = smime_sign_table[valid->sign.status].icon;
else
@@ -700,7 +700,7 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel
camel_stream_printf(stream, "</td></tr></table>");
}
}
-
+
static void
efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
@@ -715,7 +715,7 @@ efh_text_plain(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFo
struct _EMFormatHTMLCache *efhc;
flags = efh->text_html_flags;
-
+
dw = camel_medium_get_content_object((CamelMedium *)part);
/* Check for RFC 2646 flowed text. */
@@ -809,16 +809,16 @@ efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, E
CamelMimeFilter *enriched;
CamelDataWrapper *dw;
guint32 flags = 0;
-
+
dw = camel_medium_get_content_object((CamelMedium *)part);
-
+
if (!strcmp(info->mime_type, "text/richtext")) {
flags = CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT;
camel_stream_write_string( stream, "\n<!-- text/richtext -->\n");
} else {
camel_stream_write_string( stream, "\n<!-- text/enriched -->\n");
}
-
+
enriched = camel_mime_filter_enriched_new(flags);
filtered_stream = camel_stream_filter_new_with_stream (stream);
camel_stream_filter_add(filtered_stream, enriched);
@@ -829,7 +829,7 @@ efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, E
efh->frame_colour & 0xffffff, efh->content_colour & 0xffffff);
em_format_format_text((EMFormat *)efh, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
-
+
camel_object_unref(filtered_stream);
camel_stream_write_string(stream, "</div>");
}
@@ -880,7 +880,7 @@ efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFor
} else {
if (strchr(location, ':') == NULL && ((EMFormat *)efh)->base != NULL) {
CamelURL *uri;
-
+
uri = camel_url_new_with_base(((EMFormat *)efh)->base, location);
cid = camel_url_to_string(uri, 0);
camel_url_free(uri);
@@ -918,7 +918,7 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
camel_stream_printf(stream, _("Malformed external-body part."));
return;
}
-
+
if (!g_ascii_strcasecmp(access_type, "ftp") ||
!g_ascii_strcasecmp(access_type, "anon-ftp")) {
const char *name, *site, *dir, *mode;
@@ -931,7 +931,7 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
mode = camel_content_type_param (type, "mode");
if (name == NULL || site == NULL)
goto fail;
-
+
/* Generate the path. */
if (dir)
path = g_strdup_printf("/%s/%s", *dir=='/'?dir+1:dir, name);
@@ -942,18 +942,18 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
sprintf(ftype, ";type=%c", *mode);
else
ftype[0] = 0;
-
+
url = g_strdup_printf ("ftp://%s%s%s", site, path, ftype);
g_free (path);
desc = g_strdup_printf (_("Pointer to FTP site (%s)"), url);
} else if (!g_ascii_strcasecmp (access_type, "local-file")) {
const char *name, *site;
-
+
name = camel_content_type_param (type, "name");
site = camel_content_type_param (type, "site");
if (name == NULL)
goto fail;
-
+
url = g_filename_to_uri (name, NULL, NULL);
if (site)
desc = g_strdup_printf(_("Pointer to local file (%s) valid at site \"%s\""), name, site);
@@ -962,13 +962,13 @@ efh_message_external(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part
} else if (!g_ascii_strcasecmp (access_type, "URL")) {
const char *urlparam;
char *s, *d;
-
+
/* RFC 2017 */
-
+
urlparam = camel_content_type_param (type, "url");
if (urlparam == NULL)
goto fail;
-
+
/* For obscure MIMEy reasons, the URL may be split into words */
url = g_strdup (urlparam);
s = d = url;
@@ -1075,8 +1075,8 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
em_format_format_source(emf, stream, part);
return;
}
-
- nparts = camel_multipart_get_number(mp);
+
+ nparts = camel_multipart_get_number(mp);
content_type = camel_mime_part_get_content_type(part);
start = camel_content_type_param (content_type, "start");
if (start && strlen(start)>2) {
@@ -1086,11 +1086,11 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
/* strip <>'s */
len = strlen (start) - 2;
start++;
-
+
for (i=0; i<nparts; i++) {
body_part = camel_multipart_get_part(mp, i);
cid = camel_mime_part_get_content_id(body_part);
-
+
if (cid && !strncmp(cid, start, len) && strlen(cid) == len) {
display_part = body_part;
displayid = i;
@@ -1100,12 +1100,12 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
} else {
display_part = camel_multipart_get_part(mp, 0);
}
-
+
if (display_part == NULL) {
em_format_part_as(emf, stream, part, "multipart/mixed");
return;
}
-
+
em_format_push_level(emf);
partidlen = emf->part_id->len;
@@ -1120,7 +1120,7 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
d(printf(" part '%s' '%s' added\n", puri->uri?puri->uri:"", puri->cid));
}
}
-
+
g_string_append_printf(emf->part_id, "related.%d", displayid);
em_format_part(emf, stream, display_part);
g_string_truncate(emf->part_id, partidlen);
@@ -1228,7 +1228,7 @@ static void efh_format_do(struct _mail_msg *mm)
int cancelled = FALSE;
CamelURL *base;
- if (m->format->html == NULL)
+ if (m->format->html == NULL)
return;
camel_stream_printf((CamelStream *)m->estream,
@@ -1401,7 +1401,7 @@ efh_format_timeout(struct _format_msg *m)
p->last_part = m->message;
}
-
+
efh->priv->format_id = m->msg.seq;
e_thread_put(mail_thread_new, (EMsg *)m);
}
@@ -1471,13 +1471,13 @@ efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const char *lab
{
char *mhtml = NULL;
const char *fmt, *html;
-
+
if (value == NULL)
return;
-
+
while (*value == ' ')
value++;
-
+
if (flags & EM_FORMAT_HTML_HEADER_HTML)
html = value;
else
@@ -1494,8 +1494,8 @@ efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const char *lab
} else if (flags & EM_FORMAT_HTML_HEADER_NODEC) {
fmt = "<tr><th align=\"right\" valign=\"top\" nowrap>%s<b>&nbsp;</b></th><td valign=top>%s</td></tr>";
} else {
-
- if (flags & EM_FORMAT_HEADER_BOLD)
+
+ if (flags & EM_FORMAT_HEADER_BOLD)
fmt = "<tr><th align=\"right\" valign=\"top\" nowrap>%s:<b>&nbsp;</b></th><td>%s</td></tr>";
else
fmt = "<tr><td align=\"right\" valign=\"top\" nowrap>%s:<b>&nbsp;</b></td><td>%s</td></tr>";
@@ -1528,18 +1528,18 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
|| (!strcmp (field, _("Bcc")) && !(efh->header_wrap_flags & EM_FORMAT_HTML_HEADER_BCC)))
wrap = TRUE;
}
-
+
while (a) {
if (a->name)
name = camel_text_to_html (a->name, flags, 0);
else
name = NULL;
-
+
switch (a->type) {
case CAMEL_HEADER_ADDRESS_NAME:
if (name && *name) {
char *real, *mailaddr;
-
+
g_string_append_printf (out, "%s &lt;", name);
/* rfc2368 for mailto syntax and url encoding extras */
if ((real = camel_header_encode_phrase ((unsigned char *)a->name))) {
@@ -1557,7 +1557,7 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
g_string_append_printf (out, "<a href=\"mailto:%s\">%s</a>", mailto, addr);
g_free (mailto);
g_free (addr);
-
+
if (name && *name)
g_string_append (out, "&gt;");
break;
@@ -1570,7 +1570,7 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
g_warning ("Invalid address type");
break;
}
-
+
g_free (name);
i++;
@@ -1580,12 +1580,12 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
/* Let us add a '...' if we have more addresses */
if (limit > 0 && wrap && a && (i>(limit-1))) {
-
+
if (!strcmp (field, _("To"))) {
-
+
g_string_append (out, "<a href=\"##TO##\">...</a>");
str = g_strdup_printf ("<a href=\"##TO##\"><img src=\"%s/plus.png\" /></a> ", EVOLUTION_ICONSDIR);
-
+
return str;
}
else if (!strcmp (field, _("Cc"))) {
@@ -1601,12 +1601,12 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
return str;
}
}
-
+
}
if (limit > 0 && i>(limit)) {
-
+
if (!strcmp (field, _("To"))) {
str = g_strdup_printf ("<a href=\"##TO##\"><img src=\"%s/minus.png\" /></a> ", EVOLUTION_ICONSDIR);
}
@@ -1619,7 +1619,7 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres
}
return str;
-
+
}
static void
@@ -1630,26 +1630,26 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
const char *label, *txt;
int addrspec = 0, i;
char *str_field = NULL;
-
+
name = alloca(strlen(header->name)+1);
strcpy(name, header->name);
camel_strdown(name);
-
+
for (i = 0; addrspec_hdrs[i]; i++) {
if (!strcmp(name, addrspec_hdrs[i])) {
addrspec = 1;
break;
}
}
-
+
if (addrspec) {
struct _camel_header_address *addrs;
GString *html;
char *img;
-
+
if (!(addrs = camel_header_address_decode(header->value, emf->charset ? emf->charset : emf->default_charset)))
return;
-
+
/* canonicalise the header name... first letter is
* capitalised and any letter following a '-' also gets
* capitalised */
@@ -1660,15 +1660,15 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
if (p[-1] == '-' && *p >= 'a' && *p <= 'z')
*p -= 0x20;
} while (*p);
-
+
label = _(name);
-
+
html = g_string_new("");
img = efh_format_address(efh, html, addrs, (char *)label);
-
+
if (img) {
// str_field = g_strdup_printf ("<table><tr><td valign=top>%s</td><td valign=top><b>%s:</b></td></tr></table>", img, label);
- str_field = g_strdup_printf ("%s%s:", img, label);
+ str_field = g_strdup_printf ("%s%s:", img, label);
label = str_field;
flags |= EM_FORMAT_HTML_HEADER_NODEC;
g_free (img);
@@ -1676,7 +1676,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
camel_header_address_unref(addrs);
txt = value = html->str;
g_string_free(html, FALSE);
-
+
flags |= EM_FORMAT_HEADER_BOLD | EM_FORMAT_HTML_HEADER_HTML;
} else if (!strcmp(name, "subject")) {
txt = value = camel_header_decode_string (header->value, charset);
@@ -1691,23 +1691,23 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
int msg_offset, local_tz;
time_t msg_date;
struct tm local;
-
+
txt = header->value;
while (*txt == ' ')
txt++;
-
+
/* Show the local timezone equivalent in brackets if the sender is remote */
msg_date = camel_header_decode_date(txt, &msg_offset);
e_localtime_with_offset(msg_date, &local, &local_tz);
-
+
/* Convert message offset to minutes (e.g. -0400 --> -240) */
msg_offset = ((msg_offset / 100) * 60) + (msg_offset % 100);
/* Turn into offset from localtime, not UTC */
msg_offset -= local_tz / 60;
-
+
if (msg_offset) {
char buf[256], *html;
-
+
msg_offset += (local.tm_hour * 60) + local.tm_min;
if (msg_offset >= (24 * 60) || msg_offset < 0) {
/* translators: strftime format for local time equivalent in Date header display, with day */
@@ -1720,18 +1720,18 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
e_utf8_strftime(buf, sizeof(buf), msg, &local);
g_free(msg);
}
-
+
html = camel_text_to_html(txt, efh->text_html_flags, 0);
txt = value = g_strdup_printf("%s %s", html, buf);
g_free(html);
flags |= EM_FORMAT_HTML_HEADER_HTML;
}
-
+
if (!strcmp(name, "date"))
label = _("Date");
else
label = "Resent-Date";
-
+
flags |= EM_FORMAT_HEADER_BOLD;
} else if (!strcmp(name, "newsgroups")) {
GString *html;
@@ -1751,7 +1751,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
}
camel_header_newsgroups_free(ng);
- label = _("Newsgroups");
+ label = _("Newsgroups");
txt = html->str;
g_string_free(html, FALSE);
flags |= EM_FORMAT_HEADER_BOLD|EM_FORMAT_HTML_HEADER_HTML;
@@ -1759,9 +1759,9 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct
txt = value = camel_header_decode_string(header->value, charset);
label = header->name;
}
-
+
efh_format_text_header(efh, stream, label, txt, flags);
-
+
g_free(value);
g_free (str_field);
}
@@ -1782,13 +1782,13 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
gsize face_header_len = 0;
char *header_sender = NULL, *header_from = NULL, *name;
gboolean mail_from_delegate = FALSE;
-
+
if (!part)
return;
ct = camel_mime_part_get_content_type((CamelMimePart *)part);
charset = camel_content_type_param (ct, "charset");
- charset = e_iconv_charset_name(charset);
+ charset = e_iconv_charset_name(charset);
if (!efh->simple_headers)
camel_stream_printf(stream,
@@ -1804,24 +1804,24 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
if (!(addrs = camel_header_address_decode(header->value, emf->charset ? emf->charset : emf->default_charset)))
return;
-
+
html = g_string_new("");
name = efh_format_address(efh, html, addrs, header->name);
header_sender= html->str;
camel_header_address_unref(addrs);
-
+
g_string_free(html, FALSE);
g_free (name);
}
-
+
if(!g_ascii_strcasecmp (header->name, "From")) {
struct _camel_header_address *addrs;
GString *html;
-
+
if (!(addrs = camel_header_address_decode(header->value, emf->charset ? emf->charset : emf->default_charset)))
return;
-
+
html = g_string_new("");
name = efh_format_address(efh, html, addrs, header->name);
@@ -1834,18 +1834,18 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
if (!g_ascii_strcasecmp (header->name, "X-Evolution-Mail-From-Delegate"))
mail_from_delegate = TRUE;
-
+
if (header_sender && header_from && mail_from_delegate) {
camel_stream_printf(stream, "<tr><td><table border=1 width=\"100%%\" cellspacing=2 cellpadding=2><tr>");
camel_stream_printf(stream, "<td align=\"left\" width=\"100%%\">");
/* To translators: This message suggests to the receipients that the sender of the mail is
different from the one listed in From field.
- */
+ */
camel_stream_printf(stream, _("This message was sent by <b>%s</b> on behalf of <b>%s</b>"), header_sender, header_from);
camel_stream_printf(stream, "</td></tr></table></td></tr>");
break;
}
-
+
header = header->next;
}
@@ -1869,21 +1869,21 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
header = ((CamelMimePart *)part)->headers;
mailer = !g_ascii_strcasecmp (h->name, "X-Evolution-Mailer");
-
+
while (header) {
if (emf->show_photo && !photo_name && !g_ascii_strcasecmp (header->name, "From"))
photo_name = header->value;
-
+
if (!mailer_shown && mailer && (!g_ascii_strcasecmp (header->name, "X-Mailer") ||
!g_ascii_strcasecmp (header->name, "User-Agent") ||
!g_ascii_strcasecmp (header->name, "X-Newsreader"))) {
struct _camel_header_raw xmailer;
-
+
xmailer.name = "X-Evolution-Mailer";
xmailer.value = header->value;
mailer_shown = TRUE;
-
+
efh_format_header (emf, stream, part, &xmailer, h->flags, charset);
if (strstr(header->value, "Evolution"))
have_icon = TRUE;
@@ -1906,14 +1906,14 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
h = h->next;
}
}
-
+
if (!efh->simple_headers) {
camel_stream_printf(stream, "</table></td>");
if (photo_name) {
char *classid;
CamelMimePart *photopart;
-
+
cia = camel_internet_address_new();
camel_address_decode((CamelAddress *) cia, (const char *) photo_name);
photopart = em_utils_contact_photo (cia, emf->photo_local);
@@ -1932,8 +1932,8 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part)
g_free(classid);
}
camel_object_unref(cia);
- }
-
+ }
+
if (!contact_has_photo && face_decoded) {
char *classid;
CamelMimePart *part;
@@ -1994,7 +1994,7 @@ static void efh_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart
handle = em_format_find_handler(emf, "x-evolution/message/post-header");
if (handle)
handle->handler(emf, stream, part, handle);
-
+
camel_stream_printf(stream, EM_FORMAT_HTML_VPAD);
em_format_part(emf, stream, part);
@@ -2019,11 +2019,11 @@ static void efh_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart
| CAMEL_MIME_FILTER_TOHTML_PRESERVE_8BIT, 0);
camel_stream_filter_add(filtered_stream, html_filter);
camel_object_unref(html_filter);
-
+
camel_stream_write_string((CamelStream *)stream, EFH_TABLE_OPEN "<tr><td><tt>");
em_format_format_text(emf, (CamelStream *)filtered_stream, dw);
camel_object_unref(filtered_stream);
-
+
camel_stream_write_string(stream, "</tt></td></tr></table>");
}
diff --git a/mail/em-format-html.h b/mail/em-format-html.h
index 025bb9893f..d0a6655dc3 100644
--- a/mail/em-format-html.h
+++ b/mail/em-format-html.h
@@ -57,7 +57,7 @@ typedef struct _EMFormatHTMLJob EMFormatHTMLJob;
/**
* struct _EMFormatHTMLJob - A formatting job.
- *
+ *
* @next: Double linked list header.
* @prev: Double linked list header.
* @format: Set by allocation function.
@@ -68,7 +68,7 @@ typedef struct _EMFormatHTMLJob EMFormatHTMLJob;
* cancelled the display. So the callback should free any extra data
* it allocated every time it is called.
* @u: Union data, free for caller to use.
- *
+ *
* This object is used to queue a long-running-task which cannot be
* processed in the primary thread. When its turn comes, the job will
* be de-queued and the @callback invoked to perform its processing,
@@ -107,7 +107,7 @@ typedef gboolean (*EMFormatHTMLPObjectFunc)(EMFormatHTML *md, struct _GtkHTMLEmb
/**
* struct _EMFormatHTMLPObject - Pending object.
- *
+ *
* @next: Double linked list header.
* @prev: Double linked list header.
* @free: Invoked when the object is no longer needed.
@@ -115,7 +115,7 @@ typedef gboolean (*EMFormatHTMLPObjectFunc)(EMFormatHTML *md, struct _GtkHTMLEmb
* @classid: The assigned class id as passed to add_pobject().
* @func: Callback function.
* @part: The part as passed to add_pobject().
- *
+ *
* This structure is used to track OBJECT tags which have been
* inserted into the HTML stream. When GtkHTML requests them the
* @func will be invoked to create the embedded widget.
@@ -145,25 +145,25 @@ struct _EMFormatHTMLPObject {
/**
* struct _EMFormatHTML - HTML formatter object.
- *
- * @format:
- * @priv:
- * @html:
- * @pending_object_list:
- * @headers:
- * @text_html_flags:
- * @body_colour:
- * @text_colour:
- * @frame_colour:
- * @content_colour:
- * @citation_colour:
- * @load_http:2:
- * @load_http_now:1:
- * @mark_citations:1:
- * @simple_headers:1:
- * @hide_headers:1:
- * @show_icon:1:
- *
+ *
+ * @format:
+ * @priv:
+ * @html:
+ * @pending_object_list:
+ * @headers:
+ * @text_html_flags:
+ * @body_colour:
+ * @text_colour:
+ * @frame_colour:
+ * @content_colour:
+ * @citation_colour:
+ * @load_http:2:
+ * @load_http_now:1:
+ * @mark_citations:1:
+ * @simple_headers:1:
+ * @hide_headers:1:
+ * @show_icon:1:
+ *
* Most of these fields are private or read-only.
*
* The base HTML formatter object. This object drives HTML generation
@@ -193,12 +193,12 @@ struct _EMFormatHTML {
unsigned int simple_headers:1; /* simple header format, no box/table */
unsigned int hide_headers:1; /* no headers at all */
unsigned int show_icon:1; /* show an icon when the sender used Evo */
- guint32 header_wrap_flags;
+ guint32 header_wrap_flags;
};
struct _EMFormatHTMLClass {
EMFormatClass format_class;
-
+
};
GType em_format_html_get_type(void);
diff --git a/mail/em-format-quote.c b/mail/em-format-quote.c
index e92147304e..69626b951a 100644
--- a/mail/em-format-quote.c
+++ b/mail/em-format-quote.c
@@ -56,11 +56,11 @@ static EMFormatClass *emfq_parent;
static void
emfq_init(GObject *o)
-{
+{
EMFormatQuote *emfq =(EMFormatQuote *) o;
-
+
emfq->priv = g_malloc0(sizeof(*emfq->priv));
-
+
/* we want to convert url's etc */
emfq->text_html_flags = CAMEL_MIME_FILTER_TOHTML_PRE | CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS
| CAMEL_MIME_FILTER_TOHTML_CONVERT_ADDRESSES;
@@ -75,7 +75,7 @@ emfq_finalise(GObject *o)
camel_object_unref(emfq->stream);
g_free(emfq->credits);
g_free(emfq->priv);
-
+
((GObjectClass *) emfq_parent)->finalize(o);
}
@@ -92,7 +92,7 @@ emfq_class_init(GObjectClass *klass)
((EMFormatClass *) klass)->format_error = emfq_format_error;
((EMFormatClass *) klass)->format_source = emfq_format_source;
((EMFormatClass *) klass)->format_attachment = emfq_format_attachment;
-
+
klass->finalize = emfq_finalise;
}
@@ -100,7 +100,7 @@ GType
em_format_quote_get_type(void)
{
static GType type = 0;
-
+
if (type == 0) {
static const GTypeInfo info = {
sizeof(EMFormatQuoteClass),
@@ -110,11 +110,11 @@ em_format_quote_get_type(void)
sizeof(EMFormatQuote), 0,
(GInstanceInitFunc) emfq_init
};
-
+
emfq_parent = g_type_class_ref(em_format_get_type());
type = g_type_register_static(em_format_get_type(), "EMFormatQuote", &info, 0);
}
-
+
return type;
}
@@ -122,14 +122,14 @@ EMFormatQuote *
em_format_quote_new(const char *credits, CamelStream *stream, guint32 flags)
{
EMFormatQuote *emfq;
-
+
emfq = (EMFormatQuote *)g_object_new(em_format_quote_get_type(), NULL);
emfq->credits = g_strdup(credits);
emfq->stream = stream;
camel_object_ref(stream);
emfq->flags = flags;
-
+
return emfq;
}
@@ -155,7 +155,7 @@ emfq_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMime
handle->handler(emf, emfq->stream, (CamelMimePart *)msg, handle);
handle = em_format_find_handler(emf, "x-evolution/message/rfc822");
if (handle)
- handle->handler(emf, emfq->stream, (CamelMimePart *)msg, handle);
+ handle->handler(emf, emfq->stream, (CamelMimePart *)msg, handle);
camel_stream_flush(emfq->stream);
@@ -173,23 +173,23 @@ emfq_format_text_header (EMFormatQuote *emfq, CamelStream *stream, const char *l
{
const char *fmt, *html;
char *mhtml = NULL;
-
+
if (value == NULL)
return;
-
+
while (*value == ' ')
value++;
-
+
if (!is_html)
html = mhtml = camel_text_to_html (value, 0, 0);
else
html = value;
-
+
if (flags & EM_FORMAT_HEADER_BOLD)
fmt = "<b>%s</b>: %s<br>";
else
fmt = "%s: %s<br>";
-
+
camel_stream_printf (stream, fmt, label, html);
g_free (mhtml);
}
@@ -213,18 +213,18 @@ emfq_format_address (GString *out, struct _camel_header_address *a)
{
guint32 flags = CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES;
char *name, *mailto, *addr;
-
+
while (a) {
if (a->name)
name = camel_text_to_html (a->name, flags, 0);
else
name = NULL;
-
+
switch (a->type) {
case CAMEL_HEADER_ADDRESS_NAME:
if (name && *name) {
char *real, *mailaddr;
-
+
g_string_append_printf (out, "%s &lt;", name);
/* rfc2368 for mailto syntax and url encoding extras */
if ((real = camel_header_encode_phrase ((unsigned char *)a->name))) {
@@ -242,7 +242,7 @@ emfq_format_address (GString *out, struct _camel_header_address *a)
g_string_append_printf (out, "<a href=\"mailto:%s\">%s</a>", mailto, addr);
g_free (mailto);
g_free (addr);
-
+
if (name && *name)
g_string_append (out, "&gt;");
break;
@@ -255,9 +255,9 @@ emfq_format_address (GString *out, struct _camel_header_address *a)
g_warning ("Invalid address type");
break;
}
-
+
g_free (name);
-
+
a = a->next;
if (a)
g_string_append (out, ", ");
@@ -273,28 +273,28 @@ emfq_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, const
const char *txt, *label;
int addrspec = 0, i;
int is_html = FALSE;
-
+
name = g_alloca (strlen (namein) + 1);
strcpy (name, namein);
camel_strdown (name);
-
+
for (i = 0; addrspec_hdrs[i]; i++) {
if (!strcmp (name, addrspec_hdrs[i])) {
addrspec = 1;
break;
}
}
-
+
if (addrspec) {
struct _camel_header_address *addrs;
GString *html;
-
+
if (!(txt = camel_medium_get_header (part, name)))
return;
-
+
if (!(addrs = camel_header_address_decode (txt, emf->charset ? emf->charset : emf->default_charset)))
return;
-
+
/* canonicalise the header name... first letter is
* capitalised and any letter following a '-' also gets
* capitalised */
@@ -305,9 +305,9 @@ emfq_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, const
if (p[-1] == '-' && *p >= 'a' && *p <= 'z')
*p -= 0x20;
} while (*p);
-
+
label = _(name);
-
+
html = g_string_new ("");
emfq_format_address (html, addrs);
camel_header_address_unref (addrs);
@@ -323,20 +323,20 @@ emfq_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, const
if (!(txt = camel_medium_get_header (part, "x-mailer")))
if (!(txt = camel_medium_get_header (part, "user-agent")))
return;
-
+
txt = value = camel_header_format_ctext (txt, charset);
-
+
label = _("Mailer");
flags |= EM_FORMAT_HEADER_BOLD;
} else if (!strcmp (name, "date") || !strcmp (name, "resent-date")) {
if (!(txt = camel_medium_get_header (part, name)))
return;
-
+
if (!strcmp (name, "date"))
label = _("Date");
else
label = "Resent-Date";
-
+
flags |= EM_FORMAT_HEADER_BOLD;
} else {
txt = camel_medium_get_header (part, name);
@@ -344,9 +344,9 @@ emfq_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, const
txt = value;
label = namein;
}
-
+
emfq_format_text_header (emfq, stream, label, txt, flags, is_html);
-
+
g_free (value);
}
@@ -357,14 +357,14 @@ emfq_format_headers (EMFormatQuote *emfq, CamelStream *stream, CamelMedium *part
CamelContentType *ct;
const char *charset;
EMFormatHeader *h;
-
+
if (!part)
return;
ct = camel_mime_part_get_content_type ((CamelMimePart *) part);
charset = camel_content_type_param (ct, "charset");
- charset = e_iconv_charset_name (charset);
-
+ charset = e_iconv_charset_name (charset);
+
/* dump selected headers */
h = (EMFormatHeader *) emf->header_list.head;
while (h->next) {
@@ -400,9 +400,9 @@ emfq_format_message(EMFormat *emf, CamelStream *stream, CamelMimePart *part, con
emfq_format_headers (emfq, stream, (CamelMedium *)part);
} else if (emfq->flags & EM_FORMAT_QUOTE_HEADERS)
emfq_format_headers (emfq, stream, (CamelMedium *)part);
-
+
em_format_part (emf, stream, part);
-
+
if (emfq->flags & EM_FORMAT_QUOTE_CITE)
camel_stream_write_string(stream, "</blockquote></font><!--+GtkHTML:<DATA class=\"ClueFlow\" clear=\"orig\">-->");
}
@@ -419,7 +419,7 @@ emfq_format_source(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
| CAMEL_MIME_FILTER_TOHTML_ESCAPE_8BIT, 0);
camel_stream_filter_add(filtered_stream, html_filter);
camel_object_unref(html_filter);
-
+
em_format_format_text(emf, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
camel_object_unref(filtered_stream);
}
@@ -465,26 +465,26 @@ emfq_text_plain(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part, E
return;
flags = emfq->text_html_flags;
-
+
/* Check for RFC 2646 flowed text. */
type = camel_mime_part_get_content_type(part);
if (camel_content_type_is(type, "text", "plain")
&& (format = camel_content_type_param(type, "format"))
&& !g_ascii_strcasecmp(format, "flowed"))
flags |= CAMEL_MIME_FILTER_TOHTML_FORMAT_FLOWED;
-
+
filtered_stream = camel_stream_filter_new_with_stream(stream);
-
+
if (emfq->flags != 0) {
sig_strip = em_stripsig_filter_new ();
camel_stream_filter_add (filtered_stream, sig_strip);
camel_object_unref (sig_strip);
}
-
+
html_filter = camel_mime_filter_tohtml_new(flags, rgb);
camel_stream_filter_add(filtered_stream, html_filter);
camel_object_unref(html_filter);
-
+
em_format_format_text((EMFormat *)emfq, (CamelStream *)filtered_stream, (CamelDataWrapper *)part);
camel_stream_flush((CamelStream *)filtered_stream);
camel_object_unref(filtered_stream);
@@ -497,16 +497,16 @@ emfq_text_enriched(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part
CamelMimeFilter *enriched;
CamelDataWrapper *dw;
guint32 flags = 0;
-
+
dw = camel_medium_get_content_object((CamelMedium *)part);
-
+
if (!strcmp(info->mime_type, "text/richtext")) {
flags = CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT;
camel_stream_write_string(stream, "\n<!-- text/richtext -->\n");
} else {
camel_stream_write_string(stream, "\n<!-- text/enriched -->\n");
}
-
+
enriched = camel_mime_filter_enriched_new(flags);
filtered_stream = camel_stream_filter_new_with_stream (stream);
camel_stream_filter_add(filtered_stream, enriched);
@@ -548,7 +548,7 @@ static void
emfq_builtin_init(EMFormatQuoteClass *efhc)
{
int i;
-
+
for (i=0;i<sizeof(type_builtin_table)/sizeof(type_builtin_table[0]);i++)
em_format_class_add_handler((EMFormatClass *)efhc, &type_builtin_table[i]);
}
diff --git a/mail/em-format.c b/mail/em-format.c
index 5bedde4007..36177d7991 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -56,7 +56,7 @@
#include "em-utils.h"
#include "mail-config.h"
-#define d(x)
+#define d(x)
/* Used to cache various data/info for redraws
The validity stuff could be cached at a higher level but this is easier
@@ -116,7 +116,7 @@ static void
emf_init(GObject *o)
{
EMFormat *emf = (EMFormat *)o;
-
+
emf->inline_table = g_hash_table_new_full (
g_str_hash, g_str_equal,
(GDestroyNotify) NULL,
@@ -133,7 +133,7 @@ static void
emf_finalise(GObject *o)
{
EMFormat *emf = (EMFormat *)o;
-
+
if (emf->session)
camel_object_unref(emf->session);
@@ -146,7 +146,7 @@ emf_finalise(GObject *o)
g_string_free(emf->part_id, TRUE);
/* FIXME: check pending jobs */
-
+
((GObjectClass *)emf_parent)->finalize(o);
}
@@ -204,7 +204,7 @@ em_format_get_type(void)
* em_format_class_add_handler:
* @emfc: EMFormatClass
* @info: Callback information.
- *
+ *
* Add a mime type handler to this class. This is only used by
* implementing classes. The @info.old pointer will automatically be
* setup to point to the old hanlder if one was already set. This can
@@ -227,13 +227,13 @@ em_format_class_add_handler(EMFormatClass *emfc, EMFormatHandler *info)
struct _class_handlers {
EMFormatClass *old;
EMFormatClass *new;
-};
+};
static void
merge_missing (gpointer key, gpointer value, gpointer userdata)
{
struct _class_handlers *classes = (struct _class_handlers *) userdata;
EMFormatHandler *info, *oldinfo;
-
+
oldinfo = (EMFormatHandler *) value;
info = g_hash_table_lookup (classes->new->type_handlers, key);
if (!info) {
@@ -258,9 +258,9 @@ em_format_merge_handler(EMFormat *new, EMFormat *old)
}
/**
* em_format_class_remove_handler:
- * @emfc:
- * @info:
- *
+ * @emfc:
+ * @info:
+ *
* Remove a handler. @info must be a value which was previously
* added.
**/
@@ -288,11 +288,11 @@ em_format_class_remove_handler(EMFormatClass *emfc, EMFormatHandler *info)
/**
* em_format_find_handler:
- * @emf:
- * @mime_type:
- *
+ * @emf:
+ * @mime_type:
+ *
* Find a format handler by @mime_type.
- *
+ *
* Return value: NULL if no handler is available.
**/
static const EMFormatHandler *
@@ -305,14 +305,14 @@ emf_find_handler(EMFormat *emf, const char *mime_type)
/**
* em_format_fallback_handler:
- * @emf:
- * @mime_type:
- *
+ * @emf:
+ * @mime_type:
+ *
* Try to find a format handler based on the major type of the @mime_type.
*
* The subtype is replaced with "*" and a lookup performed.
- *
- * Return value:
+ *
+ * Return value:
**/
const EMFormatHandler *
em_format_fallback_handler(EMFormat *emf, const char *mime_type)
@@ -335,18 +335,18 @@ em_format_fallback_handler(EMFormat *emf, const char *mime_type)
/**
* em_format_add_puri:
- * @emf:
- * @size:
+ * @emf:
+ * @size:
* @cid: Override the autogenerated content id.
- * @part:
- * @func:
- *
+ * @part:
+ * @func:
+ *
* Add a pending-uri handler. When formatting parts that reference
* other parts, a pending-uri (PURI) can be used to track the reference.
*
* @size is used to allocate the structure, so that it can be directly
* subclassed by implementors.
- *
+ *
* @cid can be used to override the key used to retreive the PURI, if NULL,
* then the content-location and the content-id of the @part are stored
* as lookup keys for the part.
@@ -427,8 +427,8 @@ em_format_add_puri(EMFormat *emf, size_t size, const char *cid, CamelMimePart *p
/**
* em_format_push_level:
- * @emf:
- *
+ * @emf:
+ *
* This is used to build a heirarchy of visible PURI objects based on
* the structure of the message. Used by multipart/alternative formatter.
*
@@ -455,8 +455,8 @@ em_format_push_level(EMFormat *emf)
/**
* em_format_pull_level:
- * @emf:
- *
+ * @emf:
+ *
* Drop a level of visibility back to the parent. Note that
* no PURI values are actually freed.
**/
@@ -469,13 +469,13 @@ em_format_pull_level(EMFormat *emf)
/**
* em_format_find_visible_puri:
- * @emf:
- * @uri:
- *
+ * @emf:
+ * @uri:
+ *
* Search for a PURI based on the visibility defined by :push_level()
* and :pull_level().
- *
- * Return value:
+ *
+ * Return value:
**/
EMFormatPURI *
em_format_find_visible_puri(EMFormat *emf, const char *uri)
@@ -502,13 +502,13 @@ em_format_find_visible_puri(EMFormat *emf, const char *uri)
/**
* em_format_find_puri:
- * @emf:
- * @uri:
- *
+ * @emf:
+ * @uri:
+ *
* Search for a PURI based on a uri. Both the content-id
* and content-location are checked.
- *
- * Return value:
+ *
+ * Return value:
**/
EMFormatPURI *
@@ -559,8 +559,8 @@ emf_clear_puri_node(struct _EMFormatPURITree *node)
/**
* em_format_clear_puri_tree:
- * @emf:
- *
+ * @emf:
+ *
* For use by implementors to clear out the message structure
* data.
**/
@@ -687,7 +687,7 @@ emf_format_clone(EMFormat *emf, CamelFolder *folder, const char *uid, CamelMimeM
emf->charset = g_strdup(emfsource->charset);
g_free (emf->default_charset);
emf->default_charset = g_strdup (emfsource->default_charset);
-
+
em_format_clear_headers(emf);
for (h = (struct _EMFormatHeader *)emfsource->header_list.head; h->next; h = h->next)
em_format_add_header(emf, h->name, h->flags);
@@ -765,7 +765,7 @@ emf_busy(EMFormat *emf)
* @msg: Camel Message.
* @emfsource: Used as a basis for user-altered layout, e.g. inline viewed
* attachments.
- *
+ *
* Format a message @msg. If @emfsource is non NULL, then the status of
* inlined expansion and so forth is copied direction from @emfsource.
*
@@ -777,9 +777,9 @@ emf_busy(EMFormat *emf)
/**
* em_format_set_session:
- * @emf:
- * @s:
- *
+ * @emf:
+ * @s:
+ *
* Set the CamelSession to be used for signature verification and decryption
* purposes. If this is not set, then signatures cannot be verified or
* encrypted messages viewed.
@@ -796,9 +796,9 @@ em_format_set_session(EMFormat *emf, struct _CamelSession *s)
/**
* em_format_set_mode:
- * @emf:
- * @type:
- *
+ * @emf:
+ * @type:
+ *
* Set display mode, EM_FORMAT_SOURCE, EM_FORMAT_ALLHEADERS, or
* EM_FORMAT_NORMAL.
**/
@@ -817,9 +817,9 @@ em_format_set_mode(EMFormat *emf, em_format_mode_t type)
/**
* em_format_set_charset:
- * @emf:
- * @charset:
- *
+ * @emf:
+ * @charset:
+ *
* set override charset on formatter. message will be redisplayed if
* required.
**/
@@ -840,9 +840,9 @@ em_format_set_charset(EMFormat *emf, const char *charset)
/**
* em_format_set_default_charset:
- * @emf:
- * @charset:
- *
+ * @emf:
+ * @charset:
+ *
* Set the fallback, default system charset to use when no other charsets
* are present. Message will be redisplayed if required (and sometimes redisplayed
* when it isn't).
@@ -864,8 +864,8 @@ em_format_set_default_charset(EMFormat *emf, const char *charset)
/**
* em_format_clear_headers:
- * @emf:
- *
+ * @emf:
+ *
* Clear the list of headers to be displayed. This will force all headers to
* be shown.
**/
@@ -895,8 +895,8 @@ static const struct {
/**
* em_format_default_headers:
- * @emf:
- *
+ * @emf:
+ *
* Set the headers to show to the default list.
*
* From, Reply-To, To, Cc, Bcc, Subject and Date.
@@ -905,7 +905,7 @@ void
em_format_default_headers(EMFormat *emf)
{
int i;
-
+
em_format_clear_headers(emf);
for (i=0; i<sizeof(default_headers)/sizeof(default_headers[0]); i++)
em_format_add_header(emf, default_headers[i].name, default_headers[i].flags);
@@ -913,10 +913,10 @@ em_format_default_headers(EMFormat *emf)
/**
* em_format_add_header:
- * @emf:
+ * @emf:
* @name: The name of the header, as it will appear during output.
* @flags: EM_FORMAT_HEAD_* defines to control display attributes.
- *
+ *
* Add a specific header to show. If any headers are set, they will
* be displayed in the order set by this function. Certain known
* headers included in this list will be shown using special
@@ -934,9 +934,9 @@ void em_format_add_header(EMFormat *emf, const char *name, guint32 flags)
/**
* em_format_is_attachment:
- * @emf:
+ * @emf:
* @part: Part to check.
- *
+ *
* Returns true if the part is an attachment.
*
* A part is not considered an attachment if it is a
@@ -945,7 +945,7 @@ void em_format_add_header(EMFormat *emf, const char *name, guint32 flags)
* the part.
*
* Content-Disposition is not checked.
- *
+ *
* Return value: TRUE/FALSE
**/
int em_format_is_attachment(EMFormat *emf, CamelMimePart *part)
@@ -958,26 +958,26 @@ int em_format_is_attachment(EMFormat *emf, CamelMimePart *part)
|| camel_content_type_is(dw->mime_type, "application", "x-pkcs7-mime")
|| camel_content_type_is(dw->mime_type, "application", "pkcs7-mime")
|| camel_content_type_is(dw->mime_type, "application", "x-inlinepgp-signed")
- || camel_content_type_is(dw->mime_type, "application", "x-inlinepgp-encrypted")
+ || camel_content_type_is(dw->mime_type, "application", "x-inlinepgp-encrypted")
|| (camel_content_type_is (dw->mime_type, "text", "*")
&& camel_mime_part_get_filename(part) == NULL));
}
/**
* em_format_is_inline:
- * @emf:
- * @part:
+ * @emf:
+ * @part:
* @partid: format->part_id part id of this part.
* @handle: handler for this part
- *
+ *
* Returns true if the part should be displayed inline. Any part with
* a Content-Disposition of inline, or if the @handle has a default
* inline set, will be shown inline.
*
* :set_inline() called on the same part will override any calculated
* value.
- *
- * Return value:
+ *
+ * Return value:
**/
int em_format_is_inline(EMFormat *emf, const char *partid, CamelMimePart *part, const EMFormatHandler *handle)
{
@@ -1005,10 +1005,10 @@ int em_format_is_inline(EMFormat *emf, const char *partid, CamelMimePart *part,
/**
* em_format_set_inline:
- * @emf:
+ * @emf:
* @partid: id of part
- * @state:
- *
+ * @state:
+ *
* Force the attachment @part to be expanded or hidden explictly to match
* @state. This is used only to record the change for a redraw or
* cloned layout render and does not force a redraw.
@@ -1065,10 +1065,10 @@ em_format_format_content(EMFormat *emf, CamelStream *stream, CamelMimePart *part
/**
* em_format_format_content:
- * @emf:
+ * @emf:
* @stream: Where to write the converted text
* @part: Part whose container is to be formatted
- *
+ *
* Decode/output a part's content to @stream.
**/
void
@@ -1081,7 +1081,7 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
CamelStream *mem_stream = NULL;
size_t size;
size_t max;
-
+
if (emf->charset) {
charset = emf->charset;
} else if (dw->mime_type
@@ -1097,14 +1097,14 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
null = camel_stream_null_new();
filter_stream = camel_stream_filter_new_with_stream(null);
camel_object_unref(null);
-
+
windows = (CamelMimeFilterWindows *)camel_mime_filter_windows_new(charset);
camel_stream_filter_add(filter_stream, (CamelMimeFilter *)windows);
-
+
camel_data_wrapper_decode_to_stream(dw, (CamelStream *)filter_stream);
camel_stream_flush((CamelStream *)filter_stream);
camel_object_unref(filter_stream);
-
+
charset = camel_mime_filter_windows_real_charset (windows);
} else if (charset == NULL) {
charset = emf->default_charset;
@@ -1112,7 +1112,7 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
mem_stream = (CamelStream *)camel_stream_mem_new ();
filter_stream = camel_stream_filter_new_with_stream(mem_stream);
-
+
if ((filter = camel_mime_filter_charset_new_convert(charset, "UTF-8"))) {
camel_stream_filter_add(filter_stream, (CamelMimeFilter *) filter);
camel_object_unref(filter);
@@ -1137,13 +1137,13 @@ em_format_format_text(EMFormat *emf, CamelStream *stream, CamelDataWrapper *dw)
/**
* em_format_describe_part:
- * @part:
- * @mimetype:
- *
+ * @part:
+ * @mimetype:
+ *
* Generate a simple textual description of a part, @mime_type represents the
* the content.
- *
- * Return value:
+ *
+ * Return value:
**/
char *
em_format_describe_part(CamelMimePart *part, const char *mime_type)
@@ -1249,7 +1249,7 @@ emf_multipart_mixed(EMFormat *emf, CamelStream *stream, CamelMimePart *part, con
}
len = emf->part_id->len;
- nparts = camel_multipart_get_number(mp);
+ nparts = camel_multipart_get_number(mp);
for (i = 0; i < nparts; i++) {
part = camel_multipart_get_part(mp, i);
g_string_append_printf(emf->part_id, ".mixed.%d", i);
@@ -1285,7 +1285,7 @@ emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *par
type = camel_mime_part_get_content_type (part);
mime_type = camel_content_type_simple (type);
-
+
camel_strdown (mime_type);
/*if (want_plain && !strcmp (mime_type, "text/plain"))
@@ -1394,7 +1394,7 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
}
/* FIXME: put this stuff in a shared function */
- nparts = camel_multipart_get_number(mp);
+ nparts = camel_multipart_get_number(mp);
content_type = camel_mime_part_get_content_type(part);
start = camel_content_type_param (content_type, "start");
if (start && strlen(start)>2) {
@@ -1404,11 +1404,11 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
/* strip <>'s */
len = strlen (start) - 2;
start++;
-
+
for (i=0; i<nparts; i++) {
body_part = camel_multipart_get_part(mp, i);
cid = camel_mime_part_get_content_id(body_part);
-
+
if (cid && !strncmp(cid, start, len) && strlen(cid) == len) {
display_part = body_part;
displayid = i;
@@ -1418,12 +1418,12 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
} else {
display_part = camel_multipart_get_part(mp, 0);
}
-
+
if (display_part == NULL) {
emf_multipart_mixed(emf, stream, part, info);
return;
}
-
+
em_format_push_level(emf);
oldpartid = g_strdup(emf->part_id->str);
@@ -1440,7 +1440,7 @@ emf_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
d(printf(" part '%s' '%s' added\n", puri->uri?puri->uri:"", puri->cid));
}
}
-
+
g_string_append_printf(emf->part_id, ".related.%d", displayid);
em_format_part(emf, stream, display_part);
g_string_truncate(emf->part_id, partidlen);
@@ -1550,7 +1550,7 @@ emf_message_rfc822(EMFormat *emf, CamelStream *stream, CamelMimePart *part, cons
handle = em_format_find_handler(emf, "x-evolution/message/rfc822");
if (handle)
handle->handler(emf, stream, (CamelMimePart *)dw, handle);
-
+
g_string_truncate(emf->part_id, len);
}
@@ -1593,67 +1593,67 @@ emf_inlinepgp_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart, E
camel_object_unref(cipher);
return;
}
-
+
/* Setup output stream */
ostream = camel_stream_mem_new();
filtered_stream = camel_stream_filter_new_with_stream(ostream);
-
+
/* Add PGP header / footer filter */
pgp_filter = (CamelMimeFilterPgp *)camel_mime_filter_pgp_new();
camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)pgp_filter);
camel_object_unref(pgp_filter);
-
+
/* Pass through the filters that have been setup */
dw = camel_medium_get_content_object((CamelMedium *)ipart);
camel_data_wrapper_decode_to_stream(dw, (CamelStream *)filtered_stream);
camel_stream_flush((CamelStream *)filtered_stream);
camel_object_unref(filtered_stream);
-
+
/* Create a new text/plain MIME part containing the signed content preserving the original part's Content-Type params */
content_type = camel_mime_part_get_content_type (ipart);
type = camel_content_type_format (content_type);
content_type = camel_content_type_decode (type);
g_free (type);
-
+
g_free (content_type->type);
content_type->type = g_strdup ("text");
g_free (content_type->subtype);
content_type->subtype = g_strdup ("plain");
type = camel_content_type_format (content_type);
camel_content_type_unref (content_type);
-
+
dw = camel_data_wrapper_new ();
camel_data_wrapper_construct_from_stream (dw, ostream);
camel_data_wrapper_set_mime_type (dw, type);
-
+
opart = camel_mime_part_new ();
camel_medium_set_content_object ((CamelMedium *) opart, dw);
camel_data_wrapper_set_mime_type_field ((CamelDataWrapper *) opart, dw->mime_type);
-
- /* Pass it off to the real formatter */
+
+ /* Pass it off to the real formatter */
em_format_format_secure(emf, stream, opart, valid);
-
+
/* Clean Up */
camel_object_unref(dw);
camel_object_unref(opart);
camel_object_unref(ostream);
camel_object_unref(cipher);
- camel_exception_free(ex);
+ camel_exception_free(ex);
}
static void
emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart, EMFormatHandler *info)
-{
+{
CamelCipherContext *cipher;
CamelCipherValidity *valid;
CamelException *ex;
CamelMimePart *opart;
-
+
cipher = camel_gpg_context_new(emf->session);
ex = camel_exception_new();
opart = camel_mime_part_new();
/* Decrypt the message */
- valid = camel_cipher_decrypt (cipher, ipart, opart, ex);
+ valid = camel_cipher_decrypt (cipher, ipart, opart, ex);
if (!valid) {
em_format_format_error(emf, stream, ex->desc?_("Could not parse PGP message"):_("Could not parse PGP message: Unknown error"));
if (ex->desc)
@@ -1666,7 +1666,7 @@ emf_inlinepgp_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *ipart
return;
}
- /* Pass it off to the real formatter */
+ /* Pass it off to the real formatter */
em_format_format_secure(emf, stream, opart, valid);
/* Clean Up */
diff --git a/mail/em-format.h b/mail/em-format.h
index 81f4b5c508..6dba5f8b05 100644
--- a/mail/em-format.h
+++ b/mail/em-format.h
@@ -55,13 +55,13 @@ typedef enum _em_format_mode_t {
/**
* struct _EMFormatHandler - MIME type handler.
- *
+ *
* @mime_type: Type this handler handles.
* @handler: The handler callback.
* @flags: Handling flags, see enum _em_format_handler_t.
* @old: The last handler set on this type. Allows overrides to
* fallback to previous implementation.
- *
+ *
**/
struct _EMFormatHandler {
char *mime_type;
@@ -73,12 +73,12 @@ struct _EMFormatHandler {
/**
* enum _em_format_handler_t - Format handler flags.
- *
+ *
* @EM_FORMAT_HANDLER_INLINE: This type should be shown expanded
* inline by default.
* @EM_FORMAT_HANDLER_INLINE_DISPOSITION: This type should always be
* shown inline, despite what the Content-Disposition suggests.
- *
+ *
**/
enum _em_format_handler_t {
EM_FORMAT_HANDLER_INLINE = 1<<0,
@@ -91,11 +91,11 @@ typedef void (*EMFormatPURIFunc)(EMFormat *md, struct _CamelStream *stream, EMFo
/**
* struct _EMFormatPURI - Pending URI object.
- *
+ *
* @next: Double-linked list header.
* @prev: Double-linked list header.
* @free: May be set by allocator and will be called when no longer needed.
- * @format:
+ * @format:
* @uri: Calculated URI of the part, if the part has one in its
* Content-Location field.
* @cid: The RFC2046 Content-Id of the part. If none is present, a unique value
@@ -103,9 +103,9 @@ typedef void (*EMFormatPURIFunc)(EMFormat *md, struct _CamelStream *stream, EMFo
* @part_id: A unique identifier for each part.
* @func: Callback for when the URI is requested. The callback writes
* its data to the supplied stream.
- * @part:
- * @use_count:
- *
+ * @part:
+ * @use_count:
+ *
* This is used for multipart/related, and other formatters which may
* need to include a reference to out-of-band data in the content
* stream.
@@ -131,7 +131,7 @@ struct _EMFormatPURI {
/**
* struct _EMFormatPURITree - Pending URI visibility tree.
- *
+ *
* @next: Double-linked list header.
* @prev: Double-linked list header.
* @parent: Parent in tree.
@@ -163,27 +163,27 @@ struct _EMFormatHeader {
/**
* struct _EMFormat - Mail formatter object.
- *
- * @parent:
- * @priv:
- * @message:
- * @folder:
- * @uid:
- * @part_id:
- * @header_list:
- * @session:
- * @base url:
- * @snoop_mime_type:
- * @valid:
- * @valid_parent:
- * @inline_table:
- * @pending_uri_table:
- * @pending_uri_tree:
- * @pending_uri_level:
- * @mode:
- * @charset:
- * @default_charset:
- *
+ *
+ * @parent:
+ * @priv:
+ * @message:
+ * @folder:
+ * @uid:
+ * @part_id:
+ * @header_list:
+ * @session:
+ * @base url:
+ * @snoop_mime_type:
+ * @valid:
+ * @valid_parent:
+ * @inline_table:
+ * @pending_uri_table:
+ * @pending_uri_tree:
+ * @pending_uri_level:
+ * @mode:
+ * @charset:
+ * @default_charset:
+ *
* Most fields are private or read-only.
*
* This is the base MIME formatter class. It provides no formatting
@@ -191,9 +191,9 @@ struct _EMFormatHeader {
**/
struct _EMFormat {
GObject parent;
-
+
struct _EMFormatPrivate *priv;
-
+
struct _CamelMimeMessage *message; /* the current message */
struct _CamelFolder *folder;
@@ -262,7 +262,7 @@ struct _EMFormatClass {
/* Shows optional way to open messages */
void (*format_optional)(EMFormat *, struct _CamelStream *, struct _CamelMimePart *, struct _CamelStream* );
-
+
/* signals */
/* complete, alternative to polling busy, for asynchronous work */
void (*complete)(EMFormat *);
diff --git a/mail/em-html-stream.c b/mail/em-html-stream.c
index 5738d6f56c..7b54dbe887 100644
--- a/mail/em-html-stream.c
+++ b/mail/em-html-stream.c
@@ -31,7 +31,7 @@
#include <gtk/gtkmain.h>
#include "em-html-stream.h"
-#define d(x)
+#define d(x)
static void em_html_stream_class_init (EMHTMLStreamClass *klass);
static void em_html_stream_init (CamelObject *object);
@@ -47,7 +47,7 @@ CamelType
em_html_stream_get_type (void)
{
static CamelType type = CAMEL_INVALID_TYPE;
-
+
if (type == CAMEL_INVALID_TYPE) {
parent_class = (EMSyncStreamClass *)em_sync_stream_get_type();
type = camel_type_register (em_sync_stream_get_type(),
@@ -59,7 +59,7 @@ em_html_stream_get_type (void)
(CamelObjectInitFunc) em_html_stream_init,
(CamelObjectFinalizeFunc) em_html_stream_finalize);
}
-
+
return type;
}
@@ -156,7 +156,7 @@ CamelStream *
em_html_stream_new(struct _GtkHTML *html, struct _GtkHTMLStream *html_stream)
{
EMHTMLStream *new;
-
+
new = EM_HTML_STREAM (camel_object_new (EM_HTML_STREAM_TYPE));
new->html_stream = html_stream;
new->html = html;
diff --git a/mail/em-html-stream.h b/mail/em-html-stream.h
index ad3ee0ac0b..e8be92eb9b 100644
--- a/mail/em-html-stream.h
+++ b/mail/em-html-stream.h
@@ -49,7 +49,7 @@ typedef struct _EMHTMLStream {
typedef struct {
EMSyncStreamClass parent_class;
-
+
} EMHTMLStreamClass;
diff --git a/mail/em-icon-stream.c b/mail/em-icon-stream.c
index 3407eb817e..ebd2cf6cc1 100644
--- a/mail/em-icon-stream.c
+++ b/mail/em-icon-stream.c
@@ -38,7 +38,7 @@
#include "libedataserver/e-msgport.h"
-#define d(x)
+#define d(x)
/* fixed-point scale factor for scaled images in cache */
#define EMIS_SCALE (1024)
@@ -72,7 +72,7 @@ CamelType
em_icon_stream_get_type (void)
{
static CamelType type = CAMEL_INVALID_TYPE;
-
+
if (type == CAMEL_INVALID_TYPE) {
parent_class = (EMSyncStreamClass *)em_sync_stream_get_type();
type = camel_type_register (em_sync_stream_get_type(),
@@ -86,7 +86,7 @@ em_icon_stream_get_type (void)
emis_cache = em_cache_new(60, sizeof(struct _emis_cache_node), emis_cache_free);
}
-
+
return type;
}
@@ -274,7 +274,7 @@ em_icon_stream_get_image(const char *key, unsigned int maxwidth, unsigned int ma
GdkPixbuf *pb = NULL;
/* forces the cache to be setup if not */
- em_icon_stream_get_type();
+ em_icon_stream_get_type();
node = (struct _emis_cache_node *)em_cache_lookup(emis_cache, key);
if (node) {
@@ -326,7 +326,7 @@ em_icon_stream_is_resized(const char *key, unsigned int maxwidth, unsigned int m
{
int res = FALSE;
struct _emis_cache_node *node;
-
+
/* forces the cache to be setup if not */
em_icon_stream_get_type();
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c
index 79300b33bc..59075ef5d3 100644
--- a/mail/em-inline-filter.c
+++ b/mail/em-inline-filter.c
@@ -33,7 +33,7 @@
#include "em-utils.h"
-#define d(x)
+#define d(x)
static void em_inline_filter_class_init (EMInlineFilterClass *klass);
static void em_inline_filter_init (CamelObject *object);
@@ -49,7 +49,7 @@ CamelType
em_inline_filter_get_type (void)
{
static CamelType type = CAMEL_INVALID_TYPE;
-
+
if (type == CAMEL_INVALID_TYPE) {
parent_class = (CamelMimeFilterClass *)camel_mime_filter_get_type();
@@ -62,7 +62,7 @@ em_inline_filter_get_type (void)
(CamelObjectInitFunc) em_inline_filter_init,
(CamelObjectFinalizeFunc) em_inline_filter_finalize);
}
-
+
return type;
}
@@ -129,7 +129,7 @@ emif_add_part(EMInlineFilter *emif, const char *data, int len)
CamelMimePart *part;
CamelStream *mem;
char *type;
-
+
if (emif->state == EMIF_PLAIN || emif->state == EMIF_PGPSIGNED || emif->state == EMIF_PGPENCRYPTED)
encoding = emif->base_encoding;
else
@@ -142,11 +142,11 @@ emif_add_part(EMInlineFilter *emif, const char *data, int len)
}
mem = camel_stream_mem_new_with_byte_array(emif->data);
emif->data = g_byte_array_new();
-
+
dw = camel_data_wrapper_new();
camel_data_wrapper_construct_from_stream(dw, mem);
camel_object_unref(mem);
-
+
if (emif_types[emif->state].plain && emif->base_type) {
camel_content_type_ref (emif->base_type);
content_type = emif->base_type;
@@ -155,17 +155,17 @@ emif_add_part(EMInlineFilter *emif, const char *data, int len)
type = camel_content_type_format (emif->base_type);
content_type = camel_content_type_decode (type);
g_free (type);
-
+
g_free (content_type->type);
g_free (content_type->subtype);
content_type->type = g_strdup (emif_types[emif->state].type);
content_type->subtype = g_strdup (emif_types[emif->state].subtype);
}
-
+
camel_data_wrapper_set_mime_type_field (dw, content_type);
camel_content_type_unref (content_type);
dw->encoding = encoding;
-
+
part = camel_mime_part_new();
camel_medium_set_content_object((CamelMedium *)part, dw);
camel_mime_part_set_encoding(part, encoding);
@@ -203,7 +203,7 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
while (inptr < inend && *inptr != '\n')
inptr++;
-
+
if (inptr == inend) {
if (!final) {
camel_mime_filter_backup(f, start, inend-start);
@@ -378,12 +378,12 @@ emif_reset(CamelMimeFilter *f)
* raw data being processed.
* @base_type: The base content-type of the raw data, should always be
* text/plain.
- *
+ *
* Create a filter which will scan a (text) stream for
* embedded parts. You can then retrieve the contents
* as a CamelMultipart object.
- *
- * Return value:
+ *
+ * Return value:
**/
EMInlineFilter *
em_inline_filter_new(CamelTransferEncoding base_encoding, CamelContentType *base_type)
diff --git a/mail/em-junk-hook.c b/mail/em-junk-hook.c
index 7c081fcf94..ee4a6ed614 100644
--- a/mail/em-junk-hook.c
+++ b/mail/em-junk-hook.c
@@ -64,11 +64,11 @@ static const EPluginHookTargetKey emjh_flag_map[] = {
static const char *
em_junk_get_name (CamelJunkPlugin *csp);
-static void
+static void
em_junk_init(CamelJunkPlugin *csp)
{
struct _EMJunkHookItem *item = (EMJunkHookItem *)csp;
-
+
((EPluginClass *)G_OBJECT_GET_CLASS(item->hook->hook.plugin))->enable(item->hook->hook.plugin, 1);
}
@@ -84,7 +84,7 @@ em_junk_get_name (CamelJunkPlugin *csp)
}
-static gboolean
+static gboolean
em_junk_check_junk(CamelJunkPlugin *csp, CamelMimeMessage *m)
{
struct _EMJunkHookItem *item = (EMJunkHookItem *)csp;
@@ -100,7 +100,7 @@ em_junk_check_junk(CamelJunkPlugin *csp, CamelMimeMessage *m)
return FALSE;
}
-static void
+static void
em_junk_report_junk(CamelJunkPlugin *csp, CamelMimeMessage *m)
{
struct _EMJunkHookItem *item = (EMJunkHookItem *)csp;
@@ -114,7 +114,7 @@ em_junk_report_junk(CamelJunkPlugin *csp, CamelMimeMessage *m)
}
}
-static void
+static void
em_junk_report_non_junk(CamelJunkPlugin *csp, CamelMimeMessage *m)
{
struct _EMJunkHookItem *item = (EMJunkHookItem *)csp;
@@ -127,24 +127,24 @@ em_junk_report_non_junk(CamelJunkPlugin *csp, CamelMimeMessage *m)
}
}
-static void
+static void
em_junk_commit_reports(CamelJunkPlugin *csp)
{
struct _EMJunkHookItem *item = (EMJunkHookItem *)csp;
- if (item->hook && item->hook->hook.plugin->enabled)
+ if (item->hook && item->hook->hook.plugin->enabled)
e_plugin_invoke(item->hook->hook.plugin, item->commit_reports, NULL);
}
-static void
+static void
emj_dispose (GObject *object)
{
if (parent_class->dispose)
parent_class->dispose (object);
}
-static void
+static void
emj_finalize (GObject *object)
{
if (parent_class->finalize)
@@ -174,7 +174,7 @@ emjh_free_group(EMJunkHookGroup *group)
static struct _EMJunkHookItem *
emjh_construct_item(EPluginHook *eph, EMJunkHookGroup *group, xmlNodePtr root)
{
- struct _EMJunkHookItem *item;
+ struct _EMJunkHookItem *item;
CamelJunkPlugin junk_plugin = {
em_junk_get_name,
1,
@@ -193,16 +193,16 @@ emjh_construct_item(EPluginHook *eph, EMJunkHookGroup *group, xmlNodePtr root)
item->report_non_junk = e_plugin_xml_prop(root, "report_non_junk");
item->commit_reports = e_plugin_xml_prop(root, "commit_reports");
item->validate_binary = e_plugin_xml_prop(root, "validate_binary");
-
+
item->plugin_name = e_plugin_xml_prop(root, "name");
item->hook = emjh;
-
+
if (item->check_junk == NULL || item->report_junk == NULL || item->report_non_junk == NULL || item->commit_reports == NULL)
goto error;
-
+
/* Add the plugin to the session plugin list*/
mail_session_add_junk_plugin (item->plugin_name, CAMEL_JUNK_PLUGIN (&(item->csp)));
-
+
return item;
error:
printf ("ERROR");
@@ -224,7 +224,7 @@ emjh_construct_group(EPluginHook *eph, xmlNodePtr root)
goto error;
node = root->children;
-
+
/* We'll processs only the first item from xml file*/
while (node) {
if (0 == strcmp((char *)node->name, "item")) {
@@ -235,14 +235,14 @@ emjh_construct_group(EPluginHook *eph, xmlNodePtr root)
group->items = g_slist_append(group->items, item);
break;
}
-
+
node = node->next;
}
return group;
error:
emjh_free_group(group);
-
+
return NULL;
}
@@ -250,7 +250,7 @@ static int
emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
{
xmlNodePtr node;
-
+
d(printf("loading junk hook\n"));
if (((EPluginHookClass *)emjh_parent_class)->construct(eph, ep, root) == -1)
@@ -273,7 +273,7 @@ emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
}
node = node->next;
}
-
+
eph->plugin = ep;
return 0;
@@ -284,7 +284,7 @@ static void
emjh_enable(EPluginHook *eph, int state)
{
GSList *g;
-
+
g = emjh->groups;
if (emjh_types == NULL)
return;
@@ -315,7 +315,7 @@ GType
em_junk_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMJunkHookClass), NULL, NULL, (GClassInitFunc) emjh_class_init, NULL, NULL,
@@ -325,7 +325,7 @@ em_junk_hook_get_type(void)
emjh_parent_class = g_type_class_ref(e_plugin_hook_get_type());
type = g_type_register_static(e_plugin_hook_get_type(), "EMJunkHook", &info, 0);
}
-
+
return type;
}
@@ -342,7 +342,7 @@ GType
emj_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMJunkClass), NULL, NULL, (GClassInitFunc) emj_class_init, NULL, NULL,
@@ -352,11 +352,11 @@ emj_get_type(void)
emj_parent = g_type_class_ref(G_TYPE_OBJECT);
type = g_type_register_static(G_TYPE_OBJECT, "EMJunk", &info, 0);
}
-
+
return type;
}
-void
+void
em_junk_hook_register_type(GType type)
{
EMJunk *klass;
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index a47f274e5b..9746e620bb 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -72,7 +72,7 @@ enum {
HEADER_LIST_ENABLED_COLUMN, /* is the header enabled? */
HEADER_LIST_IS_DEFAULT_COLUMN, /* is this header a default header, eg From: */
HEADER_LIST_HEADER_COLUMN, /* the real name of this header */
- HEADER_LIST_N_COLUMNS,
+ HEADER_LIST_N_COLUMNS,
};
static GType col_types[] = {
@@ -91,7 +91,7 @@ static const char *default_headers[] = {
N_("Bcc"),
N_("Subject"),
N_("Date"),
- N_("Newsgroups"),
+ N_("Newsgroups"),
"x-evolution-mailer", /* DO NOT translate */
};
@@ -112,7 +112,7 @@ GtkType
em_mailer_prefs_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
GTypeInfo type_info = {
sizeof (EMMailerPrefsClass),
@@ -123,10 +123,10 @@ em_mailer_prefs_get_type (void)
0,
(GInstanceInitFunc) em_mailer_prefs_init,
};
-
+
type = g_type_register_static (gtk_vbox_get_type (), "EMMailerPrefs", &type_info, 0);
}
-
+
return type;
}
@@ -134,10 +134,10 @@ static void
em_mailer_prefs_class_init (EMMailerPrefsClass *klass)
{
GObjectClass *object_class;
-
+
object_class = (GObjectClass *) klass;
parent_class = g_type_class_ref (gtk_vbox_get_type ());
-
+
object_class->finalize = em_mailer_prefs_finalise;
}
@@ -151,9 +151,9 @@ static void
em_mailer_prefs_finalise (GObject *obj)
{
EMMailerPrefs *prefs = (EMMailerPrefs *) obj;
-
+
g_object_unref (prefs->gui);
-
+
((GObjectClass *)(parent_class))->finalize (obj);
}
@@ -189,7 +189,7 @@ labels_changed (EMMailerPrefs *prefs)
const char *cstring;
char *string;
int i;
-
+
for (i = 4; i >= 0; i--) {
GdkColor color;
@@ -199,9 +199,9 @@ labels_changed (EMMailerPrefs *prefs)
color.red, color.green, color.blue);
list = g_slist_prepend (list, string);
}
-
+
gconf_client_set_list (prefs->gconf, "/apps/evolution/mail/labels", GCONF_VALUE_STRING, list, NULL);
-
+
l = list;
while (l != NULL) {
n = l->next;
@@ -228,7 +228,7 @@ restore_labels_clicked (GtkWidget *widget, gpointer user_data)
{
EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
int i;
-
+
for (i = 0; i < 5; i++) {
gtk_entry_set_text (prefs->labels[i].name, _(label_defaults[i].name));
color_button_set_color (prefs->labels[i].color, label_defaults[i].colour);
@@ -243,13 +243,13 @@ emmp_header_remove_sensitivity (EMMailerPrefs *prefs)
GtkTreeSelection *selection = gtk_tree_view_get_selection (prefs->header_list);
gboolean is_default;
- /* remove button should be sensitive if the currenlty selected entry in the list view
- is not a default header. if there are no entries, or none is selected, it should be
+ /* remove button should be sensitive if the currenlty selected entry in the list view
+ is not a default header. if there are no entries, or none is selected, it should be
disabled
*/
if (gtk_tree_selection_get_selected (selection, NULL, &iter)) {
- gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter,
- HEADER_LIST_IS_DEFAULT_COLUMN, &is_default,
+ gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter,
+ HEADER_LIST_IS_DEFAULT_COLUMN, &is_default,
-1);
if (is_default)
gtk_widget_set_sensitive (GTK_WIDGET (prefs->remove_header), FALSE);
@@ -264,16 +264,16 @@ static gboolean
emmp_header_is_valid (const char *header)
{
const char *p = header;
-
+
if (header[0] == 0)
return FALSE;
-
+
while (*p) {
if ((*p == ':') || (*p == ' '))
return FALSE;
p++;
}
-
+
return TRUE;
}
@@ -283,9 +283,9 @@ emmp_header_add_sensitivity (EMMailerPrefs *prefs)
const char *entry_contents;
GtkTreeIter iter;
gboolean valid;
-
- /* the add header button should be sensitive if the text box contains
- a valid header string, that is not a duplicate with something already
+
+ /* the add header button should be sensitive if the text box contains
+ a valid header string, that is not a duplicate with something already
in the list view
*/
entry_contents = gtk_entry_get_text (GTK_ENTRY (prefs->entry_header));
@@ -293,23 +293,23 @@ emmp_header_add_sensitivity (EMMailerPrefs *prefs)
gtk_widget_set_sensitive (GTK_WIDGET (prefs->add_header), FALSE);
return;
}
-
+
/* check if this is a duplicate */
valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (prefs->header_list_store), &iter);
while (valid) {
char *header_name;
-
- gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter,
- HEADER_LIST_HEADER_COLUMN, &header_name,
+
+ gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter,
+ HEADER_LIST_HEADER_COLUMN, &header_name,
-1);
if (g_ascii_strcasecmp (header_name, entry_contents) == 0) {
gtk_widget_set_sensitive (GTK_WIDGET (prefs->add_header), FALSE);
return;
}
-
+
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (prefs->header_list_store), &iter);
}
-
+
gtk_widget_set_sensitive (GTK_WIDGET (prefs->add_header), TRUE);
}
@@ -319,7 +319,7 @@ emmp_save_headers (EMMailerPrefs *prefs)
GSList *header_list;
GtkTreeIter iter;
gboolean valid;
-
+
/* Headers */
header_list = NULL;
valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (prefs->header_list_store), &iter);
@@ -327,19 +327,19 @@ emmp_save_headers (EMMailerPrefs *prefs)
struct _EMMailerPrefsHeader h;
gboolean enabled;
char *xml;
-
- gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter,
- HEADER_LIST_HEADER_COLUMN, &h.name,
- HEADER_LIST_ENABLED_COLUMN, &enabled,
+
+ gtk_tree_model_get (GTK_TREE_MODEL (prefs->header_list_store), &iter,
+ HEADER_LIST_HEADER_COLUMN, &h.name,
+ HEADER_LIST_ENABLED_COLUMN, &enabled,
-1);
h.enabled = enabled;
-
+
if ((xml = em_mailer_prefs_header_to_xml (&h)))
header_list = g_slist_append (header_list, xml);
-
+
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (prefs->header_list_store), &iter);
}
-
+
gconf_client_set_list (prefs->gconf, "/apps/evolution/mail/display/headers", GCONF_VALUE_STRING, header_list, NULL);
g_slist_foreach (header_list, (GFunc) g_free, NULL);
g_slist_free (header_list);
@@ -352,14 +352,14 @@ emmp_header_list_enabled_toggled (GtkCellRendererToggle *cell, const char *path_
GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
GtkTreeIter iter;
int enabled;
-
+
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (model, &iter, HEADER_LIST_ENABLED_COLUMN, &enabled, -1);
enabled = !enabled;
gtk_list_store_set (GTK_LIST_STORE (model), &iter, HEADER_LIST_ENABLED_COLUMN,
enabled, -1);
gtk_tree_path_free (path);
-
+
emmp_save_headers (prefs);
}
@@ -369,16 +369,16 @@ emmp_header_add_header (GtkWidget *widget, EMMailerPrefs *prefs)
GtkTreeModel *model = GTK_TREE_MODEL (prefs->header_list_store);
GtkTreeIter iter;
const gchar *text = gtk_entry_get_text (prefs->entry_header);
-
+
g_strstrip ((gchar *)text);
if (text && (strlen (text)>0)) {
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- HEADER_LIST_NAME_COLUMN, text,
- HEADER_LIST_ENABLED_COLUMN, TRUE,
- HEADER_LIST_HEADER_COLUMN, text,
- HEADER_LIST_IS_DEFAULT_COLUMN, FALSE,
+ gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+ HEADER_LIST_NAME_COLUMN, text,
+ HEADER_LIST_ENABLED_COLUMN, TRUE,
+ HEADER_LIST_HEADER_COLUMN, text,
+ HEADER_LIST_IS_DEFAULT_COLUMN, FALSE,
-1);
gtk_entry_set_text (prefs->entry_header, "");
emmp_header_remove_sensitivity (prefs);
@@ -395,21 +395,21 @@ emmp_header_remove_header (GtkWidget *button, gpointer user_data)
GtkTreeModel *model = GTK_TREE_MODEL (prefs->header_list_store);
GtkTreeSelection *selection = gtk_tree_view_get_selection (prefs->header_list);
GtkTreeIter iter;
-
+
if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
return;
-
+
gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
emmp_header_remove_sensitivity (prefs);
-
+
emmp_save_headers (prefs);
}
-static void
+static void
emmp_header_list_row_selected (GtkTreeSelection *selection, gpointer user_data)
{
EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
-
+
emmp_header_remove_sensitivity (prefs);
}
@@ -417,7 +417,7 @@ static void
emmp_header_entry_changed (GtkWidget *entry, gpointer user_data)
{
EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
-
+
emmp_header_add_sensitivity (prefs);
}
@@ -425,7 +425,7 @@ static void
mark_seen_timeout_changed (GtkSpinButton *spin, EMMailerPrefs *prefs)
{
int timeout;
-
+
timeout = (int) (gtk_spin_button_get_value (prefs->timeout) * 1000.0);
gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/mark_seen_timeout", timeout, NULL);
}
@@ -434,9 +434,9 @@ static void
address_compress_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs)
{
int count;
-
+
count = (int) gtk_spin_button_get_value (prefs->address_count);
-
+
gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/address_count", count, NULL);
}
@@ -444,9 +444,9 @@ static void
mlimit_count_changed (GtkSpinButton *spin, EMMailerPrefs *prefs)
{
int count;
-
+
count = (int) gtk_spin_button_get_value (prefs->mlimit_count);
-
+
gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/message_text_part_limit", count, NULL);
}
@@ -457,13 +457,13 @@ spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const char *key, fl
double min, max;
char *mkey, *p;
int val;
-
+
gtk_spin_button_get_range (spin, &min, &max);
-
+
mkey = g_alloca (strlen (key) + 5);
p = g_stpcpy (mkey, key);
*p++ = '_';
-
+
/* see if the admin locked down the min value */
strcpy (p, "min");
val = gconf_client_get_int (prefs->gconf, mkey, &err);
@@ -471,7 +471,7 @@ spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const char *key, fl
g_clear_error (&err);
else
min = (1.0 * val) / div;
-
+
/* see if the admin locked down the max value */
strcpy (p, "max");
val = gconf_client_get_int (prefs->gconf, mkey, &err);
@@ -479,18 +479,18 @@ spin_button_init (EMMailerPrefs *prefs, GtkSpinButton *spin, const char *key, fl
g_clear_error (&err);
else
max = (1.0 * val) / div;
-
+
gtk_spin_button_set_range (spin, min, max);
-
+
/* get the value */
val = gconf_client_get_int (prefs->gconf, key, NULL);
gtk_spin_button_set_value (spin, (1.0 * val) / div);
-
+
if (value_changed) {
g_object_set_data ((GObject *) spin, "key", (void *) key);
g_signal_connect (spin, "value-changed", value_changed, prefs);
}
-
+
if (!gconf_client_key_is_writable (prefs->gconf, key, NULL))
gtk_widget_set_sensitive ((GtkWidget *) spin, FALSE);
}
@@ -499,7 +499,7 @@ static void
toggle_button_toggled (GtkToggleButton *toggle, EMMailerPrefs *prefs)
{
const char *key;
-
+
key = g_object_get_data ((GObject *) toggle, "key");
gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL);
}
@@ -520,7 +520,7 @@ static void
toggle_button_toggled_not (GtkToggleButton *toggle, EMMailerPrefs *prefs)
{
const char *key;
-
+
key = g_object_get_data ((GObject *) toggle, "key");
gconf_client_set_bool (prefs->gconf, key, !gtk_toggle_button_get_active (toggle), NULL);
}
@@ -530,12 +530,12 @@ static void
custom_font_changed (GtkToggleButton *toggle, EMMailerPrefs *prefs)
{
gboolean use_custom;
-
+
use_custom = !gtk_toggle_button_get_active (toggle);
-
+
gtk_widget_set_sensitive (GTK_WIDGET (prefs->font_fixed), use_custom);
gtk_widget_set_sensitive (GTK_WIDGET (prefs->font_variable), use_custom);
-
+
gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/display/fonts/use_custom", use_custom, NULL);
}
@@ -544,7 +544,7 @@ font_changed (GtkFontButton *font_button, EMMailerPrefs *prefs)
{
const gchar *key;
const gchar *font_name;
-
+
key = g_object_get_data (G_OBJECT (font_button), "key");
font_name = gtk_font_button_get_font_name (font_button);
gconf_client_set_string (prefs->gconf, key, font_name, NULL);
@@ -554,7 +554,7 @@ static void
toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, int not, const char *key, GCallback toggled)
{
gboolean bool;
-
+
bool = gconf_client_get_bool (prefs->gconf, key, NULL);
gtk_toggle_button_set_active (toggle, not ? !bool : bool);
@@ -562,7 +562,7 @@ toggle_button_init (EMMailerPrefs *prefs, GtkToggleButton *toggle, int not, cons
g_object_set_data ((GObject *) toggle, "key", (void *) key);
g_signal_connect (toggle, "toggled", toggled, prefs);
}
-
+
if (!gconf_client_key_is_writable (prefs->gconf, key, NULL))
gtk_widget_set_sensitive ((GtkWidget *) toggle, FALSE);
}
@@ -572,11 +572,11 @@ charset_activate (GtkWidget *item, EMMailerPrefs *prefs)
{
GtkWidget *menu;
char *string;
-
+
menu = gtk_option_menu_get_menu (prefs->charset);
if (!(string = e_charset_picker_get_charset (menu)))
string = g_strdup (e_iconv_locale_charset ());
-
+
gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/display/charset", string, NULL);
g_free (string);
}
@@ -587,19 +587,19 @@ charset_menu_init (EMMailerPrefs *prefs)
GtkWidget *menu, *item;
GList *items;
char *buf;
-
+
buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/charset", NULL);
menu = e_charset_picker_new (buf && *buf ? buf : e_iconv_locale_charset ());
gtk_option_menu_set_menu (prefs->charset, GTK_WIDGET (menu));
g_free (buf);
-
+
items = GTK_MENU_SHELL (menu)->children;
while (items) {
item = items->data;
g_signal_connect (item, "activate", G_CALLBACK (charset_activate), prefs);
items = items->next;
}
-
+
if (!gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/display/charset", NULL))
gtk_widget_set_sensitive ((GtkWidget *) prefs->charset, FALSE);
}
@@ -608,7 +608,7 @@ static void
trash_days_activate (GtkWidget *item, EMMailerPrefs *prefs)
{
int days;
-
+
days = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "days"));
gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", days, NULL);
}
@@ -618,29 +618,29 @@ emmp_empty_trash_init (EMMailerPrefs *prefs)
{
int locked, days, hist = 0, i;
GtkWidget *menu, *item;
-
+
toggle_button_init (prefs, prefs->empty_trash, FALSE,
"/apps/evolution/mail/trash/empty_on_exit",
G_CALLBACK (toggle_button_toggled));
-
+
days = gconf_client_get_int(prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", NULL);
menu = gtk_menu_new();
for (i = 0; i < G_N_ELEMENTS (empty_trash_frequency); i++) {
if (days >= empty_trash_frequency[i].days)
hist = i;
-
+
item = gtk_menu_item_new_with_label (_(empty_trash_frequency[i].label));
g_object_set_data ((GObject *) item, "days", GINT_TO_POINTER (empty_trash_frequency[i].days));
g_signal_connect (item, "activate", G_CALLBACK (trash_days_activate), prefs);
-
+
gtk_widget_show (item);
gtk_menu_shell_append((GtkMenuShell *)menu, item);
}
-
+
gtk_widget_show(menu);
gtk_option_menu_set_menu((GtkOptionMenu *)prefs->empty_trash_days, menu);
gtk_option_menu_set_history((GtkOptionMenu *)prefs->empty_trash_days, hist);
-
+
locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", NULL);
gtk_widget_set_sensitive ((GtkWidget *) prefs->empty_trash_days, !locked);
}
@@ -649,7 +649,7 @@ static void
junk_days_activate (GtkWidget *item, EMMailerPrefs *prefs)
{
int days;
-
+
days = GPOINTER_TO_INT (g_object_get_data ((GObject *) item, "days"));
gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", days, NULL);
}
@@ -659,29 +659,29 @@ emmp_empty_junk_init (EMMailerPrefs *prefs)
{
int locked, days, hist = 0, i;
GtkWidget *menu, *item;
-
+
toggle_button_init (prefs, prefs->empty_junk, FALSE,
"/apps/evolution/mail/junk/empty_on_exit",
G_CALLBACK (toggle_button_toggled));
-
+
days = gconf_client_get_int(prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", NULL);
menu = gtk_menu_new();
for (i = 0; i < G_N_ELEMENTS (empty_trash_frequency); i++) {
if (days >= empty_trash_frequency[i].days)
hist = i;
-
+
item = gtk_menu_item_new_with_label (_(empty_trash_frequency[i].label));
g_object_set_data ((GObject *) item, "days", GINT_TO_POINTER (empty_trash_frequency[i].days));
g_signal_connect (item, "activate", G_CALLBACK (junk_days_activate), prefs);
-
+
gtk_widget_show (item);
gtk_menu_shell_append((GtkMenuShell *)menu, item);
}
-
+
gtk_widget_show(menu);
gtk_option_menu_set_menu((GtkOptionMenu *)prefs->empty_junk_days, menu);
gtk_option_menu_set_history((GtkOptionMenu *)prefs->empty_junk_days, hist);
-
+
locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/junk/empty_on_exit_days", NULL);
gtk_widget_set_sensitive ((GtkWidget *) prefs->empty_junk_days, !locked);
}
@@ -690,14 +690,14 @@ static void
http_images_changed (GtkWidget *widget, EMMailerPrefs *prefs)
{
int when;
-
+
if (gtk_toggle_button_get_active (prefs->images_always))
when = MAIL_CONFIG_HTTP_ALWAYS;
else if (gtk_toggle_button_get_active (prefs->images_sometimes))
when = MAIL_CONFIG_HTTP_SOMETIMES;
else
when = MAIL_CONFIG_HTTP_NEVER;
-
+
gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/display/load_http_images", when, NULL);
}
@@ -706,7 +706,7 @@ static void
notify_type_changed (GtkWidget *widget, EMMailerPrefs *prefs)
{
int type;
-
+
if (gtk_toggle_button_get_active (prefs->notify_not))
type = MAIL_CONFIG_NOTIFY_NOT;
else if (gtk_toggle_button_get_active (prefs->notify_beep))
@@ -773,7 +773,7 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
{
char *def_plugin = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo));
const GList *plugins = mail_session_get_junk_plugins();
-
+
gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", def_plugin, NULL);
while (plugins) {
struct _EMJunkHookItem *item = plugins->data;;
@@ -798,8 +798,8 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
html = g_strdup_printf ("<i>%s</i>", text);
gtk_label_set_markup (prefs->plugin_status, html);
g_free (html);
- g_free (text);
- }
+ g_free (text);
+ }
break;
}
plugins = plugins->next;
@@ -816,30 +816,30 @@ junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs)
if (!plugins || !g_list_length ((GList *)plugins)) {
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("No Junk plugin available"));
- gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
gtk_widget_set_sensitive (GTK_WIDGET (combo), FALSE);
gtk_widget_hide (GTK_WIDGET (prefs->plugin_image));
gtk_widget_hide (GTK_WIDGET (prefs->plugin_status));
gtk_image_set_from_stock (prefs->plugin_image, NULL, 0);
g_free (pdefault);
-
+
return;
}
-
+
while (plugins) {
struct _EMJunkHookItem *item = plugins->data;;
-
+
gtk_combo_box_append_text (GTK_COMBO_BOX (combo), item->plugin_name);
if (!def_set && pdefault && item->plugin_name && !strcmp(pdefault, item->plugin_name)) {
gboolean status;
-
+
def_set = TRUE;
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), index);
status = e_plugin_invoke (item->hook->hook.plugin, item->validate_binary, NULL) != NULL;
if (status) {
char *text, *html;
gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU);
- /* May be a better text */
+ /* May be a better text */
text = g_strdup_printf (_("%s plugin is available and the binary is installed."), item->plugin_name);
html = g_strdup_printf ("<i>%s</i>", text);
gtk_label_set_markup (prefs->plugin_status, html);
@@ -853,7 +853,7 @@ junk_plugin_setup (GtkWidget *combo, EMMailerPrefs *prefs)
html = g_strdup_printf ("<i>%s</i>", text);
gtk_label_set_markup (prefs->plugin_status, html);
g_free (html);
- g_free (text);
+ g_free (text);
}
}
plugins = plugins->next;
@@ -868,7 +868,7 @@ GtkWidget *
create_combo_text_widget (void) {
return gtk_combo_box_new_text ();
}
-
+
static void
em_mailer_prefs_construct (EMMailerPrefs *prefs)
{
@@ -886,7 +886,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
EMConfigTargetPrefs *target;
GSList *l;
char *gladefile;
-
+
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"mail-config.glade",
NULL);
@@ -910,13 +910,13 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
e_config_add_items((EConfig *)ec, l, NULL, NULL, emmp_free, prefs);
/* General tab */
-
+
/* Message Display */
prefs->timeout_toggle = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkMarkTimeout"));
toggle_button_init (prefs, prefs->timeout_toggle, FALSE,
"/apps/evolution/mail/display/mark_seen",
G_CALLBACK (toggle_button_toggled));
-
+
prefs->timeout = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spinMarkTimeout"));
spin_button_init (prefs, prefs->timeout,
"/apps/evolution/mail/display/mark_seen_timeout",
@@ -926,30 +926,30 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
toggle_button_init (prefs, prefs->mlimit_toggle, FALSE,
"/apps/evolution/mail/display/force_message_limit",
G_CALLBACK (toggle_button_toggled));
-
+
prefs->mlimit_count = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "mlimit_spin"));
spin_button_init (prefs, prefs->mlimit_count,
"/apps/evolution/mail/display/message_text_part_limit",
1, G_CALLBACK (mlimit_count_changed));
-
+
prefs->address_toggle = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "address_checkbox"));
toggle_button_init (prefs, prefs->address_toggle, FALSE,
"/apps/evolution/mail/display/address_compress",
G_CALLBACK (toggle_button_toggled));
-
+
prefs->address_count = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "address_spin"));
spin_button_init (prefs, prefs->address_count,
"/apps/evolution/mail/display/address_count",
1, G_CALLBACK (address_compress_count_changed));
-
+
prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset"));
charset_menu_init (prefs);
-
+
prefs->citation_highlight = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkHighlightCitations"));
toggle_button_init (prefs, prefs->citation_highlight, FALSE,
"/apps/evolution/mail/display/mark_citations",
G_CALLBACK (toggle_button_toggled));
-
+
prefs->citation_color = GTK_COLOR_BUTTON (glade_xml_get_widget (gui, "colorButtonHighlightCitations"));
buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/citation_colour", NULL);
color_button_set_color (prefs->citation_color, buf ? buf : "#737373");
@@ -957,40 +957,40 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
if (!gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/display/citation_colour", NULL))
gtk_widget_set_sensitive ((GtkWidget *) prefs->citation_color, FALSE);
g_free (buf);
-
+
/* Deleting Mail */
prefs->empty_trash = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEmptyTrashOnExit"));
prefs->empty_trash_days = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuEmptyTrashDays"));
emmp_empty_trash_init (prefs);
-
+
prefs->confirm_expunge = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkConfirmExpunge"));
toggle_button_init (prefs, prefs->confirm_expunge, FALSE,
"/apps/evolution/mail/prompts/expunge",
G_CALLBACK (toggle_button_toggled));
-
+
/* New Mail Notification */
locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/notify/type", NULL);
-
+
val = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/notify/type", NULL);
prefs->notify_not = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyNot"));
gtk_toggle_button_set_active (prefs->notify_not, val == MAIL_CONFIG_NOTIFY_NOT);
g_signal_connect (prefs->notify_not, "toggled", G_CALLBACK (notify_type_changed), prefs);
if (locked)
gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_not, FALSE);
-
+
prefs->notify_beep = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyBeep"));
- prefs->notify_sound_file = GTK_FILE_CHOOSER_BUTTON (glade_xml_get_widget (gui, "fileNotifyPlaySoundButton"));
+ prefs->notify_sound_file = GTK_FILE_CHOOSER_BUTTON (glade_xml_get_widget (gui, "fileNotifyPlaySoundButton"));
gtk_toggle_button_set_active (prefs->notify_beep, val == MAIL_CONFIG_NOTIFY_BEEP);
g_signal_connect (prefs->notify_beep, "toggled", G_CALLBACK (notify_type_changed), prefs);
if (locked)
gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_beep, FALSE);
-
+
prefs->notify_play_sound = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyPlaySound"));
gtk_toggle_button_set_active (prefs->notify_play_sound, val == MAIL_CONFIG_NOTIFY_PLAY_SOUND);
g_signal_connect (prefs->notify_play_sound, "toggled", G_CALLBACK (notify_type_changed), prefs);
if (locked)
gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_play_sound, FALSE);
-
+
buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL);
if (buf && *buf)
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (prefs->notify_sound_file), buf);
@@ -999,7 +999,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
if (val != MAIL_CONFIG_NOTIFY_PLAY_SOUND)
gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_sound_file, FALSE);
g_free (buf);
-
+
/* Mail Fonts */
font = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/fonts/monospace", NULL);
prefs->font_fixed = GTK_FONT_BUTTON (glade_xml_get_widget (gui, "FontFixed"));
@@ -1009,7 +1009,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
g_signal_connect (prefs->font_fixed, "font-set", G_CALLBACK (font_changed), prefs);
if (!gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/display/fonts/monospace", NULL))
gtk_widget_set_sensitive ((GtkWidget *) prefs->font_fixed, FALSE);
-
+
font = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/fonts/variable", NULL);
prefs->font_variable = GTK_FONT_BUTTON (glade_xml_get_widget (gui, "FontVariable"));
gtk_font_button_set_font_name (prefs->font_variable, font);
@@ -1018,29 +1018,29 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
g_signal_connect (prefs->font_variable, "font-set", G_CALLBACK (font_changed), prefs);
if (!gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/display/fonts/variable", NULL))
gtk_widget_set_sensitive ((GtkWidget *) prefs->font_variable, FALSE);
-
+
prefs->font_share = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radFontUseSame"));
toggle_button_init (prefs, prefs->font_share, TRUE,
"/apps/evolution/mail/display/fonts/use_custom",
G_CALLBACK (custom_font_changed));
custom_font_changed (prefs->font_share, prefs);
-
+
/* HTML Mail tab */
-
+
/* Loading Images */
locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/display/load_http_images", NULL);
-
+
val = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/display/load_http_images", NULL);
prefs->images_never = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesNever"));
gtk_toggle_button_set_active (prefs->images_never, val == MAIL_CONFIG_HTTP_NEVER);
if (locked)
gtk_widget_set_sensitive ((GtkWidget *) prefs->images_never, FALSE);
-
+
prefs->images_sometimes = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesSometimes"));
gtk_toggle_button_set_active (prefs->images_sometimes, val == MAIL_CONFIG_HTTP_SOMETIMES);
if (locked)
gtk_widget_set_sensitive ((GtkWidget *) prefs->images_sometimes, FALSE);
-
+
prefs->images_always = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesAlways"));
gtk_toggle_button_set_active (prefs->images_always, val == MAIL_CONFIG_HTTP_ALWAYS);
if (locked)
@@ -1054,12 +1054,12 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
toggle_button_init (prefs, prefs->show_animated, FALSE,
"/apps/evolution/mail/display/animate_images",
G_CALLBACK (toggle_button_toggled));
-
+
prefs->prompt_unwanted_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptWantHTML"));
toggle_button_init (prefs, prefs->prompt_unwanted_html, FALSE,
"/apps/evolution/mail/prompts/unwanted_html",
G_CALLBACK (toggle_button_toggled));
-
+
/* Labels... */
locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/labels", NULL);
i = 0;
@@ -1068,33 +1068,33 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
MailConfigLabel *label;
char *widget_name;
label = list->data;
-
+
widget_name = g_strdup_printf ("txtLabel%d", i);
prefs->labels[i].name = GTK_ENTRY (glade_xml_get_widget (gui, widget_name));
gtk_widget_set_sensitive ((GtkWidget *) prefs->labels[i].name, !locked);
g_free (widget_name);
-
+
widget_name = g_strdup_printf ("colorLabel%d", i);
prefs->labels[i].color = GTK_COLOR_BUTTON (glade_xml_get_widget (gui, widget_name));
gtk_widget_set_sensitive ((GtkWidget *) prefs->labels[i].color, !locked);
g_free (widget_name);
-
+
gtk_entry_set_text (prefs->labels[i].name, label->name);
g_signal_connect (prefs->labels[i].name, "changed", G_CALLBACK (label_entry_changed), prefs);
-
+
color_button_set_color (prefs->labels[i].color, label->colour);
g_signal_connect (prefs->labels[i].color, "color-set", G_CALLBACK (label_color_set), prefs);
-
+
atk_object_set_name(gtk_widget_get_accessible((GtkWidget *)prefs->labels[i].color), label->name);
i++;
list = list->next;
}
-
+
prefs->restore_labels = GTK_BUTTON (glade_xml_get_widget (gui, "cmdRestoreLabels"));
gtk_widget_set_sensitive ((GtkWidget *) prefs->restore_labels, !locked);
g_signal_connect (prefs->restore_labels, "clicked", G_CALLBACK (restore_labels_clicked), prefs);
-
+
/* headers */
locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/display/headers", NULL);
@@ -1108,21 +1108,21 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
G_CALLBACK (toggle_button_toggled));
if (!gtk_toggle_button_get_active (prefs->photo_show))
gtk_widget_set_sensitive ((GtkWidget *) prefs->photo_local, FALSE);
-
+
/* always de-sensitised until the user types something in the entry */
prefs->add_header = GTK_BUTTON (glade_xml_get_widget (gui, "cmdHeadersAdd"));
gtk_widget_set_sensitive ((GtkWidget *) prefs->add_header, FALSE);
-
+
/* always de-sensitised until the user selects a header in the list */
prefs->remove_header = GTK_BUTTON (glade_xml_get_widget (gui, "cmdHeadersRemove"));
gtk_widget_set_sensitive ((GtkWidget *) prefs->remove_header, FALSE);
-
+
prefs->entry_header = GTK_ENTRY (glade_xml_get_widget (gui, "txtHeaders"));
gtk_widget_set_sensitive ((GtkWidget *) prefs->entry_header, !locked);
-
+
prefs->header_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "treeHeaders"));
gtk_widget_set_sensitive ((GtkWidget *) prefs->header_list, !locked);
-
+
selection = gtk_tree_view_get_selection (prefs->header_list);
g_signal_connect (selection, "changed", G_CALLBACK (emmp_header_list_row_selected), prefs);
g_signal_connect (prefs->entry_header, "changed", G_CALLBACK (emmp_header_entry_changed), prefs);
@@ -1132,29 +1132,29 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
g_signal_connect (prefs->add_header, "clicked", G_CALLBACK (emmp_header_add_header), prefs);
g_signal_connect (prefs->remove_header, "clicked", G_CALLBACK (emmp_header_remove_header), prefs);
gtk_tree_view_set_model (prefs->header_list, GTK_TREE_MODEL (prefs->header_list_store));
-
+
renderer = gtk_cell_renderer_toggle_new ();
g_object_set (renderer, "activatable", TRUE, NULL);
g_signal_connect (renderer, "toggled", G_CALLBACK (emmp_header_list_enabled_toggled), prefs);
- gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (prefs->header_list), -1,
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (prefs->header_list), -1,
"Enabled", renderer,
- "active", HEADER_LIST_ENABLED_COLUMN,
+ "active", HEADER_LIST_ENABLED_COLUMN,
NULL);
renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (prefs->header_list), -1,
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (prefs->header_list), -1,
"Name", renderer,
- "text", HEADER_LIST_NAME_COLUMN,
+ "text", HEADER_LIST_NAME_COLUMN,
NULL);
-
- /* populated the listview with entries; firstly we add all the default headers, and then
- we add read header configuration out of gconf. If a header in gconf is a default header,
+
+ /* populated the listview with entries; firstly we add all the default headers, and then
+ we add read header configuration out of gconf. If a header in gconf is a default header,
we update the enabled flag accordingly
*/
header_add_list = NULL;
default_header_hash = g_hash_table_new (g_str_hash, g_str_equal);
for (i = 0; i < G_N_ELEMENTS (default_headers); i++) {
struct _EMMailerPrefsHeader *h;
-
+
h = g_malloc (sizeof (struct _EMMailerPrefsHeader));
h->is_default = TRUE;
h->name = g_strdup (default_headers[i]);
@@ -1162,14 +1162,14 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
g_hash_table_insert (default_header_hash, (gpointer) default_headers[i], h);
header_add_list = g_slist_append (header_add_list, h);
}
-
+
/* read stored headers from gconf */
header_config_list = gconf_client_get_list (prefs->gconf, "/apps/evolution/mail/display/headers", GCONF_VALUE_STRING, NULL);
p = header_config_list;
while (p) {
struct _EMMailerPrefsHeader *h, *def;
char *xml = (char *) p->data;
-
+
h = em_mailer_prefs_header_from_xml (xml);
if (h) {
def = g_hash_table_lookup (default_header_hash, h->name);
@@ -1181,38 +1181,38 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
header_add_list = g_slist_append (header_add_list, h);
}
}
-
+
p = p->next;
}
-
+
g_hash_table_destroy (default_header_hash);
g_slist_foreach (header_config_list, (GFunc) g_free, NULL);
g_slist_free (header_config_list);
-
+
p = header_add_list;
while (p) {
struct _EMMailerPrefsHeader *h = (struct _EMMailerPrefsHeader *) p->data;
const char *name;
-
+
if (g_ascii_strcasecmp (h->name, EM_FORMAT_HEADER_XMAILER) == 0)
name = _("Mailer");
else
name = _(h->name);
-
+
gtk_list_store_append (prefs->header_list_store, &iter);
- gtk_list_store_set (prefs->header_list_store, &iter,
- HEADER_LIST_NAME_COLUMN, name,
- HEADER_LIST_ENABLED_COLUMN, h->enabled,
- HEADER_LIST_IS_DEFAULT_COLUMN, h->is_default,
- HEADER_LIST_HEADER_COLUMN, h->name,
+ gtk_list_store_set (prefs->header_list_store, &iter,
+ HEADER_LIST_NAME_COLUMN, name,
+ HEADER_LIST_ENABLED_COLUMN, h->enabled,
+ HEADER_LIST_IS_DEFAULT_COLUMN, h->is_default,
+ HEADER_LIST_HEADER_COLUMN, h->name,
-1);
-
+
em_mailer_prefs_header_free (h);
p = p->next;
}
-
+
g_slist_free (header_add_list);
-
+
/* Junk prefs */
prefs->check_incoming = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkCheckIncomingMail"));
toggle_button_init (prefs, prefs->check_incoming, FALSE,
@@ -1222,12 +1222,12 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
prefs->empty_junk = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "junk_empty_check"));
prefs->empty_junk_days = GTK_OPTION_MENU (glade_xml_get_widget (gui, "junk_empty_combo"));
emmp_empty_junk_init (prefs);
-
+
prefs->default_junk_plugin = GTK_COMBO_BOX (glade_xml_get_widget (gui, "default_junk_plugin"));
prefs->plugin_status = GTK_LABEL (glade_xml_get_widget (gui, "plugin_status"));
- prefs->plugin_image = GTK_IMAGE (glade_xml_get_widget (gui, "plugin_image"));
+ prefs->plugin_image = GTK_IMAGE (glade_xml_get_widget (gui, "plugin_image"));
junk_plugin_setup (GTK_WIDGET (prefs->default_junk_plugin), prefs);
-
+
/* get our toplevel widget */
target = em_config_target_new_prefs(ec, prefs->gconf);
e_config_set_target((EConfig *)ec, (EConfigTarget *)target);
@@ -1239,10 +1239,10 @@ GtkWidget *
em_mailer_prefs_new (void)
{
EMMailerPrefs *new;
-
+
new = (EMMailerPrefs *) g_object_new (em_mailer_prefs_get_type (), NULL);
em_mailer_prefs_construct (new);
-
+
return (GtkWidget *) new;
}
@@ -1253,27 +1253,27 @@ emmp_header_from_xmldoc (xmlDocPtr doc)
struct _EMMailerPrefsHeader *h;
xmlNodePtr root;
xmlChar *name;
-
+
if (doc == NULL)
return NULL;
-
+
root = doc->children;
if (strcmp ((char *)root->name, "header") != 0)
return NULL;
-
+
name = xmlGetProp (root, (const unsigned char *)"name");
if (name == NULL)
return NULL;
-
+
h = g_malloc0 (sizeof (struct _EMMailerPrefsHeader));
h->name = g_strdup ((gchar *)name);
xmlFree (name);
-
+
if (xmlHasProp (root, (const unsigned char *)"enabled"))
h->enabled = 1;
else
h->enabled = 0;
-
+
return h;
}
@@ -1281,9 +1281,9 @@ emmp_header_from_xmldoc (xmlDocPtr doc)
* em_mailer_prefs_header_from_xml
* @xml: XML configuration data
*
- * Parses passed XML data, which should be of
- * the format <header name="foo" enabled />, and
- * returns a EMMailerPrefs structure, or NULL if there
+ * Parses passed XML data, which should be of
+ * the format <header name="foo" enabled />, and
+ * returns a EMMailerPrefs structure, or NULL if there
* is an error.
**/
struct _EMMailerPrefsHeader *
@@ -1291,13 +1291,13 @@ em_mailer_prefs_header_from_xml (const char *xml)
{
struct _EMMailerPrefsHeader *header;
xmlDocPtr doc;
-
+
if (!(doc = xmlParseDoc ((unsigned char *) xml)))
return NULL;
-
+
header = emmp_header_from_xmldoc (doc);
xmlFreeDoc (doc);
-
+
return header;
}
@@ -1305,7 +1305,7 @@ em_mailer_prefs_header_from_xml (const char *xml)
* em_mailer_prefs_header_free
* @header: header to free
*
- * Frees the memory associated with the passed header
+ * Frees the memory associated with the passed header
* structure.
*/
void
@@ -1313,7 +1313,7 @@ em_mailer_prefs_header_free (struct _EMMailerPrefsHeader *header)
{
if (header == NULL)
return;
-
+
g_free (header->name);
g_free (header);
}
@@ -1322,7 +1322,7 @@ em_mailer_prefs_header_free (struct _EMMailerPrefsHeader *header)
* em_mailer_prefs_header_to_xml
* @header: header from which to generate XML
*
- * Returns the passed header as a XML structure,
+ * Returns the passed header as a XML structure,
* or NULL on error
*/
char *
@@ -1333,25 +1333,25 @@ em_mailer_prefs_header_to_xml (struct _EMMailerPrefsHeader *header)
xmlChar *xml;
char *out;
int size;
-
+
g_return_val_if_fail (header != NULL, NULL);
g_return_val_if_fail (header->name != NULL, NULL);
-
+
doc = xmlNewDoc ((const unsigned char *)"1.0");
-
+
root = xmlNewDocNode (doc, NULL, (const unsigned char *)"header", NULL);
xmlSetProp (root, (const unsigned char *)"name", (unsigned char *)header->name);
if (header->enabled)
xmlSetProp (root, (const unsigned char *)"enabled", NULL);
-
+
xmlDocSetRootElement (doc, root);
xmlDocDumpMemory (doc, &xml, &size);
xmlFreeDoc (doc);
-
+
out = g_malloc (size + 1);
memcpy (out, xml, size);
out[size] = '\0';
xmlFree (xml);
-
+
return out;
}
diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h
index fe3bb13003..163d6f9406 100644
--- a/mail/em-mailer-prefs.h
+++ b/mail/em-mailer-prefs.h
@@ -62,14 +62,14 @@ struct _EMMailerPrefsHeader {
struct _EMMailerPrefs {
GtkVBox parent_object;
-
+
GNOME_Evolution_Shell shell;
-
+
struct _GladeXML *gui;
struct _GConfClient *gconf;
-
+
/* General tab */
-
+
/* Message Display */
struct _GtkToggleButton *timeout_toggle;
struct _GtkSpinButton *timeout;
@@ -80,28 +80,28 @@ struct _EMMailerPrefs {
struct _GtkOptionMenu *charset;
struct _GtkToggleButton *citation_highlight;
struct _GtkColorButton *citation_color;
-
+
/* Deleting Mail */
struct _GtkToggleButton *empty_trash;
struct _GtkOptionMenu *empty_trash_days;
struct _GtkToggleButton *confirm_expunge;
-
+
/* New Mail Notification */
struct _GtkToggleButton *notify_not;
struct _GtkToggleButton *notify_beep;
struct _GtkToggleButton *notify_play_sound;
struct _GtkFileChooserButton *notify_sound_file;
-
+
/* HTML Mail tab */
struct _GtkFontButton *font_variable;
struct _GtkFontButton *font_fixed;
struct _GtkToggleButton *font_share;
-
+
/* Loading Images */
struct _GtkToggleButton *images_always;
struct _GtkToggleButton *images_sometimes;
struct _GtkToggleButton *images_never;
-
+
struct _GtkToggleButton *show_animated;
struct _GtkToggleButton *autodetect_links;
struct _GtkToggleButton *prompt_unwanted_html;
@@ -126,7 +126,7 @@ struct _EMMailerPrefs {
struct _GtkToggleButton *check_incoming;
struct _GtkToggleButton *empty_junk;
struct _GtkOptionMenu *empty_junk_days;
-
+
struct _GtkToggleButton *sa_local_tests_only;
struct _GtkToggleButton *sa_use_daemon;
struct _GtkComboBox *default_junk_plugin;
@@ -136,9 +136,9 @@ struct _EMMailerPrefs {
struct _EMMailerPrefsClass {
GtkVBoxClass parent_class;
-
+
/* signals */
-
+
};
GtkType em_mailer_prefs_get_type (void);
diff --git a/mail/em-menu.c b/mail/em-menu.c
index 2f4aa43ad2..69fc7839f8 100644
--- a/mail/em-menu.c
+++ b/mail/em-menu.c
@@ -139,12 +139,12 @@ EMMenu *em_menu_new(const char *menuid)
/**
* em_menu_target_new_select:
* @folder: The selection will ref this for the life of it.
- * @folder_uri:
+ * @folder_uri:
* @uids: The selection will free this when done with it.
- *
+ *
* Create a new selection popup target.
- *
- * Return value:
+ *
+ * Return value:
**/
EMMenuTargetSelect *
em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids)
@@ -168,10 +168,10 @@ em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *
camel_object_ref(folder);
mask &= ~EM_MENU_SELECT_FOLDER;
-
+
if (em_utils_folder_is_sent(folder, folder_uri))
mask &= ~EM_MENU_SELECT_EDIT;
-
+
if (!(em_utils_folder_is_drafts(folder, folder_uri)
|| em_utils_folder_is_outbox(folder, folder_uri))
&& uids->len == 1)
@@ -196,7 +196,7 @@ em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *
mask &= ~EM_MENU_SELECT_MARK_UNREAD;
else
mask &= ~EM_MENU_SELECT_MARK_READ;
-
+
if (flags & CAMEL_MESSAGE_DELETED)
mask &= ~EM_MENU_SELECT_UNDELETE;
else
@@ -211,7 +211,7 @@ em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *
mask &= ~EM_MENU_SELECT_MARK_NOJUNK;
else
mask &= ~EM_MENU_SELECT_MARK_JUNK;
-
+
tmp = camel_message_info_user_tag(info, "follow-up");
if (tmp && *tmp) {
mask &= ~EM_MENU_SELECT_FLAG_CLEAR;
@@ -236,12 +236,12 @@ em_menu_target_new_select(EMMenu *emp, struct _CamelFolder *folder, const char *
/**
* em_menu_target_new_window:
- * @emp:
- * @window:
- *
+ * @emp:
+ * @window:
+ *
* create a dummy target which references some sort of widget.
- *
- * Return value:
+ *
+ * Return value:
**/
EMMenuTargetWidget *
em_menu_target_new_widget(EMMenu *emp, struct _GtkWidget *w)
@@ -352,7 +352,7 @@ GType
em_menu_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMMenuHookClass), NULL, NULL, (GClassInitFunc) emph_class_init, NULL, NULL,
@@ -362,6 +362,6 @@ em_menu_hook_get_type(void)
emph_parent_class = g_type_class_ref(e_menu_hook_get_type());
type = g_type_register_static(e_menu_hook_get_type(), "EMMenuHook", &info, 0);
}
-
+
return type;
}
diff --git a/mail/em-message-browser.c b/mail/em-message-browser.c
index 5a963ef3bf..ef6e68b390 100644
--- a/mail/em-message-browser.c
+++ b/mail/em-message-browser.c
@@ -141,11 +141,11 @@ static void
emmb_class_init(GObjectClass *klass)
{
klass->finalize = emmb_finalise;
-
+
((GtkObjectClass *)klass)->destroy = emmb_destroy;
-
+
((EMFolderViewClass *) klass)->update_message_style = FALSE;
-
+
((EMFolderViewClass *)klass)->set_message = emmb_set_message;
((EMFolderViewClass *)klass)->activate = emmb_activate;
}
@@ -177,10 +177,10 @@ static void
window_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
GConfClient *gconf;
-
+
/* save to in-memory variable for current session access */
window_size = *allocation;
-
+
/* save the setting across sessions */
gconf = gconf_client_get_default ();
gconf_client_set_int (gconf, "/apps/evolution/mail/message_window/width", window_size.width, NULL);
@@ -193,7 +193,7 @@ emmb_list_message_selected (struct _MessageList *ml, const char *uid, EMMessageB
{
EMFolderView *emfv = (EMFolderView *) emmb;
CamelMessageInfo *info;
-
+
if (uid && (info = camel_folder_get_message_info (emfv->folder, uid))) {
gtk_window_set_title ((GtkWindow *) emmb->window, camel_message_info_subject (info));
gtk_widget_grab_focus ((GtkWidget *) (emmb->view.preview->formathtml.html));
@@ -222,10 +222,10 @@ messagebrowser_key_pressed (EMMessageBrowser *emmb, GdkEventKey *event, void *us
{
if (event->keyval == GDK_Escape) {
gtk_widget_destroy(gtk_widget_get_toplevel((GtkWidget *)emmb));
- g_signal_stop_emission_by_name (emmb, "key-press-event");
+ g_signal_stop_emission_by_name (emmb, "key-press-event");
return TRUE;
}
-
+
return FALSE;
}
@@ -246,34 +246,34 @@ GtkWidget *em_message_browser_window_new(void)
bonobo_ui_component_set_container(uic, BONOBO_OBJREF(uicont), NULL);
em_folder_view_activate((EMFolderView *)emmb, uic, TRUE);
-
+
if (window_size.width == 0) {
/* initialize @window_size with the previous session's size */
GConfClient *gconf;
GError *err = NULL;
-
+
gconf = gconf_client_get_default ();
-
+
window_size.width = gconf_client_get_int (gconf, "/apps/evolution/mail/message_window/width", &err);
if (err != NULL) {
window_size.width = DEFAULT_WIDTH;
g_clear_error (&err);
}
-
+
window_size.height = gconf_client_get_int (gconf, "/apps/evolution/mail/message_window/height", &err);
if (err != NULL) {
window_size.height = DEFAULT_HEIGHT;
g_clear_error (&err);
}
-
+
g_object_unref (gconf);
}
-
+
gtk_window_set_default_size ((GtkWindow *) emmb->window, window_size.width, window_size.height);
g_signal_connect (emmb->window, "size-allocate", G_CALLBACK (window_size_allocate), NULL);
g_signal_connect (((EMFolderView *) emmb)->list, "message_selected", G_CALLBACK (emmb_list_message_selected), emmb);
- g_signal_connect (emmb, "key-press-event" , G_CALLBACK (messagebrowser_key_pressed), NULL);
-
+ g_signal_connect (emmb, "key-press-event" , G_CALLBACK (messagebrowser_key_pressed), NULL);
+
/* cleanup? */
return (GtkWidget *)emmb;
@@ -286,19 +286,19 @@ emmb_set_message(EMFolderView *emfv, const char *uid, int nomarkseen)
{
EMMessageBrowser *emmb = (EMMessageBrowser *) emfv;
CamelMessageInfo *info;
-
+
emmb_parent->set_message(emfv, uid, nomarkseen);
-
+
if (uid == NULL) {
gtk_widget_destroy((GtkWidget *)emfv);
return;
}
-
+
if ((info = camel_folder_get_message_info (emfv->folder, uid))) {
gtk_window_set_title ((GtkWindow *) emmb->window, camel_message_info_subject (info));
camel_folder_free_message_info (emfv->folder, info);
}
-
+
/* Well we don't know if it got displayed (yet) ... but whatever ... */
if (!nomarkseen)
camel_folder_set_message_flags(emfv->folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
@@ -327,7 +327,7 @@ emmb_activate(EMFolderView *emfv, BonoboUIComponent *uic, int state)
bonobo_ui_component_set_prop(uic, "/commands/EditPaste", "sensitive", "0", NULL);
} else {
const BonoboUIVerb *v;
-
+
for (v = &emmb_verbs[0]; v->cname; v++)
bonobo_ui_component_remove_verb(uic, v->cname);
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index c290b60330..1c64c5e659 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -86,15 +86,15 @@ emm_load_xml (const char *dirname, const char *filename)
xmlDocPtr doc;
struct stat st;
char *path;
-
+
path = g_strdup_printf ("%s/%s", dirname, filename);
if (stat (path, &st) == -1 || !(doc = xmlParseFile (path))) {
g_free (path);
return NULL;
}
-
+
g_free (path);
-
+
return doc;
}
@@ -103,11 +103,11 @@ emm_save_xml (xmlDocPtr doc, const char *dirname, const char *filename)
{
char *path;
int retval;
-
+
path = g_strdup_printf ("%s/%s", dirname, filename);
retval = e_xml_save_file (path, doc);
g_free (path);
-
+
return retval;
}
@@ -115,15 +115,15 @@ static xmlNodePtr
xml_find_node (xmlNodePtr parent, const char *name)
{
xmlNodePtr node;
-
+
node = parent->children;
while (node != NULL) {
if (node->name && !strcmp ((char *)node->name, name))
return node;
-
+
node = node->next;
}
-
+
return NULL;
}
@@ -132,25 +132,25 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
{
xmlNodePtr root, node;
char *uri, *new;
-
+
if (!doc || !(root = xmlDocGetRootElement (doc)))
return;
-
+
if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) {
/* root node is not <filteroptions>, nothing to upgrade */
return;
}
-
+
if (!(node = xml_find_node (root, "ruleset"))) {
/* no ruleset node, nothing to upgrade */
return;
}
-
+
node = node->children;
while (node != NULL) {
if (node->name && !strcmp ((char *)node->name, "rule")) {
xmlNodePtr actionset, part, val, n;
-
+
if ((actionset = xml_find_node (node, "actionset"))) {
/* filters.xml */
part = actionset->children;
@@ -160,26 +160,26 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
while (val != NULL) {
if (val->name && !strcmp ((char *)val->name, "value")) {
char *type;
-
+
type = (char *)xmlGetProp (val, (const unsigned char *)"type");
if (type && !strcmp ((char *)type, "folder")) {
if ((n = xml_find_node (val, "folder"))) {
uri = (char *)xmlGetProp (n, (const unsigned char *)"uri");
new = upgrade_uri (uri);
xmlFree (uri);
-
+
xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new);
g_free (new);
}
}
-
+
xmlFree (type);
}
-
+
val = val->next;
}
}
-
+
part = part->next;
}
} else if ((actionset = xml_find_node (node, "sources"))) {
@@ -190,16 +190,16 @@ upgrade_xml_uris (xmlDocPtr doc, char * (* upgrade_uri) (const char *uri))
uri = (char *)xmlGetProp (n, (const unsigned char *)"uri");
new = upgrade_uri (uri);
xmlFree (uri);
-
+
xmlSetProp (n, (const unsigned char *)"uri", (unsigned char *)new);
g_free (new);
}
-
+
n = n->next;
}
}
}
-
+
node = node->next;
}
}
@@ -255,7 +255,7 @@ static char *
get_base_uri(const char *val)
{
const char *tmp;
-
+
tmp = strchr(val, ':');
if (tmp) {
tmp++;
@@ -263,7 +263,7 @@ get_base_uri(const char *val)
tmp += 2;
tmp = strchr(tmp, '/');
}
-
+
if (tmp)
return g_strndup(val, tmp-val);
else
@@ -274,21 +274,21 @@ static char *
upgrade_xml_uris_1_0 (const char *uri)
{
char *out = NULL;
-
+
/* upgrades camel uri's */
if (strncmp (uri, "imap:", 5) == 0) {
char *base_uri, dir_sep, *folder, *p;
struct _account_info_1_0 *ai;
-
+
/* add namespace, canonicalise dir_sep to / */
base_uri = get_base_uri (uri);
ai = g_hash_table_lookup (accounts_1_0, base_uri);
-
+
if (ai == NULL) {
g_free (base_uri);
return NULL;
}
-
+
dir_sep = ai->u.imap.dir_sep;
if (dir_sep == 0) {
/* no dir_sep listed, try get it from the namespace, if set */
@@ -304,34 +304,34 @@ upgrade_xml_uris_1_0 (const char *uri)
p++;
}
}
-
+
/* give up ... */
if (dir_sep == 0) {
g_free (base_uri);
return NULL;
}
}
-
+
folder = g_strdup (uri + strlen (base_uri) + 1);
-
+
/* Add the namespace before the mailbox name, unless the mailbox is INBOX */
if (ai->u.imap.namespace && strcmp ((char *)folder, "INBOX") != 0)
out = g_strdup_printf ("%s/%s/%s", base_uri, ai->u.imap.namespace, folder);
else
out = g_strdup_printf ("%s/%s", base_uri, folder);
-
+
p = out;
while (*p) {
if (*p == dir_sep)
*p = '/';
p++;
}
-
+
g_free (folder);
g_free (base_uri);
} else if (strncmp (uri, "exchange:", 9) == 0) {
char *base_uri, *folder, *p;
-
+
/* exchange://user@host/exchange/ * -> exchange://user@host/personal/ * */
/* Any url encoding (%xx) in the folder name is also removed */
base_uri = get_base_uri (uri);
@@ -346,7 +346,7 @@ upgrade_xml_uris_1_0 (const char *uri)
/* these should be converted in the accounts table when it is loaded */
g_warning ("exchanget: uri not converted: '%s'", uri);
}
-
+
return out;
}
@@ -357,7 +357,7 @@ parse_lsub (const char *lsub, char *dir_sep)
static regex_t pat;
regmatch_t match[3];
char *m = "^\\* LSUB \\([^)]*\\) \"?([^\" ]+)\"? \"?(.*)\"?$";
-
+
if (!comp) {
if (regcomp (&pat, m, REG_EXTENDED|REG_ICASE) == -1) {
g_warning ("reg comp '%s' failed: %s", m, g_strerror (errno));
@@ -365,7 +365,7 @@ parse_lsub (const char *lsub, char *dir_sep)
}
comp = 1;
}
-
+
if (regexec (&pat, lsub, 3, match, 0) == 0) {
if (match[1].rm_so != -1 && match[2].rm_so != -1) {
if (dir_sep)
@@ -373,7 +373,7 @@ parse_lsub (const char *lsub, char *dir_sep)
return g_strndup (lsub + match[2].rm_so, match[2].rm_eo - match[2].rm_so);
}
}
-
+
return NULL;
}
@@ -384,19 +384,19 @@ read_imap_storeinfo (struct _account_info_1_0 *si)
guint32 tmp;
char *buf, *folder, dir_sep, *path, *name, *p;
struct _imap_folder_info_1_0 *fi;
-
+
si->u.imap.folders = g_hash_table_new_full (
g_str_hash, g_str_equal,
(GDestroyNotify) NULL,
(GDestroyNotify) imap_folder_info_1_0_free);
-
+
/* get details from uri first */
name = strstr (si->uri, ";override_namespace");
if (name) {
name = strstr (si->uri, ";namespace=");
if (name) {
char *end;
-
+
name += strlen (";namespace=");
if (*name == '\"') {
name++;
@@ -404,11 +404,11 @@ read_imap_storeinfo (struct _account_info_1_0 *si)
} else {
end = strchr (name, ';');
}
-
+
if (end) {
/* try get the dir_sep from the namespace */
si->u.imap.namespace = g_strndup (name, end-name);
-
+
p = si->u.imap.namespace;
while ((dir_sep = *p++)) {
if (dir_sep < '0'
@@ -423,7 +423,7 @@ read_imap_storeinfo (struct _account_info_1_0 *si)
}
}
}
-
+
/* now load storeinfo if it exists */
path = g_build_filename (g_get_home_dir (), "evolution", "mail", "imap", si->base_uri + 7, "storeinfo", NULL);
storeinfo = fopen (path, "r");
@@ -432,7 +432,7 @@ read_imap_storeinfo (struct _account_info_1_0 *si)
g_warning ("could not find imap store info '%s'", path);
return -1;
}
-
+
/* ignore version */
camel_file_util_decode_uint32 (storeinfo, &tmp);
camel_file_util_decode_uint32 (storeinfo, &si->u.imap.capabilities);
@@ -446,9 +446,9 @@ read_imap_storeinfo (struct _account_info_1_0 *si)
|| si->u.imap.namespace[strlen (si->u.imap.namespace) - 1] == '/')) {
si->u.imap.namespace[strlen (si->u.imap.namespace) - 1] = 0;
}
-
+
d(printf ("namespace '%s' dir_sep '%c'\n", si->u.imap.namespace, si->u.imap.dir_sep ? si->u.imap.dir_sep : '?'));
-
+
while (camel_file_util_decode_string (storeinfo, &buf) == 0) {
folder = parse_lsub (buf, &dir_sep);
if (folder) {
@@ -467,9 +467,9 @@ read_imap_storeinfo (struct _account_info_1_0 *si)
g_warning ("Could not parse LIST result '%s'\n", buf);
}
}
-
+
fclose (storeinfo);
-
+
return 0;
}
@@ -480,37 +480,37 @@ load_accounts_1_0 (xmlDocPtr doc)
char *val, *tmp;
int count = 0, i;
char key[32];
-
+
if (!(source = e_bconf_get_path (doc, "/Mail/Accounts")))
return 0;
-
+
if ((val = e_bconf_get_value (source, "num"))) {
count = atoi (val);
xmlFree (val);
}
-
+
/* load account upgrade info for each account */
for (i = 0; i < count; i++) {
struct _account_info_1_0 *ai;
char *rawuri;
-
+
sprintf (key, "source_url_%d", i);
if (!(rawuri = e_bconf_get_value (source, key)))
continue;
-
+
ai = g_malloc0 (sizeof (struct _account_info_1_0));
ai->uri = e_bconf_hex_decode (rawuri);
ai->base_uri = get_base_uri (ai->uri);
sprintf (key, "account_name_%d", i);
ai->name = e_bconf_get_string (source, key);
-
+
d(printf("load account '%s'\n", ai->uri));
-
+
if (!strncmp (ai->uri, "imap:", 5)) {
read_imap_storeinfo (ai);
} else if (!strncmp (ai->uri, "exchange:", 9)) {
xmlNodePtr node;
-
+
d(printf (" upgrade exchange account\n"));
/* small hack, poke the source_url into the transport_url for exchanget: transports
- this will be picked up later in the conversion */
@@ -527,12 +527,12 @@ load_accounts_1_0 (xmlDocPtr doc)
}
}
xmlFree (rawuri);
-
+
g_hash_table_insert (accounts_1_0, ai->base_uri, ai);
if (ai->name)
g_hash_table_insert (accounts_name_1_0, ai->name, ai);
}
-
+
return 0;
}
@@ -543,15 +543,15 @@ em_migrate_1_0 (const char *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr fil
g_str_hash, g_str_equal,
(GDestroyNotify) NULL,
(GDestroyNotify) account_info_1_0_free);
- accounts_name_1_0 = g_hash_table_new (g_str_hash, g_str_equal);
+ accounts_name_1_0 = g_hash_table_new (g_str_hash, g_str_equal);
load_accounts_1_0 (config_xmldb);
upgrade_xml_uris(filters, upgrade_xml_uris_1_0);
upgrade_xml_uris(vfolders, upgrade_xml_uris_1_0);
-
+
g_hash_table_destroy (accounts_1_0);
g_hash_table_destroy (accounts_name_1_0);
-
+
return 0;
}
@@ -562,7 +562,7 @@ is_xml1encoded (const char *txt)
const unsigned char *p;
int isxml1 = FALSE;
int is8bit = FALSE;
-
+
p = (const unsigned char *)txt;
while (*p) {
if (p[0] == '\\' && p[1] == 'U' && p[2] == '+'
@@ -574,11 +574,11 @@ is_xml1encoded (const char *txt)
is8bit = TRUE;
p++;
}
-
+
/* check for invalid utf8 that needs cleaning */
if (is8bit && !isxml1)
isxml1 = !g_utf8_validate (txt, -1, NULL);
-
+
return isxml1;
}
@@ -588,11 +588,11 @@ decode_xml1 (const char *txt)
GString *out = g_string_new ("");
const unsigned char *p;
char *res;
-
+
/* convert:
\U+XXXX\ -> utf8
8 bit characters -> utf8 (iso-8859-1) */
-
+
p = (const unsigned char *) txt;
while (*p) {
if (p[0] > 0x80
@@ -601,7 +601,7 @@ decode_xml1 (const char *txt)
&& p[7] == '\\')) {
char utf8[8];
gunichar u;
-
+
if (p[0] == '\\') {
memcpy (utf8, p + 3, 4);
utf8[4] = 0;
@@ -616,10 +616,10 @@ decode_xml1 (const char *txt)
}
p++;
}
-
+
res = out->str;
g_string_free (out, FALSE);
-
+
return res;
}
@@ -629,17 +629,17 @@ utf8_reencode (const char *txt)
GString *out = g_string_new ("");
gchar *p;
char *res;
-
+
/* convert:
libxml1 8 bit utf8 converted to xml entities byte-by-byte chars -> utf8 */
-
+
p = (gchar *)txt;
-
+
while (*p) {
g_string_append_c (out, (gchar)g_utf8_get_char ((const gchar *)p));
p = (gchar *)g_utf8_next_char (p);
}
-
+
res = out->str;
if (g_utf8_validate (res, -1, NULL)) {
g_string_free (out, FALSE);
@@ -669,9 +669,9 @@ upgrade_xml_1_2_rec (xmlNodePtr node)
xmlNodePtr work;
int i,j;
char *txt, *tmp;
-
+
/* upgrades the content of a node, if the node has a specific parent/node name */
-
+
for (i = 0; tags[i].name; i++) {
if (!strcmp ((char *)node->name, tags[i].name)) {
if (tags[i].tags != NULL) {
@@ -694,7 +694,7 @@ upgrade_xml_1_2_rec (xmlNodePtr node)
}
break;
}
-
+
if (tags[i].props != NULL) {
for (j = 0; tags[i].props[j]; j++) {
txt = (char *)xmlGetProp (node, (unsigned char *)tags[i].props[j]);
@@ -708,13 +708,13 @@ upgrade_xml_1_2_rec (xmlNodePtr node)
}
}
}
-
+
node = node->children;
while (node) {
upgrade_xml_1_2_rec (node);
node = node->next;
}
-
+
return 0;
}
@@ -722,10 +722,10 @@ static int
em_upgrade_xml_1_2 (xmlDocPtr doc)
{
xmlNodePtr root;
-
+
if (!doc || !(root = xmlDocGetRootElement (doc)))
return 0;
-
+
return upgrade_xml_1_2_rec (root);
}
@@ -771,7 +771,7 @@ upgrade_passwords_1_2(void)
if (!strcmp((char *)entry->name, "entry")) {
char *namep = (char *)xmlGetProp(entry, (const unsigned char *)"name"),
*valuep = (char *)xmlGetProp(entry, (const unsigned char *)"value");
-
+
if (namep && valuep) {
char *value = e_bconf_hex_decode(valuep);
guchar *decoded;
@@ -1038,11 +1038,11 @@ static e_gconf_map_list_t gconf_remap_list[] = {
{ "/Mail/Notify", mail_notify_map },
{ "/Mail/Filesel", mail_filesel_map },
{ "/Mail/Composer", mail_composer_map },
-
+
{ "/Importer/Elm", importer_elm_map },
{ "/Importer/Pine", importer_pine_map },
{ "/Importer/Netscape", importer_netscape_map },
-
+
{ 0 },
};
@@ -1066,9 +1066,9 @@ bconf_import(GConfClient *gconf, xmlDocPtr config_xmldb)
char *val, *lab, *col;
GSList *list, *l;
int i;
-
+
e_bconf_import(gconf, config_xmldb, gconf_remap_list);
-
+
/* Labels:
label string + label colour as integer
-> label string:# colour as hex */
@@ -1084,12 +1084,12 @@ bconf_import(GConfClient *gconf, xmlDocPtr config_xmldb)
g_free(col);
} else
strcpy(colx, label_default[i].colour);
-
+
val = g_strdup_printf("%s:%s", lab ? lab : label_default[i].label, colx);
list = g_slist_append(list, val);
g_free(lab);
}
-
+
gconf_client_set_list(gconf, "/apps/evolution/mail/labels", GCONF_VALUE_STRING, list, NULL);
while (list) {
l = list->next;
@@ -1100,15 +1100,15 @@ bconf_import(GConfClient *gconf, xmlDocPtr config_xmldb)
} else {
g_warning("could not find /Mail/Labels in old config database, skipping");
}
-
+
/* Accounts: The flat bonobo-config structure is remapped to a list of xml blobs. Upgrades as necessary */
e_bconf_import_xml_blob(gconf, config_xmldb, account_map, "/Mail/Accounts",
"/apps/evolution/mail/accounts", "account", "uid");
-
+
/* Same for signatures */
e_bconf_import_xml_blob(gconf, config_xmldb, signature_map, "/Mail/Signatures",
"/apps/evolution/mail/signatures", "signature", NULL);
-
+
return 0;
}
@@ -1116,11 +1116,11 @@ static int
em_migrate_1_2(const char *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr filters, xmlDocPtr vfolders, CamelException *ex)
{
GConfClient *gconf;
-
+
gconf = gconf_client_get_default();
bconf_import(gconf, config_xmldb);
g_object_unref(gconf);
-
+
em_upgrade_xml_1_2(filters);
em_upgrade_xml_1_2(vfolders);
upgrade_passwords_1_2();
@@ -1137,14 +1137,14 @@ em_migrate_1_2(const char *evolution_dir, xmlDocPtr config_xmldb, xmlDocPtr filt
typedef struct _EMMigrateSession {
CamelSession parent_object;
-
+
CamelStore *store; /* new folder tree store */
char *srcdir; /* old folder tree path */
} EMMigrateSession;
typedef struct _EMMigrateSessionClass {
CamelSessionClass parent_class;
-
+
} EMMigrateSessionClass;
static CamelType em_migrate_session_get_type (void);
@@ -1160,7 +1160,7 @@ static CamelType
em_migrate_session_get_type (void)
{
static CamelType type = CAMEL_INVALID_TYPE;
-
+
if (type == CAMEL_INVALID_TYPE) {
type = camel_type_register (
camel_session_get_type (),
@@ -1172,7 +1172,7 @@ em_migrate_session_get_type (void)
NULL,
NULL);
}
-
+
return type;
}
@@ -1180,11 +1180,11 @@ static CamelSession *
em_migrate_session_new (const char *path)
{
CamelSession *session;
-
+
session = CAMEL_SESSION (camel_object_new (EM_MIGRATE_SESSION_TYPE));
-
+
camel_session_construct (session, path);
-
+
return session;
}
@@ -1197,35 +1197,35 @@ static void
em_migrate_setup_progress_dialog (void)
{
GtkWidget *vbox, *hbox, *w;
-
+
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title ((GtkWindow *) window, _("Migrating..."));
gtk_window_set_modal ((GtkWindow *) window, TRUE);
gtk_container_set_border_width ((GtkContainer *) window, 6);
-
+
vbox = gtk_vbox_new (FALSE, 6);
gtk_widget_show (vbox);
gtk_container_add ((GtkContainer *) window, vbox);
-
+
w = gtk_label_new (_("The location and hierarchy of the Evolution mailbox "
"folders has changed since Evolution 1.x.\n\nPlease be "
"patient while Evolution migrates your folders..."));
gtk_label_set_line_wrap ((GtkLabel *) w, TRUE);
gtk_widget_show (w);
gtk_box_pack_start_defaults ((GtkBox *) vbox, w);
-
+
hbox = gtk_hbox_new (FALSE, 6);
gtk_widget_show (hbox);
gtk_box_pack_start_defaults ((GtkBox *) vbox, hbox);
-
+
label = (GtkLabel *) gtk_label_new ("");
gtk_widget_show ((GtkWidget *) label);
gtk_box_pack_start_defaults ((GtkBox *) hbox, (GtkWidget *) label);
-
+
progress = (GtkProgressBar *) gtk_progress_bar_new ();
gtk_widget_show ((GtkWidget *) progress);
gtk_box_pack_start_defaults ((GtkBox *) hbox, (GtkWidget *) progress);
-
+
gtk_widget_show (window);
}
@@ -1239,13 +1239,13 @@ static void
em_migrate_set_folder_name (const char *folder_name)
{
char *text;
-
+
text = g_strdup_printf (_("Migrating `%s':"), folder_name);
gtk_label_set_text (label, text);
g_free (text);
-
+
gtk_progress_bar_set_fraction (progress, 0.0);
-
+
while (gtk_events_pending ())
gtk_main_iteration ();
}
@@ -1254,12 +1254,12 @@ static void
em_migrate_set_progress (double percent)
{
char text[5];
-
+
snprintf (text, sizeof (text), "%d%%", (int) (percent * 100.0f));
-
+
gtk_progress_bar_set_fraction (progress, percent);
gtk_progress_bar_set_text (progress, text);
-
+
while (gtk_events_pending ())
gtk_main_iteration ();
}
@@ -1270,24 +1270,24 @@ is_mail_folder (const char *metadata)
xmlNodePtr node;
xmlDocPtr doc;
char *type;
-
+
if (!(doc = xmlParseFile (metadata))) {
g_warning ("Cannot parse `%s'", metadata);
return FALSE;
}
-
+
if (!(node = xmlDocGetRootElement (doc))) {
g_warning ("`%s' corrupt: document contains no root node", metadata);
xmlFreeDoc (doc);
return FALSE;
}
-
+
if (!node->name || strcmp ((char *)node->name, "efolder") != 0) {
g_warning ("`%s' corrupt: root node is not 'efolder'", metadata);
xmlFreeDoc (doc);
return FALSE;
}
-
+
node = node->children;
while (node != NULL) {
if (node->name && !strcmp ((char *)node->name, "type")) {
@@ -1295,20 +1295,20 @@ is_mail_folder (const char *metadata)
if (!strcmp ((char *)type, "mail")) {
xmlFreeDoc (doc);
xmlFree (type);
-
+
return TRUE;
}
-
+
xmlFree (type);
-
+
break;
}
-
+
node = node->next;
}
-
+
xmlFreeDoc (doc);
-
+
return FALSE;
}
@@ -1320,38 +1320,38 @@ get_local_et_expanded (const char *dirname)
struct stat st;
char *buf, *p;
int thread_list;
-
+
buf = g_strdup_printf ("%s/evolution/config/file:%s", g_get_home_dir (), dirname);
p = buf + strlen (g_get_home_dir ()) + strlen ("/evolution/config/file:");
e_filename_make_safe (p);
-
+
if (stat (buf, &st) == -1) {
g_free (buf);
return -1;
}
-
+
if (!(doc = xmlParseFile (buf))) {
g_free (buf);
return -1;
}
-
+
g_free (buf);
-
+
if (!(node = xmlDocGetRootElement (doc)) || strcmp ((char *)node->name, "expanded_state") != 0) {
xmlFreeDoc (doc);
return -1;
}
-
+
if (!(buf = (char *)xmlGetProp (node, (const unsigned char *)"default"))) {
xmlFreeDoc (doc);
return -1;
}
-
+
thread_list = strcmp (buf, "0") == 0 ? 0 : 1;
xmlFree (buf);
-
+
xmlFreeDoc (doc);
-
+
return thread_list;
}
@@ -1383,7 +1383,7 @@ get_local_store_uri (const char *dirname, char **namep, int *indexp)
node = doc->children;
if (strcmp((char *)node->name, "folderinfo"))
goto dodefault;
-
+
for (node = node->children; node; node = node->next) {
if (node->name && !strcmp ((char *)node->name, "folder")) {
tmp = (char *)xmlGetProp (node, (const unsigned char *)"type");
@@ -1446,7 +1446,7 @@ cp (const char *src, const char *dest, gboolean show_progress, int mode)
errno = EEXIST;
return -1;
}
-
+
if (g_stat (src, &st) == -1
|| (readfd = g_open (src, O_RDONLY | O_BINARY, 0)) == -1)
return -1;
@@ -1457,58 +1457,58 @@ cp (const char *src, const char *dest, gboolean show_progress, int mode)
errno = errnosav;
return -1;
}
-
+
do {
do {
nread = read (readfd, readbuf, sizeof (readbuf));
} while (nread == -1 && errno == EINTR);
-
+
if (nread == 0)
break;
else if (nread < 0)
goto exception;
-
+
do {
nwritten = write (writefd, readbuf, nread);
} while (nwritten == -1 && errno == EINTR);
-
+
if (nwritten < nread)
goto exception;
-
+
total += nwritten;
-#ifndef G_OS_WIN32
+#ifndef G_OS_WIN32
if (show_progress)
em_migrate_set_progress (((double) total) / ((double) st.st_size));
#endif
} while (total < st.st_size);
-
+
if (fsync (writefd) == -1)
goto exception;
-
+
close (readfd);
if (close (writefd) == -1)
goto failclose;
-
+
ut.actime = st.st_atime;
ut.modtime = st.st_mtime;
utime (dest, &ut);
chmod (dest, st.st_mode);
-
+
return 0;
-
+
exception:
-
+
errnosav = errno;
close (readfd);
close (writefd);
errno = errnosav;
-
+
failclose:
-
+
errnosav = errno;
unlink (dest);
errno = errnosav;
-
+
return -1;
}
@@ -1522,46 +1522,46 @@ cp_r (const char *src, const char *dest, const char *pattern, int mode)
size_t slen, dlen;
struct stat st;
DIR *dir;
-
+
if (g_mkdir_with_parents (dest, 0777) == -1)
return -1;
-
+
if (!(dir = opendir (src)))
return -1;
-
+
srcpath = g_string_new (src);
g_string_append_c (srcpath, '/');
slen = srcpath->len;
-
+
destpath = g_string_new (dest);
g_string_append_c (destpath, '/');
dlen = destpath->len;
-
+
while ((dent = readdir (dir))) {
if (!strcmp (dent->d_name, ".") || !strcmp (dent->d_name, ".."))
continue;
-
+
g_string_truncate (srcpath, slen);
g_string_truncate (destpath, dlen);
-
+
g_string_append (srcpath, dent->d_name);
g_string_append (destpath, dent->d_name);
-
+
if (stat (srcpath->str, &st) == -1)
continue;
-
+
if (S_ISDIR (st.st_mode)) {
cp_r (srcpath->str, destpath->str, pattern, mode);
} else if (!pattern || !strcmp (dent->d_name, pattern)) {
cp (srcpath->str, destpath->str, FALSE, mode);
}
}
-
+
closedir (dir);
-
+
g_string_free (destpath, TRUE);
g_string_free (srcpath, TRUE);
-
+
return 0;
}
@@ -1570,7 +1570,7 @@ mbox_build_filename (GString *path, const char *toplevel_dir, const char *full_n
{
const char *start, *inptr = full_name;
int subdirs = 0;
-
+
while (*inptr != '\0') {
if (*inptr == '/')
subdirs++;
@@ -1579,19 +1579,19 @@ mbox_build_filename (GString *path, const char *toplevel_dir, const char *full_n
g_string_assign(path, toplevel_dir);
g_string_append_c (path, '/');
-
+
inptr = full_name;
while (*inptr != '\0') {
start = inptr;
while (*inptr != '/' && *inptr != '\0')
inptr++;
-
+
g_string_append_len (path, start, inptr - start);
-
+
if (*inptr == '/') {
g_string_append (path, ".sbd/");
inptr++;
-
+
/* strip extranaeous '/'s */
while (*inptr == '/')
inptr++;
@@ -1622,7 +1622,7 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
g_string_free(src, TRUE);
return 0;
}
-
+
dest = g_string_new("");
uri = get_local_store_uri(dirname, &name, &index);
em_migrate_set_folder_name (full_name);
@@ -1635,22 +1635,22 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
FILE *fp;
char *p;
int mode;
-
+
g_string_printf (src, "%s/%s", uri + 5, name);
mbox_build_filename (dest, ((CamelService *)session->store)->url->path, full_name);
p = strrchr (dest->str, '/');
*p = '\0';
-
+
slen = src->len;
dlen = dest->len;
-
+
if (g_mkdir_with_parents (dest->str, 0777) == -1 && errno != EEXIST) {
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
_("Unable to create new folder `%s': %s"),
dest->str, g_strerror(errno));
goto fatal;
}
-
+
*p = '/';
mode = CP_UNIQUE;
retry_copy:
@@ -1677,47 +1677,47 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
goto fatal;
}
ignore:
-
+
/* create a .cmeta file specifying to index and/or thread the folder */
g_string_truncate (dest, dlen);
g_string_append (dest, ".cmeta");
if ((fp = fopen (dest->str, "w")) != NULL) {
int fd = fileno (fp);
-
+
/* write the magic string */
if (fwrite ("CLMD", 4, 1, fp) != 1)
goto cmeta_err;
-
+
/* write the version (1) */
if (camel_file_util_encode_uint32 (fp, 1) == -1)
goto cmeta_err;
-
+
/* write the meta count */
if (camel_file_util_encode_uint32 (fp, thread_list != -1 ? 1 : 0) == -1)
goto cmeta_err;
-
+
if (thread_list != -1) {
if (camel_file_util_encode_string (fp, "evolution:thread_list") == -1)
goto cmeta_err;
-
+
if (camel_file_util_encode_string (fp, thread_list ? "1" : "0") == -1)
goto cmeta_err;
}
-
+
/* write the prop count (only prop is the index prop) */
if (camel_file_util_encode_uint32 (fp, 1) == -1)
goto cmeta_err;
-
+
/* write the index prop tag (== CAMEL_FOLDER_ARG_LAST|CAMEL_ARG_BOO) */
if (camel_file_util_encode_uint32 (fp, CAMEL_FOLDER_ARG_LAST|CAMEL_ARG_BOO) == -1)
goto cmeta_err;
-
+
/* write the index prop value */
if (camel_file_util_encode_uint32 (fp, 1) == -1)
goto cmeta_err;
-
+
fflush (fp);
-
+
if (fsync (fd) == -1) {
cmeta_err:
fclose (fp);
@@ -1726,12 +1726,12 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
fclose (fp);
}
}
-
+
/* copy over the metadata files */
for (i = 0; i < sizeof(meta_ext)/sizeof(meta_ext[0]); i++) {
g_string_truncate (src, slen);
g_string_truncate (dest, dlen);
-
+
g_string_append (src, meta_ext[i]);
g_string_append (dest, meta_ext[i]);
cp (src->str, dest->str, FALSE, CP_OVERWRITE);
@@ -1742,42 +1742,42 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
if (!(local_store = camel_session_get_store ((CamelSession *) session, uri, ex))
|| !(old_folder = camel_store_get_folder (local_store, name, 0, ex)))
goto fatal;
-
+
flags |= (index ? CAMEL_STORE_FOLDER_BODY_INDEX : 0);
if (!(new_folder = camel_store_get_folder (session->store, full_name, flags, ex)))
goto fatal;
-
+
if (thread_list != -1) {
camel_object_meta_set (new_folder, "evolution:thread_list", thread_list ? "1" : "0");
camel_object_state_write (new_folder);
}
-
+
uids = camel_folder_get_uids (old_folder);
for (i = 0; i < uids->len; i++) {
CamelMimeMessage *message;
CamelMessageInfo *info;
-
+
if (!(info = camel_folder_get_message_info (old_folder, uids->pdata[i])))
continue;
-
+
if (!(message = camel_folder_get_message (old_folder, uids->pdata[i], ex))) {
camel_folder_free_message_info (old_folder, info);
camel_folder_free_uids (old_folder, uids);
goto fatal;
}
-
+
camel_folder_append_message (new_folder, message, info, NULL, ex);
camel_folder_free_message_info (old_folder, info);
camel_object_unref (message);
-
+
if (camel_exception_is_set (ex))
break;
-
+
em_migrate_set_progress (((double) i + 1) / ((double) uids->len));
}
-
+
camel_folder_free_uids (old_folder, uids);
-
+
if (camel_exception_is_set (ex))
goto fatal;
}
@@ -1815,33 +1815,33 @@ em_migrate_dir (EMMigrateSession *session, const char *dirname, const char *full
g_free (path);
return 0;
}
-
+
if (!(dir = opendir (path))) {
g_free (path);
return 0;
}
-
+
while (res == 0 && (dent = readdir (dir))) {
char *full_path;
char *name;
if (dent->d_name[0] == '.')
continue;
-
+
full_path = g_strdup_printf ("%s/%s", path, dent->d_name);
if (stat (full_path, &st) == -1 || !S_ISDIR (st.st_mode)) {
g_free (full_path);
continue;
}
-
+
name = g_strdup_printf ("%s/%s", full_name, dent->d_name);
res = em_migrate_dir (session, full_path, name, ex);
g_free (full_path);
g_free (name);
}
-
+
closedir (dir);
-
+
g_free (path);
return res;
@@ -1861,27 +1861,27 @@ em_migrate_local_folders_1_4 (EMMigrateSession *session, CamelException *ex)
session->srcdir, g_strerror(errno));
return -1;
}
-
+
em_migrate_setup_progress_dialog ();
-
+
while (res == 0 && (dent = readdir (dir))) {
char *full_path;
-
+
if (dent->d_name[0] == '.')
continue;
-
+
full_path = g_strdup_printf ("%s/%s", session->srcdir, dent->d_name);
if (stat (full_path, &st) == -1 || !S_ISDIR (st.st_mode)) {
g_free (full_path);
continue;
}
-
+
res = em_migrate_dir (session, full_path, dent->d_name, ex);
g_free (full_path);
}
-
+
closedir (dir);
-
+
em_migrate_close_progress_dialog ();
return res;
@@ -1892,39 +1892,39 @@ upgrade_xml_uris_1_4 (const char *uri)
{
char *path, *prefix, *p;
CamelURL *url;
-
+
if (!strncmp (uri, "file:", 5)) {
url = camel_url_new (uri, NULL);
camel_url_set_protocol (url, "email");
camel_url_set_user (url, "local");
camel_url_set_host (url, "local");
-
+
prefix = g_build_filename (g_get_home_dir (), "evolution", "local", NULL);
if (strncmp (url->path, prefix, strlen (prefix)) != 0) {
/* uri is busticated - user probably copied from another user's home directory */
camel_url_free (url);
g_free (prefix);
-
+
return g_strdup (uri);
}
path = g_strdup (url->path + strlen (prefix));
g_free (prefix);
-
+
/* modify the path in-place */
p = path + strlen (path) - 12;
while (p > path) {
if (!strncmp (p, "/subfolders/", 12))
memmove (p, p + 11, strlen (p + 11) + 1);
-
+
p--;
}
-
+
camel_url_set_path (url, path);
g_free (path);
-
+
path = camel_url_to_string (url, 0);
camel_url_free (url);
-
+
return path;
} else {
return em_uri_from_camel (uri);
@@ -1935,38 +1935,38 @@ static void
upgrade_vfolder_sources_1_4 (xmlDocPtr doc)
{
xmlNodePtr root, node;
-
+
if (!doc || !(root = xmlDocGetRootElement (doc)))
return;
-
+
if (!root->name || strcmp ((char *)root->name, "filteroptions") != 0) {
/* root node is not <filteroptions>, nothing to upgrade */
return;
}
-
+
if (!(node = xml_find_node (root, "ruleset"))) {
/* no ruleset node, nothing to upgrade */
return;
}
-
+
node = node->children;
while (node != NULL) {
if (node->name && !strcmp ((char *)node->name, "rule")) {
xmlNodePtr sources;
char *src;
-
+
if (!(src = (char *)xmlGetProp (node, (const unsigned char *)"source")))
src = (char *)xmlStrdup ((const unsigned char *)"local"); /* default to all local folders? */
-
+
xmlSetProp (node, (const unsigned char *)"source", (const unsigned char *)"incoming");
-
+
if (!(sources = xml_find_node (node, "sources")))
sources = xmlNewChild (node, NULL, (const unsigned char *)"sources", NULL);
-
+
xmlSetProp (sources, (const unsigned char *)"with", (unsigned char *)src);
xmlFree (src);
}
-
+
node = node->next;
}
}
@@ -1979,22 +1979,22 @@ get_nth_sig (int id)
EIterator *iter;
char *uid = NULL;
int i = 0;
-
+
list = mail_config_get_signatures ();
iter = e_list_get_iterator ((EList *) list);
-
+
while (e_iterator_is_valid (iter) && i < id) {
e_iterator_next (iter);
i++;
}
-
+
if (i == id && e_iterator_is_valid (iter)) {
sig = (ESignature *) e_iterator_get (iter);
uid = g_strdup (sig->uid);
}
-
+
g_object_unref (iter);
-
+
return uid;
}
@@ -2003,40 +2003,40 @@ em_upgrade_accounts_1_4 (void)
{
EAccountList *accounts;
EIterator *iter;
-
+
if (!(accounts = mail_config_get_accounts ()))
return;
-
+
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
EAccount *account = (EAccount *) e_iterator_get (iter);
char *url;
-
+
if (account->drafts_folder_uri) {
url = upgrade_xml_uris_1_4 (account->drafts_folder_uri);
g_free (account->drafts_folder_uri);
account->drafts_folder_uri = url;
}
-
+
if (account->sent_folder_uri) {
url = upgrade_xml_uris_1_4 (account->sent_folder_uri);
g_free (account->sent_folder_uri);
account->sent_folder_uri = url;
}
-
+
if (account->id->sig_uid && !strncmp (account->id->sig_uid, "::", 2)) {
int sig_id;
-
+
sig_id = strtol (account->id->sig_uid + 2, NULL, 10);
g_free (account->id->sig_uid);
account->id->sig_uid = get_nth_sig (sig_id);
}
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
-
+
mail_config_save_accounts ();
}
@@ -2059,19 +2059,19 @@ em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex)
g_free(cache_dir);
return 0;
}
-
+
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Unable to open old POP keep-on-server data `%s': %s"),
cache_dir, g_strerror (errno));
g_free (cache_dir);
return -1;
}
-
+
oldpath = g_string_new (cache_dir);
g_string_append_c (oldpath, '/');
olen = oldpath->len;
g_free (cache_dir);
-
+
cache_dir = g_build_filename (evolution_dir, "mail", "pop", NULL);
if (g_mkdir_with_parents (cache_dir, 0777) == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -2082,25 +2082,25 @@ em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex)
closedir (dir);
return -1;
}
-
+
newpath = g_string_new (cache_dir);
g_string_append_c (newpath, '/');
nlen = newpath->len;
g_free (cache_dir);
-
+
while (res == 0 && (dent = readdir (dir))) {
if (strncmp (dent->d_name, "cache-pop:__", 12) != 0)
continue;
-
+
g_string_truncate (oldpath, olen);
g_string_truncate (newpath, nlen);
-
+
g_string_append (oldpath, dent->d_name);
g_string_append (newpath, dent->d_name + 12);
-
+
/* strip the trailing '_' */
g_string_truncate (newpath, newpath->len - 1);
-
+
if (g_mkdir_with_parents (newpath->str, 0777) == -1
|| cp(oldpath->str, (g_string_append(newpath, "/uid-cache"))->str, FALSE, CP_UNIQUE)) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -2110,12 +2110,12 @@ em_migrate_pop_uid_caches_1_4 (const char *evolution_dir, CamelException *ex)
}
}
-
+
g_string_free (oldpath, TRUE);
g_string_free (newpath, TRUE);
-
+
closedir (dir);
-
+
return res;
}
@@ -2124,21 +2124,21 @@ em_migrate_imap_caches_1_4 (const char *evolution_dir, CamelException *ex)
{
char *src, *dest;
struct stat st;
-
+
src = g_build_filename (g_get_home_dir (), "evolution", "mail", "imap", NULL);
if (stat (src, &st) == -1 || !S_ISDIR (st.st_mode)) {
g_free (src);
return 0;
}
-
+
dest = g_build_filename (evolution_dir, "mail", "imap", NULL);
-
+
/* we don't care if this fails, it's only a cache... */
cp_r (src, dest, "summary", CP_OVERWRITE);
-
+
g_free (dest);
g_free (src);
-
+
return 0;
}
@@ -2151,14 +2151,14 @@ em_migrate_folder_expand_state_1_4 (const char *evolution_dir, CamelException *e
struct dirent *dent;
struct stat st;
DIR *dir;
-
+
srcpath = g_string_new (g_get_home_dir ());
g_string_append (srcpath, "/evolution/config");
if (stat (srcpath->str, &st) == -1 || !S_ISDIR (st.st_mode)) {
g_string_free (srcpath, TRUE);
return 0;
}
-
+
destpath = g_string_new (evolution_dir);
g_string_append (destpath, "/mail/config");
if (g_mkdir_with_parents (destpath->str, 0777) == -1 || !(dir = opendir (srcpath->str))) {
@@ -2166,49 +2166,49 @@ em_migrate_folder_expand_state_1_4 (const char *evolution_dir, CamelException *e
g_string_free (srcpath, TRUE);
return 0;
}
-
+
g_string_append (srcpath, "/et-expanded-");
slen = srcpath->len;
g_string_append (destpath, "/et-expanded-");
dlen = destpath->len;
-
+
evo14_mbox_root = g_build_filename (g_get_home_dir (), "evolution", "local", NULL);
e_filename_make_safe (evo14_mbox_root);
rlen = strlen (evo14_mbox_root);
evo14_mbox_root = g_realloc (evo14_mbox_root, rlen + 2);
evo14_mbox_root[rlen++] = '_';
evo14_mbox_root[rlen] = '\0';
-
+
while ((dent = readdir (dir))) {
char *full_name, *inptr, *buf = NULL;
const char *filename;
GString *new;
-
+
if (strncmp (dent->d_name, "et-expanded-", 12) != 0)
continue;
-
+
if (!strncmp (dent->d_name + 12, "file:", 5)) {
/* need to munge the filename */
inptr = dent->d_name + 17;
-
+
if (!strncmp (inptr, evo14_mbox_root, rlen)) {
/* this should always be the case afaik... */
inptr += rlen;
new = g_string_new ("mbox:");
g_string_append_printf (new, "%s/mail/local#", evolution_dir);
-
+
full_name = g_strdup (inptr);
inptr = full_name + strlen (full_name) - 12;
while (inptr > full_name) {
if (!strncmp (inptr, "_subfolders_", 12))
memmove (inptr, inptr + 11, strlen (inptr + 11) + 1);
-
+
inptr--;
}
-
+
g_string_append (new, full_name);
g_free (full_name);
-
+
filename = buf = new->str;
g_string_free (new, FALSE);
e_filename_make_safe (buf);
@@ -2220,23 +2220,23 @@ em_migrate_folder_expand_state_1_4 (const char *evolution_dir, CamelException *e
/* no munging needed */
filename = dent->d_name + 12;
}
-
+
g_string_append (srcpath, dent->d_name + 12);
g_string_append (destpath, filename);
g_free (buf);
-
+
cp (srcpath->str, destpath->str, FALSE, CP_UNIQUE);
-
+
g_string_truncate (srcpath, slen);
g_string_truncate (destpath, dlen);
}
-
+
closedir (dir);
-
+
g_free (evo14_mbox_root);
g_string_free (destpath, TRUE);
g_string_free (srcpath, TRUE);
-
+
return 0;
}
@@ -2249,14 +2249,14 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
struct dirent *dent;
struct stat st;
DIR *dir;
-
+
srcpath = g_string_new (g_get_home_dir ());
g_string_append (srcpath, "/evolution/views/mail");
if (stat (srcpath->str, &st) == -1 || !S_ISDIR (st.st_mode)) {
g_string_free (srcpath, TRUE);
return 0;
}
-
+
destpath = g_string_new (evolution_dir);
g_string_append (destpath, "/mail/views");
if (g_mkdir_with_parents (destpath->str, 0777) == -1 || !(dir = opendir (srcpath->str))) {
@@ -2264,31 +2264,31 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
g_string_free (srcpath, TRUE);
return 0;
}
-
+
g_string_append_c (srcpath, '/');
slen = srcpath->len;
g_string_append_c (destpath, '/');
dlen = destpath->len;
-
+
evo14_mbox_root = g_build_filename (g_get_home_dir (), "evolution", "local", NULL);
e_filename_make_safe (evo14_mbox_root);
rlen = strlen (evo14_mbox_root);
evo14_mbox_root = g_realloc (evo14_mbox_root, rlen + 2);
evo14_mbox_root[rlen++] = '_';
evo14_mbox_root[rlen] = '\0';
-
+
while ((dent = readdir (dir))) {
char *full_name, *inptr, *buf = NULL;
const char *filename, *ext;
size_t prelen = 0;
GString *new;
-
+
if (dent->d_name[0] == '.')
continue;
-
+
if (!(ext = strrchr (dent->d_name, '.')))
continue;
-
+
if (!strcmp (ext, ".galview") || !strcmp ((char *)dent->d_name, "galview.xml")) {
/* just copy the file */
filename = dent->d_name;
@@ -2296,7 +2296,7 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
} else if (strcmp (ext, ".xml") != 0) {
continue;
}
-
+
if (!strncmp ((const char *)dent->d_name, "current_view-", 13)) {
prelen = 13;
} else if (!strncmp ((const char *)dent->d_name, "custom_view-", 12)) {
@@ -2305,29 +2305,29 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
/* huh? wtf is this file? */
continue;
}
-
+
if (!strncmp (dent->d_name + prelen, "file:", 5)) {
/* need to munge the filename */
inptr = dent->d_name + prelen + 5;
-
+
if (!strncmp (inptr, evo14_mbox_root, rlen)) {
/* this should always be the case afaik... */
inptr += rlen;
new = g_string_new ("mbox:");
g_string_append_printf (new, "%s/mail/local#", evolution_dir);
-
+
full_name = g_strdup (inptr);
inptr = full_name + strlen (full_name) - 12;
while (inptr > full_name) {
if (!strncmp (inptr, "_subfolders_", 12))
memmove (inptr, inptr + 11, strlen (inptr + 11) + 1);
-
+
inptr--;
}
-
+
g_string_append (new, full_name);
g_free (full_name);
-
+
filename = buf = new->str;
g_string_free (new, FALSE);
e_filename_make_safe (buf);
@@ -2339,26 +2339,26 @@ em_migrate_folder_view_settings_1_4 (const char *evolution_dir, CamelException *
/* no munging needed */
filename = dent->d_name + prelen;
}
-
+
copy:
g_string_append (srcpath, dent->d_name);
if (prelen > 0)
g_string_append_len (destpath, dent->d_name, prelen);
g_string_append (destpath, filename);
g_free (buf);
-
+
cp (srcpath->str, destpath->str, FALSE, CP_UNIQUE);
-
+
g_string_truncate (srcpath, slen);
g_string_truncate (destpath, dlen);
}
-
+
closedir (dir);
-
+
g_free (evo14_mbox_root);
g_string_free (destpath, TRUE);
g_string_free (srcpath, TRUE);
-
+
return 0;
}
@@ -2533,7 +2533,7 @@ remove_system_searches(xmlDocPtr searches)
if (!(node = xml_find_node(node, "ruleset")))
return;
-
+
node = node->children;
while (node != NULL) {
xmlNodePtr nnode = node->next;
@@ -2548,9 +2548,9 @@ remove_system_searches(xmlDocPtr searches)
}
xmlFree (src);
}
-
+
node = nnode;
- }
+ }
}
static int
@@ -2568,9 +2568,9 @@ em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders
camel_provider_init();
session = (EMMigrateSession *) em_migrate_session_new (path);
g_free (path);
-
- session->srcdir = g_build_filename (g_get_home_dir (), "evolution", "local", NULL);
-
+
+ session->srcdir = g_build_filename (g_get_home_dir (), "evolution", "local", NULL);
+
path = g_strdup_printf ("mbox:%s/.evolution/mail/local", g_get_home_dir ());
if (stat (path + 5, &st) == -1) {
if (errno != ENOENT || g_mkdir_with_parents (path + 5, 0777) == -1) {
@@ -2583,7 +2583,7 @@ em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders
return -1;
}
}
-
+
camel_exception_init (&lex);
if (!(session->store = camel_session_get_store ((CamelSession *) session, path, &lex))) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -2596,17 +2596,17 @@ em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders
return -1;
}
g_free (path);
-
+
if (em_migrate_local_folders_1_4 (session, ex) == -1)
return -1;
-
+
camel_object_unref (session->store);
g_free (session->srcdir);
-
+
camel_object_unref (session);
-
+
em_upgrade_accounts_1_4();
-
+
upgrade_xml_uris(filters, upgrade_xml_uris_1_4);
upgrade_vfolder_sources_1_4(vfolders);
upgrade_xml_uris(vfolders, upgrade_xml_uris_1_4);
@@ -2621,10 +2621,10 @@ em_migrate_1_4 (const char *evolution_dir, xmlDocPtr filters, xmlDocPtr vfolders
g_free(path);
xmlFreeDoc(searches);
}
-
+
if (em_migrate_pop_uid_caches_1_4 (evolution_dir, ex) == -1)
return -1;
-
+
/* these are non-fatal */
em_migrate_imap_caches_1_4 (evolution_dir, ex);
camel_exception_clear(ex);
@@ -2685,7 +2685,7 @@ emm_setup_initial(const char *evolution_dir)
/* FIXME: create default folders and stuff... */
d(printf("Setting up initial mail tree\n"));
-
+
base = g_build_filename(evolution_dir, "mail", "local", NULL);
if (g_mkdir_with_parents(base, 0777) == -1 && errno != EEXIST) {
g_free(base);
@@ -2733,28 +2733,28 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
{
struct stat st;
char *path;
-
+
/* make sure ~/.evolution/mail exists */
path = g_build_filename (evolution_dir, "mail", NULL);
if (g_stat (path, &st) == -1) {
if (errno != ENOENT || g_mkdir_with_parents (path, 0777) == -1) {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
+ camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Unable to create local mail folders at `%s': %s"),
path, g_strerror (errno));
g_free (path);
return -1;
}
}
-
+
g_free (path);
-
+
if (major == 0)
return emm_setup_initial(evolution_dir);
#ifndef G_OS_WIN32
if (major == 1 && minor < 5) {
xmlDocPtr config_xmldb = NULL, filters, vfolders;
-
+
path = g_build_filename (g_get_home_dir (), "evolution", NULL);
if (minor <= 2 && !(config_xmldb = emm_load_xml (path, "config.xmldb"))) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -2766,7 +2766,7 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
filters = emm_load_xml (path, "filters.xml");
vfolders = emm_load_xml (path, "vfolders.xml");
g_free (path);
-
+
if (minor == 0) {
if (em_migrate_1_0 (evolution_dir, config_xmldb, filters, vfolders, ex) == -1) {
xmlFreeDoc (config_xmldb);
@@ -2775,7 +2775,7 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
return -1;
}
}
-
+
if (minor <= 2) {
if (em_migrate_1_2 (evolution_dir, config_xmldb, filters, vfolders, ex) == -1) {
xmlFreeDoc (config_xmldb);
@@ -2783,10 +2783,10 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
xmlFreeDoc (vfolders);
return -1;
}
-
+
xmlFreeDoc (config_xmldb);
}
-
+
if (minor <= 4) {
if (em_migrate_1_4 (evolution_dir, filters, vfolders, ex) == -1) {
xmlFreeDoc (filters);
@@ -2794,19 +2794,19 @@ em_migrate (const char *evolution_dir, int major, int minor, int revision, Camel
return -1;
}
}
-
+
path = g_build_filename (evolution_dir, "mail", NULL);
-
+
if (filters) {
emm_save_xml (filters, path, "filters.xml");
xmlFreeDoc (filters);
}
-
+
if (vfolders) {
emm_save_xml (vfolders, path, "vfolders.xml");
xmlFreeDoc (vfolders);
}
-
+
g_free (path);
}
diff --git a/mail/em-popup.c b/mail/em-popup.c
index 63f7291dfe..40e22eb230 100644
--- a/mail/em-popup.c
+++ b/mail/em-popup.c
@@ -165,12 +165,12 @@ EMPopup *em_popup_new(const char *menuid)
/**
* em_popup_target_new_select:
* @folder: The selection will ref this for the life of it.
- * @folder_uri:
+ * @folder_uri:
* @uids: The selection will free this when done with it.
- *
+ *
* Create a new selection popup target.
- *
- * Return value:
+ *
+ * Return value:
**/
EMPopupTargetSelect *
em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char *folder_uri, GPtrArray *uids)
@@ -194,10 +194,10 @@ em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char
camel_object_ref(folder);
mask &= ~EM_POPUP_SELECT_FOLDER;
-
+
if (em_utils_folder_is_sent(folder, folder_uri))
mask &= ~EM_POPUP_SELECT_EDIT;
-
+
draft_or_outbox = em_utils_folder_is_drafts(folder, folder_uri) || em_utils_folder_is_outbox(folder, folder_uri);
if (!draft_or_outbox && uids->len == 1)
mask &= ~EM_POPUP_SELECT_ADD_SENDER;
@@ -229,11 +229,11 @@ em_popup_target_new_select(EMPopup *emp, struct _CamelFolder *folder, const char
} else if (draft_or_outbox) {
/* Show none option */
mask |= EM_POPUP_SELECT_NOT_JUNK;
- mask |= EM_POPUP_SELECT_JUNK;
+ mask |= EM_POPUP_SELECT_JUNK;
} else {
/* Show both options */
mask &= ~EM_POPUP_SELECT_NOT_JUNK;
- mask &= ~EM_POPUP_SELECT_JUNK;
+ mask &= ~EM_POPUP_SELECT_JUNK;
}
if (flags & CAMEL_MESSAGE_DELETED)
@@ -334,20 +334,20 @@ em_popup_target_new_folder (EMPopup *emp, const char *uri, guint32 info_flags, g
mask &= ~(EM_POPUP_FOLDER_STORE|EM_POPUP_FOLDER_INFERIORS);
else
mask &= ~EM_POPUP_FOLDER_FOLDER;
-
+
url = camel_url_new(uri, NULL);
if (url == NULL)
goto done;
-
+
if (!(popup_flags & EM_POPUP_FOLDER_STORE)) {
const char *path;
-
+
if (popup_flags & EM_POPUP_FOLDER_DELETE)
mask &= ~EM_POPUP_FOLDER_DELETE;
-
+
if (!(info_flags & CAMEL_FOLDER_NOINFERIORS))
mask &= ~EM_POPUP_FOLDER_INFERIORS;
-
+
if (info_flags & CAMEL_FOLDER_TYPE_OUTBOX)
mask &= ~EM_POPUP_FOLDER_OUTBOX;
else
@@ -355,17 +355,17 @@ em_popup_target_new_folder (EMPopup *emp, const char *uri, guint32 info_flags, g
if (!(info_flags & CAMEL_FOLDER_NOSELECT))
mask &= ~EM_POPUP_FOLDER_SELECT;
-
+
if (info_flags & CAMEL_FOLDER_VIRTUAL)
mask |= EM_POPUP_FOLDER_DELETE|EM_POPUP_FOLDER_INFERIORS;
-
+
if ((path = url->fragment ? url->fragment : url->path)) {
if ((!strcmp (url->protocol, "vfolder") && !strcmp (path, CAMEL_UNMATCHED_NAME))
|| (!strcmp (url->protocol, "maildir") && !strcmp (path, "."))) /* hack for maildir toplevel folder */
mask |= EM_POPUP_FOLDER_DELETE|EM_POPUP_FOLDER_INFERIORS;
}
}
-
+
camel_url_free(url);
done:
t->target.mask = mask;
@@ -375,13 +375,13 @@ done:
/**
* em_popup_target_new_attachments:
- * @emp:
+ * @emp:
* @attachments: A list of EMsgComposerAttachment objects, reffed for
* the list. Will be unreff'd once finished with.
- *
+ *
* Owns the list @attachments and their items after they're passed in.
- *
- * Return value:
+ *
+ * Return value:
**/
EMPopupTargetAttachments *
em_popup_target_new_attachments(EMPopup *emp, GSList *attachments)
@@ -399,7 +399,7 @@ em_popup_target_new_attachments(EMPopup *emp, GSList *attachments)
mask &= ~ EM_POPUP_ATTACHMENTS_IMAGE;
if (CAMEL_IS_MIME_MESSAGE(camel_medium_get_content_object((CamelMedium *) ((EAttachment *) attachments->data)->body)))
mask &= ~EM_POPUP_ATTACHMENTS_MESSAGE;
-
+
mask &= ~ EM_POPUP_ATTACHMENTS_ONE;
}
if (len > 1)
@@ -435,7 +435,7 @@ emp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
unsigned int i=1;
CamelMimePart *part = NULL;
- if (t->type == EM_POPUP_TARGET_ATTACHMENTS)
+ if (t->type == EM_POPUP_TARGET_ATTACHMENTS)
part = ((EAttachment *) ((EMPopupTargetAttachments *) t)->attachments->data)->body;
else
part = ((EMPopupTargetPart *) t)->part;
@@ -444,7 +444,7 @@ emp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
return;
filename = g_strdup(camel_mime_part_get_filename(part));
-
+
/* if filename is blank, create a default filename based on MIME type */
if (!filename || !filename[0]) {
CamelContentType *ct;
@@ -455,13 +455,13 @@ emp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
}
e_filename_make_safe(filename);
-
+
path = g_build_filename(g_get_home_dir(), ".gnome2", "wallpapers", filename, NULL);
-
+
extension = strrchr(filename, '.');
if (extension)
*extension++ = 0;
-
+
/* if file exists, stick a (number) on the end */
while (g_file_test(path, G_FILE_TEST_EXISTS)) {
char *name;
@@ -470,35 +470,35 @@ emp_part_popup_set_background(EPopup *ep, EPopupItem *item, void *data)
path = g_build_filename(g_get_home_dir(), ".gnome2", "wallpapers", name, NULL);
g_free(name);
}
-
+
g_free(filename);
-
+
if (em_utils_save_part_to_file(ep->target->widget, path, part)) {
gconf = gconf_client_get_default();
-
- /* if the filename hasn't changed, blank the filename before
+
+ /* if the filename hasn't changed, blank the filename before
* setting it so that gconf detects a change and updates it */
- if ((str = gconf_client_get_string(gconf, "/desktop/gnome/background/picture_filename", NULL)) != NULL
+ if ((str = gconf_client_get_string(gconf, "/desktop/gnome/background/picture_filename", NULL)) != NULL
&& strcmp (str, path) == 0) {
gconf_client_set_string(gconf, "/desktop/gnome/background/picture_filename", "", NULL);
}
-
+
g_free (str);
gconf_client_set_string(gconf, "/desktop/gnome/background/picture_filename", path, NULL);
-
+
/* if GNOME currently doesn't display a picture, set to "wallpaper"
* display mode, otherwise leave it alone */
- if ((str = gconf_client_get_string(gconf, "/desktop/gnome/background/picture_options", NULL)) == NULL
+ if ((str = gconf_client_get_string(gconf, "/desktop/gnome/background/picture_options", NULL)) == NULL
|| strcmp(str, "none") == 0) {
gconf_client_set_string(gconf, "/desktop/gnome/background/picture_options", "wallpaper", NULL);
}
-
+
gconf_client_suggest_sync(gconf, NULL);
-
+
g_free(str);
g_object_unref(gconf);
}
-
+
g_free(path);
}
@@ -509,11 +509,11 @@ emp_part_popup_reply_sender(EPopup *ep, EPopupItem *item, void *data)
CamelMimeMessage *message;
CamelMimePart *part;
- if (t->type == EM_POPUP_TARGET_ATTACHMENTS)
+ if (t->type == EM_POPUP_TARGET_ATTACHMENTS)
part = ((EAttachment *) ((EMPopupTargetAttachments *) t)->attachments->data)->body;
else
part = ((EMPopupTargetPart *) t)->part;
-
+
message = (CamelMimeMessage *)camel_medium_get_content_object((CamelMedium *)part);
em_utils_reply_to_message(NULL, NULL, message, REPLY_MODE_SENDER, NULL);
}
@@ -525,11 +525,11 @@ emp_part_popup_reply_list (EPopup *ep, EPopupItem *item, void *data)
CamelMimeMessage *message;
CamelMimePart *part;
- if (t->type == EM_POPUP_TARGET_ATTACHMENTS)
+ if (t->type == EM_POPUP_TARGET_ATTACHMENTS)
part = ((EAttachment *) ((EMPopupTargetAttachments *) t)->attachments->data)->body;
else
part = ((EMPopupTargetPart *) t)->part;
-
+
message = (CamelMimeMessage *)camel_medium_get_content_object((CamelMedium *)part);
em_utils_reply_to_message(NULL, NULL, message, REPLY_MODE_LIST, NULL);
}
@@ -541,11 +541,11 @@ emp_part_popup_reply_all (EPopup *ep, EPopupItem *item, void *data)
CamelMimeMessage *message;
CamelMimePart *part;
- if (t->type == EM_POPUP_TARGET_ATTACHMENTS)
+ if (t->type == EM_POPUP_TARGET_ATTACHMENTS)
part = ((EAttachment *) ((EMPopupTargetAttachments *) t)->attachments->data)->body;
else
part = ((EMPopupTargetPart *) t)->part;
-
+
message = (CamelMimeMessage *)camel_medium_get_content_object((CamelMedium *)part);
em_utils_reply_to_message(NULL, NULL, message, REPLY_MODE_ALL, NULL);
}
@@ -557,10 +557,10 @@ emp_part_popup_forward (EPopup *ep, EPopupItem *item, void *data)
CamelMimeMessage *message;
CamelMimePart *part;
- if (t->type == EM_POPUP_TARGET_ATTACHMENTS)
+ if (t->type == EM_POPUP_TARGET_ATTACHMENTS)
part = ((EAttachment *) ((EMPopupTargetAttachments *) t)->attachments->data)->body;
else
- part = ((EMPopupTargetPart *) t)->part;
+ part = ((EMPopupTargetPart *) t)->part;
/* TODO: have a emfv specific override so we can get the parent folder uri */
message = (CamelMimeMessage *)camel_medium_get_content_object((CamelMedium *) part);
@@ -598,7 +598,7 @@ emp_uri_popup_link_open(EPopup *ep, EPopupItem *item, void *data)
{
EMPopupTargetURI *t = (EMPopupTargetURI *)ep->target;
GError *err = NULL;
-
+
gnome_url_show(t->uri, &err);
if (err) {
g_warning("gnome_url_show: %s", err->message);
@@ -653,7 +653,7 @@ emp_apps_open_in(EPopup *ep, EPopupItem *item, void *data)
CamelMimePart *part;
printf("in emp_apps_open_in\n");
- if (target->type == EM_POPUP_TARGET_ATTACHMENTS)
+ if (target->type == EM_POPUP_TARGET_ATTACHMENTS)
part = ((EAttachment *) ((EMPopupTargetAttachments *) target)->attachments->data)->body;
else
part = ((EMPopupTargetPart *) target)->part;
@@ -663,7 +663,7 @@ emp_apps_open_in(EPopup *ep, EPopupItem *item, void *data)
GnomeVFSMimeApplication *app = item->user_data;
char *uri;
GList *uris = NULL;
-
+
uri = gnome_vfs_get_uri_from_local_path(path);
uris = g_list_append(uris, uri);
@@ -724,7 +724,7 @@ emp_standard_menu_factory(EPopup *emp, void *data)
case EM_POPUP_TARGET_PART: {
EMPopupTargetPart *t = (EMPopupTargetPart *)emp->target;
mime_type = camel_data_wrapper_get_mime_type((CamelDataWrapper *)t->part);
- filename = camel_mime_part_get_filename(t->part);
+ filename = camel_mime_part_get_filename(t->part);
items = emp_standard_object_popups;
len = LEN(emp_standard_object_popups);
@@ -733,10 +733,10 @@ emp_standard_menu_factory(EPopup *emp, void *data)
EMPopupTargetAttachments *t = (EMPopupTargetAttachments *)emp->target;
GSList *list = t->attachments;
EAttachment *attachment;
-
+
if (g_slist_length(list) != 1 || !((EAttachment *)list->data)->is_available_local) {
items = NULL;
- len = 0;
+ len = 0;
break;
}
@@ -747,18 +747,18 @@ emp_standard_menu_factory(EPopup *emp, void *data)
items = emp_attachment_object_popups;
len = LEN(emp_attachment_object_popups);
- break; }
+ break; }
default:
items = NULL;
len = 0;
}
-
+
if (mime_type) {
apps = gnome_vfs_mime_get_all_applications(mime_type);
-
+
if (apps == NULL && strcmp(mime_type, "application/octet-stream") == 0) {
const char *name_type;
-
+
if (filename) {
/* GNOME-VFS will misidentify TNEF attachments as MPEG */
if (!strcmp (filename, "winmail.dat"))
@@ -860,7 +860,7 @@ static const EPopupHookTargetMask emph_select_masks[] = {
{ "add_sender", EM_POPUP_SELECT_ADD_SENDER },
{ "folder", EM_POPUP_SELECT_FOLDER },
{ "junk", EM_POPUP_SELECT_JUNK },
- { "not_junk", EM_POPUP_SELECT_NOT_JUNK },
+ { "not_junk", EM_POPUP_SELECT_NOT_JUNK },
{ NULL }
};
@@ -933,7 +933,7 @@ GType
em_popup_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMPopupHookClass), NULL, NULL, (GClassInitFunc) emph_class_init, NULL, NULL,
@@ -943,6 +943,6 @@ em_popup_hook_get_type(void)
emph_parent_class = g_type_class_ref(e_popup_hook_get_type());
type = g_type_register_static(e_popup_hook_get_type(), "EMPopupHook", &info, 0);
}
-
+
return type;
}
diff --git a/mail/em-popup.h b/mail/em-popup.h
index ea57aa347e..ea44cd4261 100644
--- a/mail/em-popup.h
+++ b/mail/em-popup.h
@@ -37,7 +37,7 @@ typedef struct _EMPopupClass EMPopupClass;
/**
* enum _em_popup_target_t - A list of mail popup target types.
- *
+ *
* @EM_POPUP_TARGET_SELECT: A selection of messages.
* @EM_POPUP_TARGET_URI: A URI.
* @EM_POPUP_TARGET_PART: A CamelMimePart message part.
@@ -56,7 +56,7 @@ enum _em_popup_target_t {
/**
* enum _em_popup_target_select_t - EMPopupTargetSelect qualifiers.
- *
+ *
* @EM_POPUP_SELECT_ONE: Only one item is selected.
* @EM_POPUP_SELECT_MANY: One ore more items are selected.
* @EM_POPUP_SELECT_MARK_READ: Message(s) are unseen and can be
@@ -85,7 +85,7 @@ enum _em_popup_target_t {
* @EM_POPUP_SELECT_FOLDER: A folder is set on the selection.
* @EM_POPUP_SELECT_LAST: The last bit used, can be used to add
* additional types from derived application code.
- *
+ *
**/
enum _em_popup_target_select_t {
EM_POPUP_SELECT_ONE = 1<<1,
@@ -105,17 +105,17 @@ enum _em_popup_target_select_t {
EM_POPUP_SELECT_FOLDER = 1<<15, /* do we have any folder at all? */
EM_POPUP_SELECT_JUNK = 1<<16,
EM_POPUP_SELECT_NOT_JUNK = 1<<17,
- EM_POPUP_SELECT_LAST = 1<<18,
+ EM_POPUP_SELECT_LAST = 1<<18,
};
/**
* enum _em_popup_target_uri_t - EMPopupTargetURI qualifiers.
- *
+ *
* @EM_POPUP_URI_HTTP: This is a HTTP or HTTPS url.
* @EM_POPUP_URI_MAILTO: This is a MAILTO url.
* @EM_POPUP_URI_NOT_MAILTO: This is not a MAILTO url.
* @EM_POPUP_URI_CALLTO: This is a CALLTO url.
- *
+ *
**/
enum _em_popup_target_uri_t {
EM_POPUP_URI_HTTP = 1<<0,
@@ -126,10 +126,10 @@ enum _em_popup_target_uri_t {
/**
* enum _em_popup_target_part_t - EMPopupTargetPart qualifiers.
- *
+ *
* @EM_POPUP_PART_MESSAGE: This is a message type.
* @EM_POPUP_PART_IMAGE: This is an image type.
- *
+ *
**/
enum _em_popup_target_part_t {
EM_POPUP_PART_MESSAGE = 1<<0,
@@ -138,14 +138,14 @@ enum _em_popup_target_part_t {
/**
* enum _em_popup_target_folder_t - EMPopupTargetFolder qualifiers.
- *
+ *
* @EM_POPUP_FOLDER_FOLDER: This is a normal folder.
* @EM_POPUP_FOLDER_STORE: This is a store.
* @EM_POPUP_FOLDER_INFERIORS: This folder may have child folders.
* @EM_POPUP_FOLDER_DELETE: This folder can be deleted or renamed.
* @EM_POPUP_FOLDER_SELECT: This folder exists and can be selected or
* opened.
- *
+ *
**/
enum _em_popup_target_folder_t {
EM_POPUP_FOLDER_FOLDER = 1<<0, /* normal folder */
@@ -159,10 +159,10 @@ enum _em_popup_target_folder_t {
/**
* enum _em_popup_target_attachments_t - EMPopupTargetAttachments qualifiers.
- *
+ *
* @EM_POPUP_ATTACHMENTS_ONE: There is one and only one attachment selected.
* @EM_POPUP_ATTACHMENTS_MANY: There is one or more attachments selected.
- *
+ *
**/
enum _em_popup_target_attachments_t {
EM_POPUP_ATTACHMENTS_ONE = 1<<0, /* only 1 selected */
@@ -180,10 +180,10 @@ typedef struct _EMPopupTargetAttachments EMPopupTargetAttachments;
/**
* struct _EMPopupTargetURI - An inline URI.
- *
+ *
* @target: Superclass.
* @uri: The encoded URI to which this target applies.
- *
+ *
* Used to represent popup-menu context on any URI object.
**/
struct _EMPopupTargetURI {
@@ -193,7 +193,7 @@ struct _EMPopupTargetURI {
/**
* struct _EMPopupTargetSelect - A list of messages.
- *
+ *
* @target: Superclass.
* @folder: The CamelFolder of the selected messages.
* @uri: The encoded URI represending this folder.
@@ -212,12 +212,12 @@ struct _EMPopupTargetSelect {
/**
* struct _EMPopupTargetPart - A Camel object.
- *
+ *
* @target: Superclass.
* @mime_type: MIME type of the part. This may be a calculated type
* not matching the @part's MIME type.
* @part: A CamelMimePart representing a message or attachment.
- *
+ *
* Used to represent a message part as context for a popup menu. This
* is used for both attachments and inline-images.
**/
@@ -229,7 +229,7 @@ struct _EMPopupTargetPart {
/**
* struct _EMPopupTargetFolder - A folder uri.
- *
+ *
* @target: Superclass.
* @uri: A folder URI.
*
@@ -242,7 +242,7 @@ struct _EMPopupTargetFolder {
/**
* struct _EMPopupTargetAttachments - A list of composer attachments.
- *
+ *
* @target: Superclass.
* @attachments: A GSList list of EMsgComposer attachments.
*
diff --git a/mail/em-search-context.c b/mail/em-search-context.c
index caed0bdc99..48320d2b2c 100644
--- a/mail/em-search-context.c
+++ b/mail/em-search-context.c
@@ -45,7 +45,7 @@ static void
em_search_context_class_init (EMSearchContextClass *klass)
{
parent_class = g_type_class_ref (RULE_TYPE_CONTEXT);
-
+
((GObjectClass *)klass)->finalize = em_search_context_finalise;
((RuleContextClass *)klass)->new_element = em_search_new_element;
}
@@ -55,7 +55,7 @@ em_search_context_init (EMSearchContext *vc)
{
rule_context_add_part_set ((RuleContext *)vc, "partset", filter_part_get_type (),
rule_context_add_part, rule_context_next_part);
-
+
rule_context_add_rule_set ((RuleContext *)vc, "ruleset", filter_rule_get_type (),
rule_context_add_rule, rule_context_next_rule);
@@ -66,7 +66,7 @@ GType
em_search_context_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (EMSearchContextClass),
@@ -79,10 +79,10 @@ em_search_context_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) em_search_context_init,
};
-
+
type = g_type_register_static (RULE_TYPE_CONTEXT, "EMSearchContext", &info, 0);
}
-
+
return type;
}
@@ -90,7 +90,7 @@ em_search_context_get_type (void)
* em_search_context_new:
*
* Create a new EMSearchContext object.
- *
+ *
* Return value: A new #EMSearchContext object.
**/
EMSearchContext *
diff --git a/mail/em-stripsig-filter.c b/mail/em-stripsig-filter.c
index b0c0ee28e5..d1c4bb3718 100644
--- a/mail/em-stripsig-filter.c
+++ b/mail/em-stripsig-filter.c
@@ -48,7 +48,7 @@ CamelType
em_stripsig_filter_get_type (void)
{
static CamelType type = CAMEL_INVALID_TYPE;
-
+
if (type == CAMEL_INVALID_TYPE) {
type = camel_type_register (camel_mime_filter_get_type (),
"EMStripSigFilter",
@@ -59,7 +59,7 @@ em_stripsig_filter_get_type (void)
(CamelObjectInitFunc) em_stripsig_filter_init,
NULL);
}
-
+
return type;
}
@@ -68,9 +68,9 @@ static void
em_stripsig_filter_class_init (EMStripSigFilterClass *klass)
{
CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
+
parent_class = CAMEL_MIME_FILTER_CLASS (camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
-
+
filter_class->reset = filter_reset;
filter_class->filter = filter_filter;
filter_class->complete = filter_complete;
@@ -90,17 +90,17 @@ strip_signature (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
register const char *inptr = in;
const char *inend = in + len;
const char *start = NULL;
-
+
if (stripsig->midline) {
while (inptr < inend && *inptr != '\n')
inptr++;
-
+
if (inptr < inend) {
stripsig->midline = FALSE;
inptr++;
}
}
-
+
while (inptr < inend) {
if ((inend - inptr) >= 4 && !strncmp (inptr, "-- \n", 4)) {
start = inptr;
@@ -108,24 +108,24 @@ strip_signature (CamelMimeFilter *filter, char *in, size_t len, size_t prespace,
} else {
while (inptr < inend && *inptr != '\n')
inptr++;
-
+
if (inptr == inend) {
stripsig->midline = TRUE;
break;
}
-
+
inptr++;
}
}
-
+
if (start != NULL)
inptr = start;
-
+
if (!flush && inend > inptr)
camel_mime_filter_backup (filter, inptr, inend - inptr);
else if (!start)
inptr = inend;
-
+
*out = in;
*outlen = inptr - in;
*outprespace = prespace;
@@ -150,7 +150,7 @@ static void
filter_reset (CamelMimeFilter *filter)
{
EMStripSigFilter *stripsig = (EMStripSigFilter *) filter;
-
+
stripsig->midline = FALSE;
}
diff --git a/mail/em-stripsig-filter.h b/mail/em-stripsig-filter.h
index cdc3550b06..9e3f42bd85 100644
--- a/mail/em-stripsig-filter.h
+++ b/mail/em-stripsig-filter.h
@@ -43,13 +43,13 @@ typedef struct _EMStripSigFilterClass EMStripSigFilterClass;
struct _EMStripSigFilter {
CamelMimeFilter parent_object;
-
+
guint32 midline:1;
};
struct _EMStripSigFilterClass {
CamelMimeFilterClass parent_class;
-
+
};
diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c
index 53f3e0fdca..28fc79bfde 100644
--- a/mail/em-subscribe-editor.c
+++ b/mail/em-subscribe-editor.c
@@ -104,7 +104,7 @@ struct _EMSubscribe {
/* pending LISTs, EMSubscribeNode's */
int pending_id;
EDList pending;
-
+
/* queue of pending UN/SUBSCRIBEs, EMsg's */
int subscribe_id;
EDList subscribe;
@@ -181,7 +181,7 @@ struct _zsubscribe_msg {
char *path;
};
-static void
+static void
sub_folder_subscribe (struct _mail_msg *mm)
{
struct _zsubscribe_msg *m = (struct _zsubscribe_msg *) mm;
@@ -234,7 +234,7 @@ sub_folder_subscribed (struct _mail_msg *mm)
}
}
-static void
+static void
sub_folder_free (struct _mail_msg *mm)
{
struct _zsubscribe_msg *m = (struct _zsubscribe_msg *) mm;
@@ -306,7 +306,7 @@ sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, in
gtk_tree_model_get_iter(gtk_tree_view_get_model(sub->tree), &iter, node->path);
}
- d(printf("flags & CAMEL_FOLDER_NOCHILDREN=%d, f & CAMEL_FOLDER_NOINFERIORS=%d\t fi->full_name=[%s], node->path=%p\n",
+ d(printf("flags & CAMEL_FOLDER_NOCHILDREN=%d, f & CAMEL_FOLDER_NOINFERIORS=%d\t fi->full_name=[%s], node->path=%p\n",
fi->flags & CAMEL_FOLDER_NOCHILDREN, fi->flags & CAMEL_FOLDER_NOINFERIORS, fi->full_name,
node->path));
@@ -317,11 +317,11 @@ sub_fill_level(EMSubscribe *sub, CamelFolderInfo *info, GtkTreeIter *parent, in
d(printf("scanning child '%s'\n", fi->child->full_name));
sub_fill_level(sub, fi->child, &iter, FALSE);
} else if (!(fi->flags & CAMEL_FOLDER_NOCHILDREN)) {
- GtkTreeIter new_iter;
+ GtkTreeIter new_iter;
d(printf("flags: CAMEL_FOLDER_NOCHILDREN is not set '%s'\n", fi->full_name));
gtk_tree_store_append(treestore, &new_iter, &iter);
gtk_tree_store_set(treestore, &new_iter, 0, 0, 1, "Loading...", 2, NULL, -1);
- }
+ }
else {
if (pending)
e_dlist_addtail(&sub->pending, (EDListNode *)node);
@@ -404,8 +404,8 @@ sub_folderinfo_free(struct _mail_msg *mm)
if (!m->sub->cancel)
sub_editor_busy(m->sub->editor, -1);
- /* Now we just load the children on demand, so set the
- expand state to true if m->node is not NULL
+ /* Now we just load the children on demand, so set the
+ expand state to true if m->node is not NULL
*/
if (m->node)
gtk_tree_view_expand_row(m->sub->tree, m->node->path, FALSE);
@@ -501,7 +501,7 @@ sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub)
}
/* double-clicking causes a node item to be evaluated directly */
-static void sub_row_activated(GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *col, EMSubscribe *sub)
+static void sub_row_activated(GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *col, EMSubscribe *sub)
{
if (!gtk_tree_view_row_expanded(tree, path))
gtk_tree_view_expand_row(tree, path, FALSE);
@@ -548,7 +548,7 @@ sub_row_expanded(GtkTreeView *tree, GtkTreeIter *iter, GtkTreePath *path, EMSubs
return;
}
}
-
+
e_dlist_addhead(&sub->pending, (EDListNode *)node);
if (sub->pending_id == -1
@@ -617,12 +617,12 @@ subscribe_set_store(EMSubscribe *sub, CamelStore *store)
g_str_hash, g_str_equal,
(GDestroyNotify) NULL,
(GDestroyNotify) sub_node_free);
-
+
model = gtk_tree_store_new (3, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER);
sub->tree = (GtkTreeView *) gtk_tree_view_new_with_model ((GtkTreeModel *) model);
g_object_unref (model);
gtk_widget_show ((GtkWidget *)sub->tree);
-
+
sub->widget = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sub->widget), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sub->widget), GTK_SHADOW_IN);
@@ -633,11 +633,11 @@ subscribe_set_store(EMSubscribe *sub, CamelStore *store)
g_object_set(renderer, "activatable", TRUE, NULL);
gtk_tree_view_insert_column_with_attributes (sub->tree, -1, _("Subscribed"), renderer, "active", 0, NULL);
g_signal_connect(renderer, "toggled", G_CALLBACK(sub_subscribe_toggled), sub);
-
+
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes (sub->tree, -1, _("Folder"), renderer, "text", 1, NULL);
gtk_tree_view_set_expander_column(sub->tree, gtk_tree_view_get_column(sub->tree, 1));
-
+
selection = gtk_tree_view_get_selection (sub->tree);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
gtk_tree_view_set_headers_visible (sub->tree, FALSE);
@@ -794,10 +794,10 @@ static void
window_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
GConfClient *gconf;
-
+
/* save to in-memory variable for current session access */
window_size = *allocation;
-
+
/* save the setting across sessions */
gconf = gconf_client_get_default ();
gconf_client_set_int (gconf, "/apps/evolution/mail/subscribe_window/width", window_size.width, NULL);
@@ -829,7 +829,7 @@ GtkDialog *em_subscribe_editor_new(void)
}
se->dialog = (GtkDialog *)glade_xml_get_widget (xml, "subscribe_dialog");
g_signal_connect(se->dialog, "destroy", G_CALLBACK(sub_editor_destroy), se);
-
+
gtk_widget_ensure_style ((GtkWidget *)se->dialog);
gtk_container_set_border_width ((GtkContainer *) ((GtkDialog *)se->dialog)->action_area, 12);
gtk_container_set_border_width ((GtkContainer *) ((GtkDialog *)se->dialog)->vbox, 0);
@@ -867,7 +867,7 @@ GtkDialog *em_subscribe_editor_new(void)
e_iterator_is_valid (iter);
e_iterator_next (iter)) {
EAccount *account = (EAccount *) e_iterator_get (iter);
-
+
/* setup url table, and store table? */
if (account->enabled && account->source->url) {
d(printf("adding account '%s'\n", account->name));
@@ -883,31 +883,31 @@ GtkDialog *em_subscribe_editor_new(void)
gtk_option_menu_set_menu((GtkOptionMenu *)se->optionmenu, menu);
g_signal_connect(se->optionmenu, "changed", G_CALLBACK(sub_editor_menu_changed), se);
-
+
if (window_size.width == 0) {
/* initialize @window_size with the previous session's size */
GConfClient *gconf;
GError *err = NULL;
-
+
gconf = gconf_client_get_default ();
-
+
window_size.width = gconf_client_get_int (gconf, "/apps/evolution/mail/subscribe_window/width", &err);
if (err != NULL) {
window_size.width = DEFAULT_WIDTH;
g_clear_error (&err);
}
-
+
window_size.height = gconf_client_get_int (gconf, "/apps/evolution/mail/subscribe_window/height", &err);
if (err != NULL) {
window_size.height = DEFAULT_HEIGHT;
g_clear_error (&err);
}
-
+
g_object_unref (gconf);
}
-
+
gtk_window_set_default_size ((GtkWindow *) se->dialog, window_size.width, window_size.height);
g_signal_connect (se->dialog, "size-allocate", G_CALLBACK (window_size_allocate), NULL);
-
+
return se->dialog;
}
diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c
index 5648efc83e..1224e468bd 100644
--- a/mail/em-sync-stream.c
+++ b/mail/em-sync-stream.c
@@ -36,7 +36,7 @@
#define LOG_STREAM
-#define d(x)
+#define d(x)
#define EMSS_CLASS(x) ((EMSyncStreamClass *)(((CamelObject *)(x))->klass))
@@ -90,7 +90,7 @@ CamelType
em_sync_stream_get_type (void)
{
static CamelType type = CAMEL_INVALID_TYPE;
-
+
if (type == CAMEL_INVALID_TYPE) {
#ifdef LOG_STREAM
dolog = getenv("EVOLUTION_MAIL_LOG_HTML") != NULL;
@@ -104,7 +104,7 @@ em_sync_stream_get_type (void)
(CamelObjectInitFunc) em_sync_stream_init,
(CamelObjectFinalizeFunc) em_sync_stream_finalize);
}
-
+
return type;
}
@@ -112,9 +112,9 @@ static void
em_sync_stream_class_init (EMSyncStreamClass *klass)
{
CamelStreamClass *stream_class = CAMEL_STREAM_CLASS (klass);
-
+
parent_class = (CamelStreamClass *) CAMEL_STREAM_TYPE;
-
+
/* virtual method overload */
stream_class->write = stream_write;
stream_class->flush = stream_flush;
@@ -170,7 +170,7 @@ emcs_gui_received(GIOChannel *source, GIOCondition cond, void *data)
#endif
break;
}
-
+
e_msgport_reply((EMsg *)msg);
d(printf("%p: gui sync op jobs done\n", emss));
diff --git a/mail/em-sync-stream.h b/mail/em-sync-stream.h
index b48afcc68a..0cb79a468d 100644
--- a/mail/em-sync-stream.h
+++ b/mail/em-sync-stream.h
@@ -56,7 +56,7 @@ typedef struct {
ssize_t (*sync_write) (CamelStream *stream, const char *buffer, size_t n);
int (*sync_close) (CamelStream *stream);
int (*sync_flush) (CamelStream *stream);
-
+
} EMSyncStreamClass;
CamelType em_sync_stream_get_type (void);
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 894f547c32..498b3cd5a1 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -122,13 +122,13 @@ em_utils_prompt_user(GtkWindow *parent, const char *promptkey, const char *tag,
gtk_box_pack_start ((GtkBox *)((GtkDialog *) mbox)->vbox, check, TRUE, TRUE, 0);
gtk_widget_show (check);
}
-
+
button = gtk_dialog_run ((GtkDialog *) mbox);
if (promptkey)
gconf_client_set_bool(gconf, promptkey, !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check)), NULL);
gtk_widget_destroy(mbox);
-
+
return button == GTK_RESPONSE_YES;
}
@@ -147,13 +147,13 @@ em_utils_uids_copy (GPtrArray *uids)
{
GPtrArray *copy;
int i;
-
+
copy = g_ptr_array_new ();
g_ptr_array_set_size (copy, uids->len);
-
+
for (i = 0; i < uids->len; i++)
copy->pdata[i] = g_strdup (uids->pdata[i]);
-
+
return copy;
}
@@ -167,10 +167,10 @@ void
em_utils_uids_free (GPtrArray *uids)
{
int i;
-
+
for (i = 0; i < uids->len; i++)
g_free (uids->pdata[i]);
-
+
g_ptr_array_free (uids, TRUE);
}
@@ -204,7 +204,7 @@ em_utils_configure_account (GtkWidget *parent)
gtk_widget_show(emae->editor);
gtk_grab_add(emae->editor);
gtk_main();
-
+
return mail_config_is_configured();
}
@@ -225,19 +225,19 @@ gboolean
em_utils_check_user_can_send_mail (GtkWidget *parent)
{
EAccount *account;
-
+
if (!mail_config_is_configured ()) {
if (!em_utils_configure_account (parent))
return FALSE;
}
-
+
if (!(account = mail_config_get_default_account ()))
return FALSE;
-
+
/* Check for a transport */
if (!account->transport->url)
return FALSE;
-
+
return TRUE;
}
@@ -249,19 +249,19 @@ static void
em_filter_editor_response (GtkWidget *dialog, int button, gpointer user_data)
{
EMFilterContext *fc;
-
+
if (button == GTK_RESPONSE_OK) {
char *user;
-
+
fc = g_object_get_data ((GObject *) dialog, "context");
user = g_strdup_printf ("%s/mail/filters.xml",
mail_component_peek_base_directory (mail_component_peek ()));
rule_context_save ((RuleContext *) fc, user);
g_free (user);
}
-
+
gtk_widget_destroy (dialog);
-
+
filter_editor = NULL;
}
@@ -285,19 +285,19 @@ em_utils_edit_filters (GtkWidget *parent)
const char *base_directory = mail_component_peek_base_directory (mail_component_peek ());
char *user, *system;
EMFilterContext *fc;
-
+
if (filter_editor) {
gdk_window_raise (GTK_WIDGET (filter_editor)->window);
return;
}
-
+
fc = em_filter_context_new ();
user = g_strdup_printf ("%s/mail/filters.xml", base_directory);
system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
rule_context_load ((RuleContext *) fc, system, user);
g_free (user);
g_free (system);
-
+
if (((RuleContext *) fc)->error) {
e_error_run((GtkWindow *)parent, "mail:filter-load-error", ((RuleContext *)fc)->error, NULL);
return;
@@ -311,15 +311,15 @@ em_utils_edit_filters (GtkWidget *parent)
filter_editor = (GtkWidget *) em_filter_editor_new (fc, em_filter_source_element_names);
if (parent != NULL)
e_dialog_set_transient_for ((GtkWindow *) filter_editor, parent);
-
+
gtk_window_set_title (GTK_WINDOW (filter_editor), _("Message Filters"));
g_object_set_data_full ((GObject *) filter_editor, "context", fc, (GtkDestroyNotify) g_object_unref);
g_signal_connect (filter_editor, "response", G_CALLBACK (em_filter_editor_response), NULL);
gtk_widget_show (GTK_WIDGET (filter_editor));
}
-/*
- * Picked this from e-d-s/libedataserver/e-data.
+/*
+ * Picked this from e-d-s/libedataserver/e-data.
* But it allows more characters to occur in filenames, especially when saving attachment.
*/
void
@@ -331,8 +331,8 @@ em_filename_make_safe (gchar *string)
const char *unsafe_chars = "/\":*?<>|\\#";
#else
const char *unsafe_chars = "/#";
-#endif
-
+#endif
+
g_return_if_fail (string != NULL);
p = string;
@@ -345,7 +345,7 @@ em_filename_make_safe (gchar *string)
* written?
*/
if (!g_unichar_isprint(c) || ( c < 0xff && strchr (unsafe_chars, c&0xff ))) {
- while (ts<p)
+ while (ts<p)
*ts++ = '_';
}
}
@@ -468,22 +468,22 @@ exit:
* @parent: parent window
* @filename: filename to save to
* @part: part to save
- *
+ *
* Save a part's content to a specific file
* Creates all needed directories and overwrites without prompting
*
* Returns %TRUE if saving succeeded, %FALSE otherwise
**/
gboolean
-em_utils_save_part_to_file(GtkWidget *parent, const char *filename, CamelMimePart *part)
+em_utils_save_part_to_file(GtkWidget *parent, const char *filename, CamelMimePart *part)
{
int done;
char *dirname;
struct stat st;
-
+
if (filename[0] == 0)
return FALSE;
-
+
dirname = g_path_get_dirname(filename);
if (g_mkdir_with_parents(dirname, 0777) == -1) {
e_error_run((GtkWindow *)parent, "mail:no-create-path", filename, g_strerror(errno), NULL);
@@ -498,15 +498,15 @@ em_utils_save_part_to_file(GtkWidget *parent, const char *filename, CamelMimePar
return FALSE;
}
}
-
+
if (g_stat(filename, &st) != -1 && !S_ISREG(st.st_mode)) {
e_error_run((GtkWindow *)parent, "mail:no-write-path-notfile", filename, NULL);
return FALSE;
}
-
+
/* FIXME: This doesn't handle default charsets */
mail_msg_wait(mail_save_part(part, filename, emu_save_part_done, &done, FALSE));
-
+
return done;
}
@@ -519,7 +519,7 @@ static void
emu_save_messages_response(GtkWidget *filesel, int response, struct _save_messages_data *data)
{
char *uri;
-
+
if (response == GTK_RESPONSE_OK) {
uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (filesel));
@@ -562,7 +562,7 @@ em_utils_save_messages (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids)
filesel = e_file_get_save_filesel(parent, _("Save Message..."), NULL, GTK_FILE_CHOOSER_ACTION_SAVE);
camel_object_ref(folder);
-
+
data = g_malloc(sizeof(struct _save_messages_data));
data->folder = folder;
data->uids = uids;
@@ -577,18 +577,18 @@ static void
emu_add_address_cb(BonoboListener *listener, const char *name, const CORBA_any *any, CORBA_Environment *ev, void *data)
{
char *type = bonobo_event_subtype(name);
-
+
if (!strcmp(type, "Destroy"))
gtk_widget_destroy((GtkWidget *)data);
-
+
g_free(type);
}
/**
* em_utils_add_address:
- * @parent:
- * @email:
- *
+ * @parent:
+ * @email:
+ *
* Add address @email to the addressbook.
**/
void em_utils_add_address(struct _GtkWidget *parent, const char *email)
@@ -598,16 +598,16 @@ void em_utils_add_address(struct _GtkWidget *parent, const char *email)
GtkWidget *control;
/*GtkWidget *socket;*/
char *buf;
-
+
cia = camel_internet_address_new ();
if (camel_address_decode ((CamelAddress *) cia, email) == -1) {
camel_object_unref (cia);
return;
}
-
+
buf = camel_address_format ((CamelAddress *) cia);
camel_object_unref (cia);
-
+
win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title((GtkWindow *)win, _("Add address"));
gtk_window_set_transient_for((GtkWindow *)win, ((GtkWindow *)parent));
@@ -617,9 +617,9 @@ void em_utils_add_address(struct _GtkWidget *parent, const char *email)
control = bonobo_widget_new_control("OAFIID:GNOME_Evolution_Addressbook_AddressPopup:" BASE_VERSION, CORBA_OBJECT_NIL);
bonobo_widget_set_property((BonoboWidget *)control, "email", TC_CORBA_string, buf, NULL);
g_free (buf);
-
+
bonobo_event_source_client_add_listener(bonobo_widget_get_objref((BonoboWidget *)control), emu_add_address_cb, NULL, NULL, win);
-
+
/*socket = find_socket (GTK_CONTAINER (control));
g_object_weak_ref ((GObject *) socket, (GWeakNotify) gtk_widget_destroy, win);*/
@@ -653,11 +653,11 @@ tag_editor_response (GtkWidget *dialog, int button, struct ted_t *ted)
CamelTag *tags, *t;
GPtrArray *uids;
int i;
-
+
if (button == GTK_RESPONSE_OK && (tags = message_tag_editor_get_tag_list (ted->editor))) {
folder = ted->folder;
uids = ted->uids;
-
+
camel_folder_freeze (folder);
for (i = 0; i < uids->len; i++) {
CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
@@ -669,14 +669,14 @@ tag_editor_response (GtkWidget *dialog, int button, struct ted_t *ted)
camel_message_info_free(mi);
}
}
-
+
camel_folder_thaw (folder);
camel_tag_list_free (&tags);
if (ted->emfv->preview)
em_format_redraw(ted->emfv->preview);
}
-
+
gtk_widget_destroy (dialog);
}
@@ -695,26 +695,26 @@ em_utils_flag_for_followup (GtkWidget *parent, CamelFolder *folder, GPtrArray *u
GtkWidget *editor;
struct ted_t *ted;
int i;
-
+
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
-
+
editor = (GtkWidget *) message_tag_followup_new ();
-
+
if (parent != NULL)
e_dialog_set_transient_for ((GtkWindow *) editor, parent);
-
+
camel_object_ref (folder);
-
+
ted = g_new (struct ted_t, 1);
ted->emfv = (EMFolderView *) parent;
ted->editor = MESSAGE_TAG_EDITOR (editor);
ted->folder = folder;
ted->uids = uids;
-
+
for (i = 0; i < uids->len; i++) {
CamelMessageInfo *info;
-
+
info = camel_folder_get_message_info (folder, uids->pdata[i]);
if (info) {
message_tag_followup_append_message (MESSAGE_TAG_FOLLOWUP (editor),
@@ -723,11 +723,11 @@ em_utils_flag_for_followup (GtkWidget *parent, CamelFolder *folder, GPtrArray *u
camel_message_info_free(info);
}
}
-
+
/* special-case... */
if (uids->len == 1) {
CamelMessageInfo *info;
-
+
info = camel_folder_get_message_info (folder, uids->pdata[0]);
if (info) {
const CamelTag *tags = camel_message_info_user_tags(info);
@@ -737,10 +737,10 @@ em_utils_flag_for_followup (GtkWidget *parent, CamelFolder *folder, GPtrArray *u
camel_message_info_free(info);
}
}
-
+
g_signal_connect (editor, "response", G_CALLBACK (tag_editor_response), ted);
g_object_weak_ref ((GObject *) editor, (GWeakNotify) ted_free, ted);
-
+
gtk_widget_show (editor);
}
@@ -757,10 +757,10 @@ void
em_utils_flag_for_followup_clear (GtkWidget *parent, CamelFolder *folder, GPtrArray *uids)
{
int i;
-
+
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
-
+
camel_folder_freeze (folder);
for (i = 0; i < uids->len; i++) {
CamelMessageInfo *mi = camel_folder_get_message_info(folder, uids->pdata[i]);
@@ -773,7 +773,7 @@ em_utils_flag_for_followup_clear (GtkWidget *parent, CamelFolder *folder, GPtrAr
}
}
camel_folder_thaw (folder);
-
+
em_utils_uids_free (uids);
}
@@ -792,12 +792,12 @@ em_utils_flag_for_followup_completed (GtkWidget *parent, CamelFolder *folder, GP
{
char *now;
int i;
-
+
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (uids != NULL);
-
+
now = camel_header_format_date (time (NULL), 0);
-
+
camel_folder_freeze (folder);
for (i = 0; i < uids->len; i++) {
const char *tag;
@@ -811,9 +811,9 @@ em_utils_flag_for_followup_completed (GtkWidget *parent, CamelFolder *folder, GP
}
}
camel_folder_thaw (folder);
-
+
g_free (now);
-
+
em_utils_uids_free (uids);
}
@@ -834,7 +834,7 @@ em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStr
filtered_stream = camel_stream_filter_new_with_stream(stream);
camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)from_filter);
camel_object_unref(from_filter);
-
+
for (i=0; i<uids->len; i++) {
CamelMimeMessage *message;
char *from;
@@ -853,7 +853,7 @@ em_utils_write_messages_to_stream(CamelFolder *folder, GPtrArray *uids, CamelStr
|| camel_data_wrapper_write_to_stream((CamelDataWrapper *)message, (CamelStream *)filtered_stream) == -1
|| camel_stream_flush((CamelStream *)filtered_stream) == -1)
res = -1;
-
+
g_free(from);
camel_object_unref(message);
@@ -887,16 +887,16 @@ em_utils_read_messages_from_stream(CamelFolder *folder, CamelStream *stream)
camel_object_unref(msg);
break;
}
-
+
camel_folder_append_message(folder, msg, NULL, NULL, ex);
camel_object_unref(msg);
-
+
if (camel_exception_is_set (ex))
break;
-
+
camel_mime_parser_step(mp, NULL, NULL);
}
-
+
camel_object_unref(mp);
if (!camel_exception_is_set(ex))
res = 0;
@@ -910,7 +910,7 @@ em_utils_read_messages_from_stream(CamelFolder *folder, CamelStream *stream)
* @data: selection data
* @folder: folder containign messages to copy into the selection
* @uids: uids of the messages to copy into the selection
- *
+ *
* Creates a mailbox-format selection.
* Warning: Could be BIG!
* Warning: This could block the ui for an extended period.
@@ -932,8 +932,8 @@ em_utils_selection_set_mailbox(GtkSelectionData *data, CamelFolder *folder, GPtr
/**
* em_utils_selection_get_mailbox:
* @data: selection data
- * @folder:
- *
+ * @folder:
+ *
* Receive a mailbox selection/dnd
* Warning: Could be BIG!
* Warning: This could block the ui for an extended period.
@@ -956,9 +956,9 @@ em_utils_selection_get_mailbox(GtkSelectionData *data, CamelFolder *folder)
/**
* em_utils_selection_get_message:
- * @data:
- * @folder:
- *
+ * @data:
+ * @folder:
+ *
* get a message/rfc822 data.
**/
void
@@ -985,8 +985,8 @@ em_utils_selection_get_message(GtkSelectionData *data, CamelFolder *folder)
* em_utils_selection_set_uidlist:
* @data: selection data
* @uri:
- * @uids:
- *
+ * @uids:
+ *
* Sets a "x-uid-list" format selection data.
*
* FIXME: be nice if this could take a folder argument rather than uri
@@ -998,12 +998,12 @@ em_utils_selection_set_uidlist(GtkSelectionData *data, const char *uri, GPtrArra
int i;
/* format: "uri\0uid1\0uid2\0uid3\0...\0uidn\0" */
-
+
g_byte_array_append(array, (unsigned char *)uri, strlen(uri)+1);
for (i=0; i<uids->len; i++)
g_byte_array_append(array, uids->pdata[i], strlen(uids->pdata[i])+1);
-
+
gtk_selection_data_set(data, data->target, 8, array->data, array->len);
g_byte_array_free(array, TRUE);
}
@@ -1012,9 +1012,9 @@ em_utils_selection_set_uidlist(GtkSelectionData *data, const char *uri, GPtrArra
* em_utils_selection_get_uidlist:
* @data: selection data
* @move: do we delete the messages.
- *
+ *
* Convert a uid list into a copy/move operation.
- *
+ *
* Warning: Could take some time to run.
**/
void
@@ -1027,7 +1027,7 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo
if (data == NULL || data->data == NULL || data->length == -1)
return;
-
+
uids = g_ptr_array_new();
inptr = (char *)data->data;
@@ -1060,10 +1060,10 @@ em_utils_selection_get_uidlist(GtkSelectionData *data, CamelFolder *dest, int mo
/**
* em_utils_selection_set_urilist:
- * @data:
- * @folder:
- * @uids:
- *
+ * @data:
+ * @folder:
+ * @uids:
+ *
* Set the selection data @data to a uri which points to a file, which is
* a berkely mailbox format mailbox. The file is automatically cleaned
* up when the application quits.
@@ -1101,7 +1101,7 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr
tmpfile = g_build_filename(tmpdir, file, NULL);
g_free(tmpdir);
g_free(file);
-
+
fd = g_open(tmpfile, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, 0666);
if (fd == -1) {
g_free(tmpfile);
@@ -1129,10 +1129,10 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr
/**
* em_utils_selection_set_urilist:
- * @data:
- * @folder:
- * @uids:
- *
+ * @data:
+ * @folder:
+ * @uids:
+ *
* Get the selection data @data from a uri list which points to a
* file, which is a berkely mailbox format mailbox. The file is
* automatically cleaned up when the application quits.
@@ -1182,13 +1182,13 @@ emu_save_part_done(CamelMimePart *part, char *name, int done, void *data)
/**
* em_utils_temp_save_part:
- * @parent:
- * @part:
+ * @parent:
+ * @part:
* @mode: readonly or not.
- *
+ *
* Save a part's content to a temporary file, and return the
* filename.
- *
+ *
* Return value: NULL if anything failed.
**/
char *
@@ -1219,7 +1219,7 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode)
path = g_build_filename(tmpdir, filename, NULL);
g_free(tmpdir);
g_free(mfilename);
-
+
/* FIXME: This doesn't handle default charsets */
if (mode)
mail_msg_wait(mail_save_part(part, path, emu_save_part_done, &done, TRUE));
@@ -1241,7 +1241,7 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode)
* @uri: uri for this folder, if known
*
* Decides if @folder is a Drafts folder.
- *
+ *
* Returns %TRUE if this is a Drafts folder or %FALSE otherwise.
**/
gboolean
@@ -1252,18 +1252,18 @@ em_utils_folder_is_drafts(CamelFolder *folder, const char *uri)
EIterator *iter;
int is = FALSE;
char *drafts_uri;
-
+
if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS))
return TRUE;
if (uri == NULL)
return FALSE;
-
+
accounts = mail_config_get_accounts();
iter = e_list_get_iterator((EList *)accounts);
while (e_iterator_is_valid(iter)) {
account = (EAccount *)e_iterator_get(iter);
-
+
if (account->drafts_folder_uri) {
drafts_uri = em_uri_to_camel (account->drafts_folder_uri);
if (camel_store_folder_uri_equal (folder->parent_store, drafts_uri, uri)) {
@@ -1273,12 +1273,12 @@ em_utils_folder_is_drafts(CamelFolder *folder, const char *uri)
}
g_free (drafts_uri);
}
-
+
e_iterator_next(iter);
}
-
+
g_object_unref(iter);
-
+
return is;
}
@@ -1288,7 +1288,7 @@ em_utils_folder_is_drafts(CamelFolder *folder, const char *uri)
* @uri: uri for this folder, if known
*
* Decides if @folder is a Sent folder
- *
+ *
* Returns %TRUE if this is a Sent folder or %FALSE otherwise.
**/
gboolean
@@ -1299,18 +1299,18 @@ em_utils_folder_is_sent(CamelFolder *folder, const char *uri)
EIterator *iter;
int is = FALSE;
char *sent_uri;
-
+
if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT))
return TRUE;
-
+
if (uri == NULL)
return FALSE;
-
+
accounts = mail_config_get_accounts();
iter = e_list_get_iterator((EList *)accounts);
while (e_iterator_is_valid(iter)) {
account = (EAccount *)e_iterator_get(iter);
-
+
if (account->sent_folder_uri) {
sent_uri = em_uri_to_camel (account->sent_folder_uri);
if (camel_store_folder_uri_equal (folder->parent_store, sent_uri, uri)) {
@@ -1320,12 +1320,12 @@ em_utils_folder_is_sent(CamelFolder *folder, const char *uri)
}
g_free (sent_uri);
}
-
+
e_iterator_next(iter);
}
-
+
g_object_unref(iter);
-
+
return is;
}
@@ -1335,7 +1335,7 @@ em_utils_folder_is_sent(CamelFolder *folder, const char *uri)
* @uri: uri for this folder, if known
*
* Decides if @folder is an Outbox folder
- *
+ *
* Returns %TRUE if this is an Outbox folder or %FALSE otherwise.
**/
gboolean
@@ -1347,9 +1347,9 @@ em_utils_folder_is_outbox(CamelFolder *folder, const char *uri)
/**
* em_utils_adjustment_page:
- * @adj:
- * @down:
- *
+ * @adj:
+ * @down:
+ *
* Move an adjustment up/down forward/back one page.
**/
void
@@ -1437,9 +1437,9 @@ emu_proxy_setup(void *data)
/**
* em_utils_get_proxy_uri:
- *
+ *
* Get the system proxy uri.
- *
+ *
* Return value: Must be freed when finished with.
**/
char *
@@ -1469,7 +1469,7 @@ em_utils_get_proxy_uri(void)
* then it will be used as an attribution string, and the
* content will be cited. Otherwise no citation or attribution
* will be performed.
- *
+ *
* Return Value: The part in displayable html format.
**/
char *
@@ -1479,11 +1479,11 @@ em_utils_part_to_html(CamelMimePart *part, ssize_t *len, EMFormat *source)
CamelStreamMem *mem;
GByteArray *buf;
char *text;
-
+
buf = g_byte_array_new ();
mem = (CamelStreamMem *) camel_stream_mem_new ();
camel_stream_mem_set_byte_array (mem, buf);
-
+
emfq = em_format_quote_new(NULL, (CamelStream *)mem, 0);
((EMFormat *) emfq)->composer = TRUE;
em_format_set_session((EMFormat *)emfq, session);
@@ -1511,14 +1511,14 @@ em_utils_part_to_html(CamelMimePart *part, ssize_t *len, EMFormat *source)
/**
* em_utils_message_to_html:
* @message:
- * @credits:
+ * @credits:
* @flags: EMFormatQuote flags
* @len:
* @source:
*
* Convert a message to html, quoting if the @credits attribution
* string is given.
- *
+ *
* Return value: The html version.
**/
char *
@@ -1534,13 +1534,13 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32
camel_stream_mem_set_byte_array (mem, buf);
emfq = em_format_quote_new(credits, (CamelStream *)mem, flags);
- ((EMFormat *) emfq)->composer = TRUE;
+ ((EMFormat *) emfq)->composer = TRUE;
em_format_set_session((EMFormat *)emfq, session);
-
+
if (!source) {
GConfClient *gconf;
char *charset;
-
+
/* FIXME: we should be getting this from the current view, not the global setting. */
gconf = gconf_client_get_default ();
charset = gconf_client_get_string (gconf, "/apps/evolution/mail/display/charset", NULL);
@@ -1548,7 +1548,7 @@ em_utils_message_to_html(CamelMimeMessage *message, const char *credits, guint32
g_object_unref (gconf);
g_free (charset);
}
-
+
em_format_format_clone((EMFormat *)emfq, NULL, NULL, message, source);
g_object_unref (emfq);
@@ -1581,7 +1581,7 @@ em_utils_expunge_folder (GtkWidget *parent, CamelFolder *folder)
if (!em_utils_prompt_user ((GtkWindow *) parent, "/apps/evolution/mail/prompts/expunge", "mail:ask-expunge", name, NULL))
return;
-
+
mail_expunge_folder(folder, NULL, NULL);
}
@@ -1599,18 +1599,18 @@ em_utils_empty_trash (GtkWidget *parent)
EAccount *account;
EIterator *iter;
CamelException ex;
-
+
if (!em_utils_prompt_user((GtkWindow *) parent, "/apps/evolution/mail/prompts/empty_trash", "mail:ask-empty-trash", NULL))
return;
-
+
camel_exception_init (&ex);
-
+
/* expunge all remote stores */
accounts = mail_config_get_accounts ();
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
-
+
/* make sure this is a valid source */
if (account->enabled && account->source->url) {
provider = camel_provider_get(account->source->url, &ex);
@@ -1621,16 +1621,16 @@ em_utils_empty_trash (GtkWidget *parent)
mail_empty_trash (account, NULL, NULL);
}
}
-
+
/* clear the exception for the next round */
camel_exception_clear (&ex);
}
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
-
+
/* Now empty the local trash folder */
mail_empty_trash (NULL, NULL, NULL);
}
@@ -1640,23 +1640,23 @@ em_utils_folder_name_from_uri (const char *uri)
{
CamelURL *url;
char *folder_name = NULL;
-
+
if (uri == NULL || (url = camel_url_new (uri, NULL)) == NULL)
return NULL;
-
+
if (url->fragment)
folder_name = url->fragment;
else if (url->path)
folder_name = url->path + 1;
-
+
if (folder_name == NULL) {
camel_url_free (url);
return NULL;
}
-
+
folder_name = g_strdup (folder_name);
camel_url_free (url);
-
+
return folder_name;
}
@@ -1711,7 +1711,7 @@ char *em_uri_from_camel(const char *curi)
} else {
euri = g_strdup_printf("email://%s/", uid);
}
-
+
d(printf("em uri from camel '%s' -> '%s'\n", curi, euri));
camel_url_free(curl);
@@ -1788,7 +1788,7 @@ char *em_uri_to_camel(const char *euri)
service = account->source;
if (!(provider = camel_provider_get (service->url, NULL)))
return g_strdup (euri);
-
+
curl = camel_url_new(service->url, NULL);
if (provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)
camel_url_set_fragment(curl, eurl->path[0]=='/'?eurl->path+1:eurl->path);
@@ -2030,7 +2030,7 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local)
photo = e_contact_get (contact, E_CONTACT_LOGO);
g_list_foreach (contacts, (GFunc)g_object_unref, NULL);
g_list_free (contacts);
- }
+ }
g_object_unref (source); /* Is it? */
g_object_unref(book);
}
@@ -2048,8 +2048,8 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local)
/* Form a mime part out of the photo */
part = camel_mime_part_new();
- camel_mime_part_set_content(part,
- (const char *) photo->data.inlined.data,
+ camel_mime_part_set_content(part,
+ (const char *) photo->data.inlined.data,
photo->data.inlined.length, "image/jpeg");
e_contact_photo_free (photo);
@@ -2059,10 +2059,10 @@ em_utils_contact_photo (struct _CamelInternetAddress *cia, gboolean local)
/**
* em_utils_snoop_type:
- * @part:
- *
+ * @part:
+ *
* Tries to snoop the mime type of a part.
- *
+ *
* Return value: NULL if unknown (more likely application/octet-stream).
**/
const char *
@@ -2070,16 +2070,16 @@ em_utils_snoop_type(CamelMimePart *part)
{
const char *filename, *name_type = NULL, *magic_type = NULL;
CamelDataWrapper *dw;
-
+
filename = camel_mime_part_get_filename (part);
if (filename) {
/* GNOME-VFS will misidentify TNEF attachments as MPEG */
if (!strcmp (filename, "winmail.dat"))
return "application/vnd.ms-tnef";
-
+
name_type = gnome_vfs_mime_type_from_name(filename);
}
-
+
dw = camel_medium_get_content_object((CamelMedium *)part);
if (!camel_data_wrapper_is_offline(dw)) {
CamelStreamMem *mem = (CamelStreamMem *)camel_stream_mem_new();
@@ -2097,7 +2097,7 @@ em_utils_snoop_type(CamelMimePart *part)
* that instead and if it returns "application/octet-stream"
* try to do better with the filename check.
*/
-
+
if (magic_type) {
if (name_type
&& (!strcmp(magic_type, "text/plain")
diff --git a/mail/em-vfolder-context.c b/mail/em-vfolder-context.c
index fda942869c..36ef03cf57 100644
--- a/mail/em-vfolder-context.c
+++ b/mail/em-vfolder-context.c
@@ -45,7 +45,7 @@ static void
em_vfolder_context_class_init(EMVFolderContextClass *klass)
{
parent_class = g_type_class_ref(RULE_TYPE_CONTEXT);
-
+
((GObjectClass *)klass)->finalize = em_vfolder_context_finalise;
((RuleContextClass *)klass)->new_element = vfolder_new_element;
}
@@ -55,7 +55,7 @@ em_vfolder_context_init(EMVFolderContext *vc)
{
rule_context_add_part_set((RuleContext *) vc, "partset", filter_part_get_type(),
rule_context_add_part, rule_context_next_part);
-
+
rule_context_add_rule_set((RuleContext *) vc, "ruleset", em_vfolder_rule_get_type(),
rule_context_add_rule, rule_context_next_rule);
@@ -66,7 +66,7 @@ GType
em_vfolder_context_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMVFolderContextClass),
@@ -79,10 +79,10 @@ em_vfolder_context_get_type(void)
0, /* n_preallocs */
(GInstanceInitFunc) em_vfolder_context_init,
};
-
+
type = g_type_register_static(RULE_TYPE_CONTEXT, "EMVFolderContext", &info, 0);
}
-
+
return type;
}
@@ -90,7 +90,7 @@ em_vfolder_context_get_type(void)
* em_vfolder_context_new:
*
* Create a new EMVFolderContext object.
- *
+ *
* Return value: A new #EMVFolderContext object.
**/
EMVFolderContext *
diff --git a/mail/em-vfolder-context.h b/mail/em-vfolder-context.h
index 2330179a4c..d47730f41f 100644
--- a/mail/em-vfolder-context.h
+++ b/mail/em-vfolder-context.h
@@ -36,7 +36,7 @@ typedef struct _EMVFolderContextClass EMVFolderContextClass;
struct _EMVFolderContext {
RuleContext parent_object;
-
+
};
struct _EMVFolderContextClass {
diff --git a/mail/em-vfolder-editor.c b/mail/em-vfolder-editor.c
index 05ee9cc13e..d077170824 100644
--- a/mail/em-vfolder-editor.c
+++ b/mail/em-vfolder-editor.c
@@ -50,11 +50,11 @@ em_vfolder_editor_class_init (EMVFolderEditorClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
RuleEditorClass *re_class = (RuleEditorClass *) klass;
-
+
parent_class = g_type_class_ref (rule_editor_get_type ());
-
+
gobject_class->finalize = em_vfolder_editor_finalise;
-
+
/* override methods */
re_class->create_rule = create_rule;
}
@@ -69,7 +69,7 @@ GtkType
em_vfolder_editor_get_type (void)
{
static GtkType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (EMVFolderEditorClass),
@@ -82,10 +82,10 @@ em_vfolder_editor_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) em_vfolder_editor_init,
};
-
+
type = g_type_register_static (RULE_TYPE_EDITOR, "EMVFolderEditor", &info, 0);
}
-
+
return type;
}
@@ -93,7 +93,7 @@ em_vfolder_editor_get_type (void)
* em_vfolder_editor_new:
*
* Create a new EMVFolderEditor object.
- *
+ *
* Return value: A new #EMVFolderEditor object.
**/
EMVFolderEditor *
@@ -102,7 +102,7 @@ em_vfolder_editor_new (EMVFolderContext *vc)
EMVFolderEditor *ve = (EMVFolderEditor *) g_object_new (em_vfolder_editor_get_type(), NULL);
GladeXML *gui;
char *gladefile;
-
+
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"filter.glade",
NULL);
@@ -112,7 +112,7 @@ em_vfolder_editor_new (EMVFolderContext *vc)
rule_editor_construct ((RuleEditor *) ve, (RuleContext *) vc, gui, "incoming", _("Search _Folders"));
gtk_widget_hide(glade_xml_get_widget (gui, "filter_source"));
g_object_unref (gui);
-
+
return ve;
}
@@ -121,11 +121,11 @@ create_rule (RuleEditor *re)
{
FilterRule *rule = filter_rule_new ();
FilterPart *part;
-
+
/* create a rule with 1 part in it */
rule = (FilterRule *) em_vfolder_rule_new ();
part = rule_context_next_part (re->context, NULL);
filter_rule_add_part (rule, filter_part_clone (part));
-
+
return rule;
}
diff --git a/mail/em-vfolder-editor.h b/mail/em-vfolder-editor.h
index 25497f4c9c..65500ba374 100644
--- a/mail/em-vfolder-editor.h
+++ b/mail/em-vfolder-editor.h
@@ -37,7 +37,7 @@ typedef struct _EMVFolderEditorClass EMVFolderEditorClass;
struct _EMVFolderEditor {
RuleEditor parent_object;
-
+
};
struct _EMVFolderEditorClass {
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index 15b93f24b0..d3b3ecc0e8 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -68,7 +68,7 @@ GType
em_vfolder_rule_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EMVFolderRuleClass),
@@ -81,10 +81,10 @@ em_vfolder_rule_get_type(void)
0, /* n_preallocs */
(GInstanceInitFunc)em_vfolder_rule_init,
};
-
+
type = g_type_register_static(FILTER_TYPE_RULE, "EMVFolderRule", &info, 0);
}
-
+
return type;
}
@@ -93,11 +93,11 @@ em_vfolder_rule_class_init(EMVFolderRuleClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS(klass);
FilterRuleClass *fr_class =(FilterRuleClass *)klass;
-
+
parent_class = g_type_class_ref(FILTER_TYPE_RULE);
-
+
object_class->finalize = em_vfolder_rule_finalise;
-
+
/* override methods */
fr_class->validate = validate;
fr_class->eq = vfolder_eq;
@@ -119,10 +119,10 @@ static void
em_vfolder_rule_finalise(GObject *obj)
{
EMVFolderRule *vr =(EMVFolderRule *)obj;
-
+
g_list_foreach(vr->sources, (GFunc)g_free, NULL);
g_list_free(vr->sources);
-
+
G_OBJECT_CLASS(parent_class)->finalize(obj);
}
@@ -130,7 +130,7 @@ em_vfolder_rule_finalise(GObject *obj)
* em_vfolder_rule_new:
*
* Create a new EMVFolderRule object.
- *
+ *
* Return value: A new #EMVFolderRule object.
**/
EMVFolderRule *
@@ -144,9 +144,9 @@ em_vfolder_rule_add_source(EMVFolderRule *vr, const char *uri)
{
g_return_if_fail (EM_IS_VFOLDER_RULE(vr));
g_return_if_fail (uri);
-
+
vr->sources = g_list_append(vr->sources, g_strdup(uri));
-
+
filter_rule_emit_changed((FilterRule *)vr);
}
@@ -154,9 +154,9 @@ const char *
em_vfolder_rule_find_source(EMVFolderRule *vr, const char *uri)
{
GList *l;
-
+
g_return_val_if_fail (EM_IS_VFOLDER_RULE(vr), NULL);
-
+
/* only does a simple string or address comparison, should
probably do a decoded url comparison */
l = vr->sources;
@@ -165,7 +165,7 @@ em_vfolder_rule_find_source(EMVFolderRule *vr, const char *uri)
return l->data;
l = l->next;
}
-
+
return NULL;
}
@@ -173,9 +173,9 @@ void
em_vfolder_rule_remove_source(EMVFolderRule *vr, const char *uri)
{
char *found;
-
+
g_return_if_fail (EM_IS_VFOLDER_RULE(vr));
-
+
found =(char *)em_vfolder_rule_find_source(vr, uri);
if (found) {
vr->sources = g_list_remove(vr->sources, found);
@@ -188,7 +188,7 @@ const char *
em_vfolder_rule_next_source(EMVFolderRule *vr, const char *last)
{
GList *node;
-
+
if (last == NULL) {
node = vr->sources;
} else {
@@ -198,10 +198,10 @@ em_vfolder_rule_next_source(EMVFolderRule *vr, const char *last)
else
node = g_list_next(node);
}
-
+
if (node)
return (const char *)node->data;
-
+
return NULL;
}
@@ -209,13 +209,13 @@ static int
validate(FilterRule *fr)
{
g_return_val_if_fail(fr != NULL, 0);
-
+
if (!fr->name || !*fr->name) {
/* FIXME: set a parent window? */
e_error_run(NULL, "mail:no-name-vfolder", NULL);
return 0;
}
-
+
/* We have to have at least one source set in the "specific" case.
Do not translate this string! */
if (((EMVFolderRule *)fr)->with == EM_VFOLDER_RULE_WITH_SPECIFIC && ((EMVFolderRule *)fr)->sources == NULL) {
@@ -223,7 +223,7 @@ validate(FilterRule *fr)
e_error_run(NULL, "mail:vfolder-no-source", NULL);
return 0;
}
-
+
return FILTER_RULE_CLASS(parent_class)->validate(fr);
}
@@ -231,15 +231,15 @@ static int
list_eq(GList *al, GList *bl)
{
int truth = TRUE;
-
+
while (truth && al && bl) {
char *a = al->data, *b = bl->data;
-
+
truth = strcmp(a, b)== 0;
al = al->next;
bl = bl->next;
}
-
+
return truth && al == NULL && bl == NULL;
}
@@ -271,7 +271,7 @@ xml_encode(FilterRule *fr)
xmlAddChild(set, work);
l = l->next;
}
-
+
return node;
}
@@ -297,11 +297,11 @@ xml_decode(FilterRule *fr, xmlNodePtr node, struct _RuleContext *f)
int result;
EMVFolderRule *vr =(EMVFolderRule *)fr;
char *tmp;
-
+
result = FILTER_RULE_CLASS(parent_class)->xml_decode(fr, node, f);
if (result != 0)
return result;
-
+
/* handle old format file, vfolder source is in filterrule */
if (strcmp(fr->source, "incoming")!= 0) {
set_with(vr, fr->source);
@@ -339,20 +339,20 @@ rule_copy(FilterRule *dest, FilterRule *src)
{
EMVFolderRule *vdest, *vsrc;
GList *node;
-
+
vdest =(EMVFolderRule *)dest;
vsrc =(EMVFolderRule *)src;
-
+
if (vdest->sources) {
g_list_foreach(vdest->sources, (GFunc)g_free, NULL);
g_list_free(vdest->sources);
vdest->sources = NULL;
}
-
+
node = vsrc->sources;
while (node) {
char *uri = node->data;
-
+
vdest->sources = g_list_append(vdest->sources, g_strdup(uri));
node = node->next;
}
@@ -402,13 +402,13 @@ select_source(GtkWidget *list, struct _source_data *data)
GtkTreeViewColumn *column;
GtkTreePath *path;
GtkTreeIter iter;
-
+
gtk_tree_view_get_cursor(data->list, &path, &column);
gtk_tree_model_get_iter(GTK_TREE_MODEL(data->model), &iter, path);
gtk_tree_path_free(path);
-
+
gtk_tree_model_get(GTK_TREE_MODEL(data->model), &iter, 0, &data->current, -1);
-
+
set_sensitive(data);
}
@@ -417,7 +417,7 @@ select_source_with_changed(GtkWidget *widget, struct _source_data *data)
{
em_vfolder_rule_with_t with = 0;
GSList *group = NULL;
- gint i = 0;
+ gint i = 0;
if ( !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) )
return;
@@ -425,7 +425,7 @@ select_source_with_changed(GtkWidget *widget, struct _source_data *data)
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget));
for (i=0; i< g_slist_length(group); i++) {
- if ( g_slist_nth_data (group, with = i) == widget )
+ if ( g_slist_nth_data (group, with = i) == widget )
break;
}
@@ -481,11 +481,11 @@ vfr_folder_response(GtkWidget *dialog, gint button, struct _source_data *data)
char *urinice, *euri;
GtkTreeSelection *selection;
GtkTreeIter iter;
-
+
euri = em_uri_from_camel(uri);
data->vr->sources = g_list_append(data->vr->sources, euri);
-
+
gtk_list_store_append(data->model, &iter);
urinice = format_source(euri);
gtk_list_store_set(data->model, &iter, 0, urinice, 1, euri, -1);
@@ -505,10 +505,10 @@ source_add(GtkWidget *widget, struct _source_data *data)
{
EMFolderTree *emft;
GtkWidget *dialog;
-
+
emft =(EMFolderTree *)em_folder_tree_new_with_model(mail_component_peek_tree_model(mail_component_peek()));
em_folder_tree_set_excluded(emft, EMFT_EXCLUDE_NOSELECT);
-
+
dialog = em_folder_selector_new(emft, EM_FOLDER_SELECTOR_CAN_CREATE, _("Select Folder"), NULL, _("_Add"));
gtk_window_set_transient_for((GtkWindow *)dialog, (GtkWindow *)gtk_widget_get_toplevel(widget));
gtk_window_set_modal((GtkWindow *)dialog, TRUE);
@@ -525,44 +525,44 @@ source_remove(GtkWidget *widget, struct _source_data *data)
GtkTreeIter iter;
int index = 0;
int n;
-
+
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(data->list));
-
+
source = NULL;
while ((source = em_vfolder_rule_next_source(data->vr, source))) {
path = gtk_tree_path_new();
gtk_tree_path_append_index(path, index);
-
+
if (gtk_tree_selection_path_is_selected(selection, path)) {
gtk_tree_model_get_iter(GTK_TREE_MODEL(data->model), &iter, path);
-
+
em_vfolder_rule_remove_source(data->vr, source);
gtk_list_store_remove(data->model, &iter);
gtk_tree_path_free(path);
-
+
/* now select the next rule */
n = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(data->model), NULL);
index = index >= n ? n - 1 : index;
-
+
if (index >= 0) {
path = gtk_tree_path_new();
gtk_tree_path_append_index(path, index);
gtk_tree_model_get_iter(GTK_TREE_MODEL(data->model), &iter, path);
gtk_tree_path_free(path);
-
+
gtk_tree_selection_select_iter(selection, &iter);
gtk_tree_model_get(GTK_TREE_MODEL(data->model), &iter, 0, &data->current, -1);
} else {
data->current = NULL;
}
-
+
break;
}
-
+
index++;
gtk_tree_path_free(path);
}
-
+
set_sensitive(data);
}
@@ -577,32 +577,32 @@ em_vfolder_editor_sourcelist_new(char *widget_name, char *string1, char *string2
GtkTreeSelection *selection;
GtkCellRenderer *renderer;
GtkListStore *model;
-
+
scrolled = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
+
model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
table = gtk_tree_view_new_with_model((GtkTreeModel *)model);
gtk_tree_view_set_headers_visible((GtkTreeView *)table, FALSE);
-
+
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes((GtkTreeView *)table, -1,
_("Search Folder source"), renderer,
"text", 0, NULL);
-
+
selection = gtk_tree_view_get_selection((GtkTreeView *)table);
gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
-
+
gtk_container_add(GTK_CONTAINER(scrolled), table);
-
+
g_object_set_data((GObject *)scrolled, "table", table);
g_object_set_data((GObject *)scrolled, "model", model);
-
+
gtk_widget_show(scrolled);
gtk_widget_show(table);
-
+
g_object_unref (model);
return scrolled;
@@ -620,13 +620,13 @@ get_widget(FilterRule *fr, RuleContext *rc)
GladeXML *gui;
int i;
char *gladefile;
-
+
widget = FILTER_RULE_CLASS(parent_class)->get_widget(fr, rc);
-
+
data = g_malloc0(sizeof(*data));
data->rc = rc;
data->vr = vr;
-
+
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
"mail-dialogs.glade",
NULL);
@@ -634,18 +634,18 @@ get_widget(FilterRule *fr, RuleContext *rc)
g_free (gladefile);
frame = glade_xml_get_widget(gui, "vfolder_source_frame");
-
+
g_object_set_data_full((GObject *)frame, "data", data, g_free);
-
+
for(i = 0; i < BUTTON_LAST; i++) {
data->buttons[i] =(GtkButton *)glade_xml_get_widget(gui, edit_buttons[i].name);
g_signal_connect(data->buttons[i], "clicked", edit_buttons[i].func, data);
}
-
+
list = glade_xml_get_widget(gui, "source_list");
data->list =(GtkTreeView *)g_object_get_data((GObject *)list, "table");
data->model =(GtkListStore *)g_object_get_data((GObject *)list, "model");
-
+
source = NULL;
while ((source = em_vfolder_rule_next_source(vr, source))) {
char *nice = format_source(source);
@@ -654,9 +654,9 @@ get_widget(FilterRule *fr, RuleContext *rc)
gtk_list_store_set(data->model, &iter, 0, nice, 1, source, -1);
g_free(nice);
}
-
+
g_signal_connect(data->list, "cursor-changed", G_CALLBACK(select_source), data);
-
+
rb = (GtkRadioButton *)glade_xml_get_widget (gui, "local_rb");
g_signal_connect (GTK_WIDGET(rb), "toggled", G_CALLBACK(select_source_with_changed), data);
@@ -674,12 +674,12 @@ get_widget(FilterRule *fr, RuleContext *rc)
rb = g_slist_nth_data(gtk_radio_button_get_group (rb), vr->with);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rb), TRUE);
gtk_signal_emit_by_name (GTK_OBJECT (rb), "toggled");
-
+
set_sensitive(data);
-
+
g_object_unref(gui);
gtk_box_pack_start(GTK_BOX(widget), frame, TRUE, TRUE, 3);
-
+
return widget;
}
diff --git a/mail/em-vfolder-rule.h b/mail/em-vfolder-rule.h
index 67721605ce..e9e7f6d537 100644
--- a/mail/em-vfolder-rule.h
+++ b/mail/em-vfolder-rule.h
@@ -46,7 +46,7 @@ typedef enum _em_vfolder_rule_with_t em_vfolder_rule_with_t;
struct _EMVFolderRule {
FilterRule rule;
-
+
em_vfolder_rule_with_t with;
GList *sources; /* uri's of the source folders */
};
diff --git a/mail/em-vfs-stream.c b/mail/em-vfs-stream.c
index 6b528772f0..290ea86a4d 100644
--- a/mail/em-vfs-stream.c
+++ b/mail/em-vfs-stream.c
@@ -42,7 +42,7 @@
#define LOG_STREAM
-#define d(x)
+#define d(x)
#define EMVS_CLASS(x) ((EMVFSStreamClass *)(((CamelObject *)(x))->klass))
@@ -293,7 +293,7 @@ CamelType
em_vfs_stream_get_type (void)
{
static CamelType type = CAMEL_INVALID_TYPE;
-
+
if (type == CAMEL_INVALID_TYPE) {
parent_class = (CamelStreamClass *)camel_seekable_stream_get_type();
type = camel_type_register ((CamelType)parent_class,
@@ -305,17 +305,17 @@ em_vfs_stream_get_type (void)
(CamelObjectInitFunc) em_vfs_stream_init,
(CamelObjectFinalizeFunc) em_vfs_stream_finalize);
}
-
+
return type;
}
/**
* emvfs_stream_new:
- * @handle:
- *
+ * @handle:
+ *
* Create a new camel stream from a GnomeVFS handle. The camel stream
* will own the handle from now on.
- *
+ *
* Return value: A CamelStream that will talk to @handle. This function cannot fail.
**/
EMVFSStream *
diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c
index 35fd28c5b5..1fafedc0a2 100644
--- a/mail/importers/elm-importer.c
+++ b/mail/importers/elm-importer.c
@@ -1,20 +1,20 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* elm-importer.c
- *
+ *
* Authors: Iain Holmes <iain@ximian.com>
* Michael Zucchi <notzed@ximian.com>
*
* Copyright 2001 Ximian, Inc. (www.ximian.com)
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -303,7 +303,7 @@ mail_importer_elm_import(EImport *ei, EImportTarget *target)
m->status = camel_operation_new(elm_status, m);
id = m->msg.seq;
-
+
e_thread_put(mail_thread_queued, (EMsg *)m);
return id;
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index b12ecca3a2..1ad64b91e3 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -77,7 +77,7 @@ static GtkWidget *
mbox_getwidget(EImport *ei, EImportTarget *target, EImportImporter *im)
{
GtkWidget *hbox, *w;
-
+
hbox = gtk_hbox_new(FALSE, 0);
w = gtk_label_new(_("Destination folder:"));
@@ -124,7 +124,7 @@ mbox_supported(EImport *ei, EImportTarget *target, EImportImporter *im)
close(fd);
}
- return ret;
+ return ret;
}
static void
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index 4e36ebd7fa..5905080735 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -56,10 +56,10 @@
/**
* mail_importer_make_local_folder:
- * @folderpath:
- *
+ * @folderpath:
+ *
* Check a local folder exists at path @folderpath, and if not, create it.
- *
+ *
* Return value: The physical uri of the folder, or NULL if the folder did
* not exist and could not be created.
**/
@@ -86,12 +86,12 @@ mail_importer_add_line (MailImporter *importer,
CamelMimeMessage *msg;
CamelMessageInfo *info;
CamelException *ex;
-
+
if (importer->mstream == NULL)
importer->mstream = CAMEL_STREAM_MEM (camel_stream_mem_new ());
camel_stream_write (CAMEL_STREAM (importer->mstream), str, strlen (str));
-
+
if (finished == FALSE)
return;
@@ -102,7 +102,7 @@ mail_importer_add_line (MailImporter *importer,
msg = camel_mime_message_new ();
camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg),
CAMEL_STREAM (importer->mstream));
-
+
camel_object_unref (importer->mstream);
importer->mstream = NULL;
@@ -133,7 +133,7 @@ struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *fac
struct _import_mbox_msg {
struct _mail_msg msg;
-
+
char *path;
char *uri;
CamelOperation *cancel;
@@ -298,7 +298,7 @@ static void
import_mbox_free (struct _mail_msg *mm)
{
struct _import_mbox_msg *m = (struct _import_mbox_msg *)mm;
-
+
if (m->cancel)
camel_operation_unref(m->cancel);
g_free(m->uri);
@@ -436,11 +436,11 @@ import_folders_rec(struct _import_folders_data *m, const char *filepath, const c
/**
* mail_importer_import_folders_sync:
- * @filepath:
- * @:
- * @flags:
- * @cancel:
- *
+ * @filepath:
+ * @:
+ * @flags:
+ * @cancel:
+ *
* import from a base path @filepath into the root local folder tree,
* scanning all sub-folders.
*
diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c
index 4487d51f0e..97f3349e66 100644
--- a/mail/importers/pine-importer.c
+++ b/mail/importers/pine-importer.c
@@ -1,22 +1,22 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* pine-importer.c
- *
- * Authors:
+ *
+ * Authors:
* Iain Holmes <iain@ximian.com>
* Michael Zucchi <notzed@ximian.com>
*
* Copyright 2001 Ximian, Inc. (www.ximian.com)
* Copyright 2004 Novell, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -177,7 +177,7 @@ import_contacts(void)
printf("importing pine addressbook\n");
if (!e_book_get_addressbooks(&source_list, NULL))
- return;
+ return;
name = g_build_filename(g_get_home_dir(), ".addressbook", NULL);
fp = fopen(name, "r");
@@ -192,7 +192,7 @@ import_contacts(void)
g_warning ("Could not create EBook.");
return;
}
-
+
e_book_open(book, TRUE, NULL);
g_object_unref(primary);
g_object_unref(source_list);
@@ -349,7 +349,7 @@ mail_importer_pine_import(EImport *ei, EImportTarget *target)
m->status = camel_operation_new(pine_status, m);
id = m->msg.seq;
-
+
e_thread_put(mail_thread_queued, (EMsg *)m);
return id;
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index ce43d1ac76..675dbcc9bc 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -66,7 +66,7 @@ rule_match_recipients (RuleContext *context, FilterRule *rule, CamelInternetAddr
int i;
const char *real, *addr;
char *namestr;
-
+
/* address types etc should handle multiple values */
for (i = 0; camel_internet_address_get (iaddr, i, &real, &addr); i++) {
part = rule_context_create_part (context, "to");
@@ -75,7 +75,7 @@ rule_match_recipients (RuleContext *context, FilterRule *rule, CamelInternetAddr
filter_option_set_current ((FilterOption *)element, "contains");
element = filter_part_find_element (part, "recipient");
filter_input_set_value ((FilterInput *)element, addr);
-
+
namestr = g_strdup_printf (_("Mail to %s"), real && real[0] ? real : addr);
filter_rule_set_name (rule, namestr);
g_free (namestr);
@@ -88,9 +88,9 @@ static const char *
strip_re (const char *subject)
{
const unsigned char *s, *p;
-
+
s = (unsigned char *) subject;
-
+
while (*s) {
while (isspace (*s))
s++;
@@ -108,7 +108,7 @@ strip_re (const char *subject)
} else
break;
}
-
+
return (char *) s;
}
@@ -135,7 +135,7 @@ rule_add_subject (RuleContext *context, FilterRule *rule, const char *text)
{
FilterPart *part;
FilterElement *element;
-
+
/* dont match on empty strings ever */
if (*text == 0)
return;
@@ -152,7 +152,7 @@ rule_add_sender (RuleContext *context, FilterRule *rule, const char *text)
{
FilterPart *part;
FilterElement *element;
-
+
/* dont match on empty strings ever */
if (*text == 0)
return;
@@ -172,12 +172,12 @@ rule_match_subject (RuleContext *context, FilterRule *rule, const char *subject)
const char *s;
const char *s1, *s2;
char *tmp;
-
+
s = strip_re (subject);
/* dont match on empty subject */
if (*s == 0)
return;
-
+
/* [blahblah] is probably a mailing list, match on it separately */
s1 = strchr (s, '[');
s2 = strchr (s, ']');
@@ -200,7 +200,7 @@ rule_match_subject (RuleContext *context, FilterRule *rule, const char *subject)
rule_add_subject (context, rule, tmp);
s = s1+1;
}
-
+
/* just lump the rest together */
tmp = g_alloca (strlen (s) + 1);
strcpy (tmp, s);
@@ -213,16 +213,16 @@ rule_match_mlist(RuleContext *context, FilterRule *rule, const char *mlist)
{
FilterPart *part;
FilterElement *element;
-
+
if (mlist[0] == 0)
return;
-
+
part = rule_context_create_part(context, "mlist");
filter_rule_add_part(rule, part);
-
+
element = filter_part_find_element(part, "mlist-type");
filter_option_set_current((FilterOption *)element, "is");
-
+
element = filter_part_find_element (part, "mlist");
filter_input_set_value((FilterInput *)element, mlist);
}
@@ -235,7 +235,7 @@ rule_from_address (FilterRule *rule, RuleContext *context, CamelInternetAddress*
if (flags & AUTO_FROM) {
const char *name, *address;
char *namestr;
-
+
camel_internet_address_get (addr, 0, &name, &address);
rule_add_sender (context, rule, address);
if (name == NULL || name[0] == '\0')
@@ -254,15 +254,15 @@ static void
rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg, int flags)
{
CamelInternetAddress *addr;
-
+
rule->grouping = FILTER_GROUP_ANY;
-
+
if (flags & AUTO_SUBJECT) {
const char *subject = msg->subject ? msg->subject : "";
char *namestr;
-
+
rule_match_subject (context, rule, subject);
-
+
namestr = g_strdup_printf (_("Subject is %s"), strip_re (subject));
filter_rule_set_name (rule, namestr);
g_free (namestr);
@@ -273,7 +273,7 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg
int i;
const char *name, *address;
char *namestr;
-
+
from = camel_mime_message_get_from (msg);
for (i = 0; from && camel_internet_address_get (from, i, &name, &address); i++) {
rule_add_sender(context, rule, address);
@@ -294,7 +294,7 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg
}
if (flags & AUTO_MLIST) {
char *name, *mlist;
-
+
mlist = camel_header_raw_check_mailing_list (&((CamelMimePart *)msg)->headers);
if (mlist) {
rule_match_mlist(context, rule, mlist);
@@ -339,13 +339,13 @@ filter_rule_from_message (EMFilterContext *context, CamelMimeMessage *msg, int f
{
EMFilterRule *rule;
FilterPart *part;
-
+
rule = em_filter_rule_new ();
rule_from_message ((FilterRule *)rule, (RuleContext *)context, msg, flags);
-
+
part = em_filter_context_next_action (context, NULL);
em_filter_rule_add_action (rule, filter_part_clone (part));
-
+
return (FilterRule *)rule;
}
@@ -355,9 +355,9 @@ filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flag
EMFilterContext *fc;
char *user, *system;
FilterRule *rule;
-
+
g_return_if_fail (msg != NULL);
-
+
fc = em_filter_context_new ();
user = g_strdup_printf ("%s/mail/filters.xml",
mail_component_peek_base_directory (mail_component_peek ()));
@@ -366,9 +366,9 @@ filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flag
g_free (system);
rule = filter_rule_from_message (fc, msg, flags);
-
+
filter_rule_set_source (rule, source);
-
+
rule_context_add_rule_gui ((RuleContext *)fc, rule, _("Add Filter Rule"), user);
g_free (user);
g_object_unref (fc);
@@ -390,7 +390,7 @@ mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri
system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
rule_context_load ((RuleContext *)fc, system, user);
g_free (system);
-
+
changed = rule_context_rename_uri((RuleContext *)fc, eolduri, enewuri, g_str_equal);
if (changed) {
d(printf("Folder rename '%s' -> '%s' changed filters, resaving\n", olduri, newuri));
@@ -398,7 +398,7 @@ mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri
g_warning("Could not write out changed filter rules\n");
rule_context_free_uri_list((RuleContext *)fc, changed);
}
-
+
g_free(user);
g_object_unref(fc);
@@ -421,13 +421,13 @@ mail_filter_delete_uri(CamelStore *store, const char *uri)
system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
rule_context_load ((RuleContext *)fc, system, user);
g_free (system);
-
+
deleted = rule_context_delete_uri ((RuleContext *) fc, euri, g_str_equal);
if (deleted) {
GtkWidget *dialog;
GString *s;
GList *l;
-
+
s = g_string_new("");
l = deleted;
while (l) {
@@ -439,13 +439,13 @@ mail_filter_delete_uri(CamelStore *store, const char *uri)
g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
g_string_free(s, TRUE);
gtk_widget_show(dialog);
-
+
d(printf("Folder delete/rename '%s' changed filters, resaving\n", euri));
if (rule_context_save ((RuleContext *) fc, user) == -1)
g_warning ("Could not write out changed filter rules\n");
rule_context_free_uri_list ((RuleContext *) fc, deleted);
}
-
+
g_free(user);
g_object_unref(fc);
g_free(euri);
diff --git a/mail/mail-component-factory.c b/mail/mail-component-factory.c
index 9c38cfd473..31373e56da 100644
--- a/mail/mail-component-factory.c
+++ b/mail/mail-component-factory.c
@@ -100,12 +100,12 @@ make_factory (PortableServer_POA poa, const char *iid, gpointer impl_ptr, CORBA_
e_plugin_hook_register_type(em_popup_hook_get_type());
e_plugin_hook_register_type(em_menu_hook_get_type());
e_plugin_hook_register_type(em_config_hook_get_type());
-
+
em_format_hook_register_type(em_format_get_type());
em_format_hook_register_type(em_format_html_get_type());
em_format_hook_register_type(em_format_html_display_get_type());
em_junk_hook_register_type(emj_get_type());
-
+
e_plugin_hook_register_type(em_format_hook_get_type());
e_plugin_hook_register_type(em_event_hook_get_type());
e_plugin_hook_register_type(em_junk_hook_get_type());
diff --git a/mail/mail-component.c b/mail/mail-component.c
index 9237a1793d..9c2fd80524 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -88,7 +88,7 @@
#include <bonobo/bonobo-control.h>
#include <bonobo/bonobo-widget.h>
-#define d(x)
+#define d(x)
static void create_local_item_cb(EUserCreatableItemsHandler *handler, const char *item_type_name, void *data);
static void view_changed_timeout_remove (EComponentView *component_view);
@@ -101,7 +101,7 @@ static BonoboObjectClass *parent_class = NULL;
#define OFFLINE 0
#define ONLINE 1
-struct _store_info {
+struct _store_info {
CamelStore *store;
char *name;
@@ -126,18 +126,18 @@ struct _MailComponentPrivate {
int quit_expunge; /* expunge on quit this time around? */
char *base_directory;
-
+
EMFolderTreeModel *model;
EActivityHandler *activity_handler;
-
+
MailAsyncEvent *async_event;
GHashTable *store_hash; /* stores store_info objects by store */
-
+
RuleContext *search_context;
-
+
char *context_path; /* current path for right-click menu */
-
+
CamelStore *local_store;
EComponentView *component_view;
@@ -227,7 +227,7 @@ static void
mc_add_store(MailComponent *component, CamelStore *store, const char *name, void (*done)(CamelStore *store, CamelFolderInfo *info, void *data))
{
struct _store_info *si;
-
+
MAIL_COMPONENT_DEFAULT(component);
si = store_info_new(store, name);
@@ -320,13 +320,13 @@ load_accounts (MailComponent *component, EAccountList *accounts)
* see if this belongs in the shell's folder list. If so, add
* it.
*/
-
+
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
EAccountService *service;
EAccount *account;
const char *name;
-
+
account = (EAccount *) e_iterator_get (iter);
service = account->source;
name = account->name;
@@ -338,10 +338,10 @@ load_accounts (MailComponent *component, EAccountList *accounts)
&& service->url[0]
&& strncmp(service->url, "mbox:", 5) != 0)
mail_component_load_store_by_uri (component, service->url, name);
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
}
@@ -353,7 +353,7 @@ setup_search_context (MailComponent *component)
if (priv->search_context == NULL) {
char *user = g_build_filename(component->priv->base_directory, "mail/searches.xml", NULL);
char *system = g_build_filename (EVOLUTION_PRIVDATADIR, "searchtypes.xml", NULL);
-
+
priv->search_context = (RuleContext *)em_search_context_new ();
g_object_set_data_full (G_OBJECT (priv->search_context), "user", user, g_free);
g_object_set_data_full (G_OBJECT (priv->search_context), "system", system, g_free);
@@ -379,14 +379,14 @@ static void
folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint32 flags, EMFolderView *view)
{
EMFolderTreeModel *model;
-
+
if ((flags & CAMEL_FOLDER_NOSELECT) || !path) {
em_folder_view_set_folder (view, NULL, NULL);
} else {
model = em_folder_tree_get_model (emft);
em_folder_tree_model_set_selected (model, uri);
em_folder_tree_model_save_state (model);
-
+
em_folder_view_set_folder_uri (view, uri);
}
}
@@ -407,17 +407,17 @@ view_control_activate_cb (BonoboControl *control, gboolean activate, EMFolderVie
uic = bonobo_control_get_ui_component (control);
g_return_if_fail (uic != NULL);
-
+
if (activate) {
Bonobo_UIContainer container;
-
+
container = bonobo_control_get_remote_ui_container (control, NULL);
bonobo_ui_component_set_container (uic, container, NULL);
bonobo_object_release_unref (container, NULL);
-
+
g_return_if_fail (container == bonobo_ui_component_get_container(uic));
g_return_if_fail (container != CORBA_OBJECT_NIL);
-
+
em_folder_view_activate (view, uic, activate);
e_user_creatable_items_handler_activate(g_object_get_data((GObject *)view, "e-creatable-items-handler"), uic);
} else {
@@ -452,7 +452,7 @@ impl_dispose (GObject *object)
g_object_unref (priv->search_context);
priv->search_context = NULL;
}
-
+
if (priv->local_store != NULL) {
camel_object_unref (priv->local_store);
priv->local_store = NULL;
@@ -469,20 +469,20 @@ impl_finalize (GObject *object)
MailComponentPrivate *priv = MAIL_COMPONENT (object)->priv;
g_free (priv->base_directory);
-
+
mail_async_event_destroy (priv->async_event);
-
+
g_hash_table_destroy (priv->store_hash);
-
+
if (mail_async_event_destroy (priv->async_event) == -1) {
g_warning("Cannot destroy async event: would deadlock");
g_warning(" system may be unstable at exit");
}
-
+
g_free (priv->context_path);
g_mutex_free(priv->lock);
g_free (priv);
-
+
(* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
@@ -490,7 +490,7 @@ static void
view_on_url (GObject *emitter, const char *url, const char *nice_url, MailComponent *mail_component)
{
MailComponentPrivate *priv = mail_component->priv;
-
+
e_activity_handler_set_message (priv->activity_handler, nice_url);
}
@@ -576,7 +576,7 @@ view_changed_timeout_remove (EComponentView *component_view)
if (v) {
g_source_remove(GPOINTER_TO_INT(v));
g_object_set_data((GObject *)component_view, "view-changed-timeout", NULL);
-
+
el = g_object_get_data((GObject *)component_view, "info-label");
emfv = g_object_get_data((GObject *)el, "folderview");
g_object_unref(el);
@@ -587,7 +587,7 @@ view_changed_timeout_remove (EComponentView *component_view)
static int
view_changed_timeout(void *d)
{
- EComponentView *component_view = d;
+ EComponentView *component_view = d;
EInfoLabel *el = g_object_get_data((GObject *)component_view, "info-label");
EMFolderView *emfv = g_object_get_data((GObject *)el, "folderview");
@@ -609,17 +609,17 @@ view_changed_cb(EMFolderView *emfv, EComponentView *component_view)
EInfoLabel *el = g_object_get_data((GObject *)component_view, "info-label");
v = g_object_get_data((GObject *)component_view, "view-changed-timeout");
-
+
if (mc->priv->quit_state != -1) {
if (v) {
- g_source_remove(GPOINTER_TO_INT(v));
+ g_source_remove(GPOINTER_TO_INT(v));
g_object_set_data((GObject *)component_view, "view-changed-timeout", NULL);
g_object_unref (emfv);
g_object_unref (el);
}
return;
-
+
}
/* This can get called 3 times every cursor move, so
we don't need to/want to run it immediately */
@@ -635,13 +635,13 @@ view_changed_cb(EMFolderView *emfv, EComponentView *component_view)
g_object_set_data((GObject *)component_view, "view-changed-timeout", GINT_TO_POINTER(g_timeout_add(250, view_changed_timeout, component_view)));
}
-static void
+static void
disable_folder_tree (gpointer *emfb, GtkWidget *widget)
{
gtk_widget_set_sensitive (widget, FALSE);
}
-static void
+static void
enable_folder_tree (GtkWidget *emfb, GtkWidget *emft)
{
EMFolderView *emfv = (EMFolderView *) emfb;
@@ -688,16 +688,16 @@ impl_createView (PortableServer_Servant servant,
GtkWidget *view_widget;
GtkWidget *statusbar_widget;
char *uri;
-
+
mail_session_set_interactive(TRUE);
mc_startup(mail_component);
view_widget = em_folder_browser_new ();
-
+
tree_widget = (GtkWidget *) em_folder_tree_new_with_model (priv->model);
em_folder_tree_set_excluded ((EMFolderTree *) tree_widget, 0);
em_folder_tree_enable_drag_and_drop ((EMFolderTree *) tree_widget);
-
+
if ((uri = em_folder_tree_model_get_selected (priv->model))) {
gboolean expanded;
@@ -710,12 +710,12 @@ impl_createView (PortableServer_Servant servant,
g_free (uri);
}
-
+
em_format_set_session ((EMFormat *) ((EMFolderView *) view_widget)->preview, session);
-
+
g_signal_connect (view_widget, "on-url", G_CALLBACK (view_on_url), mail_component);
em_folder_view_set_statusbar ((EMFolderView*)view_widget, FALSE);
-
+
statusbar_widget = e_task_bar_new ();
e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (statusbar_widget));
@@ -748,7 +748,7 @@ impl_createView (PortableServer_Servant servant,
g_signal_connect(((EMFolderBrowser *)view_widget), "account_search_activated", G_CALLBACK (disable_folder_tree), tree_widget);
g_signal_connect(view_widget, "changed", G_CALLBACK(view_changed_cb), component_view);
g_signal_connect(view_widget, "loaded", G_CALLBACK(view_changed_cb), component_view);
-
+
g_object_set_data((GObject*)info, "folderview", view_widget);
g_object_set_data((GObject*)view_widget, "foldertree", tree_widget);
@@ -766,7 +766,7 @@ impl_requestQuit(PortableServer_Servant servant, CORBA_Environment *ev)
if (!e_msg_composer_request_close_all())
return FALSE;
-
+
folder = mc_default_folders[MAIL_COMPONENT_FOLDER_OUTBOX].folder;
if (folder != NULL
&& camel_session_is_online(session)
@@ -802,7 +802,7 @@ mc_quit_delete (CamelStore *store, struct _store_info *si, MailComponent *mc)
GPtrArray *uids;
int i;
- uids = camel_folder_get_uids (folder);
+ uids = camel_folder_get_uids (folder);
camel_folder_freeze(folder);
for (i=0;i<uids->len;i++)
camel_folder_set_message_flags(folder, uids->pdata[i], CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_SEEN);
@@ -818,13 +818,13 @@ impl_quit(PortableServer_Servant servant, CORBA_Environment *ev)
if (mc->priv->quit_state == -1)
mc->priv->quit_state = MC_QUIT_START;
-
+
mail_config_prune_proxies ();
switch (mc->priv->quit_state) {
case MC_QUIT_START: {
int now = time(NULL)/60/60/24, days;
gboolean empty_junk;
-
+
GConfClient *gconf = mail_config_get_gconf_client();
mail_vfolder_shutdown();
@@ -841,7 +841,7 @@ impl_quit(PortableServer_Servant servant, CORBA_Environment *ev)
g_hash_table_foreach(mc->priv->store_hash, (GHFunc)mc_quit_delete, mc);
gconf_client_set_int(gconf, "/apps/evolution/mail/junk/empty_date", now, NULL);
}
-
+
g_hash_table_foreach(mc->priv->store_hash, (GHFunc)mc_quit_sync, mc);
if (mc->priv->quit_expunge)
@@ -902,7 +902,7 @@ create_item(const char *type, EMFolderTreeModel *model, const char *uri, gpointe
if (strcmp(type, "message") == 0) {
if (!em_utils_check_user_can_send_mail(NULL))
return 0;
-
+
em_utils_compose_new_message(uri);
} else if (strcmp(type, "folder") == 0) {
em_folder_utils_create_folder(NULL, tree);
@@ -917,7 +917,7 @@ create_local_item_cb(EUserCreatableItemsHandler *handler, const char *item_type_
{
EMFolderTree *tree = data;
char *uri = em_folder_tree_get_selected_uri(tree);
-
+
create_item(item_type_name, em_folder_tree_get_model(tree), uri, (gpointer) tree);
g_free(uri);
}
@@ -961,13 +961,13 @@ handleuri_got_folder(char *uri, CamelFolder *folder, void *data)
const char* uid;
uid = camel_url_get_param(url, "uid");
- if (uid == NULL)
+ if (uid == NULL)
g_warning("Could not forward the message. UID is NULL.");
else {
uids = g_ptr_array_new();
g_ptr_array_add(uids, g_strdup(uid));
- if (!strcmp(forward, "attached"))
+ if (!strcmp(forward, "attached"))
em_utils_forward_attached(folder, uids, uri);
else if (!strcmp(forward, "inline"))
em_utils_forward_inline(folder, uids, uri);
@@ -1029,7 +1029,7 @@ impl_upgradeFromVersion (PortableServer_Servant servant, const short major, cons
CamelException ex;
component = mail_component_peek ();
-
+
camel_exception_init (&ex);
if (em_migrate (component->priv->base_directory, major, minor, revision, &ex) == -1) {
GNOME_Evolution_Component_UpgradeFailed *failedex;
@@ -1083,7 +1083,7 @@ setline_check(void *key, void *value, void *data)
}
}
-int
+int
status_check (GNOME_Evolution_ShellState shell_state)
{
int status = 0;
@@ -1094,7 +1094,7 @@ status_check (GNOME_Evolution_ShellState shell_state)
status = OFFLINE;
if (em_utils_prompt_user (NULL, "/apps/evolution/mail/prompts/quick_offline", "mail:ask-quick-offline", NULL))
break;
- case GNOME_Evolution_FORCED_OFFLINE:
+ case GNOME_Evolution_FORCED_OFFLINE:
/*Network is down so change network state on the camel session*/
status = OFFLINE;
/* Cancel all operations as they wont happen anyway cos Network is down*/
@@ -1104,7 +1104,7 @@ status_check (GNOME_Evolution_ShellState shell_state)
case GNOME_Evolution_USER_ONLINE:
camel_session_set_network_state (session, TRUE);
status = ONLINE;
- }
+ }
return status;
}
@@ -1156,12 +1156,12 @@ mail_component_class_init (MailComponentClass *class)
POA_GNOME_Evolution_Component__epv *epv = &((EvolutionComponentClass *)class)->epv;
POA_GNOME_Evolution_MailComponent__epv *mepv = &class->epv;
GObjectClass *object_class = G_OBJECT_CLASS (class);
-
+
parent_class = g_type_class_peek_parent (class);
-
+
object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
-
+
epv->createView = impl_createView;
epv->requestQuit = impl_requestQuit;
epv->quit = impl_quit;
@@ -1186,10 +1186,10 @@ static void
mail_component_init (MailComponent *component)
{
MailComponentPrivate *priv;
-
+
priv = g_new0 (MailComponentPrivate, 1);
component->priv = priv;
-
+
priv->lock = g_mutex_new();
priv->quit_state = -1;
@@ -1203,19 +1203,19 @@ mail_component_init (MailComponent *component)
#endif
if (g_mkdir_with_parents (priv->base_directory, 0777) == -1 && errno != EEXIST)
abort ();
-
+
priv->model = em_folder_tree_model_new (priv->base_directory);
-
+
priv->activity_handler = e_activity_handler_new ();
-
+
mail_session_init (priv->base_directory);
-
+
priv->async_event = mail_async_event_new();
priv->store_hash = g_hash_table_new_full (
NULL, NULL,
(GDestroyNotify) NULL,
(GDestroyNotify) store_hash_free);
-
+
mail_autoreceive_init();
}
@@ -1275,7 +1275,7 @@ mail_component_add_store (MailComponent *component, CamelStore *store, const cha
* @component: mail component
* @uri: uri of store
* @name: name of store (used for display purposes)
- *
+ *
* Return value: Pointer to the newly added CamelStore. The caller is supposed
* to ref the object if it wants to store it.
**/
@@ -1287,14 +1287,14 @@ mail_component_load_store_by_uri (MailComponent *component, const char *uri, con
CamelProvider *prov;
MAIL_COMPONENT_DEFAULT(component);
-
+
camel_exception_init (&ex);
-
+
/* Load the service (don't connect!). Check its provider and
* see if this belongs in the shell's folder list. If so, add
* it.
*/
-
+
prov = camel_provider_get(uri, &ex);
if (prov == NULL) {
/* EPFIXME: real error dialog */
@@ -1303,10 +1303,10 @@ mail_component_load_store_by_uri (MailComponent *component, const char *uri, con
camel_exception_clear (&ex);
return NULL;
}
-
+
if (!(prov->flags & CAMEL_PROVIDER_IS_STORAGE))
return NULL;
-
+
store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex);
if (store == NULL) {
/* EPFIXME: real error dialog */
@@ -1318,7 +1318,7 @@ mail_component_load_store_by_uri (MailComponent *component, const char *uri, con
mail_component_add_store(component, store, name);
camel_object_unref (store);
-
+
return store;
}
@@ -1343,19 +1343,19 @@ mail_component_remove_store (MailComponent *component, CamelStore *store)
* any call to camel_session_get_{service,store} with the same
* URL will always return the same object. So this works.
*/
-
+
if (g_hash_table_lookup (priv->store_hash, store) == NULL)
return;
-
+
camel_object_ref (store);
g_hash_table_remove (priv->store_hash, store);
-
+
/* so i guess potentially we could have a race, add a store while one
being removed. ?? */
mail_note_store_remove (store);
-
+
em_folder_tree_model_remove_store (priv->model, store);
-
+
mail_async_event_emit (priv->async_event, MAIL_ASYNC_THREAD, (MailAsyncFunc) store_disconnect, store, NULL, NULL);
}
@@ -1366,13 +1366,13 @@ mail_component_remove_store_by_uri (MailComponent *component, const char *uri)
CamelStore *store;
MAIL_COMPONENT_DEFAULT(component);
-
+
if (!(prov = camel_provider_get(uri, NULL)))
return;
-
+
if (!(prov->flags & CAMEL_PROVIDER_IS_STORAGE))
return;
-
+
store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, NULL);
if (store != NULL) {
mail_component_remove_store (component, store);
@@ -1431,18 +1431,18 @@ mail_component_peek_local_store (MailComponent *mc)
{
MAIL_COMPONENT_DEFAULT (mc);
mc_setup_local_store (mc);
-
+
return mc->priv->local_store;
}
/**
* mail_component_get_folder:
- * @mc:
- * @id:
- *
+ * @mc:
+ * @id:
+ *
* Get a standard/default folder by id. This call is thread-safe.
- *
- * Return value:
+ *
+ * Return value:
**/
struct _CamelFolder *
mail_component_get_folder(MailComponent *mc, enum _mail_component_folder_t id)
@@ -1457,12 +1457,12 @@ mail_component_get_folder(MailComponent *mc, enum _mail_component_folder_t id)
/**
* mail_component_get_folder_uri:
- * @mc:
- * @id:
- *
+ * @mc:
+ * @id:
+ *
* Get a standard/default folder's uri. This call is thread-safe.
- *
- * Return value:
+ *
+ * Return value:
**/
const char *
mail_component_get_folder_uri(MailComponent *mc, enum _mail_component_folder_t id)
diff --git a/mail/mail-component.h b/mail/mail-component.h
index 901e612a21..e5c5a29e6f 100644
--- a/mail/mail-component.h
+++ b/mail/mail-component.h
@@ -52,13 +52,13 @@ enum _mail_component_folder_t {
struct _MailComponent {
EvolutionComponent parent;
-
+
MailComponentPrivate *priv;
};
struct _MailComponentClass {
EvolutionComponentClass parent_class;
-
+
POA_GNOME_Evolution_MailComponent__epv epv;
};
diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c
index abd63021f1..27ed15e0d9 100644
--- a/mail/mail-config-factory.c
+++ b/mail/mail-config-factory.c
@@ -41,7 +41,7 @@ mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *compo
GNOME_Evolution_Shell shell = (GNOME_Evolution_Shell) user_data;
EvolutionConfigControl *control;
GtkWidget *prefs = NULL;
-
+
if (!strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID)) {
prefs = em_account_prefs_new (shell);
} else if (!strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID)) {
@@ -51,10 +51,10 @@ mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *compo
} else {
g_return_val_if_reached(NULL);
}
-
+
gtk_widget_show_all (prefs);
-
+
control = evolution_config_control_new (prefs);
-
+
return BONOBO_OBJECT (control);
}
diff --git a/mail/mail-config.c b/mail/mail-config.c
index ef16f521a6..eda95c7982 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -87,31 +87,31 @@ MailConfigLabel label_defaults[5] = {
typedef struct {
GConfClient *gconf;
-
+
gboolean corrupt;
-
+
char *gtkrc;
-
+
EAccountList *accounts;
ESignatureList *signatures;
-
+
GSList *labels;
guint label_notify_id;
-
+
guint font_notify_id;
guint spell_notify_id;
guint mark_citations__notify_id;
guint citation_colour_notify_id;
guint address_count_notify_id;
- guint address_compress_notify_id;
- gboolean address_compress;
+ guint address_compress_notify_id;
+ gboolean address_compress;
gint address_count;
guint mlimit_size_notify_id;
- guint mlimit_notify_id;
- gboolean mlimit;
+ guint mlimit_notify_id;
+ gboolean mlimit;
gint mlimit_size;
-
-
+
+
GPtrArray *mime_types;
guint mime_types_notify_id;
} MailConfig;
@@ -138,7 +138,7 @@ config_clear_labels (void)
{
MailConfigLabel *label;
GSList *list, *n;
-
+
list = config->labels;
while (list != NULL) {
label = list->data;
@@ -146,12 +146,12 @@ config_clear_labels (void)
g_free (label->name);
g_free (label->colour);
g_free (label);
-
+
n = list->next;
g_slist_free_1 (list);
list = n;
}
-
+
config->labels = NULL;
}
@@ -162,70 +162,70 @@ config_cache_labels (void)
MailConfigLabel *label;
char *buf, *colour;
int num = 0;
-
+
tail = labels = NULL;
-
+
list = gconf_client_get_list (config->gconf, "/apps/evolution/mail/labels", GCONF_VALUE_STRING, NULL);
-
+
while (list != NULL) {
buf = list->data;
-
+
if (num < 5 && (colour = strrchr (buf, ':'))) {
label = g_new (MailConfigLabel, 1);
-
+
*colour++ = '\0';
label->tag = g_strdup(label_defaults[num].tag);
- /* Don't translate an empty string */
+ /* Don't translate an empty string */
if (buf == NULL || buf[0] == '\0')
label->name = g_strdup (_("Unnamed"));
else
label->name = g_strdup (_(buf));
label->colour = g_strdup (colour);
-
+
n = g_slist_alloc ();
n->next = NULL;
n->data = label;
-
+
if (tail == NULL)
labels = n;
else
tail->next = n;
-
+
tail = n;
-
+
num++;
}
-
+
g_free (buf);
-
+
n = list->next;
g_slist_free_1 (list);
list = n;
}
-
+
while (num < 5) {
/* complete the list with defaults */
label = g_new (MailConfigLabel, 1);
label->tag = g_strdup (label_defaults[num].tag);
label->name = g_strdup (_(label_defaults[num].name));
label->colour = g_strdup (label_defaults[num].colour);
-
+
n = g_slist_alloc ();
n->next = NULL;
n->data = label;
-
+
if (tail == NULL)
labels = n;
else
tail->next = n;
-
+
tail = n;
-
+
num++;
}
-
+
config->labels = labels;
}
@@ -233,10 +233,10 @@ static void
config_clear_mime_types (void)
{
int i;
-
+
for (i = 0; i < config->mime_types->len; i++)
g_free (config->mime_types->pdata[i]);
-
+
g_ptr_array_set_size (config->mime_types, 0);
}
@@ -244,7 +244,7 @@ static void
config_cache_mime_types (void)
{
GSList *n, *nn;
-
+
n = gconf_client_get_list (config->gconf, "/apps/evolution/mail/display/mime_types", GCONF_VALUE_STRING, NULL);
while (n != NULL) {
nn = n->next;
@@ -252,7 +252,7 @@ config_cache_mime_types (void)
g_slist_free_1 (n);
n = nn;
}
-
+
g_ptr_array_add (config->mime_types, NULL);
}
@@ -271,12 +271,12 @@ config_write_style (void)
char *var_font;
char *citation_color;
FILE *rc;
-
+
if (!(rc = g_fopen (config->gtkrc, "wt"))) {
g_warning ("unable to open %s", config->gtkrc);
return;
}
-
+
custom = gconf_client_get_bool (config->gconf, "/apps/evolution/mail/display/fonts/use_custom", NULL);
var_font = gconf_client_get_string (config->gconf, "/apps/evolution/mail/display/fonts/variable", NULL);
fix_font = gconf_client_get_string (config->gconf, "/apps/evolution/mail/display/fonts/monospace", NULL);
@@ -298,13 +298,13 @@ config_write_style (void)
fprintf (rc,
" GtkHTML::fixed_font_name = \"%s\"\n"
" font_name = \"%s\"\n",
- fix_font, var_font);
+ fix_font, var_font);
}
g_free (fix_font);
g_free (var_font);
fprintf (rc, "}\n\n");
-
+
fprintf (rc, "widget \"*.EMFolderView.*.GtkHTML\" style \"evolution-mail-custom-fonts\"\n");
fprintf (rc, "widget \"*.EMFolderBrowser.*.GtkHTML\" style \"evolution-mail-custom-fonts\"\n");
fprintf (rc, "widget \"*.EMMessageBrowser.*.GtkHTML\" style \"evolution-mail-custom-fonts\"\n");
@@ -312,7 +312,7 @@ config_write_style (void)
fprintf (rc, "widget \"*.EvolutionMailPrintHTMLWidget\" style \"evolution-mail-custom-fonts\"\n");
fflush (rc);
fclose (rc);
-
+
gtk_rc_reparse_all ();
}
@@ -373,16 +373,16 @@ mail_config_init (void)
{
if (config)
return;
-
+
config = g_new0 (MailConfig, 1);
config->gconf = gconf_client_get_default ();
config->mime_types = g_ptr_array_new ();
config->gtkrc = g_build_filename (g_get_home_dir (), ".evolution", "mail", "config", "gtkrc-mail-fonts", NULL);
-
+
mail_config_clear ();
-
+
gtk_rc_parse (config->gtkrc);
-
+
gconf_client_add_dir (config->gconf, "/apps/evolution/mail/display",
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
gconf_client_add_dir (config->gconf, "/apps/evolution/mail/display/fonts",
@@ -392,32 +392,32 @@ mail_config_init (void)
config->font_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/fonts",
gconf_style_changed, NULL, NULL, NULL);
config->font_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/address_compress",
- gconf_address_compress_changed, NULL, NULL, NULL);
+ gconf_address_compress_changed, NULL, NULL, NULL);
config->font_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/address_count",
gconf_address_count_changed, NULL, NULL, NULL);
config->mlimit_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/force_message_limit",
- gconf_mlimit_changed, NULL, NULL, NULL);
+ gconf_mlimit_changed, NULL, NULL, NULL);
config->mlimit_size_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/message_text_part_limit",
- gconf_mlimit_size_changed, NULL, NULL, NULL);
+ gconf_mlimit_size_changed, NULL, NULL, NULL);
config->spell_notify_id = gconf_client_notify_add (config->gconf, "/GNOME/Spell",
gconf_style_changed, NULL, NULL, NULL);
config->mark_citations__notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/mark_citations",
gconf_style_changed, NULL, NULL, NULL);
config->citation_colour_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/display/citation_colour",
gconf_style_changed, NULL, NULL, NULL);
-
+
gconf_client_add_dir (config->gconf, "/apps/evolution/mail/labels",
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
config->label_notify_id =
gconf_client_notify_add (config->gconf, "/apps/evolution/mail/labels",
gconf_labels_changed, NULL, NULL, NULL);
-
+
gconf_client_add_dir (config->gconf, "/apps/evolution/mail/mime_types",
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
config->mime_types_notify_id =
gconf_client_notify_add (config->gconf, "/apps/evolution/mail/mime_types",
gconf_mime_types_changed, NULL, NULL, NULL);
-
+
config_cache_labels ();
config_cache_mime_types ();
config->address_compress = gconf_client_get_bool (config->gconf, "/apps/evolution/mail/display/address_compress", NULL);
@@ -434,17 +434,17 @@ mail_config_clear (void)
{
if (!config)
return;
-
+
if (config->accounts) {
g_object_unref (config->accounts);
config->accounts = NULL;
}
-
+
if (config->signatures) {
g_object_unref (config->signatures);
config->signatures = NULL;
}
-
+
config_clear_labels ();
config_clear_mime_types ();
}
@@ -455,10 +455,10 @@ mail_config_write (void)
{
if (!config)
return;
-
+
e_account_list_save (config->accounts);
e_signature_list_save (config->signatures);
-
+
gconf_client_suggest_sync (config->gconf, NULL);
}
@@ -467,67 +467,67 @@ mail_config_write_on_exit (void)
{
EAccount *account;
EIterator *iter;
-
+
if (config_write_timeout) {
g_source_remove (config_write_timeout);
config_write_timeout = 0;
mail_config_write ();
}
-
+
/* Passwords */
-
+
/* then we make sure the ones we want to remember are in the
session cache */
iter = e_list_get_iterator ((EList *) config->accounts);
while (e_iterator_is_valid (iter)) {
char *passwd;
-
+
account = (EAccount *) e_iterator_get (iter);
-
+
if (account->source->save_passwd && account->source->url && account->source->url[0]) {
passwd = mail_session_get_password (account->source->url);
mail_session_forget_password (account->source->url);
mail_session_add_password (account->source->url, passwd);
g_free (passwd);
}
-
+
if (account->transport->save_passwd && account->transport->url && account->transport->url[0]) {
passwd = mail_session_get_password (account->transport->url);
mail_session_forget_password (account->transport->url);
mail_session_add_password (account->transport->url, passwd);
g_free (passwd);
}
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
-
+
/* then we clear out our component passwords */
e_passwords_clear_passwords ("Mail");
-
+
/* then we remember them */
iter = e_list_get_iterator ((EList *) config->accounts);
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
-
+
if (account->source->save_passwd && account->source->url && account->source->url[0])
mail_session_remember_password (account->source->url);
-
+
if (account->transport->save_passwd && account->transport->url && account->transport->url[0])
mail_session_remember_password (account->transport->url);
-
+
e_iterator_next (iter);
}
-
+
/* now do cleanup */
mail_config_clear ();
-
+
g_object_unref (config->gconf);
g_ptr_array_free (config->mime_types, TRUE);
-
+
g_free (config->gtkrc);
-
+
g_free (config);
}
@@ -558,7 +558,7 @@ mail_config_get_labels (void)
int
mail_config_get_address_count (void)
-{
+{
if (!config->address_compress)
return -1;
@@ -571,7 +571,7 @@ mail_config_get_message_limit (void)
if (!config->mlimit)
return -1;
- return config->mlimit_size;
+ return config->mlimit_size;
}
const char *
@@ -579,7 +579,7 @@ mail_config_get_label_color_by_name (const char *name)
{
MailConfigLabel *label;
GSList *node;
-
+
node = config->labels;
while (node != NULL) {
label = node->data;
@@ -587,7 +587,7 @@ mail_config_get_label_color_by_name (const char *name)
return label->colour;
node = node->next;
}
-
+
return NULL;
}
@@ -595,12 +595,12 @@ const char *
mail_config_get_label_color_by_index (int index)
{
MailConfigLabel *label;
-
+
label = g_slist_nth_data (config->labels, index);
-
+
if (label)
return label->colour;
-
+
return NULL;
}
@@ -615,7 +615,7 @@ mail_config_find_account (EAccount *account)
{
EAccount *acnt;
EIterator *iter;
-
+
iter = e_list_get_iterator ((EList *) config->accounts);
while (e_iterator_is_valid (iter)) {
acnt = (EAccount *) e_iterator_get (iter);
@@ -623,12 +623,12 @@ mail_config_find_account (EAccount *account)
g_object_unref (iter);
return TRUE;
}
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
-
+
return FALSE;
}
@@ -637,7 +637,7 @@ mail_config_get_default_account (void)
{
if (config == NULL)
mail_config_init ();
-
+
if (!config->accounts)
return NULL;
@@ -664,44 +664,44 @@ mail_config_get_account_by_source_url (const char *source_url)
EAccount *account;
CamelURL *source;
EIterator *iter;
-
+
g_return_val_if_fail (source_url != NULL, NULL);
-
+
provider = camel_provider_get(source_url, NULL);
if (!provider)
return NULL;
-
+
source = camel_url_new (source_url, NULL);
if (!source)
return NULL;
-
+
iter = e_list_get_iterator ((EList *) config->accounts);
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
-
+
if (account->source && account->source->url && account->source->url[0]) {
CamelURL *url;
-
+
url = camel_url_new (account->source->url, NULL);
if (url && provider->url_equal (url, source)) {
camel_url_free (url);
camel_url_free (source);
g_object_unref (iter);
-
+
return account;
}
-
+
if (url)
camel_url_free (url);
}
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
-
+
camel_url_free (source);
-
+
return NULL;
}
@@ -712,44 +712,44 @@ mail_config_get_account_by_transport_url (const char *transport_url)
CamelURL *transport;
EAccount *account;
EIterator *iter;
-
+
g_return_val_if_fail (transport_url != NULL, NULL);
-
+
provider = camel_provider_get(transport_url, NULL);
if (!provider)
return NULL;
-
+
transport = camel_url_new (transport_url, NULL);
if (!transport)
return NULL;
-
+
iter = e_list_get_iterator ((EList *) config->accounts);
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
-
+
if (account->transport && account->transport->url && account->transport->url[0]) {
CamelURL *url;
-
+
url = camel_url_new (account->transport->url, NULL);
if (url && provider->url_equal (url, transport)) {
camel_url_free (url);
camel_url_free (transport);
g_object_unref (iter);
-
+
return account;
}
-
+
if (url)
camel_url_free (url);
}
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
-
+
camel_url_free (transport);
-
+
return NULL;
}
@@ -775,8 +775,8 @@ EAccountList *
mail_config_get_accounts (void)
{
if (config == NULL)
- mail_config_init ();
-
+ mail_config_init ();
+
return config->accounts;
}
@@ -804,7 +804,7 @@ EAccountIdentity *
mail_config_get_default_identity (void)
{
EAccount *account;
-
+
account = mail_config_get_default_account ();
if (account)
return account->id;
@@ -817,27 +817,27 @@ mail_config_get_default_transport (void)
{
EAccount *account;
EIterator *iter;
-
+
account = mail_config_get_default_account ();
if (account && account->enabled && account->transport && account->transport->url && account->transport->url[0])
return account->transport;
-
+
/* return the first account with a transport? */
iter = e_list_get_iterator ((EList *) config->accounts);
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
-
+
if (account->enabled && account->transport && account->transport->url && account->transport->url[0]) {
g_object_unref (iter);
-
+
return account->transport;
}
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
-
+
return NULL;
}
@@ -847,7 +847,7 @@ uri_to_evname (const char *uri, const char *prefix)
const char *base_directory = mail_component_peek_base_directory (mail_component_peek ());
char *safe;
char *tmp;
-
+
safe = g_strdup (uri);
e_filename_make_safe (safe);
/* blah, easiest thing to do */
@@ -866,37 +866,37 @@ mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new)
EIterator *iter;
int i, work = 0;
char *oldname, *newname;
- char *cachenames[] = { "config/hidestate-",
- "config/et-expanded-",
- "config/et-header-",
+ char *cachenames[] = { "config/hidestate-",
+ "config/et-expanded-",
+ "config/et-header-",
"*views/current_view-",
"*views/custom_view-",
NULL };
-
+
iter = e_list_get_iterator ((EList *) config->accounts);
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
-
+
if (account->sent_folder_uri && uri_cmp (account->sent_folder_uri, old)) {
g_free (account->sent_folder_uri);
account->sent_folder_uri = g_strdup (new);
work = 1;
}
-
+
if (account->drafts_folder_uri && uri_cmp (account->drafts_folder_uri, old)) {
g_free (account->drafts_folder_uri);
account->drafts_folder_uri = g_strdup (new);
work = 1;
}
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
-
+
/* ignore return values or if the files exist or
* not, doesn't matter */
-
+
for (i = 0; cachenames[i]; i++) {
oldname = uri_to_evname (old, cachenames[i]);
newname = uri_to_evname (new, cachenames[i]);
@@ -905,7 +905,7 @@ mail_config_uri_renamed (GCompareFunc uri_cmp, const char *old, const char *new)
g_free (oldname);
g_free (newname);
}
-
+
/* nasty ... */
if (work)
mail_config_write ();
@@ -920,32 +920,32 @@ mail_config_uri_deleted (GCompareFunc uri_cmp, const char *uri)
/* assumes these can't be removed ... */
const char *default_sent_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_SENT);
const char *default_drafts_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
-
+
iter = e_list_get_iterator ((EList *) config->accounts);
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
-
+
if (account->sent_folder_uri && uri_cmp (account->sent_folder_uri, uri)) {
g_free (account->sent_folder_uri);
account->sent_folder_uri = g_strdup (default_sent_folder_uri);
work = 1;
}
-
+
if (account->drafts_folder_uri && uri_cmp (account->drafts_folder_uri, uri)) {
g_free (account->drafts_folder_uri);
account->drafts_folder_uri = g_strdup (default_drafts_folder_uri);
work = 1;
}
-
+
e_iterator_next (iter);
}
-
+
/* nasty again */
if (work)
mail_config_write ();
}
-void
+void
mail_config_service_set_save_passwd (EAccountService *service, gboolean save_passwd)
{
service->save_passwd = save_passwd;
@@ -955,10 +955,10 @@ char *
mail_config_folder_to_safe_url (CamelFolder *folder)
{
char *url;
-
+
url = mail_tools_folder_to_url (folder);
e_filename_make_safe (url);
-
+
return url;
}
@@ -967,15 +967,15 @@ mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix)
{
char *url, *basename, *filename;
const char *evolution_dir;
-
+
evolution_dir = mail_component_peek_base_directory (mail_component_peek ());
-
+
url = mail_config_folder_to_safe_url (folder);
basename = g_strdup_printf ("%s%s", prefix, url);
filename = g_build_filename (evolution_dir, "mail", "config", basename, NULL);
g_free (basename);
g_free (url);
-
+
return filename;
}
@@ -1003,16 +1003,16 @@ get_new_signature_filename (void)
g_warning ("Fatal problem with %s directory.", filename);
}
g_free (filename);
-
+
filename = g_malloc (strlen (base_directory) + sizeof ("/signatures/signature-") + 12);
id = g_stpcpy (filename, base_directory);
id = g_stpcpy (id, "/signatures/signature-");
-
+
for (i = 0; i < (INT_MAX - 1); i++) {
sprintf (id, "%d", i);
if (g_lstat (filename, &st) == -1 && errno == ENOENT) {
int fd;
-
+
fd = g_creat (filename, 0600);
if (fd >= 0) {
close (fd);
@@ -1020,9 +1020,9 @@ get_new_signature_filename (void)
}
}
}
-
+
g_free (filename);
-
+
return NULL;
}
@@ -1031,17 +1031,17 @@ ESignature *
mail_config_signature_new (const char *filename, gboolean script, gboolean html)
{
ESignature *sig;
-
+
sig = e_signature_new ();
sig->name = g_strdup (_("Unnamed"));
sig->script = script;
sig->html = html;
-
+
if (filename == NULL)
sig->filename = get_new_signature_filename ();
else
sig->filename = g_strdup (filename);
-
+
return sig;
}
@@ -1069,7 +1069,7 @@ mail_config_remove_signature (ESignature *signature)
{
if (signature->filename && !signature->script)
g_unlink (signature->filename);
-
+
e_signature_list_remove (config->signatures, signature);
mail_config_save_signatures ();
}
@@ -1086,24 +1086,24 @@ mail_config_signature_run_script (const char *script)
g_warning ("Failed to create pipe to '%s': %s", script, g_strerror (errno));
return NULL;
}
-
+
if (!(pid = fork ())) {
/* child process */
int maxfd, i;
-
+
close (in_fds [0]);
if (dup2 (in_fds[1], STDOUT_FILENO) < 0)
_exit (255);
close (in_fds [1]);
-
+
setsid ();
-
+
maxfd = sysconf (_SC_OPEN_MAX);
for (i = 3; i < maxfd; i++) {
if (i != STDIN_FILENO && i != STDOUT_FILENO && i != STDERR_FILENO)
fcntl (i, F_SETFD, FD_CLOEXEC);
}
-
+
execlp("/bin/sh", "/bin/sh", "-c", script, NULL);
g_warning ("Could not execute %s: %s\n", script, g_strerror (errno));
_exit (255);
@@ -1120,19 +1120,19 @@ mail_config_signature_run_script (const char *script)
GByteArray *buffer;
char *charset;
char *content;
-
+
/* parent process */
close (in_fds[1]);
-
+
stream = camel_stream_fs_new_with_fd (in_fds[0]);
-
+
memstream = (CamelStreamMem *) camel_stream_mem_new ();
buffer = g_byte_array_new ();
camel_stream_mem_set_byte_array (memstream, buffer);
-
+
camel_stream_write_to_stream (stream, (CamelStream *) memstream);
camel_object_unref (stream);
-
+
/* signature scripts are supposed to generate UTF-8 content, but because users
are known to not ever read the manual... we try to do our best if the
content isn't valid UTF-8 by assuming that the content is in the user's
@@ -1141,10 +1141,10 @@ mail_config_signature_run_script (const char *script)
stream = (CamelStream *) memstream;
memstream = (CamelStreamMem *) camel_stream_mem_new ();
camel_stream_mem_set_byte_array (memstream, g_byte_array_new ());
-
+
filtered_stream = camel_stream_filter_new_with_stream (stream);
camel_object_unref (stream);
-
+
charset = gconf_client_get_string (config->gconf, "/apps/evolution/mail/composer/charset", NULL);
if (charset && *charset) {
if ((charenc = (CamelMimeFilter *) camel_mime_filter_charset_new_convert (charset, "utf-8"))) {
@@ -1153,23 +1153,23 @@ mail_config_signature_run_script (const char *script)
}
}
g_free (charset);
-
+
camel_stream_write_to_stream ((CamelStream *) filtered_stream, (CamelStream *) memstream);
camel_object_unref (filtered_stream);
g_byte_array_free (buffer, TRUE);
-
+
buffer = memstream->buffer;
}
-
+
camel_object_unref (memstream);
-
+
g_byte_array_append (buffer, (const unsigned char *)"", 1);
content = (char *)buffer->data;
g_byte_array_free (buffer, FALSE);
-
+
/* wait for the script process to terminate */
result = waitpid (pid, &status, 0);
-
+
if (result == -1 && errno == EINTR) {
/* child process is hanging... */
kill (pid, SIGTERM);
@@ -1182,7 +1182,7 @@ mail_config_signature_run_script (const char *script)
result = waitpid (pid, &status, WNOHANG);
}
}
-
+
return content;
}
#else
diff --git a/mail/mail-crypto.c b/mail/mail-crypto.c
index a23c9f64b5..324f0c3743 100644
--- a/mail/mail-crypto.c
+++ b/mail/mail-crypto.c
@@ -44,10 +44,10 @@ CamelCipherContext *
mail_crypto_get_pgp_cipher_context (EAccount *account)
{
CamelCipherContext *cipher;
-
+
cipher = camel_gpg_context_new (session);
if (account)
camel_gpg_context_set_always_trust ((CamelGpgContext *) cipher, account->pgp_always_trust);
-
+
return cipher;
}
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 46e9446566..5433616a1b 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
+ *
* Authors: Peter Williams <peterw@ximian.com>
* Michael Zucchi <notzed@ximian.com>
*
* Copyright 2000,2001 Ximian, Inc. (www.ximian.com)
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -80,9 +80,9 @@ struct _folder_info {
char *full_name; /* full name of folder/folderinfo */
char *uri; /* uri of folder */
-
+
guint32 flags;
-
+
CamelFolder *folder; /* if known */
};
@@ -160,9 +160,9 @@ notify_idle_cb (gpointer user_data)
{
GConfClient *gconf;
char *filename;
-
+
gconf = mail_config_get_gconf_client ();
-
+
switch (notify_type) {
case MAIL_CONFIG_NOTIFY_PLAY_SOUND:
filename = gconf_client_get_string (gconf, "/apps/evolution/mail/notify/sound", NULL);
@@ -177,11 +177,11 @@ notify_idle_cb (gpointer user_data)
default:
break;
}
-
+
time (&last_notify);
-
+
notify_idle_id = 0;
-
+
return FALSE;
}
@@ -198,10 +198,10 @@ real_flush_updates(void *o, void *event_data, void *data)
struct _MailComponent *component;
struct _EMFolderTreeModel *model;
struct _folder_update *up;
-
+
component = mail_component_peek ();
model = mail_component_peek_tree_model (component);
-
+
LOCK(info_lock);
while ((up = (struct _folder_update *)e_dlist_remhead(&updates))) {
UNLOCK(info_lock);
@@ -223,18 +223,18 @@ real_flush_updates(void *o, void *event_data, void *data)
mail_config_uri_renamed(CAMEL_STORE_CLASS(CAMEL_OBJECT_GET_CLASS(up->store))->compare_folder_name,
up->olduri, up->uri);
}
-
+
if (!up->olduri && up->add)
mail_vfolder_add_uri(up->store, up->uri, FALSE);
}
-
+
/* update unread counts */
em_folder_tree_model_set_unread_count (model, up->store, up->full_name, up->unread);
/* new mail notification */
if (notify_type == -1) {
/* need to track the user's new-mail-notification settings... */
GConfClient *gconf;
-
+
gconf = mail_config_get_gconf_client ();
gconf_client_add_dir (gconf, "/apps/evolution/mail/notify",
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
@@ -242,10 +242,10 @@ real_flush_updates(void *o, void *event_data, void *data)
notify_type_changed, NULL, NULL, NULL);
notify_type = gconf_client_get_int (gconf, "/apps/evolution/mail/notify/type", NULL);
}
-
+
if (notify_type != 0 && up->new && notify_idle_id == 0 && (last_newmail - last_notify >= NOTIFY_THROTTLE))
notify_idle_id = g_idle_add_full (G_PRIORITY_LOW, notify_idle_cb, NULL, NULL);
-
+
if (up->uri) {
EMEvent *e = em_event_peek();
EMEventTargetFolder *t = em_event_target_new_folder(e, up->uri, up->new);
@@ -258,7 +258,7 @@ real_flush_updates(void *o, void *event_data, void *data)
/** @Event: folder.changed
* @Title: Folder changed
* @Target: EMEventTargetFolder
- *
+ *
* folder.changed is emitted whenever a folder changes. There is no detail on how the folder has changed.
* UPDATE: We tell the number of new UIDs added rather than the new mails received
*/
@@ -266,7 +266,7 @@ real_flush_updates(void *o, void *event_data, void *data)
}
free_update(up);
-
+
LOCK(info_lock);
}
update_id = -1;
@@ -348,7 +348,7 @@ update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info)
CamelFolder *folder;
int unread = -1;
int deleted;
-
+
folder = mfi->folder;
if (folder) {
d(printf("update 1 folder '%s'\n", folder->full_name));
@@ -358,7 +358,7 @@ update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info)
|| (count_sent && folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT))) {
d(printf(" total count\n"));
unread = camel_folder_get_message_count (folder);
- if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)
+ if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)
|| folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)) {
guint32 junked = 0;
@@ -368,7 +368,7 @@ update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info)
camel_object_get (folder, NULL, CAMEL_FOLDER_JUNKED, &junked, NULL);
if (junked > 0)
unread -= junked;
-
+
}
} else {
d(printf(" unread count\n"));
@@ -412,7 +412,7 @@ setup_folder(CamelFolderInfo *fi, struct _store_info *si)
mfi->uri = g_strdup(fi->uri);
mfi->store_info = si;
mfi->flags = fi->flags;
-
+
g_hash_table_insert(si->folders, mfi->full_name, mfi);
g_hash_table_insert(si->folders_uri, mfi->uri, mfi);
@@ -422,7 +422,7 @@ setup_folder(CamelFolderInfo *fi, struct _store_info *si)
up->unread = fi->unread;
up->store = si->store;
camel_object_ref(up->store);
-
+
if ((fi->flags & CAMEL_FOLDER_NOSELECT) == 0)
up->add = TRUE;
@@ -458,7 +458,7 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
int new = 0;
int i;
guint32 flags;
-
+
d(printf("folder '%s' changed\n", folder->full_name));
if (!CAMEL_IS_VEE_FOLDER(folder)
@@ -480,10 +480,10 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
}
}
}
-
+
if (new > 0)
time (&last_newmail);
-
+
LOCK(info_lock);
if (stores != NULL
&& (si = g_hash_table_lookup(stores, store)) != NULL
@@ -671,7 +671,7 @@ rename_folders(struct _store_info *si, const char *oldbase, const char *newbase,
mfi->full_name = g_strdup(fi->full_name);
mfi->uri = g_strdup(fi->uri);
mfi->flags = fi->flags;
-
+
g_hash_table_insert(si->folders, mfi->full_name, mfi);
g_hash_table_insert(si->folders_uri, mfi->uri, mfi);
} else {
@@ -682,7 +682,7 @@ rename_folders(struct _store_info *si, const char *oldbase, const char *newbase,
mfi->uri = g_strdup(fi->uri);
mfi->store_info = si;
mfi->flags = fi->flags;
-
+
g_hash_table_insert(si->folders, mfi->full_name, mfi);
g_hash_table_insert(si->folders_uri, mfi->uri, mfi);
}
@@ -692,7 +692,7 @@ rename_folders(struct _store_info *si, const char *oldbase, const char *newbase,
up->unread = fi->unread==-1?0:fi->unread;
up->store = si->store;
camel_object_ref(up->store);
-
+
if ((fi->flags & CAMEL_FOLDER_NOSELECT) == 0)
up->add = TRUE;
@@ -783,7 +783,7 @@ store_folder_renamed(CamelObject *o, void *event_data, void *data)
struct _update_data {
struct _update_data *next;
struct _update_data *prev;
-
+
int id; /* id for cancellation */
guint cancel:1; /* also tells us we're cancelled */
@@ -835,7 +835,7 @@ mail_note_store_remove(CamelStore *store)
ud->cancel = 1;
ud = ud->next;
}
-
+
camel_object_unref(si->store);
g_hash_table_foreach(si->folders, (GHFunc)free_folder_info_hash, NULL);
g_hash_table_destroy(si->folders);
@@ -874,7 +874,7 @@ update_folders(CamelStore *store, CamelFolderInfo *fi, void *data)
struct _ping_store_msg {
struct _mail_msg msg;
-
+
CamelStore *store;
};
@@ -884,10 +884,10 @@ ping_store_desc (struct _mail_msg *mm, int done)
struct _ping_store_msg *m = (struct _ping_store_msg *) mm;
char *service_name = camel_service_get_name (CAMEL_SERVICE (m->store), TRUE);
char *msg;
-
+
msg = g_strdup_printf (_("Pinging %s"), service_name);
g_free (service_name);
-
+
return msg;
}
@@ -896,12 +896,12 @@ ping_store_ping (struct _mail_msg *mm)
{
gboolean online = FALSE;
struct _ping_store_msg *m = (struct _ping_store_msg *) mm;
-
+
if (CAMEL_SERVICE (m->store)->status == CAMEL_SERVICE_CONNECTED) {
if (CAMEL_IS_DISCO_STORE (m->store) &&
camel_disco_store_status (CAMEL_DISCO_STORE (m->store)) != CAMEL_DISCO_STORE_OFFLINE)
online = TRUE;
- else if (CAMEL_IS_OFFLINE_STORE (m->store) &&
+ else if (CAMEL_IS_OFFLINE_STORE (m->store) &&
CAMEL_OFFLINE_STORE (m->store)->state != CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL)
online = TRUE;
}
@@ -913,7 +913,7 @@ static void
ping_store_free (struct _mail_msg *mm)
{
struct _ping_store_msg *m = (struct _ping_store_msg *) mm;
-
+
camel_object_unref (m->store);
}
@@ -929,14 +929,14 @@ ping_store (gpointer key, gpointer val, gpointer user_data)
{
CamelStore *store = (CamelStore *) key;
struct _ping_store_msg *m;
-
+
if (CAMEL_SERVICE (store)->status != CAMEL_SERVICE_CONNECTED)
return;
-
+
m = mail_msg_new (&ping_store_op, NULL, sizeof (struct _ping_store_msg));
m->store = store;
camel_object_ref (store);
-
+
e_thread_put (mail_thread_queued_slow, (EMsg *) m);
}
@@ -944,11 +944,11 @@ static gboolean
ping_cb (gpointer user_data)
{
LOCK (info_lock);
-
+
g_hash_table_foreach (stores, ping_store, NULL);
-
+
UNLOCK (info_lock);
-
+
return TRUE;
}
@@ -980,7 +980,7 @@ mail_note_store(CamelStore *store, CamelOperation *op,
const char *buf;
guint timeout;
int hook = 0;
-
+
g_return_if_fail (CAMEL_IS_STORE(store));
g_return_if_fail (pthread_equal(pthread_self(), mail_gui_thread));
@@ -1009,12 +1009,12 @@ mail_note_store(CamelStore *store, CamelOperation *op,
e_dlist_init(&si->folderinfo_updates);
hook = TRUE;
}
-
+
ud = g_malloc(sizeof(*ud));
ud->done = done;
ud->data = data;
ud->cancel = 0;
-
+
/* We might get a race when setting up a store, such that it is still left in offline mode,
after we've gone online. This catches and fixes it up when the shell opens us */
if (CAMEL_IS_DISCO_STORE (store)) {
@@ -1036,9 +1036,9 @@ mail_note_store(CamelStore *store, CamelOperation *op,
normal_setup:
ud->id = mail_get_folderinfo (store, op, update_folders, ud);
}
-
+
e_dlist_addtail (&si->folderinfo_updates, (EDListNode *) ud);
-
+
UNLOCK(info_lock);
/* there is potential for race here, but it is safe as we check for the store anyway */
diff --git a/mail/mail-folder-cache.h b/mail/mail-folder-cache.h
index 0b79a335e2..f4c1e1b4db 100644
--- a/mail/mail-folder-cache.h
+++ b/mail/mail-folder-cache.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* mail-folder-cache.h: Stores information about open folders */
-/*
+/*
* Authors: Peter Williams <peterw@ximian.com>
* Michael Zucchi <notzed@ximian.com>
*
* Copyright 2000,2001 Ximian, Inc. (www.ximian.com)
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 598b6af425..9572d3cd3f 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
@@ -49,7 +49,7 @@
/*#define MALLOC_CHECK*/
#define LOG_OPS
#define LOG_LOCKS
-#define d(x)
+#define d(x)
static void set_stop(int sensitive);
static void mail_operation_status(struct _CamelOperation *op, const char *what, int pc, void *data);
@@ -249,17 +249,17 @@ void mail_msg_check_error(void *msg)
struct _mail_msg *m = msg;
char *what;
GtkDialog *gd;
-
+
#ifdef MALLOC_CHECK
checkmem(m);
checkmem(m->cancel);
checkmem(m->priv);
#endif
-
+
/* don't report any errors if we are not in interactive mode */
if (!mail_session_get_interactive ())
return;
-
+
if (!camel_exception_is_set(&m->ex)
|| m->ex.id == CAMEL_EXCEPTION_USER_CANCEL
|| m->ex.id == CAMEL_EXCEPTION_FOLDER_INVALID_UID)
@@ -336,7 +336,7 @@ int mail_msg_active(unsigned int msgid)
int active;
MAIL_MT_LOCK(mail_msg_lock);
- if (msgid == (unsigned int)-1)
+ if (msgid == (unsigned int)-1)
active = g_hash_table_size(mail_msg_active_table) > 0;
else
active = g_hash_table_lookup(mail_msg_active_table, GINT_TO_POINTER(msgid)) != NULL;
@@ -542,7 +542,7 @@ mail_msg_destroy(EThread *e, EMsg *msg, void *data)
checkmem(m);
checkmem(m->cancel);
checkmem(m->priv);
-#endif
+#endif
mail_msg_free(m);
}
@@ -734,7 +734,7 @@ int mail_async_event_emit(MailAsyncEvent *ea, mail_async_event_t type, MailAsync
m->ea = ea;
m->type = type;
m->have_thread = FALSE;
-
+
id = m->msg.seq;
g_mutex_lock(ea->lock);
ea->tasks = g_slist_prepend(ea->tasks, m);
@@ -881,7 +881,7 @@ void *mail_call_main(mail_call_t type, MailMainFunc func, ...)
ret = m->ret;
mail_msg_free(m);
-
+
return ret;
}
@@ -946,20 +946,20 @@ static void do_op_status(struct _mail_msg *mm)
struct _mail_msg_priv *data;
char *out, *p, *o, c;
int pc;
-
+
g_return_if_fail (pthread_equal(mail_gui_thread, pthread_self ()));
-
+
MAIL_MT_LOCK (mail_msg_lock);
-
+
msg = g_hash_table_lookup (mail_msg_active_table, m->data);
if (msg == NULL) {
MAIL_MT_UNLOCK (mail_msg_lock);
return;
}
-
+
data = msg->priv;
-
+
out = alloca (strlen (m->what) * 2 + 1);
o = out;
p = m->what;
@@ -969,22 +969,22 @@ static void do_op_status(struct _mail_msg *mm)
*o++ = c;
}
*o = 0;
-
+
pc = m->pc;
-
+
if (data->activity_id == 0) {
char *what;
-
+
/* its being created/removed? well leave it be */
if (data->activity_state == 1 || data->activity_state == 3) {
MAIL_MT_UNLOCK (mail_msg_lock);
return;
} else {
data->activity_state = 1;
-
+
if (progress_icon == NULL)
progress_icon = e_icon_factory_get_icon ("mail-unread", E_ICON_SIZE_MENU);
-
+
MAIL_MT_UNLOCK (mail_msg_lock);
if (msg->ops->describe_msg)
what = msg->ops->describe_msg (msg, FALSE);
@@ -993,11 +993,11 @@ static void do_op_status(struct _mail_msg *mm)
/* uncommenting because message is not very useful for a user, see bug 271734*/
else {
what = g_strdup("");
- }
-
+ }
+
data->activity_id = e_activity_handler_operation_started (activity_handler, "evolution-mail", progress_icon, what, TRUE);
-
+
g_free (what);
MAIL_MT_LOCK (mail_msg_lock);
if (data->activity_state == 3) {
@@ -1011,7 +1011,7 @@ static void do_op_status(struct _mail_msg *mm)
camel_exception_clear (&msg->ex);
g_free (msg->priv);
g_free (msg);
-
+
if (activity_id != 0)
mail_async_event_emit (mail_async_event, MAIL_ASYNC_GUI, (MailAsyncFunc) end_event_callback,
NULL, GINT_TO_POINTER (activity_id), NULL);
@@ -1048,7 +1048,7 @@ static void
mail_operation_status (struct _CamelOperation *op, const char *what, int pc, void *data)
{
struct _op_status_msg *m;
-
+
d(printf("got operation statys: %s %d%%\n", what, pc));
m = mail_msg_new(&op_status_op, NULL, sizeof(*m));
@@ -1073,10 +1073,10 @@ static void
set_stop (int sensitive)
{
static int last = FALSE;
-
+
if (last == sensitive)
return;
-
+
/*bonobo_ui_component_set_prop (uic, "/commands/MailStop", "sensitive", sensitive ? "1" : "0", NULL);*/
last = sensitive;
}
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index f322c02e03..6d02a3108d 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* mail-ops.c: callbacks for the mail toolbar/menus */
-/*
+/*
* Authors: Dan Winship <danw@ximian.com>
* Jeffrey Stedfast <fejj@ximian.com>
* Peter Williams <peterw@ximian.com>
@@ -9,8 +9,8 @@
*
* Copyright 2000,2001 Ximian, Inc. (www.ximian.com)
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -70,13 +70,13 @@
#include "mail-vfolder.h"
#define w(x)
-#define d(x)
+#define d(x)
/* used for both just filtering a folder + uid's, and for filtering a whole folder */
/* used both for fetching mail, and for filtering mail */
struct _filter_mail_msg {
struct _mail_msg msg;
-
+
CamelFolder *source_folder; /* where they come from */
GPtrArray *source_uids; /* uids to copy, or NULL == copy all */
CamelUIDCache *cache; /* UID cache if we are to cache the uids, NULL otherwise */
@@ -113,41 +113,41 @@ em_filter_folder_element_filter (struct _mail_msg *mm)
struct _filter_mail_msg *m = (struct _filter_mail_msg *)mm;
CamelFolder *folder;
GPtrArray *uids, *folder_uids = NULL;
-
+
if (m->cancel)
camel_operation_register (m->cancel);
-
+
folder = m->source_folder;
-
+
if (folder == NULL || camel_folder_get_message_count (folder) == 0) {
if (m->cancel)
camel_operation_unregister (m->cancel);
return;
}
-
+
if (m->destination) {
camel_folder_freeze (m->destination);
camel_filter_driver_set_default_folder (m->driver, m->destination);
}
-
+
camel_folder_freeze (folder);
-
+
if (m->source_uids)
uids = m->source_uids;
else
folder_uids = uids = camel_folder_get_uids (folder);
-
+
camel_filter_driver_filter_folder (m->driver, folder, m->cache, uids, m->delete, &mm->ex);
camel_filter_driver_flush (m->driver, &mm->ex);
-
+
if (folder_uids)
camel_folder_free_uids (folder, folder_uids);
-
+
/* sync our source folder */
if (!m->cache)
camel_folder_sync (folder, FALSE, camel_exception_is_set (&mm->ex) ? NULL : &mm->ex);
camel_folder_thaw (folder);
-
+
if (m->destination)
camel_folder_thaw (m->destination);
@@ -155,7 +155,7 @@ em_filter_folder_element_filter (struct _mail_msg *mm)
see also fetch_mail_fetch() below */
camel_object_unref(m->driver);
m->driver = NULL;
-
+
if (m->cancel)
camel_operation_unregister (m->cancel);
}
@@ -169,22 +169,22 @@ static void
em_filter_folder_element_free (struct _mail_msg *mm)
{
struct _filter_mail_msg *m = (struct _filter_mail_msg *)mm;
-
+
if (m->source_folder)
camel_object_unref (m->source_folder);
-
+
if (m->source_uids)
em_utils_uids_free (m->source_uids);
-
+
if (m->cancel)
camel_operation_unref (m->cancel);
-
+
if (m->destination)
camel_object_unref (m->destination);
-
+
if (m->driver)
camel_object_unref (m->driver);
-
+
mail_session_flush_filter_log ();
}
@@ -201,7 +201,7 @@ mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids,
CamelOperation *cancel)
{
struct _filter_mail_msg *m;
-
+
m = mail_msg_new (&em_filter_folder_element_op, NULL, sizeof (*m));
m->source_folder = source_folder;
camel_object_ref (source_folder);
@@ -212,15 +212,15 @@ mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids,
m->cancel = cancel;
camel_operation_ref (cancel);
}
-
+
m->driver = camel_session_get_filter_driver (session, type, NULL);
-
+
if (!notify) {
/* FIXME: have a #define NOTIFY_FILTER_NAME macro? */
/* the filter name has to stay in sync with mail-session::get_filter_driver */
camel_filter_driver_remove_rule_by_name (m->driver, "new-mail-notification");
}
-
+
e_thread_put (mail_thread_new, (EMsg *)m);
}
@@ -246,17 +246,17 @@ uid_cachename_hack (CamelStore *store)
CamelURL *url = CAMEL_SERVICE (store)->url;
char *encoded_url, *filename;
const char *evolution_dir;
-
+
encoded_url = g_strdup_printf ("%s%s%s@%s", url->user,
url->authmech ? ";auth=" : "",
url->authmech ? url->authmech : "",
url->host);
e_filename_make_safe (encoded_url);
-
+
evolution_dir = mail_component_peek_base_directory (mail_component_peek ());
filename = g_build_filename (evolution_dir, "mail", "pop", encoded_url, "uid-cache", NULL);
g_free (encoded_url);
-
+
return filename;
}
@@ -275,7 +275,7 @@ fetch_mail_fetch (struct _mail_msg *mm)
if (m->cancel)
camel_operation_register (m->cancel);
-
+
if ((fm->destination = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_LOCAL_INBOX)) == NULL)
goto fail;
camel_object_ref(fm->destination);
@@ -284,33 +284,33 @@ fetch_mail_fetch (struct _mail_msg *mm)
access thingy, right? problem is matching raw messages to uid's etc. */
if (!strncmp (m->source_uri, "mbox:", 5)) {
char *path = mail_tool_do_movemail (m->source_uri, &mm->ex);
-
+
if (path && !camel_exception_is_set (&mm->ex)) {
camel_folder_freeze (fm->destination);
camel_filter_driver_set_default_folder (fm->driver, fm->destination);
camel_filter_driver_filter_mbox (fm->driver, path, m->source_uri, &mm->ex);
camel_folder_thaw (fm->destination);
-
+
if (!camel_exception_is_set (&mm->ex))
g_unlink (path);
}
g_free (path);
} else {
CamelFolder *folder = fm->source_folder = mail_tool_get_inbox (m->source_uri, &mm->ex);
-
+
if (folder) {
/* this handles 'keep on server' stuff, if we have any new uid's to copy
across, we need to copy them to a new array 'cause of the way fetch_mail_free works */
CamelUIDCache *cache = NULL;
char *cachename;
-
+
cachename = uid_cachename_hack (folder->parent_store);
cache = camel_uid_cache_new (cachename);
g_free (cachename);
-
+
if (cache) {
GPtrArray *folder_uids, *cache_uids, *uids;
-
+
folder_uids = camel_folder_get_uids (folder);
cache_uids = camel_uid_cache_get_new_uids (cache, folder_uids);
if (cache_uids) {
@@ -320,10 +320,10 @@ fetch_mail_fetch (struct _mail_msg *mm)
for (i = 0; i < cache_uids->len; i++)
uids->pdata[i] = g_strdup (cache_uids->pdata[i]);
camel_uid_cache_free_uids (cache_uids);
-
+
fm->cache = cache;
em_filter_folder_element_filter (mm);
-
+
/* need to uncancel so writes/etc. don't fail */
if (mm->ex.id == CAMEL_EXCEPTION_USER_CANCEL)
camel_operation_uncancel(NULL);
@@ -350,7 +350,7 @@ fetch_mail_fetch (struct _mail_msg *mm)
} else {
em_filter_folder_element_filter (mm);
}
-
+
/* we unref the source folder here since we
may now block in finalize (we try to
disconnect cleanly) */
@@ -358,10 +358,10 @@ fetch_mail_fetch (struct _mail_msg *mm)
fm->source_folder = NULL;
}
}
-fail:
+fail:
if (m->cancel)
camel_operation_unregister (m->cancel);
-
+
/* we unref this here as it may have more work to do (syncing
folders and whatnot) before we are really done */
/* should this be cancellable too? (i.e. above unregister above) */
@@ -384,7 +384,7 @@ static void
fetch_mail_free (struct _mail_msg *mm)
{
struct _fetch_mail_msg *m = (struct _fetch_mail_msg *)mm;
-
+
g_free (m->source_uri);
if (m->cancel)
camel_operation_unref (m->cancel);
@@ -408,7 +408,7 @@ mail_fetch_mail (const char *source, int keep, const char *type, CamelOperation
{
struct _fetch_mail_msg *m;
struct _filter_mail_msg *fm;
-
+
m = mail_msg_new (&fetch_mail_op, NULL, sizeof (*m));
fm = (struct _filter_mail_msg *)m;
m->source_uri = g_strdup (source);
@@ -425,7 +425,7 @@ mail_fetch_mail (const char *source, int keep, const char *type, CamelOperation
camel_filter_driver_set_folder_func (fm->driver, get_folder, get_data);
if (status)
camel_filter_driver_set_status_func (fm->driver, status, status_data);
-
+
e_thread_put (mail_thread_new, (EMsg *)m);
}
@@ -475,19 +475,19 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
tmp = camel_header_raw_find(&xev, "X-Evolution-Account", NULL);
if (tmp) {
char *name;
-
+
name = g_strstrip(g_strdup(tmp));
if ((account = mail_config_get_account_by_uid(name))
/* 'old' x-evolution-account stored the name, how silly */
|| (account = mail_config_get_account_by_name(name))) {
if (account->transport && account->transport->url)
transport_url = g_strdup (account->transport->url);
-
+
sent_folder_uri = g_strdup (account->sent_folder_uri);
}
g_free(name);
}
-
+
if (!account) {
/* default back to these headers */
tmp = camel_header_raw_find(&xev, "X-Evolution-Transport", NULL);
@@ -508,11 +508,11 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
iaddr = camel_mime_message_get_from (message);
camel_address_copy (from, CAMEL_ADDRESS (iaddr));
}
-
+
recipients = (CamelAddress *) camel_internet_address_new ();
for (i = 0; i < 3; i++) {
const char *type;
-
+
type = resent_from ? resent_recipients[i] : normal_recipients[i];
iaddr = camel_mime_message_get_recipients (message, type);
camel_address_cat (recipients, CAMEL_ADDRESS (iaddr));
@@ -553,25 +553,25 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
/* post process */
mail_tool_restore_xevolution_headers (message, xev);
-
+
if (driver) {
camel_filter_driver_filter_message (driver, message, info,
NULL, NULL, NULL, "", ex);
-
+
if (camel_exception_is_set (ex)) {
if (camel_exception_get_id (ex) == CAMEL_EXCEPTION_USER_CANCEL)
goto exit;
-
+
/* sending mail, filtering failed */
g_string_append_printf (err, _("Failed to apply outgoing filters: %s"),
camel_exception_get_description (ex));
}
}
-
+
camel_exception_clear (ex);
if (xport == NULL
- || !( ((CamelService *)xport)->provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)) {
+ || !( ((CamelService *)xport)->provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)) {
if (sent_folder_uri) {
folder = mail_tool_uri_to_folder (sent_folder_uri, 0, ex);
if (camel_exception_is_set(ex)) {
@@ -583,7 +583,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
}
if (!folder) {
- folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT);
+ folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT);
camel_object_ref(folder);
}
@@ -633,7 +633,7 @@ mail_send_message(CamelFolder *queue, const char *uid, const char *destination,
/* set the culmulative exception report */
camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, err->str);
}
-
+
exit:
if (folder) {
camel_folder_sync(folder, FALSE, NULL);
@@ -678,7 +678,7 @@ report_status (struct _send_queue_msg *m, enum camel_filter_status_t status, int
{
va_list ap;
char *str;
-
+
if (m->status) {
va_start (ap, desc);
str = g_strdup_vprintf (desc, ap);
@@ -696,16 +696,16 @@ send_queue_send(struct _mail_msg *mm)
GPtrArray *uids, *send_uids = NULL;
CamelException ex;
int i, j;
-
+
d(printf("sending queue\n"));
-
+
if (!(uids = camel_folder_get_uids (m->queue)))
return;
send_uids = g_ptr_array_sized_new (uids->len);
for (i = 0, j = 0; i < uids->len; i++) {
CamelMessageInfo *info;
-
+
info = camel_folder_get_message_info (m->queue, uids->pdata[i]);
if (info) {
if ((camel_message_info_flags(info) & CAMEL_MESSAGE_DELETED) == 0)
@@ -713,7 +713,7 @@ send_queue_send(struct _mail_msg *mm)
camel_folder_free_message_info(m->queue, info);
}
}
-
+
send_uids->len = j;
if (send_uids->len == 0) {
/* nothing to send */
@@ -721,10 +721,10 @@ send_queue_send(struct _mail_msg *mm)
g_ptr_array_free (send_uids, TRUE);
return;
}
-
+
if (m->cancel)
camel_operation_register (m->cancel);
-
+
camel_exception_init (&ex);
/* NB: This code somewhat abuses the 'exception' stuff. Apart from fatal problems, it is also
@@ -732,9 +732,9 @@ send_queue_send(struct _mail_msg *mm)
for (i = 0, j = 0; i < send_uids->len; i++) {
int pc = (100 * i) / send_uids->len;
-
+
report_status (m, CAMEL_FILTER_STATUS_START, pc, _("Sending message %d of %d"), i+1, send_uids->len);
-
+
mail_send_message (m->queue, send_uids->pdata[i], m->destination, m->driver, &ex);
if (camel_exception_is_set (&ex)) {
if (ex.id != CAMEL_EXCEPTION_USER_CANCEL) {
@@ -744,7 +744,7 @@ send_queue_send(struct _mail_msg *mm)
else
camel_exception_xfer (&mm->ex, &ex);
camel_exception_clear (&ex);
-
+
/* keep track of the number of failures */
j++;
} else {
@@ -754,16 +754,16 @@ send_queue_send(struct _mail_msg *mm)
}
}
}
-
+
j += (send_uids->len - i);
-
+
if (j > 0)
report_status (m, CAMEL_FILTER_STATUS_END, 100, _("Failed to send %d of %d messages"), j, send_uids->len);
else if (mm->ex.id == CAMEL_EXCEPTION_USER_CANCEL)
report_status (m, CAMEL_FILTER_STATUS_END, 100, _("Canceled."));
else
report_status (m, CAMEL_FILTER_STATUS_END, 100, _("Complete."));
-
+
if (m->driver) {
camel_object_unref (m->driver);
m->driver = NULL;
@@ -774,12 +774,12 @@ send_queue_send(struct _mail_msg *mm)
camel_folder_sync (m->queue, TRUE, &ex);
camel_exception_clear (&ex);
-
+
if (sent_folder) {
camel_folder_sync (sent_folder, FALSE, &ex);
camel_exception_clear (&ex);
}
-
+
if (m->cancel)
camel_operation_unregister (m->cancel);
}
@@ -797,7 +797,7 @@ static void
send_queue_free(struct _mail_msg *mm)
{
struct _send_queue_msg *m = (struct _send_queue_msg *)mm;
-
+
if (m->driver)
camel_object_unref(m->driver);
camel_object_unref(m->queue);
@@ -903,10 +903,10 @@ mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageIn
void *data)
{
struct _append_msg *m;
-
+
g_return_if_fail (CAMEL_IS_FOLDER (folder));
g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
-
+
if (!camel_medium_get_header (CAMEL_MEDIUM (message), "X-Mailer"))
camel_medium_set_header (CAMEL_MEDIUM (message), "X-Mailer",
"Evolution " VERSION SUB_VERSION " " VERSION_COMMENT);
@@ -917,10 +917,10 @@ mail_append_mail (CamelFolder *folder, CamelMimeMessage *message, CamelMessageIn
m->message = message;
camel_object_ref(message);
m->info = info;
-
+
m->done = done;
m->data = data;
-
+
e_thread_put (mail_thread_new, (EMsg *)m);
}
@@ -934,7 +934,7 @@ struct _transfer_msg {
gboolean delete;
char *dest_uri;
guint32 dest_flags;
-
+
void (*done)(gboolean ok, void *data);
void *data;
};
@@ -946,7 +946,7 @@ transfer_messages_desc (struct _mail_msg *mm, int done)
return g_strdup_printf(m->delete?_("Moving messages to %s"):_("Copying messages to %s"),
m->dest_uri);
-
+
}
static void
@@ -976,7 +976,7 @@ transfer_messages_transfer (struct _mail_msg *mm)
int i;
for (i = 0; i < m->uids->len; i++)
- camel_folder_set_message_flags (m->source, m->uids->pdata[i],
+ camel_folder_set_message_flags (m->source, m->uids->pdata[i],
CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
}
@@ -990,7 +990,7 @@ static void
transfer_messages_transferred (struct _mail_msg *mm)
{
struct _transfer_msg *m = (struct _transfer_msg *)mm;
-
+
if (m->done)
m->done (!camel_exception_is_set (&mm->ex), m->data);
}
@@ -999,7 +999,7 @@ static void
transfer_messages_free (struct _mail_msg *mm)
{
struct _transfer_msg *m = (struct _transfer_msg *)mm;
-
+
camel_object_unref (m->source);
g_free (m->dest_uri);
em_utils_uids_free (m->uids);
@@ -1021,11 +1021,11 @@ mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
void *data)
{
struct _transfer_msg *m;
-
+
g_return_if_fail (CAMEL_IS_FOLDER (source));
g_return_if_fail (uids != NULL);
g_return_if_fail (dest_uri != NULL);
-
+
m = mail_msg_new(&transfer_messages_op, NULL, sizeof(*m));
m->source = source;
camel_object_ref (source);
@@ -1035,7 +1035,7 @@ mail_transfer_messages (CamelFolder *source, GPtrArray *uids,
m->dest_flags = dest_flags;
m->done = done;
m->data = data;
-
+
e_thread_put(mail_thread_queued_slow, (EMsg *)m);
}
@@ -1067,7 +1067,7 @@ get_folderinfo_get (struct _mail_msg *mm)
{
struct _get_folderinfo_msg *m = (struct _get_folderinfo_msg *)mm;
guint32 flags = CAMEL_STORE_FOLDER_INFO_RECURSIVE|CAMEL_STORE_FOLDER_INFO_FAST | CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
-
+
m->info = camel_store_get_folder_info (m->store, NULL, flags, &mm->ex);
}
@@ -1075,16 +1075,16 @@ static void
get_folderinfo_got (struct _mail_msg *mm)
{
struct _get_folderinfo_msg *m = (struct _get_folderinfo_msg *)mm;
-
+
if (!m->info && camel_exception_is_set (&mm->ex)) {
char *url;
-
+
url = camel_service_get_url (CAMEL_SERVICE (m->store));
w(g_warning ("Error getting folder info from store at %s: %s",
url, camel_exception_get_description (&mm->ex)));
g_free (url);
}
-
+
if (m->done)
m->done (m->store, m->info, m->data);
}
@@ -1197,7 +1197,7 @@ mail_build_attachment(CamelFolder *folder, GPtrArray *uids,
struct _get_folder_msg {
struct _mail_msg msg;
-
+
char *uri;
guint32 flags;
CamelFolder *folder;
@@ -1209,7 +1209,7 @@ static char *
get_folder_desc (struct _mail_msg *mm, int done)
{
struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
-
+
return g_strdup_printf(_("Opening folder %s"), m->uri);
}
@@ -1217,7 +1217,7 @@ static void
get_folder_get (struct _mail_msg *mm)
{
struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
-
+
m->folder = mail_tool_uri_to_folder (m->uri, m->flags, &mm->ex);
}
@@ -1225,7 +1225,7 @@ static void
get_folder_got (struct _mail_msg *mm)
{
struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
-
+
if (m->done)
m->done (m->uri, m->folder, m->data);
}
@@ -1234,7 +1234,7 @@ static void
get_folder_free (struct _mail_msg *mm)
{
struct _get_folder_msg *m = (struct _get_folder_msg *)mm;
-
+
g_free (m->uri);
if (m->folder)
camel_object_unref (m->folder);
@@ -1254,13 +1254,13 @@ mail_get_folder (const char *uri, guint32 flags,
{
struct _get_folder_msg *m;
int id;
-
+
m = mail_msg_new(&get_folder_op, NULL, sizeof(*m));
m->uri = g_strdup (uri);
m->flags = flags;
m->data = data;
m->done = done;
-
+
id = m->msg.seq;
e_thread_put(thread, (EMsg *)m);
return id;
@@ -1281,7 +1281,7 @@ static char *
get_store_desc (struct _mail_msg *mm, int done)
{
struct _get_store_msg *m = (struct _get_store_msg *)mm;
-
+
return g_strdup_printf(_("Opening store %s"), m->uri);
}
@@ -1289,7 +1289,7 @@ static void
get_store_get (struct _mail_msg *mm)
{
struct _get_store_msg *m = (struct _get_store_msg *)mm;
-
+
/*camel_session_get_store connects us, which we don't want to do on startup. */
m->store = (CamelStore *) camel_session_get_service (session, m->uri,
@@ -1310,7 +1310,7 @@ static void
get_store_free (struct _mail_msg *mm)
{
struct _get_store_msg *m = (struct _get_store_msg *)mm;
-
+
g_free (m->uri);
if (m->store)
camel_object_unref (m->store);
@@ -1328,7 +1328,7 @@ mail_get_store (const char *uri, CamelOperation *op, void (*done) (char *uri, Ca
{
struct _get_store_msg *m;
int id;
-
+
m = mail_msg_new (&get_store_op, NULL, sizeof (*m));
if (op) {
camel_operation_unref(m->msg.cancel);
@@ -1338,7 +1338,7 @@ mail_get_store (const char *uri, CamelOperation *op, void (*done) (char *uri, Ca
m->uri = g_strdup (uri);
m->data = data;
m->done = done;
-
+
id = m->msg.seq;
e_thread_put (mail_thread_new, (EMsg *)m);
return id;
@@ -1359,7 +1359,7 @@ static char *
remove_folder_desc (struct _mail_msg *mm, int done)
{
struct _remove_folder_msg *m = (struct _remove_folder_msg *)mm;
-
+
return g_strdup_printf (_("Removing folder %s"), m->uri);
}
@@ -1371,15 +1371,15 @@ remove_folder_get (struct _mail_msg *mm)
CamelFolder *folder;
GPtrArray *uids;
int i;
-
+
m->removed = FALSE;
-
+
folder = mail_tool_uri_to_folder (m->uri, 0, &mm->ex);
if (!folder)
return;
-
+
store = folder->parent_store;
-
+
/* Delete every message in this folder, then expunge it */
uids = camel_folder_get_uids (folder);
camel_folder_freeze(folder);
@@ -1388,11 +1388,11 @@ remove_folder_get (struct _mail_msg *mm)
camel_folder_sync (folder, TRUE, NULL);
camel_folder_thaw(folder);
camel_folder_free_uids (folder, uids);
-
+
/* if the store supports subscriptions, unsubscribe from this folder... */
if (camel_store_supports_subscriptions (store))
camel_store_unsubscribe_folder (store, folder->full_name, NULL);
-
+
/* Then delete the folder from the store */
camel_store_delete_folder (store, folder->full_name, &mm->ex);
m->removed = !camel_exception_is_set (&mm->ex);
@@ -1416,7 +1416,7 @@ static void
remove_folder_free (struct _mail_msg *mm)
{
struct _remove_folder_msg *m = (struct _remove_folder_msg *)mm;
-
+
g_free (m->uri);
}
@@ -1431,12 +1431,12 @@ void
mail_remove_folder (const char *uri, void (*done) (char *uri, gboolean removed, void *data), void *data)
{
struct _remove_folder_msg *m;
-
+
m = mail_msg_new (&remove_folder_op, NULL, sizeof (*m));
m->uri = g_strdup (uri);
m->data = data;
m->done = done;
-
+
e_thread_put (mail_thread_new, (EMsg *)m);
}
@@ -1454,7 +1454,7 @@ static char *sync_folder_desc(struct _mail_msg *mm, int done)
{
struct _sync_folder_msg *m = (struct _sync_folder_msg *)mm;
- return g_strdup_printf (_("Storing folder \'%s\'"),
+ return g_strdup_printf (_("Storing folder \'%s\'"),
camel_folder_get_full_name (m->folder));
}
@@ -1659,7 +1659,7 @@ static char *empty_trash_desc(struct _mail_msg *mm, int done)
#if 0
struct _empty_trash_msg *m = (struct _empty_trash_msg *)mm;
- return g_strdup_printf (_("Emptying trash in \'%s\'"),
+ return g_strdup_printf (_("Emptying trash in \'%s\'"),
m->account ? m->account->name : _("Local Folders"));
#else
return g_strdup(_("Expunging folder"));
@@ -1672,7 +1672,7 @@ static void empty_trash_empty(struct _mail_msg *mm)
const char *evolution_dir;
CamelFolder *trash;
char *uri;
-
+
if (m->account) {
trash = mail_tool_get_trash (m->account->source->url, FALSE, &mm->ex);
} else {
@@ -1681,10 +1681,10 @@ static void empty_trash_empty(struct _mail_msg *mm)
trash = mail_tool_get_trash (uri, TRUE, &mm->ex);
g_free (uri);
}
-
+
if (trash)
camel_folder_expunge (trash, &mm->ex);
-
+
camel_object_unref (trash);
}
@@ -1764,11 +1764,11 @@ static void get_message_got(struct _mail_msg *mm)
static void get_message_free(struct _mail_msg *mm)
{
struct _get_message_msg *m = (struct _get_message_msg *)mm;
-
+
g_free (m->uid);
camel_object_unref (m->folder);
camel_operation_unref (m->cancel);
-
+
if (m->message)
camel_object_unref (m->message);
}
@@ -1786,7 +1786,7 @@ mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder
void *data, EThread *thread)
{
struct _get_message_msg *m;
-
+
m = mail_msg_new(&get_message_op, NULL, sizeof(*m));
m->folder = folder;
camel_object_ref(folder);
@@ -1794,7 +1794,7 @@ mail_get_message(CamelFolder *folder, const char *uid, void (*done) (CamelFolder
m->data = data;
m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done;
m->cancel = camel_operation_new(NULL, NULL);
-
+
e_thread_put(thread, (EMsg *)m);
}
@@ -1824,7 +1824,7 @@ mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolde
void *data, EThread *thread)
{
struct _get_message_msg *m;
-
+
m = mail_msg_new(&get_messagex_op, NULL, sizeof(*m));
m->folder = folder;
camel_object_ref(folder);
@@ -1832,7 +1832,7 @@ mail_get_messagex(CamelFolder *folder, const char *uid, void (*done) (CamelFolde
m->data = data;
m->done = (void (*) (CamelFolder *, const char *, CamelMimeMessage *, void *)) done;
m->cancel = camel_operation_new(NULL, NULL);
-
+
e_thread_put(thread, (EMsg *)m);
}
@@ -1854,7 +1854,7 @@ static char * get_messages_desc(struct _mail_msg *mm, int done)
struct _get_messages_msg *m = (struct _get_messages_msg *)mm;
return g_strdup_printf(ngettext("Retrieving %d message",
- "Retrieving %d messages", m->uids->len),
+ "Retrieving %d messages", m->uids->len),
m->uids->len);
}
@@ -1888,7 +1888,7 @@ static void get_messages_free(struct _mail_msg *mm)
{
struct _get_messages_msg *m = (struct _get_messages_msg *)mm;
int i;
-
+
em_utils_uids_free (m->uids);
for (i=0;i<m->messages->len;i++) {
if (m->messages->pdata[i])
@@ -1939,8 +1939,8 @@ static char *save_messages_desc(struct _mail_msg *mm, int done)
{
struct _save_messages_msg *m = (struct _save_messages_msg *)mm;
- return g_strdup_printf(ngettext("Saving %d message",
- "Saving %d messsages", m->uids->len),
+ return g_strdup_printf(ngettext("Saving %d message",
+ "Saving %d messsages", m->uids->len),
m->uids->len);
}
@@ -1949,16 +1949,16 @@ save_prepare_part (CamelMimePart *mime_part)
{
CamelDataWrapper *wrapper;
int parts, i;
-
+
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part));
if (!wrapper)
return;
-
+
if (CAMEL_IS_MULTIPART (wrapper)) {
parts = camel_multipart_get_number (CAMEL_MULTIPART (wrapper));
for (i = 0; i < parts; i++) {
CamelMimePart *part = camel_multipart_get_part (CAMEL_MULTIPART (wrapper), i);
-
+
save_prepare_part (part);
}
} else {
@@ -1967,7 +1967,7 @@ save_prepare_part (CamelMimePart *mime_part)
save_prepare_part (CAMEL_MIME_PART (wrapper));
} else {
CamelContentType *type;
-
+
/* We want to save textual parts as 8bit instead of encoded */
type = camel_data_wrapper_get_mime_type_field (wrapper);
if (camel_content_type_is (type, "text", "*"))
@@ -1985,13 +1985,13 @@ save_messages_save (struct _mail_msg *mm)
CamelStream *stream;
int i;
char *from;
-
+
stream = camel_stream_vfs_new_with_uri (m->path, O_WRONLY | O_CREAT | O_TRUNC, 0666);
from_filter = camel_mime_filter_from_new();
filtered_stream = camel_stream_filter_new_with_stream(stream);
camel_stream_filter_add(filtered_stream, (CamelMimeFilter *)from_filter);
camel_object_unref(from_filter);
-
+
for (i=0; i<m->uids->len; i++) {
CamelMimeMessage *message;
int pc = ((i+1) * 100) / m->uids->len;
@@ -2000,9 +2000,9 @@ save_messages_save (struct _mail_msg *mm)
camel_operation_progress(mm->cancel, pc);
if (message == NULL)
break;
-
+
save_prepare_part (CAMEL_MIME_PART (message));
-
+
/* we need to flush after each stream write since we are writing to the same fd */
from = camel_mime_message_build_mbox_from(message);
if (camel_stream_write_string(stream, from) == -1
@@ -2034,7 +2034,7 @@ static void save_messages_saved(struct _mail_msg *mm)
static void save_messages_free(struct _mail_msg *mm)
{
struct _save_messages_msg *m = (struct _save_messages_msg *)mm;
-
+
em_utils_uids_free (m->uids);
camel_object_unref(m->folder);
g_free(m->path);
@@ -2091,7 +2091,7 @@ save_part_save (struct _mail_msg *mm)
struct _save_part_msg *m = (struct _save_part_msg *)mm;
CamelDataWrapper *content;
CamelStream *stream;
-
+
if(!m->readonly){
if (!(stream = camel_stream_vfs_new_with_uri (m->path, O_WRONLY | O_CREAT | O_TRUNC, 0644))) {
camel_exception_setv (&mm->ex, CAMEL_EXCEPTION_SYSTEM,
@@ -2105,15 +2105,15 @@ save_part_save (struct _mail_msg *mm)
m->path, g_strerror (errno));
return;
}
-
+
content = camel_medium_get_content_object (CAMEL_MEDIUM (m->part));
-
+
if (camel_data_wrapper_decode_to_stream (content, stream) == -1
|| camel_stream_flush (stream) == -1)
camel_exception_setv (&mm->ex, CAMEL_EXCEPTION_SYSTEM,
_("Could not write data: %s"),
g_strerror (errno));
-
+
camel_object_unref (stream);
}
@@ -2121,7 +2121,7 @@ static void
save_part_saved (struct _mail_msg *mm)
{
struct _save_part_msg *m = (struct _save_part_msg *)mm;
-
+
if (m->done)
m->done (m->part, m->path, !camel_exception_is_set (&mm->ex), m->data);
}
@@ -2154,10 +2154,10 @@ mail_save_part (CamelMimePart *part, const char *path,
m->data = data;
m->done = done;
m->readonly = readonly;
-
+
id = m->msg.seq;
e_thread_put (mail_thread_new, (EMsg *)m);
-
+
return id;
}
@@ -2422,7 +2422,7 @@ mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, vo
{
if (argc <= 0)
return;
-
+
gnome_execute_async_fds (NULL, argc, argv, TRUE);
}
@@ -2490,13 +2490,13 @@ mail_check_service(const char *url, CamelProviderType type, void (*done)(const c
{
struct _check_msg *m;
int id;
-
+
m = mail_msg_new (&check_service_op, NULL, sizeof(*m));
m->url = g_strdup(url);
m->type = type;
m->done = done;
m->data = data;
-
+
id = m->msg.seq;
e_thread_put(mail_thread_new, (EMsg *)m);
diff --git a/mail/mail-ops.h b/mail/mail-ops.h
index ba886688c1..18fca3be5c 100644
--- a/mail/mail-ops.h
+++ b/mail/mail-ops.h
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
+/*
+ * Authors:
* Peter Williams <peterw@ximian.com>
* Michael Zucchi <notzed@ximian.com>
*
* Copyright 2000, 2001 Ximian, Inc. (www.ximian.com)
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 35541673d8..136f9e9051 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -159,7 +159,7 @@ static struct _send_data *
setup_send_data(void)
{
struct _send_data *data;
-
+
if (send_data == NULL) {
send_data = data = g_malloc0(sizeof(*data));
data->lock = g_mutex_new();
@@ -320,7 +320,7 @@ format_url(const char *internal_url, const char *account_name)
pretty_url = g_strdup_printf("<b>%s (%s)</b>: %s", account_name, url->protocol, url->host);
else if (url->path)
pretty_url = g_strdup_printf("<b>%s (%s)</b>: %s", account_name, url->protocol, url->path);
- else
+ else
pretty_url = g_strdup_printf("<b>%s (%s)</b>", account_name, url->protocol);
}
else {
@@ -328,7 +328,7 @@ format_url(const char *internal_url, const char *account_name)
pretty_url = g_strdup_printf("<b>%s</b>: %s", url->protocol, url->host);
else if (url->path)
pretty_url = g_strdup_printf("<b>%s</b>: %s", url->protocol, url->path);
- else
+ else
pretty_url = g_strdup_printf("<b>%s</b>", url->protocol);
}
camel_url_free(url);
@@ -353,7 +353,7 @@ get_receive_type(const char *url)
if (!provider)
return SEND_INVALID;
-
+
if (provider->object_types[CAMEL_PROVIDER_STORE]) {
if (provider->flags & CAMEL_PROVIDER_IS_STORAGE)
return SEND_UPDATE;
@@ -362,7 +362,7 @@ get_receive_type(const char *url)
} else if (provider->object_types[CAMEL_PROVIDER_TRANSPORT]) {
return SEND_SEND;
}
-
+
return SEND_INVALID;
}
@@ -376,7 +376,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
struct _send_data *data;
GtkWidget *send_icon;
GtkWidget *recv_icon;
- GtkWidget *scrolled_window;
+ GtkWidget *scrolled_window;
GtkWidget *label;
GtkWidget *status_label;
GtkWidget *progress_bar;
@@ -390,7 +390,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
gd = (GtkDialog *)(send_recv_dialog = gtk_dialog_new_with_buttons(_("Send & Receive Mail"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL));
gtk_window_set_modal ((GtkWindow *) gd, FALSE);
-
+
gtk_widget_ensure_style ((GtkWidget *)gd);
gtk_container_set_border_width ((GtkContainer *)gd->vbox, 0);
gtk_container_set_border_width ((GtkContainer *)gd->action_area, 6);
@@ -402,34 +402,34 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
GTK_STOCK_CANCEL, GTK_ICON_SIZE_BUTTON));
gtk_widget_show (cancel_button);
gtk_dialog_add_action_widget (gd, cancel_button, GTK_RESPONSE_CANCEL);
-
+
icon_list = e_icon_factory_get_icon_list ("mail-send-receive");
if (icon_list) {
gtk_window_set_icon_list (GTK_WINDOW (gd), icon_list);
g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
g_list_free (icon_list);
}
-
+
num_sources = 0;
-
+
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
account = (EAccount *) e_iterator_get (iter);
-
+
if (account->source->url)
num_sources++;
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
-
+
table = gtk_table_new (num_sources, 4, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
- scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+ scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (
GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
@@ -437,48 +437,48 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
gtk_scrolled_window_add_with_viewport (
GTK_SCROLLED_WINDOW (scrolled_window), table);
gtk_box_pack_start (
- GTK_BOX (gd->vbox), scrolled_window, TRUE, TRUE, 0);
+ GTK_BOX (gd->vbox), scrolled_window, TRUE, TRUE, 0);
gtk_widget_set_size_request (gd->vbox, 600, 200);
- gtk_widget_show (scrolled_window);
+ gtk_widget_show (scrolled_window);
/* must bet setup after send_recv_dialog as it may re-trigger send-recv button */
data = setup_send_data ();
-
+
row = 0;
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
EAccountService *source;
-
+
account = (EAccount *) e_iterator_get (iter);
-
+
source = account->source;
if (!account->enabled || !source->url) {
e_iterator_next (iter);
continue;
}
-
+
/* see if we have an outstanding download active */
info = g_hash_table_lookup (data->active, source->url);
if (info == NULL) {
send_info_t type;
-
+
type = get_receive_type (source->url);
if (type == SEND_INVALID || type == SEND_SEND) {
e_iterator_next (iter);
continue;
}
-
+
info = g_malloc0 (sizeof (*info));
info->type = type;
-
+
d(printf("adding source %s\n", source->url));
-
+
info->uri = g_strdup (source->url);
info->keep = source->keep_on_server;
info->cancel = camel_operation_new (operation_status, info);
info->state = SEND_ACTIVE;
info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
-
+
g_hash_table_insert (data->active, info->uri, info);
list = g_list_prepend (list, info);
} else if (info->progress_bar != NULL) {
@@ -487,7 +487,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
continue;
} else if (info->timeout_id == 0)
info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
-
+
recv_icon = e_icon_factory_get_image (
"mail-inbox", E_ICON_SIZE_LARGE_TOOLBAR);
pretty_url = format_url (source->url, account->name);
@@ -496,9 +496,9 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
GTK_LABEL (label), PANGO_ELLIPSIZE_END);
gtk_label_set_markup (GTK_LABEL (label), pretty_url);
g_free (pretty_url);
-
+
progress_bar = gtk_progress_bar_new ();
-
+
cancel_button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
status_label = gtk_label_new (
@@ -510,7 +510,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
/* g_object_set(data->label, "bold", TRUE, NULL); */
gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
gtk_misc_set_alignment (GTK_MISC (status_label), 0, .5);
-
+
gtk_table_attach (
GTK_TABLE (table), recv_icon,
0, 1, row, row+2, 0, 0, 0, 0);
@@ -526,43 +526,43 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
gtk_table_attach (
GTK_TABLE (table), status_label,
1, 2, row+1, row+2, GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
+
info->progress_bar = progress_bar;
info->status_label = status_label;
info->cancel_button = cancel_button;
info->data = data;
-
+
g_signal_connect (
cancel_button, "clicked",
G_CALLBACK (receive_cancel), info);
e_iterator_next (iter);
row = row + 2;
}
-
+
g_object_unref (iter);
-
+
/* Hook: If some one wants to hook on to the sendreceive dialog, this is the way to go. */
target = em_event_target_new_send_receive (em_event_peek(), table, data, row, EM_EVENT_SEND_RECEIVE);
e_event_emit ((EEvent *)em_event_peek (), "mail.sendreceive", (EEventTarget *) target);
-
+
if (outbox && destination) {
info = g_hash_table_lookup (data->active, SEND_URI_KEY);
if (info == NULL) {
info = g_malloc0 (sizeof (*info));
info->type = SEND_SEND;
d(printf("adding dest %s\n", destination));
-
+
info->uri = g_strdup (destination);
info->keep = FALSE;
info->cancel = camel_operation_new (operation_status, info);
info->state = SEND_ACTIVE;
info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
-
+
g_hash_table_insert (data->active, SEND_URI_KEY, info);
list = g_list_prepend (list, info);
} else if (info->timeout_id == 0)
info->timeout_id = g_timeout_add (STATUS_TIMEOUT, operation_status_timeout, info);
-
+
send_icon = e_icon_factory_get_image (
"mail-outbox", E_ICON_SIZE_LARGE_TOOLBAR);
pretty_url = format_url (destination, NULL);
@@ -572,7 +572,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
gtk_label_set_markup (GTK_LABEL (label), pretty_url);
g_free (pretty_url);
-
+
progress_bar = gtk_progress_bar_new ();
cancel_button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
@@ -582,7 +582,7 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
gtk_misc_set_alignment (GTK_MISC (status_label), 0, .5);
-
+
gtk_table_attach (
GTK_TABLE (table), send_icon,
0, 1, row, row+2, 0, 0, 0, 0);
@@ -598,27 +598,27 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
gtk_table_attach (
GTK_TABLE (table), status_label,
1, 2, row+1, row+2, GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
+
info->progress_bar = progress_bar;
info->cancel_button = cancel_button;
info->data = data;
info->status_label = status_label;
-
+
g_signal_connect (
cancel_button, "clicked",
G_CALLBACK (receive_cancel), info);
gtk_widget_show_all (table);
}
-
+
gtk_widget_show (GTK_WIDGET (gd));
-
+
g_signal_connect (gd, "response", G_CALLBACK (dialog_response), data);
-
+
g_object_weak_ref ((GObject *) gd, (GWeakNotify) dialog_destroy_cb, data);
-
+
data->infos = list;
data->gd = gd;
-
+
return data;
}
@@ -752,7 +752,7 @@ receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelExcep
/* we recheck that the folder hasn't snuck in while we were loading it... */
/* and we assume the newer one is the same, but unref the old one anyway */
g_mutex_lock(info->data->lock);
-
+
if (g_hash_table_lookup_extended (info->data->folders, uri, &oldkey, &oldinfoptr)) {
oldinfo = (struct _folder_info *) oldinfoptr;
camel_object_unref(oldinfo->folder);
@@ -764,11 +764,11 @@ receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelExcep
oldinfo->uri = g_strdup(uri);
g_hash_table_insert(info->data->folders, oldinfo->uri, oldinfo);
}
-
+
camel_object_ref (folder);
-
+
g_mutex_unlock(info->data->lock);
-
+
return folder;
}
@@ -885,7 +885,7 @@ static void
receive_update_got_store (char *uri, CamelStore *store, void *data)
{
struct _send_info *info = data;
-
+
if (store) {
mail_note_store(store, info->cancel, receive_update_got_folderinfo, info);
} else {
@@ -901,7 +901,7 @@ mail_send_receive (void)
EAccountList *accounts;
EAccount *account;
GList *scan;
-
+
if (send_recv_dialog != NULL) {
if (GTK_WIDGET_REALIZED(send_recv_dialog)) {
gdk_window_show(send_recv_dialog->window);
@@ -909,14 +909,14 @@ mail_send_receive (void)
}
return send_recv_dialog;
}
-
+
if (!camel_session_is_online (session))
return send_recv_dialog;
-
+
account = mail_config_get_default_account ();
if (!account || !account->transport->url)
return send_recv_dialog;
-
+
accounts = mail_config_get_accounts ();
outbox_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX);
@@ -924,7 +924,7 @@ mail_send_receive (void)
scan = data->infos;
while (scan) {
struct _send_info *info = scan->data;
-
+
switch(info->type) {
case SEND_RECEIVE:
mail_fetch_mail(info->uri, info->keep,
@@ -1093,22 +1093,22 @@ mail_receive_uri (const char *uri, int keep)
struct _send_data *data;
CamelFolder *outbox_folder;
send_info_t type;
-
+
data = setup_send_data();
info = g_hash_table_lookup(data->active, uri);
if (info != NULL) {
d(printf("download of %s still in progress\n", uri));
return;
}
-
+
d(printf("starting non-interactive download of '%s'\n", uri));
-
+
type = get_receive_type (uri);
if (type == SEND_INVALID || type == SEND_SEND) {
d(printf ("unsupported provider: '%s'\n", uri));
return;
}
-
+
info = g_malloc0 (sizeof (*info));
info->type = type;
info->progress_bar = NULL;
@@ -1120,11 +1120,11 @@ mail_receive_uri (const char *uri, int keep)
info->data = data;
info->state = SEND_ACTIVE;
info->timeout_id = 0;
-
+
d(printf("Adding new info %p\n", info));
-
+
g_hash_table_insert (data->active, info->uri, info);
-
+
switch (info->type) {
case SEND_RECEIVE:
mail_fetch_mail (info->uri, info->keep,
@@ -1160,11 +1160,11 @@ mail_send (void)
struct _send_info *info;
struct _send_data *data;
send_info_t type;
-
+
transport = mail_config_get_default_transport ();
- if (!transport || !transport->url)
+ if (!transport || !transport->url)
return;
-
+
data = setup_send_data ();
info = g_hash_table_lookup (data->active, SEND_URI_KEY);
if (info != NULL) {
@@ -1172,15 +1172,15 @@ mail_send (void)
d(printf("send of %s still in progress\n", transport->url));
return;
}
-
+
d(printf("starting non-interactive send of '%s'\n", transport->url));
-
+
type = get_receive_type (transport->url);
if (type == SEND_INVALID) {
d(printf ("unsupported provider: '%s'\n", transport->url));
return;
}
-
+
info = g_malloc0 (sizeof (*info));
info->type = SEND_SEND;
info->progress_bar = NULL;
@@ -1192,11 +1192,11 @@ mail_send (void)
info->data = data;
info->state = SEND_ACTIVE;
info->timeout_id = 0;
-
+
d(printf("Adding new info %p\n", info));
-
+
g_hash_table_insert (data->active, SEND_URI_KEY, info);
-
+
/* todo, store the folder in info? */
outbox_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX);
mail_send_queue (outbox_folder, info->uri,
diff --git a/mail/mail-session.c b/mail/mail-session.c
index 8175c65ded..2f4d5c8021 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -109,7 +109,7 @@ static void
class_init (MailSessionClass *mail_session_class)
{
CamelSessionClass *camel_session_class = CAMEL_SESSION_CLASS (mail_session_class);
-
+
/* virtual method override */
camel_session_class->get_password = get_password;
camel_session_class->forget_password = forget_password;
@@ -125,7 +125,7 @@ static CamelType
mail_session_get_type (void)
{
static CamelType mail_session_type = CAMEL_INVALID_TYPE;
-
+
if (mail_session_type == CAMEL_INVALID_TYPE) {
ms_parent_class = (CamelSessionClass *)camel_session_get_type();
mail_session_type = camel_type_register (
@@ -138,7 +138,7 @@ mail_session_get_type (void)
(CamelObjectInitFunc) init,
(CamelObjectFinalizeFunc) finalise);
}
-
+
return mail_session_type;
}
@@ -147,12 +147,12 @@ static char *
make_key (CamelService *service, const char *item)
{
char *key;
-
+
if (service)
key = camel_url_to_string (service->url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
else
key = g_strdup (item);
-
+
return key;
}
@@ -206,7 +206,7 @@ get_password (CamelSession *session, CamelService *service, const char *domain,
if (account)
title = g_strdup_printf (_("Enter Password for %s"), account->name);
else
- title = g_strdup (_("Enter Password"));
+ title = g_strdup (_("Enter Password"));
}
if ((flags & CAMEL_SESSION_PASSWORD_STATIC) != 0)
eflags = E_PASSWORDS_REMEMBER_NEVER;
@@ -285,15 +285,15 @@ static void
user_message_response (GtkDialog *dialog, int button, struct _user_message_msg *m)
{
gtk_widget_destroy ((GtkWidget *) dialog);
-
+
message_dialog = NULL;
-
+
/* if !allow_cancel, then we've already replied */
if (m->allow_cancel) {
m->result = button == GTK_RESPONSE_OK;
e_msgport_reply((EMsg *)m);
}
-
+
/* check for pendings */
if ((m = (struct _user_message_msg *)e_dlist_remhead(&message_list)))
do_user_message((struct _mail_msg *)m);
@@ -316,12 +316,12 @@ do_user_message (struct _mail_msg *mm)
{
struct _user_message_msg *m = (struct _user_message_msg *)mm;
int type;
-
+
if (!m->ismain && message_dialog != NULL) {
e_dlist_addtail (&message_list, (EDListNode *)m);
return;
}
-
+
switch (m->type) {
case CAMEL_SESSION_ALERT_INFO:
type = 0;
@@ -338,10 +338,10 @@ do_user_message (struct _mail_msg *mm)
if (m->allow_cancel)
type += 3;
-
+
message_dialog = (GtkDialog *)e_error_new(NULL, error_type[type], m->prompt, NULL);
g_object_set ((GObject *) message_dialog, "allow_shrink", TRUE, "allow_grow", TRUE, NULL);
-
+
/* We only need to wait for the result if we allow cancel otherwise show but send result back instantly */
if (m->allow_cancel) {
if (m->ismain) {
@@ -380,7 +380,7 @@ alert_user(CamelSession *session, CamelSessionAlertType type, const char *prompt
return FALSE;
if (cancel)
- user_message_reply = e_msgport_new ();
+ user_message_reply = e_msgport_new ();
m = mail_msg_new (&user_message_op, user_message_reply, sizeof (*m));
m->ismain = pthread_equal(pthread_self(), mail_gui_thread);
m->type = type;
@@ -421,7 +421,7 @@ main_play_sound (CamelFilterDriver *driver, char *filename, gpointer user_data)
gnome_sound_play (filename);
else
gdk_beep ();
-
+
g_free (filename);
camel_object_unref (session);
}
@@ -430,9 +430,9 @@ static void
session_play_sound (CamelFilterDriver *driver, const char *filename, gpointer user_data)
{
MailSession *ms = (MailSession *) session;
-
+
camel_object_ref (session);
-
+
mail_async_event_emit (ms->async, MAIL_ASYNC_GUI, (MailAsyncFunc) main_play_sound,
driver, g_strdup (filename), user_data);
}
@@ -448,9 +448,9 @@ static void
session_system_beep (CamelFilterDriver *driver, gpointer user_data)
{
MailSession *ms = (MailSession *) session;
-
+
camel_object_ref (session);
-
+
mail_async_event_emit (ms->async, MAIL_ASYNC_GUI, (MailAsyncFunc) main_system_beep,
driver, user_data, NULL);
}
@@ -463,36 +463,36 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException
char *user, *system;
GConfClient *gconf;
RuleContext *fc;
-
+
gconf = mail_config_get_gconf_client ();
-
+
user = g_strdup_printf ("%s/mail/filters.xml", mail_component_peek_base_directory (mail_component_peek ()));
system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL);
fc = (RuleContext *) em_filter_context_new ();
rule_context_load (fc, system, user);
g_free (system);
g_free (user);
-
+
driver = camel_filter_driver_new (session);
camel_filter_driver_set_folder_func (driver, get_folder, NULL);
-
+
if (gconf_client_get_bool (gconf, "/apps/evolution/mail/filters/log", NULL)) {
MailSession *ms = (MailSession *) session;
-
+
if (ms->filter_logfile == NULL) {
char *filename;
-
+
filename = gconf_client_get_string (gconf, "/apps/evolution/mail/filters/logfile", NULL);
if (filename) {
ms->filter_logfile = g_fopen (filename, "a+");
g_free (filename);
}
}
-
+
if (ms->filter_logfile)
camel_filter_driver_set_logfile (driver, ms->filter_logfile);
}
-
+
camel_filter_driver_set_shell_func (driver, mail_execute_shell_command, NULL);
camel_filter_driver_set_play_sound_func (driver, session_play_sound, NULL);
camel_filter_driver_set_system_beep_func (driver, session_system_beep, NULL);
@@ -505,29 +505,29 @@ main_get_filter_driver (CamelSession *session, const char *type, CamelException
if (strcmp (type, FILTER_SOURCE_JUNKTEST) != 0) {
GString *fsearch, *faction;
-
+
fsearch = g_string_new ("");
faction = g_string_new ("");
-
+
if (!strcmp (type, FILTER_SOURCE_DEMAND))
type = FILTER_SOURCE_INCOMING;
-
+
/* add the user-defined rules next */
while ((rule = rule_context_next_rule (fc, rule, type))) {
g_string_truncate (fsearch, 0);
g_string_truncate (faction, 0);
-
+
filter_rule_build_code (rule, fsearch);
em_filter_rule_build_action ((EMFilterRule *) rule, faction);
camel_filter_driver_add_rule (driver, rule->name, fsearch->str, faction->str);
}
-
+
g_string_free (fsearch, TRUE);
g_string_free (faction, TRUE);
}
-
+
g_object_unref (fc);
-
+
return driver;
}
@@ -579,15 +579,15 @@ mail_session_get_password (const char *url_string)
CamelURL *url;
char *simple_url;
char *passwd;
-
+
url = camel_url_new (url_string, NULL);
simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
camel_url_free (url);
-
+
passwd = e_passwords_get_password ("Mail", simple_url);
-
+
g_free (simple_url);
-
+
return passwd;
}
@@ -597,13 +597,13 @@ mail_session_add_password (const char *url_string,
{
CamelURL *url;
char *simple_url;
-
+
url = camel_url_new (url_string, NULL);
simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
camel_url_free (url);
-
+
e_passwords_add_password (simple_url, passwd);
-
+
g_free (simple_url);
}
@@ -612,13 +612,13 @@ mail_session_remember_password (const char *url_string)
{
CamelURL *url;
char *simple_url;
-
+
url = camel_url_new (url_string, NULL);
simple_url = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
camel_url_free (url);
-
+
e_passwords_remember_password ("Mail", simple_url);
-
+
g_free (simple_url);
}
@@ -649,14 +649,14 @@ mail_session_init (const char *base_directory)
{
char *camel_dir;
GConfClient *gconf;
-
+
if (camel_init (base_directory, TRUE) != 0)
exit (0);
camel_provider_init();
session = CAMEL_SESSION (camel_object_new (MAIL_SESSION_TYPE));
-
+
camel_dir = g_strdup_printf ("%s/mail", base_directory);
camel_session_construct (session, camel_dir);
@@ -670,7 +670,7 @@ mail_session_init (const char *base_directory)
/* The shell will tell us to go online. */
camel_session_set_online ((CamelSession *) session, FALSE);
-
+
g_free (camel_dir);
}
@@ -684,20 +684,20 @@ void
mail_session_set_interactive (gboolean interactive)
{
MAIL_SESSION (session)->interactive = interactive;
-
+
if (!interactive) {
struct _user_message_msg *um;
-
+
d(printf ("Gone non-interactive, checking for outstanding interactive tasks\n"));
e_passwords_cancel();
-
+
/* flush/cancel pending user messages */
while ((um = (struct _user_message_msg *) e_dlist_remhead (&message_list))) {
d(printf ("Flusing message request: %s\n", um->prompt));
e_msgport_reply((EMsg *) um);
}
-
+
/* and the current */
if (message_dialog) {
d(printf("Destroying message dialogue\n"));
@@ -717,7 +717,7 @@ void
mail_session_flush_filter_log (void)
{
MailSession *ms = (MailSession *) session;
-
+
if (ms->filter_logfile)
fflush (ms->filter_logfile);
}
@@ -728,10 +728,10 @@ mail_session_add_junk_plugin (const char *plugin_name, CamelJunkPlugin *junk_plu
MailSession *ms = (MailSession *) session;
GConfClient *gconf;
char *def_plugin;
-
+
gconf = mail_config_get_gconf_client ();
def_plugin = gconf_client_get_string (gconf, "/apps/evolution/mail/junk/default_plugin", NULL);
-
+
ms->junk_plugins = g_list_append(ms->junk_plugins, junk_plugin);
if (def_plugin && plugin_name) {
if (!strcmp(def_plugin, plugin_name)) {
@@ -747,6 +747,6 @@ mail_session_add_junk_plugin (const char *plugin_name, CamelJunkPlugin *junk_plu
const GList *
mail_session_get_junk_plugins (void)
{
- MailSession *ms = (MailSession *) session;
+ MailSession *ms = (MailSession *) session;
return ms->junk_plugins;
}
diff --git a/mail/mail-session.h b/mail/mail-session.h
index 36c175772b..bb444b1c6a 100644
--- a/mail/mail-session.h
+++ b/mail/mail-session.h
@@ -52,7 +52,7 @@ void mail_session_flush_filter_log (void);
void mail_session_add_junk_plugin (const char *plugin_name, CamelJunkPlugin *junk_plugin);
const GList * mail_session_get_junk_plugins (void);
-
+
extern CamelSession *session;
#ifdef __cplusplus
diff --git a/mail/mail-signature-editor.c b/mail/mail-signature-editor.c
index d444591f1b..48e11041c0 100644
--- a/mail/mail-signature-editor.c
+++ b/mail/mail-signature-editor.c
@@ -45,7 +45,7 @@
#include "mail-signature-editor.h"
#include "mail-config.h"
-#define d(x)
+#define d(x)
#define GNOME_GTKHTML_EDITOR_CONTROL_ID "OAFIID:GNOME_GtkHTML_Editor:" GTKHTML_API_VERSION
@@ -54,11 +54,11 @@ typedef struct _ESignatureEditor {
GtkWidget *control;
GtkWidget *name_entry;
GtkWidget *info_frame;
-
+
ESignature *sig;
gboolean is_new;
gboolean html;
-
+
GNOME_GtkHTML_Editor_Engine engine;
} ESignatureEditor;
@@ -80,14 +80,14 @@ static void
menu_file_save_error (BonoboUIComponent *uic, CORBA_Environment *ev)
{
char *err;
-
+
/* errno is set if the rename() fails in menu_file_save_cb */
-
+
err = ev->_major != CORBA_NO_EXCEPTION ? bonobo_exception_get_text (ev) : g_strdup (g_strerror (errno));
-
+
e_error_run(NULL, "mail:no-save-signature", err, NULL);
g_warning ("Exception while saving signature: %s", err);
-
+
g_free (err);
}
@@ -97,20 +97,20 @@ get_text (Bonobo_PersistStream persist, const char *format, CORBA_Environment *e
BonoboStream *stream;
BonoboStreamMem *stream_mem;
GByteArray *text;
-
+
stream = bonobo_stream_mem_create (NULL, 0, FALSE, TRUE);
Bonobo_PersistStream_save (persist, (Bonobo_Stream)bonobo_object_corba_objref (BONOBO_OBJECT (stream)),
format, ev);
-
+
if (ev->_major != CORBA_NO_EXCEPTION)
return NULL;
-
+
stream_mem = BONOBO_STREAM_MEM (stream);
-
+
text = g_byte_array_new ();
g_byte_array_append (text, (unsigned char *)stream_mem->buffer, stream_mem->pos);
bonobo_object_unref (BONOBO_OBJECT (stream));
-
+
return text;
}
@@ -118,19 +118,19 @@ static ssize_t
write_all (int fd, const char *buf, size_t n)
{
ssize_t w, nwritten = 0;
-
+
do {
do {
w = write (fd, buf + nwritten, n - nwritten);
} while (w == -1 && (errno == EINTR || errno == EAGAIN));
-
+
if (w > 0)
nwritten += w;
} while (nwritten < n && w != -1);
-
+
if (w == -1)
return -1;
-
+
return nwritten;
}
@@ -189,20 +189,20 @@ menu_file_save_cb (BonoboUIComponent *uic, void *user_data, const char *path)
editor->sig->html = editor->html;
name = g_strstrip (g_strdup (gtk_entry_get_text (GTK_ENTRY (editor->name_entry))));
-
+
if (g_str_equal(name, "") ) {
e_error_run ((GtkWindow *)editor->win, "mail:blank-signature", NULL);
- return;
+ return;
}
-
+
if ( (signature = (ESignature *)e_signature_list_find (mail_config_get_signatures (), E_SIGNATURE_FIND_NAME, name)) && !g_str_equal(signature->uid, editor->sig->uid) ) {
e_error_run ((GtkWindow *)editor->win, "mail:signature-already-exists", name, NULL);
- return;
+ return;
}
-
+
if (editor->sig->name)
g_free (editor->sig->name);
-
+
editor->sig->name = name;
/* if the signature isn't already saved in the config, save it there now... */
@@ -249,17 +249,17 @@ do_exit (ESignatureEditor *editor)
button = e_error_run((GtkWindow *)editor->win, "mail:ask-signature-changed", NULL);
exit_dialog_cb (button, editor);
- } else
+ } else
destroy_editor (editor);
CORBA_exception_free (&ev);
}
-static int
+static int
delete_event_cb (GtkWidget *w, GdkEvent *event, ESignatureEditor *editor)
{
do_exit (editor);
-
+
return TRUE;
}
@@ -267,7 +267,7 @@ static void
menu_file_close_cb (BonoboUIComponent *uic, gpointer data, const char *path)
{
ESignatureEditor *editor;
-
+
editor = E_SIGNATURE_EDITOR (data);
do_exit (editor);
}
@@ -276,9 +276,9 @@ static void
menu_file_save_close_cb (BonoboUIComponent *uic, gpointer data, const char *path)
{
ESignatureEditor *editor;
-
+
editor = E_SIGNATURE_EDITOR (data);
-
+
menu_file_save_cb (uic, editor, path);
}
@@ -287,7 +287,7 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("FileSave", menu_file_save_cb),
BONOBO_UI_VERB ("FileClose", menu_file_close_cb),
BONOBO_UI_VERB ("FileSaveClose", menu_file_save_close_cb),
-
+
BONOBO_UI_VERB_END
};
@@ -295,10 +295,10 @@ static void
load_signature (ESignatureEditor *editor)
{
CORBA_Environment ev;
-
+
if (editor->html) {
Bonobo_PersistFile pfile_iface;
-
+
CORBA_exception_init (&ev);
pfile_iface = Bonobo_Unknown_queryInterface (bonobo_widget_get_objref (BONOBO_WIDGET (editor->control)),"IDL:Bonobo/PersistFile:1.0", &ev);
Bonobo_PersistFile_load (pfile_iface, editor->sig->filename, &ev);
@@ -307,34 +307,34 @@ load_signature (ESignatureEditor *editor)
Bonobo_PersistStream pstream_iface;
BonoboStream *stream;
char *data, *html;
-
+
data = e_msg_composer_get_sig_file_content (editor->sig->filename, FALSE);
html = g_strdup_printf ("<PRE>\n%s", data);
g_free (data);
-
+
CORBA_exception_init (&ev);
pstream_iface = Bonobo_Unknown_queryInterface
(bonobo_widget_get_objref (BONOBO_WIDGET (editor->control)),
"IDL:Bonobo/PersistStream:1.0",&ev);
stream = bonobo_stream_mem_create (html, strlen (html), TRUE, FALSE);
-
+
if (stream == NULL) {
g_warning ("Couldn't create memory stream\n");
} else {
BonoboObject *stream_object;
Bonobo_Stream corba_stream;
-
+
stream_object = BONOBO_OBJECT (stream);
corba_stream = bonobo_object_corba_objref (stream_object);
Bonobo_PersistStream_load (pstream_iface, corba_stream,
"text/html", &ev);
}
-
+
Bonobo_Unknown_unref (pstream_iface, &ev);
CORBA_Object_release (pstream_iface, &ev);
CORBA_exception_free (&ev);
bonobo_object_unref (BONOBO_OBJECT (stream));
-
+
g_free (html);
}
}
@@ -354,10 +354,10 @@ format_html_cb (BonoboUIComponent *component,
{
ESignatureEditor *editor = (ESignatureEditor *) data;
-
+
if (type != Bonobo_UIComponent_STATE_CHANGED)
return;
-
+
editor->html = atoi (state);
bonobo_widget_set_property (BONOBO_WIDGET (editor->control), "FormatHTML", TC_CORBA_boolean, editor->html, NULL);
}
@@ -371,12 +371,12 @@ mail_signature_editor (ESignature *sig, GtkWindow *parent, gboolean is_new)
BonoboUIContainer *container;
GtkWidget *vbox, *hbox, *label, *frame, *vbox1;
char *xmlfile;
-
+
if (!sig->filename || !*sig->filename)
return;
-
+
editor = g_new0 (ESignatureEditor, 1);
-
+
editor->sig = sig;
editor->html = sig->html;
editor->is_new = is_new;
@@ -389,9 +389,9 @@ mail_signature_editor (ESignature *sig, GtkWindow *parent, gboolean is_new)
g_object_set (editor->win, "allow_shrink", FALSE, "allow_grow", TRUE, NULL);
g_object_set_data (G_OBJECT(editor->win), "name-changed", GINT_TO_POINTER(0));
-
+
container = bonobo_window_get_ui_container (BONOBO_WINDOW(editor->win));
-
+
component = bonobo_ui_component_new_default ();
bonobo_ui_component_set_container (component, bonobo_object_corba_objref (BONOBO_OBJECT (container)), NULL);
bonobo_ui_component_add_verb_list_with_data (component, verbs, editor);
@@ -406,24 +406,24 @@ mail_signature_editor (ESignature *sig, GtkWindow *parent, gboolean is_new)
editor->control = bonobo_widget_new_control (GNOME_GTKHTML_EDITOR_CONTROL_ID,
bonobo_ui_component_get_container (component));
-
+
if (editor->control == NULL) {
g_warning ("Cannot get '" GNOME_GTKHTML_EDITOR_CONTROL_ID "'.");
-
+
destroy_editor (editor);
return;
}
-
+
editor->engine = (GNOME_GtkHTML_Editor_Engine) Bonobo_Unknown_queryInterface
(bonobo_widget_get_objref (BONOBO_WIDGET (editor->control)), "IDL:GNOME/GtkHTML/Editor/Engine:1.0", &ev);
CORBA_exception_free(&ev);
load_signature (editor);
-
+
bonobo_ui_component_set_prop (component, "/commands/FormatHtml", "state", editor->html ? "1" : "0", NULL);
bonobo_ui_component_add_listener (component, "FormatHtml", format_html_cb, editor);
-
+
g_signal_connect (editor->win, "delete_event", G_CALLBACK (delete_event_cb), editor);
-
+
vbox = gtk_vbox_new (FALSE, 0);
hbox = gtk_hbox_new (FALSE, 4);
vbox1 = gtk_vbox_new (FALSE, 3);
@@ -444,12 +444,12 @@ mail_signature_editor (ESignature *sig, GtkWindow *parent, gboolean is_new)
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
gtk_widget_show_all (vbox);
gtk_box_pack_start_defaults (GTK_BOX (vbox), editor->control);
-
+
bonobo_window_set_contents (BONOBO_WINDOW (editor->win), vbox);
bonobo_widget_set_property (BONOBO_WIDGET (editor->control), "FormatHTML", TC_CORBA_boolean, editor->html, NULL);
gtk_widget_show (GTK_WIDGET (editor->win));
gtk_widget_show (GTK_WIDGET (editor->control));
-
+
if (is_new)
gtk_widget_grab_focus (editor->name_entry);
else {
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 2cd2ebbfba..59bbf7936d 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors:
+/*
+ * Authors:
* Dan Winship <danw@ximian.com>
* Peter Williams <peterw@ximian.com>
* Jeffrey Stedfast <fejj@ximian.com>
*
* Copyright 2000 Ximian, Inc. (www.ximian.com)
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -66,14 +66,14 @@ mail_tool_get_inbox (const gchar *url, CamelException *ex)
{
CamelStore *store;
CamelFolder *folder;
-
+
store = camel_session_get_store (session, url, ex);
if (!store)
return NULL;
-
+
folder = camel_store_get_inbox (store, ex);
camel_object_unref (store);
-
+
return folder;
}
@@ -82,22 +82,22 @@ mail_tool_get_trash (const gchar *url, int connect, CamelException *ex)
{
CamelStore *store;
CamelFolder *trash;
-
+
if (connect)
store = camel_session_get_store (session, url, ex);
else
store = (CamelStore *) camel_session_get_service (session, url, CAMEL_PROVIDER_STORE, ex);
-
+
if (!store)
return NULL;
-
+
if (connect || ((CamelService *) store)->status == CAMEL_SERVICE_CONNECTED)
trash = camel_store_get_trash (store, ex);
else
trash = NULL;
-
+
camel_object_unref (store);
-
+
return trash;
}
@@ -126,7 +126,7 @@ mail_tool_get_local_movemail_path (const unsigned char *uri, CamelException *ex)
full = g_strdup_printf("%s/movemail.%s", path, safe_uri);
g_free(path);
g_free(safe_uri);
-
+
return full;
}
@@ -152,7 +152,7 @@ mail_tool_do_movemail (const char *source_url, CamelException *ex)
camel_url_free(uri);
return NULL;
}
-
+
/* Set up our destination. */
dest_path = mail_tool_get_local_movemail_path ((unsigned char *)source_url, ex);
if (dest_path == NULL)
@@ -167,12 +167,12 @@ mail_tool_do_movemail (const char *source_url, CamelException *ex)
g_free (dest_path);
return NULL;
}
-
+
if (camel_exception_is_set (ex)) {
g_free (dest_path);
return NULL;
}
-
+
return dest_path;
#else
/* Unclear yet whether camel-movemail etc makes any sense on
@@ -189,9 +189,9 @@ mail_tool_generate_forward_subject (CamelMimeMessage *msg)
const char *subject;
char *fwd_subj;
const int max_subject_length = 1024;
-
+
subject = camel_mime_message_get_subject(msg);
-
+
if (subject && *subject) {
/* Truncate insanely long subjects */
if (strlen (subject) < max_subject_length) {
@@ -208,7 +208,7 @@ mail_tool_generate_forward_subject (CamelMimeMessage *msg)
} else {
const CamelInternetAddress *from;
char *fromstr;
-
+
from = camel_mime_message_get_from (msg);
if (from) {
fromstr = camel_address_format (CAMEL_ADDRESS (from));
@@ -217,7 +217,7 @@ mail_tool_generate_forward_subject (CamelMimeMessage *msg)
} else
fwd_subj = g_strdup ("[Fwd: No Subject]");
}
-
+
return fwd_subj;
}
@@ -250,20 +250,20 @@ mail_tool_make_message_attachment (CamelMimeMessage *message)
const char *subject;
struct _camel_header_raw *xev;
char *desc;
-
+
subject = camel_mime_message_get_subject (message);
if (subject)
desc = g_strdup_printf (_("Forwarded message - %s"), subject);
else
desc = g_strdup (_("Forwarded message"));
-
+
/* rip off the X-Evolution headers */
xev = mail_tool_remove_xevolution_headers (message);
camel_header_raw_clear(&xev);
-
+
/* remove Bcc headers */
camel_medium_remove_header (CAMEL_MEDIUM (message), "Bcc");
-
+
part = camel_mime_part_new ();
camel_mime_part_set_disposition (part, "inline");
camel_mime_part_set_description (part, desc);
@@ -271,7 +271,7 @@ mail_tool_make_message_attachment (CamelMimeMessage *message)
CAMEL_DATA_WRAPPER (message));
camel_mime_part_set_content_type (part, "message/rfc822");
g_free (desc);
-
+
return part;
}
@@ -300,7 +300,7 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex)
}
uri = curi;
}
-
+
url = camel_url_new (uri + offset, ex);
if (!url) {
g_free(curi);
@@ -321,7 +321,7 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex)
else
name = "";
}
-
+
if (offset) {
if (offset == 7)
folder = camel_store_get_trash (store, ex);
@@ -331,13 +331,13 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex)
folder = camel_store_get_folder (store, name, flags, ex);
camel_object_unref (store);
}
-
+
if (folder)
mail_note_folder (folder);
-
+
camel_url_free (url);
g_free(curi);
-
+
return folder;
}
@@ -356,29 +356,29 @@ mail_tools_x_evolution_message_parse (char *in, unsigned int inlen, GPtrArray **
/* format: "uri\0uid1\0uid2\0uid3\0...\0uidn" */
char *inptr, *inend;
CamelFolder *folder;
-
+
if (in == NULL)
return NULL;
-
+
folder = mail_tool_uri_to_folder (in, 0, NULL);
-
+
if (!folder)
return NULL;
-
+
/* split the uids */
inend = in + inlen;
inptr = in + strlen (in) + 1;
*uids = g_ptr_array_new ();
while (inptr < inend) {
char *start = inptr;
-
+
while (inptr < inend && *inptr)
inptr++;
-
+
g_ptr_array_add (*uids, g_strndup (start, inptr - start));
inptr++;
}
-
+
return folder;
}
diff --git a/mail/mail-tools.h b/mail/mail-tools.h
index 6ef6001798..0d2354dc29 100644
--- a/mail/mail-tools.h
+++ b/mail/mail-tools.h
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
- *
- * Author :
+ *
+ * Author :
* Peter Williams <peterw@ximian.com>
*
* Copyright 2000 Ximian, Inc. (www.ximian.com)
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/mail/mail-types.h b/mail/mail-types.h
index 38b18abd87..d80b21276d 100644
--- a/mail/mail-types.h
+++ b/mail/mail-types.h
@@ -1,10 +1,10 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* Copyright 2000 Ximian, Inc. (www.ximian.com)
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 35edafba75..9f4b8e2d94 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -179,14 +179,14 @@ vfolder_setup(CamelFolder *folder, const char *query, GList *sources_uri, GList
{
struct _setup_msg *m;
int id;
-
+
m = mail_msg_new(&vfolder_setup_op, NULL, sizeof (*m));
m->folder = folder;
camel_object_ref(folder);
m->query = g_strdup(query);
m->sources_uri = sources_uri;
m->sources_folder = sources_folder;
-
+
id = m->msg.seq;
e_thread_put(mail_thread_queued_slow, (EMsg *)m);
@@ -224,7 +224,7 @@ vfolder_adduri_desc(struct _mail_msg *mm, int done)
} else {
char *uid;
const EAccount *account;
-
+
if (url->user == NULL)
uid = g_strdup(url->host);
else
@@ -316,12 +316,12 @@ vfolder_adduri(const char *uri, GList *folders, int remove)
{
struct _adduri_msg *m;
int id;
-
+
m = mail_msg_new(&vfolder_adduri_op, NULL, sizeof (*m));
m->folders = folders;
m->uri = g_strdup(uri);
m->remove = remove;
-
+
id = m->msg.seq;
e_thread_put(mail_thread_queued_slow, (EMsg *)m);
@@ -349,16 +349,16 @@ uri_is_ignore(CamelStore *store, const char *uri)
EAccount *account;
EIterator *iter;
int found = FALSE;
-
+
d(printf("checking '%s' against:\n %s\n %s\n %s\n", uri,
mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_OUTBOX),
mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_SENT),
mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)));
-
+
found = camel_store_folder_uri_equal(store, mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_OUTBOX), uri)
|| camel_store_folder_uri_equal(store, mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_SENT), uri)
|| camel_store_folder_uri_equal(store, mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS), uri);
-
+
if (found)
return found;
@@ -385,12 +385,12 @@ uri_is_ignore(CamelStore *store, const char *uri)
if (found)
break;
-
+
e_iterator_next (iter);
}
-
+
g_object_unref (iter);
-
+
return found;
}
@@ -454,7 +454,7 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove)
LOCK();
/* d(printf("%s uri to check: %s\n", remove?"Removing":"Adding", uri)); */
-
+
/* maintain the source folders lists for changed rules later on */
if (CAMEL_IS_VEE_STORE(store)) {
is_ignore = TRUE;
@@ -484,7 +484,7 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove)
rule = NULL;
while ((rule = rule_context_next_rule((RuleContext *)context, rule, NULL))) {
int found = FALSE;
-
+
if (!rule->name) {
d(printf("invalid rule (%p): rule->name is set to NULL\n", rule));
continue;
@@ -496,7 +496,7 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove)
|| (((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_REMOTE_ACTIVE && remote)
|| (((EMVFolderRule *)rule)->with == EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE)))
found = TRUE;
-
+
source = NULL;
while (!found && (source = em_vfolder_rule_next_source((EMVFolderRule *)rule, source))) {
char *csource;
@@ -516,9 +516,9 @@ mail_vfolder_add_uri(CamelStore *store, const char *curi, int remove)
folders = g_list_prepend(folders, vf);
}
}
-
+
UNLOCK();
-
+
if (folders != NULL)
vfolder_adduri(curi, folders, remove);
@@ -542,13 +542,13 @@ mail_vfolder_delete_uri(CamelStore *store, const char *curi)
uri = em_uri_from_camel(curi);
d(printf ("Deleting uri to check: %s\n", uri));
-
+
g_return_if_fail (pthread_equal(pthread_self(), mail_gui_thread));
-
+
changed = g_string_new ("");
-
+
LOCK();
-
+
/* see if any rules directly reference this removed uri */
rule = NULL;
while ((rule = rule_context_next_rule ((RuleContext *) context, rule, NULL))) {
@@ -590,23 +590,23 @@ mail_vfolder_delete_uri(CamelStore *store, const char *curi)
g_free(link->data);
source_folders_local = g_list_remove_link(source_folders_local, link);
}
-
+
UNLOCK();
-
+
if (changed->str[0]) {
GtkWidget *dialog;
char *user;
-
+
dialog = e_error_new(NULL, "mail:vfolder-updated", changed->str, uri, NULL);
g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog);
gtk_widget_show (dialog);
-
+
user = g_strdup_printf ("%s/mail/vfolders.xml",
mail_component_peek_base_directory (mail_component_peek ()));
rule_context_save ((RuleContext *) context, user);
g_free (user);
}
-
+
g_string_free (changed, TRUE);
g_free(uri);
@@ -649,7 +649,7 @@ mail_vfolder_rename_uri(CamelStore *store, const char *cfrom, const char *cto)
if (!vf) {
g_warning ("vf is NULL for %s\n", rule->name);
continue;
- }
+ }
g_signal_handlers_disconnect_matched(rule, G_SIGNAL_MATCH_FUNC|G_SIGNAL_MATCH_DATA, 0,
0, NULL, rule_changed, vf);
em_vfolder_rule_remove_source((EMVFolderRule *)rule, source);
@@ -796,14 +796,14 @@ static void context_rule_removed(RuleContext *ctx, FilterRule *rule)
d(printf("rule removed; %s\n", rule->name));
/* TODO: remove from folder info cache? */
-
+
/* FIXME: is this even necessary? if we remove the folder from
* the CamelStore, the tree should pick it up auto-magically
* because it listens to CamelStore events... */
path = g_strdup_printf("/%s", rule->name);
mail_component_remove_folder (mail_component_peek (), vfolder_store, path);
g_free(path);
-
+
LOCK();
if (g_hash_table_lookup_extended (vfolder_hash, rule->name, &key, &folder)) {
g_hash_table_remove (vfolder_hash, key);
@@ -851,7 +851,7 @@ store_folder_deleted(CamelObject *o, void *event_data, void *data)
rule_context_remove_rule((RuleContext *)context, rule);
g_object_unref(rule);
g_signal_connect(context, "rule_removed", G_CALLBACK(context_rule_removed), context);
-
+
user = g_strdup_printf("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
rule_context_save((RuleContext *)context, user);
g_free(user);
@@ -870,7 +870,7 @@ store_folder_renamed(CamelObject *o, void *event_data, void *data)
char *user;
gpointer key, folder;
-
+
/* This should be more-or-less thread-safe */
d(printf("Folder renamed to '%s' from '%s'\n", info->new->full_name, info->old_base));
@@ -929,10 +929,10 @@ vfolder_load_storage(void)
(CamelObjectEventHookFunc)store_folder_deleted, NULL);
camel_object_hook_event(vfolder_store, "folder_renamed",
(CamelObjectEventHookFunc)store_folder_renamed, NULL);
-
+
d(printf("got store '%s' = %p\n", storeuri, vfolder_store));
mail_component_load_store_by_uri (mail_component_peek (), storeuri, _("Search Folders"));
-
+
/* load our rules */
user = g_strdup_printf ("%s/mail/vfolders.xml", mail_component_peek_base_directory (mail_component_peek ()));
context = em_vfolder_context_new ();
@@ -944,7 +944,7 @@ vfolder_load_storage(void)
}
g_free (xmlfile);
g_free (user);
-
+
g_signal_connect(context, "rule_added", G_CALLBACK(context_rule_added), context);
g_signal_connect(context, "rule_removed", G_CALLBACK(context_rule_removed), context);
@@ -1002,11 +1002,11 @@ vfolder_edit (void)
gdk_window_raise (GTK_WIDGET (vfolder_editor)->window);
return;
}
-
+
vfolder_editor = GTK_WIDGET (em_vfolder_editor_new (context));
gtk_window_set_title (GTK_WINDOW (vfolder_editor), _("Search Folders"));
g_signal_connect(vfolder_editor, "response", G_CALLBACK(em_vfolder_editor_response), NULL);
-
+
gtk_widget_show (vfolder_editor);
}
@@ -1164,7 +1164,7 @@ vfolder_gui_add_from_address(CamelInternetAddress *addr, int flags, const char *
EMVFolderRule *rule;
g_return_if_fail (addr != NULL);
-
+
rule = (EMVFolderRule*)em_vfolder_rule_from_address(context, addr, flags, source);
vfolder_gui_add_rule(rule);
}
@@ -1173,10 +1173,10 @@ static void
vfolder_foreach_cb (gpointer key, gpointer data, gpointer user_data)
{
CamelFolder *folder = CAMEL_FOLDER (data);
-
+
if (folder)
camel_object_unref(folder);
-
+
g_free (key);
}
@@ -1195,7 +1195,7 @@ mail_vfolder_shutdown (void)
camel_object_unref (vfolder_store);
vfolder_store = NULL;
}
-
+
if (context) {
g_object_unref(context);
context = NULL;
diff --git a/mail/message-list.c b/mail/message-list.c
index ea627c952a..0936938d1a 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -97,7 +97,7 @@
#define localtime_r(tp,tmp) (localtime(tp)?(*(tmp)=*localtime(tp),(tmp)):0)
#endif
-#define d(x)
+#define d(x)
#define t(x)
struct _MLSelection {
@@ -248,14 +248,14 @@ e_mail_address_new (const char *address)
CamelInternetAddress *cia;
EMailAddress *new;
const char *name = NULL, *addr = NULL;
-
+
cia = camel_internet_address_new ();
if (camel_address_unformat (CAMEL_ADDRESS (cia), address) == -1) {
camel_object_unref (cia);
return NULL;
}
camel_internet_address_get (cia, 0, &name, &addr);
-
+
new = g_new (EMailAddress, 1);
new->address = g_strdup (addr);
if (name && *name) {
@@ -263,9 +263,9 @@ e_mail_address_new (const char *address)
} else {
new->wname = NULL;
}
-
+
camel_object_unref (cia);
-
+
return new;
}
@@ -273,7 +273,7 @@ static void
e_mail_address_free (EMailAddress *addr)
{
g_return_if_fail (addr != NULL);
-
+
g_free (addr->address);
if (addr->wname)
e_name_western_free (addr->wname);
@@ -289,55 +289,55 @@ e_mail_address_compare (gconstpointer address1, gconstpointer address2)
const EMailAddress *addr1 = address1;
const EMailAddress *addr2 = address2;
int retval;
-
+
g_return_val_if_fail (addr1 != NULL, 1);
g_return_val_if_fail (addr2 != NULL, -1);
-
+
if (!addr1->wname && !addr2->wname) {
/* have to compare addresses, one or both don't have names */
g_return_val_if_fail (addr1->address != NULL, 1);
g_return_val_if_fail (addr2->address != NULL, -1);
-
+
return strcmp (addr1->address, addr2->address);
}
-
+
if (!addr1->wname)
return -1;
if (!addr2->wname)
return 1;
-
+
if (!addr1->wname->last && !addr2->wname->last) {
/* neither has a last name - default to address? */
/* FIXME: what do we compare next? */
g_return_val_if_fail (addr1->address != NULL, 1);
g_return_val_if_fail (addr2->address != NULL, -1);
-
+
return strcmp (addr1->address, addr2->address);
}
-
+
if (!addr1->wname->last)
return -1;
if (!addr2->wname->last)
return 1;
-
+
retval = strcmp (addr1->wname->last, addr2->wname->last);
if (retval)
return retval;
-
+
/* last names are identical - compare first names */
-
+
if (!addr1->wname->first && !addr2->wname->first)
return strcmp (addr1->address, addr2->address);
-
+
if (!addr1->wname->first)
return -1;
if (!addr2->wname->first)
return 1;
-
+
retval = strcmp (addr1->wname->first, addr2->wname->first);
if (retval)
return retval;
-
+
return strcmp (addr1->address, addr2->address);
}
#endif /* SMART_ADDRESS_COMPARE */
@@ -352,10 +352,10 @@ address_compare (gconstpointer address1, gconstpointer address2)
EMailAddress *addr1, *addr2;
#endif /* SMART_ADDRESS_COMPARE */
int retval;
-
+
g_return_val_if_fail (address1 != NULL, 1);
g_return_val_if_fail (address2 != NULL, -1);
-
+
#ifdef SMART_ADDRESS_COMPARE
addr1 = e_mail_address_new (address1);
addr2 = e_mail_address_new (address2);
@@ -365,7 +365,7 @@ address_compare (gconstpointer address1, gconstpointer address2)
#else
retval = strcmp ((char *) address1, (char *) address2);
#endif /* SMART_ADDRESS_COMPARE */
-
+
return retval;
}
@@ -373,7 +373,7 @@ static char *
filter_size (gint size)
{
gfloat fsize;
-
+
if (size < 1024) {
return g_strdup_printf ("%d", size);
} else {
@@ -392,12 +392,12 @@ static const char *
get_message_uid (MessageList *message_list, ETreePath node)
{
CamelMessageInfo *info;
-
+
g_return_val_if_fail (node != NULL, NULL);
info = e_tree_memory_node_get_data (E_TREE_MEMORY (message_list->model), node);
/* correct me if I'm wrong, but this should never be NULL, should it? */
g_return_val_if_fail (info != NULL, NULL);
-
+
return camel_message_info_uid (info);
}
@@ -408,11 +408,11 @@ static CamelMessageInfo *
get_message_info (MessageList *message_list, ETreePath node)
{
CamelMessageInfo *info;
-
+
g_return_val_if_fail (node != NULL, NULL);
info = e_tree_memory_node_get_data (E_TREE_MEMORY (message_list->model), node);
g_return_val_if_fail (info != NULL, NULL);
-
+
return info;
}
@@ -423,7 +423,7 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co
char *normalised;
EPoolv *poolv;
int index;
-
+
switch (col) {
case COL_SUBJECT_NORM:
string = camel_message_info_subject (info);
@@ -442,11 +442,11 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co
index = NORMALISED_LAST;
g_warning ("Should not be reached\n");
}
-
+
/* slight optimisation */
if (string == NULL || string[0] == '\0')
return "";
-
+
poolv = g_hash_table_lookup (message_list->normalised_hash, camel_message_info_uid (info));
if (poolv == NULL) {
poolv = e_poolv_new (NORMALISED_LAST);
@@ -456,29 +456,29 @@ get_normalised_string (MessageList *message_list, CamelMessageInfo *info, int co
if (*str)
return str;
}
-
+
if (col == COL_SUBJECT_NORM) {
const unsigned char *subject;
-
+
subject = (const unsigned char *) string;
while (!g_ascii_strncasecmp ((char *)subject, "Re:", 3)) {
subject += 3;
-
+
/* jump over any spaces */
while (*subject && isspace ((int) *subject))
subject++;
}
-
+
/* jump over any spaces */
while (*subject && isspace ((int) *subject))
subject++;
-
+
string = (const char *) subject;
}
-
+
normalised = g_utf8_collate_key (string, -1);
e_poolv_set (poolv, index, normalised, TRUE);
-
+
return e_poolv_get (poolv, index);
}
@@ -613,14 +613,14 @@ message_list_select(MessageList *ml, MessageListSelectDirection direction, guint
/**
* message_list_can_select:
- * @ml:
- * @direction:
- * @flags:
- * @mask:
- *
+ * @ml:
+ * @direction:
+ * @flags:
+ * @mask:
+ *
* Returns true if the selection specified is possible with the current view.
- *
- * Return value:
+ *
+ * Return value:
**/
gboolean
message_list_can_select(MessageList *ml, MessageListSelectDirection direction, guint32 flags, guint32 mask)
@@ -647,7 +647,7 @@ message_list_select_uid (MessageList *message_list, const char *uid)
g_free(message_list->pending_select_uid);
message_list->pending_select_uid = g_strdup(uid);
}
-
+
node = g_hash_table_lookup (message_list->uid_nodemap, uid);
if (node) {
/* This will emit a changed signal that we'll pick up */
@@ -696,9 +696,9 @@ void
message_list_select_all (MessageList *message_list)
{
ESelectionModel *etsm;
-
+
etsm = e_tree_get_selection_model (message_list->tree);
-
+
e_selection_model_select_all (etsm);
}
@@ -712,7 +712,7 @@ static gboolean
select_node (ETreeModel *model, ETreePath path, gpointer user_data)
{
thread_select_info_t *tsi = (thread_select_info_t *) user_data;
-
+
g_ptr_array_add (tsi->paths, path);
return FALSE; /*not done yet*/
}
@@ -723,24 +723,24 @@ thread_select_foreach (ETreePath path, gpointer user_data)
thread_select_info_t *tsi = (thread_select_info_t *) user_data;
ETreeModel *model = tsi->ml->model;
ETreePath node;
-
+
/* @path part of the initial selection. If it has children,
* we select them as well. If it doesn't, we select its siblings and
* their children (ie, the current node must be inside the thread
* that the user wants to mark.
*/
-
+
if (e_tree_model_node_get_first_child (model, path)) {
node = path;
} else {
node = e_tree_model_node_get_parent (model, path);
-
+
/* Let's make an exception: if no parent, then we're about
* to mark the whole tree. No. */
- if (e_tree_model_node_is_root (model, node))
+ if (e_tree_model_node_is_root (model, node))
node = path;
}
-
+
e_tree_model_node_traverse (model, node, select_node, tsi);
}
@@ -755,12 +755,12 @@ message_list_select_thread (MessageList *message_list)
{
ETreeSelectionModel *etsm;
thread_select_info_t tsi;
-
+
tsi.ml = message_list;
tsi.paths = g_ptr_array_new ();
-
+
etsm = (ETreeSelectionModel *) e_tree_get_selection_model (message_list->tree);
-
+
e_tree_selected_path_foreach (message_list->tree, thread_select_foreach, &tsi);
e_tree_selection_model_select_paths(etsm, tsi.paths);
g_ptr_array_free (tsi.paths, TRUE);
@@ -776,9 +776,9 @@ void
message_list_invert_selection (MessageList *message_list)
{
ESelectionModel *etsm;
-
+
etsm = e_tree_get_selection_model (message_list->tree);
-
+
e_selection_model_invert_selection (etsm);
}
@@ -789,7 +789,7 @@ message_list_copy(MessageList *ml, gboolean cut)
GPtrArray *uids;
clear_selection(ml, &p->clipboard);
-
+
uids = message_list_get_selected(ml);
if (uids->len > 0) {
@@ -903,14 +903,14 @@ ml_duplicate_value (ETreeModel *etm, int col, const void *value, void *data)
case COL_FOLLOWUP_FLAG_STATUS:
case COL_FOLLOWUP_DUE_BY:
return (void *) value;
-
+
case COL_FROM:
case COL_SUBJECT:
case COL_TO:
case COL_SENDER:
case COL_RECIPIENTS:
case COL_MIXED_SENDER:
- case COL_MIXED_RECIPIENTS:
+ case COL_MIXED_RECIPIENTS:
case COL_FOLLOWUP_FLAG:
case COL_LOCATION:
return g_strdup (value);
@@ -936,7 +936,7 @@ ml_free_value (ETreeModel *etm, int col, void *value, void *data)
case COL_FOLLOWUP_FLAG_STATUS:
case COL_FOLLOWUP_DUE_BY:
break;
-
+
case COL_FROM:
case COL_SUBJECT:
case COL_TO:
@@ -945,7 +945,7 @@ ml_free_value (ETreeModel *etm, int col, void *value, void *data)
case COL_SENDER:
case COL_RECIPIENTS:
case COL_MIXED_SENDER:
- case COL_MIXED_RECIPIENTS:
+ case COL_MIXED_RECIPIENTS:
g_free (value);
break;
default:
@@ -969,7 +969,7 @@ ml_initialize_value (ETreeModel *etm, int col, void *data)
case COL_FOLLOWUP_FLAG_STATUS:
case COL_FOLLOWUP_DUE_BY:
return NULL;
-
+
case COL_FROM:
case COL_SUBJECT:
case COL_TO:
@@ -978,7 +978,7 @@ ml_initialize_value (ETreeModel *etm, int col, void *data)
case COL_SENDER:
case COL_RECIPIENTS:
case COL_MIXED_SENDER:
- case COL_MIXED_RECIPIENTS:
+ case COL_MIXED_RECIPIENTS:
return g_strdup ("");
default:
g_warning ("This shouldn't be reached\n");
@@ -1003,7 +1003,7 @@ ml_value_is_empty (ETreeModel *etm, int col, const void *value, void *data)
case COL_FOLLOWUP_FLAG_STATUS:
case COL_FOLLOWUP_DUE_BY:
return value == NULL;
-
+
case COL_FROM:
case COL_SUBJECT:
case COL_TO:
@@ -1012,7 +1012,7 @@ ml_value_is_empty (ETreeModel *etm, int col, const void *value, void *data)
case COL_SENDER:
case COL_RECIPIENTS:
case COL_MIXED_SENDER:
- case COL_MIXED_RECIPIENTS:
+ case COL_MIXED_RECIPIENTS:
return !(value && *(char *)value);
default:
g_warning ("This shouldn't be reached\n");
@@ -1043,35 +1043,35 @@ static char *
ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data)
{
unsigned int i;
-
+
switch (col){
case COL_MESSAGE_STATUS:
i = GPOINTER_TO_UINT(value);
if (i > 4)
return g_strdup ("");
return g_strdup (_(status_map[i]));
-
+
case COL_SCORE:
i = GPOINTER_TO_UINT(value) + 3;
if (i > 6)
i = 3;
return g_strdup (_(score_map[i]));
-
+
case COL_ATTACHMENT:
case COL_FLAGGED:
case COL_DELETED:
case COL_UNREAD:
case COL_FOLLOWUP_FLAG_STATUS:
return g_strdup_printf ("%u", GPOINTER_TO_UINT(value));
-
+
case COL_SENT:
case COL_RECEIVED:
case COL_FOLLOWUP_DUE_BY:
return filter_date (GPOINTER_TO_INT (value));
-
+
case COL_SIZE:
return filter_size (GPOINTER_TO_INT (value));
-
+
case COL_FROM:
case COL_SUBJECT:
case COL_TO:
@@ -1080,7 +1080,7 @@ ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data)
case COL_SENDER:
case COL_RECIPIENTS:
case COL_MIXED_SENDER:
- case COL_MIXED_RECIPIENTS:
+ case COL_MIXED_RECIPIENTS:
return g_strdup (value);
default:
g_warning ("This shouldn't be reached\n");
@@ -1101,14 +1101,14 @@ subtree_unread(MessageList *ml, ETreePath node)
{
CamelMessageInfo *info;
ETreePath child;
-
+
while (node) {
info = e_tree_memory_node_get_data((ETreeMemory *)ml->model, node);
g_return_val_if_fail (info != NULL, FALSE);
-
+
if (!(camel_message_info_flags(info) & CAMEL_MESSAGE_SEEN))
return TRUE;
-
+
if ((child = e_tree_model_node_get_first_child (E_TREE_MODEL (ml->model), node)))
if (subtree_unread(ml, child))
return TRUE;
@@ -1123,15 +1123,15 @@ subtree_size(MessageList *ml, ETreePath node)
CamelMessageInfo *info;
int size = 0;
ETreePath child;
-
+
while (node) {
info = e_tree_memory_node_get_data((ETreeMemory *)ml->model, node);
g_return_val_if_fail (info != NULL, 0);
-
+
size += camel_message_info_size(info);
if ((child = e_tree_model_node_get_first_child (E_TREE_MODEL (ml->model), node)))
size += subtree_size(ml, child);
-
+
node = e_tree_model_node_get_next (ml->model, node);
}
return size;
@@ -1143,28 +1143,28 @@ subtree_latest(MessageList *ml, ETreePath node, int sent)
CamelMessageInfo *info;
time_t latest = 0, date;
ETreePath *child;
-
+
while (node) {
info = e_tree_memory_node_get_data((ETreeMemory *)ml->model, node);
g_return_val_if_fail (info != NULL, 0);
-
+
if (sent)
date = camel_message_info_date_sent(info);
else
date = camel_message_info_date_received(info);
-
+
if (latest == 0 || date > latest)
latest = date;
-
+
if ((child = e_tree_model_node_get_first_child (ml->model, node))) {
date = subtree_latest(ml, child, sent);
if (latest == 0 || (date != 0 && date > latest))
latest = date;
}
-
+
node = e_tree_model_node_get_next (ml->model, node);
}
-
+
return latest;
}
@@ -1180,7 +1180,7 @@ sanitize_recipients (const gchar *string)
if (!string || !*string)
return "";
-
+
gstring = g_string_new ("");
for (p = string; *p; p = g_utf8_next_char (p)) {
@@ -1225,11 +1225,11 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
if (e_tree_model_node_is_root (etm, path))
return NULL;
-
+
/* retrieve the message information array */
msg_info = e_tree_memory_node_get_data (E_TREE_MEMORY(etm), path);
g_return_val_if_fail (msg_info != NULL, NULL);
-
+
switch (col){
case COL_MESSAGE_STATUS:
flags = camel_message_info_flags(msg_info);
@@ -1244,16 +1244,16 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
case COL_SCORE: {
const char *tag;
int score = 0;
-
+
tag = camel_message_info_user_tag(msg_info, "score");
if (tag)
score = atoi (tag);
-
+
return GINT_TO_POINTER (score);
}
case COL_FOLLOWUP_FLAG_STATUS: {
const char *tag, *cmp;
-
+
/* FIXME: this all should be methods off of message-tag-followup class,
FIXME: the tag names should be namespaced :( */
tag = camel_message_info_user_tag(msg_info, "follow-up");
@@ -1269,7 +1269,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
case COL_FOLLOWUP_DUE_BY: {
const char *tag;
time_t due_by;
-
+
tag = camel_message_info_user_tag(msg_info, "due-by");
if (tag && *tag) {
due_by = camel_header_decode_date (tag, NULL);
@@ -1300,7 +1300,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
if (child && !e_tree_node_is_expanded(message_list->tree, path)) {
return GINT_TO_POINTER (subtree_latest (message_list, child, 1));
}
-
+
return GINT_TO_POINTER (camel_message_info_date_sent(msg_info));
}
case COL_RECEIVED: {
@@ -1311,7 +1311,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
return GINT_TO_POINTER (subtree_latest (message_list, child, 0));
}
return GINT_TO_POINTER (camel_message_info_date_received(msg_info));
- }
+ }
case COL_TO:
str = camel_message_info_to (msg_info);
return (void *)(str ? str : "");
@@ -1330,12 +1330,12 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
&& (flags & CAMEL_MESSAGE_SEEN)) {
return GINT_TO_POINTER (subtree_unread (message_list, child));
}
-
+
return GINT_TO_POINTER (!(flags & CAMEL_MESSAGE_SEEN));
}
case COL_COLOUR: {
const char *colour, *due_by, *completed, *label;
-
+
/* Priority: colour tag; label tag; important flag; due-by tag */
/* This is astonisngly poorly written code */
@@ -1359,7 +1359,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
} else if ((due_by && *due_by) && !(completed && *completed)) {
time_t now = time (NULL);
time_t target_date;
-
+
target_date = camel_header_decode_date (due_by, NULL);
if (now >= target_date)
colour = "#A7453E";
@@ -1374,42 +1374,42 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
EAccount *account;
char *location = NULL;
char *euri, *url;
-
+
if (CAMEL_IS_VEE_FOLDER(message_list->folder)) {
folder = camel_vee_folder_get_location((CamelVeeFolder *)message_list->folder, (CamelVeeMessageInfo *)msg_info, NULL);
} else {
folder = message_list->folder;
}
-
+
url = mail_tools_folder_to_url (folder);
euri = em_uri_from_camel(url);
-
+
account = mail_config_get_account_by_source_url (url);
-
+
if (account) {
- curl = camel_url_new (url, &ex);
+ curl = camel_url_new (url, &ex);
location = g_strconcat (account->name, ":", curl->path, NULL);
} else {
/* Local account */
euri = em_uri_from_camel(url);
- curl = camel_url_new (euri, &ex);
- if (curl->host && !strcmp(curl->host, "local") && curl->user && !strcmp(curl->user, "local"))
+ curl = camel_url_new (euri, &ex);
+ if (curl->host && !strcmp(curl->host, "local") && curl->user && !strcmp(curl->user, "local"))
location = g_strconcat ("On This Computer", ":",curl->path, NULL);
}
-
+
camel_exception_clear (&ex);
g_free (url);
g_free (euri);
-
+
return location;
}
- case COL_MIXED_RECIPIENTS:
+ case COL_MIXED_RECIPIENTS:
case COL_RECIPIENTS:{
str = camel_message_info_to (msg_info);
-
+
return sanitize_recipients(str);
}
- case COL_MIXED_SENDER:
+ case COL_MIXED_SENDER:
case COL_SENDER:{
char **sender_name = NULL;
str = camel_message_info_from (msg_info);
@@ -1418,7 +1418,7 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
return (void *)(*sender_name);
}
else
- return (void *)("");
+ return (void *)("");
}
default:
g_warning ("This shouldn't be reached\n");
@@ -1464,7 +1464,7 @@ ml_tree_sort_value_at (ETreeModel *etm, ETreePath path, int col, void *model_dat
}
return GINT_TO_POINTER (camel_message_info_date_received(msg_info));
- }
+ }
return ml_tree_value_at (etm, path, col, model_data);
@@ -1487,13 +1487,13 @@ static void
message_list_init_images (void)
{
int i;
-
+
/*
* Only load once, and share
*/
if (states_pixmaps[0].pixbuf)
return;
-
+
for (i = 0; i < G_N_ELEMENTS (states_pixmaps); i++) {
if (states_pixmaps[i].icon_name)
states_pixmaps[i].pixbuf = e_icon_factory_get_icon (states_pixmaps[i].icon_name, E_ICON_SIZE_MENU);
@@ -1510,10 +1510,10 @@ filter_date (time_t date)
struct tm then, now, yesterday;
char buf[26];
gboolean done = FALSE;
-
+
if (date == 0)
return g_strdup (_("?"));
-
+
localtime_r (&date, &then);
localtime_r (&nowdate, &now);
if (then.tm_mday == now.tm_mday &&
@@ -1573,19 +1573,19 @@ static ECell * create_composite_cell (int col)
gboolean show_email;
int i;
int alt_col = (col == COL_FROM) ? COL_SENDER : COL_RECIPIENTS;
-
+
gconf = mail_config_get_gconf_client ();
fixed_name = gconf_client_get_string (gconf, "/desktop/gnome/interface/monospace_font_name", NULL);
show_email = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/show_email", NULL);
-
+
cell_vbox = e_cell_vbox_new ();
cell_hbox = e_cell_hbox_new ();
-
+
for (i = 0; i < 2; i++)
- images [i] = states_pixmaps [i + 5].pixbuf;
+ images [i] = states_pixmaps [i + 5].pixbuf;
cell_attach = e_cell_toggle_new (0, 2, images);
-
+
cell_date = e_cell_date_new(NULL, GTK_JUSTIFY_RIGHT);
g_object_set (G_OBJECT (cell_date),
"bold_column", COL_UNREAD,
@@ -1597,16 +1597,16 @@ static ECell * create_composite_cell (int col)
"bold_column", COL_UNREAD,
"color_column", COL_COLOUR,
NULL);
-
+
e_cell_hbox_append (E_CELL_HBOX (cell_hbox), cell_from, show_email ? col : alt_col, 68);
e_cell_hbox_append (E_CELL_HBOX (cell_hbox), cell_attach, COL_ATTACHMENT, 5);
e_cell_hbox_append (E_CELL_HBOX (cell_hbox), cell_date, COL_SENT, 27);
-
+
cell_sub = e_cell_text_new(fixed_name? fixed_name:NULL, GTK_JUSTIFY_LEFT);
g_object_set (G_OBJECT (cell_sub),
/* "bold_column", COL_UNREAD, */
"color_column", COL_COLOUR,
- NULL);
+ NULL);
cell_tree = e_cell_tree_new (NULL, NULL, TRUE, cell_sub);
e_cell_vbox_append (E_CELL_VBOX (cell_vbox), cell_hbox, COL_FROM);
e_cell_vbox_append (E_CELL_VBOX (cell_vbox), cell_tree, COL_SUBJECT);
@@ -1624,9 +1624,9 @@ static void
composite_cell_set_strike_col (ECell *cell, int col)
{
g_object_set (G_OBJECT (g_object_get_data(G_OBJECT (cell), "cell_date")), "strikeout_column", col, NULL);
- g_object_set (G_OBJECT (g_object_get_data(G_OBJECT (cell), "cell_from")), "strikeout_column", col, NULL);
+ g_object_set (G_OBJECT (g_object_get_data(G_OBJECT (cell), "cell_from")), "strikeout_column", col, NULL);
}
-
+
static ETableExtras *
message_list_create_extras (void)
{
@@ -1641,31 +1641,31 @@ message_list_create_extras (void)
e_table_extras_add_pixbuf (extras, "attachment", states_pixmaps [6].pixbuf);
e_table_extras_add_pixbuf (extras, "flagged", states_pixmaps [7].pixbuf);
e_table_extras_add_pixbuf (extras, "followup", states_pixmaps [15].pixbuf);
-
+
e_table_extras_add_compare (extras, "address_compare", address_compare);
-
+
for (i = 0; i < 5; i++)
images [i] = states_pixmaps [i].pixbuf;
-
+
e_table_extras_add_cell (extras, "render_message_status", e_cell_toggle_new (0, 5, images));
-
+
for (i = 0; i < 2; i++)
images [i] = states_pixmaps [i + 5].pixbuf;
-
+
e_table_extras_add_cell (extras, "render_attachment", e_cell_toggle_new (0, 2, images));
-
+
images [1] = states_pixmaps [7].pixbuf;
e_table_extras_add_cell (extras, "render_flagged", e_cell_toggle_new (0, 2, images));
-
+
images[1] = states_pixmaps [15].pixbuf;
images[2] = states_pixmaps [16].pixbuf;
e_table_extras_add_cell (extras, "render_flag_status", e_cell_toggle_new (0, 3, images));
-
+
for (i = 0; i < 7; i++)
images[i] = states_pixmaps [i + 7].pixbuf;
-
+
e_table_extras_add_cell (extras, "render_score", e_cell_toggle_new (0, 7, images));
-
+
/* date cell */
cell = e_cell_date_new (NULL, GTK_JUSTIFY_LEFT);
g_object_set (G_OBJECT (cell),
@@ -1673,7 +1673,7 @@ message_list_create_extras (void)
"color_column", COL_COLOUR,
NULL);
e_table_extras_add_cell (extras, "render_date", cell);
-
+
/* text cell */
cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
g_object_set (G_OBJECT (cell),
@@ -1681,11 +1681,11 @@ message_list_create_extras (void)
"color_column", COL_COLOUR,
NULL);
e_table_extras_add_cell (extras, "render_text", cell);
-
- e_table_extras_add_cell (extras, "render_tree",
+
+ e_table_extras_add_cell (extras, "render_tree",
e_cell_tree_new (NULL, NULL, /* let the tree renderer default the pixmaps */
TRUE, cell));
-
+
/* size cell */
cell = e_cell_size_new (NULL, GTK_JUSTIFY_RIGHT);
g_object_set (G_OBJECT (cell),
@@ -1697,10 +1697,10 @@ message_list_create_extras (void)
/* Composite cell for wide view */
cell = create_composite_cell (COL_FROM);
e_table_extras_add_cell (extras, "render_composite_from", cell);
-
+
cell = create_composite_cell (COL_TO);
- e_table_extras_add_cell (extras, "render_composite_to", cell);
-
+ e_table_extras_add_cell (extras, "render_composite_to", cell);
+
return extras;
}
@@ -1708,10 +1708,10 @@ static void
save_tree_state(MessageList *ml)
{
char *filename;
-
+
if (ml->folder == NULL || ml->tree == NULL)
return;
-
+
filename = mail_config_folder_to_cachename(ml->folder, "et-expanded-");
e_tree_save_expanded_state(ml->tree, filename);
g_free(filename);
@@ -1731,10 +1731,10 @@ static void
load_tree_state (MessageList *ml)
{
char *filename;
-
+
if (ml->folder == NULL || ml->tree == NULL)
return;
-
+
filename = mail_config_folder_to_cachename (ml->folder, "et-expanded-");
e_tree_load_expanded_state (ml->tree, filename);
g_free (filename);
@@ -1763,10 +1763,10 @@ message_list_setup_etree (MessageList *message_list, gboolean outgoing)
g_object_set (message_list->tree,
"uniform_row_height", TRUE,
NULL);
-
+
name = camel_service_get_name (CAMEL_SERVICE (message_list->folder->parent_store), TRUE);
d(printf ("folder name is '%s'\n", name));
-
+
path = mail_config_folder_to_cachename (message_list->folder, "et-expanded-");
g_object_set_data (G_OBJECT (((GnomeCanvasItem *) item)->canvas), "freeze-cursor", &data);
@@ -1775,7 +1775,7 @@ message_list_setup_etree (MessageList *message_list, gboolean outgoing)
e_tree_load_expanded_state (message_list->tree, path);
}
g_free (path);
-
+
g_free (name);
}
}
@@ -1849,7 +1849,7 @@ ml_tree_drag_data_get (ETree *tree, int row, ETreePath path, int col,
/* Drop handling */
struct _drop_msg {
struct _mail_msg msg;
-
+
GdkDragContext *context;
/* Only selection->data and selection->length are valid */
@@ -1859,7 +1859,7 @@ struct _drop_msg {
guint32 action;
guint info;
-
+
unsigned int move:1;
unsigned int moved:1;
unsigned int aborted:1;
@@ -1899,7 +1899,7 @@ ml_drop_async_done(struct _mail_msg *mm)
{
struct _drop_msg *m = (struct _drop_msg *)mm;
gboolean success, delete;
-
+
/* ?? */
if (m->aborted) {
success = FALSE;
@@ -1916,7 +1916,7 @@ static void
ml_drop_async_free(struct _mail_msg *mm)
{
struct _drop_msg *m = (struct _drop_msg *)mm;
-
+
g_object_unref(m->context);
camel_object_unref(m->folder);
@@ -2067,25 +2067,25 @@ message_list_init (MessageList *message_list)
struct _MessageListPrivate *p;
GtkAdjustment *adjustment;
GdkAtom matom;
-
+
adjustment = (GtkAdjustment *) gtk_adjustment_new (0.0, 0.0, G_MAXDOUBLE, 0.0, 0.0, 0.0);
gtk_scrolled_window_set_vadjustment ((GtkScrolledWindow *) message_list, adjustment);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (message_list), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
-
+
message_list->normalised_hash = g_hash_table_new_full (
g_str_hash, g_str_equal,
(GDestroyNotify) NULL,
(GDestroyNotify) e_poolv_destroy);
-
+
message_list->hidden = NULL;
message_list->hidden_pool = NULL;
message_list->hide_before = ML_HIDE_NONE_START;
message_list->hide_after = ML_HIDE_NONE_END;
-
+
message_list->search = NULL;
-
+
message_list->hide_lock = g_mutex_new();
-
+
message_list->uid_nodemap = g_hash_table_new (g_str_hash, g_str_equal);
message_list->async_event = mail_async_event_new();
@@ -2102,7 +2102,7 @@ message_list_init (MessageList *message_list)
g_signal_connect(p->invisible, "selection_get", G_CALLBACK(ml_selection_get), message_list);
g_signal_connect(p->invisible, "selection_clear_event", G_CALLBACK(ml_selection_clear_event), message_list);
g_signal_connect(p->invisible, "selection_received", G_CALLBACK(ml_selection_received), message_list);
-
+
g_signal_connect (((GtkScrolledWindow *) message_list)->vscrollbar, "value-changed", G_CALLBACK (ml_scrolled), message_list);
}
@@ -2113,7 +2113,7 @@ message_list_destroy(GtkObject *object)
struct _MessageListPrivate *p = message_list->priv;
p->destroyed = TRUE;
-
+
if (message_list->async_event) {
mail_async_event_destroy(message_list->async_event);
message_list->async_event = NULL;
@@ -2131,7 +2131,7 @@ message_list_destroy(GtkObject *object)
g_hash_table_destroy (message_list->uid_nodemap);
message_list->uid_nodemap = NULL;
}
-
+
camel_object_unhook_event(message_list->folder, "folder_changed", folder_changed, message_list);
camel_object_unref (message_list->folder);
message_list->folder = NULL;
@@ -2146,17 +2146,17 @@ message_list_destroy(GtkObject *object)
g_object_unref (message_list->extras);
message_list->extras = NULL;
}
-
+
if (message_list->model) {
g_object_unref (message_list->model);
message_list->model = NULL;
}
-
+
if (message_list->idle_id != 0) {
g_source_remove (message_list->idle_id);
message_list->idle_id = 0;
}
-
+
if (message_list->seen_id) {
g_source_remove (message_list->seen_id);
message_list->seen_id = 0;
@@ -2170,9 +2170,9 @@ message_list_finalise (GObject *object)
{
MessageList *message_list = MESSAGE_LIST (object);
struct _MessageListPrivate *p = message_list->priv;
-
+
g_hash_table_destroy (message_list->normalised_hash);
-
+
if (message_list->thread_tree)
camel_folder_thread_messages_unref(message_list->thread_tree);
@@ -2224,7 +2224,7 @@ message_list_class_init (MessageListClass *message_list_class)
NULL,
g_cclosure_marshal_VOID__STRING,
G_TYPE_NONE, 1, G_TYPE_STRING);
-
+
message_list_signals[MESSAGE_LIST_BUILT] =
g_signal_new ("message_list_built",
MESSAGE_LIST_TYPE,
@@ -2234,7 +2234,7 @@ message_list_class_init (MessageListClass *message_list_class)
NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
+
message_list_signals[MESSAGE_LIST_SCROLLED] =
g_signal_new ("message_list_scrolled",
MESSAGE_LIST_TYPE,
@@ -2244,7 +2244,7 @@ message_list_class_init (MessageListClass *message_list_class)
NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
+
message_list_init_images ();
}
@@ -2258,35 +2258,35 @@ message_list_construct (MessageList *message_list)
message_list->model =
e_tree_memory_callbacks_new (ml_tree_icon_at,
-
+
ml_column_count,
-
+
ml_has_save_id,
ml_get_save_id,
-
+
ml_has_get_node_by_id,
ml_get_node_by_id,
-
+
ml_tree_sort_value_at,
ml_tree_value_at,
ml_tree_set_value_at,
ml_tree_is_cell_editable,
-
+
ml_duplicate_value,
ml_free_value,
ml_initialize_value,
ml_value_is_empty,
ml_value_to_string,
-
+
message_list);
- e_tree_memory_set_expanded_default(E_TREE_MEMORY(message_list->model),
+ e_tree_memory_set_expanded_default(E_TREE_MEMORY(message_list->model),
gconf_client_get_bool (gconf,
"/apps/evolution/mail/display/thread_expand",
NULL));
message_list->priv->thread_latest = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/thread_latest", NULL);
-
+
/*
* The etree
*/
@@ -2295,7 +2295,7 @@ message_list_construct (MessageList *message_list)
etspecfile = g_build_filename (EVOLUTION_ETSPECDIR, "message-list.etspec", NULL);
construct_failed = (e_tree_scrolled_construct_from_spec_file (E_TREE_SCROLLED (message_list),
message_list->model,
- message_list->extras,
+ message_list->extras,
etspecfile,
NULL)
== FALSE);
@@ -2313,7 +2313,7 @@ message_list_construct (MessageList *message_list)
g_signal_connect((message_list->tree), "cursor_activated",
G_CALLBACK (on_cursor_activated_cmd),
message_list);
-
+
g_signal_connect((message_list->tree), "click",
G_CALLBACK (on_click), message_list);
@@ -2324,14 +2324,14 @@ message_list_construct (MessageList *message_list)
e_tree_drag_source_set(message_list->tree, GDK_BUTTON1_MASK,
ml_drag_types, sizeof(ml_drag_types)/sizeof(ml_drag_types[0]),
GDK_ACTION_MOVE|GDK_ACTION_COPY|GDK_ACTION_ASK);
-
+
g_signal_connect(message_list->tree, "tree_drag_data_get",
G_CALLBACK(ml_tree_drag_data_get), message_list);
e_tree_drag_dest_set(message_list->tree, GTK_DEST_DEFAULT_ALL,
ml_drop_types, sizeof(ml_drop_types)/sizeof(ml_drop_types[0]),
GDK_ACTION_MOVE|GDK_ACTION_COPY|GDK_ACTION_ASK);
-
+
g_signal_connect(message_list->tree, "tree_drag_data_received",
G_CALLBACK(ml_tree_drag_data_received), message_list);
g_signal_connect(message_list->tree, "drag-motion", G_CALLBACK(ml_tree_drag_motion), message_list);
@@ -2386,7 +2386,7 @@ clear_tree (MessageList *ml)
g_hash_table_foreach (ml->uid_nodemap, (GHFunc)clear_info, ml);
g_hash_table_destroy (ml->uid_nodemap);
ml->uid_nodemap = g_hash_table_new (g_str_hash, g_str_equal);
-
+
if (ml->tree_root) {
/* we should be frozen already */
e_tree_memory_node_remove (E_TREE_MEMORY(etm), ml->tree_root);
@@ -2427,9 +2427,9 @@ is_node_selectable (MessageList *ml, CamelMessageInfo *info)
flag_junk = flags & CAMEL_MESSAGE_JUNK;
flag_deleted = flags & CAMEL_MESSAGE_DELETED;
- /* perform actions depending on folder type */
+ /* perform actions depending on folder type */
if (is_junk_folder) {
- /* messages in a junk folder are selectable only if
+ /* messages in a junk folder are selectable only if
* the message is marked as junk and if not deleted
* when hidedeleted is set */
if (flag_junk && !(flag_deleted && ml->hidedeleted))
@@ -2450,7 +2450,7 @@ is_node_selectable (MessageList *ml, CamelMessageInfo *info)
return FALSE;
}
-
+
/* We try and find something that is selectable in our tree. There is
* actually no assurance that we'll find something that will still be
@@ -2687,7 +2687,7 @@ add_node_diff(MessageList *ml, ETreePath parent, ETreePath path, CamelFolderThre
ETreePath node;
g_return_if_fail (c->message != NULL);
-
+
/* we just update the hashtable key, umm, does this leak the info on the message node? */
g_hash_table_remove(ml->uid_nodemap, camel_message_info_uid(c->message));
node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), parent, myrow, (void *)c->message);
@@ -2915,12 +2915,12 @@ static void
message_list_change_first_visible_parent (MessageList *ml, ETreePath node)
{
ETreePath first_visible = NULL;
-
+
while (node && (node = e_tree_model_node_get_parent (ml->model, node))) {
if (!e_tree_node_is_expanded (ml->tree, node))
first_visible = node;
}
-
+
if (first_visible != NULL) {
e_tree_model_pre_change (ml->model);
e_tree_model_node_data_changed (ml->model, first_visible);
@@ -2939,7 +2939,7 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
#ifdef TIMEIT
struct timeval start, end;
unsigned long diff;
-
+
gettimeofday(&start, NULL);
#endif
@@ -2975,7 +2975,7 @@ build_flat_diff(MessageList *ml, CamelFolderChangeInfo *changes)
if (node) {
e_tree_model_pre_change (ml->model);
e_tree_model_node_data_changed (ml->model, node);
-
+
message_list_change_first_visible_parent (ml, node);
}
}
@@ -2999,7 +2999,7 @@ mail_folder_hide_by_flag (CamelFolder *folder, MessageList *ml, CamelFolderChang
int i;
newchanges = camel_folder_change_info_new ();
-
+
for (i = 0; i < oldchanges->uid_changed->len; i++) {
ETreePath node = g_hash_table_lookup (ml->uid_nodemap, oldchanges->uid_changed->pdata[i]);
guint32 flags;
@@ -3041,17 +3041,17 @@ main_folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
/* may be NULL if we're in the process of being destroyed */
if (ml->async_event == NULL)
return;
-
+
d(printf("folder changed event, changes = %p\n", changes));
if (changes) {
d(printf("changed = %d added = %d removed = %d\n",
changes->uid_changed->len, changes->uid_added->len, changes->uid_removed->len));
-
+
for (i = 0; i < changes->uid_removed->len; i++)
g_hash_table_remove (
ml->normalised_hash,
changes->uid_removed->pdata[i]);
-
+
/* check if the hidden state has changed, if so modify accordingly, then regenerate */
if (ml->hidejunk || ml->hidedeleted)
mail_folder_hide_by_flag (folder, ml, &changes, (ml->hidejunk ? CAMEL_MESSAGE_JUNK : 0) | (ml->hidedeleted ? CAMEL_MESSAGE_DELETED : 0));
@@ -3062,18 +3062,18 @@ main_folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
if (node) {
e_tree_model_pre_change (ml->model);
e_tree_model_node_data_changed (ml->model, node);
-
+
message_list_change_first_visible_parent (ml, node);
}
}
-
+
camel_folder_change_info_free (changes);
g_signal_emit(ml, message_list_signals[MESSAGE_LIST_BUILT], 0);
return;
}
}
-
+
mail_regen_list (ml, ml->search, NULL, changes);
}
@@ -3092,7 +3092,7 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
} else {
changes = NULL;
}
-
+
mail_async_event_emit(ml->async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)main_folder_changed, o, changes, user_data);
}
@@ -3114,12 +3114,12 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c
gboolean hide_deleted;
GConfClient *gconf;
CamelException ex;
-
+
g_return_if_fail (IS_MESSAGE_LIST (message_list));
-
+
if (message_list->folder == folder)
return;
-
+
camel_exception_init (&ex);
/* remove the cursor activate idle handler */
@@ -3127,28 +3127,28 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c
g_source_remove (message_list->idle_id);
message_list->idle_id = 0;
}
-
+
/* reset the normalised sort performance hack */
g_hash_table_remove_all (message_list->normalised_hash);
-
+
mail_regen_cancel(message_list);
-
+
if (message_list->folder != NULL) {
save_tree_state (message_list);
save_hide_state (message_list);
}
-
- e_tree_memory_freeze(E_TREE_MEMORY(etm));
+
+ e_tree_memory_freeze(E_TREE_MEMORY(etm));
clear_tree (message_list);
e_tree_memory_thaw(E_TREE_MEMORY(etm));
-
+
if (message_list->folder) {
camel_object_unhook_event((CamelObject *)message_list->folder, "folder_changed",
folder_changed, message_list);
camel_object_unref (message_list->folder);
message_list->folder = NULL;
}
-
+
if (message_list->thread_tree) {
camel_folder_thread_messages_unref(message_list->thread_tree);
message_list->thread_tree = NULL;
@@ -3158,50 +3158,50 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c
g_free(message_list->folder_uri);
message_list->folder_uri = uri ? g_strdup(uri):NULL;
}
-
+
if (message_list->cursor_uid) {
g_free(message_list->cursor_uid);
message_list->cursor_uid = NULL;
g_signal_emit(message_list, message_list_signals[MESSAGE_SELECTED], 0, NULL);
}
-
+
if (folder) {
int strikeout_col = -1;
ECell *cell;
-
+
camel_object_ref (folder);
message_list->folder = folder;
message_list->just_set_folder = TRUE;
-
+
/* Setup the strikeout effect for non-trash folders */
if (!(folder->folder_flags & CAMEL_FOLDER_IS_TRASH))
strikeout_col = COL_DELETED;
-
+
cell = e_table_extras_get_cell (message_list->extras, "render_date");
g_object_set (cell, "strikeout_column", strikeout_col, NULL);
-
+
cell = e_table_extras_get_cell (message_list->extras, "render_text");
g_object_set (cell, "strikeout_column", strikeout_col, NULL);
-
+
cell = e_table_extras_get_cell (message_list->extras, "render_size");
g_object_set (cell, "strikeout_column", strikeout_col, NULL);
- cell = e_table_extras_get_cell (message_list->extras, "render_composite_from");
+ cell = e_table_extras_get_cell (message_list->extras, "render_composite_from");
composite_cell_set_strike_col (cell, strikeout_col);
- cell = e_table_extras_get_cell (message_list->extras, "render_composite_to");
+ cell = e_table_extras_get_cell (message_list->extras, "render_composite_to");
composite_cell_set_strike_col (cell, strikeout_col);
-
+
/* Build the etree suitable for this folder */
message_list_setup_etree (message_list, outgoing);
-
+
camel_object_hook_event (folder, "folder_changed", folder_changed, message_list);
-
+
gconf = mail_config_get_gconf_client ();
hide_deleted = !gconf_client_get_bool (gconf, "/apps/evolution/mail/display/show_deleted", NULL);
message_list->hidedeleted = hide_deleted && !(folder->folder_flags & CAMEL_FOLDER_IS_TRASH);
message_list->hidejunk = junk_folder && !(folder->folder_flags & CAMEL_FOLDER_IS_JUNK) && !(folder->folder_flags & CAMEL_FOLDER_IS_TRASH);
-
+
load_hide_state (message_list);
if (message_list->frozen == 0)
mail_regen_list (message_list, message_list->search, NULL, NULL);
@@ -3221,7 +3221,7 @@ on_cursor_activated_idle (gpointer data)
} else {
g_signal_emit (message_list, message_list_signals[MESSAGE_SELECTED], 0, NULL);
}
-
+
message_list->idle_id = 0;
return FALSE;
}
@@ -3240,11 +3240,11 @@ on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_dat
if ((message_list->cursor_uid == NULL && new_uid == NULL)
|| (message_list->cursor_uid != NULL && new_uid != NULL && !strcmp (message_list->cursor_uid, new_uid)))
return;
-
+
message_list->cursor_row = row;
g_free (message_list->cursor_uid);
message_list->cursor_uid = g_strdup (new_uid);
-
+
if (!message_list->idle_id) {
message_list->idle_id =
g_idle_add_full (G_PRIORITY_LOW, on_cursor_activated_idle,
@@ -3298,7 +3298,7 @@ on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, Mess
flag = CAMEL_MESSAGE_FLAGGED;
else
return FALSE;
-
+
if (!(info = get_message_info (list, path)))
return FALSE;
@@ -3307,21 +3307,21 @@ on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, Mess
/* If a message was marked as deleted and the user flags it as
important, marks it as needing a reply, marks it as unread,
then undelete the message. */
- if (flags & CAMEL_MESSAGE_DELETED) {
+ if (flags & CAMEL_MESSAGE_DELETED) {
if (col == COL_FLAGGED && !(flags & CAMEL_MESSAGE_FLAGGED))
flag |= CAMEL_MESSAGE_DELETED;
-
+
if (col == COL_MESSAGE_STATUS && (flags & CAMEL_MESSAGE_SEEN))
flag |= CAMEL_MESSAGE_DELETED;
}
-
+
camel_folder_set_message_flags (list->folder, camel_message_info_uid (info), flag, ~flags);
-
+
if (flag == CAMEL_MESSAGE_SEEN && list->seen_id) {
g_source_remove (list->seen_id);
list->seen_id = 0;
}
-
+
return TRUE;
}
@@ -3418,18 +3418,18 @@ void message_list_free_uids(MessageList *ml, GPtrArray *uids)
}
/* set whether we are in threaded view or flat view */
-void
+void
message_list_set_threaded_expand_all (MessageList *ml)
{
if (ml->threaded) {
ml->expand_all = 1;
-
+
if (ml->frozen == 0)
mail_regen_list (ml, ml->search, NULL, NULL);
- }
+ }
}
-
-void
+
+void
message_list_set_threaded_collapse_all (MessageList *ml)
{
if (ml->threaded) {
@@ -3439,13 +3439,13 @@ message_list_set_threaded_collapse_all (MessageList *ml)
mail_regen_list (ml, ml->search, NULL, NULL);
}
}
-
+
void
message_list_set_threaded (MessageList *ml, gboolean threaded)
{
if (ml->threaded != threaded) {
ml->threaded = threaded;
-
+
if (ml->frozen == 0)
mail_regen_list (ml, ml->search, NULL, NULL);
}
@@ -3456,7 +3456,7 @@ message_list_set_expand_all (MessageList *ml, gboolean threaded)
{
if (ml->threaded != threaded) {
ml->threaded = threaded;
-
+
if (ml->frozen == 0)
mail_regen_list (ml, ml->search, NULL, NULL);
}
@@ -3467,7 +3467,7 @@ message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted)
{
if (ml->hidedeleted != hidedeleted) {
ml->hidedeleted = hidedeleted;
-
+
if (ml->frozen == 0)
mail_regen_list (ml, ml->search, NULL, NULL);
}
@@ -3479,7 +3479,7 @@ message_list_set_search (MessageList *ml, const char *search)
if (search == NULL || search[0] == '\0')
if (ml->search == NULL || ml->search[0] == '\0')
return;
-
+
if (search != NULL && ml->search != NULL && strcmp (search, ml->search) == 0)
return;
@@ -3556,14 +3556,14 @@ void
message_list_hide_add (MessageList *ml, const char *expr, unsigned int lower, unsigned int upper)
{
MESSAGE_LIST_LOCK (ml, hide_lock);
-
+
if (lower != ML_HIDE_SAME)
ml->hide_before = lower;
if (upper != ML_HIDE_SAME)
ml->hide_after = upper;
-
+
MESSAGE_LIST_UNLOCK (ml, hide_lock);
-
+
mail_regen_list (ml, ml->search, expr, NULL);
}
@@ -3582,7 +3582,7 @@ message_list_hide_uids (MessageList *ml, GPtrArray *uids)
ml->hidden = g_hash_table_new (g_str_hash, g_str_equal);
ml->hidden_pool = e_mempool_new (512, 256, E_MEMPOOL_ALIGN_BYTE);
}
-
+
uid = e_mempool_strdup (ml->hidden_pool, uids->pdata[i]);
g_hash_table_insert (ml->hidden, uid, uid);
for ( ; i < uids->len; i++) {
@@ -3666,7 +3666,7 @@ load_hide_state (MessageList *ml)
ml->hide_after = upper;
while (!feof(in)) {
char *olduid, *uid;
-
+
if (camel_file_util_decode_string (in, &olduid) != -1) {
uid = e_mempool_strdup(ml->hidden_pool, olduid);
g_free (olduid);
@@ -3694,10 +3694,10 @@ save_hide_state (MessageList *ml)
{
char *filename;
FILE *out;
-
+
if (ml->folder == NULL)
return;
-
+
MESSAGE_LIST_LOCK(ml, hide_lock);
filename = mail_config_folder_to_cachename(ml->folder, "hidestate-");
@@ -3759,7 +3759,7 @@ regen_list_regen (struct _mail_msg *mm)
GPtrArray *uids, *uidnew, *showuids, *searchuids = NULL;
CamelMessageInfo *info;
int i;
-
+
if (m->folder != m->ml->folder)
return;
@@ -3803,49 +3803,49 @@ regen_list_regen (struct _mail_msg *mm)
uids = camel_folder_get_uids (m->folder);
}
}
-
+
if (camel_exception_is_set (&mm->ex))
return;
-
+
/* perform hiding */
if (m->hideexpr && camel_folder_has_search_capability(m->folder)) {
uidnew = camel_folder_search_by_expression (m->ml->folder, m->hideexpr, &mm->ex);
/* well, lets not abort just because this faileld ... */
camel_exception_clear (&mm->ex);
-
+
if (uidnew) {
MESSAGE_LIST_LOCK(m->ml, hide_lock);
-
+
if (m->ml->hidden == NULL) {
m->ml->hidden = g_hash_table_new (g_str_hash, g_str_equal);
m->ml->hidden_pool = e_mempool_new (512, 256, E_MEMPOOL_ALIGN_BYTE);
}
-
+
for (i = 0; i < uidnew->len; i++) {
if (g_hash_table_lookup (m->ml->hidden, uidnew->pdata[i]) == NULL) {
char *uid = e_mempool_strdup (m->ml->hidden_pool, uidnew->pdata[i]);
g_hash_table_insert (m->ml->hidden, uid, uid);
}
}
-
+
MESSAGE_LIST_UNLOCK(m->ml, hide_lock);
-
+
camel_folder_search_free (m->ml->folder, uidnew);
}
}
-
+
MESSAGE_LIST_LOCK(m->ml, hide_lock);
-
+
m->ml->hide_unhidden = uids->len;
-
+
/* what semantics do we want from hide_before, hide_after?
probably <0 means measure from the end of the list */
-
+
/* perform uid hiding */
if (m->ml->hidden || m->ml->hide_before != ML_HIDE_NONE_START || m->ml->hide_after != ML_HIDE_NONE_END) {
int start, end;
uidnew = g_ptr_array_new ();
-
+
/* first, hide matches */
if (m->ml->hidden) {
for (i = 0; i < uids->len; i++) {
@@ -3853,26 +3853,26 @@ regen_list_regen (struct _mail_msg *mm)
g_ptr_array_add (uidnew, uids->pdata[i]);
}
}
-
+
/* then calculate the subrange visible and chop it out */
m->ml->hide_unhidden = uidnew->len;
-
+
if (m->ml->hide_before != ML_HIDE_NONE_START || m->ml->hide_after != ML_HIDE_NONE_END) {
GPtrArray *uid2 = g_ptr_array_new ();
-
+
start = m->ml->hide_before;
if (start < 0)
start += m->ml->hide_unhidden;
end = m->ml->hide_after;
if (end < 0)
end += m->ml->hide_unhidden;
-
+
start = MAX(start, 0);
end = MIN(end, uidnew->len);
for (i = start; i < end; i++) {
g_ptr_array_add (uid2, uidnew->pdata[i]);
}
-
+
g_ptr_array_free (uidnew, TRUE);
uidnew = uid2;
}
@@ -3881,11 +3881,11 @@ regen_list_regen (struct _mail_msg *mm)
uidnew = NULL;
showuids = uids;
}
-
+
MESSAGE_LIST_UNLOCK(m->ml, hide_lock);
e_profile_event_emit("list.threaduids", m->folder->full_name, 0);
-
+
if (!camel_operation_cancel_check(mm->cancel)) {
/* update/build a new tree */
if (m->dotree) {
@@ -3901,7 +3901,7 @@ regen_list_regen (struct _mail_msg *mm)
g_ptr_array_add(m->summary, info);
}
}
-
+
m->complete = TRUE;
}
@@ -3921,10 +3921,10 @@ regen_list_regened (struct _mail_msg *mm)
if (m->ml->priv->destroyed)
return;
-
+
if (!m->complete)
return;
-
+
if (camel_operation_cancel_check(mm->cancel))
return;
@@ -3938,20 +3938,20 @@ regen_list_regened (struct _mail_msg *mm)
m->ml->just_set_folder = FALSE;
else /* Saving the tree state causes bug 352695 but fixes bug 387312 */
save_tree_state (m->ml);
-
+
build_tree (m->ml, m->tree, m->changes);
if (m->ml->thread_tree)
camel_folder_thread_messages_unref(m->ml->thread_tree);
m->ml->thread_tree = m->tree;
m->tree = NULL;
-
+
if (m->ml->expand_all)
load_tree_expand_all (m->ml, TRUE);
else if (m->ml->collapse_all)
load_tree_expand_all (m->ml, FALSE);
else
load_tree_state (m->ml);
-
+
m->ml->expand_all = FALSE;
m->ml->collapse_all = FALSE;
} else
@@ -3988,15 +3988,15 @@ regen_list_free (struct _mail_msg *mm)
camel_folder_free_message_info (m->folder, m->summary->pdata[i]);
g_ptr_array_free (m->summary, TRUE);
}
-
+
if (m->tree)
camel_folder_thread_messages_unref (m->tree);
-
+
g_free (m->search);
g_free (m->hideexpr);
-
+
camel_object_unref (m->folder);
-
+
if (m->changes)
camel_folder_change_info_free (m->changes);
@@ -4034,10 +4034,10 @@ mail_regen_cancel(MessageList *ml)
/* cancel any outstanding regeneration requests, not we don't clear, they clear themselves */
if (ml->regen) {
GList *l = ml->regen;
-
+
while (l) {
struct _mail_msg *mm = l->data;
-
+
if (mm->cancel)
camel_operation_cancel(mm->cancel);
l = l->next;
@@ -4070,10 +4070,10 @@ mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, Came
mail_regen_cancel(ml);
gconf = mail_config_get_gconf_client ();
-
+
#ifndef BROKEN_ETREE
/* this can sometimes crash,so ... */
-
+
/* see if we need to goto the child thread at all anyway */
/* currently the only case is the flat view with updates and no search */
if (hideexpr == NULL && search == NULL && changes != NULL && !ml->threaded) {
diff --git a/mail/message-list.h b/mail/message-list.h
index b5d577be0f..21cd784c00 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -60,14 +60,14 @@ enum {
COL_RECIPIENTS,
COL_MIXED_SENDER,
COL_MIXED_RECIPIENTS,
-
+
/* normalised strings */
COL_FROM_NORM,
COL_SUBJECT_NORM,
COL_TO_NORM,
-
+
COL_LAST,
-
+
/* Invisible columns */
COL_DELETED,
COL_UNREAD,
@@ -100,34 +100,34 @@ struct _MessageList {
char *folder_uri;
GHashTable *uid_nodemap; /* uid (from info) -> tree node mapping */
-
+
GHashTable *normalised_hash;
-
+
/* UID's to hide. Keys in the mempool */
/* IMPORTANT: You MUST have obtained the hide lock, to operate on this data */
GHashTable *hidden;
struct _EMemPool *hidden_pool;
int hide_unhidden; /* total length, before hiding */
int hide_before, hide_after; /* hide ranges of messages */
-
+
/* Current search string, or %NULL */
char *search;
-
+
/* are we regenerating the message_list because set_folder was just called? */
guint just_set_folder : 1;
-
+
/* Are we displaying threaded view? */
guint threaded : 1;
guint expand_all :1;
guint collapse_all :1;
-
+
/* do we automatically hide deleted messages? */
guint hidedeleted : 1;
/* do we automatically hide junk messages? */
guint hidejunk : 1;
-
+
/* frozen count */
guint frozen:16;
diff --git a/mail/message-tag-editor.c b/mail/message-tag-editor.c
index 3e45a41b73..d398b7b8d2 100644
--- a/mail/message-tag-editor.c
+++ b/mail/message-tag-editor.c
@@ -42,7 +42,7 @@ GType
message_tag_editor_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (MessageTagEditorClass),
@@ -55,10 +55,10 @@ message_tag_editor_get_type (void)
0,
(GInstanceInitFunc) message_tag_editor_init,
};
-
+
type = g_type_register_static (gtk_dialog_get_type (), "MessageTagEditor", &info, 0);
}
-
+
return type;
}
@@ -66,11 +66,11 @@ static void
message_tag_editor_class_init (MessageTagEditorClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+
parent_class = g_type_class_ref (gtk_dialog_get_type ());
-
+
object_class->finalize = message_tag_editor_finalise;
-
+
klass->get_tag_list = get_tag_list;
klass->set_tag_list = set_tag_list;
}
@@ -83,7 +83,7 @@ message_tag_editor_init (MessageTagEditor *editor)
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
-
+
gtk_dialog_set_default_response (GTK_DIALOG (editor), GTK_RESPONSE_OK);
}
@@ -92,7 +92,7 @@ static void
message_tag_editor_finalise (GObject *obj)
{
/*MessageTagEditor *editor = (MessageTagEditor *) obj;*/
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -106,7 +106,7 @@ CamelTag *
message_tag_editor_get_tag_list (MessageTagEditor *editor)
{
g_return_val_if_fail (IS_MESSAGE_TAG_EDITOR (editor), NULL);
-
+
return MESSAGE_TAG_EDITOR_GET_CLASS (editor)->get_tag_list (editor);
}
@@ -123,6 +123,6 @@ message_tag_editor_set_tag_list (MessageTagEditor *editor, CamelTag *tags)
{
g_return_if_fail (IS_MESSAGE_TAG_EDITOR (editor));
g_return_if_fail (tags != NULL);
-
+
MESSAGE_TAG_EDITOR_GET_CLASS (editor)->set_tag_list (editor, tags);
}
diff --git a/mail/message-tag-editor.h b/mail/message-tag-editor.h
index 3a7e850f34..cc96b648a7 100644
--- a/mail/message-tag-editor.h
+++ b/mail/message-tag-editor.h
@@ -46,16 +46,16 @@ typedef struct _MessageTagEditorClass MessageTagEditorClass;
struct _MessageTagEditor {
GtkDialog parent;
-
+
};
struct _MessageTagEditorClass {
GtkDialogClass parent_class;
-
+
/* virtual methods */
CamelTag * (*get_tag_list) (MessageTagEditor *editor);
void (*set_tag_list) (MessageTagEditor *editor, CamelTag *tags);
-
+
/* signals */
};
diff --git a/mail/message-tag-followup.c b/mail/message-tag-followup.c
index ed1d4516c5..668c7b9637 100644
--- a/mail/message-tag-followup.c
+++ b/mail/message-tag-followup.c
@@ -94,7 +94,7 @@ GType
message_tag_followup_get_type (void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof (MessageTagFollowUpClass),
@@ -107,10 +107,10 @@ message_tag_followup_get_type (void)
0,
(GInstanceInitFunc) message_tag_followup_init,
};
-
+
type = g_type_register_static (message_tag_editor_get_type (), "MessageTagFollowUp", &info, 0);
}
-
+
return type;
}
@@ -119,11 +119,11 @@ message_tag_followup_class_init (MessageTagFollowUpClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
MessageTagEditorClass *editor_class = (MessageTagEditorClass *) klass;
-
+
parent_class = g_type_class_ref (message_tag_editor_get_type ());
-
+
object_class->finalize = message_tag_followup_finalise;
-
+
editor_class->get_tag_list = get_tag_list;
editor_class->set_tag_list = set_tag_list;
}
@@ -143,9 +143,9 @@ static void
message_tag_followup_finalise (GObject *obj)
{
MessageTagFollowUp *editor = (MessageTagFollowUp *) obj;
-
+
editor->completed_date = 0;
-
+
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -157,9 +157,9 @@ get_tag_list (MessageTagEditor *editor)
CamelTag *tags = NULL;
time_t date;
char *text;
-
+
camel_tag_set (&tags, "follow-up", gtk_entry_get_text (GTK_ENTRY (followup->combo->entry)));
-
+
date = e_date_edit_get_time (followup->target_date);
if (date != (time_t) -1) {
text = camel_header_format_date (date, 0);
@@ -168,7 +168,7 @@ get_tag_list (MessageTagEditor *editor)
} else {
camel_tag_set (&tags, "due-by", "");
}
-
+
if (gtk_toggle_button_get_active (followup->completed)) {
text = camel_header_format_date (followup->completed_date, 0);
camel_tag_set (&tags, "completed-on", text);
@@ -176,7 +176,7 @@ get_tag_list (MessageTagEditor *editor)
} else {
camel_tag_set (&tags, "completed-on", "");
}
-
+
return tags;
}
@@ -186,11 +186,11 @@ set_tag_list (MessageTagEditor *editor, CamelTag *tags)
MessageTagFollowUp *followup = (MessageTagFollowUp *) editor;
const char *text;
time_t date;
-
+
text = camel_tag_get (&tags, "follow-up");
if (text)
gtk_entry_set_text (GTK_ENTRY (followup->combo->entry), text);
-
+
text = camel_tag_get (&tags, "due-by");
if (text && *text) {
date = camel_header_decode_date (text, NULL);
@@ -198,7 +198,7 @@ set_tag_list (MessageTagEditor *editor, CamelTag *tags)
} else {
e_date_edit_set_time (followup->target_date, (time_t) -1);
}
-
+
text = camel_tag_get (&tags, "completed-on");
if (text && *text) {
date = camel_header_decode_date (text, NULL);
@@ -213,9 +213,9 @@ static void
clear_clicked (GtkButton *button, gpointer user_data)
{
MessageTagFollowUp *followup = user_data;
-
+
gtk_list_select_item (GTK_LIST (followup->combo->list), DEFAULT_FLAG);
-
+
e_date_edit_set_time (followup->target_date, (time_t) -1);
gtk_toggle_button_set_active (followup->completed, FALSE);
}
@@ -224,7 +224,7 @@ static void
completed_toggled (GtkToggleButton *button, gpointer user_data)
{
MessageTagFollowUp *followup = user_data;
-
+
if (gtk_toggle_button_get_active (followup->completed))
followup->completed_date = time (NULL);
else
@@ -235,7 +235,7 @@ static int
get_week_start_day (void)
{
GConfClient *gconf;
-
+
gconf = mail_config_get_gconf_client ();
return gconf_client_get_int (gconf, "/apps/evolution/calendar/display/week_start_day", NULL);
}
@@ -245,7 +245,7 @@ locale_supports_12_hour_format (void)
{
char s[16];
time_t t = 0;
-
+
strftime(s, sizeof s, "%p", gmtime (&t));
return s[0] != '\0';
}
@@ -259,24 +259,24 @@ target_date_new (const char *s1, const char *s2, int i1, int i2)
GConfClient *gconf;
GtkWidget *widget;
int start;
-
+
widget = e_date_edit_new ();
e_date_edit_set_show_date (E_DATE_EDIT (widget), TRUE);
e_date_edit_set_show_time (E_DATE_EDIT (widget), TRUE);
-
+
/* Note that this is 0 (Sun) to 6 (Sat), conver to 0 (mon) to 6 (sun) */
start = (get_week_start_day () + 6) % 7;
-
+
if (locale_supports_12_hour_format ()) {
gconf = mail_config_get_gconf_client ();
time_24hour = gconf_client_get_bool (gconf, "/apps/evolution/calendar/display/use_24hour_format", NULL);
}
-
+
e_date_edit_set_week_start_day (E_DATE_EDIT (widget), start);
e_date_edit_set_use_24_hour_format (E_DATE_EDIT (widget), time_24hour);
e_date_edit_set_allow_no_date_set (E_DATE_EDIT (widget), TRUE);
e_date_edit_set_time_popup_range (E_DATE_EDIT (widget), 0, 24);
-
+
return widget;
}
@@ -293,9 +293,9 @@ construct (MessageTagEditor *editor)
GdkPixbuf *pixbuf;
int i;
char *gladefile;
-
+
gtk_window_set_title (GTK_WINDOW (editor), _("Flag to Follow Up"));
-
+
icon_list = e_icon_factory_get_icon_list ("stock_mail-flag-for-followup");
if (icon_list) {
gtk_window_set_icon_list (GTK_WINDOW (editor), icon_list);
@@ -312,30 +312,30 @@ construct (MessageTagEditor *editor)
NULL);
gui = glade_xml_new (gladefile, "followup_editor", NULL);
g_free (gladefile);
-
+
widget = glade_xml_get_widget (gui, "toplevel");
-
+
/* reparent */
gtk_widget_reparent (widget, GTK_DIALOG (editor)->vbox);
gtk_box_set_child_packing (GTK_BOX (GTK_DIALOG (editor)->vbox), widget, TRUE, TRUE, 6, GTK_PACK_START);
-
+
widget = glade_xml_get_widget (gui, "pixmap");
pixbuf = e_icon_factory_get_icon ("stock_mail-flag-for-followup", E_ICON_SIZE_DIALOG);
gtk_image_set_from_pixbuf ((GtkImage *)widget, pixbuf);
g_object_unref (pixbuf);
-
+
followup->message_list = GTK_TREE_VIEW (glade_xml_get_widget (gui, "message_list"));
model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
gtk_tree_view_set_model (followup->message_list, (GtkTreeModel *) model);
-
+
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes (followup->message_list, -1, _("From"),
renderer, "text", 0, NULL);
-
+
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_insert_column_with_attributes (followup->message_list, -1, _("Subject"),
renderer, "text", 1, NULL);
-
+
followup->combo = GTK_COMBO (glade_xml_get_widget (gui, "combo"));
gtk_combo_set_case_sensitive (followup->combo, FALSE);
strings = NULL;
@@ -344,18 +344,18 @@ construct (MessageTagEditor *editor)
gtk_combo_set_popdown_strings (followup->combo, strings);
g_list_free (strings);
gtk_list_select_item (GTK_LIST (followup->combo->list), DEFAULT_FLAG);
-
+
followup->target_date = E_DATE_EDIT (glade_xml_get_widget (gui, "target_date"));
/* glade bug, need to show this ourselves */
gtk_widget_show ((GtkWidget *) followup->target_date);
e_date_edit_set_time (followup->target_date, (time_t) -1);
-
+
followup->completed = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "completed"));
g_signal_connect (followup->completed, "toggled", G_CALLBACK (completed_toggled), followup);
-
+
followup->clear = GTK_BUTTON (glade_xml_get_widget (gui, "clear"));
g_signal_connect (followup->clear, "clicked", G_CALLBACK (clear_clicked), followup);
-
+
g_object_unref (gui);
}
@@ -363,10 +363,10 @@ MessageTagEditor *
message_tag_followup_new (void)
{
MessageTagEditor *editor;
-
+
editor = (MessageTagEditor *) g_object_new (message_tag_followup_get_type (), NULL);
construct (editor);
-
+
return editor;
}
@@ -375,11 +375,11 @@ message_tag_followup_append_message (MessageTagFollowUp *editor, const char *fro
{
GtkTreeIter iter;
GtkListStore *model;
-
+
g_return_if_fail (IS_MESSAGE_TAG_FOLLOWUP (editor));
-
+
model = (GtkListStore *) gtk_tree_view_get_model (editor->message_list);
-
+
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter, 0, from, 1, subject, -1);
}
diff --git a/mail/message-tag-followup.h b/mail/message-tag-followup.h
index b870406260..a31dbd5df0 100644
--- a/mail/message-tag-followup.h
+++ b/mail/message-tag-followup.h
@@ -43,21 +43,21 @@ typedef struct _MessageTagFollowUpClass MessageTagFollowUpClass;
struct _MessageTagFollowUp {
MessageTagEditor parent;
-
+
struct _GtkTreeView *message_list;
-
+
struct _GtkCombo *combo;
-
+
struct _EDateEdit *target_date;
struct _GtkToggleButton *completed;
struct _GtkButton *clear;
-
+
time_t completed_date;
};
struct _MessageTagFollowUpClass {
MessageTagEditorClass parent_class;
-
+
/* virtual methods */
/* signals */
};
diff --git a/plugins/addressbook-file/addressbook-file.c b/plugins/addressbook-file/addressbook-file.c
index 4c2000ed46..6e251b3572 100644
--- a/plugins/addressbook-file/addressbook-file.c
+++ b/plugins/addressbook-file/addressbook-file.c
@@ -37,18 +37,18 @@ e_book_file_dummy (EPlugin *epl, EConfigHookItemFactoryData *data)
uri_text = e_source_get_uri (source);
if (strncmp (uri_text, "file", 4)) {
g_free (uri_text);
-
+
return NULL;
}
-
+
relative_uri = e_source_peek_relative_uri (source);
g_free (uri_text);
-
-
- if (relative_uri && *relative_uri) {
+
+
+ if (relative_uri && *relative_uri) {
return NULL;
}
-
+
e_source_set_relative_uri (source, e_source_peek_uid (source));
return NULL;
diff --git a/plugins/attachment-reminder/attachment-reminder.c b/plugins/attachment-reminder/attachment-reminder.c
index 8cec986cd5..a25dfb3b73 100644
--- a/plugins/attachment-reminder/attachment-reminder.c
+++ b/plugins/attachment-reminder/attachment-reminder.c
@@ -226,7 +226,7 @@ clue_check_isempty (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, U
GtkTreeSelection *selection;
char *keyword;
gboolean valid;
-
+
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ui->treeview));
/* move to the previous node */
valid = gtk_tree_path_prev(path);
@@ -308,7 +308,7 @@ clue_add_clicked (GtkButton *button, UIData *ui)
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
CLUE_KEYWORD_COLUMN, new_clue, -1);
- focus_col = gtk_tree_view_get_column (GTK_TREE_VIEW (ui->treeview), CLUE_KEYWORD_COLUMN);
+ focus_col = gtk_tree_view_get_column (GTK_TREE_VIEW (ui->treeview), CLUE_KEYWORD_COLUMN);
path = gtk_tree_model_get_path (model, &iter);
if (path) {
@@ -340,7 +340,7 @@ clue_remove_clicked (GtkButton *button, UIData *ui)
path = gtk_tree_model_get_path (model, &iter);
if (path)
valid = gtk_tree_path_prev(path);
-
+
gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
len = gtk_tree_model_iter_n_children (model, NULL);
@@ -377,7 +377,7 @@ clue_edit_clicked (GtkButton *button, UIData *ui)
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
return;
- focus_col = gtk_tree_view_get_column (GTK_TREE_VIEW (ui->treeview), CLUE_KEYWORD_COLUMN);
+ focus_col = gtk_tree_view_get_column (GTK_TREE_VIEW (ui->treeview), CLUE_KEYWORD_COLUMN);
path = gtk_tree_model_get_path (model, &iter);
if (path) {
@@ -413,7 +413,7 @@ selection_changed (GtkTreeSelection *selection, UIData *ui)
}
}
-void
+void
e_plugin_lib_configure (EPlugin *epl)
{
GtkWidget *dialog;
@@ -444,7 +444,7 @@ e_plugin_lib_configure (EPlugin *epl)
if (store == NULL)
store = gtk_list_store_new (CLUE_N_COLUMNS, G_TYPE_STRING);
- else
+ else
gtk_list_store_clear (store);
gtk_tree_view_set_model (GTK_TREE_VIEW (ui->treeview), GTK_TREE_MODEL (store));
diff --git a/plugins/audio-inline/audio-inline.c b/plugins/audio-inline/audio-inline.c
index 87d40d381d..6394eb986a 100644
--- a/plugins/audio-inline/audio-inline.c
+++ b/plugins/audio-inline/audio-inline.c
@@ -1,4 +1,4 @@
-/*
+/*
Copyright (C) 2004 Novell, Inc.
Author: Radek Doulik
@@ -26,7 +26,7 @@
#include "gtkhtml/gtkhtml-embedded.h"
#include "gst/gst.h"
-#define d(x)
+#define d(x)
void org_gnome_audio_inline_format (void *ep, EMFormatHookTarget *t);
@@ -159,11 +159,11 @@ org_gnome_audio_inline_gst_callback (GstBus * bus, GstMessage * message, gpointe
if (old_state == new_state)
break;
- if (po->play_button)
+ if (po->play_button)
gtk_widget_set_sensitive (po->play_button, new_state <= GST_STATE_PAUSED);
- if (po->pause_button)
+ if (po->pause_button)
gtk_widget_set_sensitive (po->pause_button, new_state > GST_STATE_PAUSED);
- if (po->stop_button)
+ if (po->stop_button)
gtk_widget_set_sensitive (po->stop_button, new_state >= GST_STATE_PAUSED);
}
@@ -270,7 +270,7 @@ org_gnome_audio_inline_button_panel (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMF
po->play_button = g_object_ref (org_gnome_audio_inline_add_button (box, GTK_STOCK_MEDIA_PLAY, G_CALLBACK (org_gnome_audio_inline_play_clicked), po, TRUE));
po->pause_button = g_object_ref (org_gnome_audio_inline_add_button (box, GTK_STOCK_MEDIA_PAUSE, G_CALLBACK (org_gnome_audio_inline_pause_clicked), po, FALSE));
po->stop_button = g_object_ref (org_gnome_audio_inline_add_button (box, GTK_STOCK_MEDIA_STOP, G_CALLBACK (org_gnome_audio_inline_stop_clicked), po, FALSE));
-
+
gtk_widget_show (box);
gtk_container_add ((GtkContainer *) eb, box);
diff --git a/plugins/backup-restore/backup-restore.c b/plugins/backup-restore/backup-restore.c
index d2d4f3aae4..f5b608bb7a 100644
--- a/plugins/backup-restore/backup-restore.c
+++ b/plugins/backup-restore/backup-restore.c
@@ -51,7 +51,7 @@ sanity_check (const char *filename)
g_free (command);
g_message ("Sanity check result %d:%d %d", WIFEXITED (result), WEXITSTATUS (result), result);
-
+
return WIFEXITED (result) && (WEXITSTATUS (result) == 0);
}
@@ -73,7 +73,7 @@ dialog_prompt_user(GtkWindow *parent, const char *string, const char *tag, const
gtk_container_set_border_width((GtkContainer *)check, 12);
gtk_box_pack_start ((GtkBox *)((GtkDialog *) mbox)->vbox, check, TRUE, TRUE, 0);
gtk_widget_show (check);
-
+
button = gtk_dialog_run ((GtkDialog *) mbox);
if (button == GTK_RESPONSE_YES)
@@ -82,7 +82,7 @@ dialog_prompt_user(GtkWindow *parent, const char *string, const char *tag, const
mask |= BR_START;
gtk_widget_destroy(mbox);
-
+
return mask;
}
@@ -94,17 +94,17 @@ org_gnome_backup_restore_backup (EPlugin *ep, ESMenuTargetShell *target)
int response;
dlg = e_file_get_save_filesel(target->target.widget, _("Select name of the Evolution backup file"), NULL, GTK_FILE_CHOOSER_ACTION_SAVE);
-
+
/* dlg = gtk_file_chooser_dialog_new (_("Select name of the Evolution backup file"), GTK_WINDOW (target->target.widget), */
/* GTK_FILE_CHOOSER_ACTION_SAVE, */
/* GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, */
/* GTK_STOCK_SAVE, GTK_RESPONSE_OK, NULL); */
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dlg), "evolution-backup.tar.gz");
-
+
vbox = gtk_vbox_new (FALSE, 6);
gtk_widget_show (vbox);
-
+
response = gtk_dialog_run (GTK_DIALOG (dlg));
if (response == GTK_RESPONSE_OK) {
char *filename;
@@ -113,19 +113,19 @@ org_gnome_backup_restore_backup (EPlugin *ep, ESMenuTargetShell *target)
uri = gtk_file_chooser_get_current_folder_uri(GTK_FILE_CHOOSER (dlg));
e_file_update_save_path(uri, TRUE);
-
+
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dlg));
gtk_widget_destroy (dlg);
-
+
mask = dialog_prompt_user (GTK_WINDOW (target->target.widget), _("_Restart Evolution after backup"), "org.gnome.backup-restore:backup-confirm", NULL);
- if (mask & BR_OK)
+ if (mask & BR_OK)
backup (filename, (mask & BR_START) ? TRUE: FALSE);
g_free (filename);
return;
}
-
+
gtk_widget_destroy (dlg);
}
@@ -137,15 +137,15 @@ org_gnome_backup_restore_restore (EPlugin *ep, ESMenuTargetShell *target)
int response;
dlg = e_file_get_save_filesel(target->target.widget, _("Select name of the Evolution backup file to restore"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN);
-
+
/* dlg = gtk_file_chooser_dialog_new (_("Select Evolution backup file to restore"), GTK_WINDOW (target->target.widget), */
/* GTK_FILE_CHOOSER_ACTION_OPEN, */
/* GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, */
/* GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL); */
-
+
vbox = gtk_vbox_new (FALSE, 6);
gtk_widget_show (vbox);
-
+
response = gtk_dialog_run (GTK_DIALOG (dlg));
if (response == GTK_RESPONSE_OK) {
char *filename;
@@ -153,30 +153,30 @@ org_gnome_backup_restore_restore (EPlugin *ep, ESMenuTargetShell *target)
uri = gtk_file_chooser_get_current_folder_uri(GTK_FILE_CHOOSER (dlg));
e_file_update_save_path(uri, TRUE);
-
+
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dlg));
gtk_widget_destroy (dlg);
-
+
if (sanity_check (filename)) {
guint32 mask;
-
+
mask = dialog_prompt_user (GTK_WINDOW (target->target.widget), _("_Restart Evolution after restore"), "org.gnome.backup-restore:restore-confirm", NULL);
- if (mask & BR_OK)
+ if (mask & BR_OK)
restore (filename, mask & BR_START);
} else {
e_error_run (GTK_WINDOW (target->target.widget), "org.gnome.backup-restore:invalid-backup", NULL);
}
-
+
g_free (filename);
return;
}
-
+
gtk_widget_destroy (dlg);
}
static void
-check_toggled (GtkToggleButton *button, GnomeDruid *druid)
+check_toggled (GtkToggleButton *button, GnomeDruid *druid)
{
GtkWidget *box = g_object_get_data ((GObject *)button, "box");
gboolean state = gtk_toggle_button_get_active ((GtkToggleButton *)button);
@@ -184,17 +184,17 @@ check_toggled (GtkToggleButton *button, GnomeDruid *druid)
gtk_widget_set_sensitive (box, state);
gnome_druid_set_show_finish (druid, state);
- if (state && !prevfile)
+ if (state && !prevfile)
gnome_druid_set_buttons_sensitive (druid, TRUE, FALSE, TRUE, TRUE);
else
gnome_druid_set_buttons_sensitive (druid, TRUE, TRUE, TRUE, TRUE);
g_object_set_data ((GObject *)druid, "restore", GINT_TO_POINTER (state?1:0));
-
+
}
static void
-restore_wizard (GnomeDruidPage *druidpage, GnomeDruid *druid, gpointer user_data)
+restore_wizard (GnomeDruidPage *druidpage, GnomeDruid *druid, gpointer user_data)
{
gboolean state = GPOINTER_TO_INT(g_object_get_data((GObject *)druid, "restore")) ? TRUE:FALSE;
char *file = g_object_get_data ((GObject *)druid, "restore-file");
@@ -204,7 +204,7 @@ restore_wizard (GnomeDruidPage *druidpage, GnomeDruid *druid, gpointer user_data
e_error_run ((GtkWindow *)druid, "org.gnome.backup-restore:invalid-backup", NULL);
} else
restore (file, TRUE);
-
+
}
}
@@ -216,14 +216,14 @@ file_changed (GtkFileChooser *chooser, GnomeDruid *druid)
uri = gtk_file_chooser_get_current_folder_uri(GTK_FILE_CHOOSER (chooser));
e_file_update_save_path(uri, TRUE);
-
+
file = gtk_file_chooser_get_filename (chooser);
prevfile = g_object_get_data ((GObject *)druid, "restore-file");
g_object_set_data ((GObject *)druid, "restore-file", file);
g_free (prevfile);
if (file) {
gnome_druid_set_buttons_sensitive (druid, TRUE, TRUE, TRUE, TRUE);
- } else
+ } else
gnome_druid_set_buttons_sensitive (druid, TRUE, FALSE, TRUE, TRUE);
}
@@ -232,14 +232,14 @@ backup_restore_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
{
GtkWidget *page;
GtkWidget *box, *hbox, *label, *cbox, *button;
-
+
page = gnome_druid_page_standard_new_with_vals (_("Restore from backup"), NULL, NULL);
hbox = gtk_hbox_new (FALSE, 6);
label = gtk_label_new (_("You can restore Evolution from your backup. It can restore all the Mails, Calendars, Tasks, Memos, Contacts. \nIt also restores all your personal settings, mail filters etc."));
gtk_box_pack_start ((GtkBox *)hbox, label, FALSE, FALSE, 6);
box = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start ((GtkBox *)box, hbox, FALSE, FALSE, 0);
-
+
hbox = gtk_hbox_new (FALSE, 6);
cbox = gtk_check_button_new_with_mnemonic (_("_Restore Evolution from the backup file"));
g_signal_connect (cbox, "toggled", G_CALLBACK (check_toggled), hook_data->parent);
diff --git a/plugins/backup-restore/backup.c b/plugins/backup-restore/backup.c
index 90d389e239..ec3e0b16be 100644
--- a/plugins/backup-restore/backup.c
+++ b/plugins/backup-restore/backup.c
@@ -59,7 +59,7 @@ static const GOptionEntry options[] = {
#define CANCEL(x) if (x) return;
static void
-backup (const char *filename)
+backup (const char *filename)
{
char *command;
@@ -91,17 +91,17 @@ backup (const char *filename)
CANCEL (complete);
txt = _("Restarting Evolution");
complete=TRUE;
-
+
s (EVOLUTION);
}
}
static void
-restore (const char *filename)
+restore (const char *filename)
{
char *command;
-
+
/* FIXME Will the versioned setting always work? */
CANCEL (complete);
txt = _("Shutting down Evolution");
@@ -127,7 +127,7 @@ restore (const char *filename)
s ("rm -rf " GCONF_DUMP_PATH);
s ("rm -rf " EVOLUTION_DIR_BACKUP);
s ("rm -rf ~/.camel_certs_old");
-
+
if (restart_arg) {
CANCEL (complete);
txt = _("Restarting Evolution");
@@ -138,14 +138,14 @@ restore (const char *filename)
}
static void
-check (const char *filename)
+check (const char *filename)
{
char *command;
command = g_strdup_printf ("tar ztf %s | grep -e \"^\\.evolution/$\"", filename);
result = system (command);
g_free (command);
-
+
g_message ("First result %d", result);
if (result)
exit (result);
@@ -158,7 +158,7 @@ check (const char *filename)
}
-static gboolean
+static gboolean
pbar_update()
{
if (!complete) {
@@ -171,7 +171,7 @@ pbar_update()
return FALSE;
}
-static gpointer
+static gpointer
thread_start (gpointer data)
{
if (backup_op)
@@ -182,11 +182,11 @@ thread_start (gpointer data)
check (chk_file);
complete = TRUE;
-
+
return GINT_TO_POINTER(result);
}
-static gboolean
+static gboolean
idle_cb(gpointer data)
{
GThread *t;
@@ -207,11 +207,11 @@ dlg_response (GtkWidget *dlg, gint response, gpointer data)
{
/* We will cancel only backup/restore operations and not the check operation */
complete = TRUE;
-
+
/* If the response is not of delete_event then destroy the event */
if (response != GTK_RESPONSE_NONE)
gtk_widget_destroy (dlg);
-
+
/* We will kill just the tar operation. Rest of the them will be just a second of microseconds.*/
s ("pkill tar");
@@ -233,7 +233,7 @@ main (int argc, char **argv)
context = g_option_context_new (NULL);
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
- program = gnome_program_init (PACKAGE, VERSION, LIBGNOME_MODULE, argc, argv,
+ program = gnome_program_init (PACKAGE, VERSION, LIBGNOME_MODULE, argc, argv,
GNOME_PROGRAM_STANDARD_PROPERTIES,
GNOME_PARAM_GOPTION_CONTEXT, context,
GNOME_PARAM_NONE);
@@ -267,9 +267,9 @@ main (int argc, char **argv)
GTK_STOCK_CANCEL,
GTK_RESPONSE_REJECT,
NULL);
- if (oper && file)
+ if (oper && file)
str = g_strdup_printf(oper, file);
-
+
vbox = gtk_vbox_new (FALSE, 6);
if (str) {
hbox = gtk_hbox_new (FALSE, 12);
@@ -285,7 +285,7 @@ main (int argc, char **argv)
gtk_box_pack_start ((GtkBox *)vbox, hbox, FALSE, FALSE, 0);
-
+
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(progress_dialog)->vbox), vbox);
gtk_window_set_default_size ((GtkWindow *) progress_dialog,450, 120);
g_signal_connect (progress_dialog, "response", G_CALLBACK(dlg_response), NULL);
@@ -298,6 +298,6 @@ main (int argc, char **argv)
g_idle_add (idle_cb, NULL);
gtk_main ();
-
+
return result;
}
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index dfbced826e..9155bcb93b 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -17,10 +17,10 @@
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -231,7 +231,7 @@ bbdb_do_it (EBook *book, const char *name, const char *email)
g_object_unref ((GObject *)l->data);
g_list_free (contacts);
g_free (temp_name);
-
+
return;
}
@@ -246,7 +246,7 @@ bbdb_do_it (EBook *book, const char *name, const char *email)
temp_name = g_string_free (tmp, FALSE);
name = temp_name;
}
-
+
/* If a contact exists with this name, add the email address to it. */
query_string = g_strdup_printf ("(is \"full_name\" \"%s\")", name);
query = e_book_query_from_string (query_string);
@@ -267,21 +267,21 @@ bbdb_do_it (EBook *book, const char *name, const char *email)
g_free (temp_name);
return;
}
-
+
contact = (EContact *) contacts->data;
add_email_to_contact (contact, email);
if (! e_book_commit_contact (book, contact, &error)) {
g_warning ("bbdb: Could not modify contact: %s\n", error->message);
g_error_free (error);
}
-
+
for (l = contacts; l != NULL; l = l->next)
g_object_unref ((GObject *)l->data);
g_list_free (contacts);
g_free (temp_name);
return;
- }
+ }
/* Otherwise, create a new contact. */
contact = e_contact_new ();
@@ -307,7 +307,7 @@ bbdb_open_addressbook (int type)
gboolean status;
GError *error = NULL;
-
+
gconf = gconf_client_get_default ();
/* Open the appropriate addresbook. */
@@ -379,7 +379,7 @@ enable_toggled_cb (GtkWidget *widget, gpointer data)
/* Save the new setting to gconf */
gconf_client_set_bool (stuff->target->gconf, GCONF_KEY_ENABLE, active, NULL);
-
+
gtk_widget_set_sensitive (stuff->option_menu, active);
if (active && !gconf_client_get_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK, NULL)) {
const gchar *uri = NULL;
@@ -413,7 +413,7 @@ enable_gaim_toggled_cb (GtkWidget *widget, gpointer data)
/* Save the new setting to gconf */
gconf_client_set_bool (stuff->target->gconf, GCONF_KEY_ENABLE_GAIM, active, NULL);
-
+
gtk_widget_set_sensitive (stuff->gaim_option_menu, active);
if (active && !gconf_client_get_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, NULL)) {
selected_source = e_source_combo_box_get_active (
@@ -544,7 +544,7 @@ bbdb_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
g_free (str);
GTK_MISC (frame_label)->xalign = 0.0;
gtk_box_pack_start (GTK_BOX (frame), frame_label, FALSE, FALSE, 0);
-
+
/* Indent/padding */
hbox = gtk_hbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (frame), hbox, FALSE, TRUE, 0);
@@ -552,7 +552,7 @@ bbdb_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
gtk_box_pack_start (GTK_BOX (hbox), padding_label, FALSE, FALSE, 0);
inner_vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), inner_vbox, FALSE, FALSE, 0);
-
+
/* Enable BBDB checkbox */
check = gtk_check_button_new_with_mnemonic (_("_Automatically create entries in the addressbook when responding to messages"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), gconf_client_get_bool (target->gconf, GCONF_KEY_ENABLE, NULL));
@@ -595,7 +595,7 @@ bbdb_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
g_signal_connect (GTK_TOGGLE_BUTTON (check_gaim), "toggled", G_CALLBACK (enable_gaim_toggled_cb), stuff);
gtk_box_pack_start (GTK_BOX (inner_vbox), check_gaim, FALSE, FALSE, 0);
stuff->check_gaim = check_gaim;
-
+
gaim_label = gtk_label_new (_("Select Address book for Pidgin buddy list"));
gtk_box_pack_start (GTK_BOX (inner_vbox), gaim_label, FALSE, FALSE, 0);
@@ -610,7 +610,7 @@ bbdb_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
button = gtk_button_new_with_mnemonic (_("Synchronize with _buddy list now"));
g_signal_connect (GTK_BUTTON (button), "clicked", G_CALLBACK (synchronize_button_clicked_cb), stuff);
gtk_box_pack_start (GTK_BOX (inner_vbox), button, FALSE, FALSE, 0);
-
+
/* Clean up */
g_signal_connect (page, "destroy", G_CALLBACK (cleanup_cb), stuff);
diff --git a/plugins/bbdb/bbdb.h b/plugins/bbdb/bbdb.h
index d1318b7d03..f4a3bc51ff 100644
--- a/plugins/bbdb/bbdb.h
+++ b/plugins/bbdb/bbdb.h
@@ -13,7 +13,7 @@
/* How often to poll the buddy list for changes (every two minutes) */
-#define BBDB_BLIST_CHECK_INTERVAL (2 * 60 * 1000)
+#define BBDB_BLIST_CHECK_INTERVAL (2 * 60 * 1000)
/* bbdb.c */
EBook *bbdb_open_addressbook (int type);
diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c
index 6c91b06be4..e9d69a5cbe 100644
--- a/plugins/bbdb/gaimbuddies.c
+++ b/plugins/bbdb/gaimbuddies.c
@@ -19,10 +19,10 @@
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -32,7 +32,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-
+
#include <glib.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
@@ -84,7 +84,7 @@ bbdb_sync_buddy_list_check (void)
char *last_sync_str;
gconf = gconf_client_get_default ();
-
+
blist_path = g_build_path ("/", getenv ("HOME"), ".purple/blist.xml", NULL);
if (stat (blist_path, &statbuf) < 0) {
g_free (blist_path);
@@ -173,14 +173,14 @@ bbdb_sync_buddy_list (void)
g_object_unref (G_OBJECT (c));
continue;
}
-
+
if (! e_book_add_contact (book, c, &error)) {
g_warning ("bbdb: Failed to add new contact: %s\n", error->message);
g_error_free (error);
return;
}
g_object_unref (G_OBJECT (c));
-
+
}
@@ -422,7 +422,7 @@ parse_contact (xmlNodePtr contact, GList **buddies)
gb->account_name = get_node_text (child);
else if (! strcmp ((const char *)child->name, "alias"))
gb->alias = get_node_text (child);
-
+
}
*buddies = g_list_prepend (*buddies, gb);
diff --git a/plugins/bogo-junk-plugin/bf-junk-filter.c b/plugins/bogo-junk-plugin/bf-junk-filter.c
index 7d7be8ee0a..3e0758e14c 100644
--- a/plugins/bogo-junk-plugin/bf-junk-filter.c
+++ b/plugins/bogo-junk-plugin/bf-junk-filter.c
@@ -296,10 +296,10 @@ org_gnome_bogo_convert_unicode (struct _EPlugin *epl, struct _EConfigHookItemFac
{
GtkWidget *check;
guint i = ((GtkTable *)data->parent)->nrows;
-
+
if (data->old)
return data->old;
-
+
check = gtk_check_button_new_with_mnemonic (_("Convert message text to _Unicode"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), em_junk_bf_unicode);
diff --git a/plugins/caldav/caldav-source.c b/plugins/caldav/caldav-source.c
index 5e43b7ea1e..c846ccde12 100644
--- a/plugins/caldav/caldav-source.c
+++ b/plugins/caldav/caldav-source.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * Author: Christian Kellner <gicmo@gnome.org>
+ * Author: Christian Kellner <gicmo@gnome.org>
*/
#ifdef HAVE_CONFIG_H
@@ -43,7 +43,7 @@
int e_plugin_lib_enable (EPluginLib *ep,
int enable);
-GtkWidget * oge_caldav (EPlugin *epl,
+GtkWidget * oge_caldav (EPlugin *epl,
EConfigHookItemFactoryData *data);
/*****************************************************************************/
@@ -55,7 +55,7 @@ ensure_caldav_source_group (void)
ESourceList *slist;
ESourceGroup *group;
-
+
if (!e_cal_get_sources (&slist, E_CAL_SOURCE_TYPE_EVENT, NULL)) {
g_warning ("Could not get calendar source list from GConf!");
return;
@@ -67,13 +67,13 @@ ensure_caldav_source_group (void)
gboolean res;
group = e_source_group_new (_("CalDAV"), "caldav://");
res = e_source_list_add_group (slist, group, -1);
-
+
if (res == FALSE) {
- g_warning ("Could not add CalDAV source group!");
+ g_warning ("Could not add CalDAV source group!");
} else {
e_source_list_sync (slist, NULL);
}
-
+
g_object_unref (group);
g_object_unref (slist);
}
@@ -139,7 +139,7 @@ location_changed (GtkEntry *editable, ESource *source)
const char *uri;
uri = gtk_entry_get_text (GTK_ENTRY (editable));
-
+
euri = e_uri_new (uri);
ruri = print_uri_noproto (euri);
e_source_set_relative_uri (source, ruri);
@@ -150,8 +150,8 @@ location_changed (GtkEntry *editable, ESource *source)
static void
ssl_changed (GtkToggleButton *button, ESource *source)
{
- e_source_set_property(source, "ssl",
- gtk_toggle_button_get_active(button) ? "1" : "0");
+ e_source_set_property(source, "ssl",
+ gtk_toggle_button_get_active(button) ? "1" : "0");
}
static void
@@ -162,14 +162,14 @@ user_changed (GtkEntry *editable, ESource *source)
char *ruri;
const char *user;
- uri = e_source_get_uri (source);
+ uri = e_source_get_uri (source);
user = gtk_entry_get_text (GTK_ENTRY (editable));
-
+
if (uri == NULL) {
g_free (uri);
return;
}
-
+
euri = e_uri_new (uri);
g_free (euri->user);
@@ -180,7 +180,7 @@ user_changed (GtkEntry *editable, ESource *source)
e_source_set_property (source, "auth", NULL);
}
- e_source_set_property (source, "username", euri->user);
+ e_source_set_property (source, "username", euri->user);
ruri = print_uri_noproto (euri);
e_source_set_relative_uri (source, ruri);
g_free (ruri);
@@ -188,7 +188,7 @@ user_changed (GtkEntry *editable, ESource *source)
}
GtkWidget *
-oge_caldav (EPlugin *epl,
+oge_caldav (EPlugin *epl,
EConfigHookItemFactoryData *data)
{
ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target;
@@ -207,17 +207,17 @@ oge_caldav (EPlugin *epl,
const char *ssl_prop;
gboolean ssl_enabled;
int row;
-
+
source = t->source;
group = e_source_peek_group (source);
-
+
widget = NULL;
-
- if (!g_str_has_prefix (e_source_group_peek_base_uri (group),
+
+ if (!g_str_has_prefix (e_source_group_peek_base_uri (group),
"caldav")) {
return NULL;
}
-
+
/* Extract the username from the uri so we can prefill the
* dialog right, remove the username from the url then */
uri = e_source_get_uri (source);
@@ -227,12 +227,12 @@ oge_caldav (EPlugin *epl,
if (euri == NULL) {
return NULL;
}
-
+
username = euri->user;
euri->user = NULL;
uri = e_uri_to_string (euri, FALSE);
- ssl_prop = e_source_get_property (source, "ssl");
+ ssl_prop = e_source_get_property (source, "ssl");
if (ssl_prop && ssl_prop[0] == '1') {
ssl_enabled = TRUE;
} else {
@@ -241,15 +241,15 @@ oge_caldav (EPlugin *epl,
/* Build up the UI */
parent = data->parent;
-
+
row = GTK_TABLE (parent)->nrows;
lurl = gtk_label_new_with_mnemonic (_("_URL:"));
gtk_widget_show (lurl);
gtk_misc_set_alignment (GTK_MISC (lurl), 0.0, 0.5);
- gtk_table_attach (GTK_TABLE (parent),
- lurl, 0, 1,
- row, row+1,
+ gtk_table_attach (GTK_TABLE (parent),
+ lurl, 0, 1,
+ row, row+1,
GTK_FILL, 0, 0, 0);
location = gtk_entry_new ();
@@ -260,31 +260,31 @@ oge_caldav (EPlugin *epl,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_label_set_mnemonic_widget (GTK_LABEL (lurl), location);
-
- g_signal_connect (G_OBJECT (location),
- "changed",
+
+ g_signal_connect (G_OBJECT (location),
+ "changed",
G_CALLBACK (location_changed),
source);
cssl = gtk_check_button_new_with_mnemonic (_("Use _SSL"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cssl), ssl_enabled);
gtk_widget_show (cssl);
- gtk_table_attach (GTK_TABLE (parent),
- cssl, 1, 2,
- row + 1, row + 2,
+ gtk_table_attach (GTK_TABLE (parent),
+ cssl, 1, 2,
+ row + 1, row + 2,
GTK_FILL, 0, 0, 0);
- g_signal_connect (G_OBJECT (cssl),
- "toggled",
+ g_signal_connect (G_OBJECT (cssl),
+ "toggled",
G_CALLBACK (ssl_changed),
source);
luser = gtk_label_new_with_mnemonic (_("User_name:"));
gtk_widget_show (luser);
gtk_misc_set_alignment (GTK_MISC (luser), 0.0, 0.5);
- gtk_table_attach (GTK_TABLE (parent),
- luser, 0, 1,
- row + 2, row + 3,
+ gtk_table_attach (GTK_TABLE (parent),
+ luser, 0, 1,
+ row + 2, row + 3,
GTK_FILL, 0, 0, 0);
user = gtk_entry_new ();
@@ -295,17 +295,17 @@ oge_caldav (EPlugin *epl,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_label_set_mnemonic_widget (GTK_LABEL (luser), user);
-
- g_signal_connect (G_OBJECT (user),
- "changed",
+
+ g_signal_connect (G_OBJECT (user),
+ "changed",
G_CALLBACK (user_changed),
source);
-
-
+
+
g_free (uri);
g_free (username);
-
- return widget;
+
+ return widget;
}
diff --git a/plugins/calendar-file/calendar-file.c b/plugins/calendar-file/calendar-file.c
index 75a45aa1aa..38add141c0 100644
--- a/plugins/calendar-file/calendar-file.c
+++ b/plugins/calendar-file/calendar-file.c
@@ -47,14 +47,14 @@ e_calendar_file_dummy (EPlugin *epl, EConfigHookItemFactoryData *data)
uri_text = e_source_get_uri (source);
if (strncmp (uri_text, "file", 4)) {
g_free (uri_text);
-
+
return NULL;
}
relative_uri = e_source_peek_relative_uri (source);
g_free (uri_text);
- if (relative_uri && *relative_uri) {
+ if (relative_uri && *relative_uri) {
return NULL;
}
diff --git a/plugins/calendar-http/calendar-http.c b/plugins/calendar-http/calendar-http.c
index cad85d972d..9934a8b76f 100644
--- a/plugins/calendar-http/calendar-http.c
+++ b/plugins/calendar-http/calendar-http.c
@@ -90,7 +90,7 @@ url_changed (GtkEntry *entry, ESource *source)
secure_checkbox = g_object_get_data (G_OBJECT (gtk_widget_get_parent (GTK_WIDGET (entry))),
"secure_checkbox");
-
+
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (secure_checkbox), TRUE);
}
@@ -227,12 +227,12 @@ option_changed (GtkOptionMenu *option, ECalConfigTargetSource *t)
g_free (refresh_str);
}
-static void
+static void
secure_setting_changed (GtkWidget *widget, ESource *source)
{
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
e_source_set_property (source, "use_ssl", "1");
- else
+ else
e_source_set_property (source, "use_ssl", "0");
}
@@ -342,7 +342,7 @@ e_calendar_http_secure (EPlugin *epl, EConfigHookItemFactoryData *data)
secure_prop = e_source_get_property (t->source, "use_ssl");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (secure_setting), (secure_prop && g_str_equal (secure_prop, "1")) ? TRUE : FALSE);
-
+
g_signal_connect (secure_setting, "toggled", G_CALLBACK (secure_setting_changed), t->source);
gtk_widget_show (secure_setting);
@@ -350,7 +350,7 @@ e_calendar_http_secure (EPlugin *epl, EConfigHookItemFactoryData *data)
/* Store pointer to secure checkbox so we can retrieve it in url_changed() */
g_object_set_data (G_OBJECT (parent), "secure_checkbox", (gpointer)secure_setting);
-
+
return secure_setting;
}
diff --git a/plugins/copy-tool/copy-tool.c b/plugins/copy-tool/copy-tool.c
index 7b066f186e..d241f6c5ae 100644
--- a/plugins/copy-tool/copy-tool.c
+++ b/plugins/copy-tool/copy-tool.c
@@ -49,5 +49,5 @@ org_gnome_copy_tool_copy_address(void *ep, EMPopupTargetURI *t)
g_free(addr);
camel_url_free(curl);
camel_object_unref(cia);
- }
+ }
}
diff --git a/plugins/default-mailer/default-mailer.c b/plugins/default-mailer/default-mailer.c
index 3b66ee5403..47cddb9db5 100644
--- a/plugins/default-mailer/default-mailer.c
+++ b/plugins/default-mailer/default-mailer.c
@@ -73,16 +73,16 @@ org_gnome_default_mailer_check_default (EPlugin *ep, ESEventTargetUpgrade *targe
GConfValue *is_key;
client = gconf_client_get_default ();
-
+
/* See whether the check default mailer key has already been set */
is_key = gconf_client_get(client, GCONF_KEY_CHECKDEFAULT, NULL);
if(!is_key) {
gconf_client_set_bool(client, GCONF_KEY_CHECKDEFAULT, TRUE, NULL);
gconf_value_free (is_key);
}
-
+
/* Check whether we're supposed to check whether or not we are the default mailer */
- if(gconf_client_get_bool(client, GCONF_KEY_CHECKDEFAULT, NULL)) {
+ if(gconf_client_get_bool(client, GCONF_KEY_CHECKDEFAULT, NULL)) {
mailer = gconf_client_get_string(client, GCONF_KEY_MAILTO_COMMAND, NULL);
/* Check whether we are the default mailer */
@@ -93,7 +93,7 @@ org_gnome_default_mailer_check_default (EPlugin *ep, ESEventTargetUpgrade *targe
gconf_client_set_string(client, GCONF_KEY_MAILTO_COMMAND, EVOLUTION_MAILTO_COMMAND, NULL);
}
}
-
+
g_free(mailer);
}
diff --git a/plugins/default-source/default-source.c b/plugins/default-source/default-source.c
index f6a670bdf6..129c89a4d2 100644
--- a/plugins/default-source/default-source.c
+++ b/plugins/default-source/default-source.c
@@ -32,7 +32,7 @@
GtkWidget* org_gnome_default_book (EPlugin *epl, EConfigHookItemFactoryData *data);
void commit_default_calendar (EPlugin *epl, EConfigTarget *target);
void commit_default_book (EPlugin *epl, EConfigTarget *target);
-void
+void
commit_default_calendar (EPlugin *epl, EConfigTarget *target)
{
ECalConfigTargetSource *cal_target;
@@ -40,7 +40,7 @@ commit_default_calendar (EPlugin *epl, EConfigTarget *target)
cal_target = (ECalConfigTargetSource *) target;
source = cal_target->source;
- if (e_source_get_property (source, "default"))
+ if (e_source_get_property (source, "default"))
e_cal_set_default_source (source, cal_target->source_type, NULL);
}
@@ -54,17 +54,17 @@ commit_default_book (EPlugin *epl, EConfigTarget *target)
source = book_target->source;
if (e_source_get_property (source, "default"))
e_book_set_default_source (source, NULL);
-
-
+
+
}
static void
default_source_changed (GtkWidget *check_box, ESource *source)
{
-
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_box)))
+
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_box)))
e_source_set_property (source, "default", "true");
- else
+ else
e_source_set_property (source, "default", NULL);
}
@@ -75,16 +75,16 @@ org_gnome_default_book (EPlugin *epl, EConfigHookItemFactoryData *data)
GtkWidget *widget;
ESource *source;
EABConfigTargetSource *book_target;
-
+
if (data->old)
return data->old;
widget = gtk_check_button_new_with_mnemonic (_("Mark as _default folder"));
book_target = (EABConfigTargetSource *) data->target;
source = book_target->source;
-
+
if (e_source_get_property (source, "default"))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
- else
+ else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
gtk_container_add (GTK_CONTAINER (data->parent), widget);
@@ -108,12 +108,12 @@ org_gnome_default_cal (EPlugin *epl, EConfigHookItemFactoryData *data)
widget = gtk_check_button_new_with_mnemonic (_("Mark as _default folder"));
cal_target = (ECalConfigTargetSource *) data->target;
source = cal_target->source;
-
+
if (e_source_get_property (source, "default"))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
- else
+ else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
-
+
i = ((GtkTable *)data->parent)->nrows;
gtk_table_attach((GtkTable *)data->parent, widget, 1, 2, i, i+1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
diff --git a/plugins/exchange-operations/exchange-account-setup.c b/plugins/exchange-operations/exchange-account-setup.c
index 24aa1935be..9707006f4b 100644
--- a/plugins/exchange-operations/exchange-account-setup.c
+++ b/plugins/exchange-operations/exchange-account-setup.c
@@ -56,7 +56,7 @@ GtkWidget *org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *
gboolean org_gnome_exchange_check_options(EPlugin *epl, EConfigHookPageCheckData *data);
GtkWidget *org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data);
void org_gnome_exchange_commit (EPlugin *epl, EConfigHookItemFactoryData *data);
-GtkWidget* org_gnome_exchange_show_folder_size_factory (EPlugin *epl, EConfigHookItemFactoryData *data);
+GtkWidget* org_gnome_exchange_show_folder_size_factory (EPlugin *epl, EConfigHookItemFactoryData *data);
CamelServiceAuthType camel_exchange_ntlm_authtype = {
/* i18n: "Secure Password Authentication" is an Outlookism */
@@ -103,13 +103,13 @@ update_state (GtkTextBuffer *buffer, gpointer data)
}
}
-static void
+static void
toggled_state (GtkToggleButton *button, gpointer data)
{
gboolean current_oof_state = gtk_toggle_button_get_active (button);
if (current_oof_state == oof_data->state)
- return;
+ return;
oof_data->state = current_oof_state;
gtk_widget_set_sensitive (oof_data->text_view, current_oof_state);
}
@@ -123,7 +123,7 @@ btn_chpass_clicked (GtkButton *button, gpointer data)
ExchangeAccountResult result;
account = exchange_operations_get_exchange_account ();
-
+
old_password = exchange_account_get_password (account);
if (!old_password) {
g_print ("Could not fetch old password\n");
@@ -138,9 +138,9 @@ btn_chpass_clicked (GtkButton *button, gpointer data)
result = exchange_account_set_password (account, old_password, new_password);
if (result != EXCHANGE_ACCOUNT_CONNECT_SUCCESS)
exchange_operations_report_error (account, result);
-
+
g_free (old_password);
- g_free (new_password);
+ g_free (new_password);
}
#endif
@@ -198,7 +198,7 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data)
#endif
GtkLabel *lbl_dass;
GtkButton *btn_dass;
-
+
/* Miscelleneous setting */
GtkFrame *frm_misc;
GtkVBox *vbox_misc;
@@ -235,14 +235,14 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data)
oof_data->text_view = NULL;
/* See if oof info found already */
-
+
if (account && !exchange_oof_get (account, &oof_state, &message)) {
e_error_run (NULL, ERROR_DOMAIN ":state-read-error", NULL);
return NULL;
}
-
+
if (message && *message)
oof_data->message = g_strdup (message);
else
@@ -256,22 +256,22 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data)
frm_oof = (GtkFrame*) gtk_object_new (GTK_TYPE_FRAME, "label", _("Out Of Office"), NULL);
gtk_box_pack_start (GTK_BOX (vbox_settings), GTK_WIDGET (frm_oof), FALSE, FALSE, 0);
-
+
vbox_oof = (GtkVBox*) gtk_object_new (GTK_TYPE_VBOX, NULL, "homogeneous", FALSE, "spacing", 12, NULL);
gtk_container_set_border_width (GTK_CONTAINER (vbox_oof), 6);
gtk_container_add (GTK_CONTAINER (frm_oof), GTK_WIDGET (vbox_oof));
-
- lbl_oof_desc = (GtkLabel*) gtk_object_new (GTK_TYPE_LABEL, "label", _("The message specified below will be automatically sent to \neach person who sends mail to you while you are out of the office."), "justify", GTK_JUSTIFY_LEFT, NULL);
+
+ lbl_oof_desc = (GtkLabel*) gtk_object_new (GTK_TYPE_LABEL, "label", _("The message specified below will be automatically sent to \neach person who sends mail to you while you are out of the office."), "justify", GTK_JUSTIFY_LEFT, NULL);
gtk_misc_set_alignment (GTK_MISC (lbl_oof_desc), 0, 0.5);
gtk_box_pack_start (GTK_BOX (vbox_oof), GTK_WIDGET (lbl_oof_desc), FALSE, FALSE, 0);
-
+
tbl_oof_status = (GtkTable*) gtk_object_new (GTK_TYPE_TABLE, "n-rows", 2, "n-columns", 2, "homogeneous", FALSE, "row-spacing", 6, "column-spacing", 6, NULL);
txt = g_strdup_printf ("<b>%s</b>", _("Status:"));
lbl_status = (GtkLabel*) gtk_object_new (GTK_TYPE_LABEL, "label", txt, "use-markup", TRUE, NULL);
g_free (txt);
gtk_misc_set_alignment (GTK_MISC (lbl_status), 0, 0.5);
gtk_misc_set_padding (GTK_MISC (lbl_status), 0, 0);
-
+
if (oof_data->state) {
radio_oof = (GtkRadioButton*) gtk_object_new (GTK_TYPE_RADIO_BUTTON, "label", _("I am out of the office"), NULL);
radio_iof = (GtkRadioButton*) gtk_object_new (GTK_TYPE_RADIO_BUTTON, "label", _("I am in the office"), "group", radio_oof, NULL);
@@ -281,15 +281,15 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data)
radio_oof = (GtkRadioButton*) gtk_object_new (GTK_TYPE_RADIO_BUTTON, "label", _("I am out of the office"), "group", radio_iof, NULL);
}
g_signal_connect (radio_oof, "toggled", G_CALLBACK (toggled_state), NULL);
-
+
gtk_table_attach (tbl_oof_status, GTK_WIDGET (lbl_status), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
gtk_table_attach (tbl_oof_status, GTK_WIDGET (radio_iof), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
gtk_table_attach (tbl_oof_status, GTK_WIDGET (radio_oof), 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
gtk_box_pack_start (GTK_BOX (vbox_oof), GTK_WIDGET (tbl_oof_status), FALSE, FALSE, 0);
-
-
+
+
scrwnd_oof = (GtkScrolledWindow*) gtk_object_new (GTK_TYPE_SCROLLED_WINDOW, "hscrollbar-policy", GTK_POLICY_AUTOMATIC, "vscrollbar-policy", GTK_POLICY_AUTOMATIC, "shadow-type", GTK_SHADOW_IN, NULL);
gtk_box_pack_start (GTK_BOX (vbox_oof), GTK_WIDGET (scrwnd_oof), FALSE, FALSE, 0);
txtview_oof = (GtkTextView*) gtk_object_new (GTK_TYPE_TEXT_VIEW, "justification", GTK_JUSTIFY_LEFT, "wrap-mode", GTK_WRAP_WORD, "editable", TRUE, NULL);
@@ -304,7 +304,7 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data)
/* previuosly set message */
gtk_text_buffer_set_text (buffer, oof_data->message, -1);
gtk_text_view_set_buffer (txtview_oof, buffer);
-
+
}
gtk_text_buffer_set_modified (buffer, FALSE);
if (!oof_data->state)
@@ -316,7 +316,7 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data)
/* Security settings */
frm_auth = (GtkFrame*) gtk_object_new (GTK_TYPE_FRAME, "label", _("Security"), NULL);
gtk_box_pack_start (GTK_BOX (vbox_settings), GTK_WIDGET (frm_auth), FALSE, FALSE, 0);
-
+
vbox_auth = (GtkVBox*) gtk_object_new (GTK_TYPE_VBOX, "homogeneous", FALSE, "spacing", 6, NULL);
gtk_container_set_border_width (GTK_CONTAINER (vbox_auth), 6);
gtk_container_add (GTK_CONTAINER (frm_auth), GTK_WIDGET (vbox_auth));
@@ -348,7 +348,7 @@ org_gnome_exchange_settings(EPlugin *epl, EConfigHookItemFactoryData *data)
/* Miscelleneous settings */
frm_misc = (GtkFrame*) gtk_object_new (GTK_TYPE_FRAME, "label", _("Miscelleneous"), NULL);
gtk_box_pack_start (GTK_BOX (vbox_settings), GTK_WIDGET (frm_misc), FALSE, FALSE, 0);
-
+
vbox_misc = (GtkVBox*) gtk_object_new (GTK_TYPE_VBOX, "homogeneous", FALSE, "spacing", 6, NULL);
gtk_container_set_border_width (GTK_CONTAINER (vbox_misc), 6);
gtk_container_add (GTK_CONTAINER (frm_misc), GTK_WIDGET (vbox_misc));
@@ -399,7 +399,7 @@ print_error (const char *owa_url, E2kAutoconfigResult result)
break;
case E2K_AUTOCONFIG_CANT_BPROPFIND:
- e_error_run (NULL, ERROR_DOMAIN ":connect-exchange-error",
+ e_error_run (NULL, ERROR_DOMAIN ":connect-exchange-error",
"http://support.novell.com/cgi-bin/search/searchtid.cgi?/ximian/ximian328.html",
NULL);
break;
@@ -422,7 +422,7 @@ owa_authenticate_user(GtkWidget *button, EConfig *config)
E2kAutoconfigResult result;
CamelURL *url=NULL;
gboolean remember_password;
- char *url_string, *key;
+ char *url_string, *key;
const char *source_url, *id_name, *owa_url;
char *at, *user;
gboolean valid = FALSE;
@@ -444,7 +444,7 @@ owa_authenticate_user(GtkWidget *button, EConfig *config)
at = strchr(id_name, '@');
user = g_alloca(at-id_name+1);
memcpy(user, id_name, at-id_name);
- user[at-id_name] = 0;
+ user[at-id_name] = 0;
camel_url_set_user (url, user);
}
}
@@ -466,21 +466,21 @@ owa_authenticate_user(GtkWidget *button, EConfig *config)
key = camel_url_to_string (url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS);
/* Supress the trailing slash */
key [strlen(key) -1] = 0;
-
- valid = e2k_validate_user (owa_url, key, &url->user, exchange_params,
+
+ valid = e2k_validate_user (owa_url, key, &url->user, exchange_params,
&remember_password, &result,
GTK_WINDOW (gtk_widget_get_toplevel (button)));
g_free (key);
-
+
if (!valid && result != E2K_AUTOCONFIG_CANCELLED)
print_error (owa_url, result);
camel_url_set_host (url, valid ? exchange_params->host : "");
-
+
if (valid)
camel_url_set_param (url, "save-passwd", remember_password? "true" : "false");
-
+
camel_url_set_param (url, "ad_server", valid ? exchange_params->ad_server: NULL);
camel_url_set_param (url, "mailbox", valid ? exchange_params->mailbox : NULL);
camel_url_set_param (url, "owa_path", valid ? exchange_params->owa_path : NULL);
@@ -491,7 +491,7 @@ owa_authenticate_user(GtkWidget *button, EConfig *config)
g_free (exchange_params->ad_server);
g_free (exchange_params);
- if (valid) {
+ if (valid) {
url_string = camel_url_to_string (url, 0);
e_account_set_string (target_account->account, E_ACCOUNT_SOURCE_URL, url_string);
e_account_set_string (target_account->account, E_ACCOUNT_TRANSPORT_URL, url_string);
@@ -540,7 +540,7 @@ owa_editor_entry_changed(GtkWidget *entry, EConfig *config)
}
static char *
-construct_owa_url (CamelURL *url)
+construct_owa_url (CamelURL *url)
{
const char *owa_path, *use_ssl = NULL;
const char *protocol = "http", *mailbox_name;
@@ -558,9 +558,9 @@ construct_owa_url (CamelURL *url)
mailbox_name = camel_url_get_param (url, "mailbox");
if (mailbox_name)
- owa_url = g_strdup_printf("%s://%s%s/%s", protocol, url->host, owa_path, mailbox_name);
+ owa_url = g_strdup_printf("%s://%s%s/%s", protocol, url->host, owa_path, mailbox_name);
else
- owa_url = g_strdup_printf("%s://%s%s", protocol, url->host, owa_path );
+ owa_url = g_strdup_printf("%s://%s%s", protocol, url->host, owa_path );
return owa_url;
}
@@ -624,7 +624,7 @@ org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *data)
if (url->host[0] != 0) {
char *uri;
- /* url has hostname but not owa_url.
+ /* url has hostname but not owa_url.
* Account has been created using x-c-s or evo is upgraded to 2.2
* When invoked from druid, hostname will get set after validation,
* so this condition will never be true during account creation.
@@ -636,9 +636,9 @@ org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *data)
g_free(uri);
}
}
- camel_url_free (url);
+ camel_url_free (url);
if (owa_url)
- gtk_entry_set_text(GTK_ENTRY (owa_entry), owa_url);
+ gtk_entry_set_text(GTK_ENTRY (owa_entry), owa_url);
gtk_label_set_mnemonic_widget((GtkLabel *)label, owa_entry);
button = gtk_button_new_with_mnemonic (_("A_uthenticate"));
@@ -648,8 +648,8 @@ org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_widget_show_all(hbox);
- gtk_table_attach (GTK_TABLE (data->parent), label, 0, 1, row, row+1, 0, 0, 0, 0);
- gtk_table_attach (GTK_TABLE (data->parent), hbox, 1, 2, row, row+1, GTK_FILL|GTK_EXPAND, GTK_FILL, 0, 0);
+ gtk_table_attach (GTK_TABLE (data->parent), label, 0, 1, row, row+1, 0, 0, 0, 0);
+ gtk_table_attach (GTK_TABLE (data->parent), hbox, 1, 2, row, row+1, GTK_FILL|GTK_EXPAND, GTK_FILL, 0, 0);
g_signal_connect (owa_entry, "changed", G_CALLBACK(owa_editor_entry_changed), data->config);
g_object_set_data((GObject *)owa_entry, "authenticate-button", button);
@@ -693,7 +693,7 @@ org_gnome_exchange_check_options(EPlugin *epl, EConfigHookPageCheckData *data)
return status;
}
-static void
+static void
set_oof_info (void)
{
ExchangeAccount *account;
@@ -711,7 +711,7 @@ destroy_oof_data (void)
{
if (oof_data->message)
g_free (oof_data->message);
- g_free (oof_data);
+ g_free (oof_data);
}
void
@@ -720,7 +720,7 @@ org_gnome_exchange_commit (EPlugin *epl, EConfigHookItemFactoryData *data)
EMConfigTargetAccount *target_account;
const char *source_url;
CamelURL *url;
-
+
target_account = (EMConfigTargetAccount *)data->config->target;
source_url = e_account_get_string (target_account->account, E_ACCOUNT_SOURCE_URL);
url = camel_url_new (source_url, NULL);
@@ -749,7 +749,7 @@ exchange_check_authtype (GtkWidget *w, EConfig *config)
return;
}
-static void
+static void
exchange_authtype_changed (GtkComboBox *dropdown, EConfig *config)
{
EMConfigTargetAccount *target = (EMConfigTargetAccount *)config->target;
@@ -771,7 +771,7 @@ exchange_authtype_changed (GtkComboBox *dropdown, EConfig *config)
transport_url = e_account_get_string (target->account,
E_ACCOUNT_TRANSPORT_URL);
url_transport = camel_url_new (transport_url, NULL);
-
+
model = gtk_combo_box_get_model(dropdown);
if (gtk_tree_model_iter_nth_child(model, &iter, NULL, id)) {
gtk_tree_model_get(model, &iter, 1, &authtype, -1);
@@ -783,7 +783,7 @@ exchange_authtype_changed (GtkComboBox *dropdown, EConfig *config)
camel_url_set_authmech(url_source, NULL);
camel_url_set_authmech(url_transport, NULL);
}
-
+
source_url_string = camel_url_to_string(url_source, 0);
transport_url_string = camel_url_to_string(url_transport, 0);
e_account_set_string(target->account, E_ACCOUNT_SOURCE_URL, source_url_string);
@@ -800,7 +800,7 @@ GtkWidget *
org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
{
EMConfigTargetAccount *target_account;
- const char *source_url;
+ const char *source_url;
char *label_text, *exchange_account_authtype = NULL;
CamelURL *url;
GtkWidget *hbox, *button, *auth_label, *vbox, *label_hide;
@@ -812,7 +812,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
ExchangeAccount *account;
target_account = (EMConfigTargetAccount *)data->config->target;
- source_url = e_account_get_string (target_account->account,
+ source_url = e_account_get_string (target_account->account,
E_ACCOUNT_SOURCE_URL);
url = camel_url_new (source_url, NULL);
if (url == NULL
@@ -839,7 +839,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
g_free (label_text);
gtk_label_set_justify (GTK_LABEL (auth_label), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (auth_label), 0, 0.5);
- gtk_misc_set_padding (GTK_MISC (auth_label), 0, 0);
+ gtk_misc_set_padding (GTK_MISC (auth_label), 0, 0);
gtk_label_set_use_markup (GTK_LABEL (auth_label), TRUE);
label_hide = gtk_label_new("\n");
@@ -860,23 +860,23 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
if (authtypes) {
for (ll = authtypes; ll; ll = g_list_next(ll))
- if (!strcmp(authtype->authproto,
+ if (!strcmp(authtype->authproto,
((CamelServiceAuthType *)ll->data)->authproto))
break;
avail = ll != NULL;
}
gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter, 0, authtype->name, 1,
+ gtk_list_store_set (store, &iter, 0, authtype->name, 1,
authtype, 2, !avail, -1);
if (url && url->authmech && !strcmp(url->authmech, authtype->authproto)) {
active = i;
}
- else if (url && exchange_account_authtype &&
+ else if (url && exchange_account_authtype &&
!strcmp (exchange_account_authtype, authtype->authproto)) {
- /* if the url doesn't contain authmech, read the value from
- * exchange account and set the tab selection and
- * also set the authmech back to url
+ /* if the url doesn't contain authmech, read the value from
+ * exchange account and set the tab selection and
+ * also set the authmech back to url
*/
camel_url_set_authmech (url, exchange_account_authtype);
active = i;
@@ -890,16 +890,16 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
GtkCellRenderer *cell = gtk_cell_renderer_text_new();
gtk_cell_layout_pack_start ((GtkCellLayout *)dropdown, cell, TRUE);
- gtk_cell_layout_set_attributes ((GtkCellLayout *)dropdown, cell,
+ gtk_cell_layout_set_attributes ((GtkCellLayout *)dropdown, cell,
"text", 0, "strikethrough", 2, NULL);
- auth_changed_id = g_signal_connect (dropdown,
- "changed",
- G_CALLBACK (exchange_authtype_changed),
+ auth_changed_id = g_signal_connect (dropdown,
+ "changed",
+ G_CALLBACK (exchange_authtype_changed),
data->config);
- g_signal_connect (button,
- "clicked",
- G_CALLBACK(exchange_check_authtype),
+ g_signal_connect (button,
+ "clicked",
+ G_CALLBACK(exchange_check_authtype),
data->config);
}
@@ -913,7 +913,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_box_pack_start (GTK_BOX (vbox), label_hide, TRUE, TRUE, 0);
gtk_widget_show_all (vbox);
- gtk_box_pack_start (GTK_BOX (data->parent), vbox, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (data->parent), vbox, TRUE, TRUE, 0);
if (url)
camel_url_free(url);
@@ -947,7 +947,7 @@ org_gnome_exchange_show_folder_size_factory (EPlugin *epl, EConfigHookItemFactor
if (g_ascii_strcasecmp (provider->protocol, "exchange"))
return NULL;
-
+
folder_name = (char*) camel_folder_get_name (cml_folder);
if (!folder_name)
folder_name = g_strdup ("name");
diff --git a/plugins/exchange-operations/exchange-calendar.c b/plugins/exchange-operations/exchange-calendar.c
index 774ec21dfe..0783770361 100644
--- a/plugins/exchange-operations/exchange-calendar.c
+++ b/plugins/exchange-operations/exchange-calendar.c
@@ -55,7 +55,7 @@ void e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target);
/* FIXME: Reconsider the prototype of this function */
static GPtrArray *
-e_exchange_calendar_get_calendars (ECalSourceType ftype)
+e_exchange_calendar_get_calendars (ECalSourceType ftype)
{
ExchangeAccount *account;
GPtrArray *folder_array;
@@ -74,7 +74,7 @@ e_exchange_calendar_get_calendars (ECalSourceType ftype)
else if (ftype == E_CAL_SOURCE_TYPE_TODO) { /* Tasks */
tstring = g_strdup ("tasks");
}
- else {
+ else {
/* FIXME: Would this ever happen? If so, handle it wisely */
tstring = NULL;
}
@@ -93,7 +93,7 @@ e_exchange_calendar_get_calendars (ECalSourceType ftype)
for (i=0; i<folder_array->len; ++i) {
folder = g_ptr_array_index (folder_array, i);
type = (gchar *)e_folder_get_type_string (folder);
-
+
if (!strcmp (type, tstring)) {
tmp = (gchar *)e_folder_get_physical_uri (folder);
if (g_str_has_prefix (tmp, uri_prefix)) {
@@ -129,7 +129,7 @@ e_exchange_calendar_pcalendar_on_change (GtkTreeView *treeview, ESource *source)
e_source_set_relative_uri (source, es_ruri);
g_free (ruri);
g_free (es_ruri);
-}
+}
GtkWidget *
e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
@@ -167,7 +167,7 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_widget_destroy (scrw_pcalendar);
gtk_widget_destroy (tv_pcalendar);
}
-
+
uri_text = e_source_get_uri (t->source);
uri = e_uri_new (uri_text);
@@ -182,12 +182,12 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
parent = data->parent;
row = ((GtkTable*)parent)->nrows;
- exchange_config_listener_get_offline_status (exchange_global_config_listener,
+ exchange_config_listener_get_offline_status (exchange_global_config_listener,
&offline_status);
if (offline_status == OFFLINE_MODE) {
/* Evolution is in offline mode; we will not be able to create
new folders or modify existing folders. */
- offline_msg = g_markup_printf_escaped ("<b>%s</b>",
+ offline_msg = g_markup_printf_escaped ("<b>%s</b>",
_("Evolution is in offline mode. You cannot create or modify folders now.\nPlease switch to online mode for such operations."));
lbl_offline_msg = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (lbl_offline_msg), offline_msg);
@@ -195,7 +195,7 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_widget_show (lbl_offline_msg);
gtk_table_attach (GTK_TABLE (parent), lbl_offline_msg, 0, 2, row, row+1, GTK_FILL|GTK_EXPAND, 0, 0, 0);
g_free (uri_text);
- return lbl_offline_msg;
+ return lbl_offline_msg;
}
rel_uri = e_source_peek_relative_uri (t->source);
@@ -207,7 +207,7 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
else {
calendar_src_exists = FALSE;
}
-
+
/* REVIEW: Should this handle be freed? - Attn: surf */
account = exchange_operations_get_exchange_account ();
if (!account) {
@@ -243,14 +243,14 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_widget_show (lbl_pcalendar);
gtk_misc_set_alignment (GTK_MISC (lbl_pcalendar), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (parent), lbl_pcalendar, 0, 2, row+1, row+2, GTK_FILL|GTK_EXPAND, 0, 0, 0);
-
+
ts_pcalendar = gtk_tree_store_new (NUM_COLS, G_TYPE_STRING, G_TYPE_STRING);
callist = e_exchange_calendar_get_calendars (t->source_type);
for (i=0; i<callist->len; ++i) {
ruri = g_ptr_array_index (callist, i);
- exchange_operations_cta_add_node_to_tree (ts_pcalendar, NULL, ruri);
+ exchange_operations_cta_add_node_to_tree (ts_pcalendar, NULL, ruri);
}
cr_calendar = gtk_cell_renderer_text_new ();
@@ -259,7 +259,7 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_tree_view_append_column (GTK_TREE_VIEW (tv_pcalendar), tvc_calendar);
g_object_set (tv_pcalendar, "expander-column", tvc_calendar, "headers-visible", TRUE, NULL);
gtk_tree_view_expand_all (GTK_TREE_VIEW (tv_pcalendar));
-
+
scrw_pcalendar = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrw_pcalendar), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrw_pcalendar), GTK_SHADOW_IN);
@@ -270,7 +270,7 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_table_attach (GTK_TABLE (parent), scrw_pcalendar, 0, 2, row+2, row+3, GTK_EXPAND|GTK_FILL, 0, 0, 0);
gtk_widget_show_all (scrw_pcalendar);
-
+
if (calendar_src_exists) {
gchar *uri_prefix, *sruri, *tmpruri;
int prefix_len;
@@ -278,7 +278,7 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
uri_prefix = g_strconcat (account->account_filename, "/;", NULL);
prefix_len = strlen (uri_prefix);
-
+
tmpruri = (gchar*) rel_uri;
if (g_str_has_prefix (tmpruri, uri_prefix)) {
@@ -287,14 +287,14 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
else {
sruri = NULL;
}
-
+
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tv_pcalendar));
exchange_operations_cta_select_node_from_tree (ts_pcalendar, NULL, sruri, sruri, selection);
- gtk_widget_set_sensitive (tv_pcalendar, FALSE);
+ gtk_widget_set_sensitive (tv_pcalendar, FALSE);
g_free (uri_prefix);
g_free (sruri);
}
-
+
g_ptr_array_free (callist, TRUE);
g_object_unref (ts_pcalendar);
return tv_pcalendar;
@@ -318,7 +318,7 @@ e_exchange_calendar_check (EPlugin *epl, EConfigHookPageCheckData *data)
rel_uri = e_source_peek_relative_uri (t->source);
group = e_source_peek_group (t->source);
base_uri = e_source_group_peek_base_uri (group);
- exchange_config_listener_get_offline_status (exchange_global_config_listener,
+ exchange_config_listener_get_offline_status (exchange_global_config_listener,
&offline_status);
if (base_uri && !strncmp (base_uri, "exchange", 8)) {
if (offline_status == OFFLINE_MODE)
@@ -364,7 +364,7 @@ e_exchange_calendar_check (EPlugin *epl, EConfigHookPageCheckData *data)
return TRUE;
}
-void
+void
e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
{
ECalConfigTargetSource *t = (ECalConfigTargetSource *) target;
@@ -382,7 +382,7 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
if (uri_text && strncmp (uri_text, "exchange", 8)) {
g_free (uri_text);
return ;
- }
+ }
status = exchange_is_offline (&offline_status);
if (offline_status == OFFLINE_MODE || status != CONFIG_LISTENER_STATUS_OK) {
@@ -412,10 +412,10 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
/* FIXME: This one would ever occur? */
ftype = g_strdup ("mail");
}
-
+
gname = (gchar*) e_source_peek_name (source);
gruri = (gchar*) e_source_peek_relative_uri (source);
-
+
if (calendar_src_exists) {
gchar *tmpruri, *uri_string, *temp_path, *prefix;
EUri *euri;
@@ -431,7 +431,7 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
/* sample gruri: user;auth=NTLM@host/;personal/Calendar */
/* sample ruri: user;auth=NTLM@host/personal/Calendar */
/* sample path: /personal/Calendar */
-
+
uri_len = strlen (uri_string) + 1;
tmpruri = g_strdup (uri_string + strlen ("exchange://"));
temp_path = g_build_filename ("/", uri_text + uri_len, NULL);
@@ -449,7 +449,7 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
ruri = g_strconcat (gruri, "/", gname, NULL);
path = g_build_filename ("/", ruri+prefix_len, NULL);
}
-
+
if (!calendar_src_exists) {
/* Create the new folder */
result = exchange_account_create_folder (account, path, ftype);
@@ -477,8 +477,8 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
}
e_source_set_property (source, "auth", "1");
if (rename) {
- exchange_operations_update_child_esources (source,
- calendar_old_source_uri,
+ exchange_operations_update_child_esources (source,
+ calendar_old_source_uri,
ruri);
}
}
@@ -501,14 +501,14 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
case EXCHANGE_ACCOUNT_FOLDER_UNSUPPORTED_OPERATION:
e_error_run (NULL, ERROR_DOMAIN ":folder-unsupported-error", NULL);
break;
- case EXCHANGE_ACCOUNT_FOLDER_GENERIC_ERROR:
+ case EXCHANGE_ACCOUNT_FOLDER_GENERIC_ERROR:
e_error_run (NULL, ERROR_DOMAIN ":folder-generic-error", NULL);
break;
default:
break;
}
-done:
+done:
g_free (uri_text);
g_free (ruri);
g_free (path);
diff --git a/plugins/exchange-operations/exchange-change-password.c b/plugins/exchange-operations/exchange-change-password.c
index 297a75e210..9ccf0617e3 100644
--- a/plugins/exchange-operations/exchange-change-password.c
+++ b/plugins/exchange-operations/exchange-change-password.c
@@ -98,7 +98,7 @@ exchange_get_new_password (const char *existing_password, gboolean voluntary)
if (voluntary)
gtk_widget_hide (GTK_WIDGET (top_label));
-run_dialog_again:
+run_dialog_again:
response = gtk_dialog_run (GTK_DIALOG (top_widget));
if (response == GTK_RESPONSE_OK) {
const char *cur_pass, *new_pass1, *new_pass2;
diff --git a/plugins/exchange-operations/exchange-config-listener.c b/plugins/exchange-operations/exchange-config-listener.c
index 3f08d32c16..a562cc6493 100644
--- a/plugins/exchange-operations/exchange-config-listener.c
+++ b/plugins/exchange-operations/exchange-config-listener.c
@@ -93,12 +93,12 @@ static void account_changed (EAccountList *account_listener,
static void account_removed (EAccountList *account_listener,
EAccount *account);
#if LDEAD
-static void exchange_add_autocompletion_folders (GConfClient *gc_client,
+static void exchange_add_autocompletion_folders (GConfClient *gc_client,
ExchangeAccount *account);
#endif
-static gboolean exchange_camel_urls_is_equal (const gchar *url1,
+static gboolean exchange_camel_urls_is_equal (const gchar *url1,
const gchar *url2);
-static void remove_selected_non_offline_esources (ExchangeAccount *account,
+static void remove_selected_non_offline_esources (ExchangeAccount *account,
const char *gconf_key);
static void
class_init (GObjectClass *object_class)
@@ -218,7 +218,7 @@ set_special_mail_folder (ExchangeAccount *account, const char *folder_type,
/* sample url_string: exchange://pnayak;auth=NTLM@164.99.168.136/ */
/* sample path: personal/Drafts */
uri_len = strlen (url_string) + 1;
- path = g_build_filename (physical_uri + uri_len, NULL);
+ path = g_build_filename (physical_uri + uri_len, NULL);
*folder_uri = g_strconcat (url_string, path, NULL);
g_free (path);
g_free (url_string);
@@ -293,20 +293,20 @@ add_account_esources (ExchangeAccount *account,
exchange_account_is_offline_sync_set (account, &mode);
if (mode == OFFLINE_MODE) {
/* If account is marked for offline sync during account
- * creation, mark all the folders for offline sync
+ * creation, mark all the folders for offline sync
*/
offline_mode = TRUE;
}
username = exchange_account_get_username (account);
- /* For each component create a source group */
+ /* For each component create a source group */
cal_source_group = e_source_group_new (account->account_name,
EXCHANGE_URI_PREFIX);
- tasks_source_group = e_source_group_new (account->account_name,
+ tasks_source_group = e_source_group_new (account->account_name,
EXCHANGE_URI_PREFIX);
- contacts_source_group = e_source_group_new (account->account_name,
+ contacts_source_group = e_source_group_new (account->account_name,
EXCHANGE_URI_PREFIX);
if (!e_source_list_add_group (contacts_source_list, contacts_source_group, -1) ||
@@ -327,12 +327,12 @@ add_account_esources (ExchangeAccount *account,
e_source_set_property (source, "username", username);
e_source_set_property (source, "auth", "1");
e_source_set_property (source, "auth-domain", "Exchange");
- e_source_group_add_source (contacts_source_group,
+ e_source_group_add_source (contacts_source_group,
source, -1);
g_object_unref (source);
}
else if (folder->type == EXCHANGE_CALENDAR_FOLDER){
- relative_uri = g_strdup (folder->uri +
+ relative_uri = g_strdup (folder->uri +
strlen (EXCHANGE_URI_PREFIX));
source = e_source_new (folder->name, relative_uri);
if (offline_mode)
@@ -341,7 +341,7 @@ add_account_esources (ExchangeAccount *account,
e_source_set_property (source, "username", username);
e_source_set_property (source, "auth", "1");
e_source_set_property (source, "auth-domain", "Exchange");
- e_source_group_add_source (cal_source_group,
+ e_source_group_add_source (cal_source_group,
source, -1);
#if 0
ids = gconf_client_get_list (client,
@@ -358,10 +358,10 @@ add_account_esources (ExchangeAccount *account,
g_object_unref (source);
g_free (relative_uri);
-
+
}
else if (folder->type == EXCHANGE_TASKS_FOLDER){
- relative_uri = g_strdup (folder->uri +
+ relative_uri = g_strdup (folder->uri +
strlen (EXCHANGE_URI_PREFIX));
source = e_source_new (folder->name, relative_uri);
if (offline_mode == ONLINE_MODE)
@@ -370,7 +370,7 @@ add_account_esources (ExchangeAccount *account,
e_source_set_property (source, "username", username);
e_source_set_property (source, "auth", "1");
e_source_set_property (source, "auth-domain", "Exchange");
- e_source_group_add_source (tasks_source_group,
+ e_source_group_add_source (tasks_source_group,
source, -1);
#if 0
ids = gconf_client_get_list (client,
@@ -388,7 +388,7 @@ add_account_esources (ExchangeAccount *account,
g_free (relative_uri);
}
}
-
+
e_source_list_sync (cal_source_list, NULL);
e_source_list_sync (tasks_source_list, NULL);
e_source_list_sync (contacts_source_list, NULL);
@@ -410,7 +410,7 @@ add_new_sources (ExchangeAccount *account)
{
GPtrArray *exchange_folders;
- exchange_folders = exchange_account_get_folders (account);
+ exchange_folders = exchange_account_get_folders (account);
if (exchange_folders && exchange_folders->len > 0) {
int i;
const char *folder_type;
@@ -427,7 +427,7 @@ add_new_sources (ExchangeAccount *account)
hier = e_folder_exchange_get_hierarchy (folder);
if (hier->type != EXCHANGE_HIERARCHY_PUBLIC) {
folder_name = e_folder_get_name (folder);
- folder_uri = e_folder_get_physical_uri (folder);
+ folder_uri = e_folder_get_physical_uri (folder);
folder_type = e_folder_get_type_string (folder);
if (!(strcmp (folder_type, "calendar")) ||
@@ -451,7 +451,7 @@ add_new_sources (ExchangeAccount *account)
}
if (create_esource)
- add_folder_esource (account, type,
+ add_folder_esource (account, type,
folder_name, folder_uri);
} /* End hierarchy type check */
} /* End for loop */
@@ -463,7 +463,7 @@ add_sources (ExchangeAccount *account)
{
GPtrArray *exchange_folders;
- exchange_folders = exchange_account_get_folders (account);
+ exchange_folders = exchange_account_get_folders (account);
if (exchange_folders && exchange_folders->len > 0) {
int i;
const char *folder_type;
@@ -479,14 +479,14 @@ add_sources (ExchangeAccount *account)
if (!(strcmp (folder_type, "calendar")) ||
!(strcmp (folder_type, "calendar/public"))) {
folder_info->name = e_folder_get_name (folder);
- folder_info->uri = e_folder_get_physical_uri (folder);
+ folder_info->uri = e_folder_get_physical_uri (folder);
folder_info->type = EXCHANGE_CALENDAR_FOLDER;
folders = g_slist_append (folders, folder_info);
}
else if (!(strcmp (folder_type, "tasks")) ||
!(strcmp (folder_type, "tasks/public"))) {
folder_info->name = e_folder_get_name (folder);
- folder_info->uri = e_folder_get_physical_uri (folder);
+ folder_info->uri = e_folder_get_physical_uri (folder);
folder_info->type = EXCHANGE_TASKS_FOLDER;
folders = g_slist_append (folders, folder_info);
}
@@ -494,7 +494,7 @@ add_sources (ExchangeAccount *account)
!(strcmp (folder_type, "contacts/public")) ||
!(strcmp (folder_type, "contacts/ldap"))) {
folder_info->name = e_folder_get_name (folder);
- folder_info->uri = e_folder_get_physical_uri (folder);
+ folder_info->uri = e_folder_get_physical_uri (folder);
folder_info->type = EXCHANGE_CONTACTS_FOLDER;
folders = g_slist_append (folders, folder_info);
}
@@ -509,8 +509,8 @@ add_sources (ExchangeAccount *account)
}
#endif
-static void
-remove_account_esource (ExchangeAccount *account,
+static void
+remove_account_esource (ExchangeAccount *account,
FolderType folder_type)
{
ESourceGroup *group;
@@ -528,10 +528,10 @@ remove_account_esource (ExchangeAccount *account,
client = gconf_client_get_default ();
if (folder_type == EXCHANGE_CONTACTS_FOLDER)
- source_list = e_source_list_new_for_gconf ( client,
+ source_list = e_source_list_new_for_gconf ( client,
CONF_KEY_CONTACTS);
else if (folder_type == EXCHANGE_CALENDAR_FOLDER)
- source_list = e_source_list_new_for_gconf ( client,
+ source_list = e_source_list_new_for_gconf ( client,
CONF_KEY_CAL);
else if (folder_type == EXCHANGE_TASKS_FOLDER)
source_list = e_source_list_new_for_gconf ( client,
@@ -555,19 +555,19 @@ remove_account_esource (ExchangeAccount *account,
/* Remove from the selected folders */
if (folder_type == EXCHANGE_CALENDAR_FOLDER) {
ids = gconf_client_get_list (
- client,
- CONF_KEY_SELECTED_CAL_SOURCES ,
+ client,
+ CONF_KEY_SELECTED_CAL_SOURCES ,
GCONF_VALUE_STRING, NULL);
if (ids) {
node_to_be_deleted = g_slist_find_custom (
- ids,
- source_uid,
+ ids,
+ source_uid,
(GCompareFunc) strcmp);
if (node_to_be_deleted) {
g_free (node_to_be_deleted->data);
- ids = g_slist_delete_link (ids,
+ ids = g_slist_delete_link (ids,
node_to_be_deleted);
- gconf_client_set_list (client,
+ gconf_client_set_list (client,
CONF_KEY_SELECTED_CAL_SOURCES,
GCONF_VALUE_STRING, ids, NULL);
}
@@ -576,19 +576,19 @@ remove_account_esource (ExchangeAccount *account,
}
}
else if (folder_type == EXCHANGE_TASKS_FOLDER) {
- ids = gconf_client_get_list (client,
- CONF_KEY_SELECTED_TASKS_SOURCES ,
+ ids = gconf_client_get_list (client,
+ CONF_KEY_SELECTED_TASKS_SOURCES ,
GCONF_VALUE_STRING, NULL);
if (ids) {
node_to_be_deleted = g_slist_find_custom (
ids,
- source_uid,
+ source_uid,
(GCompareFunc) strcmp);
if (node_to_be_deleted) {
g_free (node_to_be_deleted->data);
- ids = g_slist_delete_link (ids,
+ ids = g_slist_delete_link (ids,
node_to_be_deleted);
- gconf_client_set_list (client,
+ gconf_client_set_list (client,
CONF_KEY_SELECTED_TASKS_SOURCES,
GCONF_VALUE_STRING, ids, NULL);
}
@@ -617,17 +617,17 @@ remove_account_esources (ExchangeAccount *account)
}
#ifdef HAVE_KRB5
-static char *
+static char *
get_new_exchange_password (ExchangeAccount *account)
{
char *old_password, *new_password;
old_password = exchange_account_get_password (account);
new_password = exchange_get_new_password (old_password, 0);
-
+
if (new_password) {
- exchange_account_set_password (account,
- old_password,
+ exchange_account_set_password (account,
+ old_password,
new_password);
g_free (old_password);
return new_password;
@@ -661,7 +661,7 @@ display_passwd_expiry_message (int max_passwd_age, ExchangeAccount *account)
GtkLabel *warning_msg_label;
char *passwd_expiry_msg =
g_strdup_printf (_("Your password will expire in the next %d days"), max_passwd_age);
-
+
xml = glade_xml_new (FILENAME, ROOTNODE, NULL);
g_return_if_fail (xml != NULL);
top_widget = glade_xml_get_widget (xml, ROOTNODE);
@@ -677,17 +677,17 @@ display_passwd_expiry_message (int max_passwd_age, ExchangeAccount *account)
g_signal_connect (change_passwd_button,
"clicked",
G_CALLBACK (change_passwd_cb),
- account);
+ account);
#endif
response = gtk_dialog_run (GTK_DIALOG (top_widget));
-
+
gtk_widget_destroy (top_widget);
g_object_unref (xml);
g_free (passwd_expiry_msg);
}
-ExchangeAccountResult
-exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener, ExchangeAccount *account)
+ExchangeAccountResult
+exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener, ExchangeAccount *account)
{
ExchangeConfigListenerPrivate *priv;
ExchangeAccountResult result;
@@ -707,7 +707,7 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener,
remember_password = camel_url_get_param (camel_url, "save-passwd");
password = e_passwords_get_password ("Exchange", key);
if (!password) {
- oldremember = remember = exchange_account_is_save_password (account);
+ oldremember = remember = exchange_account_is_save_password (account);
title = g_strdup_printf (_("Enter Password for %s"), account->account_name);
password = e_passwords_ask_password (title, "Exchange", key, title,
E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET,
@@ -760,17 +760,17 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener,
switch (result) {
case EXCHANGE_ACCOUNT_QUOTA_RECIEVE_ERROR:
- current_quota_usage = g_strdup_printf ("%.2f",
+ current_quota_usage = g_strdup_printf ("%.2f",
account->mbox_size);
error_code = "org-gnome-exchange-operations:account-quota-error";
break;
case EXCHANGE_ACCOUNT_QUOTA_SEND_ERROR:
- current_quota_usage = g_strdup_printf ("%.2f",
+ current_quota_usage = g_strdup_printf ("%.2f",
account->mbox_size);
error_code = "org-gnome-exchange-operations:account-quota-send-error";
break;
case EXCHANGE_ACCOUNT_QUOTA_WARN:
- current_quota_usage = g_strdup_printf ("%.2f",
+ current_quota_usage = g_strdup_printf ("%.2f",
account->mbox_size);
error_code = "org-gnome-exchange-operations:account-quota-warn";
break;
@@ -780,14 +780,14 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener,
if (current_quota_usage) {
widget = e_error_new (NULL, error_code, current_quota_usage);
- g_signal_connect ((GtkDialog *)widget, "response",
+ g_signal_connect ((GtkDialog *)widget, "response",
G_CALLBACK (gtk_widget_destroy), widget);
gtk_widget_show (widget);
g_free (current_quota_usage);
}
- /* reset result, so that we check if the password
- * expiry warning period
+ /* reset result, so that we check if the password
+ * expiry warning period
*/
result = EXCHANGE_ACCOUNT_CONNECT_SUCCESS;
}
@@ -821,7 +821,7 @@ exchange_config_listener_authenticate (ExchangeConfigListener *ex_conf_listener,
g_object_unref (xml);
return result;
}
-
+
response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
g_object_unref (xml);
@@ -925,7 +925,7 @@ requires_relogin (char *current_url, char *new_url)
relogin = TRUE;
goto end;
}
-
+
if (current_uri->authmech || new_uri->authmech) {
if (current_uri->authmech && new_uri->authmech) {
if (strcmp (current_uri->authmech, new_uri->authmech)) {
@@ -933,7 +933,7 @@ requires_relogin (char *current_url, char *new_url)
relogin = TRUE;
goto end;
}
- }
+ }
else {
/* Auth mechanism is set for the first time */
relogin = TRUE;
@@ -941,10 +941,10 @@ requires_relogin (char *current_url, char *new_url)
}
}
- for (i=0; i<n_params; i++) {
+ for (i=0; i<n_params; i++) {
current_param_val = e2k_uri_get_param (current_uri, params[i]);
- new_param_val = e2k_uri_get_param (new_uri, params[i]);
-
+ new_param_val = e2k_uri_get_param (new_uri, params[i]);
+
if (current_param_val && new_param_val) {
/* both the urls have params to be compared */
if (strcmp (current_param_val, new_param_val)) {
@@ -990,11 +990,11 @@ account_changed (EAccountList *account_list, EAccount *account)
return;
}
- /* FIXME: The order of the parameters in the Camel URL string is not in
+ /* FIXME: The order of the parameters in the Camel URL string is not in
* order for the two given strings. So, we will not be able to use
* plain string comparison. Instead compare the parameters one by one.
*/
- if (exchange_camel_urls_is_equal (config_listener->priv->configured_uri,
+ if (exchange_camel_urls_is_equal (config_listener->priv->configured_uri,
account->source->url) &&
!strcmp (config_listener->priv->configured_name, account->name)) {
/* The user changed something we don't care about. */
@@ -1025,18 +1025,18 @@ account_changed (EAccountList *account_list, EAccount *account)
return;
}
- /* If account name has changed, or the url value has changed, which
- * could be due to change in hostname or some parameter value,
- * remove old e-sources
+ /* If account name has changed, or the url value has changed, which
+ * could be due to change in hostname or some parameter value,
+ * remove old e-sources
*/
- if (requires_relogin (config_listener->priv->configured_uri,
+ if (requires_relogin (config_listener->priv->configured_uri,
account->source->url)) {
remove_account_esources (priv->exchange_account);
exchange_account_forget_password (priv->exchange_account);
} else if (strcmp (config_listener->priv->configured_name, account->name)) {
/* remove_account_esources (priv->exchange_account); */
exchange_config_listener_modify_esource_group_name (config_listener,
- config_listener->priv->configured_name,
+ config_listener->priv->configured_name,
account->name);
g_free (config_listener->priv->configured_name);
config_listener->priv->configured_name = g_strdup (account->name);
@@ -1045,9 +1045,9 @@ account_changed (EAccountList *account_list, EAccount *account)
/* FIXME: Do ESources need to be modified? */
return;
}
-
+
/* Nope. Let the user know we're ignoring him. */
- e_error_run (NULL, "org-gnome-exchange-operations:apply-restart",
+ e_error_run (NULL, "org-gnome-exchange-operations:apply-restart",
priv->configured_name, NULL);
/* But note the new URI so if he changes something else, we
@@ -1085,7 +1085,7 @@ account_removed (EAccountList *account_list, EAccount *account)
priv->configured_uri = NULL;
g_free (priv->configured_name);
priv->configured_name = NULL;
- }
+ }
}
static gboolean
@@ -1124,7 +1124,7 @@ exchange_config_listener_get_offline_status (ExchangeConfigListener *excl,
gconf_value_free (value);
return status;
-}
+}
/**
* exchange_config_listener_new:
@@ -1170,22 +1170,22 @@ exchange_config_listener_get_accounts (ExchangeConfigListener *config_listener)
/**
* exchange_config_listener_modify_esource_group_name
*
- * @excl: Handle for Exchange Config Listener
+ * @excl: Handle for Exchange Config Listener
* @old_name: Old name of the ESourceGroup
* @new_name: New name of the ESourceGroup
*
* This function modifies the old source group name to the specified new
* source group name
- **/
-void
+ **/
+void
exchange_config_listener_modify_esource_group_name (ExchangeConfigListener *excl,
- const char *old_name,
+ const char *old_name,
const char *new_name)
{
GConfClient *client;
ESourceGroup *group;
GSList *groups;
- ESourceList *c_source_list = NULL, *t_source_list = NULL,
+ ESourceList *c_source_list = NULL, *t_source_list = NULL,
*a_source_list = NULL;
client = excl->priv->gconf;
@@ -1236,14 +1236,14 @@ exchange_config_listener_modify_esource_group_name (ExchangeConfigListener *excl
#if LDEAD
/**
* exchange_add_autocompletion_folders:
- *
+ *
* @gc_client: GConfClient handle
* @account: ExchangeAccount handle
*
* This function adds the GAL of the Exchange account to the autocompletion list
* while configuring a new Exchange account
*
- **/
+ **/
static void
exchange_add_autocompletion_folders (GConfClient *gc_client, ExchangeAccount *account)
{
@@ -1262,7 +1262,7 @@ exchange_add_autocompletion_folders (GConfClient *gc_client, ExchangeAccount *ac
&&
strcmp (e_source_group_peek_base_uri (group), EXCHANGE_URI_PREFIX) == 0) {
GSList *sources = e_source_group_peek_sources (group);
-
+
for( ; sources != NULL; sources = g_slist_next (sources)) {
ESource *source = E_SOURCE (sources->data);
const gchar *absolute_uri;
@@ -1286,8 +1286,8 @@ exchange_add_autocompletion_folders (GConfClient *gc_client, ExchangeAccount *ac
/**
- * exchange_camel_urls_is_equal
- *
+ * exchange_camel_urls_is_equal
+ *
* @url1: CAMEL URL string 1
* @url2: CAMEL URL string 2
*
@@ -1296,7 +1296,7 @@ exchange_add_autocompletion_folders (GConfClient *gc_client, ExchangeAccount *ac
*
* Return Value: Boolean result of the comparision.
*
- **/
+ **/
static gboolean
exchange_camel_urls_is_equal (const gchar *url1, const gchar *url2)
{
@@ -1311,7 +1311,7 @@ exchange_camel_urls_is_equal (const gchar *url1, const gchar *url2)
};
const int n_params = 5;
int i;
-
+
curl1 = camel_url_new (url1, NULL);
curl2 = camel_url_new (url2, NULL);
@@ -1325,7 +1325,7 @@ exchange_camel_urls_is_equal (const gchar *url1, const gchar *url2)
g_free (curl1);
g_free (curl2);
return FALSE;
- }
+ }
g_free (param1);
g_free (param2);
}
@@ -1337,14 +1337,14 @@ exchange_camel_urls_is_equal (const gchar *url1, const gchar *url2)
/**
* remove_selected_non_offline_esources
- *
+ *
* @account: Handle for Exchange Account
* @gconf_key: GConf key of the calendar or tasks
*
- * This function removes the non-offline calendars and taks list from the
+ * This function removes the non-offline calendars and taks list from the
* selection list
- **/
-static void
+ **/
+static void
remove_selected_non_offline_esources (ExchangeAccount *account, const char *gconf_key)
{
ESourceGroup *group;
@@ -1388,21 +1388,21 @@ remove_selected_non_offline_esources (ExchangeAccount *account, const char *gcon
source_uid = e_source_peek_uid (source);
/* Remove from the selected folders */
- ids = gconf_client_get_list (client,
- selected_gconf_key,
+ ids = gconf_client_get_list (client,
+ selected_gconf_key,
GCONF_VALUE_STRING, NULL);
if (ids) {
offline_mode = e_source_get_property (source, "offline_sync");
- if (!offline_mode ||
+ if (!offline_mode ||
(offline_mode && strcmp (offline_mode, "1"))) {
- while ((node_to_be_deleted =
- g_slist_find_custom (ids,
- source_uid,
+ while ((node_to_be_deleted =
+ g_slist_find_custom (ids,
+ source_uid,
(GCompareFunc) strcmp))) {
g_free (node_to_be_deleted->data);
- ids = g_slist_delete_link (ids,
+ ids = g_slist_delete_link (ids,
node_to_be_deleted);
- gconf_client_set_list (client,
+ gconf_client_set_list (client,
selected_gconf_key,
GCONF_VALUE_STRING, ids, NULL);
}
@@ -1415,7 +1415,7 @@ remove_selected_non_offline_esources (ExchangeAccount *account, const char *gcon
e_source_list_sync (source_list, NULL);
}
}
-
+
g_free (selected_gconf_key);
g_object_unref (source_list);
g_object_unref (client);
diff --git a/plugins/exchange-operations/exchange-config-listener.h b/plugins/exchange-operations/exchange-config-listener.h
index 19f59f5c1a..edf6208255 100644
--- a/plugins/exchange-operations/exchange-config-listener.h
+++ b/plugins/exchange-operations/exchange-config-listener.h
@@ -59,10 +59,10 @@ void remove_folder_esource (ExchangeAccount *account, FolderType folder_type,
ExchangeConfigListenerStatus exchange_config_listener_get_offline_status (ExchangeConfigListener *excl, gint *mode);
void exchange_config_listener_modify_esource_group_name (ExchangeConfigListener *excl,
- const char *old_name,
+ const char *old_name,
const char *new_name);
-ExchangeAccountResult exchange_config_listener_authenticate (ExchangeConfigListener *excl,
+ExchangeAccountResult exchange_config_listener_authenticate (ExchangeConfigListener *excl,
ExchangeAccount *account);
#ifdef __cplusplus
diff --git a/plugins/exchange-operations/exchange-contacts.c b/plugins/exchange-operations/exchange-contacts.c
index 3e6367a224..147bf1fe14 100644
--- a/plugins/exchange-operations/exchange-contacts.c
+++ b/plugins/exchange-operations/exchange-contacts.c
@@ -58,7 +58,7 @@ void e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target);
/* FIXME: Reconsider the prototype of this function */
static GPtrArray *
-e_exchange_contacts_get_contacts (void)
+e_exchange_contacts_get_contacts (void)
{
ExchangeAccount *account;
GPtrArray *folder_array;
@@ -156,14 +156,14 @@ e_exchange_contacts_pcontacts (EPlugin *epl, EConfigHookItemFactoryData *data)
}
}
- exchange_config_listener_get_offline_status (exchange_global_config_listener,
+ exchange_config_listener_get_offline_status (exchange_global_config_listener,
&offline_status);
if (offline_status == OFFLINE_MODE) {
/* Evolution is in offline mode; we will not be able to create
new folders or modify existing folders. */
- offline_msg = g_markup_printf_escaped ("<b>%s</b>",
+ offline_msg = g_markup_printf_escaped ("<b>%s</b>",
_("Evolution is in offline mode. You cannot create or modify folders now.\nPlease switch to online mode for such operations."));
- vb_offline_msg = gtk_vbox_new (FALSE, 6);
+ vb_offline_msg = gtk_vbox_new (FALSE, 6);
gtk_container_add (GTK_CONTAINER (data->parent), vb_offline_msg);
lbl_offline_msg = gtk_label_new ("");
gtk_label_set_markup (GTK_LABEL (lbl_offline_msg), offline_msg);
@@ -171,7 +171,7 @@ e_exchange_contacts_pcontacts (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_box_pack_start (GTK_BOX (vb_offline_msg), lbl_offline_msg, FALSE, FALSE, 0);
gtk_widget_show_all (vb_offline_msg);
g_free (uri_text);
- return vb_offline_msg;
+ return vb_offline_msg;
}
if (gal_folder) {
@@ -235,14 +235,14 @@ e_exchange_contacts_pcontacts (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_widget_show (lbl_pcontacts);
gtk_misc_set_alignment (GTK_MISC (lbl_pcontacts), 0.0, 0.5);
gtk_box_pack_start (GTK_BOX (vb_pcontacts), lbl_pcontacts, FALSE, FALSE, 0);
-
+
ts_pcontacts = gtk_tree_store_new (NUM_COLS, G_TYPE_STRING, G_TYPE_STRING);
conlist = e_exchange_contacts_get_contacts ();
for (i=0; i<conlist->len; ++i) {
ruri = g_ptr_array_index (conlist, i);
- exchange_operations_cta_add_node_to_tree (ts_pcontacts, NULL, ruri);
+ exchange_operations_cta_add_node_to_tree (ts_pcontacts, NULL, ruri);
}
cr_contacts = gtk_cell_renderer_text_new ();
@@ -251,7 +251,7 @@ e_exchange_contacts_pcontacts (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_tree_view_append_column (GTK_TREE_VIEW (tv_pcontacts), tvc_contacts);
g_object_set (tv_pcontacts,"expander-column", tvc_contacts, "headers-visible", TRUE, NULL);
gtk_tree_view_expand_all (GTK_TREE_VIEW (tv_pcontacts));
-
+
scrw_pcontacts = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrw_pcontacts), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrw_pcontacts), GTK_SHADOW_IN);
@@ -272,7 +272,7 @@ e_exchange_contacts_pcontacts (EPlugin *epl, EConfigHookItemFactoryData *data)
tmpruri = (gchar*) rel_uri;
uri_prefix = g_strconcat (account->account_filename, "/;", NULL);
prefix_len = strlen (uri_prefix);
-
+
if (g_str_has_prefix (tmpruri, uri_prefix)) {
sruri = g_strdup (tmpruri+prefix_len);
}
@@ -281,24 +281,24 @@ e_exchange_contacts_pcontacts (EPlugin *epl, EConfigHookItemFactoryData *data)
}
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tv_pcontacts));
- exchange_operations_cta_select_node_from_tree (ts_pcontacts,
- NULL,
- sruri,
- sruri,
+ exchange_operations_cta_select_node_from_tree (ts_pcontacts,
+ NULL,
+ sruri,
+ sruri,
selection);
- gtk_widget_set_sensitive (tv_pcontacts, FALSE);
-
+ gtk_widget_set_sensitive (tv_pcontacts, FALSE);
+
g_free (uri_prefix);
g_free (sruri);
}
- g_ptr_array_free (conlist, TRUE);
+ g_ptr_array_free (conlist, TRUE);
g_object_unref (ts_pcontacts);
return vb_pcontacts;
}
-gboolean
-e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data)
+gboolean
+e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data)
{
/* FIXME - check pageid */
EABConfigTargetSource *t = (EABConfigTargetSource *) data->target;
@@ -311,7 +311,7 @@ e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data)
rel_uri = e_source_peek_relative_uri (t->source);
group = e_source_peek_group (t->source);
base_uri = e_source_group_peek_base_uri (group);
- exchange_config_listener_get_offline_status (exchange_global_config_listener,
+ exchange_config_listener_get_offline_status (exchange_global_config_listener,
&offline_status);
if (base_uri && !g_ascii_strncasecmp (base_uri, "exchange", 8)) {
if (offline_status == OFFLINE_MODE)
@@ -335,7 +335,7 @@ e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data)
ESourceGroup *source_group = NULL;
GSList *groups;
ESource *source;
-
+
/* GAL folder */
client = gconf_client_get_default ();
source_list = e_source_list_new_for_gconf ( client, CONF_KEY_CONTACTS);
@@ -345,7 +345,7 @@ e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data)
if ((source_group = e_source_list_peek_group_by_name (source_list,
account->account_name))) {
source = e_source_group_peek_source_by_name (source_group, e_source_peek_name (t->source));
- if (e_source_group_peek_source_by_name (source_group,
+ if (e_source_group_peek_source_by_name (source_group,
e_source_peek_name (t->source))) {
/* not a rename of GAL */
g_object_unref (source_list);
@@ -353,7 +353,7 @@ e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data)
}
else {
g_object_unref (source_list);
- return FALSE;
+ return FALSE;
}
}
else {
@@ -381,9 +381,9 @@ e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data)
folder_name = g_strdup (g_strrstr (path, "/") +1);
g_free (path);
- if (strcmp (folder_name, e_source_peek_name (t->source))) {
+ if (strcmp (folder_name, e_source_peek_name (t->source))) {
/* rename */
- if (exchange_account_get_standard_uri (account, folder_name) ||
+ if (exchange_account_get_standard_uri (account, folder_name) ||
!is_personal) {
/* rename of standard/non-personal folder */
g_free (folder_name);
@@ -395,7 +395,7 @@ e_exchange_contacts_check (EPlugin *epl, EConfigHookPageCheckData *data)
return TRUE;
}
-void
+void
e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target)
{
EABConfigTargetSource *t = (EABConfigTargetSource *) target;
@@ -407,15 +407,15 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target)
ExchangeAccountFolderResult result;
gint offline_status;
gboolean rename = FALSE;
-
+
uri_text = e_source_get_uri (source);
if (uri_text && strncmp (uri_text, "exchange", 8)) {
/* here no need of checking for gal */
g_free (uri_text);
return;
- }
+ }
- exchange_config_listener_get_offline_status (exchange_global_config_listener,
+ exchange_config_listener_get_offline_status (exchange_global_config_listener,
&offline_status);
if (offline_status == OFFLINE_MODE) {
g_free (uri_text);
@@ -444,11 +444,11 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target)
euri = e_uri_new (uri_text);
uri_string = e_uri_to_string (euri, FALSE);
e_uri_free (euri);
-
- uri_len = strlen (uri_string) + 1;
+
+ uri_len = strlen (uri_string) + 1;
tmpruri = g_strdup (uri_string + strlen ("exchange://"));
temp_path = g_build_filename ("/", uri_text + uri_len, NULL);
- prefix = g_strndup (temp_path, strlen (temp_path) - strlen (g_strrstr (temp_path, "/")));
+ prefix = g_strndup (temp_path, strlen (temp_path) - strlen (g_strrstr (temp_path, "/")));
g_free (temp_path);
path = g_build_filename (prefix, "/", gname, NULL);
ruri = g_strconcat (tmpruri, ";", path+1, NULL);
@@ -511,7 +511,7 @@ e_exchange_contacts_commit (EPlugin *epl, EConfigTarget *target)
case EXCHANGE_ACCOUNT_FOLDER_UNSUPPORTED_OPERATION:
e_error_run (NULL, ERROR_DOMAIN ":folder-unsupported-error", NULL);
break;
- case EXCHANGE_ACCOUNT_FOLDER_GENERIC_ERROR:
+ case EXCHANGE_ACCOUNT_FOLDER_GENERIC_ERROR:
e_error_run (NULL, ERROR_DOMAIN ":folder-generic-error", NULL);
break;
default:
diff --git a/plugins/exchange-operations/exchange-delegates-user.c b/plugins/exchange-operations/exchange-delegates-user.c
index 062a11a193..d7da5d22b5 100644
--- a/plugins/exchange-operations/exchange-delegates-user.c
+++ b/plugins/exchange-operations/exchange-delegates-user.c
@@ -76,8 +76,8 @@ const char *exchange_delegates_user_folder_names[] = {
"calendar", "tasks", "inbox", "contacts"
};
-/* To translators: The folder names to be displayed in the message being
- sent to the delegatee.
+/* To translators: The folder names to be displayed in the message being
+ sent to the delegatee.
*/
static const char *folder_names_for_display[] = {
N_("Calendar"), N_("Tasks"), N_("Inbox"), N_("Contacts")
@@ -177,11 +177,11 @@ parent_window_destroyed (gpointer dialog, GObject *where_parent_window_was)
*/
static const char *
map_to_full_role_name (E2kPermissionsRole role_nam)
-{
+{
const char *role_name;
switch (role_nam)
- {
+ {
/* To translators: The following are the various types of permissions that can
assigned by an user to his folders.
*/
@@ -195,7 +195,7 @@ map_to_full_role_name (E2kPermissionsRole role_nam)
case E2K_PERMISSIONS_ROLE_REVIEWER: role_name = g_strdup (
_("Reviewer (read-only)"));
- break;
+ break;
default: role_name = g_strdup (_("None"));
break;
@@ -224,10 +224,10 @@ em_utils_delegates_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag
* Return value: %TRUE for "OK", %FALSE for "Cancel".
**/
gboolean
-exchange_delegates_user_edit (ExchangeAccount *account,
+exchange_delegates_user_edit (ExchangeAccount *account,
ExchangeDelegatesUser *user,
GtkWidget *parent_window)
-{
+{
GladeXML *xml;
GtkWidget *dialog, *table, *label, *menu, *check, *check_delegate;
char *title;
@@ -303,11 +303,11 @@ exchange_delegates_user_edit (ExchangeAccount *account,
/* The following piece of code is used to construct a mail message to be sent to a Delegate
summarizing all the permissions set for him on the user's various folders.
- */
+ */
check_delegate = glade_xml_get_widget (xml, "delegate_mail");
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_delegate)) == TRUE) {
if (button == GTK_RESPONSE_OK) {
-
+
EAccount *eaccount;
CamelMimeMessage *delegate_mail = camel_mime_message_new ();
CamelMultipart *body = camel_multipart_new ();
@@ -315,13 +315,13 @@ exchange_delegates_user_edit (ExchangeAccount *account,
CamelDataWrapper *delegate_mail_text, *delegate_mail_data;
CamelContentType *type;
CamelInternetAddress *addr;
- CamelStream *stream;
+ CamelStream *stream;
CamelFolder *out_folder;
- CamelMessageInfo *info;
+ CamelMessageInfo *info;
char *self_address, *delegate_mail_subject;
char *role_name;
char *role_name_final = "";
-
+
const char *recipient_address;
const char *delegate_exchange_dn;
const char *msg_part1 = NULL, *msg_part2 = NULL;
@@ -332,7 +332,7 @@ exchange_delegates_user_edit (ExchangeAccount *account,
/* Create toplevel container */
camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (body),
"multipart/alternative;");
- camel_multipart_set_boundary (body, NULL);
+ camel_multipart_set_boundary (body, NULL);
/* Create textual receipt */
delegate_mail_text = camel_data_wrapper_new ();
@@ -341,13 +341,13 @@ exchange_delegates_user_edit (ExchangeAccount *account,
camel_data_wrapper_set_mime_type_field (delegate_mail_text, type);
camel_content_type_unref (type);
stream = camel_stream_mem_new ();
-
- /* To translators: This is a part of the message to be sent to the delegatee
+
+ /* To translators: This is a part of the message to be sent to the delegatee
summarizing the permissions assigned to him.
*/
msg_part1 = _("This message was sent automatically by Evolution to inform you that you have been "
"designated as a delegate. You can now send messages on my behalf.");
-
+
/* To translators: Another chunk of the same message.
*/
msg_part2 = _("You have been given the following permissions on my folders:");
@@ -367,14 +367,14 @@ exchange_delegates_user_edit (ExchangeAccount *account,
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)) == TRUE) {
/* To translators: This message is included if the delegatee has been given access
to the private items.
- */
+ */
camel_stream_printf (stream, "<br>%s", _("You are also permitted "
"to see my private items."));
}
else
/* To translators: This message is included if the delegatee has not been given access
to the private items.
- */
+ */
camel_stream_printf (stream, "<br>%s", _("However you are not permitted "
"to see my private items."));
camel_data_wrapper_construct_from_stream (delegate_mail_text, stream);
@@ -386,7 +386,7 @@ exchange_delegates_user_edit (ExchangeAccount *account,
camel_medium_set_content_object (CAMEL_MEDIUM (part), delegate_mail_text);
camel_object_unref (delegate_mail_text);
camel_multipart_add_part (body, part);
- camel_object_unref (part);
+ camel_object_unref (part);
/* Create the machine-readable receipt */
delegate_mail_data = camel_data_wrapper_new ();
@@ -401,7 +401,7 @@ exchange_delegates_user_edit (ExchangeAccount *account,
camel_medium_set_content_object (CAMEL_MEDIUM (part), delegate_mail_data);
camel_object_unref (delegate_mail_data);
camel_multipart_add_part (body, part);
- camel_object_unref (part);
+ camel_object_unref (part);
/* Finish creating the message */
camel_medium_set_content_object (CAMEL_MEDIUM (delegate_mail), CAMEL_DATA_WRAPPER (body));
@@ -432,9 +432,9 @@ exchange_delegates_user_edit (ExchangeAccount *account,
if(eaccount) {
camel_medium_set_header (CAMEL_MEDIUM (delegate_mail),
"X-Evolution-Account", eaccount->uid);
- camel_medium_set_header (CAMEL_MEDIUM (delegate_mail),
+ camel_medium_set_header (CAMEL_MEDIUM (delegate_mail),
"X-Evolution-Transport", eaccount->transport->url);
- camel_medium_set_header (CAMEL_MEDIUM (delegate_mail),
+ camel_medium_set_header (CAMEL_MEDIUM (delegate_mail),
"X-Evolution-Fcc", eaccount->sent_folder_uri);
}
diff --git a/plugins/exchange-operations/exchange-delegates-user.h b/plugins/exchange-operations/exchange-delegates-user.h
index ee4d8db80e..9a705f0d9d 100644
--- a/plugins/exchange-operations/exchange-delegates-user.h
+++ b/plugins/exchange-operations/exchange-delegates-user.h
@@ -59,9 +59,9 @@ ExchangeDelegatesUser *exchange_delegates_user_new_from_gc (E2kGlobalCatalog
const char *email,
GByteArray *creator_entryid);
-gboolean exchange_delegates_user_edit (ExchangeAccount *account, ExchangeDelegatesUser *user,
+gboolean exchange_delegates_user_edit (ExchangeAccount *account, ExchangeDelegatesUser *user,
GtkWidget *parent_window);
-
+
#ifdef __cplusplus
diff --git a/plugins/exchange-operations/exchange-delegates.c b/plugins/exchange-operations/exchange-delegates.c
index 4c4bc7efc9..46088b9ba8 100644
--- a/plugins/exchange-operations/exchange-delegates.c
+++ b/plugins/exchange-operations/exchange-delegates.c
@@ -220,7 +220,7 @@ get_folder_security (ExchangeDelegates *delegates)
return delegates->loaded_folders;
if (!exchange_account_get_global_catalog (delegates->account)) {
- e_error_run (GTK_WINDOW (delegates->table), ERROR_DOMAIN ":delegates-no-gcs-error",
+ e_error_run (GTK_WINDOW (delegates->table), ERROR_DOMAIN ":delegates-no-gcs-error",
NULL);
return FALSE;
}
@@ -259,7 +259,7 @@ get_folder_security (ExchangeDelegates *delegates)
status = e2k_result_iter_free (iter);
if (!E2K_HTTP_STATUS_IS_SUCCESSFUL (status)) {
- e_error_run (GTK_WINDOW (delegates->table), ERROR_DOMAIN ":delegates-perm-read-error",
+ e_error_run (GTK_WINDOW (delegates->table), ERROR_DOMAIN ":delegates-perm-read-error",
NULL);
return FALSE;
}
@@ -359,7 +359,7 @@ get_user_list (ExchangeDelegates *delegates)
* to end up in state 1. That's what this is for.
*/
static void
-add_remove_user (ExchangeDelegatesUser *user,
+add_remove_user (ExchangeDelegatesUser *user,
GPtrArray *to_array, GPtrArray *from_array)
{
ExchangeDelegatesUser *match;
@@ -450,7 +450,7 @@ add_button_clicked_cb (GtkWidget *widget, gpointer data)
match = delegates->users->pdata[u];
if (e2k_sid_binary_sid_equal (e2k_sid_get_binary_sid (user->sid),
e2k_sid_get_binary_sid (match->sid))) {
- e_error_run (GTK_WINDOW (parent_window), ERROR_DOMAIN ":delegate-existing",
+ e_error_run (GTK_WINDOW (parent_window), ERROR_DOMAIN ":delegate-existing",
user->display_name, NULL);
g_object_unref (user);
exchange_delegates_user_edit (delegates->account, match, parent_window);
@@ -524,9 +524,9 @@ email_look_up (const char *delegate_legacy, ExchangeAccount *account)
E2kGlobalCatalogStatus status;
const char *email_id;
-
+
gc = exchange_account_get_global_catalog (account);
-
+
if (!gc)
return NULL;
@@ -585,7 +585,7 @@ remove_button_clicked_cb (GtkWidget *widget, gpointer data)
GTK_BUTTONS_YES_NO,
_("Remove the delegate %s?"),
user->display_name);
- e_dialog_set_transient_for (GTK_WINDOW (dialog), widget);
+ e_dialog_set_transient_for (GTK_WINDOW (dialog), widget);
btn = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -757,7 +757,7 @@ delegates_apply (ExchangeDelegates *delegates)
for (i = 0; i < delegates->users->len; i++) {
user = delegates->users->pdata[i];
- g_ptr_array_add (display_names, g_strdup (user->display_name));
+ g_ptr_array_add (display_names, g_strdup (user->display_name));
entryid_dup = g_byte_array_new ();
g_byte_array_append (entryid_dup, user->entryid->data,
user->entryid->len);
@@ -765,7 +765,7 @@ delegates_apply (ExchangeDelegates *delegates)
g_ptr_array_add (privflags, g_strdup_printf ("%d", user->see_private));
}
- props = e2k_properties_new ();
+ props = e2k_properties_new ();
e2k_properties_set_string_array (
props, PR_DELEGATES_DISPLAY_NAMES, display_names);
e2k_properties_set_binary_array (
@@ -773,7 +773,7 @@ delegates_apply (ExchangeDelegates *delegates)
e2k_properties_set_int_array (
props, PR_DELEGATES_SEE_PRIVATE, privflags);
} else if (delegates->removed_users) {
- props = e2k_properties_new ();
+ props = e2k_properties_new ();
e2k_properties_remove (props, PR_DELEGATES_DISPLAY_NAMES);
e2k_properties_remove (props, PR_DELEGATES_ENTRYIDS);
e2k_properties_remove (props, PR_DELEGATES_SEE_PRIVATE);
@@ -920,7 +920,7 @@ exchange_delegates (ExchangeAccount *account, GtkWidget *parent)
GtkTreeViewColumn *column;
GtkTreeIter iter;
int i;
-
+
g_return_if_fail (GTK_IS_WIDGET (parent));
g_return_if_fail (EXCHANGE_IS_ACCOUNT (account));
diff --git a/plugins/exchange-operations/exchange-folder-permission.c b/plugins/exchange-operations/exchange-folder-permission.c
index 5748dd491f..ed2a9c0f4a 100644
--- a/plugins/exchange-operations/exchange-folder-permission.c
+++ b/plugins/exchange-operations/exchange-folder-permission.c
@@ -44,7 +44,7 @@
#include "calendar/gui/e-cal-model.h"
#include "addressbook/gui/widgets/eab-menu.h"
-#define d(x)
+#define d(x)
static void org_folder_permissions_cb (EPopup *ep, EPopupItem *p, void *data);
void org_gnome_exchange_folder_permissions (EPlugin *ep, EMPopupTargetFolder *t);
@@ -255,7 +255,7 @@ org_gnome_exchange_menu_cal_permissions (EPlugin *ep, ECalMenuTargetSelect *targ
uri = (gchar *) e_cal_get_uri (ecal);
if (!uri)
return;
- else
+ else
if (!g_str_has_prefix (uri, "exchange://"))
return;
@@ -289,7 +289,7 @@ org_gnome_exchange_menu_tasks_permissions (EPlugin *ep, ECalMenuTargetSelect *ta
uri = (gchar *) e_cal_get_uri (ecal);
if (!uri)
return;
- else
+ else
if (!g_str_has_prefix (uri, "exchange://"))
return;
account = exchange_operations_get_exchange_account ();
@@ -320,7 +320,7 @@ org_gnome_exchange_menu_ab_permissions (EPlugin *ep, EABMenuTargetSelect *target
uri = (gchar *) e_book_get_uri (ebook);
if (!uri)
return;
- else
+ else
if (!g_str_has_prefix (uri, "exchange://"))
return;
diff --git a/plugins/exchange-operations/exchange-folder-size-display.c b/plugins/exchange-operations/exchange-folder-size-display.c
index c12f1872d9..594ce34c0c 100644
--- a/plugins/exchange-operations/exchange-folder-size-display.c
+++ b/plugins/exchange-operations/exchange-folder-size-display.c
@@ -50,9 +50,9 @@ get_folder_size_func (GtkTreeModel *model,
GHashTable *info = (GHashTable *) user_data;
gdouble folder_size;
char *folder_name;
-
+
gtk_tree_model_get(model, iter, COLUMN_SIZE, &folder_size, COLUMN_NAME, &folder_name, -1);
-
+
g_hash_table_insert (info, g_strdup (folder_name), g_strdup_printf ("%.2f", folder_size));
return FALSE;
}
@@ -90,9 +90,9 @@ format_size_func (GtkTreeViewColumn *col,
GtkCellRendererText *cell = (GtkCellRendererText *)renderer;
gdouble folder_size;
char * new_text;
-
+
gtk_tree_model_get(model, iter, COLUMN_SIZE, &folder_size, -1);
-
+
if (folder_size)
new_text = g_strdup_printf ("%.2f", folder_size);
else
@@ -138,7 +138,7 @@ exchange_folder_size_display (GtkListStore *model, GtkWidget *parent)
column = gtk_tree_view_column_new_with_attributes (
col_name, gtk_cell_renderer_text_new (), "text", COLUMN_SIZE, NULL);
g_free (col_name);
-
+
l = gtk_tree_view_column_get_cell_renderers (column);
cell = (GtkCellRenderer *)l->data;
gtk_tree_view_column_set_cell_data_func (column, cell, format_size_func, NULL, NULL );
diff --git a/plugins/exchange-operations/exchange-folder-subscription.c b/plugins/exchange-operations/exchange-folder-subscription.c
index 5f785500ad..17c7d27a52 100644
--- a/plugins/exchange-operations/exchange-folder-subscription.c
+++ b/plugins/exchange-operations/exchange-folder-subscription.c
@@ -171,7 +171,7 @@ typedef struct {
ExchangeAccount *account;
ENameSelector *name_selector;
GtkWidget *name_selector_widget;
- GtkWidget *folder_name_entry;
+ GtkWidget *folder_name_entry;
}SubscriptionInfo;
static void
@@ -184,8 +184,8 @@ destroy_subscription_info (SubscriptionInfo *subscription_info)
g_free (subscription_info);
}
-static void
-subscribe_to_folder (GtkWidget *dialog, gint response, gpointer data)
+static void
+subscribe_to_folder (GtkWidget *dialog, gint response, gpointer data)
{
SubscriptionInfo *subscription_info = data;
gchar *user_email_address = NULL, *folder_name = NULL, *path = NULL;
@@ -195,7 +195,7 @@ subscribe_to_folder (GtkWidget *dialog, gint response, gpointer data)
GList *destinations;
EDestination *destination;
ExchangeAccountFolderResult result;
-
+
if (response == GTK_RESPONSE_CANCEL) {
gtk_widget_destroy (dialog);
destroy_subscription_info (subscription_info);
@@ -226,7 +226,7 @@ subscribe_to_folder (GtkWidget *dialog, gint response, gpointer data)
}
}
- /* It would be nice to insensitivize the OK button appropriately
+ /* It would be nice to insensitivize the OK button appropriately
instead of doing this, but unfortunately we can't do this for the
Bonobo control. */
e_error_run (GTK_WINDOW (dialog), ERROR_DOMAIN ":select-user", NULL);
@@ -234,8 +234,8 @@ subscribe_to_folder (GtkWidget *dialog, gint response, gpointer data)
folder_name = g_strdup (gtk_entry_get_text (GTK_ENTRY (subscription_info->folder_name_entry)));
if (user_email_address && folder_name) {
- result = exchange_account_discover_shared_folder (subscription_info->account,
- user_email_address,
+ result = exchange_account_discover_shared_folder (subscription_info->account,
+ user_email_address,
folder_name, &folder);
g_free (folder_name);
switch (result) {
diff --git a/plugins/exchange-operations/exchange-folder.c b/plugins/exchange-operations/exchange-folder.c
index 8cb64c26a5..db2dc0e475 100644
--- a/plugins/exchange-operations/exchange-folder.c
+++ b/plugins/exchange-operations/exchange-folder.c
@@ -94,7 +94,7 @@ org_gnome_exchange_folder_inbox_unsubscribe (EPopup *ep, EPopupItem *p, void *da
path = target->uri + strlen ("exchange://") + strlen (account->account_filename);
/* User will be able to unsubscribe by doing a right click on
any one of this two-<other user's>Inbox or the
- <other user's folder> tree.
+ <other user's folder> tree.
*/
stored_path = strrchr (path + 1, '/');
@@ -125,13 +125,13 @@ org_gnome_exchange_folder_inbox_unsubscribe (EPopup *ep, EPopupItem *p, void *da
return;
case EXCHANGE_ACCOUNT_FOLDER_GENERIC_ERROR:
e_error_run (NULL, ERROR_DOMAIN ":folder-generic-error", NULL);
- return;
+ return;
case EXCHANGE_ACCOUNT_FOLDER_GC_NOTREACHABLE:
e_error_run (NULL, ERROR_DOMAIN ":folder-no-gc-error", NULL);
- return;
+ return;
case EXCHANGE_ACCOUNT_FOLDER_NO_SUCH_USER:
e_error_run (NULL, ERROR_DOMAIN ":no-user-error", NULL);
- return;
+ return;
}
/* We need to get the physical uri for the Inbox */
@@ -252,7 +252,7 @@ popup_ab_free (EPopup *ep, GSList *items, void *data)
}
void
-org_gnome_exchange_check_address_book_subscribed (EPlugin *ep, EABPopupTargetSource *target)
+org_gnome_exchange_check_address_book_subscribed (EPlugin *ep, EABPopupTargetSource *target)
{
GSList *menus = NULL;
int i = 0;
@@ -362,7 +362,7 @@ unsubscribe_dialog_ab_response (GtkDialog *dialog, int response, gpointer data)
e_source_group_remove_source_by_uid (source_group, source_uid);
g_free (path);
gtk_widget_destroy (GTK_WIDGET (dialog));
- }
+ }
if (response == GTK_RESPONSE_CANCEL)
gtk_widget_destroy (GTK_WIDGET (dialog));
if (response == GTK_RESPONSE_DELETE_EVENT)
@@ -397,19 +397,19 @@ unsubscribe_dialog_response (GtkDialog *dialog, int response, gpointer data)
path = g_strdup (ruri + strlen (account->account_filename));
exchange_account_remove_shared_folder (account, path);
- ids = gconf_client_get_list (client,
- CONF_KEY_SELECTED_CAL_SOURCES,
+ ids = gconf_client_get_list (client,
+ CONF_KEY_SELECTED_CAL_SOURCES,
GCONF_VALUE_STRING, NULL);
if (ids) {
node_to_be_deleted = g_slist_find_custom (
- ids,
- source_uid,
+ ids,
+ source_uid,
(GCompareFunc) strcmp);
if (node_to_be_deleted) {
g_free (node_to_be_deleted->data);
- ids = g_slist_delete_link (ids,
+ ids = g_slist_delete_link (ids,
node_to_be_deleted);
- gconf_client_set_list (client,
+ gconf_client_set_list (client,
CONF_KEY_SELECTED_CAL_SOURCES,
GCONF_VALUE_STRING, ids, NULL);
}
@@ -421,7 +421,7 @@ unsubscribe_dialog_response (GtkDialog *dialog, int response, gpointer data)
e_source_group_remove_source_by_uid (source_group, source_uid);
g_free (path);
gtk_widget_destroy (GTK_WIDGET (dialog));
- }
+ }
if (response == GTK_RESPONSE_CANCEL)
gtk_widget_destroy (GTK_WIDGET (dialog));
if (response == GTK_RESPONSE_DELETE_EVENT)
@@ -454,7 +454,7 @@ org_gnome_exchange_folder_ab_unsubscribe (EPopup *ep, EPopupItem *p, void *data)
} else if (mode == OFFLINE_MODE) {
e_error_run (NULL, ERROR_DOMAIN ":account-offline-generic", NULL);
return;
- }
+ }
source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (target->selector));
displayed_folder_name = (gchar *) e_source_peek_name (source);
@@ -509,7 +509,7 @@ org_gnome_exchange_folder_unsubscribe (EPopup *ep, EPopupItem *p, void *data)
} else if (mode == OFFLINE_MODE) {
e_error_run (NULL, ERROR_DOMAIN ":account-offline-generic", NULL);
return;
- }
+ }
source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (target->selector));
displayed_folder_name = e_source_peek_name (source);
@@ -556,15 +556,15 @@ org_gnome_exchange_folder_subscription (EPlugin *ep, EMMenuTargetSelect *target,
if (status != CONFIG_LISTENER_STATUS_OK) {
g_warning ("Config listener not found");
return;
- }
+ }
else if (mode == OFFLINE_MODE) {
- /* Translators: this error code can be used for any operation
- * (like subscribing to other user's folders, unsubscribing
- * etc,) which can not be performed in offline mode
+ /* Translators: this error code can be used for any operation
+ * (like subscribing to other user's folders, unsubscribing
+ * etc,) which can not be performed in offline mode
*/
e_error_run (NULL, ERROR_DOMAIN ":account-offline-generic", NULL);
return;
- }
+ }
create_folder_subscription_dialog (account, fname);
}
diff --git a/plugins/exchange-operations/exchange-mail-send-options.c b/plugins/exchange-operations/exchange-mail-send-options.c
index df23f7f6a2..8852e993a0 100644
--- a/plugins/exchange-operations/exchange-mail-send-options.c
+++ b/plugins/exchange-operations/exchange-mail-send-options.c
@@ -3,16 +3,16 @@
* Authors: R.Raghavendran <raghavguru7@gmail.com>
*
* Copyright 2004 Novell, Inc. (www.novell.com)
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -39,7 +39,7 @@ void org_gnome_exchange_send_options (EPlugin *ep, EMEventTargetComposer *t);
static ExchangeSendOptionsDialog *dialog=NULL;
-static void
+static void
append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data)
{
EMsgComposer *composer;
@@ -54,8 +54,8 @@ append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data)
if (dialog->options->importance) {
switch (dialog->options->importance) {
case E_IMP_HIGH :
- e_msg_composer_modify_header (composer, "Importance", "high");
- break;
+ e_msg_composer_modify_header (composer, "Importance", "high");
+ break;
case E_IMP_LOW :
e_msg_composer_modify_header (composer, "Importance", "low");
break;
@@ -66,7 +66,7 @@ append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data)
}
else
e_msg_composer_remove_header (composer, "Importance");
-
+
if (dialog->options->sensitivity) {
switch (dialog->options->sensitivity) {
case E_SENSITIVITY_CONFIDENTIAL :
@@ -85,37 +85,37 @@ append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data)
}
else
e_msg_composer_remove_header (composer, "Sensitivity");
-
+
hdrs = e_msg_composer_get_hdrs (composer);
sender_address = (CamelAddress *) e_msg_composer_hdrs_get_from (hdrs);
sender_id = (const char*) camel_address_encode (sender_address);
-
+
addr = camel_header_address_decode (dialog->options->delegate_address, NULL);
sender_addr = camel_header_address_decode (sender_id, NULL);
-
- if(dialog->options->send_as_del_enabled &&
- dialog->options->delegate_address &&
+
+ if(dialog->options->send_as_del_enabled &&
+ dialog->options->delegate_address &&
g_ascii_strcasecmp(addr->v.addr, sender_addr->v.addr)) {
e_msg_composer_modify_header (composer, "Sender" , sender_id);
- /* This block handles the case wherein the address to be added
- * in the "From" field has no name associated with it.
- * So for cases where there is no name we append the address
+ /* This block handles the case wherein the address to be added
+ * in the "From" field has no name associated with it.
+ * So for cases where there is no name we append the address
* (only email) within angular braces.
*/
if(!g_ascii_strcasecmp (addr->name, "")) {
- recipient_id = g_strdup_printf ("<%s>",
+ recipient_id = g_strdup_printf ("<%s>",
dialog->options->delegate_address);
e_msg_composer_add_header (composer, "From", recipient_id);
- }
-
+ }
+
else
- e_msg_composer_add_header (composer, "From",
- dialog->options->delegate_address);
+ e_msg_composer_add_header (composer, "From",
+ dialog->options->delegate_address);
}
-
-
+
+
else {
e_msg_composer_remove_header (composer, "Sender");
e_msg_composer_add_header (composer, "From", sender_id);
@@ -123,7 +123,7 @@ append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data)
if (dialog->options->delivery_enabled) {
EMsgComposerHdrs *hdrs = e_msg_composer_get_hdrs(composer);
-
+
char *mdn_address = hdrs->account->id->reply_to;
if (!mdn_address || !*mdn_address)
mdn_address = hdrs->account->id->address;
@@ -134,7 +134,7 @@ append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data)
if (dialog->options->read_enabled) {
EMsgComposerHdrs *hdrs = e_msg_composer_get_hdrs(composer);
-
+
char *mdn_address = hdrs->account->id->reply_to;
if (!mdn_address || !*mdn_address)
mdn_address = hdrs->account->id->address;
@@ -145,27 +145,27 @@ append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data)
e_msg_composer_remove_header (composer, "Disposition-Notification-To");
}
}
-
+
static void
send_options_commit (EMsgComposer *comp, gpointer user_data)
{
if (!user_data && !EXCHANGE_IS_SENDOPTIONS_DIALOG (user_data))
return;
-
+
if (dialog) {
g_print ("\nDialog getting unreferenced ");
g_object_unref (dialog);
- dialog = NULL;
+ dialog = NULL;
}
}
-void
+void
org_gnome_exchange_send_options (EPlugin *ep, EMEventTargetComposer *target)
{
EMsgComposer *composer = target->composer;
- EAccount *account = NULL;
+ EAccount *account = NULL;
char *temp = NULL;
-
+
account = e_msg_composer_get_preferred_account (composer);
if (!account)
return;
@@ -185,5 +185,5 @@ org_gnome_exchange_send_options (EPlugin *ep, EMEventTargetComposer *target)
g_signal_connect (GTK_WIDGET (composer), "destroy",
G_CALLBACK (send_options_commit), dialog);
-
+
}
diff --git a/plugins/exchange-operations/exchange-operations.c b/plugins/exchange-operations/exchange-operations.c
index 09814991cc..b407a3ab8b 100644
--- a/plugins/exchange-operations/exchange-operations.c
+++ b/plugins/exchange-operations/exchange-operations.c
@@ -66,9 +66,9 @@ e_plugin_lib_enable (EPluginLib *eplib, int enable)
ExchangeConfigListenerStatus
exchange_is_offline (gint *mode)
-{
+{
return exchange_config_listener_get_offline_status (exchange_global_config_listener, mode);
-}
+}
/* FIXME: See if a GLib variant of this function available */
gboolean
@@ -83,20 +83,20 @@ exchange_operations_tokenize_string (char **string, char *token, char delimit)
str++;
token[i]='\0';
*string = str;
- if (i==0)
+ if (i==0)
return FALSE;
return TRUE;
}
gboolean
-exchange_operations_cta_add_node_to_tree (GtkTreeStore *store, GtkTreeIter *parent, const char *ruri)
+exchange_operations_cta_add_node_to_tree (GtkTreeStore *store, GtkTreeIter *parent, const char *ruri)
{
GtkTreeIter iter;
char *luri=(char *)ruri;
char nodename[80];
gchar *uri;
gboolean status, found;
-
+
exchange_operations_tokenize_string (&luri, nodename, '/');
if (!nodename[0]) {
@@ -133,9 +133,9 @@ exchange_operations_cta_add_node_to_tree (GtkTreeStore *store, GtkTreeIter *pare
}
if (!found) {
- gtk_tree_store_append (store, &iter, parent);
- gtk_tree_store_set (store, &iter, 0, nodename, 1, uri, -1);
- exchange_operations_cta_add_node_to_tree (store, &iter, luri);
+ gtk_tree_store_append (store, &iter, parent);
+ gtk_tree_store_set (store, &iter, 0, nodename, 1, uri, -1);
+ exchange_operations_cta_add_node_to_tree (store, &iter, luri);
}
g_free (uri);
@@ -143,7 +143,7 @@ exchange_operations_cta_add_node_to_tree (GtkTreeStore *store, GtkTreeIter *pare
}
void
-exchange_operations_cta_select_node_from_tree (GtkTreeStore *store, GtkTreeIter *parent, const char *nuri, const char *ruri, GtkTreeSelection *selection)
+exchange_operations_cta_select_node_from_tree (GtkTreeStore *store, GtkTreeIter *parent, const char *nuri, const char *ruri, GtkTreeSelection *selection)
{
char *luri=(char *)nuri;
char nodename[80];
@@ -185,7 +185,7 @@ exchange_operations_cta_select_node_from_tree (GtkTreeStore *store, GtkTreeIter
}
ExchangeAccount *
-exchange_operations_get_exchange_account (void)
+exchange_operations_get_exchange_account (void)
{
ExchangeAccount *account = NULL;
ExchangeAccountResult result;
@@ -195,8 +195,8 @@ exchange_operations_get_exchange_account (void)
acclist = exchange_config_listener_get_accounts (exchange_global_config_listener);
/* FIXME: Need to be changed for handling multiple accounts */
if (acclist) {
- account = acclist->data;
-
+ account = acclist->data;
+
exchange_config_listener_get_offline_status (exchange_global_config_listener,
&mode);
@@ -216,7 +216,7 @@ exchange_operations_get_exchange_account (void)
return account;
}
}
-
+
return NULL;
}
@@ -231,15 +231,15 @@ exchange_operations_report_error (ExchangeAccount *account, ExchangeAccountResul
if (result == EXCHANGE_ACCOUNT_CONNECT_SUCCESS)
return;
-
+
error_string = g_strconcat ("org-gnome-exchange-operations:", error_ids[result], NULL);
-
+
switch (result) {
case EXCHANGE_ACCOUNT_MAILBOX_NA:
widget = e_error_new (NULL, error_string, exchange_account_get_username (account), NULL);
break;
case EXCHANGE_ACCOUNT_NO_MAILBOX:
- widget = e_error_new (NULL, error_string, exchange_account_get_username (account),
+ widget = e_error_new (NULL, error_string, exchange_account_get_username (account),
account->exchange_server, NULL);
break;
case EXCHANGE_ACCOUNT_RESOLVE_ERROR:
@@ -279,7 +279,7 @@ void exchange_operations_update_child_esources (ESource *source, const gchar *ol
truri = g_strjoinv (new_path, tmpv);
e_source_set_relative_uri (tsource->data, truri);
g_strfreev (tmpv);
- g_free (truri);
+ g_free (truri);
}
}
}
diff --git a/plugins/exchange-operations/exchange-permissions-dialog.c b/plugins/exchange-operations/exchange-permissions-dialog.c
index 41fe731a29..d798ce8505 100644
--- a/plugins/exchange-operations/exchange-permissions-dialog.c
+++ b/plugins/exchange-operations/exchange-permissions-dialog.c
@@ -71,7 +71,7 @@ struct _ExchangePermissionsDialogPrivate {
/* Custom label is added or not */
gboolean custom_added;
-
+
GtkWidget *separator, *custom;
E2kPermissionsRole selected_role;
@@ -220,7 +220,7 @@ exchange_permissions_dialog_new (ExchangeAccount *account,
folder_uri = e_folder_exchange_get_internal_uri (folder);
folder_path = e2k_uri_relative (dialog->priv->base_uri, folder_uri);
dialog->priv->folder_path = g_strdup (folder_path);
-
+
/* And fetch the security descriptor */
status = e2k_context_propfind (ctx, NULL, folder_uri,
sd_props, n_sd_props,
@@ -405,7 +405,7 @@ add_clicked (GtkButton *button, gpointer user_data)
gc = exchange_account_get_global_catalog (dialog->priv->account);
if (!gc) {
- e_error_run (GTK_WINDOW (dialog), ERROR_DOMAIN ":acl-no-gcs-error",
+ e_error_run (GTK_WINDOW (dialog), ERROR_DOMAIN ":acl-no-gcs-error",
NULL);
return;
}
@@ -451,7 +451,7 @@ add_clicked (GtkButton *button, gpointer user_data)
-1);
bsid2 = e2k_sid_get_binary_sid (sid2);
if (e2k_sid_binary_sid_equal (bsid, bsid2)) {
- e_error_run (GTK_WINDOW (dialog), ERROR_DOMAIN ":perm-existing-error",
+ e_error_run (GTK_WINDOW (dialog), ERROR_DOMAIN ":perm-existing-error",
entry->display_name, NULL);
e2k_global_catalog_entry_free (gc, entry);
gtk_tree_selection_select_iter (dialog->priv->list_selection, &iter);
@@ -588,7 +588,7 @@ display_role (ExchangePermissionsDialog *dialog)
dialog->priv->custom_added = FALSE;
}
}
-
+
gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->priv->role_optionmenu), role);
}
@@ -802,7 +802,7 @@ exchange_permissions_role_optionmenu_new (char *widget_name, char *string1, char
roles[role] = e2k_permissions_role_get_name (role);
gtk_combo_box_append_text (GTK_COMBO_BOX (menu), roles[role]);
}
-
+
roles[role] = NULL;
g_free (roles);
diff --git a/plugins/exchange-operations/exchange-send-options.c b/plugins/exchange-operations/exchange-send-options.c
index f164a2bf10..0191435145 100644
--- a/plugins/exchange-operations/exchange-send-options.c
+++ b/plugins/exchange-operations/exchange-send-options.c
@@ -49,7 +49,7 @@ struct _ExchangeSendOptionsDialogPrivate {
/*name selector dialog*/
ENameSelector *proxy_name_selector;
-
+
/*Importance*/
GtkWidget *importance;
@@ -96,17 +96,17 @@ exchange_send_options_get_widgets_data (ExchangeSendOptionsDialog *sod)
ExchangeSendOptionsDialogPrivate *priv;
ExchangeSendOptions *options;
const char *address, *email, *name;
-
+
guint count=0;
ENameSelectorEntry *name_selector_entry;
EDestinationStore *destination_store;
- GList *destinations, *tmp;
+ GList *destinations, *tmp;
priv = sod->priv;
options = sod->options;
-
- /* This block helps us fetch the address of the delegator(s). If no delegator is selected or more
- than one delegatee has been selected then an info dialog is popped up to help the user.
+
+ /* This block helps us fetch the address of the delegator(s). If no delegator is selected or more
+ than one delegatee has been selected then an info dialog is popped up to help the user.
*/
if(gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->delegate_enabled))) {
@@ -115,12 +115,12 @@ exchange_send_options_get_widgets_data (ExchangeSendOptionsDialog *sod)
destinations = e_destination_store_list_destinations (destination_store);
tmp = destinations;
- email = NULL;
+ email = NULL;
- /* The temporary variables address, email, and name are needed to fetch the list items.
- Only the valid one is then copied into the storage variables. The "count" variable
+ /* The temporary variables address, email, and name are needed to fetch the list items.
+ Only the valid one is then copied into the storage variables. The "count" variable
helps us keep a count of the exact number of items in the list. The g_list_length(GList *)
- produced ambiguous results. Hence count is used :)
+ produced ambiguous results. Hence count is used :)
*/
for (; tmp != NULL; tmp = g_list_next (tmp)) {
address = g_strdup ((char *) e_destination_get_address (tmp->data));
@@ -129,24 +129,24 @@ exchange_send_options_get_widgets_data (ExchangeSendOptionsDialog *sod)
if (g_str_equal (email, ""))
continue;
count++;
-
+
options->delegate_address = address;
options->delegate_name = name;
options->delegate_email = email;
}
-
+
if(count == 0) {
- e_error_run ((GtkWindow *) priv->main,
- "org-gnome-exchange-operations:no-delegate-selected", NULL, NULL);
+ e_error_run ((GtkWindow *) priv->main,
+ "org-gnome-exchange-operations:no-delegate-selected", NULL, NULL);
gtk_widget_grab_focus ((GtkWidget *) name_selector_entry);
options->delegate_address = NULL;
options->delegate_name = NULL;
options->delegate_email = NULL;
return -1;
}
-
+
if(count > 1) {
- e_error_run ((GtkWindow *)priv->main,
+ e_error_run ((GtkWindow *)priv->main,
"org-gnome-exchange-operations:more-delegates-selected", NULL, NULL);
gtk_widget_grab_focus ((GtkWidget *) name_selector_entry);
options->delegate_address = NULL;
@@ -172,7 +172,7 @@ exchange_send_options_get_widgets_data (ExchangeSendOptionsDialog *sod)
}
static gboolean
-get_widgets (ExchangeSendOptionsDialog *sod)
+get_widgets (ExchangeSendOptionsDialog *sod)
{
ExchangeSendOptionsDialogPrivate *priv;
@@ -183,7 +183,7 @@ get_widgets (ExchangeSendOptionsDialog *sod)
priv->main = EXCHANGE ("send_options");
if (!priv->main)
return FALSE;
-
+
priv->importance = EXCHANGE ("imp_combo_box");
priv->sensitivity = EXCHANGE ("sensitivity_combo_box");
priv->button_user = EXCHANGE ("button-user");
@@ -198,20 +198,20 @@ get_widgets (ExchangeSendOptionsDialog *sod)
return (priv->importance
&&priv->sensitivity
&&priv->button_user
- &&priv->delegate_enabled
+ &&priv->delegate_enabled
&&priv->read_receipt
&&priv->delivery_receipt
&&priv->importance_label
&&priv->sensitivity_label);
}
-
+
static void
exchange_send_options_fill_widgets_with_data (ExchangeSendOptionsDialog *sod)
{
ExchangeSendOptionsDialogPrivate *priv;
ExchangeSendOptions *options;
ENameSelectorEntry *name_selector_entry;
-
+
priv = sod->priv;
options = sod->options;
@@ -236,8 +236,8 @@ exchange_send_options_fill_widgets_with_data (ExchangeSendOptionsDialog *sod)
gtk_widget_set_sensitive ((GtkWidget *)name_selector_entry, FALSE);
gtk_widget_set_sensitive ((GtkWidget *)priv->button_user, FALSE);
}
-
- if (options->read_enabled)
+
+ if (options->read_enabled)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->read_receipt), TRUE);
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->read_receipt), FALSE);
@@ -253,7 +253,7 @@ exchange_sendoptions_dialog_new (void) {
ExchangeSendOptionsDialog *sod;
sod = g_object_new (EXCHANGE_TYPE_SENDOPTIONS_DIALOG, NULL);
-
+
return sod;
}
@@ -284,20 +284,20 @@ static void exchange_send_options_cb (GtkDialog *dialog, gint state, gpointer fu
{
ExchangeSendOptionsDialogPrivate *priv;
ExchangeSendOptionsDialog *sod;
- GError *error = NULL;
-
+ GError *error = NULL;
+
sod = func_data;
priv = sod->priv;
-
- switch (state) {
+
+ switch (state) {
case GTK_RESPONSE_OK:
- if(exchange_send_options_get_widgets_data (sod) < 0)
+ if(exchange_send_options_get_widgets_data (sod) < 0)
return;
case GTK_RESPONSE_CANCEL:
gtk_widget_hide (priv->main);
gtk_widget_destroy (priv->main);
g_object_unref (priv->xml);
- break;
+ break;
case GTK_RESPONSE_HELP:
gnome_help_display (
"evolution.xml", priv->help_section, &error);
@@ -311,7 +311,7 @@ static void exchange_send_options_cb (GtkDialog *dialog, gint state, gpointer fu
}
-/* This function acts as a listener for the toggling of "send_as_a_delegate" button. This is needed to
+/* This function acts as a listener for the toggling of "send_as_a_delegate" button. This is needed to
sensitize the name_selector_entry and the User Button
*/
static void
@@ -320,19 +320,19 @@ delegate_option_toggled (GtkCheckButton *button, gpointer func_data)
ExchangeSendOptionsDialogPrivate *priv;
ExchangeSendOptionsDialog *sod;
ENameSelectorEntry *name_selector_entry;
- ExchangeSendOptions *options;
-
+ ExchangeSendOptions *options;
+
sod=func_data;
priv=sod->priv;
options=sod->options;
-
+
name_selector_entry = e_name_selector_peek_section_entry (priv->proxy_name_selector, "Add User");
if(gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->delegate_enabled))) {
gtk_widget_set_sensitive ((GtkWidget *) name_selector_entry, TRUE);
gtk_widget_set_sensitive ((GtkWidget *) priv->button_user, TRUE);
}
-
+
else {
gtk_widget_set_sensitive ((GtkWidget *) name_selector_entry, FALSE);
gtk_widget_set_sensitive ((GtkWidget *) priv->button_user, FALSE);
@@ -355,8 +355,8 @@ addressbook_entry_changed (GtkWidget *entry, gpointer user_data)
*/
static void
address_button_clicked (GtkButton *button, gpointer func_data)
-{
-
+{
+
ExchangeSendOptionsDialogPrivate *priv;
ExchangeSendOptionsDialog *sod;
ENameSelectorDialog *name_selector_dialog;
@@ -365,12 +365,12 @@ address_button_clicked (GtkButton *button, gpointer func_data)
priv=sod->priv;
name_selector_dialog = e_name_selector_peek_dialog (priv->proxy_name_selector);
- gtk_widget_show (GTK_WIDGET (name_selector_dialog));
+ gtk_widget_show (GTK_WIDGET (name_selector_dialog));
}
-
-gboolean
+
+gboolean
exchange_sendoptions_dialog_run (ExchangeSendOptionsDialog *sod, GtkWidget *parent)
-{
+{
ExchangeSendOptionsDialogPrivate *priv;
ExchangeSendOptions *options;
@@ -384,7 +384,7 @@ exchange_sendoptions_dialog_run (ExchangeSendOptionsDialog *sod, GtkWidget *pare
GtkWidget *name_box;
g_return_val_if_fail (sod != NULL || EXCHANGE_IS_SENDOPTIONS_DIALOG (sod), FALSE);
-
+
priv = sod->priv;
options = sod->options;
@@ -427,19 +427,19 @@ exchange_sendoptions_dialog_run (ExchangeSendOptionsDialog *sod, GtkWidget *pare
g_object_unref (des);
}
- g_signal_connect ((GtkButton *) priv->button_user, "clicked",
+ g_signal_connect ((GtkButton *) priv->button_user, "clicked",
G_CALLBACK (address_button_clicked), sod);
- g_signal_connect (name_selector_dialog, "response",
+ g_signal_connect (name_selector_dialog, "response",
G_CALLBACK (addressbook_dialog_response), sod);
- g_signal_connect (GTK_DIALOG (priv->main), "response",
+ g_signal_connect (GTK_DIALOG (priv->main), "response",
G_CALLBACK(exchange_send_options_cb), sod);
- g_signal_connect ((GtkCheckButton *) priv->delegate_enabled, "toggled",
+ g_signal_connect ((GtkCheckButton *) priv->delegate_enabled, "toggled",
G_CALLBACK(delegate_option_toggled), sod);
- name_selector_entry = e_name_selector_peek_section_entry (priv->proxy_name_selector,
+ name_selector_entry = e_name_selector_peek_section_entry (priv->proxy_name_selector,
"Add User");
g_signal_connect (name_selector_entry, "changed", G_CALLBACK (addressbook_entry_changed), sod);
-
+
/* The name box is just a container. The name_selector_entry is added to it. This Widget
is created dynamically*/
name_box = glade_xml_get_widget (priv->xml, "del_name_box");
@@ -449,7 +449,7 @@ exchange_sendoptions_dialog_run (ExchangeSendOptionsDialog *sod, GtkWidget *pare
gtk_window_set_modal ((GtkWindow *) priv->main, TRUE);
gtk_widget_show (priv->main);
-
+
return TRUE;
}
@@ -479,16 +479,16 @@ exchange_sendoptions_dialog_class_init (GObjectClass *object)
static void
exchange_sendoptions_dialog_init (GObject *object)
{
-
+
ExchangeSendOptionsDialog *sod;
ExchangeSendOptionsDialogPrivate *priv;
ExchangeSendOptions *new;
sod = EXCHANGE_SENDOPTIONS_DIALOG (object);
new = g_new0 (ExchangeSendOptions, 1);
-
+
priv = g_new0 (ExchangeSendOptionsDialogPrivate, 1);
-
+
sod->priv = priv;
sod->options = new;
sod->options->send_as_del_enabled = FALSE;
@@ -515,10 +515,10 @@ exchange_sendoptions_dialog_finalize (GObject *object)
{
ExchangeSendOptionsDialog *sod = (ExchangeSendOptionsDialog *)object;
ExchangeSendOptionsDialogPrivate *priv;
-
+
g_return_if_fail (EXCHANGE_IS_SENDOPTIONS_DIALOG (sod));
priv = sod->priv;
-
+
g_free (priv->help_section);
if (sod->options) {
@@ -531,9 +531,9 @@ exchange_sendoptions_dialog_finalize (GObject *object)
sod->priv = NULL;
}
- if (parent_class->finalize)
+ if (parent_class->finalize)
(* parent_class->finalize) (object);
-
+
}
static void
@@ -546,5 +546,5 @@ exchange_sendoptions_dialog_dispose (GObject *object)
if (parent_class->dispose)
(* parent_class->dispose) (object);
-}
+}
diff --git a/plugins/exchange-operations/exchange-send-options.h b/plugins/exchange-operations/exchange-send-options.h
index 965d9fbc0c..8f50ab954c 100644
--- a/plugins/exchange-operations/exchange-send-options.h
+++ b/plugins/exchange-operations/exchange-send-options.h
@@ -48,7 +48,7 @@ typedef enum {
E_SENSITIVITY_CONFIDENTIAL
} ExchangeSendOptionsSensitivity;
-/* We require the delegate_email and delegate_name to store the address of the delegator selected into
+/* We require the delegate_email and delegate_name to store the address of the delegator selected into
the destination store.
*/
typedef struct {
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index 5cb9068265..fecc6e8de2 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -127,9 +127,9 @@ void org_gnome_external_editor (EPlugin *ep, EMMenuTargetSelect *select)
camel_mime_part_set_content ((CamelMimePart *)message, tokens [5], strlen (tokens [5]), "text/plain");
- /* FIXME: We need to make mail-remote working properly.
- So that we neednot invoke composer widget at all.
- May be we can do it now itself by invoking local CamelTransport.
+ /* FIXME: We need to make mail-remote working properly.
+ So that we neednot invoke composer widget at all.
+ May be we can do it now itself by invoking local CamelTransport.
But all that is not needed for the first release.
*/
@@ -148,5 +148,5 @@ void org_gnome_external_editor (EPlugin *ep, EMMenuTargetSelect *select)
system (query);
g_free (query);
-#endif
+#endif
}
diff --git a/plugins/face/face.c b/plugins/face/face.c
index 2f9d1fb1c4..54010b625b 100644
--- a/plugins/face/face.c
+++ b/plugins/face/face.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Author: Sankar P <psankar@novell.com>
- *
+ *
* Copyright 2004 Novell, Inc. (www.novell.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -30,7 +30,7 @@
#include <mail/em-menu.h>
#include <e-util/e-error.h>
-#define d(x) x
+#define d(x) x
void org_gnome_composer_face (EPlugin * ep, EMMenuTargetWidget * target);
int e_plugin_lib_configure (EPlugin * ep);
diff --git a/plugins/folder-unsubscribe/folder-unsubscribe.c b/plugins/folder-unsubscribe/folder-unsubscribe.c
index 9b6e6fa38c..227da31ec1 100644
--- a/plugins/folder-unsubscribe/folder-unsubscribe.c
+++ b/plugins/folder-unsubscribe/folder-unsubscribe.c
@@ -45,7 +45,7 @@ void org_gnome_mail_folder_unsubscribe (EPlugin *plug, EMPopupTargetFolder *targ
struct _folder_unsub_t {
struct _mail_msg msg;
-
+
char *uri;
};
@@ -53,7 +53,7 @@ static char *
folder_unsubscribe__desc (struct _mail_msg *mm, int done)
{
struct _folder_unsub_t *unsub = (struct _folder_unsub_t *) mm;
-
+
return g_strdup_printf (_("Unsubscribing from folder \"%s\""), unsub->uri);
}
@@ -65,19 +65,19 @@ folder_unsubscribe__unsub (struct _mail_msg *mm)
const char *path = NULL;
CamelStore *store;
CamelURL *url;
-
+
if (!(store = camel_session_get_store (session, unsub->uri, &mm->ex)))
return;
-
+
url = camel_url_new (unsub->uri, NULL);
if (((CamelService *) store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH)
path = url->fragment;
else if (url->path && url->path[0])
path = url->path + 1;
-
+
if (path != NULL)
camel_store_unsubscribe_folder (store, path, &mm->ex);
-
+
camel_url_free (url);
}
@@ -85,7 +85,7 @@ static void
folder_unsubscribe__free (struct _mail_msg *mm)
{
struct _folder_unsub_t *unsub = (struct _folder_unsub_t *) mm;
-
+
g_free (unsub->uri);
}
@@ -101,12 +101,12 @@ void
org_gnome_mail_folder_unsubscribe (EPlugin *plug, EMPopupTargetFolder *target)
{
struct _folder_unsub_t *unsub;
-
+
if (target->uri == NULL)
return;
-
+
unsub = mail_msg_new (&unsubscribe_op, NULL, sizeof (struct _folder_unsub_t));
unsub->uri = g_strdup (target->uri);
-
+
e_thread_put (mail_thread_new, (EMsg *) unsub);
}
diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c
index 686623c414..f20d6d7209 100644
--- a/plugins/google-account-setup/google-source.c
+++ b/plugins/google-account-setup/google-source.c
@@ -1,12 +1,12 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Authors :
+/*
+ * Authors :
* Ebby Wiselyn <ebbywiselyn@gmail.com>
*
* Copyright 2007, Novell, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU Lesser General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -16,7 +16,7 @@
*
* * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
@@ -50,7 +50,7 @@
int e_plugin_lib_enable (EPluginLib *ep,
int enable);
-GtkWidget * plugin_google (EPlugin *epl,
+GtkWidget * plugin_google (EPlugin *epl,
EConfigHookItemFactoryData *data);
/*****************************************************************************/
@@ -62,7 +62,7 @@ ensure_google_source_group ()
ESourceList *slist;
ESourceGroup *group;
-
+
if (!e_cal_get_sources (&slist, E_CAL_SOURCE_TYPE_EVENT, NULL)) {
g_warning ("Could not get calendar source list from GConf!");
return;
@@ -77,13 +77,13 @@ ensure_google_source_group ()
gboolean res;
group = e_source_group_new (_("Google"), "Google://");
res = e_source_list_add_group (slist, group, -1);
-
+
if (res == FALSE) {
- g_warning ("Could not add Google source group!");
+ g_warning ("Could not add Google source group!");
} else {
e_source_list_sync (slist, NULL);
}
-
+
g_object_unref (group);
g_object_unref (slist);
}
@@ -147,7 +147,7 @@ FIXME: Not sure why this function is declared but called no where. This needs fi
static void
ssl_changed (GtkToggleButton *button, ESource *source)
{
- e_source_set_property(source, "ssl",
+ e_source_set_property(source, "ssl",
gtk_toggle_button_get_active(button) ? "1" : "0");
}
@@ -162,15 +162,15 @@ user_changed (GtkEntry *editable, ESource *source)
char *ruri;
const char *user;
char *projection;
-
- uri = e_source_get_uri (source);
+
+ uri = e_source_get_uri (source);
user = gtk_entry_get_text (GTK_ENTRY (editable));
-
+
if (uri == NULL) {
g_free (uri);
return;
}
-
+
euri = e_uri_new (uri);
g_free (euri->user);
@@ -186,12 +186,12 @@ user_changed (GtkEntry *editable, ESource *source)
if (!g_str_has_suffix (user, "gmail.com\0")) {
user = g_strconcat (user, "@gmail.com", NULL);
}
-
+
e_source_set_relative_uri (source, g_strconcat (CALENDAR_LOCATION, g_strdup(user), g_strdup (projection), NULL));
e_source_set_property (source, "username", euri->user);
e_source_set_property (source, "protocol", "google");
e_source_set_property (source, "auth-domain", "google");
-
+
ruri = print_uri_noproto (euri);
g_free (ruri);
e_uri_free (euri);
@@ -232,7 +232,7 @@ spin_changed (GtkSpinButton *spin, ECalConfigTargetSource *t)
GtkWidget *option;
option = g_object_get_data (G_OBJECT(spin), "option");
-
+
refresh_str = get_refresh_minutes ((GtkWidget *)spin, option);
e_source_set_property (t->source, "refresh", refresh_str);
g_free (refresh_str);
@@ -258,7 +258,7 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option)
int item_num = 0;
const char *refresh_str = e_source_get_property (source, "refresh");
time = refresh_str ? atoi (refresh_str) : 30;
-
+
if (time && !(time % 10080)) {
/* weeks */
item_num = 3;
@@ -277,7 +277,7 @@ set_refresh_time (ESource *source, GtkWidget *spin, GtkWidget *option)
}
GtkWidget *
-plugin_google (EPlugin *epl,
+plugin_google (EPlugin *epl,
EConfigHookItemFactoryData *data)
{
ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target;
@@ -294,20 +294,20 @@ plugin_google (EPlugin *epl,
const char *ssl_prop;
gboolean ssl_enabled;
int row;
-
+
GtkWidget *option, *spin, *menu, *hbox;
GtkWidget *times [4];
int i;
-
+
source = t->source;
group = e_source_peek_group (source);
-
+
widget = NULL;
- if (!g_str_has_prefix (e_source_group_peek_base_uri (group),
+ if (!g_str_has_prefix (e_source_group_peek_base_uri (group),
"Google")) {
return NULL;
}
-
+
uri = e_source_get_uri (source);
euri = e_uri_new (uri);
g_free (uri);
@@ -320,7 +320,7 @@ plugin_google (EPlugin *epl,
euri->user = NULL;
uri = e_uri_to_string (euri, FALSE);
- ssl_prop = e_source_get_property (source, "ssl");
+ ssl_prop = e_source_get_property (source, "ssl");
if (ssl_prop && ssl_prop[0] == '1') {
ssl_enabled = TRUE;
} else {
@@ -336,16 +336,16 @@ plugin_google (EPlugin *epl,
cssl = gtk_check_button_new_with_mnemonic (_("Use _SSL"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cssl), ssl_enabled);
gtk_widget_show (cssl);
- gtk_table_attach (GTK_TABLE (parent),
- cssl, 1, 2,
- row + 3, row + 4,
+ gtk_table_attach (GTK_TABLE (parent),
+ cssl, 1, 2,
+ row + 3, row + 4,
GTK_FILL, 0, 0, 0);
luser = gtk_label_new_with_mnemonic (_("User_name:"));
gtk_widget_show (luser);
gtk_misc_set_alignment (GTK_MISC (luser), 0.0, 0.5);
- gtk_table_attach (GTK_TABLE (parent),
- luser, 0, 1,
- row + 1, row + 2,
+ gtk_table_attach (GTK_TABLE (parent),
+ luser, 0, 1,
+ row + 1, row + 2,
GTK_FILL, 0, 0, 0);
user = gtk_entry_new ();
@@ -360,19 +360,19 @@ plugin_google (EPlugin *epl,
GtkWidget *label = gtk_label_new_with_mnemonic (_("_Refresh:"));
gtk_widget_show (label);
gtk_misc_set_alignment (GTK_MISC(label), 0.0, 0.5);
- gtk_table_attach (GTK_TABLE (parent),
- label,
+ gtk_table_attach (GTK_TABLE (parent),
+ label,
0, 1,
- row + 2, row + 3,
+ row + 2, row + 3,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
-
+
hbox = gtk_hbox_new (FALSE, 6);
gtk_widget_show (hbox);
spin = gtk_spin_button_new_with_range (1, 100, 1);
gtk_label_set_mnemonic_widget (GTK_LABEL(label), spin);
- gtk_widget_show (spin);
+ gtk_widget_show (spin);
gtk_box_pack_start (GTK_BOX(hbox), spin, FALSE, TRUE, 0);
option = gtk_option_menu_new ();
@@ -381,7 +381,7 @@ plugin_google (EPlugin *epl,
times[1] = gtk_menu_item_new_with_label (_("hours"));
times[2] = gtk_menu_item_new_with_label (_("days"));
times[3] = gtk_menu_item_new_with_label (_("weeks"));
-
+
menu = gtk_menu_new ();
gtk_widget_show (menu);
for (i = 0; i < 4; i++) {
@@ -392,8 +392,8 @@ plugin_google (EPlugin *epl,
set_refresh_time (source, spin, option);
gtk_box_pack_start (GTK_BOX (hbox), option, FALSE, TRUE, 0);
- e_source_set_property (source, "refresh", "30");
-
+ e_source_set_property (source, "refresh", "30");
+
g_object_set_data (G_OBJECT (option), "spin", spin);
g_signal_connect (G_OBJECT (option), "changed", G_CALLBACK (option_changed), t);
g_object_set_data (G_OBJECT (spin), "option", option);
@@ -401,15 +401,15 @@ plugin_google (EPlugin *epl,
gtk_table_attach (GTK_TABLE (parent), hbox, 1, 2, row + 2, row + 3, GTK_EXPAND | GTK_FILL, 0, 0, 0);
- g_signal_connect (G_OBJECT (user),
- "changed",
+ g_signal_connect (G_OBJECT (user),
+ "changed",
G_CALLBACK (user_changed),
- source);
+ source);
g_free (uri);
g_free (username);
-
- return widget;
+
+ return widget;
}
diff --git a/plugins/groupwise-account-setup/camel-gw-listener.c b/plugins/groupwise-account-setup/camel-gw-listener.c
index a2a957cf54..8b3d8c85bd 100644
--- a/plugins/groupwise-account-setup/camel-gw-listener.c
+++ b/plugins/groupwise-account-setup/camel-gw-listener.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Authors :
- *
+ *
* Sivaiah Nallagatla <snallagatla@novell.com>
*
* Copyright 2003, Novell, Inc.
@@ -34,7 +34,7 @@
#include <libedataserver/e-account.h>
#include <libecal/e-cal.h>
-/*stores some info about all currently existing groupwise accounts
+/*stores some info about all currently existing groupwise accounts
list of GwAccountInfo structures */
static GList *groupwise_accounts = NULL;
@@ -42,7 +42,7 @@ static GList *groupwise_accounts = NULL;
struct _CamelGwListenerPrivate {
GConfClient *gconf_client;
/* we get notification about mail account changes form this object */
- EAccountList *account_list;
+ EAccountList *account_list;
};
struct _GwAccountInfo {
@@ -53,7 +53,7 @@ struct _GwAccountInfo {
typedef struct _GwAccountInfo GwAccountInfo;
-#define GROUPWISE_URI_PREFIX "groupwise://"
+#define GROUPWISE_URI_PREFIX "groupwise://"
#define GROUPWISE_PREFIX_LENGTH 12
#define PARENT_TYPE G_TYPE_OBJECT
@@ -64,37 +64,37 @@ static void dispose (GObject *object);
static void finalize (GObject *object);
-static void
+static void
camel_gw_listener_class_init (CamelGwListenerClass *class)
{
GObjectClass *object_class;
-
+
parent_class = g_type_class_ref (PARENT_TYPE);
object_class = G_OBJECT_CLASS (class);
-
+
/* virtual method override */
object_class->dispose = dispose;
object_class->finalize = finalize;
}
-static void
+static void
camel_gw_listener_init (CamelGwListener *config_listener, CamelGwListenerClass *class)
{
- config_listener->priv = g_new0 (CamelGwListenerPrivate, 1);
+ config_listener->priv = g_new0 (CamelGwListenerPrivate, 1);
}
-static void
+static void
dispose (GObject *object)
{
CamelGwListener *config_listener = CAMEL_GW_LISTENER (object);
-
+
g_object_unref (config_listener->priv->gconf_client);
g_object_unref (config_listener->priv->account_list);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
-static void
+static void
finalize (GObject *object)
{
CamelGwListener *config_listener = CAMEL_GW_LISTENER (object);
@@ -106,18 +106,18 @@ finalize (GObject *object)
}
for ( list = g_list_first (groupwise_accounts); list ; list = g_list_next (list) ) {
-
+
info = (GwAccountInfo *) (list->data);
if (info) {
-
+
g_free (info->uid);
g_free (info->name);
g_free (info->source_url);
g_free (info);
}
}
-
+
g_list_free (groupwise_accounts);
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -137,13 +137,13 @@ is_groupwise_account (EAccount *account)
/* looks up for an existing groupwise account info in the groupwise_accounts list based on uid */
-static GwAccountInfo*
+static GwAccountInfo*
lookup_account_info (const char *key)
{
GList *list;
GwAccountInfo *info ;
int found = 0;
-
+
if (!key)
return NULL;
@@ -181,7 +181,7 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
const char * use_ssl;
const char *poa_address;
const char *offline_sync;
-
+
poa_address = url->host;
if (!poa_address || strlen (poa_address) ==0)
return;
@@ -195,8 +195,8 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
offline_sync = camel_url_get_param (url, "offline_sync");
-
- client = gconf_client_get_default();
+
+ client = gconf_client_get_default();
source_list = e_source_list_new_for_gconf (client, conf_key);
group = e_source_group_new (group_name, GROUPWISE_URI_PREFIX);
@@ -223,13 +223,13 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
e_source_group_add_source (group, source, -1);
e_source_list_sync (source_list, NULL);
- if (!strcmp (conf_key, CALENDAR_SOURCES))
+ if (!strcmp (conf_key, CALENDAR_SOURCES))
source_selection_key = SELECTED_CALENDARS;
else if (!strcmp (conf_key, TASKS_SOURCES))
source_selection_key = SELECTED_TASKS;
else if (!strcmp (conf_key, NOTES_SOURCES))
source_selection_key = SELECTED_NOTES;
- else
+ else
source_selection_key = NULL;
if (source_selection_key) {
@@ -243,7 +243,7 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
g_slist_free (ids);
}
-
+
g_object_unref (source);
g_object_unref (group);
g_object_unref (source_list);
@@ -251,7 +251,7 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
g_free (relative_uri);
}
-static void
+static void
remove_esource (const char *conf_key, const char *group_name, char* source_name, const char* relative_uri)
{
ESourceList *list;
@@ -261,20 +261,20 @@ remove_esource (const char *conf_key, const char *group_name, char* source_name,
GSList *ids;
GSList *node_tobe_deleted;
char *source_selection_key;
-
+
client = gconf_client_get_default();
list = e_source_list_new_for_gconf (client, conf_key);
- groups = e_source_list_peek_groups (list);
-
+ groups = e_source_list_peek_groups (list);
+
found_group = FALSE;
-
+
for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) {
ESourceGroup *group = E_SOURCE_GROUP (groups->data);
-
- if (strcmp (e_source_group_peek_name (group), group_name) == 0 &&
+
+ if (strcmp (e_source_group_peek_name (group), group_name) == 0 &&
strcmp (e_source_group_peek_base_uri (group), GROUPWISE_URI_PREFIX ) == 0) {
GSList *sources = e_source_group_peek_sources (group);
-
+
for( ; sources != NULL; sources = g_slist_next (sources)) {
ESource *source = E_SOURCE (sources->data);
const gchar *source_relative_uri;
@@ -283,8 +283,8 @@ remove_esource (const char *conf_key, const char *group_name, char* source_name,
if (source_relative_uri == NULL)
continue;
if (strcmp (source_relative_uri, relative_uri) == 0) {
-
- if (!strcmp (conf_key, CALENDAR_SOURCES))
+
+ if (!strcmp (conf_key, CALENDAR_SOURCES))
source_selection_key = SELECTED_CALENDARS;
else if (!strcmp (conf_key, TASKS_SOURCES))
source_selection_key = SELECTED_TASKS;
@@ -292,38 +292,38 @@ remove_esource (const char *conf_key, const char *group_name, char* source_name,
source_selection_key = SELECTED_NOTES;
else source_selection_key = NULL;
if (source_selection_key) {
- ids = gconf_client_get_list (client, source_selection_key ,
+ ids = gconf_client_get_list (client, source_selection_key ,
GCONF_VALUE_STRING, NULL);
node_tobe_deleted = g_slist_find_custom (ids, e_source_peek_uid (source), (GCompareFunc) strcmp);
if (node_tobe_deleted) {
g_free (node_tobe_deleted->data);
ids = g_slist_delete_link (ids, node_tobe_deleted);
}
- gconf_client_set_list (client, source_selection_key,
+ gconf_client_set_list (client, source_selection_key,
GCONF_VALUE_STRING, ids, NULL);
}
e_source_list_remove_group (list, group);
- e_source_list_sync (list, NULL);
+ e_source_list_sync (list, NULL);
found_group = TRUE;
break;
-
+
}
}
}
-
-
+
+
}
g_object_unref (list);
- g_object_unref (client);
-
+ g_object_unref (client);
+
}
/* looks up for e-source with having same info as old_account_info and changes its values passed in new values */
-static void
+static void
modify_esource (const char* conf_key, GwAccountInfo *old_account_info, const char* new_group_name, CamelURL *new_url)
{
ESourceList *list;
@@ -334,27 +334,27 @@ modify_esource (const char* conf_key, GwAccountInfo *old_account_info, const cha
GConfClient* client;
const char *poa_address;
const char *new_poa_address;
-
+
url = camel_url_new (old_account_info->source_url, NULL);
- poa_address = url->host;
+ poa_address = url->host;
if (!poa_address || strlen (poa_address) ==0)
return;
new_poa_address = new_url->host;
-
+
old_relative_uri = g_strdup_printf ("%s@%s/", url->user, poa_address);
client = gconf_client_get_default ();
list = e_source_list_new_for_gconf (client, conf_key);
- groups = e_source_list_peek_groups (list);
+ groups = e_source_list_peek_groups (list);
found_group = FALSE;
for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) {
ESourceGroup *group = E_SOURCE_GROUP (groups->data);
-
- if (strcmp (e_source_group_peek_name (group), old_account_info->name) == 0 &&
+
+ if (strcmp (e_source_group_peek_name (group), old_account_info->name) == 0 &&
strcmp (e_source_group_peek_base_uri (group), GROUPWISE_URI_PREFIX) == 0) {
GSList *sources = e_source_group_peek_sources (group);
-
+
for ( ; sources != NULL; sources = g_slist_next (sources)) {
ESource *source = E_SOURCE (sources->data);
const gchar *source_relative_uri;
@@ -365,7 +365,7 @@ modify_esource (const char* conf_key, GwAccountInfo *old_account_info, const cha
if (strcmp (source_relative_uri, old_relative_uri) == 0) {
gchar *new_relative_uri;
- new_relative_uri = g_strdup_printf ("%s@%s/", new_url->user, new_poa_address);
+ new_relative_uri = g_strdup_printf ("%s@%s/", new_url->user, new_poa_address);
e_source_group_set_name (group, new_group_name);
e_source_set_relative_uri (source, new_relative_uri);
e_source_set_property (source, "username", new_url->user);
@@ -386,30 +386,30 @@ modify_esource (const char* conf_key, GwAccountInfo *old_account_info, const cha
camel_url_free (url);
g_free (old_relative_uri);
-
+
}
/* add sources for calendar and tasks if the account added is groupwise account
adds the new account info to groupwise_accounts list */
-static void
+static void
add_calendar_tasks_sources (GwAccountInfo *info)
{
CamelURL *url;
-
+
url = camel_url_new (info->source_url, NULL);
add_esource ("/apps/evolution/calendar/sources", info->name, _("Calendar"), url, NULL, FALSE);
add_esource ("/apps/evolution/tasks/sources", info->name, _("Tasks"), url, NULL, FALSE);
add_esource ("/apps/evolution/memos/sources", info->name, _("Notes"), url, NULL, TRUE);
-
+
camel_url_free (url);
}
-/* removes calendar and tasks sources if the account removed is groupwise account
+/* removes calendar and tasks sources if the account removed is groupwise account
removes the the account info from groupwise_account list */
-static void
+static void
remove_calendar_tasks_sources (GwAccountInfo *info)
{
CamelURL *url;
@@ -419,7 +419,7 @@ remove_calendar_tasks_sources (GwAccountInfo *info)
url = camel_url_new (info->source_url, NULL);
- poa_address = url->host;
+ poa_address = url->host;
if (!poa_address || strlen (poa_address) ==0)
return;
@@ -431,7 +431,7 @@ remove_calendar_tasks_sources (GwAccountInfo *info)
remove_esource ("/apps/evolution/calendar/sources", info->name, _("Calendar"), relative_uri);
remove_esource ("/apps/evolution/tasks/sources", info->name, _("Checklist"), relative_uri);
remove_esource ("/apps/evolution/memos/sources", info->name, _("Notes"), relative_uri);
-
+
camel_url_free (url);
g_free (relative_uri);
@@ -441,14 +441,14 @@ static GList*
get_addressbook_names_from_server (char *source_url)
{
char *key;
- EGwConnection *cnc;
+ EGwConnection *cnc;
char *password;
GList *book_list = NULL;
int status, count = 0;
const char *soap_port;
CamelURL *url;
gboolean remember;
- char *failed_auth = NULL;
+ char *failed_auth = NULL;
char *prompt;
char *password_prompt;
char *uri;
@@ -460,22 +460,22 @@ get_addressbook_names_from_server (char *source_url)
if (url == NULL) {
return NULL;
}
- poa_address = url->host;
+ poa_address = url->host;
if (!poa_address || strlen (poa_address) ==0)
return NULL;
-
+
soap_port = camel_url_get_param (url, "soap_port");
if (!soap_port || strlen (soap_port) == 0)
soap_port = "7191";
use_ssl = camel_url_get_param (url, "use_ssl");
- key = g_strdup_printf ("groupwise://%s@%s/", url->user, poa_address);
-
+ key = g_strdup_printf ("groupwise://%s@%s/", url->user, poa_address);
+
if (use_ssl && g_str_equal (use_ssl, "always"))
uri = g_strdup_printf ("https://%s:%s/soap", poa_address, soap_port);
- else
+ else
uri = g_strdup_printf ("http://%s:%s/soap", poa_address, soap_port);
-
+
cnc = NULL;
do {
@@ -497,7 +497,7 @@ get_addressbook_names_from_server (char *source_url)
NULL);
g_free (prompt);
- if (!password)
+ if (!password)
break;
}
@@ -513,21 +513,21 @@ get_addressbook_names_from_server (char *source_url)
} while (cnc == NULL);
g_free (key);
-
+
if (E_IS_GW_CONNECTION(cnc)) {
- book_list = NULL;
+ book_list = NULL;
status = e_gw_connection_get_address_book_list (cnc, &book_list);
if (status == E_GW_CONNECTION_STATUS_OK)
return book_list;
}
- /*FIXME: This error message should be relocated to addressbook and should reflect
+ /*FIXME: This error message should be relocated to addressbook and should reflect
* that it actually failed to get the addressbooks*/
e_error_run (NULL, "mail:gw-accountsetup-error", poa_address, NULL);
return NULL;
}
-
-static void
+
+static void
add_proxy_sources (GwAccountInfo *info, const char *parent_name)
{
CamelURL *url;
@@ -569,7 +569,7 @@ add_addressbook_sources (EAccount *account)
return FALSE;
}
- poa_address = url->host;
+ poa_address = url->host;
if (!poa_address || strlen (poa_address) ==0)
return FALSE;
@@ -591,16 +591,16 @@ add_addressbook_sources (EAccount *account)
* by e_gw_connection_get_address_book_list()
*/
is_writable = e_gw_container_get_is_writable (E_GW_CONTAINER(temp_list->data));
- if (is_writable &&
+ if (is_writable &&
!g_ascii_strncasecmp (book_name, "Novell GroupWise Address Book", strlen (book_name))) {
- /* This is a hack to not to show multiple groupwise system address books
+ /* This is a hack to not to show multiple groupwise system address books
* if they are the personal address books with the name of system address book
* See http://bugzilla.gnome.org/show_bug.cgi?id=320119
* and http://bugzilla.gnome.org/show_bug.cgi?id=309511
*/
continue;
- }
-
+ }
+
if (!is_frequent_contacts)
is_frequent_contacts = e_gw_container_get_is_frequent_contacts (E_GW_CONTAINER (temp_list->data));
source = e_source_new (book_name, g_strconcat (";",book_name, NULL));
@@ -616,7 +616,7 @@ add_addressbook_sources (EAccount *account)
if (!is_writable)
e_source_set_property (source, "offline_sync", "1");
else
- e_source_set_property (source, "offline_sync",
+ e_source_set_property (source, "offline_sync",
camel_url_get_param (url, "offline_sync") ? "1" : "0");
if (!is_writable)
e_source_set_property (source, "completion", "true");
@@ -636,11 +636,11 @@ add_addressbook_sources (EAccount *account)
if (!is_frequent_contacts) {
/* display warning message */
e_error_run (NULL, "addressbook:gw-book-list-init", NULL);
- }
+ }
return TRUE;
}
-static void
+static void
modify_addressbook_sources ( EAccount *account, GwAccountInfo *existing_account_info )
{
CamelURL *url;
@@ -657,20 +657,20 @@ modify_addressbook_sources ( EAccount *account, GwAccountInfo *existing_account_
ESource *source;
GConfClient *client;
const char *poa_address;
-
+
url = camel_url_new (existing_account_info->source_url, NULL);
if (url == NULL) {
return;
}
- poa_address = url->host;
+ poa_address = url->host;
if (!poa_address || strlen (poa_address) ==0)
return;
old_base_uri = g_strdup_printf ("groupwise://%s@%s", url->user, poa_address);
camel_url_free (url);
-
+
url = camel_url_new (account->source->url, NULL);
if (url == NULL)
return ;
@@ -685,7 +685,7 @@ modify_addressbook_sources ( EAccount *account, GwAccountInfo *existing_account_
client = gconf_client_get_default ();
list = e_source_list_new_for_gconf (client, "/apps/evolution/addressbook/sources" );
- groups = e_source_list_peek_groups (list);
+ groups = e_source_list_peek_groups (list);
delete_group = FALSE;
if (strcmp (old_base_uri, new_base_uri) != 0)
delete_group = TRUE;
@@ -704,10 +704,10 @@ modify_addressbook_sources ( EAccount *account, GwAccountInfo *existing_account_
e_source_set_property (source, "port", soap_port);
e_source_set_property (source, "use_ssl", use_ssl);
}
-
+
e_source_list_sync (list, NULL);
}
-
+
}
}
if (found_group && delete_group) {
@@ -726,7 +726,7 @@ modify_addressbook_sources ( EAccount *account, GwAccountInfo *existing_account_
}
-static void
+static void
remove_addressbook_sources (GwAccountInfo *existing_account_info)
{
ESourceList *list;
@@ -744,7 +744,7 @@ remove_addressbook_sources (GwAccountInfo *existing_account_info)
return;
}
- poa_address = url->host;
+ poa_address = url->host;
if (!poa_address || strlen (poa_address) ==0)
return;
@@ -754,7 +754,7 @@ remove_addressbook_sources (GwAccountInfo *existing_account_info)
base_uri = g_strdup_printf ("groupwise://%s@%s", url->user, poa_address);
client = gconf_client_get_default ();
list = e_source_list_new_for_gconf (client, "/apps/evolution/addressbook/sources" );
- groups = e_source_list_peek_groups (list);
+ groups = e_source_list_peek_groups (list);
found_group = FALSE;
@@ -766,18 +766,18 @@ remove_addressbook_sources (GwAccountInfo *existing_account_info)
e_source_list_remove_group (list, group);
e_source_list_sync (list, NULL);
found_group = TRUE;
-
+
}
}
g_object_unref (list);
g_object_unref (client);
g_free (base_uri);
camel_url_free (url);
-
+
}
-static void
+static void
account_added (EAccountList *account_listener, EAccount *account)
{
@@ -788,7 +788,7 @@ account_added (EAccountList *account_listener, EAccount *account)
if (!is_groupwise_account (account))
return;
-
+
info = g_new0 (GwAccountInfo, 1);
info->uid = g_strdup (account->uid);
info->name = g_strdup (account->name);
@@ -796,30 +796,30 @@ account_added (EAccountList *account_listener, EAccount *account)
if (account->parent_uid) {
parent = (EAccount *)e_account_list_find (account_listener, E_ACCOUNT_FIND_UID, account->parent_uid);
- if (!parent)
+ if (!parent)
return;
- parent_url = camel_url_new (e_account_get_string(parent, E_ACCOUNT_SOURCE_URL), NULL);
+ parent_url = camel_url_new (e_account_get_string(parent, E_ACCOUNT_SOURCE_URL), NULL);
add_proxy_sources (info, parent_url->user);
} else {
status = add_addressbook_sources (account);
-
- if (status)
+
+ if (status)
add_calendar_tasks_sources (info);
}
groupwise_accounts = g_list_append (groupwise_accounts, info);
}
-static void
+static void
account_removed (EAccountList *account_listener, EAccount *account)
{
GwAccountInfo *info;
-
+
if (!is_groupwise_account (account))
return;
-
+
info = lookup_account_info (account->uid);
- if (info == NULL)
+ if (info == NULL)
return;
remove_calendar_tasks_sources (info);
@@ -841,11 +841,11 @@ account_changed (EAccountList *account_listener, EAccount *account)
GwAccountInfo *existing_account_info;
const char *old_use_ssl, *new_use_ssl;
const char *old_poa_address, *new_poa_address;
-
+
is_gw_account = is_groupwise_account (account);
-
+
existing_account_info = lookup_account_info (account->uid);
-
+
if (existing_account_info == NULL && is_gw_account) {
if (!account->enabled)
@@ -864,21 +864,21 @@ account_changed (EAccountList *account_listener, EAccount *account)
g_free (existing_account_info->name);
g_free (existing_account_info->source_url);
g_free (existing_account_info);
-
+
} else if ( existing_account_info != NULL && is_gw_account ) {
-
+
if (!account->enabled) {
account_removed (account_listener, account);
return;
}
-
+
/* some info of groupwise account is changed . update the sources with new info if required */
old_url = camel_url_new (existing_account_info->source_url, NULL);
- old_poa_address = old_url->host;
+ old_poa_address = old_url->host;
old_soap_port = camel_url_get_param (old_url, "soap_port");
old_use_ssl = camel_url_get_param (old_url, "use_ssl");
new_url = camel_url_new (account->source->url, NULL);
- new_poa_address = new_url->host;
+ new_poa_address = new_url->host;
if (!new_poa_address || strlen (new_poa_address) ==0)
return;
@@ -891,34 +891,34 @@ account_changed (EAccountList *account_listener, EAccount *account)
new_use_ssl = camel_url_get_param (new_url, "use_ssl");
if ((old_poa_address && strcmp (old_poa_address, new_poa_address))
- || (old_soap_port && strcmp (old_soap_port, new_soap_port))
+ || (old_soap_port && strcmp (old_soap_port, new_soap_port))
|| strcmp (old_url->user, new_url->user)
- || (!old_use_ssl)
+ || (!old_use_ssl)
|| strcmp (old_use_ssl, new_use_ssl)) {
-
+
account_removed (account_listener, account);
account_added (account_listener, account);
} else if (strcmp (existing_account_info->name, account->name)) {
-
+
modify_esource ("/apps/evolution/calendar/sources", existing_account_info, account->name, new_url);
modify_esource ("/apps/evolution/tasks/sources", existing_account_info, account->name, new_url);
modify_esource ("/apps/evolution/memos/sources", existing_account_info, account->name, new_url);
modify_addressbook_sources (account, existing_account_info);
-
+
}
-
+
g_free (existing_account_info->name);
g_free (existing_account_info->source_url);
existing_account_info->name = g_strdup (account->name);
existing_account_info->source_url = g_strdup (account->source->url);
camel_url_free (old_url);
camel_url_free (new_url);
- }
-}
+ }
+}
static void
prune_proxies (void) {
-
+
GConfClient *client = gconf_client_get_default ();
EAccountList *account_list;
ESourceList *sources;
@@ -928,7 +928,7 @@ prune_proxies (void) {
GError *err = NULL;
const gchar *parent_id_name = NULL;
int i;
- ECalSourceType types [] = { E_CAL_SOURCE_TYPE_EVENT,
+ ECalSourceType types [] = { E_CAL_SOURCE_TYPE_EVENT,
E_CAL_SOURCE_TYPE_TODO,
E_CAL_SOURCE_TYPE_JOURNAL
};
@@ -936,7 +936,7 @@ prune_proxies (void) {
account_list = e_account_list_new (client);
/* Is this being leaked */
g_object_unref (client);
-
+
e_account_list_prune_proxies (account_list);
for (i=0; i<3; i++) {
@@ -954,15 +954,15 @@ prune_proxies (void) {
if (parent_id_name) {
e_source_group_remove_source (group, source);
e_source_list_remove_group (sources, group);
- }
- }
- }
+ }
+ }
+ }
}
e_source_list_sync (sources, NULL);
}
}
-}
+}
static void
camel_gw_listener_construct (CamelGwListener *config_listener)
{
@@ -971,28 +971,28 @@ camel_gw_listener_construct (CamelGwListener *config_listener)
GwAccountInfo *info ;
prune_proxies ();
-
+
config_listener->priv->account_list = e_account_list_new (config_listener->priv->gconf_client);
for ( iter = e_list_get_iterator (E_LIST ( config_listener->priv->account_list) ) ; e_iterator_is_valid (iter); e_iterator_next (iter) ) {
-
+
account = E_ACCOUNT (e_iterator_get (iter));
if ( is_groupwise_account (account) && account->enabled) {
-
+
info = g_new0 (GwAccountInfo, 1);
info->uid = g_strdup (account->uid);
info->name = g_strdup (account->name);
info->source_url = g_strdup (account->source->url);
groupwise_accounts = g_list_append (groupwise_accounts, info);
-
+
}
-
+
}
g_signal_connect (config_listener->priv->account_list, "account_added", G_CALLBACK (account_added), NULL);
g_signal_connect (config_listener->priv->account_list, "account_changed", G_CALLBACK (account_changed), NULL);
- g_signal_connect (config_listener->priv->account_list, "account_removed", G_CALLBACK (account_removed), NULL);
+ g_signal_connect (config_listener->priv->account_list, "account_removed", G_CALLBACK (account_removed), NULL);
}
GType
@@ -1021,10 +1021,10 @@ CamelGwListener*
camel_gw_listener_new (void)
{
CamelGwListener *config_listener;
-
+
config_listener = g_object_new (CAMEL_TYPE_GW_LISTENER, NULL);
config_listener->priv->gconf_client = gconf_client_get_default();
-
+
camel_gw_listener_construct (config_listener);
return config_listener;
diff --git a/plugins/groupwise-account-setup/camel-gw-listener.h b/plugins/groupwise-account-setup/camel-gw-listener.h
index c9a6a966f6..e09369fd58 100644
--- a/plugins/groupwise-account-setup/camel-gw-listener.h
+++ b/plugins/groupwise-account-setup/camel-gw-listener.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Authors :
- *
+ *
* Sivaiah Nallagatla <snallagatla@novell.com>
*
* Copyright 2003, Novell, Inc.
@@ -28,7 +28,7 @@
#include<libedataserver/e-source.h>
#include<libedataserver/e-source-list.h>
#include <camel/camel-url.h>
-
+
G_BEGIN_DECLS
#define CAMEL_TYPE_GW_LISTENER (camel_gw_listener_get_type ())
@@ -42,12 +42,12 @@ typedef struct _CamelGwListenerClass CamelGwListenerClass;
typedef struct _CamelGwListenerPrivate CamelGwListenerPrivate;
struct _CamelGwListener {
GObject parent;
-
+
CamelGwListenerPrivate *priv;
};
struct _CamelGwListenerClass {
- GObjectClass parent_class;
+ GObjectClass parent_class;
};
GType camel_gw_listener_get_type (void);
diff --git a/plugins/groupwise-account-setup/groupwise-account-setup.c b/plugins/groupwise-account-setup/groupwise-account-setup.c
index 82f7829485..ccdf1f4305 100644
--- a/plugins/groupwise-account-setup/groupwise-account-setup.c
+++ b/plugins/groupwise-account-setup/groupwise-account-setup.c
@@ -10,10 +10,10 @@
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -34,7 +34,7 @@ static CamelGwListener *config_listener = NULL;
int e_plugin_lib_enable (EPluginLib *ep, int enable);
GtkWidget* org_gnome_gw_account_setup(struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
-static void
+static void
free_groupwise_listener ( void )
{
g_object_unref (config_listener);
@@ -44,7 +44,7 @@ int
e_plugin_lib_enable (EPluginLib *ep, int enable)
{
if (!config_listener) {
- config_listener = camel_gw_listener_new ();
+ config_listener = camel_gw_listener_new ();
g_atexit ( free_groupwise_listener );
}
diff --git a/plugins/groupwise-features/addressbook-groupwise.c b/plugins/groupwise-features/addressbook-groupwise.c
index bb51b8f876..002eeaa0d4 100644
--- a/plugins/groupwise-features/addressbook-groupwise.c
+++ b/plugins/groupwise-features/addressbook-groupwise.c
@@ -35,7 +35,7 @@
void commit_groupwise_addressbook (EPlugin *epl, EConfigTarget *target);
GtkWidget *e_book_groupwise_dummy (EPlugin *epl, EConfigHookItemFactoryData *data);
-void
+void
commit_groupwise_addressbook (EPlugin *epl, EConfigTarget *target)
{
EABConfigTargetSource *t = (EABConfigTargetSource *) target;
@@ -48,14 +48,14 @@ commit_groupwise_addressbook (EPlugin *epl, EConfigTarget *target)
uri_text = e_source_get_uri (source);
if (strncmp (uri_text, "groupwise", 9)) {
g_free (uri_text);
-
+
return ;
- }
+ }
e_source_set_property (source, "auth-domain", "Groupwise");
relative_uri = g_strconcat (";", e_source_peek_name (source), NULL);
e_source_set_relative_uri (source, relative_uri);
g_free (relative_uri);
-
+
source_group = e_source_peek_group (source);
l = e_source_group_peek_sources(source_group);
if (l && l->data ) {
@@ -69,7 +69,7 @@ commit_groupwise_addressbook (EPlugin *epl, EConfigTarget *target)
GtkWidget *
e_book_groupwise_dummy (EPlugin *epl, EConfigHookItemFactoryData *data)
{
-
-
+
+
return NULL;
}
diff --git a/plugins/groupwise-features/install-shared.c b/plugins/groupwise-features/install-shared.c
index 5f3bef5bf1..c0bffb23e0 100644
--- a/plugins/groupwise-features/install-shared.c
+++ b/plugins/groupwise-features/install-shared.c
@@ -93,20 +93,20 @@ install_folder_response (EMFolderSelector *emfs, int response, gpointer *data)
parent_name = names[parts -2];
else
parent_name = NULL;
- }
+ }
camel_exception_init (&ex);
if (!(store = (CamelStore *) camel_session_get_service (mail_component_peek_session(NULL), uri, CAMEL_PROVIDER_STORE, &ex))) {
camel_exception_clear (&ex);
return;
}
- cnc = get_cnc (store);
+ cnc = get_cnc (store);
if(E_IS_GW_CONNECTION (cnc)) {
- container_id = get_container_id (cnc, parent_name);
+ container_id = get_container_id (cnc, parent_name);
if(e_gw_connection_accept_shared_folder (cnc, folder_name, container_id, (char *)item_id, NULL) == E_GW_CONNECTION_STATUS_OK) {
-
+
folder = camel_store_get_folder (store, "Mailbox", 0, NULL);
/*changes = camel_folder_change_info_new ();
camel_folder_change_info_remove_uid (changes, (char *) item_id);
@@ -114,7 +114,7 @@ install_folder_response (EMFolderSelector *emfs, int response, gpointer *data)
//camel_folder_delete_message (folder, item_id);
camel_folder_set_message_flags (folder, item_id, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED);
camel_folder_summary_touch (folder->summary);
- //camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed", changes);
+ //camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed", changes);
uri = camel_url_to_string (((CamelService *) store)->url, CAMEL_URL_HIDE_ALL);
account = mail_config_get_account_by_source_url (uri);
uri = account->source->url;
@@ -131,7 +131,7 @@ install_folder_response (EMFolderSelector *emfs, int response, gpointer *data)
em_folder_tree_model_add_store (model, store, account->name);
camel_object_unref (store);
- }
+ }
}
g_strfreev(names);
@@ -149,13 +149,13 @@ accept_free(void *data)
g_free(accept_data);
}
-static void
+static void
accept_clicked(GnomeDruidPage *page, GtkWidget *druid, CamelMimeMessage *msg)
{
EMFolderTreeModel *model;
EMFolderTree *folder_tree;
GtkWidget *dialog;
- struct AcceptData *accept_data;
+ struct AcceptData *accept_data;
char *uri;
accept_data = g_new0(struct AcceptData, 1);
@@ -221,12 +221,12 @@ org_gnome_popup_wizard (EPlugin *ep, EMEventTargetMessage *target)
g_free(start_message);
wizard = GNOME_DRUID (gnome_druid_new_with_window (_("Shared Folder Installation"), NULL, TRUE, (GtkWidget**)(&window)));
gtk_window_set_position (GTK_WINDOW (window) , GTK_WIN_POS_CENTER_ALWAYS);
- gnome_druid_append_page(wizard, GNOME_DRUID_PAGE(title_page));
+ gnome_druid_append_page(wizard, GNOME_DRUID_PAGE(title_page));
gtk_widget_show_all (GTK_WIDGET (title_page));
camel_object_ref(msg);
g_object_set_data_full((GObject *)title_page, "msg", msg, camel_object_unref);
g_signal_connect (title_page, "next", G_CALLBACK(accept_clicked), msg);
- } else
+ } else
g_warning ("Could not get the sender name");
camel_object_unref(content);
diff --git a/plugins/groupwise-features/junk-mail-settings.c b/plugins/groupwise-features/junk-mail-settings.c
index 89c5e9fe3c..9d7b47c5f8 100644
--- a/plugins/groupwise-features/junk-mail-settings.c
+++ b/plugins/groupwise-features/junk-mail-settings.c
@@ -40,7 +40,7 @@
#include "share-folder.h"
#include "junk-settings.h"
-void
+void
org_gnome_junk_settings(EPlugin *ep, EMPopupTargetSelect *t);
static void
@@ -63,7 +63,7 @@ junk_dialog_response (GtkWidget *dialog, int response, JunkSettings *js)
}
-static void
+static void
junk_mail_settings (EPopup *ep, EPopupItem *item, void *data)
{
GtkWidget *dialog ,*w, *notebook, *box;
@@ -72,8 +72,8 @@ junk_mail_settings (EPopup *ep, EPopupItem *item, void *data)
EGwConnection *cnc;
gchar *msg;
CamelFolder *folder = (CamelFolder *)data;
- CamelStore *store = folder->parent_store;
- cnc = get_cnc (store);
+ CamelStore *store = folder->parent_store;
+ cnc = get_cnc (store);
dialog = gtk_dialog_new_with_buttons (_("Junk Settings"),
NULL,
@@ -87,7 +87,7 @@ junk_mail_settings (EPopup *ep, EPopupItem *item, void *data)
gtk_widget_ensure_style (dialog);
gtk_container_set_border_width ((GtkContainer *) ((GtkDialog *) dialog)->vbox, 12);
box = gtk_vbox_new (FALSE, 6);
- w = gtk_label_new ("");
+ w = gtk_label_new ("");
msg = g_strdup_printf("<b>%s</b>", _("Junk Mail Settings"));
gtk_label_set_markup (GTK_LABEL (w), msg);
gtk_box_pack_start ((GtkBox *) box, w, FALSE, FALSE, 6);
@@ -96,14 +96,14 @@ junk_mail_settings (EPopup *ep, EPopupItem *item, void *data)
junk_tab = junk_settings_new (cnc);
w = (GtkWidget *)junk_tab->vbox;
gtk_box_pack_start ((GtkBox *) box, w, FALSE, FALSE, 6);
-
+
/*We might have to add more options for settings i.e. more pages*/
while (page_count > 0 ){
notebook = gtk_notebook_new ();
gtk_notebook_append_page ((GtkNotebook *)notebook, box, NULL);
gtk_box_pack_start ((GtkBox *) ((GtkDialog *) dialog)->vbox, notebook, TRUE, TRUE, 0);
}
-
+
if (page_count == 0)
gtk_box_pack_start ((GtkBox *) ((GtkDialog *) dialog)->vbox, box, TRUE, TRUE, 0);
@@ -115,35 +115,35 @@ static EPopupItem popup_items[] = {
{ E_POPUP_ITEM, "50.emfv.05", N_("Junk Mail Settings..."), junk_mail_settings, NULL, NULL, 0, EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY}
};
-static void
+static void
popup_free (EPopup *ep, GSList *items, void *data)
{
g_slist_free (items);
}
-void
+void
org_gnome_junk_settings(EPlugin *ep, EMPopupTargetSelect *t)
{
GSList *menus = NULL;
-
+
int i = 0;
static int first = 0;
-
+
if (! g_strrstr (t->uri, "groupwise://"))
return ;
-
+
/* for translation*/
if (!first) {
popup_items[0].label = _(popup_items[0].label);
-
+
}
-
+
first++;
-
+
for (i = 0; i < sizeof (popup_items) / sizeof (popup_items[0]); i++)
menus = g_slist_prepend (menus, &popup_items[i]);
-
+
e_popup_add_items (t->target.popup, menus, NULL, popup_free, t->folder);
-
+
}
diff --git a/plugins/groupwise-features/junk-settings.c b/plugins/groupwise-features/junk-settings.c
index 2cbf793f93..87ce3774d5 100644
--- a/plugins/groupwise-features/junk-settings.c
+++ b/plugins/groupwise-features/junk-settings.c
@@ -110,7 +110,7 @@ static void
junk_settings_destroy (GtkObject *obj)
{
JunkSettings *js = (JunkSettings *) obj;
- free_all (js);
+ free_all (js);
GTK_OBJECT_CLASS (parent_class)->destroy (obj);
}
@@ -148,16 +148,16 @@ free_node(JunkEntry *nentry)
return;
}
-static JunkEntry *
+static JunkEntry *
find_node(GList *list, gchar *match)
{
JunkEntry *one_entry = NULL;
- EGwJunkEntry *ent = NULL;
+ EGwJunkEntry *ent = NULL;
GList *tmp;
gint i ;
-
+
if(list){
- tmp = g_list_first(list);
+ tmp = g_list_first(list);
for(i=0; tmp ; i++)
{
one_entry = tmp->data;
@@ -169,11 +169,11 @@ find_node(GList *list, gchar *match)
tmp= g_list_next(tmp);
}
}
-
+
return NULL;
}
-static void
+static void
free_all (JunkSettings *js)
{
if (js->junk_list){
@@ -190,7 +190,7 @@ get_junk_list (JunkSettings *js)
char *entry;
char *msg;
int use_junk, use_block, use_pab, persistence;
-
+
if (E_IS_GW_CONNECTION (js->cnc)) {
if (e_gw_connection_get_junk_settings (js->cnc, &use_junk, &use_block, &use_pab, &persistence) == E_GW_CONNECTION_STATUS_OK) {
if (use_junk) {
@@ -207,15 +207,15 @@ get_junk_list (JunkSettings *js)
if (e_gw_connection_get_junk_entries (js->cnc, &(list)) == E_GW_CONNECTION_STATUS_OK) {
js->users = g_list_length (list);
if (js->users) {
-/* I populate the list and set flags to 0 for the existing users*/
+/* I populate the list and set flags to 0 for the existing users*/
while (list) {
JunkEntry *junk_entry = g_new0 (JunkEntry , 1);
junk_entry->entry = list->data;
- junk_entry->flag = 0;
+ junk_entry->flag = 0;
entry = g_strdup ((junk_entry->entry)->match);
msg = g_strdup_printf ("%s", entry);
gtk_list_store_append (GTK_LIST_STORE (js->model), &(js->iter));
- gtk_list_store_set (GTK_LIST_STORE (js->model), &(js->iter), 0, msg, -1);
+ gtk_list_store_set (GTK_LIST_STORE (js->model), &(js->iter), 0, msg, -1);
js->junk_list = g_list_append (js->junk_list, junk_entry);
g_free (msg);
@@ -224,7 +224,7 @@ get_junk_list (JunkSettings *js)
entry = NULL;
list = list->next;
}
- }
+ }
}
else
g_warning("Could not get the JUNK List");
@@ -243,11 +243,11 @@ commit_changes (JunkSettings *js)
for (node = js->junk_list; node; node = node->next)
{
- junk_entry = node->data;
+ junk_entry = node->data;
if (junk_entry->flag & 0x1)
- new_list = g_list_append (new_list, junk_entry->entry);
+ new_list = g_list_append (new_list, junk_entry->entry);
else if (junk_entry->flag & 0x4) {
- remove_list = g_list_append (remove_list, junk_entry->entry);
+ remove_list = g_list_append (remove_list, junk_entry->entry);
}
}
@@ -288,14 +288,14 @@ commit_changes (JunkSettings *js)
remove_list = NULL;
}
-static void
+static void
enable_clicked (GtkRadioButton *button, JunkSettings *js)
{
- js->flag_for_ok = 0;
+ js->flag_for_ok = 0;
gtk_widget_set_sensitive (GTK_WIDGET (js->table) ,TRUE);
}
-static void
+static void
disable_clicked (GtkRadioButton *button, JunkSettings *js)
{
js->flag_for_ok = 2;
@@ -310,17 +310,17 @@ add_clicked(GtkButton *button, JunkSettings *js)
JunkEntry *new_entry = NULL;
EGwJunkEntry *junk_entry = NULL;
gchar *msg = NULL;
-
+
self_email = g_strdup (e_gw_connection_get_user_email (js->cnc));
email = gtk_entry_get_text (js->entry);
/* You can't mark junk sender yourself*/
if (g_strrstr (email, "@") == NULL || (!g_ascii_strcasecmp (email , self_email)) || !g_ascii_strcasecmp (email, "" ))
- return;
- else {
+ return;
+ else {
/*check whether already exists*/
if (js->junk_list && email){
new_entry = find_node (js->junk_list, (gchar *)email);
- if (new_entry)
+ if (new_entry)
return;
}
@@ -331,13 +331,13 @@ add_clicked(GtkButton *button, JunkSettings *js)
new_entry->entry = junk_entry;
new_entry->flag = 1;
msg = g_strdup (email);
- gtk_list_store_append (GTK_LIST_STORE (js->model), &(js->iter));
+ gtk_list_store_append (GTK_LIST_STORE (js->model), &(js->iter));
gtk_list_store_set (GTK_LIST_STORE (js->model), &(js->iter), 0, msg, -1);
g_free(msg);
js->junk_list = g_list_append (js->junk_list, new_entry);
js->flag_for_ok = 0;
}
- gtk_entry_set_text (GTK_ENTRY(js->entry), "");
+ gtk_entry_set_text (GTK_ENTRY(js->entry), "");
}
static void
@@ -348,9 +348,9 @@ remove_clicked(GtkButton *button, JunkSettings *js)
gtk_tree_model_get ((GtkTreeModel *) js->model, &(js->iter), 0, &email, -1);
entry = find_node (js->junk_list, email);
- if (entry->flag & 0x1) {
+ if (entry->flag & 0x1) {
js->junk_list = g_list_remove (js->junk_list, entry);
- free_node(entry);
+ free_node(entry);
} else {
entry->flag = 0;
entry->flag |= 0x4;
@@ -360,19 +360,19 @@ remove_clicked(GtkButton *button, JunkSettings *js)
}
-static void
+static void
user_selected(GtkTreeSelection *selection, JunkSettings *js)
{
GtkTreeModel *model;
-
+
gtk_tree_selection_set_mode(selection, GTK_SELECTION_SINGLE);
if (gtk_tree_selection_get_selected (selection, &model, &(js->iter))){
gtk_widget_set_sensitive (GTK_WIDGET (js->remove), TRUE);
- }
+ }
}
-
-static void
+
+static void
junk_settings_construct (JunkSettings *js)
{
GladeXML *xml;
@@ -384,7 +384,7 @@ junk_settings_construct (JunkSettings *js)
xml = glade_xml_new (gladefile, ROOTNODE, NULL);
g_free (gladefile);
- js->xml =xml;
+ js->xml =xml;
if (!js->xml) {
g_warning ("could not get xml");
diff --git a/plugins/groupwise-features/junk-settings.h b/plugins/groupwise-features/junk-settings.h
index 5a9b57ce12..59204e1f14 100644
--- a/plugins/groupwise-features/junk-settings.h
+++ b/plugins/groupwise-features/junk-settings.h
@@ -59,11 +59,11 @@ struct _GtkVBox;
struct _JunkSettings {
GtkVBox parent_object;
-
+
struct _GladeXML *xml;
-
+
/* General tab */
-
+
/* Default Behavior */
struct _GtkTreeView *entry_list;
struct _GtkButton *add_button;
@@ -78,7 +78,7 @@ struct _JunkSettings {
struct _GtkVBox *vbox;
struct _GtkVBox *table;
struct _GtkWidget *window;
-
+
GList *junk_list;
gint users;
gint flag_for_ok;
@@ -89,7 +89,7 @@ struct _JunkSettings {
struct _JunkSettingsClass {
GtkVBoxClass parent_class;
-
+
};
GType junk_settings_get_type (void);
diff --git a/plugins/groupwise-features/mail-retract.c b/plugins/groupwise-features/mail-retract.c
index 165ceac49e..2026bb714e 100644
--- a/plugins/groupwise-features/mail-retract.c
+++ b/plugins/groupwise-features/mail-retract.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
- * Author:
+ * Author:
* Sankar P ( psankar@novell.com )
*
* Copyright 2004 Novell, Inc. (www.novell.com)
@@ -40,17 +40,17 @@ static void retract_mail_settings (EPopup *ep, EPopupItem *item, void *data)
{
EGwConnection *cnc;
CamelFolder *folder = (CamelFolder *)data;
- CamelStore *store = folder->parent_store;
+ CamelStore *store = folder->parent_store;
char *id;
-
- cnc = get_cnc (store);
+
+ cnc = get_cnc (store);
id = (char *)item->user_data;
if (e_gw_connection_retract_request (cnc, id, NULL, FALSE, FALSE) != E_GW_CONNECTION_STATUS_OK )
e_error_run (NULL, "org.gnome.evolution.message.retract:retract-failure", NULL);
else {
GtkWidget *dialog;
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, _("Message retracted successfully"));
+ dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, _("Message retracted successfully"));
gtk_dialog_run (GTK_DIALOG(dialog));
gtk_widget_destroy (dialog);
}
@@ -87,6 +87,6 @@ void org_gnome_retract_message (EPlugin *ep, EMPopupTargetSelect *t)
menus = g_slist_prepend (menus, &popup_items[i]);
e_popup_add_items (t->target.popup, menus, NULL, popup_free, t->folder);
- }
+ }
return ;
}
diff --git a/plugins/groupwise-features/mail-send-options.c b/plugins/groupwise-features/mail-send-options.c
index 84ea84733e..6fefa06e4b 100644
--- a/plugins/groupwise-features/mail-send-options.c
+++ b/plugins/groupwise-features/mail-send-options.c
@@ -3,16 +3,16 @@
* Authors: Parthasarathi Susarla <sparthasarathi@novell.com>
*
* Copyright 2004 Novell, Inc. (www.novell.com)
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -44,7 +44,7 @@ static ESendOptionsDialog * dialog = NULL ;
void org_gnome_composer_send_options (EPlugin *ep, EMEventTargetComposer *t);
-static time_t
+static time_t
add_day_to_time (time_t time, int days)
{
struct tm *tm;
@@ -65,7 +65,7 @@ feed_input_data(ESendOptionsDialog * dialog, gint state, gpointer data)
comp = (EMsgComposer *) data;
/* we are bothered only for ok response: other cases are handled generally*/
- if (state == GTK_RESPONSE_OK) {
+ if (state == GTK_RESPONSE_OK) {
if (dialog->data->gopts->reply_enabled) {
if (dialog->data->gopts->reply_convenient)
e_msg_composer_add_header (comp, X_REPLY_CONVENIENT ,"1" ) ;
@@ -116,13 +116,13 @@ feed_input_data(ESendOptionsDialog * dialog, gint state, gpointer data)
e_msg_composer_add_header (comp, X_SEND_OPT_PRIORITY, temp);
g_free (temp);
}
-
+
if (dialog->data->gopts->security) {
temp = g_strdup_printf ("%d",dialog->data->gopts->security);
e_msg_composer_add_header (comp, X_SEND_OPT_SECURITY, temp);
g_free (temp);
}
- }
+ }
}
static void
@@ -130,21 +130,21 @@ send_options_commit (EMsgComposer *comp, gpointer user_data)
{
if (!user_data && !E_IS_SENDOPTIONS_DIALOG (user_data))
return;
-
+
if (dialog) {
g_object_unref (dialog);
- dialog = NULL;
+ dialog = NULL;
}
}
-void
+void
org_gnome_composer_send_options (EPlugin *ep, EMEventTargetComposer *t)
{
EMsgComposer *comp = (struct _EMsgComposer *)t->composer ;
- EAccount *account = NULL;
+ EAccount *account = NULL;
char *temp = NULL;
-
+
account = e_msg_composer_get_preferred_account (comp) ;
if (!account)
return;
@@ -153,14 +153,14 @@ org_gnome_composer_send_options (EPlugin *ep, EMEventTargetComposer *t)
if (!temp) {
return;
}
- e_msg_composer_set_send_options (comp, TRUE);
+ e_msg_composer_set_send_options (comp, TRUE);
/* display the send options dialog */
if (!dialog) {
g_print ("New dialog\n\n") ;
dialog = e_sendoptions_dialog_new () ;
}
e_sendoptions_dialog_run (dialog, GTK_WIDGET (comp), E_ITEM_MAIL) ;
-
+
g_signal_connect (dialog, "sod_response",
G_CALLBACK (feed_input_data), comp);
diff --git a/plugins/groupwise-features/mail-send-options.h b/plugins/groupwise-features/mail-send-options.h
index 128777ba0b..c1d9eb04b5 100644
--- a/plugins/groupwise-features/mail-send-options.h
+++ b/plugins/groupwise-features/mail-send-options.h
@@ -3,16 +3,16 @@
* Authors: Parthasarathi Susarla <sparthasarathi@novell.com>
*
* Copyright 2004 Novell, Inc. (www.novell.com)
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/plugins/groupwise-features/process-meeting.c b/plugins/groupwise-features/process-meeting.c
index 718a10d1c9..356781f344 100644
--- a/plugins/groupwise-features/process-meeting.c
+++ b/plugins/groupwise-features/process-meeting.c
@@ -50,14 +50,14 @@ static EPopupItem popup_items[] = {
{ E_POPUP_ITEM, "43.decline", N_("Decline"), on_decline_meeting, NULL, GTK_STOCK_CANCEL, 0, E_CAL_POPUP_SELECT_NOTEDITING | E_CAL_POPUP_SELECT_MEETING}
};
-static void
+static void
popup_free (EPopup *ep, GSList *items, void *data)
{
g_slist_free (items);
items = NULL;
}
-void
+void
org_gnome_accept (EPlugin *ep, ECalPopupTargetSelect *target)
{
GSList *menus = NULL;
@@ -116,8 +116,8 @@ receive_objects (gpointer data)
{
GError *error = NULL;
ReceiveData *r_data = data;
-
-
+
+
icalcomponent_set_method (r_data->icalcomp, ICAL_METHOD_REQUEST);
if (!e_cal_receive_objects (r_data->ecal, r_data->icalcomp, &error)) {
@@ -158,7 +158,7 @@ find_attendee (icalcomponent *ical_comp, const char *address)
}
g_free (text);
}
-
+
return prop;
}
static void
@@ -187,7 +187,7 @@ change_status (icalcomponent *ical_comp, const char *address, icalparameter_part
}
}
-static void
+static void
process_meeting (ECalendarView *cal_view, icalparameter_partstat status)
{
GList *selected;
@@ -202,7 +202,7 @@ process_meeting (ECalendarView *cal_view, icalparameter_partstat status)
GThread *thread = NULL;
GError *error = NULL;
char *address = NULL;
-
+
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
address = itip_get_comp_attendee (comp, event->comp_data->client);
@@ -212,7 +212,7 @@ process_meeting (ECalendarView *cal_view, icalparameter_partstat status)
/* Free comp */
g_object_unref (comp);
comp = NULL;
-
+
clone = icalcomponent_new_clone (event->comp_data->icalcomp);
change_status (clone, address, status);
@@ -233,11 +233,11 @@ process_meeting (ECalendarView *cal_view, icalparameter_partstat status)
icalproperty *prop;
const char *uid = icalcomponent_get_uid (r_data->icalcomp);
- prop = icalproperty_new_x ("All");
+ prop = icalproperty_new_x ("All");
icalproperty_set_x_name (prop, "X-GW-RECUR-INSTANCES-MOD-TYPE");
icalcomponent_add_property (r_data->icalcomp, prop);
- prop = icalproperty_new_x (uid);
+ prop = icalproperty_new_x (uid);
icalproperty_set_x_name (prop, "X-GW-RECURRENCE-KEY");
icalcomponent_add_property (r_data->icalcomp, prop);
@@ -255,7 +255,7 @@ process_meeting (ECalendarView *cal_view, icalparameter_partstat status)
}
}
-/*FIXME the data does not give us the ECalendarView object.
+/*FIXME the data does not give us the ECalendarView object.
we should remove the global c_view variable once we get it from the data*/
static void
on_accept_meeting (EPopup *ep, EPopupItem *pitem, void *data)
diff --git a/plugins/groupwise-features/proxy-login.c b/plugins/groupwise-features/proxy-login.c
index cab5d594ea..6259336728 100644
--- a/plugins/groupwise-features/proxy-login.c
+++ b/plugins/groupwise-features/proxy-login.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Authors:
+ * Authors:
* Shreyas Srinivasan <sshreyas@novell.com>
* Sankar P <psankar@novell.com>
*
@@ -104,7 +104,7 @@ proxy_login_finalize (GObject *object)
g_free (prd->priv);
prd->priv = NULL;
}
-
+
if (parent_class->finalize)
(* parent_class->finalize) (object);
}
@@ -144,7 +144,7 @@ proxy_login_init (GObject *object)
prd = PROXY_LOGIN (object);
priv = g_new0 (proxyLoginPrivate, 1);
prd->priv = priv;
-
+
prd->proxy_list = NULL;
priv->xml = NULL;
priv->main = NULL;
@@ -152,7 +152,7 @@ proxy_login_init (GObject *object)
priv->tree = NULL;
}
-GType
+GType
proxy_login_get_type (void)
{
static GType type = 0;
@@ -178,13 +178,13 @@ proxy_login_get_type (void)
return type;
}
-proxyLogin *
+proxyLogin *
proxy_login_new (void)
{
proxyLogin *prd;
prd = g_object_new (TYPE_PROXY_LOGIN, NULL);
-
+
return prd;
}
@@ -196,27 +196,27 @@ proxy_get_password (EAccount *account, char **user_name, char **password)
const char *poa_address, *use_ssl = NULL, *soap_port;
url = camel_url_new (account->source->url, NULL);
- if (url == NULL)
+ if (url == NULL)
return 0;
*user_name = g_strdup (url->user);
- poa_address = url->host;
+ poa_address = url->host;
if (!poa_address || strlen (poa_address) ==0)
return 0;
-
+
soap_port = camel_url_get_param (url, "soap_port");
if (!soap_port || strlen (soap_port) == 0)
soap_port = "7191";
use_ssl = camel_url_get_param (url, "use_ssl");
- key = g_strdup_printf ("groupwise://%s@%s/", url->user, poa_address);
-
+ key = g_strdup_printf ("groupwise://%s@%s/", url->user, poa_address);
+
if (use_ssl && !g_str_equal (use_ssl, "never"))
uri = g_strdup_printf ("https://%s:%s/soap", poa_address, soap_port);
- else
+ else
uri = g_strdup_printf ("http://%s:%s/soap", poa_address, soap_port);
-
+
failed_auth = "";
-
+
prompt = g_strdup_printf (_("%sEnter password for %s (user %s)"),
failed_auth, poa_address, url->user);
@@ -224,13 +224,13 @@ proxy_get_password (EAccount *account, char **user_name, char **password)
g_free (key);
g_free (prompt);
- g_free (uri);
+ g_free (uri);
camel_url_free (url);
return 1;
}
-static EGwConnection *
+static EGwConnection *
proxy_login_get_cnc (EAccount *account)
{
EGwConnection *cnc;
@@ -238,27 +238,27 @@ proxy_login_get_cnc (EAccount *account)
char *uri = NULL, *failed_auth = NULL, *key = NULL, *prompt = NULL, *password = NULL;
const char *use_ssl = NULL, *soap_port;
gboolean remember;
-
+
url = camel_url_new (account->source->url, NULL);
- if (url == NULL)
+ if (url == NULL)
return NULL;
if (!url->host || strlen (url->host) ==0)
return NULL;
-
+
soap_port = camel_url_get_param (url, "soap_port");
if (!soap_port || strlen (soap_port) == 0)
soap_port = "7191";
use_ssl = camel_url_get_param (url, "use_ssl");
- key = g_strdup_printf ("groupwise://%s@%s/", url->user, url->host);
+ key = g_strdup_printf ("groupwise://%s@%s/", url->user, url->host);
if (use_ssl && !g_str_equal (use_ssl, "never"))
uri = g_strdup_printf ("https://%s:%s/soap", url->host, soap_port);
- else
+ else
uri = g_strdup_printf ("http://%s:%s/soap", url->host, soap_port);
-
+
failed_auth = "";
cnc = NULL;
-
+
prompt = g_strdup_printf (_("%sEnter password for %s (user %s)"),
failed_auth, url->host, url->user);
@@ -267,7 +267,7 @@ proxy_login_get_cnc (EAccount *account)
if (!password)
password = e_passwords_ask_password (prompt, "Groupwise", key, prompt,
E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET, &remember, NULL);
-
+
g_free (prompt);
cnc = e_gw_connection_new (uri, url->user, password);
if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) {
@@ -275,17 +275,17 @@ proxy_login_get_cnc (EAccount *account)
cnc = e_gw_connection_new (http_uri, url->user, password);
g_free (http_uri);
}
-
+
g_free (key);
g_free (password);
- g_free (uri);
+ g_free (uri);
camel_url_free (url);
return cnc;
}
-
-static void
+
+static void
proxy_login_cb (GtkDialog *dialog, gint state)
{
GtkWidget *account_name_tbox;
@@ -300,7 +300,7 @@ proxy_login_cb (GtkDialog *dialog, gint state)
case GTK_RESPONSE_OK:
gtk_widget_destroy (priv->main);
proxy_soap_login (proxy_name);
- g_object_unref (pld);
+ g_object_unref (pld);
break;
case GTK_RESPONSE_CANCEL:
gtk_widget_destroy (priv->main);
@@ -313,7 +313,7 @@ proxy_login_cb (GtkDialog *dialog, gint state)
g_free (proxy_name);
}
-static void
+static void
proxy_soap_login (char *email)
{
EAccountList *accounts = mail_config_get_accounts();
@@ -326,30 +326,30 @@ proxy_soap_login (char *email)
char *name;
int i;
int permissions = 0;
-
+
for (i=0; email[i]!='\0' && email[i]!='@' ; i++);
if (email[i]=='@')
name = g_strndup(email, i);
else {
e_error_run (NULL, "org.gnome.evolution.proxy-login:invalid-user",email ,NULL);
return;
- }
+ }
/* README: There should not be the weird scenario of the proxy itself configured as an account.
If so, it is violating the (li)unix philosophy of User creation. So dont care about that scenario*/
- if (e_account_list_find (accounts, E_ACCOUNT_FIND_ID_ADDRESS, email) != NULL) {
+ if (e_account_list_find (accounts, E_ACCOUNT_FIND_ID_ADDRESS, email) != NULL) {
e_error_run (NULL, "org.gnome.evolution.proxy-login:already-loggedin", email, NULL);
g_free (name);
return;
}
-
+
srcAccount = pld->account;
cnc = proxy_login_get_cnc(srcAccount);
proxy_get_password (srcAccount, &user_name, &password);
-
+
proxy_cnc = e_gw_connection_get_proxy_connection (cnc, user_name, password, email, &permissions);
-
+
if (proxy_cnc) {
parent = camel_url_new (e_account_get_string(srcAccount, E_ACCOUNT_SOURCE_URL), NULL);
parent_source_url = camel_url_to_string (parent, CAMEL_URL_HIDE_PASSWORD);
@@ -375,8 +375,8 @@ proxy_soap_login (char *email)
camel_url_free (parent);
} else {
e_error_run (NULL, "org.gnome.evolution.proxy-login:invalid-user",email ,NULL);
- return;
- }
+ return;
+ }
g_object_unref (cnc);
g_free (name);
@@ -384,8 +384,8 @@ proxy_soap_login (char *email)
g_free (password);
}
-
-static void
+
+static void
proxy_login_add_new_store (char *uri, CamelStore *store, void *user_data)
{
MailComponent *component = mail_component_peek ();
@@ -402,7 +402,7 @@ proxy_login_add_new_store (char *uri, CamelStore *store, void *user_data)
mail_component_add_store (component, store, account->name);
}
-static void
+static void
proxy_login_tree_view_changed_cb(GtkDialog *dialog)
{
proxyLoginPrivate *priv = pld->priv;
@@ -420,14 +420,14 @@ proxy_login_tree_view_changed_cb(GtkDialog *dialog)
gtk_entry_set_text((GtkEntry*) account_name_tbox,account_mailid);
}
-static void
+static void
proxy_login_setup_tree_view (void)
{
proxyLoginPrivate *priv;
GtkTreeSelection *selection;
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
-
+
priv = pld->priv;
renderer = g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF,
"xpad", 4,
@@ -444,7 +444,7 @@ proxy_login_setup_tree_view (void)
g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK(proxy_login_tree_view_changed_cb), NULL);
}
-static void
+static void
proxy_login_update_tree (void)
{
GtkTreeIter iter;
@@ -457,7 +457,7 @@ proxy_login_update_tree (void)
proxyLoginPrivate *priv = pld->priv;
gchar *file_name = e_icon_factory_get_icon_filename ("stock_person", 48);
broken_image = gdk_pixbuf_new_from_file (file_name, NULL);
-
+
cnc = proxy_login_get_cnc(pld->account);
e_gw_connection_get_proxy_list (cnc, &proxy_list);
@@ -511,17 +511,17 @@ org_gnome_proxy_account_login (EPopup *ep, EPopupItem *p, void *data)
proxy_login_setup_tree_view ();
proxy_login_update_tree ();
g_signal_connect (GTK_DIALOG (priv->main), "response", G_CALLBACK(proxy_login_cb), NULL);
- gtk_widget_show (GTK_WIDGET (priv->main));
+ gtk_widget_show (GTK_WIDGET (priv->main));
}
static EPopupItem popup_items[] = {
-/* To Translators: In this case, Proxy does not mean something like 'HTTP Proxy', but a groupwise
- * feature by which one person can send/read mails/appointments using another person's identity
+/* To Translators: In this case, Proxy does not mean something like 'HTTP Proxy', but a groupwise
+ * feature by which one person can send/read mails/appointments using another person's identity
* without knowing his password, for example if that other person is on vacation */
{ E_POPUP_ITEM, "20.emc.04", N_("_Proxy Login..."), org_gnome_proxy_account_login, NULL, NULL, 0, EM_POPUP_FOLDER_STORE }
};
-static void
+static void
popup_free (EPopup *ep, GSList *items, void *data)
{
g_slist_free (items);
diff --git a/plugins/groupwise-features/proxy-login.h b/plugins/groupwise-features/proxy-login.h
index 86cabab444..4820721bd9 100644
--- a/plugins/groupwise-features/proxy-login.h
+++ b/plugins/groupwise-features/proxy-login.h
@@ -42,7 +42,7 @@ struct _proxyLogin{
GList *proxy_list;
/* Private Dialog Information*/
- proxyLoginPrivate *priv;
+ proxyLoginPrivate *priv;
};
struct _proxyLoginClass {
diff --git a/plugins/groupwise-features/proxy.c b/plugins/groupwise-features/proxy.c
index 7db7e510be..3ffb56579d 100644
--- a/plugins/groupwise-features/proxy.c
+++ b/plugins/groupwise-features/proxy.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
- * Authors:
+ * Authors:
* Shreyas Srinivasan (sshreyas@novell.com)
* Sankar P ( psankar@novell.com )
*
@@ -89,7 +89,7 @@ struct _proxyDialogPrivate {
/*name selector dialog*/
ENameSelector *proxy_name_selector;
-
+
GtkTreeView *tree;
GtkTreeStore *store;
@@ -134,7 +134,7 @@ free_proxy_handler (proxyHandler *handler)
g_free (handler->proxy_name);
if (handler->proxy_email)
- g_free (handler->proxy_email);
+ g_free (handler->proxy_email);
handler->uniqueid = NULL;
handler->proxy_name = NULL;
@@ -159,7 +159,7 @@ proxy_dialog_finalize (GObject *object)
g_return_if_fail (IS_PROXY_DIALOG (prd));
priv = prd->priv;
-
+
if(priv->proxy_name_selector)
g_object_unref (priv->proxy_name_selector);
@@ -170,7 +170,7 @@ proxy_dialog_finalize (GObject *object)
g_free (prd->priv);
prd->priv = NULL;
}
-
+
prd = NULL;
if (parent_class->finalize)
(* parent_class->finalize) (object);
@@ -203,7 +203,7 @@ proxy_dialog_init (GObject *object)
prd->priv = priv;
prd->cnc = NULL;
- priv->tab_dialog = NULL;
+ priv->tab_dialog = NULL;
priv->xml = NULL;
priv->xml_tab = NULL;
priv->main = NULL;
@@ -220,7 +220,7 @@ proxy_dialog_init (GObject *object)
priv->task_read = NULL;
priv->task_write = NULL;
priv->alarms = NULL;
- priv->notifications = NULL;
+ priv->notifications = NULL;
priv->options = NULL;
priv->private = NULL;
priv->help_section = NULL;
@@ -229,7 +229,7 @@ proxy_dialog_init (GObject *object)
}
GType
-proxy_dialog_get_type (void)
+proxy_dialog_get_type (void)
{
static GType type = 0;
@@ -255,27 +255,27 @@ proxy_dialog_get_type (void)
return type;
}
-proxyDialog *
+proxyDialog *
proxy_dialog_new (void)
{
proxyDialog *prd;
prd = g_object_new (TYPE_PROXY_DIALOG, NULL);
-
+
return prd;
}
-static int
+static int
proxy_get_permissions_from_dialog (EAccount *account)
{
int permissions;
proxyDialogPrivate *priv;
proxyDialog *prd = NULL;
- prd = g_object_get_data ((GObject *)account, "prd");
+ prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
permissions = 0;
-
+
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->mail_read)))
permissions |= E_GW_PROXY_MAIL_READ;
@@ -315,7 +315,7 @@ proxy_get_permissions_from_dialog (EAccount *account)
return permissions;
}
-static int
+static int
proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog)
{
GtkTreeIter iter;
@@ -326,7 +326,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog)
char *account_mailid;
proxyDialog *prd = NULL;
- prd = g_object_get_data ((GObject *)account, "prd");
+ prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
switch (dialog)
@@ -346,20 +346,20 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog)
if (!tmp) {
e_error_run (NULL, "org.gnome.evolution.proxy:no-user",NULL ,NULL);
- return -1;
+ return -1;
}
-
+
for (; tmp != NULL; tmp = g_list_next (tmp)) {
email = NULL;
email = (char *)e_destination_get_email (tmp->data);
if (g_str_equal(email, ""))
continue;
-
+
if (g_strrstr (email, "@") == NULL) {
e_error_run (NULL, "org.gnome.evolution.proxy:invalid-user", email, NULL);
return -1;
- }
+ }
if (! g_ascii_strcasecmp(e_gw_connection_get_user_email (prd->cnc), email)) {
e_error_run (NULL, "org.gnome.evolution.proxy:invalid-user", email, NULL);
return -1;
@@ -380,7 +380,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog)
return 0;
}
-
+
e_error_run (NULL, "org.gnome.evolution.proxy:user-is-proxy",email ,NULL);
return -1;
}
@@ -407,7 +407,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog)
new_proxy->uniqueid = NULL;
new_proxy->flags = E_GW_PROXY_NEW;
new_proxy->permissions = proxy_get_permissions_from_dialog (account);
-
+
priv->proxy_list = g_list_append (priv->proxy_list, new_proxy);
}
}
@@ -426,7 +426,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog)
break;
default:
return -1;
- }
+ }
return 0;
}
@@ -438,7 +438,7 @@ proxy_dialog_initialize_widgets (EAccount *account)
proxyDialogPrivate *priv;
proxyDialog *prd = NULL;
- prd = g_object_get_data ((GObject *)account, "prd");
+ prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
priv->account_name = GW ("proxy_account_name");
priv->mail_read = GW ("mailRead");
@@ -453,7 +453,7 @@ proxy_dialog_initialize_widgets (EAccount *account)
priv->notifications = GW ("notifications");
priv->options = GW ("modify_rules");
priv->private = GW ("read_private");
-
+
return (priv->account_name
&& priv->mail_read
&& priv->mail_write
@@ -469,7 +469,7 @@ proxy_dialog_initialize_widgets (EAccount *account)
&& priv->private);
}
-static EGwConnection *
+static EGwConnection *
proxy_get_cnc (EAccount *account, GtkWindow *parent_window)
{
EGwConnection *cnc;
@@ -479,27 +479,27 @@ proxy_get_cnc (EAccount *account, GtkWindow *parent_window)
gboolean remember;
url = camel_url_new (account->source->url, NULL);
- if (url == NULL)
+ if (url == NULL)
return NULL;
- poa_address = url->host;
+ poa_address = url->host;
if (!poa_address || strlen (poa_address) ==0)
return NULL;
-
+
soap_port = camel_url_get_param (url, "soap_port");
if (!soap_port || strlen (soap_port) == 0)
soap_port = "7191";
use_ssl = camel_url_get_param (url, "use_ssl");
- key = g_strdup_printf ("groupwise://%s@%s/", url->user, poa_address);
-
+ key = g_strdup_printf ("groupwise://%s@%s/", url->user, poa_address);
+
if (use_ssl && !g_str_equal (use_ssl, "never"))
uri = g_strdup_printf ("https://%s:%s/soap", poa_address, soap_port);
- else
+ else
uri = g_strdup_printf ("http://%s:%s/soap", poa_address, soap_port);
-
+
failed_auth = "";
cnc = NULL;
-
+
prompt = g_strdup_printf (_("%sEnter password for %s (user %s)"),
failed_auth, poa_address, url->user);
@@ -520,7 +520,7 @@ proxy_get_cnc (EAccount *account, GtkWindow *parent_window)
return cnc;
}
-void
+void
proxy_abort (GtkWidget *button, EConfigHookItemFactoryData *data)
{
EMConfigTargetAccount *target_account;
@@ -529,8 +529,8 @@ proxy_abort (GtkWidget *button, EConfigHookItemFactoryData *data)
target_account = (EMConfigTargetAccount *)data->config->target;
account = target_account->account;
- prd = g_object_get_data ((GObject *)account, "prd");
-
+ prd = g_object_get_data ((GObject *)account, "prd");
+
if (!prd || !prd->priv || !prd->priv->proxy_list)
return;
@@ -538,7 +538,7 @@ proxy_abort (GtkWidget *button, EConfigHookItemFactoryData *data)
prd = NULL;
}
-void
+void
proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data)
{
EAccount *account;
@@ -550,7 +550,7 @@ proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data)
target_account = (EMConfigTargetAccount *)data->config->target;
account = target_account->account;
- prd = g_object_get_data ((GObject *)account, "prd");
+ prd = g_object_get_data ((GObject *)account, "prd");
/* In case of non-GroupWise preferences edit, "prd" will be NULL. */
if (!prd || !prd->priv || !prd->priv->proxy_list)
@@ -567,8 +567,8 @@ proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data)
if ( !E_IS_GW_CONNECTION(prd->cnc)) /* Add check in case the connection request fails*/
prd->cnc = proxy_get_cnc (account, GTK_WINDOW (gtk_widget_get_toplevel (button)));
- if (aclInstance->flags & E_GW_PROXY_NEW )
- e_gw_connection_add_proxy (prd->cnc, aclInstance);
+ if (aclInstance->flags & E_GW_PROXY_NEW )
+ e_gw_connection_add_proxy (prd->cnc, aclInstance);
if ((aclInstance->flags & E_GW_PROXY_DELETED) && !(aclInstance->flags & E_GW_PROXY_NEW))
e_gw_connection_remove_proxy (prd->cnc, aclInstance);
@@ -582,7 +582,7 @@ proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data)
prd = NULL;
}
-static void
+static void
proxy_setup_meta_tree_view (EAccount *account)
{
proxyDialog *prd = NULL;
@@ -591,7 +591,7 @@ proxy_setup_meta_tree_view (EAccount *account)
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
- prd = g_object_get_data ((GObject *)account, "prd");
+ prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
renderer = g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF,
"xpad", 4,
@@ -619,14 +619,14 @@ proxy_update_tree_view (EAccount *account)
gchar *file_name = e_icon_factory_get_icon_filename ("stock_person", E_ICON_SIZE_DIALOG);
proxyDialogPrivate *priv;
- prd = g_object_get_data ((GObject *)account, "prd");
+ prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
broken_image = gdk_pixbuf_new_from_file (file_name, NULL);
-
+
gtk_tree_store_clear (priv->store);
list_iter = priv->proxy_list;
- for (;list_iter; list_iter = g_list_next(list_iter)) {
+ for (;list_iter; list_iter = g_list_next(list_iter)) {
aclInstance = (proxyHandler *) list_iter->data;
if(! (aclInstance->flags & E_GW_PROXY_DELETED )) {
@@ -634,7 +634,7 @@ proxy_update_tree_view (EAccount *account)
gtk_tree_store_set (priv->store, &iter, 0, broken_image, 1, g_strconcat(aclInstance->proxy_name,"\n",aclInstance->proxy_email, NULL), -1);
}
}
-
+
g_free (file_name);
if (broken_image)
g_object_unref (broken_image);
@@ -643,7 +643,7 @@ proxy_update_tree_view (EAccount *account)
gtk_tree_view_set_model (GTK_TREE_VIEW(priv->tree), GTK_TREE_MODEL (priv->store));
}
-GtkWidget*
+GtkWidget*
org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data)
{
EMConfigTargetAccount *target_account;
@@ -660,7 +660,7 @@ org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data)
account = target_account->account;
camel_exception_init (&ex);
- if (!(store = (CamelOfflineStore *) camel_session_get_service (session, e_account_get_string(account, E_ACCOUNT_SOURCE_URL), CAMEL_PROVIDER_STORE, &ex))) {
+ if (!(store = (CamelOfflineStore *) camel_session_get_service (session, e_account_get_string(account, E_ACCOUNT_SOURCE_URL), CAMEL_PROVIDER_STORE, &ex))) {
camel_exception_clear (&ex);
return NULL;
}
@@ -677,7 +677,7 @@ org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data)
priv->xml_tab = glade_xml_new (gladefile, "proxy_vbox", NULL);
g_free (gladefile);
- if (account->enabled && (store->state == CAMEL_OFFLINE_STORE_NETWORK_AVAIL)) {
+ if (account->enabled && (store->state == CAMEL_OFFLINE_STORE_NETWORK_AVAIL)) {
priv->tab_dialog = GTK_WIDGET (glade_xml_get_widget (priv->xml_tab, "proxy_vbox"));
priv->tree = GTK_TREE_VIEW (glade_xml_get_widget (priv->xml_tab, "proxy_access_list"));
priv->store = gtk_tree_store_new (2,
@@ -685,28 +685,28 @@ org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data)
G_TYPE_STRING
);
proxy_setup_meta_tree_view (account);
-
+
addProxy = (GtkButton *) glade_xml_get_widget (priv->xml_tab, "add_proxy");
removeProxy = (GtkButton *) glade_xml_get_widget (priv->xml_tab, "remove_proxy");
editProxy = (GtkButton *) glade_xml_get_widget (priv->xml_tab, "edit_proxy");
-
- g_signal_connect (addProxy, "clicked", G_CALLBACK(proxy_add_account), account);
+
+ g_signal_connect (addProxy, "clicked", G_CALLBACK(proxy_add_account), account);
g_signal_connect (removeProxy, "clicked", G_CALLBACK(proxy_remove_account), account);
g_signal_connect (editProxy, "clicked", G_CALLBACK(proxy_edit_account), account);
-
+
priv->proxy_list = NULL;
} else if (account->enabled){
GtkWidget *label;
priv->tab_dialog = gtk_vbox_new (TRUE, 10);
label = gtk_label_new (_("The Proxy tab will be available only when the account is online."));
- gtk_box_pack_start ((GtkBox *)priv->tab_dialog, label, TRUE, TRUE, 10);
+ gtk_box_pack_start ((GtkBox *)priv->tab_dialog, label, TRUE, TRUE, 10);
} else {
GtkWidget *label;
priv->tab_dialog = gtk_vbox_new (TRUE, 10);
label = gtk_label_new (_("The Proxy tab will be available only when the account is enabled."));
- gtk_box_pack_start ((GtkBox *)priv->tab_dialog, label, TRUE, TRUE, 10);
- }
-
+ gtk_box_pack_start ((GtkBox *)priv->tab_dialog, label, TRUE, TRUE, 10);
+ }
+
gtk_notebook_append_page ((GtkNotebook *)(data->parent), (GtkWidget *)priv->tab_dialog, gtk_label_new("Proxy"));
g_signal_connect ((GtkNotebook *)(data->parent), "switch-page", G_CALLBACK (proxy_page_changed_cb), account);
pag_num = gtk_notebook_page_num ((GtkNotebook *)(data->parent), (GtkWidget *)priv->tab_dialog);
@@ -720,11 +720,11 @@ org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data)
if (priv) {
pag_num = gtk_notebook_page_num ( (GtkNotebook *)(data->parent), (GtkWidget *) priv->tab_dialog);
- gtk_notebook_remove_page ( (GtkNotebook *)(data->parent), pag_num);
+ gtk_notebook_remove_page ( (GtkNotebook *)(data->parent), pag_num);
}
- }
+ }
}
-
+
camel_object_unref (store);
camel_exception_clear (&ex);
return NULL;
@@ -759,15 +759,15 @@ proxy_page_changed_cb (GtkNotebook *notebook, GtkNotebookPage *page, int num, EA
prd->cnc = proxy_get_cnc (account, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (notebook))));
priv = prd->priv;
- if (e_gw_connection_get_proxy_access_list(prd->cnc, &priv->proxy_list)!= E_GW_CONNECTION_STATUS_OK)
+ if (e_gw_connection_get_proxy_access_list(prd->cnc, &priv->proxy_list)!= E_GW_CONNECTION_STATUS_OK)
return FALSE;
-
+
list_iter = priv->proxy_list;
-
- for (;list_iter; list_iter = g_list_next(list_iter)) {
+
+ for (;list_iter; list_iter = g_list_next(list_iter)) {
aclInstance = (proxyHandler *) list_iter->data;
-
+
/* NOTE: All User Access is not supported */
if (!g_ascii_strcasecmp (aclInstance->proxy_name, "<All User Access>")) {
priv->proxy_list = g_list_delete_link (priv->proxy_list, list_iter);
@@ -796,12 +796,12 @@ proxy_cancel(GtkWidget *button, EAccount *account)
}
-static void
+static void
proxy_add_ok (GtkWidget *button, EAccount *account)
{
proxyDialog *prd = NULL;
proxyDialogPrivate *priv;
-
+
prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
@@ -813,12 +813,12 @@ proxy_add_ok (GtkWidget *button, EAccount *account)
g_object_unref (priv->xml);
}
-static void
+static void
proxy_edit_ok (GtkWidget *button, EAccount *account)
{
proxyDialog *prd = NULL;
proxyDialogPrivate *priv;
-
+
prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
@@ -830,19 +830,19 @@ proxy_edit_ok (GtkWidget *button, EAccount *account)
g_object_unref (priv->xml);
}
-static proxyHandler *
+static proxyHandler *
proxy_get_item_from_list (EAccount *account, char *account_name)
{
proxyDialogPrivate *priv;
proxyDialog *prd = NULL;
GList *list_iter;
proxyHandler *iter;
-
- prd = g_object_get_data ((GObject *)account, "prd");
+
+ prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
list_iter = priv->proxy_list;
- for (;list_iter; list_iter = g_list_next(list_iter)) {
+ for (;list_iter; list_iter = g_list_next(list_iter)) {
iter = (proxyHandler *) list_iter->data;
if ( g_str_equal (iter->proxy_email,account_name))
@@ -852,7 +852,7 @@ proxy_get_item_from_list (EAccount *account, char *account_name)
return NULL;
}
-static void
+static void
proxy_remove_account (GtkWidget *button, EAccount *account)
{
GtkTreeIter iter;
@@ -863,7 +863,7 @@ proxy_remove_account (GtkWidget *button, EAccount *account)
char *account_mailid;
proxyDialog *prd = NULL;
- prd = g_object_get_data ((GObject *)account, "prd");
+ prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
account_select = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree));
@@ -897,13 +897,13 @@ address_button_clicked (GtkButton *button, EAccount *account)
proxyDialogPrivate *priv;
ENameSelectorDialog *name_selector_dialog;
- prd = g_object_get_data ((GObject *)account, "prd");
+ prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
name_selector_dialog = e_name_selector_peek_dialog (priv->proxy_name_selector);
gtk_widget_show (GTK_WIDGET (name_selector_dialog));
}
-static void
+static void
proxy_add_account (GtkWidget *button, EAccount *account)
{
GtkButton *contacts, *cancel;
@@ -916,7 +916,7 @@ proxy_add_account (GtkWidget *button, EAccount *account)
proxyDialog *prd = NULL;
char *gladefile;
- prd = g_object_get_data ((GObject *)account, "prd");
+ prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
@@ -938,7 +938,7 @@ proxy_add_account (GtkWidget *button, EAccount *account)
g_signal_connect ((GtkWidget *)cancel, "clicked", G_CALLBACK (proxy_cancel), account);
g_signal_connect ((GtkWidget *)contacts, "clicked", G_CALLBACK (address_button_clicked), account);
g_signal_connect (name_selector_dialog, "response", G_CALLBACK (addressbook_dialog_response), account);
- gtk_widget_show (GTK_WIDGET (priv->main));
+ gtk_widget_show (GTK_WIDGET (priv->main));
name_selector_model = e_name_selector_peek_model (priv->proxy_name_selector);
e_name_selector_model_add_section (name_selector_model, "Add User", "Add User", NULL);
@@ -955,17 +955,17 @@ proxy_add_account (GtkWidget *button, EAccount *account)
gtk_widget_grab_focus ((GtkWidget *) name_selector_entry);
}
-static void
+static void
proxy_load_edit_dialog (EAccount *account, proxyHandler *edited)
{
proxyDialogPrivate *priv;
proxyDialog *prd = NULL;
- prd = g_object_get_data ((GObject *)account, "prd");
+ prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
gtk_entry_set_text ((GtkEntry *) priv->account_name, edited->proxy_email);
gtk_widget_set_sensitive (priv->account_name, FALSE);
-
+
if (edited->permissions & E_GW_PROXY_MAIL_READ)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->mail_read), TRUE);
@@ -985,25 +985,25 @@ proxy_load_edit_dialog (EAccount *account, proxyHandler *edited)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->note_write), TRUE);
if (edited->permissions & E_GW_PROXY_TASK_READ)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->task_read), TRUE);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->task_read), TRUE);
if (edited->permissions & E_GW_PROXY_TASK_WRITE)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->task_write), TRUE);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->task_write), TRUE);
if (edited->permissions & E_GW_PROXY_GET_ALARMS)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->alarms), TRUE);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->alarms), TRUE);
if (edited->permissions & E_GW_PROXY_GET_NOTIFICATIONS)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->notifications), TRUE);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->notifications), TRUE);
if (edited->permissions & E_GW_PROXY_MODIFY_FOLDERS)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->options), TRUE);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->options), TRUE);
if (edited->permissions & E_GW_PROXY_READ_PRIVATE)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->private), TRUE);
-}
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->private), TRUE);
+}
-static void
+static void
proxy_edit_account (GtkWidget *button, EAccount *account)
{
GtkTreeIter iter;
@@ -1017,11 +1017,11 @@ proxy_edit_account (GtkWidget *button, EAccount *account)
proxyDialog *prd = NULL;
char *gladefile;
- prd = g_object_get_data ((GObject *)account, "prd");
+ prd = g_object_get_data ((GObject *)account, "prd");
priv = prd->priv;
-
+
/*FIXME: If multiple properties dialogs are launched then the widgets lose data*/
-
+
account_select = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree));
if (gtk_tree_selection_get_selected (account_select, &model, &iter)) {
@@ -1045,7 +1045,7 @@ proxy_edit_account (GtkWidget *button, EAccount *account)
g_signal_connect ((GtkWidget *)proxyCancel, "clicked", G_CALLBACK (proxy_cancel), account);
proxy_load_edit_dialog (account, edited);
gtk_widget_hide (contacts);
- gtk_widget_show (GTK_WIDGET (priv->main));
- }
+ gtk_widget_show (GTK_WIDGET (priv->main));
+ }
}
}
diff --git a/plugins/groupwise-features/proxy.h b/plugins/groupwise-features/proxy.h
index 1d3562536f..36e1fc688c 100644
--- a/plugins/groupwise-features/proxy.h
+++ b/plugins/groupwise-features/proxy.h
@@ -2,7 +2,7 @@
*
* Copyright (C) 2005 Novell, Inc.
*
- * Authors:
+ * Authors:
* Shreyas Srinivasan <sshreyas@novell.com>
* Sankar P <psankar@novell.com>
*
diff --git a/plugins/groupwise-features/send-options.c b/plugins/groupwise-features/send-options.c
index e6b07664ae..abfde2fd61 100644
--- a/plugins/groupwise-features/send-options.c
+++ b/plugins/groupwise-features/send-options.c
@@ -49,7 +49,7 @@ void send_options_commit (EPlugin *epl, EConfigHookItemFactoryData *data);
void send_options_changed (EPlugin *epl, EConfigHookItemFactoryData *data);
void send_options_abort (EPlugin *epl, EConfigHookItemFactoryData *data);
-static EGwConnection *
+static EGwConnection *
get_cnc (GtkWindow *parent_window)
{
EGwConnection *cnc;
@@ -59,27 +59,27 @@ get_cnc (GtkWindow *parent_window)
gboolean remember;
url = camel_url_new (account->source->url, NULL);
- if (url == NULL)
+ if (url == NULL)
return NULL;
- poa_address = url->host;
+ poa_address = url->host;
if (!poa_address || strlen (poa_address) ==0)
return NULL;
-
+
soap_port = camel_url_get_param (url, "soap_port");
if (!soap_port || strlen (soap_port) == 0)
soap_port = "7191";
use_ssl = camel_url_get_param (url, "use_ssl");
- key = g_strdup_printf ("groupwise://%s@%s/", url->user, poa_address);
-
+ key = g_strdup_printf ("groupwise://%s@%s/", url->user, poa_address);
+
if (use_ssl && !g_str_equal (use_ssl, "never"))
uri = g_strdup_printf ("https://%s:%s/soap", poa_address, soap_port);
- else
+ else
uri = g_strdup_printf ("http://%s:%s/soap", poa_address, soap_port);
-
+
failed_auth = "";
cnc = NULL;
-
+
prompt = g_strdup_printf (_("%sEnter password for %s (user %s)"),
failed_auth, poa_address, url->user);
@@ -101,7 +101,7 @@ get_cnc (GtkWindow *parent_window)
}
-static void
+static void
e_send_options_load_general_opts (ESendOptionsGeneral *gopts, EGwSendOptionsGeneral *ggopts)
{
time_t temp;
@@ -113,12 +113,12 @@ e_send_options_load_general_opts (ESendOptionsGeneral *gopts, EGwSendOptionsGene
gopts->reply_enabled = ggopts->reply_enabled;
gopts->reply_convenient = ggopts->reply_convenient;
gopts->reply_within = ggopts->reply_within;
-
+
gopts->expiration_enabled = ggopts->expiration_enabled;
gopts->expire_after = ggopts->expire_after;
gopts->delay_enabled = ggopts->delay_enabled;
-
+
/* TODO convert int to timet comparing the current day */
if (ggopts->delay_until) {
gopts->delay_until = time_add_day_with_zone (temp, ggopts->delay_until, NULL);
@@ -141,12 +141,12 @@ e_send_options_load_status_options (ESendOptionsStatusTracking *sopts, EGwSendOp
}
static void
-e_send_options_load_default_data (EGwSendOptions *opts, ESendOptionsDialog *sod)
+e_send_options_load_default_data (EGwSendOptions *opts, ESendOptionsDialog *sod)
{
EGwSendOptionsGeneral *ggopts;
- EGwSendOptionsStatusTracking *gmopts;
- EGwSendOptionsStatusTracking *gcopts;
- EGwSendOptionsStatusTracking *gtopts;
+ EGwSendOptionsStatusTracking *gmopts;
+ EGwSendOptionsStatusTracking *gcopts;
+ EGwSendOptionsStatusTracking *gtopts;
ggopts = e_gw_sendoptions_get_general_options (opts);
gmopts = e_gw_sendoptions_get_status_tracking_options (opts, "mail");
@@ -165,16 +165,16 @@ e_sendoptions_clicked_cb (GtkWidget *button, gpointer data)
EGwConnectionStatus status;
account = (EAccount *) data;
if (!sod) {
- sod = e_sendoptions_dialog_new ();
+ sod = e_sendoptions_dialog_new ();
e_sendoptions_set_global (sod, TRUE);
- if (!n_cnc)
+ if (!n_cnc)
n_cnc = get_cnc (GTK_WINDOW (gtk_widget_get_toplevel (button)));
if (!n_cnc) {
g_warning ("Send Options: Could not get the connection to the server \n");
return;
}
-
+
status = e_gw_connection_get_settings (n_cnc, &opts);
if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION)
status = e_gw_connection_get_settings (n_cnc, &opts);
@@ -184,7 +184,7 @@ e_sendoptions_clicked_cb (GtkWidget *button, gpointer data)
}
e_send_options_load_default_data (opts, sod);
}
-
+
if (n_cnc)
e_sendoptions_dialog_run (sod, parent ? parent : NULL, E_ITEM_NONE);
else
@@ -196,21 +196,21 @@ org_gnome_send_options (EPlugin *epl, EConfigHookItemFactoryData *data)
{
EMConfigTargetAccount *target_account;
GtkWidget *frame, *button, *label, *vbox;
-
+
target_account = (EMConfigTargetAccount *)data->config->target;
account = target_account->account;
if(!g_strrstr (account->source->url, "groupwise://"))
return NULL;
-
+
vbox = gtk_vbox_new (FALSE, 0);
frame = gtk_frame_new ("");
label = gtk_frame_get_label_widget (GTK_FRAME (frame));
- gtk_label_set_markup (GTK_LABEL (label), "<b>Send Options</b>");
+ gtk_label_set_markup (GTK_LABEL (label), "<b>Send Options</b>");
button = gtk_button_new_with_label ("Advanced send options");
gtk_widget_show (button);
- g_signal_connect(button, "clicked",
+ g_signal_connect(button, "clicked",
G_CALLBACK (e_sendoptions_clicked_cb), account);
parent = gtk_widget_get_toplevel (GTK_WIDGET (data->parent));
@@ -221,7 +221,7 @@ org_gnome_send_options (EPlugin *epl, EConfigHookItemFactoryData *data)
gtk_box_pack_start (GTK_BOX (vbox), frame, 0, 0, 0);
gtk_container_add (GTK_CONTAINER (frame), button);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
- gtk_widget_show (frame);
+ gtk_widget_show (frame);
gtk_box_set_spacing (GTK_BOX (data->parent), 12);
gtk_box_pack_start (GTK_BOX (data->parent), vbox, FALSE, FALSE, 0);
@@ -235,7 +235,7 @@ send_options_finalize (void)
g_object_unref (n_cnc);
n_cnc = NULL;
}
-
+
if (sod) {
g_object_unref (sod);
sod = NULL;
@@ -247,7 +247,7 @@ send_options_finalize (void)
}
}
-static void
+static void
e_send_options_copy_general_opts (ESendOptionsGeneral *gopts, EGwSendOptionsGeneral *ggopts)
{
ggopts->priority = gopts->priority;
@@ -255,7 +255,7 @@ e_send_options_copy_general_opts (ESendOptionsGeneral *gopts, EGwSendOptionsGene
ggopts->reply_enabled = gopts->reply_enabled;
ggopts->reply_convenient = gopts->reply_convenient;
ggopts->reply_within = gopts->reply_within;
-
+
ggopts->expire_after = gopts->expire_after;
if (gopts->expire_after == 0) {
@@ -265,11 +265,11 @@ e_send_options_copy_general_opts (ESendOptionsGeneral *gopts, EGwSendOptionsGene
ggopts->expiration_enabled = gopts->expiration_enabled;
ggopts->delay_enabled = gopts->delay_enabled;
-
+
if (gopts->delay_until) {
int diff;
icaltimetype temp, current;
-
+
temp = icaltime_from_timet (gopts->delay_until, 0);
current = icaltime_today ();
diff = temp.day - current.day;
@@ -302,7 +302,7 @@ check_status_options_changed (EGwSendOptionsStatusTracking *n_sopts, EGwSendOpti
&& n_sopts->declined == o_sopts->declined
&& n_sopts->accepted == o_sopts->accepted
&& n_sopts->completed == o_sopts->completed));
-
+
}
static gboolean
@@ -319,12 +319,12 @@ check_general_changed (EGwSendOptionsGeneral *n_gopts, EGwSendOptionsGeneral *o_
}
static void
-send_options_copy_check_changed (EGwSendOptions *n_opts)
+send_options_copy_check_changed (EGwSendOptions *n_opts)
{
EGwSendOptionsGeneral *ggopts, *o_gopts;
- EGwSendOptionsStatusTracking *gmopts, *o_gmopts ;
- EGwSendOptionsStatusTracking *gcopts, *o_gcopts;
- EGwSendOptionsStatusTracking *gtopts, *o_gtopts;
+ EGwSendOptionsStatusTracking *gmopts, *o_gmopts ;
+ EGwSendOptionsStatusTracking *gcopts, *o_gcopts;
+ EGwSendOptionsStatusTracking *gtopts, *o_gtopts;
ggopts = e_gw_sendoptions_get_general_options (n_opts);
gmopts = e_gw_sendoptions_get_status_tracking_options (n_opts, "mail");
@@ -340,7 +340,7 @@ send_options_copy_check_changed (EGwSendOptions *n_opts)
e_send_options_copy_status_options (sod->data->mopts, gmopts);
e_send_options_copy_status_options (sod->data->copts, gcopts);
e_send_options_copy_status_options (sod->data->topts, gtopts);
-
+
if (check_general_changed (ggopts, o_gopts))
changed = TRUE;
if (check_status_options_changed (gmopts, o_gmopts))
@@ -357,21 +357,21 @@ get_source (ESourceList *list)
GSList *p, *l;
char **temp = g_strsplit (account->source->url, ";", -1);
char *uri = temp [0];
-
-
+
+
l = e_source_list_peek_groups (list);
for (p = l; p != NULL; p = p->next) {
char *so_uri;
- GSList *r, *s;
+ GSList *r, *s;
ESourceGroup *group = E_SOURCE_GROUP (p->data);
s = e_source_group_peek_sources (group);
for (r = s; r != NULL; r = r->next) {
ESource *so = E_SOURCE (r->data);
- so_uri = e_source_get_uri (so);
-
- if (so_uri) {
+ so_uri = e_source_get_uri (so);
+
+ if (so_uri) {
if (!strcmp (so_uri, uri)) {
g_free (so_uri), so_uri = NULL;
return E_SOURCE (r->data);
@@ -386,31 +386,31 @@ get_source (ESourceList *list)
return NULL;
}
-static void
+static void
add_return_value (EGwSendOptionsReturnNotify track, ESource *source, char *notify)
{
char *value;
-
+
switch (track) {
case E_GW_RETURN_NOTIFY_MAIL:
value = g_strdup ("mail");
break;
default:
- value = g_strdup ("none");
+ value = g_strdup ("none");
}
-
+
e_source_set_property (source, notify, value);
g_free (value), value = NULL;
}
-static void
+static void
put_options_in_source (ESource *source, EGwSendOptionsGeneral *gopts, EGwSendOptionsStatusTracking *sopts)
{
char *value;
const char *val;
icaltimetype tt;
CamelURL *url;
-
+
url = camel_url_new (account->source->url, NULL);
if (gopts) {
@@ -437,13 +437,13 @@ put_options_in_source (ESource *source, EGwSendOptionsGeneral *gopts, EGwSendOpt
if (gopts->reply_enabled) {
if (gopts->reply_convenient)
value = g_strdup ("convinient");
- else
+ else
value = g_strdup_printf ("%d",gopts->reply_within);
} else
value = g_strdup ("none");
e_source_set_property (source, "reply-requested", value);
g_free (value), value = NULL;
-
+
/* Delay delivery */
if (gopts->delay_enabled) {
tt = icaltime_today ();
@@ -452,7 +452,7 @@ put_options_in_source (ESource *source, EGwSendOptionsGeneral *gopts, EGwSendOpt
} else
val = "none";
e_source_set_property (source, "delay-delivery", val);
-
+
/* Expiration date */
if (gopts->expiration_enabled)
value = g_strdup_printf ("%d", gopts->expire_after);
@@ -461,7 +461,7 @@ put_options_in_source (ESource *source, EGwSendOptionsGeneral *gopts, EGwSendOpt
e_source_set_property (source, "expiration", value);
g_free (value), value = NULL;
}
-
+
if (sopts) {
/* status tracking */
if (sopts->tracking_enabled) {
@@ -480,14 +480,14 @@ put_options_in_source (ESource *source, EGwSendOptionsGeneral *gopts, EGwSendOpt
e_source_set_property (source, "status-tracking", value);
g_free (value), value = NULL;
- add_return_value (sopts->opened, source, "return-open");
- add_return_value (sopts->accepted, source, "return-accept");
- add_return_value (sopts->declined, source, "return-decline");
- add_return_value (sopts->completed, source, "return-complete");
+ add_return_value (sopts->opened, source, "return-open");
+ add_return_value (sopts->accepted, source, "return-accept");
+ add_return_value (sopts->declined, source, "return-decline");
+ add_return_value (sopts->completed, source, "return-complete");
}
}
-
-static void
+
+static void
add_send_options_to_source (EGwSendOptions *n_opts)
{
GConfClient *gconf = gconf_client_get_default ();
@@ -501,14 +501,14 @@ add_send_options_to_source (EGwSendOptions *n_opts)
list = e_source_list_new_for_gconf (gconf, "/apps/evolution/tasks/sources");
tsource = get_source (list);
-
+
gopts = e_gw_sendoptions_get_general_options (n_opts);
copts = e_gw_sendoptions_get_status_tracking_options (n_opts, "calendar");
topts = e_gw_sendoptions_get_status_tracking_options (n_opts, "task");
if (csource)
put_options_in_source (csource, gopts, copts);
-
+
if (tsource)
put_options_in_source (tsource, gopts, topts);
@@ -518,16 +518,16 @@ add_send_options_to_source (EGwSendOptions *n_opts)
void
send_options_commit (EPlugin *epl, EConfigHookItemFactoryData *data)
{
- EGwSendOptions *n_opts;
+ EGwSendOptions *n_opts;
EGwConnectionStatus status = E_GW_CONNECTION_STATUS_OK;
-
+
if (sod) {
n_opts = e_gw_sendoptions_new ();
send_options_copy_check_changed (n_opts);
-
- if (changed)
+
+ if (changed)
status = e_gw_connection_modify_settings (n_cnc, n_opts);
-
+
if (!changed || status != E_GW_CONNECTION_STATUS_OK) {
g_warning (G_STRLOC "Cannot modify Send Options: %s", e_gw_connection_get_error_message (status));
g_object_unref (n_opts);
diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c
index 5db802ffc3..20acd894d4 100644
--- a/plugins/groupwise-features/share-folder-common.c
+++ b/plugins/groupwise-features/share-folder-common.c
@@ -58,7 +58,7 @@ struct ShareInfo {
EMFolderTreeModel *model;
EMFolderSelector *emfs;
};
-
+
GtkWidget * org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data);
void org_gnome_create_option(EPlugin *ep, EMPopupTargetFolder *target);
static void create_shared_folder(EPopup *ep, EPopupItem *p, void *data);
@@ -68,7 +68,7 @@ void shared_folder_abort (EPlugin *ep, EConfigTarget *target);
static void refresh_folder_tree (EMFolderTreeModel *model, CamelStore *store);
-static void
+static void
refresh_folder_tree (EMFolderTreeModel *model, CamelStore *store)
{
gchar *uri;
@@ -96,12 +96,12 @@ refresh_folder_tree (EMFolderTreeModel *model, CamelStore *store)
//camel_object_unref (store);
}
-void
+void
shared_folder_commit (EPlugin *ep, EConfigTarget *tget)
{
EMConfigTargetFolder *target = (EMConfigTargetFolder *)tget->config->target;
CamelFolder *folder = target->folder;
- CamelStore *store = folder->parent_store;
+ CamelStore *store = folder->parent_store;
EMFolderTreeModel *model = mail_component_peek_tree_model (mail_component_peek ());
if (common) {
share_folder (common);
@@ -111,7 +111,7 @@ shared_folder_commit (EPlugin *ep, EConfigTarget *tget)
}
}
-void
+void
shared_folder_abort (EPlugin *ep, EConfigTarget *target)
{
if (common) {
@@ -122,26 +122,26 @@ shared_folder_abort (EPlugin *ep, EConfigTarget *target)
struct _EMCreateFolder {
struct _mail_msg msg;
-
+
/* input data */
CamelStore *store;
char *full_name;
char *parent;
char *name;
-
+
/* output data */
CamelFolderInfo *fi;
-
+
/* callback data */
void (* done) (struct _EMCreateFolder *m, void *user_data);
void *user_data;
};
-
+
static char *
create_folder__desc (struct _mail_msg *mm, int done)
{
struct _EMCreateFolder *m = (struct _EMCreateFolder *) mm;
-
+
return g_strdup_printf (_("Creating folder `%s'"), m->full_name);
}
@@ -149,9 +149,9 @@ static void
create_folder__create (struct _mail_msg *mm)
{
struct _EMCreateFolder *m = (struct _EMCreateFolder *) mm;
-
+
d(printf ("creating folder parent='%s' name='%s' full_name='%s'\n", m->parent, m->name, m->full_name));
-
+
if ((m->fi = camel_store_create_folder (m->store, m->parent, m->name, &mm->ex))) {
if (camel_store_supports_subscriptions (m->store))
camel_store_subscribe_folder (m->store, m->full_name, &mm->ex);
@@ -165,7 +165,7 @@ create_folder__created (struct _mail_msg *mm)
struct ShareInfo *ssi = (struct ShareInfo *) m->user_data;
CamelStore *store = CAMEL_STORE (m->store) ;
EGwConnection *ccnc;
-
+
if (m->done) {
ccnc = get_cnc (store);
if(E_IS_GW_CONNECTION (ccnc)) {
@@ -178,12 +178,12 @@ create_folder__created (struct _mail_msg *mm)
m->done (m, m->user_data);
}
}
-
+
static void
create_folder__free (struct _mail_msg *mm)
{
struct _EMCreateFolder *m = (struct _EMCreateFolder *) mm;
-
+
camel_store_free_folder_info (m->store, m->fi);
camel_object_unref (m->store);
g_free (m->full_name);
@@ -228,7 +228,7 @@ create_folder (CamelStore *store, const char *full_name, void (* done) (struct _
*name++ = '\0';
parent = namebuf;
}
-
+
m = mail_msg_new (&create_folder_op, NULL, sizeof (struct _EMCreateFolder));
camel_object_ref (store);
m->store = store;
@@ -240,11 +240,11 @@ create_folder (CamelStore *store, const char *full_name, void (* done) (struct _
g_free (namebuf);
id = m->msg.seq;
e_thread_put (mail_thread_new, (EMsg *) m);
-
+
return id;
}
-static void
+static void
users_dialog_response(GtkWidget *dialog, int response, struct ShareInfo *ssi)
{
struct _EMFolderTreeModelStoreInfo *si;
@@ -263,13 +263,13 @@ users_dialog_response(GtkWidget *dialog, int response, struct ShareInfo *ssi)
path = em_folder_selector_get_selected_path (emfs);
d(printf ("Creating new folder: %s (%s)\n", path, uri));
-
+
camel_exception_init (&ex);
if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex))) {
camel_exception_clear (&ex);
return;
}
-
+
if (!(si = g_hash_table_lookup ((ssi->model)->store_hash, store))) {
g_assert_not_reached ();
camel_object_unref (store);
@@ -308,7 +308,7 @@ new_folder_response (EMFolderSelector *emfs, int response, EMFolderTreeModel *mo
gtk_widget_destroy ((GtkWidget *) emfs);
return;
}
-
+
/* i want store at this point to get cnc not sure proper or not*/
uri = em_folder_selector_get_selected_uri (emfs);
camel_exception_init (&ex);
@@ -324,7 +324,7 @@ new_folder_response (EMFolderSelector *emfs, int response, EMFolderTreeModel *mo
gtk_widget_show(w);
gtk_box_pack_start(GTK_BOX (GTK_DIALOG (users_dialog)->vbox), (GtkWidget *) w, TRUE, TRUE, 6);
ssi->sf = share_folder_new (cnc, NULL);
- gtk_widget_set_sensitive (GTK_WIDGET ((ssi->sf)->table), TRUE);
+ gtk_widget_set_sensitive (GTK_WIDGET ((ssi->sf)->table), TRUE);
ssi->model = model;
ssi->emfs = emfs;
gtk_widget_reparent (GTK_WIDGET ((ssi->sf)->table), GTK_DIALOG (users_dialog)->vbox);
@@ -332,7 +332,7 @@ new_folder_response (EMFolderSelector *emfs, int response, EMFolderTreeModel *mo
gtk_window_resize (GTK_WINDOW (users_dialog), 350, 300);
gtk_widget_show(users_dialog);
g_signal_connect (users_dialog, "response", G_CALLBACK (users_dialog_response), ssi);
-
+
camel_object_unref (store);
return ;
@@ -342,39 +342,39 @@ static EPopupItem popup_items[] = {
{ E_POPUP_ITEM, "20.emc.001", N_("New _Shared Folder..."), create_shared_folder, NULL, "folder-new", 0, EM_POPUP_FOLDER_INFERIORS }
};
-static void
+static void
popup_free (EPopup *ep, GSList *items, void *data)
{
g_slist_free (items);
}
-void
+void
org_gnome_create_option(EPlugin *ep, EMPopupTargetFolder *t)
{
GSList *menus = NULL;
int i = 0;
static int first = 0;
-
+
if (! g_strrstr (t->uri, "groupwise://"))
return ;
-
+
/* for translation*/
if (!first) {
popup_items[0].label = _(popup_items[0].label);
-
+
}
-
+
first++;
-
+
for (i = 0; i < sizeof (popup_items) / sizeof (popup_items[0]); i++)
menus = g_slist_prepend (menus, &popup_items[i]);
-
+
e_popup_add_items (t->target.popup, menus, NULL, popup_free, NULL);
-
+
}
-
-static void
+
+static void
create_shared_folder(EPopup *ep, EPopupItem *p, void *data)
{
@@ -382,7 +382,7 @@ create_shared_folder(EPopup *ep, EPopupItem *p, void *data)
EMFolderTree *folder_tree;
GtkWidget *dialog ;
char *uri;
-
+
model = mail_component_peek_tree_model (mail_component_peek ());
folder_tree = (EMFolderTree *) em_folder_tree_new_with_model (model);
dialog = em_folder_selector_create_new (folder_tree, 0, _("Create folder"), _("Specify where to create the folder:"));
@@ -392,7 +392,7 @@ create_shared_folder(EPopup *ep, EPopupItem *p, void *data)
g_signal_connect (dialog, "response", G_CALLBACK (new_folder_response), model);
gtk_window_set_title (GTK_WINDOW (dialog), "New Shared Folder" );
gtk_widget_show(dialog);
-
+
}
GtkWidget *
@@ -407,26 +407,26 @@ org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_d
ShareFolder *sharing_tab;
EMConfigTargetFolder *target= (EMConfigTargetFolder *)hook_data->config->target;
CamelFolder *folder = target->folder;
-
+
folder_name = g_strdup (folder->full_name);
folderuri = g_strdup(target->uri);
- if (folderuri && folder_name)
+ if (folderuri && folder_name)
account = g_strrstr(folderuri, "groupwise");
else
return NULL;
/* This is kind of bad..but we don't have types for all these folders.*/
- if ( !( strcmp (folder_name, "Mailbox")
- && strcmp (folder_name, "Calendar")
- && strcmp (folder_name, "Contacts")
- && strcmp (folder_name, "Documents")
- && strcmp (folder_name, "Authored")
- && strcmp (folder_name, "Default Library")
- && strcmp (folder_name, "Work In Progress")
- && strcmp (folder_name, "Cabinet")
- && strcmp (folder_name, "Sent Items")
- && strcmp (folder_name, "Trash")
+ if ( !( strcmp (folder_name, "Mailbox")
+ && strcmp (folder_name, "Calendar")
+ && strcmp (folder_name, "Contacts")
+ && strcmp (folder_name, "Documents")
+ && strcmp (folder_name, "Authored")
+ && strcmp (folder_name, "Default Library")
+ && strcmp (folder_name, "Work In Progress")
+ && strcmp (folder_name, "Cabinet")
+ && strcmp (folder_name, "Sent Items")
+ && strcmp (folder_name, "Trash")
&& strcmp (folder_name, "Checklist"))) {
g_free (folderuri);
@@ -434,19 +434,19 @@ org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_d
}
if (account) {
- CamelStore *store = folder->parent_store;
- cnc = get_cnc (store);
-
- if (E_IS_GW_CONNECTION (cnc))
+ CamelStore *store = folder->parent_store;
+ cnc = get_cnc (store);
+
+ if (E_IS_GW_CONNECTION (cnc))
id = get_container_id (cnc, folder_name);
else
g_warning("Could not Connnect\n");
-
+
if (cnc && id)
sharing_tab = share_folder_new (cnc, id);
- else
+ else
return NULL;
-
+
gtk_notebook_append_page((GtkNotebook *) hook_data->parent, (GtkWidget *) sharing_tab->vbox, gtk_label_new_with_mnemonic N_("Sharing"));
common = sharing_tab;
g_free (folderuri);
@@ -455,7 +455,7 @@ org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_d
return NULL;
}
-EGwConnection *
+EGwConnection *
get_cnc (CamelStore *store)
{
EGwConnection *cnc;
@@ -463,7 +463,7 @@ get_cnc (CamelStore *store)
char *use_ssl;
CamelService *service;
CamelURL *url;
-
+
if (!store)
return NULL;
@@ -481,7 +481,7 @@ get_cnc (CamelStore *store)
port = g_strdup (property_value);
if (use_ssl && !g_str_equal (use_ssl, "never"))
- uri = g_strconcat ("https://", server_name, ":", port, "/soap", NULL);
+ uri = g_strconcat ("https://", server_name, ":", port, "/soap", NULL);
else
uri = g_strconcat ("http://", server_name, ":", port, "/soap", NULL);
@@ -501,7 +501,7 @@ get_cnc (CamelStore *store)
gchar *
get_container_id(EGwConnection *cnc, gchar *fname)
{
- GList *container_list = NULL;
+ GList *container_list = NULL;
gchar *id = NULL;
gchar *name;
gchar **names;
@@ -511,7 +511,7 @@ get_container_id(EGwConnection *cnc, gchar *fname)
if(names){
while (names [parts])
parts++;
- fname = names[i];
+ fname = names[i];
}
/* get list of containers */
diff --git a/plugins/groupwise-features/share-folder.c b/plugins/groupwise-features/share-folder.c
index 104da0fd60..b6982c520d 100644
--- a/plugins/groupwise-features/share-folder.c
+++ b/plugins/groupwise-features/share-folder.c
@@ -114,7 +114,7 @@ share_folder_finalise (GObject *obj)
{
ShareFolder *sf = (ShareFolder *) obj;
g_object_unref (sf->xml);
- free_all(sf);
+ free_all(sf);
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
@@ -123,7 +123,7 @@ share_folder_destroy (GtkObject *obj)
{
ShareFolder *sf = (ShareFolder *) obj;
- free_all (sf);
+ free_all (sf);
GTK_OBJECT_CLASS (parent_class)->destroy (obj);
}
@@ -161,16 +161,16 @@ free_node(SharedUser *usr)
return ;
}
-static SharedUser *
+static SharedUser *
find_node(GList *list, gchar *email)
{
SharedUser *user = NULL;
- EShUsers *usr = NULL;
+ EShUsers *usr = NULL;
GList *tmp;
gint i ;
-
+
if(list){
- tmp = g_list_first(list);
+ tmp = g_list_first(list);
for(i=0; tmp ; i++)
{
user = tmp->data;
@@ -184,7 +184,7 @@ find_node(GList *list, gchar *email)
return NULL;
}
-static void
+static void
free_all (ShareFolder *sf)
{
if (sf->users_list){
@@ -197,7 +197,7 @@ free_all (ShareFolder *sf)
}
-static void
+static void
display_container (EGwContainer *container , ShareFolder *sf)
{
gboolean byme = FALSE;
@@ -211,7 +211,7 @@ display_container (EGwContainer *container , ShareFolder *sf)
if(!(byme = e_gw_container_get_is_shared_by_me(container)))
tome = e_gw_container_get_is_shared_to_me(container);
if(byme || tome) {
- e_gw_container_get_user_list (sf->gcontainer, &user_list);
+ e_gw_container_get_user_list (sf->gcontainer, &user_list);
sf->users = g_list_length (user_list);
if(sf->users != 0) {
sf->is_shared = TRUE;
@@ -229,20 +229,20 @@ display_container (EGwContainer *container , ShareFolder *sf)
email = g_strdup (e_gw_container_get_owner (sf->gcontainer));
msg = g_strconcat (email, " (Owner)", NULL);
gtk_list_store_append (GTK_LIST_STORE (sf->model), &(sf->iter));
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 0, msg, -1);
+ gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 0, msg, -1);
g_free (msg);
g_free (email);
} else
gtk_widget_set_sensitive (GTK_WIDGET (sf->table), TRUE);
- /* I populate the list and set flags to 0 for the existing users*/
+ /* I populate the list and set flags to 0 for the existing users*/
while (user_list) {
SharedUser *shared_user = g_new0 (SharedUser , 1);
gboolean add, edit, delete;
add = edit = delete = FALSE;
user = user_list->data;
shared_user->user_node = user;
- shared_user->flag = 0;
+ shared_user->flag = 0;
email = g_strdup (user->email);
if (user->rights & 0x1)
add = TRUE;
@@ -253,7 +253,7 @@ display_container (EGwContainer *container , ShareFolder *sf)
msg = g_strdup_printf ("%s", email);
gtk_list_store_append (GTK_LIST_STORE (sf->model), &(sf->iter));
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 0, msg, 1, add, 2, edit, 3, delete, -1);
+ gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 0, msg, 1, add, 2, edit, 3, delete, -1);
sf->users_list = g_list_append (sf->users_list, shared_user);
g_free (msg);
g_free (email);
@@ -301,7 +301,7 @@ get_container_list (ShareFolder *sf)
g_free (id_unshared);
break;
}
-
+
g_free (id_shared);
g_free (id_unshared);
}
@@ -312,15 +312,15 @@ get_container_list (ShareFolder *sf)
}
-static void
+static void
shared_clicked (GtkRadioButton *button, ShareFolder *sf)
{
gtk_widget_set_sensitive (GTK_WIDGET (sf->table) ,TRUE);
- sf->flag_for_ok = 0;
+ sf->flag_for_ok = 0;
}
-static void
+static void
not_shared_clicked (GtkRadioButton *button, ShareFolder *sf)
{
if (!sf->is_shared) {
@@ -354,9 +354,9 @@ add_clicked(GtkButton *button, ShareFolder *sf)
for (; tmp != NULL; tmp = g_list_next (tmp)) {
email = e_destination_get_email (tmp->data);
/* You can't share a folder with yourself*/
- if (g_strrstr (email, "@") == NULL || (!g_ascii_strcasecmp (email , self_email)))
+ if (g_strrstr (email, "@") == NULL || (!g_ascii_strcasecmp (email , self_email)))
e_error_run (NULL, "org.gnome.evolution.mail_shared_folder:invalid-user",email ,NULL);
- else {
+ else {
if (!g_ascii_strcasecmp (email, "" )) {
e_error_run (NULL, "org.gnome.evolution.mail_shared_folder:no-user",NULL);
@@ -367,7 +367,7 @@ add_clicked(GtkButton *button, ShareFolder *sf)
/*check whether already exists*/
if (sf->users_list && email){
new_user = find_node (sf->users_list, (gchar *)email);
- if (new_user)
+ if (new_user)
return ;
}
@@ -379,8 +379,8 @@ add_clicked(GtkButton *button, ShareFolder *sf)
new_user->flag = 1;
msg = g_strdup (email);
gtk_list_store_append (GTK_LIST_STORE (sf->model), &(sf->iter));
-
- /* have to add code for rights*/
+
+ /* have to add code for rights*/
gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 0, msg, -1);
g_free(msg);
sf->users_list = g_list_append (sf->users_list, new_user);
@@ -400,9 +400,9 @@ remove_clicked(GtkButton *button, ShareFolder *sf)
gtk_tree_model_get ((GtkTreeModel *) sf->model, &(sf->iter), 0, &email, -1);
usr = find_node (sf->users_list, email);
- if (usr->flag & 0x1) {
+ if (usr->flag & 0x1) {
sf->users_list = g_list_remove (sf->users_list, usr);
- free_node(usr);
+ free_node(usr);
} else {
usr->flag = 0;
usr->flag |= 0x4;
@@ -413,10 +413,10 @@ remove_clicked(GtkButton *button, ShareFolder *sf)
sf->flag_for_ok = 1;
}
-void
+void
share_folder (ShareFolder *sf)
{
-
+
GList *new_list = NULL;
GList *update_list = NULL;
GList *remove_list = NULL;
@@ -425,13 +425,13 @@ share_folder (ShareFolder *sf)
for (node = sf->users_list; node; node = node->next)
{
- user = node->data;
+ user = node->data;
if (user->flag & 0x1)
- new_list = g_list_append (new_list, user->user_node);
+ new_list = g_list_append (new_list, user->user_node);
else if (user->flag & 0x2)
- update_list = g_list_append (update_list, user->user_node);
+ update_list = g_list_append (update_list, user->user_node);
else if (user->flag & 0x4) {
- remove_list = g_list_append (remove_list, user->user_node);
+ remove_list = g_list_append (remove_list, user->user_node);
}
}
@@ -460,7 +460,7 @@ share_folder (ShareFolder *sf)
} else {
g_warning("Container is Null");
- }
+ }
} else {
@@ -473,7 +473,7 @@ share_folder (ShareFolder *sf)
if (e_gw_connection_share_folder (sf->cnc, sf->container_id, update_list, sf->sub, sf->mesg, 2) == E_GW_CONNECTION_STATUS_OK);
}
- }
+ }
if (remove_list) {
sf->sub = "Shared Folder removed";
if (e_gw_connection_share_folder (sf->cnc, sf->container_id, remove_list, sf->sub, sf->mesg, 1) == E_GW_CONNECTION_STATUS_OK);
@@ -507,7 +507,7 @@ not_ok_clicked(GtkButton *button, ShareFolder *sf)
}
-static void
+static void
not_cancel_clicked(GtkButton *button, GtkWidget *window)
{
gtk_widget_destroy(window);
@@ -546,7 +546,7 @@ notification_clicked(GtkButton *button, ShareFolder *sf)
gtk_widget_reparent (GTK_WIDGET (sf->window), GTK_WIDGET (sf->vbox));
gtk_window_set_transient_for ((GtkWindow *)sf->window, GTK_WINDOW(sf->vbox));
gtk_window_set_modal ((GtkWindow *)sf->window, TRUE);
- gtk_window_present ((GtkWindow *)sf->window);
+ gtk_window_present ((GtkWindow *)sf->window);
gtk_widget_show_all (sf->window);
}
@@ -572,7 +572,7 @@ address_button_clicked_cb (GtkButton *button, gpointer data)
gtk_widget_show (GTK_WIDGET (name_selector_dialog));
}
- static void
+ static void
user_selected(GtkTreeSelection *selection, ShareFolder *sf)
{
GtkTreeModel *model;
@@ -581,7 +581,7 @@ user_selected(GtkTreeSelection *selection, ShareFolder *sf)
if (gtk_tree_selection_get_selected (selection, &model, &sf->iter))
gtk_widget_set_sensitive (GTK_WIDGET (sf->remove), TRUE);
}
-
+
static void
add_right_clicked (GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
{
@@ -603,13 +603,13 @@ add_right_clicked (GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
return;
}
if(! usr->flag) /* if user was already existing one change the flag to update*/
- usr->flag = usr->flag | 0x2;
+ usr->flag = usr->flag | 0x2;
user = usr->user_node;
if (!right) {
- user->rights |= 0x1;
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 1, TRUE, -1);
+ user->rights |= 0x1;
+ gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 1, TRUE, -1);
} else {
- user->rights &= 0x6;
+ user->rights &= 0x6;
gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 1, FALSE, -1);
}
gtk_tree_path_free (path);
@@ -636,14 +636,14 @@ edit_right_clicked(GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
return;
}
if(! usr->flag) /* if user was already existing one change the flag to update*/
- usr->flag = usr->flag | 0x2;
+ usr->flag = usr->flag | 0x2;
user = usr->user_node;
if (!right) {
- user->rights |= 0x2;
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 2, TRUE, -1);
+ user->rights |= 0x2;
+ gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 2, TRUE, -1);
} else {
- user->rights &= 0x5;
+ user->rights &= 0x5;
gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 2, FALSE, -1);
}
gtk_tree_path_free (path);
@@ -670,19 +670,19 @@ delete_right_clicked(GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
return;
}
if(! usr->flag) /* if user was already existing one change the flag to update*/
- usr->flag = usr->flag | 0x2;
+ usr->flag = usr->flag | 0x2;
user = usr->user_node;
if (!right) {
- user->rights |= 0x4;
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 3, TRUE, -1);
+ user->rights |= 0x4;
+ gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 3, TRUE, -1);
} else {
- user->rights &= 0x3;
+ user->rights &= 0x3;
gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 3, FALSE, -1);
}
gtk_tree_path_free (path);
}
-static void
+static void
share_folder_construct (ShareFolder *sf)
{
GladeXML *xml;
@@ -698,7 +698,7 @@ share_folder_construct (ShareFolder *sf)
xml = glade_xml_new (gladefile, ROOTNODE, NULL);
g_free (gladefile);
- sf->xml =xml;
+ sf->xml =xml;
if (!sf->xml) {
g_warning ("could not get xml");
@@ -766,7 +766,7 @@ share_folder_construct (ShareFolder *sf)
gtk_tree_view_append_column (GTK_TREE_VIEW (sf->user_list),
GTK_TREE_VIEW_COLUMN (sf->column));
g_signal_connect (sf->cell, "toggled", G_CALLBACK (add_right_clicked), sf);
-
+
sf->cell = gtk_cell_renderer_toggle_new ();
sf->column = gtk_tree_view_column_new_with_attributes (_("Modify"), sf->cell, "active", 2, NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (sf->user_list),
diff --git a/plugins/groupwise-features/share-folder.h b/plugins/groupwise-features/share-folder.h
index 5baeb6ac09..76516ac778 100644
--- a/plugins/groupwise-features/share-folder.h
+++ b/plugins/groupwise-features/share-folder.h
@@ -60,11 +60,11 @@ struct _GtkVBox;
struct _ShareFolder {
GtkVBox parent_object;
-
+
struct _GladeXML *xml;
-
+
/* General tab */
-
+
/* Default Behavior */
struct _GtkTreeView *user_list;
struct _GtkTextView *message;
@@ -83,7 +83,7 @@ struct _ShareFolder {
struct _GtkVBox *vbox;
struct _GtkVBox *table;
struct _GtkWidget *window;
-
+
GList *users_list;
EGwContainer *gcontainer;
gint users;
@@ -99,12 +99,12 @@ struct _ShareFolder {
GList *container_list;
GtkTreeIter iter;
ENameSelector *name_selector;
-
+
};
struct _ShareFolderClass {
GtkVBoxClass parent_class;
-
+
};
GType share_folderget_type (void);
diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c
index 0db1aab090..baf3f243cf 100644
--- a/plugins/groupwise-features/status-track.c
+++ b/plugins/groupwise-features/status-track.c
@@ -58,7 +58,7 @@ format_date (const char * value)
return str;
}
-static void
+static void
track_status (EPopup *ep, EPopupItem *item, void *data)
{
EMPopupTargetSelect *t = (EMPopupTargetSelect *)data;
@@ -97,7 +97,7 @@ track_status (EPopup *ep, EPopupItem *item, void *data)
/* No need to make any call if this header is not available.
This is the server side identifier for sent-items */
return ;
- }
+ }
/*Create the dialog*/
d = (GtkDialog *) gtk_dialog_new ();
@@ -249,7 +249,7 @@ static EPopupItem popup_items[] = {
{ E_POPUP_ITEM, "20.emfv.02", N_("Track Message Status..."), track_status, NULL, NULL, 0, EM_POPUP_SELECT_ONE|EM_FOLDER_VIEW_SELECT_LISTONLY}
};
-static void
+static void
popup_free (EPopup *ep, GSList *items, void *data)
{
g_slist_free (items);
@@ -258,24 +258,24 @@ popup_free (EPopup *ep, GSList *items, void *data)
void org_gnome_track_status (void *ep, EMPopupTargetSelect *t)
{
GSList *menus = NULL;
-
+
int i = 0;
static int first = 0;
if (! g_strrstr (t->uri, "groupwise://") || g_ascii_strncasecmp ((t->folder)->full_name, "Sent Items", 10))
return;
-
+
/* for translation*/
if (!first) {
popup_items[0].label = _(popup_items[0].label);
-
+
}
-
+
first++;
-
+
for (i = 0; i < sizeof (popup_items) / sizeof (popup_items[0]); i++)
menus = g_slist_prepend (menus, &popup_items[i]);
-
+
e_popup_add_items (t->target.popup, menus, NULL, popup_free, t);
-
+
}
diff --git a/plugins/hula-account-setup/camel-hula-listener.c b/plugins/hula-account-setup/camel-hula-listener.c
index df28b7e34a..4dbcb44a94 100644
--- a/plugins/hula-account-setup/camel-hula-listener.c
+++ b/plugins/hula-account-setup/camel-hula-listener.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Authors :
- *
+ *
* Harish Krishnaswamy <kharish@novell.com>
*
* Copyright 2005, Novell, Inc.
@@ -38,7 +38,7 @@ static GList *hula_accounts = NULL;
struct _CamelHulaListenerPrivate {
GConfClient *gconf_client;
/* we get notification about mail account changes form this object */
- EAccountList *account_list;
+ EAccountList *account_list;
};
struct _HulaAccountInfo {
@@ -61,37 +61,37 @@ static void dispose (GObject *object);
static void finalize (GObject *object);
-static void
+static void
camel_hula_listener_class_init (CamelHulaListenerClass *class)
{
GObjectClass *object_class;
-
+
parent_class = g_type_class_ref (PARENT_TYPE);
object_class = G_OBJECT_CLASS (class);
-
+
/* virtual method override */
object_class->dispose = dispose;
object_class->finalize = finalize;
}
-static void
+static void
camel_hula_listener_init (CamelHulaListener *config_listener, CamelHulaListenerClass *class)
{
- config_listener->priv = g_new0 (CamelHulaListenerPrivate, 1);
+ config_listener->priv = g_new0 (CamelHulaListenerPrivate, 1);
}
-static void
+static void
dispose (GObject *object)
{
CamelHulaListener *config_listener = CAMEL_HULA_LISTENER (object);
-
+
g_object_unref (config_listener->priv->gconf_client);
g_object_unref (config_listener->priv->account_list);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
-static void
+static void
finalize (GObject *object)
{
CamelHulaListener *config_listener = CAMEL_HULA_LISTENER (object);
@@ -103,18 +103,18 @@ finalize (GObject *object)
}
for ( list = g_list_first (hula_accounts); list ; list = g_list_next (list) ) {
-
+
info = (HulaAccountInfo *) (list->data);
if (info) {
-
+
g_free (info->uid);
g_free (info->name);
g_free (info->source_url);
g_free (info);
}
}
-
+
g_list_free (hula_accounts);
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -144,13 +144,13 @@ is_hula_caldav_account (EAccount *account)
/* looks up for an existing hula account info in the hula_accounts list based on uid */
-static HulaAccountInfo*
+static HulaAccountInfo*
lookup_account_info (const char *key)
{
GList *list;
HulaAccountInfo *info ;
int found = 0;
-
+
if (!key)
return NULL;
@@ -183,11 +183,11 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
char *relative_uri;
const char *cal_port = "8081";
/* const char *use_ssl = ""; */
- /* offline_sync to come soon */
-
+ /* offline_sync to come soon */
+
/* TODO use_ssl = camel_url_get_param (url, "use_ssl"); */
- client = gconf_client_get_default();
+ client = gconf_client_get_default();
if (!client) {
g_message ("could not get a valid gconf client\n");
return;
@@ -198,7 +198,7 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
result = e_source_list_add_group (source_list, group, -1);
if (result == FALSE) {
- g_warning ("Could not add Hula source group!");
+ g_warning ("Could not add Hula source group!");
} else {
e_source_list_sync (source_list, NULL);
}
@@ -207,16 +207,16 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
relative_uri = g_strdup_printf ("%s@%s:%s/dav/%s/calendar/Personal", url->user, url->host, cal_port, url->user);
g_message ("Relative uri is %s\n", relative_uri);
-
+
source = e_source_new (source_name, relative_uri);
/* e_source_set_property (source, "port", camel_url_get_param (url,
- * "port"));
+ * "port"));
e_source_set_property (source, "auth-domain", "Hula");
e_source_set_property (source, "use_ssl", use_ssl); */
e_source_group_add_source (group, source, -1);
e_source_list_sync (source_list, NULL);
- if (!strcmp (conf_key, CALENDAR_SOURCES))
+ if (!strcmp (conf_key, CALENDAR_SOURCES))
source_selection_key = SELECTED_CALENDARS;
else source_selection_key = NULL;
if (source_selection_key) {
@@ -228,7 +228,7 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
g_free (temp->data);
g_slist_free (ids);
}
-
+
g_object_unref (source);
g_object_unref (group);
g_object_unref (source_list);
@@ -237,7 +237,7 @@ add_esource (const char *conf_key, const char *group_name, const char *source_n
}
-static void
+static void
remove_esource (const char *conf_key, const char *group_name, char* source_name, const char* relative_uri)
{
ESourceList *list;
@@ -247,20 +247,20 @@ remove_esource (const char *conf_key, const char *group_name, char* source_name,
GSList *ids;
GSList *node_tobe_deleted;
char *source_selection_key;
-
+
client = gconf_client_get_default();
list = e_source_list_new_for_gconf (client, conf_key);
- groups = e_source_list_peek_groups (list);
-
+ groups = e_source_list_peek_groups (list);
+
found_group = FALSE;
-
+
for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) {
ESourceGroup *group = E_SOURCE_GROUP (groups->data);
-
- if (strcmp (e_source_group_peek_name (group), group_name) == 0 &&
+
+ if (strcmp (e_source_group_peek_name (group), group_name) == 0 &&
strcmp (e_source_group_peek_base_uri (group), HULA_CALDAV_URI_PREFIX ) == 0) {
GSList *sources = e_source_group_peek_sources (group);
-
+
for( ; sources != NULL; sources = g_slist_next (sources)) {
ESource *source = E_SOURCE (sources->data);
const gchar *source_relative_uri;
@@ -269,43 +269,43 @@ remove_esource (const char *conf_key, const char *group_name, char* source_name,
if (source_relative_uri == NULL)
continue;
if (strcmp (source_relative_uri, relative_uri) == 0) {
-
- if (!strcmp (conf_key, CALENDAR_SOURCES))
+
+ if (!strcmp (conf_key, CALENDAR_SOURCES))
source_selection_key = SELECTED_CALENDARS;
else source_selection_key = NULL;
if (source_selection_key) {
- ids = gconf_client_get_list (client, source_selection_key ,
+ ids = gconf_client_get_list (client, source_selection_key ,
GCONF_VALUE_STRING, NULL);
node_tobe_deleted = g_slist_find_custom (ids, e_source_peek_uid (source), (GCompareFunc) strcmp);
if (node_tobe_deleted) {
g_free (node_tobe_deleted->data);
ids = g_slist_delete_link (ids, node_tobe_deleted);
}
- gconf_client_set_list (client, source_selection_key,
+ gconf_client_set_list (client, source_selection_key,
GCONF_VALUE_STRING, ids, NULL);
}
e_source_list_remove_group (list, group);
- e_source_list_sync (list, NULL);
+ e_source_list_sync (list, NULL);
found_group = TRUE;
break;
-
+
}
}
}
-
-
+
+
}
g_object_unref (list);
- g_object_unref (client);
-
+ g_object_unref (client);
+
}
/* looks for e-source with the same info as old_account_info and changes its values to the values passed in */
-static void
+static void
modify_esource (const char* conf_key, HulaAccountInfo *old_account_info, const char* new_group_name, CamelURL *new_url)
{
ESourceList *list;
@@ -314,7 +314,7 @@ modify_esource (const char* conf_key, HulaAccountInfo *old_account_info, const c
CamelURL *url;
gboolean found_group;
GConfClient* client;
-
+
url = camel_url_new (old_account_info->source_url, NULL);
if (!url->host || strlen (url->host) ==0)
return;
@@ -322,18 +322,18 @@ modify_esource (const char* conf_key, HulaAccountInfo *old_account_info, const c
old_relative_uri = g_strdup_printf ("%s@%s:%d/dav/%s/calendar/Personal", url->user, url->host, url->port, url->user);
client = gconf_client_get_default ();
list = e_source_list_new_for_gconf (client, conf_key);
- groups = e_source_list_peek_groups (list);
+ groups = e_source_list_peek_groups (list);
found_group = FALSE;
for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) {
ESourceGroup *group = E_SOURCE_GROUP (groups->data);
-
- if (strcmp (e_source_group_peek_name (group), old_account_info->name) == 0 &&
+
+ if (strcmp (e_source_group_peek_name (group), old_account_info->name) == 0 &&
strcmp (e_source_group_peek_base_uri (group), HULA_CALDAV_URI_PREFIX) == 0) {
GSList *sources = e_source_group_peek_sources (group);
-
+
for ( ; sources != NULL; sources = g_slist_next (sources)) {
ESource *source = E_SOURCE (sources->data);
const gchar *source_relative_uri;
@@ -364,28 +364,28 @@ modify_esource (const char* conf_key, HulaAccountInfo *old_account_info, const c
camel_url_free (url);
g_free (old_relative_uri);
-
+
}
/* add sources for calendar if the account added is HULA account
adds the new account info to HULA accounts list */
-static void
+static void
add_calendar_sources (HulaAccountInfo *info)
{
CamelURL *url;
-
+
url = camel_url_new (info->source_url, NULL);
add_esource ("/apps/evolution/calendar/sources", info->name, _("Calendar"), url);
-
+
camel_url_free (url);
}
-/* removes calendar sources if the account removed is HULA account
+/* removes calendar sources if the account removed is HULA account
removes the the account info from HULA_account list */
-static void
+static void
remove_calendar_sources (HulaAccountInfo *info)
{
CamelURL *url;
@@ -395,7 +395,7 @@ remove_calendar_sources (HulaAccountInfo *info)
url = camel_url_new (info->source_url, NULL);
- address = url->host;
+ address = url->host;
if (!address || strlen (address) ==0)
return;
@@ -410,7 +410,7 @@ remove_calendar_sources (HulaAccountInfo *info)
}
-static void
+static void
account_added (EAccountList *account_listener, EAccount *account)
{
@@ -420,7 +420,7 @@ account_added (EAccountList *account_listener, EAccount *account)
if (!is_hula_account (account) || !is_hula_caldav_account (account))
return;
-
+
info = g_new0 (HulaAccountInfo, 1);
info->uid = g_strdup (account->uid);
info->name = g_strdup (account->name);
@@ -428,26 +428,26 @@ account_added (EAccountList *account_listener, EAccount *account)
if (account->parent_uid) {
parent = (EAccount *)e_account_list_find (account_listener, E_ACCOUNT_FIND_UID, account->parent_uid);
- if (!parent)
+ if (!parent)
return;
- parent_url = camel_url_new (e_account_get_string(parent, E_ACCOUNT_SOURCE_URL), NULL);
- } else
+ parent_url = camel_url_new (e_account_get_string(parent, E_ACCOUNT_SOURCE_URL), NULL);
+ } else
add_calendar_sources (info);
-
+
hula_accounts = g_list_append (hula_accounts, info);
}
-static void
+static void
account_removed (EAccountList *account_listener, EAccount *account)
{
HulaAccountInfo *info;
-
+
if (!is_hula_account (account) || !is_hula_caldav_account (account))
return;
-
+
info = lookup_account_info (account->uid);
- if (info == NULL)
+ if (info == NULL)
return;
remove_calendar_sources (info);
@@ -468,13 +468,13 @@ account_changed (EAccountList *account_listener, EAccount *account)
HulaAccountInfo *existing_account_info;
const char *old_use_ssl, *new_use_ssl;
const char *old_address, *new_address;
-
+
is_hula = is_hula_account (account);
if (is_hula == FALSE)
is_hula = is_hula_caldav_account (account);
-
+
existing_account_info = lookup_account_info (account->uid);
-
+
if (existing_account_info == NULL && is_hula) {
if (!account->enabled)
@@ -492,21 +492,21 @@ account_changed (EAccountList *account_listener, EAccount *account)
g_free (existing_account_info->name);
g_free (existing_account_info->source_url);
g_free (existing_account_info);
-
+
} else if ( existing_account_info != NULL && is_hula ) {
-
+
if (!account->enabled) {
account_removed (account_listener, account);
return;
}
-
+
/* some info of hula account is changed. update the sources with new info if required */
old_url = camel_url_new (existing_account_info->source_url, NULL);
- old_address = old_url->host;
+ old_address = old_url->host;
old_caldav_port = camel_url_get_param (old_url, "caldav_port");
old_use_ssl = camel_url_get_param (old_url, "use_ssl");
new_url = camel_url_new (account->source->url, NULL);
- new_address = new_url->host;
+ new_address = new_url->host;
if (!new_address || strlen (new_address) ==0)
return;
@@ -519,26 +519,26 @@ account_changed (EAccountList *account_listener, EAccount *account)
new_use_ssl = camel_url_get_param (new_url, "use_ssl");
if ((old_address && strcmp (old_address, new_address))
- || (old_caldav_port && strcmp (old_caldav_port, new_caldav_port))
- || strcmp (old_url->user, new_url->user)
+ || (old_caldav_port && strcmp (old_caldav_port, new_caldav_port))
+ || strcmp (old_url->user, new_url->user)
|| strcmp (old_use_ssl, new_use_ssl)) {
-
+
account_removed (account_listener, account);
account_added (account_listener, account);
} else if (strcmp (existing_account_info->name, account->name)) {
-
+
modify_esource ("/apps/evolution/calendar/sources", existing_account_info, account->name, new_url);
-
+
}
-
+
g_free (existing_account_info->name);
g_free (existing_account_info->source_url);
existing_account_info->name = g_strdup (account->name);
existing_account_info->source_url = g_strdup (account->source->url);
camel_url_free (old_url);
camel_url_free (new_url);
- }
-}
+ }
+}
static void
camel_hula_listener_construct (CamelHulaListener *config_listener)
@@ -546,27 +546,27 @@ camel_hula_listener_construct (CamelHulaListener *config_listener)
EIterator *iter;
EAccount *account;
HulaAccountInfo *info ;
-
+
config_listener->priv->account_list = e_account_list_new (config_listener->priv->gconf_client);
for ( iter = e_list_get_iterator (E_LIST ( config_listener->priv->account_list) ) ; e_iterator_is_valid (iter); e_iterator_next (iter) ) {
-
+
account = E_ACCOUNT (e_iterator_get (iter));
if ( is_hula_account (account) && account->enabled) {
-
+
info = g_new0 (HulaAccountInfo, 1);
info->uid = g_strdup (account->uid);
info->name = g_strdup (account->name);
info->source_url = g_strdup (account->source->url);
hula_accounts = g_list_append (hula_accounts, info);
-
+
}
-
+
}
g_signal_connect (config_listener->priv->account_list, "account_added", G_CALLBACK (account_added), NULL);
g_signal_connect (config_listener->priv->account_list, "account_changed", G_CALLBACK (account_changed), NULL);
- g_signal_connect (config_listener->priv->account_list, "account_removed", G_CALLBACK (account_removed), NULL);
+ g_signal_connect (config_listener->priv->account_list, "account_removed", G_CALLBACK (account_removed), NULL);
}
GType
@@ -595,10 +595,10 @@ CamelHulaListener*
camel_hula_listener_new (void)
{
CamelHulaListener *config_listener;
-
+
config_listener = g_object_new (CAMEL_TYPE_HULA_LISTENER, NULL);
config_listener->priv->gconf_client = gconf_client_get_default();
-
+
camel_hula_listener_construct (config_listener);
return config_listener;
diff --git a/plugins/hula-account-setup/camel-hula-listener.h b/plugins/hula-account-setup/camel-hula-listener.h
index 6bf5c900d1..5fc1d22fb9 100644
--- a/plugins/hula-account-setup/camel-hula-listener.h
+++ b/plugins/hula-account-setup/camel-hula-listener.h
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Authors :
- *
+ *
* Harish Krishnaswamy <kharish@novell.com>
*
* Copyright 2005, Novell, Inc.
@@ -28,7 +28,7 @@
#include<libedataserver/e-source.h>
#include<libedataserver/e-source-list.h>
#include <camel/camel-url.h>
-
+
G_BEGIN_DECLS
#define CAMEL_TYPE_HULA_LISTENER (camel_hula_listener_get_type ())
@@ -42,12 +42,12 @@ typedef struct _CamelHulaListenerClass CamelHulaListenerClass;
typedef struct _CamelHulaListenerPrivate CamelHulaListenerPrivate;
struct _CamelHulaListener {
GObject parent;
-
+
CamelHulaListenerPrivate *priv;
};
struct _CamelHulaListenerClass {
- GObjectClass parent_class;
+ GObjectClass parent_class;
};
GType camel_hula_listener_get_type (void);
diff --git a/plugins/hula-account-setup/hula-account-setup.c b/plugins/hula-account-setup/hula-account-setup.c
index 45475690c6..79440bafc9 100644
--- a/plugins/hula-account-setup/hula-account-setup.c
+++ b/plugins/hula-account-setup/hula-account-setup.c
@@ -11,10 +11,10 @@
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -35,7 +35,7 @@ static CamelHulaListener *config_listener = NULL;
int e_plugin_lib_enable (EPluginLib *ep, int enable);
GtkWidget* org_gnome_evolution_hula_account_setup (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
-static void
+static void
free_hula_listener ( void )
{
g_object_unref (config_listener);
@@ -45,7 +45,7 @@ int
e_plugin_lib_enable (EPluginLib *ep, int enable)
{
if (!config_listener) {
- config_listener = camel_hula_listener_new ();
+ config_listener = camel_hula_listener_new ();
g_atexit ( free_hula_listener );
}
diff --git a/plugins/imap-features/imap-headers.c b/plugins/imap-features/imap-headers.c
index 6c65a61153..4b5c28912f 100644
--- a/plugins/imap-features/imap-headers.c
+++ b/plugins/imap-features/imap-headers.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Author: Sankar P <psankar@novell.com>
- *
+ *
* Copyright 2004 Novell, Inc. (www.novell.com)
*
* This program is free software; you can redistribute it and/or modify
@@ -67,13 +67,13 @@ void imap_headers_abort (EPlugin *efp, EConfigHookItemFactoryData *data);
void imap_headers_commit (EPlugin *efp, EConfigHookItemFactoryData *data);
GtkWidget * org_gnome_imap_headers (EPlugin *epl, EConfigHookItemFactoryData *data);
-void
+void
imap_headers_abort (EPlugin *efp, EConfigHookItemFactoryData *data)
{
/* Nothing to do here */
}
-void
+void
imap_headers_commit (EPlugin *efp, EConfigHookItemFactoryData *data)
{
EMConfigTargetAccount *target_account;
@@ -137,13 +137,13 @@ imap_headers_commit (EPlugin *efp, EConfigHookItemFactoryData *data)
static gboolean
epif_header_is_valid (const char *header)
{
- gint len = g_utf8_strlen (header, -1);
+ gint len = g_utf8_strlen (header, -1);
if (header[0] == 0
|| g_utf8_strchr (header, len, ':') != NULL
|| g_utf8_strchr (header, len, ' ') != NULL)
return FALSE;
-
+
return TRUE;
}
@@ -153,21 +153,21 @@ epif_add_sensitivity (EPImapFeaturesData *ui)
const char *entry_contents;
GtkTreeIter iter;
gboolean valid;
-
- /* the add header button should be sensitive if the text box contains
- * a valid header string, that is not a duplicate with something already
+
+ /* the add header button should be sensitive if the text box contains
+ * a valid header string, that is not a duplicate with something already
* in the list view */
entry_contents = gtk_entry_get_text (GTK_ENTRY (ui->entry_header));
if (!epif_header_is_valid (entry_contents)) {
gtk_widget_set_sensitive (GTK_WIDGET (ui->add_header), FALSE);
return;
}
-
+
/* check if this is a duplicate */
valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ui->store), &iter);
while (valid) {
char *header_name;
-
+
gtk_tree_model_get (GTK_TREE_MODEL (ui->store), &iter,
0, &header_name,
-1);
@@ -175,10 +175,10 @@ epif_add_sensitivity (EPImapFeaturesData *ui)
gtk_widget_set_sensitive (GTK_WIDGET (ui->add_header), FALSE);
return;
}
-
+
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (ui->store), &iter);
}
-
+
gtk_widget_set_sensitive (GTK_WIDGET (ui->add_header), TRUE);
}
@@ -189,12 +189,12 @@ epif_add_header (GtkButton *button, EPImapFeaturesData *ui)
GtkTreeIter iter, first;
model = gtk_tree_view_get_model (ui->custom_headers_tree);
- gtk_tree_store_append (GTK_TREE_STORE(model), &iter, NULL);
+ gtk_tree_store_append (GTK_TREE_STORE(model), &iter, NULL);
gtk_tree_store_set (GTK_TREE_STORE(model), &iter, 0, gtk_entry_get_text (ui->entry_header), -1);
if (gtk_tree_model_get_iter_first (model, &first)!=FALSE)
gtk_widget_set_sensitive (GTK_WIDGET (ui->remove_header), TRUE);
-
+
gtk_entry_set_text (ui->entry_header, "");
epif_add_sensitivity (ui);
}
@@ -207,14 +207,14 @@ epif_remove_header_clicked (GtkButton *button, EPImapFeaturesData *ui)
GtkTreeIter iter, first;
GtkTreePath *path;
gboolean valid = TRUE;
-
+
select = gtk_tree_view_get_selection (ui->custom_headers_tree);
if (gtk_tree_selection_get_selected (select, &model, &iter))
{
path = gtk_tree_model_get_path (model, &iter);
gtk_tree_store_remove(GTK_TREE_STORE(model), &iter);
-
+
if (gtk_tree_path_prev (path)) {
gtk_tree_model_get_iter (model, &iter, path);
} else {
@@ -224,10 +224,10 @@ epif_remove_header_clicked (GtkButton *button, EPImapFeaturesData *ui)
if (valid)
gtk_tree_selection_select_iter (select, &iter);
}
-
+
if (gtk_tree_model_get_iter_first (model, &first)==FALSE)
gtk_widget_set_sensitive (GTK_WIDGET (button), FALSE);
-
+
epif_add_sensitivity (ui);
}
@@ -297,7 +297,7 @@ org_gnome_imap_headers (EPlugin *epl, EConfigHookItemFactoryData *data)
ui->custom_headers_array = g_strsplit (custom_headers, " ", -1);
while (ui->custom_headers_array[i] ) {
if (strlen(g_strstrip(ui->custom_headers_array[i]))) {
- gtk_tree_store_append (ui->store, &iter, NULL);
+ gtk_tree_store_append (ui->store, &iter, NULL);
gtk_tree_store_set (ui->store, &iter, 0, ui->custom_headers_array[i], -1);
}
i++;
@@ -311,7 +311,7 @@ org_gnome_imap_headers (EPlugin *epl, EConfigHookItemFactoryData *data)
if (camel_url_get_param (url, "all_headers")) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ui->all_headers), TRUE);
gtk_widget_set_sensitive (ui->custom_headers_box, FALSE);
- } else if (camel_url_get_param (url, "basic_headers"))
+ } else if (camel_url_get_param (url, "basic_headers"))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ui->basic_headers), TRUE);
camel_url_free (url);
}
diff --git a/plugins/import-ics-attachments/icsimporter.c b/plugins/import-ics-attachments/icsimporter.c
index 802fe9dee5..dbcb597a20 100644
--- a/plugins/import-ics-attachments/icsimporter.c
+++ b/plugins/import-ics-attachments/icsimporter.c
@@ -72,7 +72,7 @@ static icalcomponent_kind get_menu_type (void *data);
void org_gnome_evolution_import_ics_attachments (EPlugin *ep, EMPopupTargetAttachments *t);
void org_gnome_evolution_import_ics_part (EPlugin *ep, EMPopupTargetPart *t);
-static void
+static void
popup_free (EPopup *ep, GSList *items, void *data)
{
g_slist_free (items);
@@ -89,7 +89,7 @@ static EPopupItem popup_tasks_items[] = {
};
-void org_gnome_evolution_import_ics_attachments (EPlugin *ep, EMPopupTargetAttachments *t)
+void org_gnome_evolution_import_ics_attachments (EPlugin *ep, EMPopupTargetAttachments *t)
{
GSList *menus = NULL;
icalcomponent_kind kind;
@@ -98,7 +98,7 @@ void org_gnome_evolution_import_ics_attachments (EPlugin *ep, EMPopupTargetAttac
CamelContentType *type;
len = g_slist_length(t->attachments);
-
+
if (len != 1)
return;
@@ -119,7 +119,7 @@ void org_gnome_evolution_import_ics_attachments (EPlugin *ep, EMPopupTargetAttac
}
}
-void org_gnome_evolution_import_ics_part (EPlugin*ep, EMPopupTargetPart *t)
+void org_gnome_evolution_import_ics_part (EPlugin*ep, EMPopupTargetPart *t)
{
GSList *menus = NULL;
icalcomponent_kind kind;
@@ -148,7 +148,7 @@ get_menu_type (void *data)
char *path;
icalcomponent *icalcomp, *subcomp;
icalcomponent_kind kind;
- EPopupTarget *target = (EPopupTarget *) data;
+ EPopupTarget *target = (EPopupTarget *) data;
if (target->type == EM_POPUP_TARGET_ATTACHMENTS)
part = ((EAttachment *) ((EMPopupTargetAttachments *) target)->attachments->data)->body;
@@ -175,7 +175,7 @@ import_ics (EPlugin *ep, EPopupTarget *t, void *data)
{
CamelMimePart *part;
char *path;
- EPopupTarget *target = (EPopupTarget *) data;
+ EPopupTarget *target = (EPopupTarget *) data;
if (target->type == EM_POPUP_TARGET_ATTACHMENTS)
part = ((EAttachment *) ((EMPopupTargetAttachments *) target)->attachments->data)->body;
@@ -189,7 +189,7 @@ import_ics (EPlugin *ep, EPopupTarget *t, void *data)
static void
init_widgets(char *path)
{
-
+
GtkWidget *vbox, *hbox, *dialog;
icalcomponent_kind kind;
icalcomponent *subcomp;
@@ -203,8 +203,8 @@ init_widgets(char *path)
char *markup;
g_return_if_fail ( path != NULL);
- dialog = gtk_dialog_new_with_buttons (_("Import ICS"),
- NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
+ dialog = gtk_dialog_new_with_buttons (_("Import ICS"),
+ NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
NULL);
icidata->window = dialog;
@@ -254,7 +254,7 @@ init_widgets(char *path)
gtk_box_pack_start (GTK_BOX (hbox), scrolled, TRUE, TRUE, 6);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 6);
icidata->selector = selector;
-
+
/* FIXME What if no sources? */
primary = e_source_list_peek_source_any (source_list);
@@ -270,7 +270,7 @@ init_widgets(char *path)
button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), hbox);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK);
- gtk_widget_grab_focus (button);
+ gtk_widget_grab_focus (button);
gtk_window_set_default_size (GTK_WINDOW (dialog), 210,340);
gtk_widget_show_all (dialog);
@@ -287,12 +287,12 @@ dialog_response_cb (GtkDialog *dialog, gint response_id, ICalImporterData *icida
case GTK_RESPONSE_CANCEL :
case GTK_RESPONSE_DELETE_EVENT :
- gtk_signal_emit_by_name ((GtkObject *)dialog, "close");
+ gtk_signal_emit_by_name ((GtkObject *)dialog, "close");
break;
}
}
-static void
+static void
dialog_close_cb (GtkDialog *dialog, ICalImporterData *icidata)
{
gtk_widget_destroy ((GtkWidget *)dialog);
@@ -307,7 +307,7 @@ prepare_events (icalcomponent *icalcomp, GList **vtodos)
if (vtodos)
*vtodos = NULL;
-
+
iter = icalcomponent_begin_component (icalcomp, ICAL_ANY_COMPONENT);
while ((subcomp = icalcompiter_deref (&iter)) != NULL) {
icalcomponent_kind child_kind = icalcomponent_isa (subcomp);
@@ -356,7 +356,7 @@ prepare_tasks (icalcomponent *icalcomp, GList *vtodos)
g_list_free (vtodos);
}
-static void
+static void
import_items(ICalImporterData *icidata)
{
ESource *source;
diff --git a/plugins/ipod-sync/evolution-ipod-sync.c b/plugins/ipod-sync/evolution-ipod-sync.c
index 73e5536c17..63372f5459 100644
--- a/plugins/ipod-sync/evolution-ipod-sync.c
+++ b/plugins/ipod-sync/evolution-ipod-sync.c
@@ -25,7 +25,7 @@ ipod_check_status (gboolean silent)
{
LibHalContext *ctx;
DBusConnection *conn;
-
+
if (check_hal () == FALSE)
{
if (!silent) {
@@ -45,9 +45,9 @@ ipod_check_status (gboolean silent)
gtk_widget_destroy (message);
}
return FALSE;
-
+
}
-
+
conn = dbus_bus_get (DBUS_BUS_SYSTEM, NULL);
ctx = libhal_ctx_new ();
@@ -55,7 +55,7 @@ ipod_check_status (gboolean silent)
if (!libhal_ctx_init(ctx, NULL))
return FALSE;
-
+
mount_point = find_ipod_mount_point (ctx);
if (mount_point == NULL) {
diff --git a/plugins/ipod-sync/ical-format.c b/plugins/ipod-sync/ical-format.c
index e747255124..38607a6e97 100644
--- a/plugins/ipod-sync/ical-format.c
+++ b/plugins/ipod-sync/ical-format.c
@@ -1,8 +1,8 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
- * Authors: Rodrigo Moya <rodrigo@novell.com>
+ * Authors: Rodrigo Moya <rodrigo@novell.com>
* Philip Van Hoof <pvanhoof@gnome.org>
- *
+ *
* Copyright 2004 Novell, Inc. (www.novell.com)
*
* This program is free software; you can redistribute it and/or
@@ -85,7 +85,7 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc
while (objects != NULL) {
icalcomponent *icalcomp = objects->data;
-
+
icalcomponent_add_component (top_level, icalcomp);
/* remove item from the list */
diff --git a/plugins/ipod-sync/ipod-sync.c b/plugins/ipod-sync/ipod-sync.c
index dc8a0d67be..dd89b34e8f 100644
--- a/plugins/ipod-sync/ipod-sync.c
+++ b/plugins/ipod-sync/ipod-sync.c
@@ -75,13 +75,13 @@ destination_save_addressbook (EPlugin *ep, EABPopupTargetSource *target)
char *mount = ipod_get_mount();
primary_source = e_source_selector_peek_primary_selection (target->selector);
-
+
/* use g_file api here to build path*/
dest_uri = g_strdup_printf("%s/%s/Evolution-Addressbook-%s.vcf", mount, "Contacts", e_source_peek_name (primary_source));
g_free (mount);
-
+
uri = e_source_get_uri (primary_source);
-
+
book = e_book_new_from_uri (uri, NULL);
if (!book
@@ -112,7 +112,7 @@ destination_save_addressbook (EPlugin *ep, EABPopupTargetSource *target)
EContact *contact = tmp->data;
gchar *temp = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
gchar *vcard;
-
+
vcard = g_strconcat(temp, "\r\n", NULL);
if ((result = gnome_vfs_write (handle, (gconstpointer) vcard, strlen (vcard), &bytes_written))
!= GNOME_VFS_OK) {
@@ -137,7 +137,7 @@ destination_save_addressbook (EPlugin *ep, EABPopupTargetSource *target)
g_free (uri);
}
-static void
+static void
destination_save_cal (EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type)
{
FormatHandler *handler = NULL;
@@ -155,7 +155,7 @@ destination_save_cal (EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType
handler->save (handler, ep, target, type, dest_uri);
sync();
-
+
g_free (dest_uri);
g_free (mount);
g_free (handler);
@@ -175,7 +175,7 @@ org_gnome_sync_tasks (EPlugin *ep, ECalPopupTargetSource *target)
{
if (!ipod_check_status(FALSE))
return;
-
+
destination_save_cal (ep, target, E_CAL_SOURCE_TYPE_TODO);
}
diff --git a/plugins/ipod-sync/ipod.c b/plugins/ipod-sync/ipod.c
index 292d07681f..4edfd6a2dd 100644
--- a/plugins/ipod-sync/ipod.c
+++ b/plugins/ipod-sync/ipod.c
@@ -23,7 +23,7 @@ check_hal (void)
char **devices;
int num;
DBusConnection *conn;
-
+
conn = dbus_bus_get (DBUS_BUS_SYSTEM, NULL);
ctx = libhal_ctx_new ();
@@ -105,7 +105,7 @@ static gboolean
is_ipod (char *mount_point)
{
gboolean ret = FALSE;
-
+
char *itunes_path;
itunes_path = g_build_path (G_DIR_SEPARATOR_S, mount_point,
@@ -114,7 +114,7 @@ is_ipod (char *mount_point)
if (!g_file_test (itunes_path, G_FILE_TEST_IS_DIR))
goto out;
-
+
ret = TRUE;
out:
@@ -147,7 +147,7 @@ find_ipod_mount_point (LibHalContext *ctx)
for (i = 0; i < apple_count; i++)
{
udi = apple_devices[i];
-
+
volumes = NULL;
volumes = libhal_manager_find_device_string_match (ctx,
"info.parent",
@@ -161,7 +161,7 @@ find_ipod_mount_point (LibHalContext *ctx)
/* Only interested if it has a filesystem. */
has_fs = 0;
-
+
if (!libhal_device_property_exists (ctx, udi2,
"volume.is_filesystem", NULL) ||
!libhal_device_get_property_bool (ctx, udi2,
@@ -169,7 +169,7 @@ find_ipod_mount_point (LibHalContext *ctx)
{
has_fs = 1;
}
-
+
fsusage = libhal_device_get_property_string (ctx, udi2,
"volume.fsusage", NULL);
@@ -185,7 +185,7 @@ find_ipod_mount_point (LibHalContext *ctx)
if (has_fs == 0)
continue;
-
+
device = libhal_device_get_property_string (ctx, udi2,
"block.device", NULL);
@@ -198,7 +198,7 @@ find_ipod_mount_point (LibHalContext *ctx)
/* It isn't, so let's attempt to mount it */
if (device != NULL)
{
- try_mount (device);
+ try_mount (device);
}
}
@@ -210,10 +210,10 @@ find_ipod_mount_point (LibHalContext *ctx)
}
libhal_free_string (device);
-
+
mount_point = libhal_device_get_property_string (ctx, udi2,
"volume.mount_point", NULL);
-
+
if (is_ipod (mount_point))
{
goto out;
@@ -227,15 +227,15 @@ find_ipod_mount_point (LibHalContext *ctx)
out:
if (volumes != NULL)
libhal_free_string_array (volumes);
-
+
if (apple_devices != NULL)
libhal_free_string_array (apple_devices);
-
+
if (mount_point != NULL)
{
retval = g_strdup (mount_point);
libhal_free_string (mount_point);
}
-
+
return (retval);
}
diff --git a/plugins/ipod-sync/sync.c b/plugins/ipod-sync/sync.c
index 4d555b4a83..b826dca5f3 100644
--- a/plugins/ipod-sync/sync.c
+++ b/plugins/ipod-sync/sync.c
@@ -39,18 +39,18 @@ static void pulse (void)
*/
static void error_dialog (char *title, char *error)
{
- GtkWidget *error_dlg =
+ GtkWidget *error_dlg =
gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
"<span weight=\"bold\" size=\"larger\">"
"%s</span>\n\n%s.", title, error);
-
+
gtk_dialog_set_has_separator (GTK_DIALOG (error_dlg), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (error_dlg), 5);
gtk_label_set_use_markup (GTK_LABEL (GTK_MESSAGE_DIALOG (error_dlg)->label),
TRUE);
gtk_dialog_set_default_response (GTK_DIALOG (error_dlg),
GTK_RESPONSE_OK);
-
+
gtk_dialog_run (GTK_DIALOG (error_dlg));
gtk_widget_destroy (error_dlg);
}
@@ -114,8 +114,8 @@ static void
force_little_endian (gunichar2 *data, int length)
{
int i;
-
- /* We're big-endian?
+
+ /* We're big-endian?
(A little tidier than before) */
if (G_BYTE_ORDER == G_BIG_ENDIAN)
{
@@ -128,7 +128,7 @@ force_little_endian (gunichar2 *data, int length)
data[i] = c;
}
- }
+ }
}
/**
@@ -147,7 +147,7 @@ write_to_ipod (GString *str, char *path, char *filename)
gunichar2 *utf16;
guchar bom[2] = {0xFF, 0xFE};
int i, count;
-
+
output_path = g_build_path (G_DIR_SEPARATOR_S,
ipod_info.mount_point,
path, NULL);
@@ -164,11 +164,11 @@ write_to_ipod (GString *str, char *path, char *filename)
output_file = g_build_filename (output_path, filename, NULL);
g_free (output_path);
-
+
f = fopen (output_file, "w");
g_free (output_file);
-
+
if (f == NULL)
{
critical_error (_("Could not export data!"), strerror (errno));
@@ -179,24 +179,24 @@ write_to_ipod (GString *str, char *path, char *filename)
if (g_utf8_validate (utf8, -1, NULL))
{
utf16 = g_utf8_to_utf16 (utf8, -1, NULL, NULL, NULL);
-
+
/* Swap the bytes if we're big-endian so that the output
* remains little-endian according to the BOM. */
force_little_endian (utf16, g_utf8_strlen (utf8, -1));
}
-
+
count = 2 * g_utf8_strlen (utf8, -1);
-
- /* Write the BOM
+
+ /* Write the BOM
* 0xFF 0xFE
* UTF-16 Little Endian
*/
for (i = 0; i < 2; i++)
fwrite (&bom[i], 1, 1, f);
-
+
if ((fwrite(utf16, count, 1, f) != 1) &&
(count > 0))
- {
+ {
g_free (utf16);
fclose (f);
critical_error (_("Could not export data!"),
@@ -217,15 +217,15 @@ uri_list_to_vcard_string (GSList *uris)
GSList *uri;
qry = e_book_query_field_exists (E_CONTACT_FILE_AS);
-
+
str = g_string_new (NULL);
-
+
for (uri = uris; uri != NULL; uri = uri->next)
{
g_assert (uri->data != NULL);
book = e_book_new_from_uri (uri->data, NULL);
-
+
if (e_book_open (book, TRUE, NULL) == FALSE)
{
error_dialog (_("Could not open addressbook!"),
@@ -247,7 +247,7 @@ uri_list_to_vcard_string (GSList *uris)
{
gchar *tmp;
EContact *contact = E_CONTACT (c->data);
-
+
tmp = e_vcard_to_string (E_VCARD (contact),
EVC_FORMAT_VCARD_30);
@@ -259,7 +259,7 @@ uri_list_to_vcard_string (GSList *uris)
if (contacts != NULL)
g_list_free (contacts);
-
+
g_object_unref (book);
}
@@ -277,7 +277,7 @@ uri_list_to_vcal_string (GSList *uris, ECalSourceType type)
icalcomponent *obj = NULL;
GList *objects = NULL, *o = NULL;
GSList *uri;
-
+
str = g_string_new (NULL);
for (uri = uris; uri != NULL; uri = uri->next)
@@ -285,7 +285,7 @@ uri_list_to_vcal_string (GSList *uris, ECalSourceType type)
g_assert (uri->data != NULL);
cal = e_cal_new_from_uri (uri->data, type);
-
+
if (e_cal_open (cal, TRUE, NULL) == FALSE)
{
error_dialog (_("Could not open calendar/todo!"),
@@ -295,14 +295,14 @@ uri_list_to_vcal_string (GSList *uris, ECalSourceType type)
continue;
}
-
+
e_cal_get_object_list (cal, "#t", &objects, NULL);
for (o = objects; o != NULL; o = o->next)
{
gchar *tmp;
icalcomponent *comp;
-
+
g_assert (o->data != NULL);
comp = o->data;
@@ -310,7 +310,7 @@ uri_list_to_vcal_string (GSList *uris, ECalSourceType type)
g_string_append (str, tmp);
g_free (tmp);
}
-
+
g_object_unref (cal);
}
@@ -326,15 +326,15 @@ export_addressbook (void)
GSList *uris;
GString *data;
pulse ();
-
+
uris = get_source_uris_for_type (EBOOK_SOURCE_LIST);
pulse ();
-
+
data = uri_list_to_vcard_string (uris);
write_to_ipod (data, "/Contacts/", "evolution.vcf");
-
+
g_string_free (data, TRUE);
pulse ();
@@ -360,11 +360,11 @@ export_calendar (void)
data = uri_list_to_vcal_string (uris, E_CAL_SOURCE_TYPE_EVENT);
write_to_ipod (data, "/Calendars/", "evolution-cal.ics");
-
+
g_string_free (data, TRUE);
free_uri_list (uris);
-
+
pulse ();
}
@@ -388,7 +388,7 @@ export_tasks (void)
g_string_free (data, TRUE);
free_uri_list (uris);
-
+
pulse ();
}
@@ -396,13 +396,13 @@ void
export_to_ipod (void)
{
pulse ();
-
+
if (ipod_info.addressbook == TRUE)
export_addressbook ();
if (ipod_info.calendar == TRUE)
export_calendar ();
-
+
if (ipod_info.tasks == TRUE)
export_tasks ();
diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c
index e44740ff6e..7d7fabfe01 100644
--- a/plugins/itip-formatter/itip-formatter.c
+++ b/plugins/itip-formatter/itip-formatter.c
@@ -59,7 +59,7 @@
#define CLASSID "itip://"
#define GCONF_KEY_DELETE "/apps/evolution/itip/delete_processed"
-#define d(x)
+#define d(x)
void format_itip (EPlugin *ep, EMFormatHookTarget *target);
GtkWidget *itip_formatter_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data);
@@ -68,9 +68,9 @@ typedef struct {
EMFormatHTMLPObject pobject;
GtkWidget *view;
-
+
ESourceList *source_lists[E_CAL_SOURCE_TYPE_LAST];
- GHashTable *ecals[E_CAL_SOURCE_TYPE_LAST];
+ GHashTable *ecals[E_CAL_SOURCE_TYPE_LAST];
ECal *current_ecal;
ECalSourceType type;
@@ -84,14 +84,14 @@ typedef struct {
icalproperty_method method;
time_t start_time;
time_t end_time;
-
+
int current;
int total;
gchar *calendar_uid;
EAccountList *accounts;
-
+
gchar *from_address;
gchar *from_name;
gchar *to_address;
@@ -147,7 +147,7 @@ find_attendee (icalcomponent *ical_comp, const char *address)
}
g_free (text);
}
-
+
return prop;
}
@@ -183,7 +183,7 @@ find_attendee_if_sentby (icalcomponent *ical_comp, const char *address)
}
g_free (text);
}
-
+
return prop;
}
@@ -191,7 +191,7 @@ static void
find_to_address (FormatItipPObject *pitip, icalcomponent *ical_comp, icalparameter_partstat *status)
{
EIterator *it;
-
+
it = e_list_get_iterator((EList *)pitip->accounts);
/* Look through the list of attendees to find the user's address */
@@ -236,14 +236,14 @@ find_to_address (FormatItipPObject *pitip, icalcomponent *ical_comp, icalparamet
e_iterator_reset (it);
/* If the user's address was not found in the attendee's list, then the user
- * might be responding on behalf of his/her delegator. In this case, we
- * would want to go through the SENT-BY fields of the attendees to find
+ * might be responding on behalf of his/her delegator. In this case, we
+ * would want to go through the SENT-BY fields of the attendees to find
* the user's address.
*
- * Note: This functionality could have been (easily) implemented in the
- * previous loop, but it would hurt the performance for all providers in
+ * Note: This functionality could have been (easily) implemented in the
+ * previous loop, but it would hurt the performance for all providers in
* general. Hence, we choose to iterate through the accounts list again.
- */
+ */
if (!pitip->my_address)
while (e_iterator_is_valid(it)) {
@@ -320,7 +320,7 @@ find_from_address (FormatItipPObject *pitip, icalcomponent *ical_comp)
return;
pitip->from_address = g_strdup (organizer_clean);
-
+
param = icalproperty_get_first_parameter (prop, ICAL_CN_PARAMETER);
if (param)
pitip->from_name = g_strdup (icalparameter_get_cn (param));
@@ -334,7 +334,7 @@ find_from_address (FormatItipPObject *pitip, icalcomponent *ical_comp)
continue;
}
- if ((organizer_clean && !g_ascii_strcasecmp (organizer_clean, account->id->address))
+ if ((organizer_clean && !g_ascii_strcasecmp (organizer_clean, account->id->address))
|| (organizer_sentby_clean && !g_ascii_strcasecmp (organizer_sentby_clean, account->id->address))) {
pitip->my_address = g_strdup (account->id->address);
@@ -375,13 +375,13 @@ static void
adjust_item (FormatItipPObject *pitip, ECalComponent *comp)
{
ECalComponent *real_comp;
-
+
real_comp = get_real_item (pitip);
if (real_comp != NULL) {
ECalComponentText text;
const char *string;
GSList *l;
-
+
e_cal_component_get_summary (real_comp, &text);
e_cal_component_set_summary (comp, &text);
e_cal_component_get_location (real_comp, &string);
@@ -389,11 +389,11 @@ adjust_item (FormatItipPObject *pitip, ECalComponent *comp)
e_cal_component_get_description_list (real_comp, &l);
e_cal_component_set_description_list (comp, l);
e_cal_component_free_text_list (l);
-
+
g_object_unref (real_comp);
} else {
ECalComponentText text = {_("Unknown"), NULL};
-
+
e_cal_component_set_summary (comp, &text);
}
}
@@ -401,11 +401,11 @@ adjust_item (FormatItipPObject *pitip, ECalComponent *comp)
static void
set_buttons_sensitive (FormatItipPObject *pitip)
{
- gboolean read_only = TRUE;
-
+ gboolean read_only = TRUE;
+
if (pitip->current_ecal)
e_cal_is_read_only (pitip->current_ecal, &read_only, NULL);
-
+
itip_view_set_buttons_sensitive (ITIP_VIEW (pitip->view), pitip->current_ecal != NULL && !read_only);
}
@@ -419,7 +419,7 @@ cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
source_type = e_cal_get_source_type (ecal);
source = e_cal_get_source (ecal);
-
+
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, cal_opened_cb, NULL);
if (status != E_CALENDAR_STATUS_OK) {
@@ -428,7 +428,7 @@ cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
_("Failed to load the calendar '%s'"),
e_source_peek_name (source));
-
+
if (pitip->current_ecal == ecal) {
pitip->current_ecal = NULL;
itip_view_set_buttons_sensitive (ITIP_VIEW (pitip->view), FALSE);
@@ -437,7 +437,7 @@ cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
g_hash_table_remove (pitip->ecals[source_type], e_source_peek_uid (source));
return;
}
-
+
if (e_cal_get_static_capability (ecal, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) {
icalcomponent *icalcomp = e_cal_component_get_icalcomponent (pitip->comp);
@@ -448,13 +448,13 @@ cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
}
if (pitip->type == E_CAL_SOURCE_TYPE_JOURNAL) {
- if (e_cal_get_static_capability (ecal, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING))
+ if (e_cal_get_static_capability (ecal, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING))
itip_view_set_needs_decline (ITIP_VIEW (pitip->view), TRUE);
else
itip_view_set_needs_decline (ITIP_VIEW (pitip->view), FALSE);
itip_view_set_mode (ITIP_VIEW (pitip->view), ITIP_VIEW_MODE_PUBLISH);
}
-
+
pitip->current_ecal = ecal;
set_buttons_sensitive (pitip);
@@ -465,7 +465,7 @@ start_calendar_server (FormatItipPObject *pitip, ESource *source, ECalSourceType
{
ECal *ecal;
icaltimezone *zone = NULL;
-
+
ecal = g_hash_table_lookup (pitip->ecals[type], e_source_peek_uid (source));
if (ecal) {
pitip->current_ecal = ecal;
@@ -475,18 +475,18 @@ start_calendar_server (FormatItipPObject *pitip, ESource *source, ECalSourceType
set_buttons_sensitive (pitip);
- return ecal;
+ return ecal;
}
-
+
ecal = auth_new_cal_from_source (source, type);
-
+
if (!ecal)
return NULL;
-
+
g_signal_connect (G_OBJECT (ecal), "cal_opened", G_CALLBACK (func), data);
g_hash_table_insert (pitip->ecals[type], g_strdup (e_source_peek_uid (source)), ecal);
-
+
zone = calendar_config_get_icaltimezone ();
e_cal_set_default_timezone (ecal, zone, NULL);
@@ -509,7 +509,7 @@ start_calendar_server_by_uid (FormatItipPObject *pitip, const char *uid, ECalSou
if (source)
return start_calendar_server (pitip, source, type, cal_opened_cb, pitip);
}
-
+
return NULL;
}
@@ -517,7 +517,7 @@ static void
source_selected_cb (ItipView *view, ESource *source, gpointer data)
{
FormatItipPObject *pitip = data;
-
+
itip_view_set_buttons_sensitive (ITIP_VIEW (pitip->view), FALSE);
start_calendar_server (pitip, source, pitip->type, cal_opened_cb, pitip);
@@ -532,12 +532,12 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
ECalSourceType source_type;
icalcomponent *icalcomp;
GList *objects = NULL;
-
+
source_type = e_cal_get_source_type (ecal);
source = e_cal_get_source (ecal);
-
+
fd->count--;
-
+
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, find_cal_opened_cb, NULL);
if (status != E_CALENDAR_STATUS_OK) {
@@ -553,7 +553,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
pitip->current_ecal = NULL;
itip_view_set_buttons_sensitive (ITIP_VIEW (pitip->view), FALSE);
}
-
+
g_hash_table_remove (pitip->ecals[source_type], e_source_peek_uid (source));
goto cleanup;
}
@@ -561,12 +561,12 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
/* Check for conflicts */
/* If the query fails, we'll just ignore it */
/* FIXME What happens for recurring conflicts? */
- if (pitip->type == E_CAL_SOURCE_TYPE_EVENT
+ if (pitip->type == E_CAL_SOURCE_TYPE_EVENT
&& e_source_get_property (E_SOURCE (source), "conflict")
&& !g_ascii_strcasecmp (e_source_get_property (E_SOURCE (source), "conflict"), "true")
&& e_cal_get_object_list (ecal, fd->sexp, &objects, NULL)
&& g_list_length (objects) > 0) {
- itip_view_add_upper_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
+ itip_view_add_upper_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
_("An appointment in the calendar '%s' conflicts with this meeting"), e_source_peek_name (source));
e_cal_free_object_list (objects);
@@ -575,7 +575,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
if (!pitip->current_ecal && e_cal_get_object (ecal, fd->uid, fd->rid, &icalcomp, NULL)) {
icalcomponent_free (icalcomp);
-
+
pitip->current_ecal = ecal;
/* Provide extra info, since its not in the component */
@@ -592,7 +592,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
pitip->progress_info_id = 0;
/* FIXME Check read only state of calendar? */
- itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
+ itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
_("Found the appointment in the calendar '%s'"), e_source_peek_name (source));
set_buttons_sensitive (pitip);
@@ -610,7 +610,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
if (pitip->type == E_CAL_SOURCE_TYPE_JOURNAL) {
/* TODO The static capability should be made generic to convey that the calendar contains unaccepted items */
- if (e_cal_get_static_capability (pitip->current_ecal, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING))
+ if (e_cal_get_static_capability (pitip->current_ecal, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING))
itip_view_set_needs_decline (ITIP_VIEW (pitip->view), TRUE);
else
itip_view_set_needs_decline (ITIP_VIEW (pitip->view), FALSE);
@@ -626,7 +626,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
itip_view_remove_lower_info_item (ITIP_VIEW (pitip->view), pitip->progress_info_id);
pitip->progress_info_id = 0;
- if ((pitip->method == ICAL_METHOD_PUBLISH || pitip->method == ICAL_METHOD_REQUEST)
+ if ((pitip->method == ICAL_METHOD_PUBLISH || pitip->method == ICAL_METHOD_REQUEST)
&& !pitip->current_ecal) {
/* Reuse already declared one or rename? */
ESource *source = NULL;
@@ -645,8 +645,8 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
default:
uid = NULL;
g_assert_not_reached ();
- }
-
+ }
+
if (uid) {
source = e_source_list_peek_source_by_uid (pitip->source_lists[pitip->type], uid);
g_free (uid);
@@ -675,15 +675,15 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
} else if (!pitip->current_ecal) {
switch (pitip->type) {
case E_CAL_SOURCE_TYPE_EVENT:
- itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
+ itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
_("Unable to find this meeting in any calendar"));
break;
case E_CAL_SOURCE_TYPE_TODO:
- itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
+ itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
_("Unable to find this task in any task list"));
break;
case E_CAL_SOURCE_TYPE_JOURNAL:
- itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
+ itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
_("Unable to find this memo in any memo list"));
break;
default:
@@ -691,7 +691,7 @@ find_cal_opened_cb (ECal *ecal, ECalendarStatus status, gpointer data)
break;
}
}
-
+
g_free (fd->uid);
g_free (fd->rid);
g_free (fd);
@@ -723,21 +723,21 @@ find_server (FormatItipPObject *pitip, ECalComponent *comp)
for (l = groups; l; l = l->next) {
ESourceGroup *group;
GSList *sources, *m;
-
+
group = l->data;
sources = e_source_group_peek_sources (group);
for (m = sources; m; m = m->next) {
char *source_uri = NULL;
-
+
source = m->data;
-
+
if (e_source_get_property (source, "conflict"))
sources_conflict = g_slist_prepend (sources_conflict, source);
if (current_source)
continue;
-
+
source_uri = e_source_get_uri (source);
if (source_uri && (strcmp (uri, source_uri) == 0)) {
current_source = source;
@@ -746,17 +746,17 @@ find_server (FormatItipPObject *pitip, ECalComponent *comp)
g_free (source_uri);
continue;
}
-
+
all_sources = g_slist_prepend (all_sources, source);
g_free (source_uri);
-
+
}
}
-
- if (current_source)
+
+ if (current_source)
l = sources_conflict;
else {
- pitip->progress_info_id = itip_view_add_lower_info_item (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_PROGRESS,
+ pitip->progress_info_id = itip_view_add_lower_info_item (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_PROGRESS,
_("Searching for an existing version of this appointment"));
l = all_sources;
@@ -778,7 +778,7 @@ find_server (FormatItipPObject *pitip, ECalComponent *comp)
start = isodate_from_time_t (pitip->start_time);
end = isodate_from_time_t (pitip->end_time);
- fd->sexp = g_strdup_printf ("(and (occur-in-time-range? (make-time \"%s\") (make-time \"%s\")) (not (uid? \"%s\")))",
+ fd->sexp = g_strdup_printf ("(and (occur-in-time-range? (make-time \"%s\") (make-time \"%s\")) (not (uid? \"%s\")))",
start, end, icalcomponent_get_uid (pitip->ical_comp));
}
@@ -790,10 +790,10 @@ find_server (FormatItipPObject *pitip, ECalComponent *comp)
if (current_source == source)
pitip->current_ecal = start_calendar_server (pitip, source, pitip->type, find_cal_opened_cb, fd);
- else
+ else
ecal = start_calendar_server (pitip, source, pitip->type, find_cal_opened_cb, fd);
- }
+ }
g_slist_free (all_sources);
g_slist_free (sources_conflict);
@@ -804,11 +804,11 @@ static void
cleanup_ecal (gpointer data)
{
ECal *ecal = data;
-
+
/* Clean up any signals */
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, cal_opened_cb, NULL);
g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, find_cal_opened_cb, NULL);
-
+
g_object_unref (ecal);
}
@@ -826,7 +826,7 @@ change_status (icalcomponent *ical_comp, const char *address, icalparameter_part
icalproperty_add_parameter (prop, param);
} else {
icalparameter *param;
-
+
if (address != NULL) {
prop = icalproperty_new_attendee (address);
icalcomponent_add_property (ical_comp, prop);
@@ -840,16 +840,16 @@ change_status (icalcomponent *ical_comp, const char *address, icalparameter_part
EAccount *a;
a = itip_addresses_get_default ();
-
+
prop = icalproperty_new_attendee (a->id->address);
icalcomponent_add_property (ical_comp, prop);
-
+
param = icalparameter_new_cn (a->id->name);
- icalproperty_add_parameter (prop, param);
+ icalproperty_add_parameter (prop, param);
param = icalparameter_new_role (ICAL_ROLE_REQPARTICIPANT);
icalproperty_add_parameter (prop, param);
-
+
param = icalparameter_new_partstat (status);
icalproperty_add_parameter (prop, param);
}
@@ -869,19 +869,19 @@ message_foreach_part (CamelMimePart *part, GSList **part_list)
return;
*part_list = g_slist_append (*part_list, part);
-
+
containee = camel_medium_get_content_object (CAMEL_MEDIUM (part));
-
+
if (containee == NULL)
return;
-
+
/* using the object types is more accurate than using the mime/types */
if (CAMEL_IS_MULTIPART (containee)) {
parts = camel_multipart_get_number (CAMEL_MULTIPART (containee));
for (i = 0; go && i < parts; i++) {
/* Reuse already declared *parts? */
CamelMimePart *part = camel_multipart_get_part (CAMEL_MULTIPART (containee), i);
-
+
message_foreach_part (part, part_list);
}
} else if (CAMEL_IS_MIME_MESSAGE (containee)) {
@@ -889,7 +889,7 @@ message_foreach_part (CamelMimePart *part, GSList **part_list)
}
}
-static gboolean
+static gboolean
update_item (FormatItipPObject *pitip, ItipViewResponse response)
{
struct icaltimetype stamp;
@@ -930,9 +930,9 @@ update_item (FormatItipPObject *pitip, ItipViewResponse response)
&& (response != ITIP_VIEW_RESPONSE_DECLINE)){
GSList *attachments = NULL, *new_attachments = NULL, *l;
CamelMimeMessage *msg = ((EMFormat *) pitip->pobject.format)->message;
-
+
e_cal_component_get_attachment_list (clone_comp, &attachments);
-
+
for (l = attachments; l; l = l->next) {
GSList *parts = NULL, *m;
char *uri, *new_uri;
@@ -972,13 +972,13 @@ update_item (FormatItipPObject *pitip, ItipViewResponse response)
g_slist_foreach (attachments, (GFunc) g_free, NULL);
g_slist_free (attachments);
-
+
e_cal_component_set_attachment_list (clone_comp, new_attachments);
}
if (!e_cal_receive_objects (pitip->current_ecal, pitip->top_level, &error)) {
itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
- _("Unable to send item to calendar '%s'. %s"),
+ _("Unable to send item to calendar '%s'. %s"),
e_source_peek_name (source), error->message);
g_error_free (error);
result = FALSE;
@@ -989,21 +989,21 @@ update_item (FormatItipPObject *pitip, ItipViewResponse response)
switch (response) {
case ITIP_VIEW_RESPONSE_ACCEPT:
- itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
+ itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
_("Sent to calendar '%s' as accepted"), e_source_peek_name (source));
break;
case ITIP_VIEW_RESPONSE_TENTATIVE:
- itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
+ itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
_("Sent to calendar '%s' as tentative"), e_source_peek_name (source));
break;
case ITIP_VIEW_RESPONSE_DECLINE:
/* FIXME some calendars just might not save it at all, is this accurate? */
- itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
+ itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
_("Sent to calendar '%s' as declined"), e_source_peek_name (source));
break;
case ITIP_VIEW_RESPONSE_CANCEL:
/* FIXME some calendars just might not save it at all, is this accurate? */
- itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
+ itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO,
_("Sent to calendar '%s' as canceled"), e_source_peek_name (source));
break;
default:
@@ -1024,10 +1024,10 @@ update_item (FormatItipPObject *pitip, ItipViewResponse response)
static void
set_attendee (ECalComponent *comp, const char *address)
{
- icalproperty *prop;
+ icalproperty *prop;
icalcomponent *icalcomp;
gboolean found = FALSE;
-
+
icalcomp = e_cal_component_get_icalcomponent (comp);
for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
@@ -1044,7 +1044,7 @@ set_attendee (ECalComponent *comp, const char *address)
if (!found) {
icalparameter *param;
char *temp = g_strdup_printf ("MAILTO:%s", address);
-
+
prop = icalproperty_new_attendee ((const char *) temp);
icalcomponent_add_property (icalcomp, prop);
@@ -1066,17 +1066,17 @@ set_attendee (ECalComponent *comp, const char *address)
}
static gboolean
-send_comp_to_attendee (ECalComponentItipMethod method, ECalComponent *comp, const char *user, ECal *client, const char *comment)
+send_comp_to_attendee (ECalComponentItipMethod method, ECalComponent *comp, const char *user, ECal *client, const char *comment)
{
gboolean status;
- ECalComponent *send_comp = e_cal_component_clone (comp);
-
- set_attendee (send_comp, user);
-
+ ECalComponent *send_comp = e_cal_component_clone (comp);
+
+ set_attendee (send_comp, user);
+
if (comment) {
GSList comments;
ECalComponentText text;
-
+
text.value = comment;
text.altrep = NULL;
@@ -1085,17 +1085,17 @@ send_comp_to_attendee (ECalComponentItipMethod method, ECalComponent *comp, cons
e_cal_component_set_comment_list (send_comp, &comments);
}
-
+
/* FIXME send the attachments in the request */
status = itip_send_comp (method, send_comp, client, NULL, NULL, NULL);
-
+
g_object_unref (send_comp);
- return status;
+ return status;
}
-static void
-remove_delegate (FormatItipPObject *pitip, const char *delegate, const char *delegator, ECalComponent *comp)
+static void
+remove_delegate (FormatItipPObject *pitip, const char *delegate, const char *delegator, ECalComponent *comp)
{
gboolean status;
char *comment = g_strdup_printf (_("Organizer has removed the delegate %s "), itip_strip_mailto (delegate));
@@ -1104,7 +1104,7 @@ remove_delegate (FormatItipPObject *pitip, const char *delegate, const char *del
status = send_comp_to_attendee (E_CAL_COMPONENT_METHOD_CANCEL, pitip->comp, delegate, pitip->current_ecal, comment);
if (status)
send_comp_to_attendee (E_CAL_COMPONENT_METHOD_REQUEST, pitip->comp, delegator, pitip->current_ecal, comment);
- if (status) {
+ if (status) {
itip_view_add_lower_info_item (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO, _("Sent a cancelation notice to the delegate"));
} else
itip_view_add_lower_info_item (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO, _("Could not send the cancelation notice to the delegate"));
@@ -1121,7 +1121,7 @@ update_attendee_status (FormatItipPObject *pitip)
const char *uid, *rid;
const char *delegate;
GError *error = NULL;
-
+
/* Obtain our version */
e_cal_component_get_uid (pitip->comp, &uid);
org_icalcomp = e_cal_component_get_icalcomponent (pitip->comp);
@@ -1142,9 +1142,9 @@ update_attendee_status (FormatItipPObject *pitip)
icalproperty *prop, *del_prop;
prop = find_attendee (icalcomp, itip_strip_mailto (a->value));
- if ((a->status == ICAL_PARTSTAT_DELEGATED) && (del_prop = find_attendee (org_icalcomp, itip_strip_mailto (a->delto))) && !(find_attendee (icalcomp, itip_strip_mailto (a->delto)))) {
+ if ((a->status == ICAL_PARTSTAT_DELEGATED) && (del_prop = find_attendee (org_icalcomp, itip_strip_mailto (a->delto))) && !(find_attendee (icalcomp, itip_strip_mailto (a->delto)))) {
gint response;
- delegate = icalproperty_get_attendee (del_prop);
+ delegate = icalproperty_get_attendee (del_prop);
response = e_error_run (NULL, "org.gnome.itip-formatter:add-delegate",
itip_strip_mailto (a->value),
itip_strip_mailto (delegate), NULL);
@@ -1152,7 +1152,7 @@ update_attendee_status (FormatItipPObject *pitip)
icalcomponent_add_property (icalcomp, icalproperty_new_clone (del_prop));
e_cal_component_rescan (comp);
} else if (response == GTK_RESPONSE_NO) {
- remove_delegate (pitip, delegate, itip_strip_mailto (a->value), comp);
+ remove_delegate (pitip, delegate, itip_strip_mailto (a->value), comp);
goto cleanup;
} else {
goto cleanup;
@@ -1161,7 +1161,7 @@ update_attendee_status (FormatItipPObject *pitip)
if (prop == NULL) {
gint response;
-
+
if (a->delfrom && *a->delfrom) {
response = e_error_run (NULL, "org.gnome.itip-formatter:add-delegate",
itip_strip_mailto (a->delfrom),
@@ -1191,7 +1191,7 @@ update_attendee_status (FormatItipPObject *pitip)
goto cleanup;
}
} else if (a->status == ICAL_PARTSTAT_NONE || a->status == ICAL_PARTSTAT_X) {
- itip_view_add_lower_info_item (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_ERROR,
+ itip_view_add_lower_info_item (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_ERROR,
_("Attendee status could not be updated because the status is invalid"));
goto cleanup;
} else {
@@ -1216,17 +1216,17 @@ update_attendee_status (FormatItipPObject *pitip)
e_cal_component_commit_sequence (comp);
itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, pitip->current_ecal, NULL, NULL, NULL);
}
-
+
if (!e_cal_modify_object (pitip->current_ecal, icalcomp, rid ? CALOBJ_MOD_THIS : CALOBJ_MOD_ALL, &error)) {
- itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_ERROR,
+ itip_view_add_lower_info_item_printf (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_ERROR,
_("Unable to update attendee. %s"), error->message);
-
+
g_error_free (error);
} else {
itip_view_add_lower_info_item (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_INFO, _("Attendee status updated"));
}
} else {
- itip_view_add_lower_info_item (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
+ itip_view_add_lower_info_item (ITIP_VIEW (pitip->view), ITIP_VIEW_INFO_ITEM_TYPE_WARNING,
_("Attendee status can not be updated because the item no longer exists"));
}
@@ -1241,7 +1241,7 @@ send_item (FormatItipPObject *pitip)
ECalComponent *comp;
comp = get_real_item (pitip);
-
+
if (comp != NULL) {
itip_send_comp (E_CAL_COMPONENT_METHOD_REQUEST, comp, pitip->current_ecal, NULL, NULL, NULL);
g_object_unref (comp);
@@ -1290,7 +1290,7 @@ get_next (icalcompiter *iter)
if (ret == NULL)
break;
kind = icalcomponent_isa (ret);
- } while (ret != NULL
+ } while (ret != NULL
&& kind != ICAL_VEVENT_COMPONENT
&& kind != ICAL_VTODO_COMPONENT
&& kind != ICAL_VFREEBUSY_COMPONENT);
@@ -1306,25 +1306,25 @@ set_itip_error (FormatItipPObject *pitip, GtkContainer *container, const char *p
vbox = gtk_vbox_new (FALSE, 12);
gtk_widget_show (vbox);
-
+
message = g_strdup_printf ("<b>%s</b>", primary);
label = gtk_label_new (NULL);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
- gtk_label_set_markup (GTK_LABEL (label), message);
+ gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_label_set_markup (GTK_LABEL (label), message);
g_free (message);
gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
label = gtk_label_new (secondary);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
-
+
gtk_container_add (container, vbox);
}
static gboolean
-extract_itip_data (FormatItipPObject *pitip, GtkContainer *container)
+extract_itip_data (FormatItipPObject *pitip, GtkContainer *container)
{
CamelDataWrapper *content;
CamelStream *mem;
@@ -1342,9 +1342,9 @@ extract_itip_data (FormatItipPObject *pitip, GtkContainer *container)
camel_data_wrapper_decode_to_stream (content, mem);
if (((CamelStreamMem *) mem)->buffer->len == 0) {
- camel_object_unref (mem);
- set_itip_error (pitip, container,
- _("The calendar attached is not valid"),
+ camel_object_unref (mem);
+ set_itip_error (pitip, container,
+ _("The calendar attached is not valid"),
_("The message claims to contain a calendar, but the calendar is not a valid iCalendar."));
return FALSE;
@@ -1352,14 +1352,14 @@ extract_itip_data (FormatItipPObject *pitip, GtkContainer *container)
pitip->vcalendar = g_strndup ((char *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
- camel_object_unref (mem);
+ camel_object_unref (mem);
pitip->top_level = e_cal_util_new_top_level ();
pitip->main_comp = icalparser_parse_string (pitip->vcalendar);
if (pitip->main_comp == NULL) {
- set_itip_error (pitip, container,
- _("The calendar attached is not valid"),
+ set_itip_error (pitip, container,
+ _("The calendar attached is not valid"),
_("The message claims to contain a calendar, but the calendar is not a valid iCalendar."));
return FALSE;
@@ -1394,11 +1394,11 @@ extract_itip_data (FormatItipPObject *pitip, GtkContainer *container)
}
if (pitip->ical_comp == NULL) {
- set_itip_error (pitip, container,
- _("The item in the calendar is not valid"),
+ set_itip_error (pitip, container,
+ _("The item in the calendar is not valid"),
_("The message does contain a calendar, but the calendar contains no events, tasks or free/busy information"));
- return FALSE;
+ return FALSE;
}
switch (icalcomponent_isa (pitip->ical_comp)) {
@@ -1412,23 +1412,23 @@ extract_itip_data (FormatItipPObject *pitip, GtkContainer *container)
pitip->type = E_CAL_SOURCE_TYPE_JOURNAL;
break;
default:
- set_itip_error (pitip, container,
- _("The item in the calendar is not valid"),
+ set_itip_error (pitip, container,
+ _("The item in the calendar is not valid"),
_("The message does contain a calendar, but the calendar contains no events, tasks or free/busy information"));
return FALSE;
}
-
+
pitip->total = icalcomponent_count_components (pitip->main_comp, ICAL_VEVENT_COMPONENT);
pitip->total += icalcomponent_count_components (pitip->main_comp, ICAL_VTODO_COMPONENT);
pitip->total += icalcomponent_count_components (pitip->main_comp, ICAL_VFREEBUSY_COMPONENT);
pitip->total += icalcomponent_count_components (pitip->main_comp, ICAL_VJOURNAL_COMPONENT);
if (pitip->total > 1) {
- set_itip_error (pitip, container,
- _("The calendar attached contains multiple items"),
+ set_itip_error (pitip, container,
+ _("The calendar attached contains multiple items"),
_("To process all of these items, the file should be saved and the calendar imported"));
- return FALSE;
+ return FALSE;
} if (pitip->total > 0) {
pitip->current = 1;
} else {
@@ -1449,7 +1449,7 @@ extract_itip_data (FormatItipPObject *pitip, GtkContainer *container)
prop = find_attendee_if_sentby (pitip->ical_comp, my_address);
if (prop) {
icalparameter *param;
- const char * delfrom;
+ const char * delfrom;
if ((param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDFROM_PARAMETER))) {
delfrom = icalparameter_get_delegatedfrom (param);
@@ -1494,11 +1494,11 @@ extract_itip_data (FormatItipPObject *pitip, GtkContainer *container)
g_object_unref (pitip->comp);
pitip->comp = NULL;
- set_itip_error (pitip, container,
- _("The item in the calendar is not valid"),
+ set_itip_error (pitip, container,
+ _("The item in the calendar is not valid"),
_("The message does contain a calendar, but the calendar contains no events, tasks or free/busy information"));
- return FALSE;
+ return FALSE;
};
/* Add default reminder if the config says so */
@@ -1524,10 +1524,10 @@ extract_itip_data (FormatItipPObject *pitip, GtkContainer *container)
case CAL_MINUTES:
trigger.u.rel_duration.minutes = interval;
break;
- case CAL_HOURS:
+ case CAL_HOURS:
trigger.u.rel_duration.hours = interval;
break;
- case CAL_DAYS:
+ case CAL_DAYS:
trigger.u.rel_duration.days = interval;
break;
default:
@@ -1591,13 +1591,13 @@ static struct _mail_msg_op open_calendar_op = {
};
static gboolean
-idle_open_cb (gpointer data)
+idle_open_cb (gpointer data)
{
- FormatItipPObject *pitip = data;
+ FormatItipPObject *pitip = data;
struct _opencal_msg *m;
-
+
m = mail_msg_new (&open_calendar_op, NULL, sizeof (*m));
- m->command = g_strdup_printf ("evolution \"calendar://?startdate=%s&enddate=%s\"",
+ m->command = g_strdup_printf ("evolution \"calendar://?startdate=%s&enddate=%s\"",
isodate_from_time_t (pitip->start_time), isodate_from_time_t (pitip->end_time));
e_thread_put (mail_thread_queued_slow, (EMsg *)m);
@@ -1625,7 +1625,7 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
/* check if it is a recur instance (no master object) and
* add a property */
if (itip_view_get_recur_check_state (ITIP_VIEW (pitip->view))) {
- prop = icalproperty_new_x ("All");
+ prop = icalproperty_new_x ("All");
icalproperty_set_x_name (prop, "X-GW-RECUR-INSTANCES-MOD-TYPE");
icalcomponent_add_property (pitip->ical_comp, prop);
}
@@ -1633,7 +1633,7 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
switch (response) {
case ITIP_VIEW_RESPONSE_ACCEPT:
if (pitip->type != E_CAL_SOURCE_TYPE_JOURNAL)
- status = change_status (pitip->ical_comp, pitip->to_address,
+ status = change_status (pitip->ical_comp, pitip->to_address,
ICAL_PARTSTAT_ACCEPTED);
else
status = TRUE;
@@ -1660,7 +1660,7 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
status = change_status (pitip->ical_comp, pitip->to_address,
ICAL_PARTSTAT_DECLINED);
else {
- prop = icalproperty_new_x ("1");
+ prop = icalproperty_new_x ("1");
icalproperty_set_x_name (prop, "X-GW-DECLINED");
icalcomponent_add_property (pitip->ical_comp, prop);
status = TRUE;
@@ -1718,7 +1718,7 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
camel_message_info_free (mi);
}
camel_folder_summary_array_free (((EMFormat *) pitip->pobject.format)->folder->summary, summary_array);
- }
+ }
} else {
/* Either not a recurring appointment or "apply-to-all" is not selected. So just delete this instance alone */
camel_folder_summary_remove_uid(((EMFormat *) pitip->pobject.format)->folder->summary, ((EMFormat *) pitip->pobject.format)->uid);
@@ -1726,14 +1726,14 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
}
camel_object_trigger_event (((EMFormat *) pitip->pobject.format)->folder, "folder_changed", changes);
camel_folder_change_info_free (changes);
- }
+ }
}
if (!delete_invitation_from_cache && pitip->delete_message) {
g_message ("Deleting!");
camel_folder_delete_message (((EMFormat *) pitip->pobject.format)->folder, ((EMFormat *) pitip->pobject.format)->uid);
}
-
+
if (itip_view_get_rsvp (ITIP_VIEW (pitip->view)) && status) {
ECalComponent *comp = NULL;
@@ -1742,11 +1742,11 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
const char *attendee, *comment;
GSList *l, *list = NULL;
gboolean found;
-
- comp = e_cal_component_clone (pitip->comp);
+
+ comp = e_cal_component_clone (pitip->comp);
if (comp == NULL)
return;
-
+
if (pitip->to_address == NULL)
find_to_address (pitip, pitip->ical_comp, NULL);
g_assert (pitip->to_address != NULL);
@@ -1760,23 +1760,23 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY))
{
char *text;
-
+
value = icalproperty_get_value (prop);
if (!value)
continue;
-
+
attendee = icalvalue_get_string (value);
-
+
text = g_strdup (itip_strip_mailto (attendee));
text = g_strstrip (text);
-
+
/* We do this to ensure there is at most one
* attendee in the response */
if (found || g_ascii_strcasecmp (pitip->to_address, text))
list = g_slist_prepend (list, prop);
else if (!g_ascii_strcasecmp (pitip->to_address, text))
found = TRUE;
- g_free (text);
+ g_free (text);
}
for (l = list; l; l = l->next) {
@@ -1791,28 +1791,28 @@ view_response_cb (GtkWidget *widget, ItipViewResponse response, gpointer data)
if (comment) {
GSList comments;
ECalComponentText text;
-
+
text.value = comment;
text.altrep = NULL;
-
+
comments.data = &text;
comments.next = NULL;
-
+
e_cal_component_set_comment_list (comp, &comments);
}
-
+
e_cal_component_rescan (comp);
if (itip_send_comp (E_CAL_COMPONENT_METHOD_REPLY, comp, pitip->current_ecal, pitip->top_level, NULL, NULL)) {
camel_folder_set_message_flags (((EMFormat *) pitip->pobject.format)->folder, ((EMFormat *) pitip->pobject.format)->uid, CAMEL_MESSAGE_ANSWERED, CAMEL_MESSAGE_ANSWERED);
}
g_object_unref (comp);
-
+
}
}
static gboolean
-check_is_instance (icalcomponent *icalcomp)
+check_is_instance (icalcomponent *icalcomp)
{
icalproperty *icalprop;
@@ -1869,16 +1869,16 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
/* Accounts */
pitip->accounts = itip_addresses_get ();
-
+
/* Source Lists and open ecal clients */
for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++) {
if (!e_cal_get_sources (&pitip->source_lists[i], i, NULL))
/* FIXME More error handling? */
pitip->source_lists[i] = NULL;
- /* Initialize the ecal hashes */
+ /* Initialize the ecal hashes */
pitip->ecals[i] = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, cleanup_ecal);
- }
+ }
/* FIXME Handle multiple VEVENTS with the same UID, ie detached instances */
if (!extract_itip_data (pitip, GTK_CONTAINER (eb)))
@@ -1931,7 +1931,7 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
}
itip_view_set_item_type (ITIP_VIEW (pitip->view), pitip->type);
-
+
if (response_enabled) {
switch (pitip->method) {
case ICAL_METHOD_REQUEST:
@@ -1967,7 +1967,7 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
e_cal_component_get_attendee_list (pitip->comp, &list);
if (list != NULL) {
ECalComponentAttendee *attendee;
-
+
attendee = list->data;
itip_view_set_attendee (ITIP_VIEW (pitip->view), attendee->cn ? attendee->cn : itip_strip_mailto (attendee->value));
@@ -1978,13 +1978,13 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
if (pitip->my_address) {
if (!(attendee->value && !g_ascii_strcasecmp (itip_strip_mailto (attendee->value), pitip->my_address))
&& !(attendee->sentby && !g_ascii_strcasecmp (itip_strip_mailto (attendee->sentby), pitip->my_address))
- && (pitip->from_address && g_ascii_strcasecmp (pitip->from_address, pitip->my_address)))
+ && (pitip->from_address && g_ascii_strcasecmp (pitip->from_address, pitip->my_address)))
itip_view_set_proxy (ITIP_VIEW (pitip->view), pitip->from_name ? pitip->from_name : pitip->from_address);
}
e_cal_component_free_attendee_list (list);
}
- break;
+ break;
default:
g_assert_not_reached ();
break;
@@ -2001,8 +2001,8 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
if (response_enabled && pitip->method == ICAL_METHOD_REPLY) {
e_cal_component_get_attendee_list (pitip->comp, &list);
if (list != NULL) {
- ECalComponentAttendee *a = list->data;
-
+ ECalComponentAttendee *a = list->data;
+
switch (a->status) {
case ICAL_PARTSTAT_ACCEPTED:
itip_view_set_status (ITIP_VIEW (pitip->view), _("Accepted"));
@@ -2019,29 +2019,29 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
default:
itip_view_set_status (ITIP_VIEW (pitip->view), _("Unknown"));
}
- }
+ }
e_cal_component_free_attendee_list (list);
}
- if (pitip->method == ICAL_METHOD_REPLY
- || pitip->method == ICAL_METHOD_COUNTER
+ if (pitip->method == ICAL_METHOD_REPLY
+ || pitip->method == ICAL_METHOD_COUNTER
|| pitip->method == ICAL_METHOD_DECLINECOUNTER) {
/* FIXME Check spec to see if multiple comments are actually valid */
/* Comments for iTIP are limited to one per object */
e_cal_component_get_comment_list (pitip->comp, &list);
if (list) {
ECalComponentText *text = list->data;
-
- if (text->value)
+
+ if (text->value)
itip_view_set_comment (ITIP_VIEW (pitip->view), text->value);
- }
+ }
e_cal_component_free_text_list (list);
}
-
+
e_cal_component_get_description_list (pitip->comp, &list);
for (l = list; l; l = l->next) {
ECalComponentText *text = l->data;
-
+
if (!gstring && text->value)
gstring = g_string_new (text->value);
else if (text->value)
@@ -2053,23 +2053,23 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
itip_view_set_description (ITIP_VIEW (pitip->view), gstring->str);
g_string_free (gstring, TRUE);
}
-
+
to_zone = calendar_config_get_icaltimezone ();
-
+
e_cal_component_get_dtstart (pitip->comp, &datetime);
pitip->start_time = 0;
if (datetime.value) {
struct tm start_tm;
-
+
/* If the timezone is not in the component, guess the local time */
/* Should we guess if the timezone is an olsen name somehow? */
if (datetime.value->is_utc)
from_zone = icaltimezone_get_utc_timezone ();
- else if (!datetime.value->is_utc && datetime.tzid)
+ else if (!datetime.value->is_utc && datetime.tzid)
from_zone = icalcomponent_get_timezone (pitip->top_level, datetime.tzid);
- else
+ else
from_zone = NULL;
-
+
start_tm = icaltimetype_to_tm_with_zone (datetime.value, from_zone, to_zone);
itip_view_set_start (ITIP_VIEW (pitip->view), &start_tm);
@@ -2101,13 +2101,13 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
/* Should we guess if the timezone is an olsen name somehow? */
if (datetime.value->is_utc)
from_zone = icaltimezone_get_utc_timezone ();
- else if (!datetime.value->is_utc && datetime.tzid)
+ else if (!datetime.value->is_utc && datetime.tzid)
from_zone = icalcomponent_get_timezone (pitip->top_level, datetime.tzid);
else
from_zone = NULL;
-
+
end_tm = icaltimetype_to_tm_with_zone (datetime.value, from_zone, to_zone);
-
+
itip_view_set_end (ITIP_VIEW (pitip->view), &end_tm);
pitip->end_time = icaltime_as_timet_with_zone (*datetime.value, from_zone);
}
@@ -2148,16 +2148,16 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject
}
static void
-pitip_free (EMFormatHTMLPObject *pobject)
+pitip_free (EMFormatHTMLPObject *pobject)
{
FormatItipPObject *pitip = (FormatItipPObject *) pobject;
int i;
-
+
for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++) {
if (pitip->source_lists[i])
g_object_unref (pitip->source_lists[i]);
pitip->source_lists[i] = NULL;
-
+
g_hash_table_destroy (pitip->ecals[i]);
pitip->ecals[i] = NULL;
}
@@ -2189,15 +2189,15 @@ pitip_free (EMFormatHTMLPObject *pobject)
g_free (pitip->from_name);
pitip->from_name = NULL;
g_free (pitip->to_address);
- pitip->to_address = NULL;
+ pitip->to_address = NULL;
g_free (pitip->to_name);
- pitip->to_name = NULL;
+ pitip->to_name = NULL;
g_free (pitip->delegator_address);
pitip->delegator_address = NULL;
g_free (pitip->delegator_name);
pitip->delegator_name = NULL;
g_free (pitip->my_address);
- pitip->my_address = NULL;
+ pitip->my_address = NULL;
}
void
@@ -2206,7 +2206,7 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target)
FormatItipPObject *pitip;
GConfClient *gconf;
char *classid;
-
+
classid = g_strdup_printf("itip:///%s", ((EMFormat *) target->format)->part_id->str);
pitip = (FormatItipPObject *) em_format_html_add_pobject ((EMFormatHTML *) target->format, sizeof (FormatItipPObject), classid, target->part, format_itip_object);
@@ -2215,7 +2215,7 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target)
gconf = gconf_client_get_default ();
pitip->delete_message = gconf_client_get_bool (gconf, GCONF_KEY_DELETE, NULL);
g_object_unref (gconf);
-
+
camel_stream_printf (target->stream, "<table border=0 width=\"100%%\" cellpadding=3><tr>");
camel_stream_printf (target->stream, "<td valign=top><object classid=\"%s\"></object></td><td width=100%% valign=top>", classid);
camel_stream_printf (target->stream, "</td></tr></table>");
@@ -2227,7 +2227,7 @@ static void
delete_toggled_cb (GtkWidget *widget, gpointer data)
{
EMConfigTargetPrefs *target = data;
-
+
gconf_client_set_bool (target->gconf, GCONF_KEY_DELETE, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)), NULL);
}
@@ -2299,7 +2299,7 @@ itip_formatter_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
GtkWidget *scrolledwin;
ESourceList *source_list;
gchar *str;
-
+
/* Create a new notebook page */
page = gtk_vbox_new (FALSE, 0);
GTK_CONTAINER (page)->border_width = 12;
@@ -2325,7 +2325,7 @@ itip_formatter_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
gtk_box_pack_start (GTK_BOX (hbox), padding_label, FALSE, FALSE, 0);
inner_vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), inner_vbox, FALSE, FALSE, 0);
-
+
/* Delete message after acting */
/* FIXME Need a schema for this */
check = gtk_check_button_new_with_mnemonic (_("_Delete message after acting"));
@@ -2351,7 +2351,7 @@ itip_formatter_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
gtk_box_pack_start (GTK_BOX (hbox), padding_label, FALSE, FALSE, 0);
inner_vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), inner_vbox, TRUE, TRUE, 0);
-
+
/* Source selector */
label = gtk_label_new (_("Select the calendars to search for meeting conflicts"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
@@ -2374,7 +2374,7 @@ itip_formatter_page_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
gtk_container_add (GTK_CONTAINER (scrolledwin), ess);
initialize_selection (E_SOURCE_SELECTOR (ess), source_list);
-
+
g_signal_connect (ess, "selection_changed", G_CALLBACK (source_selection_changed), source_list);
g_object_weak_ref (G_OBJECT (page), (GWeakNotify) g_object_unref, source_list);
diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c
index d48973dd4b..fb60c4fa31 100644
--- a/plugins/itip-formatter/itip-view.c
+++ b/plugins/itip-formatter/itip-view.c
@@ -61,7 +61,7 @@ typedef struct {
struct _ItipViewPrivate {
ItipViewMode mode;
ECalSourceType type;
-
+
GtkWidget *sender_label;
char *organizer;
char *organizer_sentby;
@@ -72,7 +72,7 @@ struct _ItipViewPrivate {
GtkWidget *summary_label;
char *summary;
-
+
GtkWidget *location_header;
GtkWidget *location_label;
char *location;
@@ -88,7 +88,7 @@ struct _ItipViewPrivate {
GtkWidget *start_header;
GtkWidget *start_label;
struct tm *start_tm;
-
+
GtkWidget *end_header;
GtkWidget *end_label;
struct tm *end_tm;
@@ -108,7 +108,7 @@ struct _ItipViewPrivate {
GtkWidget *escb;
GtkWidget *escb_header;
ESourceList *source_list;
-
+
GtkWidget *rsvp_box;
GtkWidget *rsvp_check;
GtkWidget *rsvp_comment_header;
@@ -121,7 +121,7 @@ struct _ItipViewPrivate {
GtkWidget *update_box;
GtkWidget *update_check;
gboolean update_show;
-
+
GtkWidget *button_box;
gboolean buttons_sensitive;
@@ -148,7 +148,7 @@ format_date_and_time_x (struct tm *date_tm,
{
char *format;
struct tm tomorrow_tm, week_tm;
-
+
/* Calculate a normalized "tomorrow" */
tomorrow_tm = *current_tm;
/* Don't need this if date is in the past. Also, year assumption won't fail. */
@@ -160,7 +160,7 @@ format_date_and_time_x (struct tm *date_tm,
} else {
tomorrow_tm.tm_mon++;
}
- } else {
+ } else {
tomorrow_tm.tm_mday++;
}
@@ -175,7 +175,7 @@ format_date_and_time_x (struct tm *date_tm,
} else {
week_tm.tm_mon++;
}
- } else {
+ } else {
week_tm.tm_mday += 6;
}
@@ -189,11 +189,11 @@ format_date_and_time_x (struct tm *date_tm,
format = _("Today");
} else if (use_24_hour_format) {
if (!show_zero_seconds && date_tm->tm_sec == 0)
- /* strftime format of a time,
+ /* strftime format of a time,
in 24-hour format, without seconds. */
format = _("Today %H:%M");
else
- /* strftime format of a time,
+ /* strftime format of a time,
in 24-hour format. */
format = _("Today %H:%M:%S");
} else {
@@ -202,12 +202,12 @@ format_date_and_time_x (struct tm *date_tm,
in 12-hour format, without seconds. */
format = _("Today %l:%M %p");
else
- /* strftime format of a time,
+ /* strftime format of a time,
in 12-hour format. */
format = _("Today %l:%M:%S %p");
}
- /* Tomorrow */
+ /* Tomorrow */
} else if (date_tm->tm_mday == tomorrow_tm.tm_mday &&
date_tm->tm_mon == tomorrow_tm.tm_mon &&
date_tm->tm_year == tomorrow_tm.tm_year) {
@@ -217,11 +217,11 @@ format_date_and_time_x (struct tm *date_tm,
format = _("Tomorrow");
} else if (use_24_hour_format) {
if (!show_zero_seconds && date_tm->tm_sec == 0)
- /* strftime format of a time,
+ /* strftime format of a time,
in 24-hour format, without seconds. */
format = _("Tomorrow %H:%M");
else
- /* strftime format of a time,
+ /* strftime format of a time,
in 24-hour format. */
format = _("Tomorrow %H:%M:%S");
} else {
@@ -230,12 +230,12 @@ format_date_and_time_x (struct tm *date_tm,
in 12-hour format, without seconds. */
format = _("Tomorrow %l:%M %p");
else
- /* strftime format of a time,
+ /* strftime format of a time,
in 12-hour format. */
format = _("Tomorrow %l:%M:%S %p");
}
- /* Within 6 days */
+ /* Within 6 days */
} else if ((date_tm->tm_year >= current_tm->tm_year &&
date_tm->tm_mon >= current_tm->tm_mon &&
date_tm->tm_mday >= current_tm->tm_mday) &&
@@ -272,7 +272,7 @@ format_date_and_time_x (struct tm *date_tm,
format = _("%A %l:%M:%S %p");
}
- /* This Year */
+ /* This Year */
} else if (date_tm->tm_year == current_tm->tm_year) {
if (!show_midnight && date_tm->tm_hour == 0
&& date_tm->tm_min == 0 && date_tm->tm_sec == 0) {
@@ -281,8 +281,8 @@ format_date_and_time_x (struct tm *date_tm,
format = _("%A, %B %e");
} else if (use_24_hour_format) {
if (!show_zero_seconds && date_tm->tm_sec == 0)
- /* strftime format of a weekday, a date
- without a year and a time,
+ /* strftime format of a weekday, a date
+ without a year and a time,
in 24-hour format, without seconds. */
format = _("%A, %B %e %H:%M");
else
@@ -291,7 +291,7 @@ format_date_and_time_x (struct tm *date_tm,
format = _("%A, %B %e %H:%M:%S");
} else {
if (!show_zero_seconds && date_tm->tm_sec == 0)
- /* strftime format of a weekday, a date without a year
+ /* strftime format of a weekday, a date without a year
and a time, in 12-hour format, without seconds. */
format = _("%A, %B %e %l:%M %p");
else
@@ -324,7 +324,7 @@ format_date_and_time_x (struct tm *date_tm,
format = _("%A, %B %e, %Y %l:%M:%S %p");
}
}
-
+
/* strftime returns 0 if the string doesn't fit, and leaves the buffer
undefined, so we set it to the empty string in that case. */
if (e_utf8_strftime_fix_am_pm (buffer, buffer_size, format, date_tm) == 0)
@@ -378,7 +378,7 @@ set_calendar_sender_text (ItipView *view)
case ITIP_VIEW_MODE_REFRESH:
if (priv->attendee_sentby)
sender = g_strdup_printf (_("<b>%s</b> through %s wishes to receive the latest information for the following meeting:"), attendee, priv->attendee_sentby);
- else
+ else
sender = g_strdup_printf (_("<b>%s</b> wishes to receive the latest information for the following meeting:"), attendee);
break;
case ITIP_VIEW_MODE_REPLY:
@@ -396,7 +396,7 @@ set_calendar_sender_text (ItipView *view)
case ITIP_VIEW_MODE_COUNTER:
if (priv->attendee_sentby)
sender = g_strdup_printf (_("<b>%s</b> through %s has proposed the following meeting changes."), attendee, priv->attendee_sentby);
- else
+ else
sender = g_strdup_printf (_("<b>%s</b> has proposed the following meeting changes."), attendee);
break;
case ITIP_VIEW_MODE_DECLINECOUNTER:
@@ -431,7 +431,7 @@ set_tasklist_sender_text (ItipView *view)
organizer = priv->organizer ? priv->organizer : _("An unknown person");
attendee = priv->attendee ? priv->attendee : _("An unknown person");
-
+
/* The current account ID (i.e. the delegatee) is receiving a copy of the request/response. Here we ask the delegatee to respond/accept on behalf of the delegator. */
if (priv->organizer && priv->proxy)
on_behalf_of = g_strdup_printf (_("Please respond on behalf of <b>%s</b>"), priv->proxy);
@@ -519,7 +519,7 @@ set_journal_sender_text (ItipView *view)
organizer = priv->organizer ? priv->organizer : _("An unknown person");
attendee = priv->attendee ? priv->attendee : _("An unknown person");
-
+
/* The current account ID (i.e. the delegatee) is receiving a copy of the request/response. Here we ask the delegatee to respond/accept on behalf of the delegator. */
if (priv->organizer && priv->proxy)
on_behalf_of = g_strdup_printf (_("Please respond on behalf of <b>%s</b>"), priv->proxy);
@@ -567,7 +567,7 @@ set_sender_text (ItipView *view)
ItipViewPrivate *priv;
priv = view->priv;
-
+
switch (priv->type) {
case E_CAL_SOURCE_TYPE_EVENT:
set_calendar_sender_text (view);
@@ -657,12 +657,12 @@ set_start_text (ItipView *view)
char buffer[256];
time_t now;
struct tm *now_tm;
-
+
priv = view->priv;
now = time (NULL);
now_tm = localtime (&now);
-
+
if (priv->start_tm) {
format_date_and_time_x (priv->start_tm, now_tm, FALSE, TRUE, FALSE, buffer, 256);
gtk_label_set_text (GTK_LABEL (priv->start_label), buffer);
@@ -681,7 +681,7 @@ set_end_text (ItipView *view)
char buffer[256];
time_t now;
struct tm *now_tm;
-
+
priv = view->priv;
now = time (NULL);
@@ -699,25 +699,25 @@ set_end_text (ItipView *view)
}
static void
-set_info_items (GtkWidget *info_box, GSList *info_items)
+set_info_items (GtkWidget *info_box, GSList *info_items)
{
GSList *l;
-
+
gtk_container_foreach (GTK_CONTAINER (info_box), (GtkCallback) gtk_widget_destroy, NULL);
-
+
for (l = info_items; l; l = l->next) {
- ItipViewInfoItem *item = l->data;
+ ItipViewInfoItem *item = l->data;
GtkWidget *hbox, *image, *label;
-
+
hbox = gtk_hbox_new (FALSE, 0);
switch (item->type) {
case ITIP_VIEW_INFO_ITEM_TYPE_INFO:
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_SMALL_TOOLBAR);
break;
- case ITIP_VIEW_INFO_ITEM_TYPE_WARNING:
+ case ITIP_VIEW_INFO_ITEM_TYPE_WARNING:
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_SMALL_TOOLBAR);
- break;
+ break;
case ITIP_VIEW_INFO_ITEM_TYPE_ERROR:
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_SMALL_TOOLBAR);
break;
@@ -728,26 +728,26 @@ set_info_items (GtkWidget *info_box, GSList *info_items)
default:
image = NULL;
}
-
+
if (image) {
gtk_widget_show (image);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 6);
}
-
+
label = gtk_label_new (item->message);
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 6);
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (info_box), hbox, FALSE, FALSE, 6);
- }
+ }
}
static void
set_upper_info_items (ItipView *view)
{
ItipViewPrivate *priv;
-
+
priv = view->priv;
set_info_items (priv->upper_info_box, priv->upper_info_items);
@@ -757,7 +757,7 @@ static void
set_lower_info_items (ItipView *view)
{
ItipViewPrivate *priv;
-
+
priv = view->priv;
set_info_items (priv->lower_info_box, priv->lower_info_items);
@@ -766,10 +766,10 @@ set_lower_info_items (ItipView *view)
#define DATA_RESPONSE_KEY "ItipView::button_response"
static void
-button_clicked_cb (GtkWidget *widget, gpointer data)
+button_clicked_cb (GtkWidget *widget, gpointer data)
{
ItipViewResponse response;
-
+
response = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), DATA_RESPONSE_KEY));
g_message ("Response %d", response);
@@ -777,13 +777,13 @@ button_clicked_cb (GtkWidget *widget, gpointer data)
}
static void
-set_one_button (ItipView *view, char *label, char *stock_id, ItipViewResponse response)
+set_one_button (ItipView *view, char *label, char *stock_id, ItipViewResponse response)
{
ItipViewPrivate *priv;
GtkWidget *button;
GtkWidget *image;
gpointer data;
-
+
priv = view->priv;
button = gtk_button_new_with_mnemonic (label);
@@ -801,7 +801,7 @@ set_one_button (ItipView *view, char *label, char *stock_id, ItipViewResponse re
}
static void
-set_buttons (ItipView *view)
+set_buttons (ItipView *view)
{
ItipViewPrivate *priv;
gboolean is_recur_set = FALSE;
@@ -816,7 +816,7 @@ set_buttons (ItipView *view)
/* Everything gets the open button */
set_one_button (view, _("_Open Calendar"), GTK_STOCK_JUMP_TO, ITIP_VIEW_RESPONSE_OPEN);
-
+
switch (priv->mode) {
case ITIP_VIEW_MODE_PUBLISH:
/* FIXME Is this really the right button? */
@@ -863,12 +863,12 @@ set_buttons (ItipView *view)
}
static void
-itip_view_destroy (GtkObject *object)
+itip_view_destroy (GtkObject *object)
{
ItipView *view = ITIP_VIEW (object);
ItipViewPrivate *priv = view->priv;
-
- if (priv) {
+
+ if (priv) {
g_free (priv->organizer);
g_free (priv->organizer_sentby);
g_free (priv->delegator);
@@ -885,7 +885,7 @@ itip_view_destroy (GtkObject *object)
itip_view_clear_upper_info_items (view);
itip_view_clear_lower_info_items (view);
-
+
g_free (priv);
view->priv = NULL;
}
@@ -897,9 +897,9 @@ static void
itip_view_class_init (ItipViewClass *klass)
{
GtkObjectClass *gtkobject_class;
-
+
gtkobject_class = GTK_OBJECT_CLASS (klass);
-
+
gtkobject_class->destroy = itip_view_destroy;
signals[SOURCE_SELECTED] =
@@ -922,14 +922,14 @@ itip_view_class_init (ItipViewClass *klass)
}
static void
-rsvp_toggled_cb (GtkWidget *widget, gpointer data)
+rsvp_toggled_cb (GtkWidget *widget, gpointer data)
{
ItipView *view = data;
ItipViewPrivate *priv;
gboolean rsvp;
-
+
priv = view->priv;
-
+
rsvp = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->rsvp_check));
gtk_widget_set_sensitive (priv->rsvp_comment_header, rsvp);
@@ -937,13 +937,13 @@ rsvp_toggled_cb (GtkWidget *widget, gpointer data)
}
static void
-recur_toggled_cb (GtkWidget *widget, gpointer data)
+recur_toggled_cb (GtkWidget *widget, gpointer data)
{
ItipView *view = data;
ItipViewPrivate *priv;
-
+
priv = view->priv;
-
+
itip_view_set_mode (view, priv->mode);
}
@@ -954,11 +954,11 @@ itip_view_init (ItipView *view)
ItipViewPrivate *priv;
GtkWidget *icon, *vbox, *hbox, *separator, *table, *label;
- priv = g_new0 (ItipViewPrivate, 1);
+ priv = g_new0 (ItipViewPrivate, 1);
view->priv = priv;
priv->mode = ITIP_VIEW_MODE_NONE;
-
+
gtk_box_set_spacing (GTK_BOX (view), 12);
/* The meeting icon */
@@ -1004,7 +1004,7 @@ itip_view_init (ItipView *view)
gtk_misc_set_alignment (GTK_MISC (priv->location_label), 0, 0.5);
gtk_table_attach (GTK_TABLE (table), priv->location_header, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
gtk_table_attach (GTK_TABLE (table), priv->location_label, 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
-
+
/* Start time */
priv->start_header = gtk_label_new (_("Start time:"));
priv->start_label = gtk_label_new (NULL);
@@ -1062,7 +1062,7 @@ itip_view_init (ItipView *view)
priv->selector_box = gtk_hbox_new (FALSE, 12);
gtk_widget_show (priv->selector_box);
gtk_box_pack_start (GTK_BOX (vbox), priv->selector_box, FALSE, FALSE, 0);
-
+
/* RSVP area */
priv->rsvp_box = gtk_vbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (vbox), priv->rsvp_box, FALSE, FALSE, 0);
@@ -1085,7 +1085,7 @@ itip_view_init (ItipView *view)
gtk_widget_set_sensitive (priv->rsvp_comment_header, FALSE);
gtk_widget_show (priv->rsvp_comment_header);
gtk_box_pack_start (GTK_BOX (hbox), priv->rsvp_comment_header, FALSE, FALSE, 0);
-
+
priv->rsvp_comment_entry = gtk_entry_new ();
gtk_widget_set_sensitive (priv->rsvp_comment_entry, FALSE);
gtk_widget_show (priv->rsvp_comment_entry);
@@ -1123,7 +1123,7 @@ GtkWidget *
itip_view_new (void)
{
ItipView *itip_view = g_object_new (ITIP_TYPE_VIEW, "homogeneous", FALSE, "spacing", 6, NULL);
-
+
return GTK_WIDGET (itip_view);
}
@@ -1131,12 +1131,12 @@ void
itip_view_set_mode (ItipView *view, ItipViewMode mode)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
priv->mode = mode;
set_sender_text (view);
@@ -1150,9 +1150,9 @@ itip_view_get_mode (ItipView *view)
g_return_val_if_fail (view != NULL, ITIP_VIEW_MODE_NONE);
g_return_val_if_fail (ITIP_IS_VIEW (view), ITIP_VIEW_MODE_NONE);
-
+
priv = view->priv;
-
+
return priv->mode;
}
@@ -1160,12 +1160,12 @@ void
itip_view_set_item_type (ItipView *view, ECalSourceType type)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
priv->type = type;
set_sender_text (view);
@@ -1178,9 +1178,9 @@ itip_view_get_item_type (ItipView *view)
g_return_val_if_fail (view != NULL, ITIP_VIEW_MODE_NONE);
g_return_val_if_fail (ITIP_IS_VIEW (view), ITIP_VIEW_MODE_NONE);
-
+
priv = view->priv;
-
+
return priv->type;
}
@@ -1189,12 +1189,12 @@ void
itip_view_set_organizer (ItipView *view, const char *organizer)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->organizer)
g_free (priv->organizer);
@@ -1205,14 +1205,14 @@ itip_view_set_organizer (ItipView *view, const char *organizer)
const char *
itip_view_get_organizer (ItipView *view)
-{
+{
ItipViewPrivate *priv;
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->organizer;
}
@@ -1220,12 +1220,12 @@ void
itip_view_set_organizer_sentby (ItipView *view, const char *sentby)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->organizer_sentby)
g_free (priv->organizer_sentby);
@@ -1241,9 +1241,9 @@ itip_view_get_organizer_sentby (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->organizer_sentby;
}
@@ -1251,18 +1251,18 @@ void
itip_view_set_attendee (ItipView *view, const char *attendee)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->attendee)
g_free (priv->attendee);
priv->attendee = g_strdup (attendee);
- set_sender_text (view);
+ set_sender_text (view);
}
const char *
@@ -1272,9 +1272,9 @@ itip_view_get_attendee (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->attendee;
}
@@ -1282,12 +1282,12 @@ void
itip_view_set_attendee_sentby (ItipView *view, const char *sentby)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->attendee_sentby)
g_free (priv->attendee_sentby);
@@ -1303,9 +1303,9 @@ itip_view_get_attendee_sentby (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->attendee_sentby;
}
@@ -1313,12 +1313,12 @@ void
itip_view_set_proxy (ItipView *view, const char *proxy)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->proxy)
g_free (priv->proxy);
@@ -1334,9 +1334,9 @@ itip_view_get_proxy (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->proxy;
}
@@ -1344,18 +1344,18 @@ void
itip_view_set_delegator (ItipView *view, const char *delegator)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->delegator)
g_free (priv->delegator);
priv->delegator = g_strdup (delegator);
- set_sender_text (view);
+ set_sender_text (view);
}
const char *
@@ -1365,9 +1365,9 @@ itip_view_get_delegator (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->delegator;
}
@@ -1375,12 +1375,12 @@ void
itip_view_set_summary (ItipView *view, const char *summary)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->summary)
g_free (priv->summary);
@@ -1396,9 +1396,9 @@ itip_view_get_summary (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->summary;
}
@@ -1406,12 +1406,12 @@ void
itip_view_set_location (ItipView *view, const char *location)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->location)
g_free (priv->location);
@@ -1427,9 +1427,9 @@ itip_view_get_location (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->location;
}
@@ -1437,12 +1437,12 @@ void
itip_view_set_status (ItipView *view, const char *status)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->status)
g_free (priv->status);
@@ -1458,9 +1458,9 @@ itip_view_get_status (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->status;
}
@@ -1468,12 +1468,12 @@ void
itip_view_set_comment (ItipView *view, const char *comment)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->comment)
g_free (priv->comment);
@@ -1489,9 +1489,9 @@ itip_view_get_comment (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->comment;
}
@@ -1500,12 +1500,12 @@ void
itip_view_set_description (ItipView *view, const char *description)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->description)
g_free (priv->description);
@@ -1521,9 +1521,9 @@ itip_view_get_description (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->description;
}
@@ -1532,22 +1532,22 @@ void
itip_view_set_start (ItipView *view, struct tm *start)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->start_tm && !start) {
g_free (priv->start_tm);
priv->start_tm = NULL;
} else if (start) {
if (!priv->start_tm)
priv->start_tm = g_new0 (struct tm, 1);
-
+
*priv->start_tm = *start;
- }
-
+ }
+
set_start_text (view);
}
@@ -1558,9 +1558,9 @@ itip_view_get_start (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->start_tm;
}
@@ -1568,22 +1568,22 @@ void
itip_view_set_end (ItipView *view, struct tm *end)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
if (priv->end_tm && !end) {
g_free (priv->end_tm);
priv->end_tm = NULL;
} else if (end) {
if (!priv->end_tm)
priv->end_tm = g_new0 (struct tm, 1);
-
+
*priv->end_tm = *end;
- }
-
+ }
+
set_end_text (view);
}
@@ -1594,9 +1594,9 @@ itip_view_get_end (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->end_tm;
}
@@ -1608,7 +1608,7 @@ itip_view_add_upper_info_item (ItipView *view, ItipViewInfoItemType type, const
g_return_val_if_fail (view != NULL, 0);
g_return_val_if_fail (ITIP_IS_VIEW (view), 0);
-
+
priv = view->priv;
item = g_new0 (ItipViewInfoItem, 1);
@@ -1616,7 +1616,7 @@ itip_view_add_upper_info_item (ItipView *view, ItipViewInfoItemType type, const
item->type = type;
item->message = g_strdup (message);
item->id = priv->next_info_item_id++;
-
+
priv->upper_info_items = g_slist_append (priv->upper_info_items, item);
set_upper_info_items (view);
@@ -1630,17 +1630,17 @@ itip_view_add_upper_info_item_printf (ItipView *view, ItipViewInfoItemType type,
va_list args;
char *message;
guint id;
-
+
g_return_val_if_fail (view != NULL, 0);
- g_return_val_if_fail (ITIP_IS_VIEW (view), 0);
-
+ g_return_val_if_fail (ITIP_IS_VIEW (view), 0);
+
va_start (args, format);
message = g_strdup_vprintf (format, args);
va_end (args);
id = itip_view_add_upper_info_item (view, type, message);
g_free (message);
-
+
return id;
}
@@ -1649,10 +1649,10 @@ itip_view_remove_upper_info_item (ItipView *view, guint id)
{
ItipViewPrivate *priv;
GSList *l;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
for (l = priv->upper_info_items; l; l = l->next) {
@@ -1676,10 +1676,10 @@ itip_view_clear_upper_info_items (ItipView *view)
{
ItipViewPrivate *priv;
GSList *l;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
gtk_container_foreach (GTK_CONTAINER (priv->upper_info_box), (GtkCallback) gtk_widget_destroy, NULL);
@@ -1702,8 +1702,8 @@ itip_view_add_lower_info_item (ItipView *view, ItipViewInfoItemType type, const
ItipViewInfoItem *item;
g_return_val_if_fail (view != NULL, 0);
- g_return_val_if_fail (ITIP_IS_VIEW (view), 0);
-
+ g_return_val_if_fail (ITIP_IS_VIEW (view), 0);
+
priv = view->priv;
item = g_new0 (ItipViewInfoItem, 1);
@@ -1711,7 +1711,7 @@ itip_view_add_lower_info_item (ItipView *view, ItipViewInfoItemType type, const
item->type = type;
item->message = g_strdup (message);
item->id = priv->next_info_item_id++;
-
+
priv->lower_info_items = g_slist_append (priv->lower_info_items, item);
set_lower_info_items (view);
@@ -1725,17 +1725,17 @@ itip_view_add_lower_info_item_printf (ItipView *view, ItipViewInfoItemType type,
va_list args;
char *message;
guint id;
-
+
g_return_val_if_fail (view != NULL, 0);
- g_return_val_if_fail (ITIP_IS_VIEW (view), 0);
-
+ g_return_val_if_fail (ITIP_IS_VIEW (view), 0);
+
va_start (args, format);
message = g_strdup_vprintf (format, args);
va_end (args);
id = itip_view_add_lower_info_item (view, type, message);
g_free (message);
-
+
return id;
}
@@ -1744,10 +1744,10 @@ itip_view_remove_lower_info_item (ItipView *view, guint id)
{
ItipViewPrivate *priv;
GSList *l;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
for (l = priv->lower_info_items; l; l = l->next) {
@@ -1771,10 +1771,10 @@ itip_view_clear_lower_info_items (ItipView *view)
{
ItipViewPrivate *priv;
GSList *l;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
gtk_container_foreach (GTK_CONTAINER (priv->lower_info_box), (GtkCallback) gtk_widget_destroy, NULL);
@@ -1804,10 +1804,10 @@ void
itip_view_set_source_list (ItipView *view, ESourceList *source_list)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
if (priv->source_list)
@@ -1815,7 +1815,7 @@ itip_view_set_source_list (ItipView *view, ESourceList *source_list)
if (priv->escb)
gtk_widget_destroy (priv->escb);
-
+
if (!source_list) {
if (priv->escb_header)
gtk_widget_destroy (priv->escb_header);
@@ -1823,12 +1823,12 @@ itip_view_set_source_list (ItipView *view, ESourceList *source_list)
priv->source_list = NULL;
priv->escb = NULL;
priv->escb_header = NULL;
-
+
return;
}
priv->source_list = g_object_ref (source_list);
-
+
priv->escb = e_source_combo_box_new (source_list);
gtk_widget_show (priv->escb);
g_signal_connect (
@@ -1846,7 +1846,7 @@ itip_view_set_source_list (ItipView *view, ESourceList *source_list)
gtk_label_set_mnemonic_widget (GTK_LABEL (priv->escb_header), priv->escb);
gtk_widget_show (priv->escb_header);
}
-
+
gtk_box_pack_start (GTK_BOX (priv->selector_box), priv->escb_header, FALSE, TRUE, 6);
gtk_box_pack_start (GTK_BOX (priv->selector_box), priv->escb, FALSE, TRUE, 0);
}
@@ -1858,9 +1858,9 @@ itip_view_get_source_list (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return priv->source_list;
}
@@ -1868,10 +1868,10 @@ void
itip_view_set_source (ItipView *view, ESource *source)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
if (!priv->escb)
@@ -1888,9 +1888,9 @@ itip_view_get_source (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
if (!priv->escb)
return NULL;
@@ -1902,12 +1902,12 @@ void
itip_view_set_rsvp (ItipView *view, gboolean rsvp)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->rsvp_check), rsvp);
gtk_widget_set_sensitive (priv->rsvp_comment_header, rsvp);
@@ -1921,9 +1921,9 @@ itip_view_get_rsvp (ItipView *view)
g_return_val_if_fail (view != NULL, FALSE);
g_return_val_if_fail (ITIP_IS_VIEW (view), FALSE);
-
+
priv = view->priv;
-
+
return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->rsvp_check));
}
@@ -1931,12 +1931,12 @@ void
itip_view_set_show_rsvp (ItipView *view, gboolean rsvp)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
priv->rsvp_show = rsvp;
priv->rsvp_show ? gtk_widget_show (priv->rsvp_box) : gtk_widget_hide (priv->rsvp_box);
@@ -1949,9 +1949,9 @@ itip_view_get_show_rsvp (ItipView *view)
g_return_val_if_fail (view != NULL, FALSE);
g_return_val_if_fail (ITIP_IS_VIEW (view), FALSE);
-
+
priv = view->priv;
-
+
return priv->rsvp_show;
}
@@ -1959,12 +1959,12 @@ void
itip_view_set_update (ItipView *view, gboolean update)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->update_check), update);
}
@@ -1975,9 +1975,9 @@ itip_view_get_update (ItipView *view)
g_return_val_if_fail (view != NULL, FALSE);
g_return_val_if_fail (ITIP_IS_VIEW (view), FALSE);
-
+
priv = view->priv;
-
+
return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->update_check));
}
@@ -1985,12 +1985,12 @@ void
itip_view_set_show_update (ItipView *view, gboolean update)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
priv->update_show = update;
priv->update_show ? gtk_widget_show (priv->update_box) : gtk_widget_hide (priv->update_box);
@@ -2003,9 +2003,9 @@ itip_view_get_show_update (ItipView *view)
g_return_val_if_fail (view != NULL, FALSE);
g_return_val_if_fail (ITIP_IS_VIEW (view), FALSE);
-
+
priv = view->priv;
-
+
return priv->update_show;
}
@@ -2013,12 +2013,12 @@ void
itip_view_set_rsvp_comment (ItipView *view, const char *comment)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
gtk_entry_set_text (GTK_ENTRY (priv->rsvp_comment_entry), comment);
}
@@ -2029,9 +2029,9 @@ itip_view_get_rsvp_comment (ItipView *view)
g_return_val_if_fail (view != NULL, NULL);
g_return_val_if_fail (ITIP_IS_VIEW (view), NULL);
-
+
priv = view->priv;
-
+
return gtk_entry_get_text (GTK_ENTRY (priv->rsvp_comment_entry));
}
@@ -2039,12 +2039,12 @@ void
itip_view_set_needs_decline (ItipView *view, gboolean needs_decline)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
priv->needs_decline = needs_decline;
}
@@ -2052,12 +2052,12 @@ void
itip_view_set_buttons_sensitive (ItipView *view, gboolean sensitive)
{
ItipViewPrivate *priv;
-
+
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
priv = view->priv;
-
+
priv->buttons_sensitive = sensitive;
gtk_widget_set_sensitive (priv->button_box, priv->buttons_sensitive);
@@ -2070,13 +2070,13 @@ itip_view_get_buttons_sensitive (ItipView *view)
g_return_val_if_fail (view != NULL, FALSE);
g_return_val_if_fail (ITIP_IS_VIEW (view), FALSE);
-
+
priv = view->priv;
-
+
return priv->buttons_sensitive;
}
-gboolean
+gboolean
itip_view_get_recur_check_state (ItipView *view)
{
return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (view->priv->recur_check));
@@ -2086,8 +2086,8 @@ void
itip_view_set_show_recur_check (ItipView *view, gboolean show)
{
g_return_if_fail (view != NULL);
- g_return_if_fail (ITIP_IS_VIEW (view));
-
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
if (show)
gtk_widget_show (view->priv->recur_check);
else {
diff --git a/plugins/itip-formatter/itip-view.h b/plugins/itip-formatter/itip-view.h
index f66d1957a9..a93da5c53c 100644
--- a/plugins/itip-formatter/itip-view.h
+++ b/plugins/itip-formatter/itip-view.h
@@ -77,7 +77,7 @@ typedef enum {
struct _ItipView {
GtkHBox parent_instance;
-
+
ItipViewPrivate *priv;
GtkWidget *action_vbox;
@@ -138,12 +138,12 @@ const struct tm *itip_view_get_start (ItipView *view);
void itip_view_set_end (ItipView *view, struct tm *end);
const struct tm *itip_view_get_end (ItipView *view);
-guint itip_view_add_upper_info_item (ItipView *view, ItipViewInfoItemType type, const char *message);
+guint itip_view_add_upper_info_item (ItipView *view, ItipViewInfoItemType type, const char *message);
guint itip_view_add_upper_info_item_printf (ItipView *view, ItipViewInfoItemType, const char *format, ...) G_GNUC_PRINTF (3, 4);
void itip_view_remove_upper_info_item (ItipView *view, guint id);
void itip_view_clear_upper_info_items (ItipView *view);
-guint itip_view_add_lower_info_item (ItipView *view, ItipViewInfoItemType type, const char *message);
+guint itip_view_add_lower_info_item (ItipView *view, ItipViewInfoItemType type, const char *message);
guint itip_view_add_lower_info_item_printf (ItipView *view, ItipViewInfoItemType type, const char *format, ...) G_GNUC_PRINTF (3, 4);
void itip_view_remove_lower_info_item (ItipView *view, guint id);
void itip_view_clear_lower_info_items (ItipView *view);
diff --git a/plugins/mail-account-disable/mail-account-disable.c b/plugins/mail-account-disable/mail-account-disable.c
index 931525321c..bd6df815b0 100644
--- a/plugins/mail-account-disable/mail-account-disable.c
+++ b/plugins/mail-account-disable/mail-account-disable.c
@@ -47,7 +47,7 @@ static EPopupItem popup_items[] = {
{ E_POPUP_ITEM, "20.emc.04", N_("Proxy _Logout"), mail_account_disable, NULL, NULL, 0, EM_POPUP_FOLDER_STORE }
};
-static void
+static void
popup_free (EPopup *ep, GSList *items, void *data)
{
g_slist_free (items);
@@ -65,11 +65,11 @@ mail_account_disable (EPopup *ep, EPopupItem *p, void *data)
if (mail_config_has_proxies (account))
mail_config_remove_account_proxies (account);
-
+
account->enabled = !account->enabled;
e_account_list_change (mail_config_get_accounts (), account);
mail_component_remove_store_by_uri (component, account->source->url);
-
+
if (account->parent_uid)
mail_config_remove_account (account);
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index bcdac7263e..7025579172 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -36,7 +36,7 @@
#include <mail/em-folder-tree-model.h>
#include <camel/camel-folder.h>
-#ifdef HAVE_LIBNOTIFY
+#ifdef HAVE_LIBNOTIFY
#include <libnotify/notify.h>
#endif
@@ -50,7 +50,7 @@ void org_gnome_mail_read_notify (EPlugin *ep, EMEventTargetMessage *t);
static gboolean enabled = FALSE;
static GtkStatusIcon *status_icon = NULL;
-#ifdef HAVE_LIBNOTIFY
+#ifdef HAVE_LIBNOTIFY
static gboolean notification_callback (gpointer notify);
static NotifyNotification *notify = NULL;
#endif
@@ -67,7 +67,7 @@ org_gnome_mail_read_notify (EPlugin *ep, EMEventTargetMessage *t)
return;
}
-#ifdef HAVE_LIBNOTIFY
+#ifdef HAVE_LIBNOTIFY
notify_notification_close (notify, NULL);
#endif
gtk_status_icon_set_visible (status_icon, FALSE);
@@ -76,28 +76,28 @@ org_gnome_mail_read_notify (EPlugin *ep, EMEventTargetMessage *t)
}
static void
-#ifdef HAVE_LIBNOTIFY
+#ifdef HAVE_LIBNOTIFY
icon_activated (GtkStatusIcon *icon, NotifyNotification *notify)
#else
icon_activated (GtkStatusIcon *icon, gpointer notify)
#endif
{
g_static_mutex_lock (&mlock);
-#ifdef HAVE_LIBNOTIFY
+#ifdef HAVE_LIBNOTIFY
notify_notification_close (notify, NULL);
-#endif
+#endif
gtk_status_icon_set_visible (status_icon, FALSE);
g_static_mutex_unlock (&mlock);
}
-#ifdef HAVE_LIBNOTIFY
+#ifdef HAVE_LIBNOTIFY
gboolean
notification_callback (gpointer notify)
{
printf("fff\n");
return (!notify_notification_show(notify, NULL));
-
+
}
#endif
@@ -119,7 +119,7 @@ org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t)
is_key = gconf_client_get (client, GCONF_KEY_BLINK, NULL);
if (!is_key)
gconf_client_set_bool (client, GCONF_KEY_BLINK, TRUE, NULL);
- else
+ else
gconf_value_free (is_key);
if (!status_icon) {
@@ -133,10 +133,10 @@ org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t)
gtk_status_icon_set_tooltip (status_icon, msg);
gtk_status_icon_set_visible (status_icon, TRUE);
- gtk_status_icon_set_blinking (status_icon,
+ gtk_status_icon_set_blinking (status_icon,
gconf_client_get_bool (client, GCONF_KEY_BLINK, NULL));
-#ifdef HAVE_LIBNOTIFY
+#ifdef HAVE_LIBNOTIFY
/* See whether the notification key has already been set */
is_key = gconf_client_get (client, GCONF_KEY_NOTIFICATION, NULL);
if (!is_key)
@@ -150,8 +150,8 @@ org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t)
fprintf(stderr,"notify init error");
notify = notify_notification_new (
- _("New email"),
- msg,
+ _("New email"),
+ msg,
"stock_mail",
NULL);
notify_notification_attach_to_status_icon (notify, status_icon);
@@ -166,13 +166,13 @@ org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t)
g_free (folder);
g_free (msg);
g_object_unref (client);
-#ifdef HAVE_LIBNOTIFY
+#ifdef HAVE_LIBNOTIFY
g_signal_connect (G_OBJECT (status_icon), "activate",
G_CALLBACK (icon_activated), notify);
#else
g_signal_connect (G_OBJECT (status_icon), "activate",
G_CALLBACK (icon_activated), NULL);
-#endif
+#endif
g_static_mutex_unlock (&mlock);
}
@@ -186,7 +186,7 @@ e_plugin_lib_enable (EPluginLib *ep, int enable)
enabled = TRUE;
else
enabled = FALSE;
-
+
return 0;
}
diff --git a/plugins/mail-remote/client.c b/plugins/mail-remote/client.c
index 5740d526c6..2c633c9d1d 100644
--- a/plugins/mail-remote/client.c
+++ b/plugins/mail-remote/client.c
@@ -219,7 +219,7 @@ add_message(Evolution_Mail_Folder folder, const char *msg)
mis.flagMask = CAMEL_MESSAGE_SEEN;
mem = (BonoboObject *)evolution_mail_messagestream_new_buffer(msg, strlen(msg));
-
+
printf("attempt send mail to store\n");
Evolution_Mail_Folder_appendMessage(folder, &mis, bonobo_object_corba_objref(mem), &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
@@ -260,9 +260,9 @@ static int domain(void *data)
Evolution_Mail_Properties *props;
#endif
Evolution_Mail_Store store = stores->_buffer[i].store;
-
+
printf("store %p '%s' uid '%s'\n", store, stores->_buffer[i].name, stores->_buffer[i].uid);
-
+
#if 0
Evolution_Mail_Store_getProperties(store, &names, &props, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
@@ -287,12 +287,12 @@ static int domain(void *data)
{
char *msg = "To: notzed@novell.com\r\n"
"Subject: This is a test from auto-send\r\n"
- "\r\n"
+ "\r\n"
"Blah blah, test message!\r\n";
BonoboObject *mem;
mem = (BonoboObject *)evolution_mail_messagestream_new_buffer(msg, strlen(msg));
-
+
printf("attempt send mail to store\n");
Evolution_Mail_Store_sendMessage(store, bonobo_object_corba_objref(mem), &ev);
if (ev._major != CORBA_NO_EXCEPTION)
@@ -313,7 +313,7 @@ static int domain(void *data)
if (!strcmp(folders->_buffer[f].full_name, "Private")) {
const char *msg = "To: notzed@novell.com\r\n"
"Subject: This is a test append from client\r\n"
- "\r\n"
+ "\r\n"
"Blah blah, test appended message!\r\n";
list_folder(folders->_buffer[f].folder);
diff --git a/plugins/mail-remote/em-message-stream.c b/plugins/mail-remote/em-message-stream.c
index dc8ff9653e..4506cde6bb 100644
--- a/plugins/mail-remote/em-message-stream.c
+++ b/plugins/mail-remote/em-message-stream.c
@@ -112,7 +112,7 @@ CamelType
em_message_stream_get_type (void)
{
static CamelType type = CAMEL_INVALID_TYPE;
-
+
if (type == CAMEL_INVALID_TYPE) {
type = camel_type_register (CAMEL_STREAM_TYPE,
"EMMessageStream",
@@ -123,7 +123,7 @@ em_message_stream_get_type (void)
(CamelObjectInitFunc) em_message_stream_init,
(CamelObjectFinalizeFunc) em_message_stream_finalize);
}
-
+
return type;
}
diff --git a/plugins/mail-remote/evolution-mail-folder.c b/plugins/mail-remote/evolution-mail-folder.c
index b1be464121..55adac81eb 100644
--- a/plugins/mail-remote/evolution-mail-folder.c
+++ b/plugins/mail-remote/evolution-mail-folder.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
+/*
* Copyright (C) 2005 Novell, Inc.
*
* Authors: Michael Zucchi <notzed@novell.com>
@@ -216,7 +216,7 @@ impl_getMessage(PortableServer_Servant _servant, const CORBA_char * uid, CORBA_E
return out;
}
-static void
+static void
impl_appendMessage(PortableServer_Servant _servant, const Evolution_Mail_MessageInfoSet*mi, const Evolution_Mail_MessageStream message, CORBA_Environment *ev)
{
EvolutionMailFolder *emf = (EvolutionMailFolder *)bonobo_object_from_servant(_servant);
diff --git a/plugins/mail-remote/evolution-mail-folderlistener.c b/plugins/mail-remote/evolution-mail-folderlistener.c
index f2a0d83f16..e9fa86dd4f 100644
--- a/plugins/mail-remote/evolution-mail-folderlistener.c
+++ b/plugins/mail-remote/evolution-mail-folderlistener.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
+/*
* Copyright (C) 2005 Novell, Inc.
*
* This program is free software; you can redistribute it and/or
diff --git a/plugins/mail-remote/evolution-mail-messageiterator.c b/plugins/mail-remote/evolution-mail-messageiterator.c
index 6f86ff97f0..bb254100d1 100644
--- a/plugins/mail-remote/evolution-mail-messageiterator.c
+++ b/plugins/mail-remote/evolution-mail-messageiterator.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
+/*
* Copyright (C) 2005 Novell, Inc.
*
* Authors: Michael Zucchi <notzed@novell.com>
diff --git a/plugins/mail-remote/evolution-mail-messagestream.c b/plugins/mail-remote/evolution-mail-messagestream.c
index a1eeed4979..7a7ce9b192 100644
--- a/plugins/mail-remote/evolution-mail-messagestream.c
+++ b/plugins/mail-remote/evolution-mail-messagestream.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
+/*
* Copyright (C) 2005 Novell, Inc.
*
* Authors: Michael Zucchi <notzed@novell.com>
diff --git a/plugins/mail-remote/evolution-mail-session.c b/plugins/mail-remote/evolution-mail-session.c
index d499775c7b..cf9ad7b8f2 100644
--- a/plugins/mail-remote/evolution-mail-session.c
+++ b/plugins/mail-remote/evolution-mail-session.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
+/*
* Copyright (C) 2005 Novell, Inc.
*
* This program is free software; you can redistribute it and/or
diff --git a/plugins/mail-remote/evolution-mail-sessionlistener.c b/plugins/mail-remote/evolution-mail-sessionlistener.c
index e0efbe2ea5..3c84092bf0 100644
--- a/plugins/mail-remote/evolution-mail-sessionlistener.c
+++ b/plugins/mail-remote/evolution-mail-sessionlistener.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
+/*
* Copyright (C) 2005 Novell, Inc.
*
* This program is free software; you can redistribute it and/or
diff --git a/plugins/mail-remote/evolution-mail-store.c b/plugins/mail-remote/evolution-mail-store.c
index ac81d84345..2286441128 100644
--- a/plugins/mail-remote/evolution-mail-store.c
+++ b/plugins/mail-remote/evolution-mail-store.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
+/*
* Copyright (C) 2005 Novell, Inc.
*
* Authors: Michael Zucchi <notzed@novell.com>
diff --git a/plugins/mail-remote/evolution-mail-storelistener.c b/plugins/mail-remote/evolution-mail-storelistener.c
index 1481e90554..ef7a83fdcf 100644
--- a/plugins/mail-remote/evolution-mail-storelistener.c
+++ b/plugins/mail-remote/evolution-mail-storelistener.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
+/*
* Copyright (C) 2005 Novell, Inc.
*
* This program is free software; you can redistribute it and/or
diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c
index 6d4f0c4735..2d1968073d 100644
--- a/plugins/mail-to-task/mail-to-task.c
+++ b/plugins/mail-to-task/mail-to-task.c
@@ -84,11 +84,11 @@ set_attendees (ECalComponent *comp, CamelMimeMessage *message)
char *temp;
ca = g_new0 (ECalComponentAttendee, 1);
-
+
temp = g_strconcat ("mailto:", addr, NULL);
ca->value = temp;
to_free = g_slist_prepend (to_free, temp);
-
+
ca->cn = name;
/* FIXME: missing many fields */
@@ -103,7 +103,7 @@ set_attendees (ECalComponent *comp, CamelMimeMessage *message)
g_free (l->data);
g_slist_foreach (to_free, (GFunc) g_free, NULL);
-
+
g_slist_free (to_free);
g_slist_free (attendees);
}
@@ -151,14 +151,14 @@ set_description (ECalComponent *comp, CamelMimeMessage *message)
/* convert to UTF-8 string */
if (str && content->mime_type->params && content->mime_type->params->value)
{
- convert_str = g_convert (str, strlen (str),
+ convert_str = g_convert (str, strlen (str),
"UTF-8", content->mime_type->params->value,
&bytes_read, &bytes_written, NULL);
}
if (convert_str)
text.value = convert_str;
- else
+ else
text.value = str;
text.altrep = NULL;
sl.next = NULL;
@@ -193,7 +193,7 @@ set_organizer (ECalComponent *comp, CamelMimeMessage *message)
organizer.value = temp;
organizer.cn = name;
e_cal_component_set_organizer (comp, &organizer);
-
+
g_free (temp);
}
@@ -244,7 +244,7 @@ set_attachments (ECal *client, ECalComponent *comp, CamelMimeMessage *message)
list = g_slist_append (list, g_strdup (uri));
g_free (uri);
}
-
+
g_free (tmp);
g_free (filename);
g_free (path);
@@ -255,7 +255,7 @@ set_attachments (ECal *client, ECalComponent *comp, CamelMimeMessage *message)
e_cal_component_set_attachment_list (comp, list);
}
-static gboolean
+static gboolean
do_mail_to_task (AsyncData *data)
{
ECal *client = data->client;
@@ -265,7 +265,7 @@ do_mail_to_task (AsyncData *data)
/* open the task client */
if (e_cal_open (client, FALSE, NULL)) {
int i;
-
+
for (i = 0; i < (uids ? uids->len : 0); i++) {
CamelMimeMessage *message;
ECalComponent *comp;
@@ -307,18 +307,18 @@ do_mail_to_task (AsyncData *data)
set_attachments (client, comp, message);
icalcomp = e_cal_component_get_icalcomponent (comp);
-
+
icalprop = icalproperty_new_x ("1");
icalproperty_set_x_name (icalprop, "X-EVOLUTION-MOVE-CALENDAR");
icalcomponent_add_property (icalcomp, icalprop);
-
+
/* save the task to the selected source */
e_cal_create_object (client, icalcomp, NULL, NULL);
g_object_unref (comp);
}
}
-
+
/* free memory */
g_object_unref (data->client);
g_ptr_array_free (data->uids, TRUE);
@@ -333,7 +333,7 @@ void org_gnome_mail_to_task (void *ep, EMPopupTargetSelect *t);
void org_gnome_mail_to_task_menu (EPlugin *ep, EMMenuTargetSelect *target);
static void
-copy_uids (char *uid, GPtrArray *uid_array)
+copy_uids (char *uid, GPtrArray *uid_array)
{
g_ptr_array_add (uid_array, g_strdup (uid));
}
@@ -391,7 +391,7 @@ convert_to_task (GPtrArray *uid_array, struct _CamelFolder *folder, EMFolderView
GtkWidget *dialog;
GConfClient *conf_client;
ESourceList *source_list;
-
+
/* ask the user which tasks list to save to */
conf_client = gconf_client_get_default ();
source_list = e_source_list_new_for_gconf (conf_client, "/apps/evolution/tasks/sources");
@@ -408,11 +408,11 @@ convert_to_task (GPtrArray *uid_array, struct _CamelFolder *folder, EMFolderView
AsyncData *data = NULL;
GThread *thread = NULL;
GError *error = NULL;
-
+
client = auth_new_cal_from_source (source, E_CAL_SOURCE_TYPE_TODO);
if (!client) {
char *uri = e_source_get_uri (source);
-
+
g_warning ("Could not create the client: %s \n", uri);
g_free (uri);
@@ -421,11 +421,11 @@ convert_to_task (GPtrArray *uid_array, struct _CamelFolder *folder, EMFolderView
gtk_widget_destroy (dialog);
return;
}
-
+
/* Fill the elements in AsynData */
data = g_new0 (AsyncData, 1);
data->client = client;
- data->folder = folder;
+ data->folder = folder;
data->uids = uid_array;
if (uid_array->len == 1)
@@ -445,7 +445,7 @@ convert_to_task (GPtrArray *uid_array, struct _CamelFolder *folder, EMFolderView
g_object_unref (conf_client);
g_object_unref (source_list);
gtk_widget_destroy (dialog);
-
+
}
void
@@ -454,7 +454,7 @@ org_gnome_mail_to_task (void *ep, EMPopupTargetSelect *t)
GPtrArray *uid_array = NULL;
if (t->uids->len > 0) {
- /* FIXME Some how in the thread function the values inside t->uids gets freed
+ /* FIXME Some how in the thread function the values inside t->uids gets freed
and are corrupted which needs to be fixed, this is sought of work around fix for
the gui inresponsiveness */
uid_array = g_ptr_array_new ();
@@ -471,7 +471,7 @@ void org_gnome_mail_to_task_menu (EPlugin *ep, EMMenuTargetSelect *t)
GPtrArray *uid_array = NULL;
if (t->uids->len > 0) {
- /* FIXME Some how in the thread function the values inside t->uids gets freed
+ /* FIXME Some how in the thread function the values inside t->uids gets freed
and are corrupted which needs to be fixed, this is sought of work around fix for
the gui inresponsiveness */
uid_array = g_ptr_array_new ();
diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c
index f8ae698a80..f872a0e983 100644
--- a/plugins/mailing-list-actions/mailing-list-actions.c
+++ b/plugins/mailing-list-actions/mailing-list-actions.c
@@ -91,7 +91,7 @@ void emla_list_action (EPlugin *item, EMMenuTargetSelect* sel, EmlaAction action
mail_get_message (sel->folder, (const char*) g_ptr_array_index (sel->uids, 0),
emla_list_action_do, data, mail_thread_new);
}
-
+
void emla_list_action_do (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *data)
{
emla_action_data *action_data = (emla_action_data *) data;
@@ -127,7 +127,7 @@ void emla_list_action_do (CamelFolder *folder, const char *uid, CamelMimeMessage
goto exit;
}
}
-
+
/* parse the action value */
while (*headerpos) {
/* skip whitespace */
@@ -136,7 +136,7 @@ void emla_list_action_do (CamelFolder *folder, const char *uid, CamelMimeMessage
e_error_run (NULL, "org.gnome.mailing-list-actions:malformed-header", emla_action_headers[t].header, header, NULL);
goto exit;
}
-
+
/* get URL portion */
url = g_strndup(headerpos, end - headerpos);
@@ -163,22 +163,22 @@ void emla_list_action_do (CamelFolder *folder, const char *uid, CamelMimeMessage
gnome_url_show (url, &err);
if (!err)
goto exit;
- g_error_free (err);
+ g_error_free (err);
}
g_free (url);
url = NULL;
headerpos = end++;
-
+
/* ignore everything 'till next comma */
headerpos = strchr (headerpos, ',');
if (!headerpos)
break;
headerpos++;
}
-
+
/* if we got here, there's no valid action */
e_error_run (NULL, "org.gnome.mailing-list-actions:no-action", header, NULL);
-
+
exit:
free (action_data->uri);
free (action_data);
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index 9d3a67bc5a..e766d45df5 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -34,16 +34,16 @@
#include "e-util/e-error.h"
void org_gnome_mark_all_read (EPlugin *ep, EMPopupTargetFolder *target);
-static void mar_got_folder (char *uri, CamelFolder *folder, void *data);
+static void mar_got_folder (char *uri, CamelFolder *folder, void *data);
static void mar_all_sub_folders (CamelStore *store, CamelFolderInfo *fi, CamelException *ex);
-void
+void
org_gnome_mark_all_read (EPlugin *ep, EMPopupTargetFolder *t)
{
if (t->uri == NULL) {
return;
}
-
+
mail_get_folder(t->uri, 0, mar_got_folder, NULL, mail_thread_new);
}
@@ -52,17 +52,17 @@ mark_all_as_read (CamelFolder *folder)
{
GPtrArray *uids;
int i;
-
- uids = camel_folder_get_uids (folder);
+
+ uids = camel_folder_get_uids (folder);
camel_folder_freeze(folder);
for (i=0;i<uids->len;i++)
camel_folder_set_message_flags(folder, uids->pdata[i], CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
camel_folder_thaw(folder);
- camel_folder_free_uids (folder, uids);
+ camel_folder_free_uids (folder, uids);
}
-static void
-mar_got_folder (char *uri, CamelFolder *folder, void *data)
+static void
+mar_got_folder (char *uri, CamelFolder *folder, void *data)
{
CamelFolderInfo *info;
CamelStore *store;
@@ -77,26 +77,26 @@ mar_got_folder (char *uri, CamelFolder *folder, void *data)
return;
store = folder->parent_store;
- info = camel_store_get_folder_info (store, folder->full_name, flags, &ex);
+ info = camel_store_get_folder_info (store, folder->full_name, flags, &ex);
- if (camel_exception_is_set (&ex)) {
+ if (camel_exception_is_set (&ex)) {
camel_exception_clear (&ex);
return;
}
-
+
if (info && (info->child || info->next)) {
response = e_error_run (NULL, "mail:ask-mark-read", NULL);
} else {
mark_all_as_read (folder);
return;
}
-
+
if (response == GTK_RESPONSE_NO) {
mark_all_as_read (folder);
} else if (response == GTK_RESPONSE_YES){
- mar_all_sub_folders (store, info, &ex);
+ mar_all_sub_folders (store, info, &ex);
}
-
+
}
static void
@@ -104,20 +104,20 @@ mar_all_sub_folders (CamelStore *store, CamelFolderInfo *fi, CamelException *ex)
{
while (fi) {
CamelFolder *folder;
-
+
if (fi->child) {
mar_all_sub_folders (store, fi->child, ex);
if (camel_exception_is_set (ex))
return;
}
-
+
if (!(folder = camel_store_get_folder (store, fi->full_name, 0, ex)))
return;
-
+
if (!CAMEL_IS_VEE_FOLDER (folder)) {
- mark_all_as_read (folder);
+ mark_all_as_read (folder);
}
-
+
fi = fi->next;
}
}
diff --git a/plugins/mark-calendar-offline/mark-calendar-offline.c b/plugins/mark-calendar-offline/mark-calendar-offline.c
index dea9baf28a..fee8595883 100644
--- a/plugins/mark-calendar-offline/mark-calendar-offline.c
+++ b/plugins/mark-calendar-offline/mark-calendar-offline.c
@@ -20,7 +20,7 @@
*/
/* This is prototype code only, this may, or may not, use undocumented
- * unstable or private internal function calls.
+ * unstable or private internal function calls.
* This code has been derived from the source of the sample eplugin
* select_one_source.
*/
@@ -38,7 +38,7 @@ void
org_gnome_mark_calendar_no_offline (EPlugin *ep, ECalPopupTargetSource *target)
{
ESource *source;
-
+
source = e_source_selector_peek_primary_selection (target->selector);
e_source_set_property (source, "offline", "0");
}
@@ -47,7 +47,7 @@ void
org_gnome_mark_calendar_offline (EPlugin *ep, ECalPopupTargetSource *target)
{
ESource *source;
-
+
source = e_source_selector_peek_primary_selection (target->selector);
e_source_set_property (source, "offline", "1");
}
diff --git a/plugins/mono/mono-plugin.c b/plugins/mono/mono-plugin.c
index d945ae5508..7a89046f15 100644
--- a/plugins/mono/mono-plugin.c
+++ b/plugins/mono/mono-plugin.c
@@ -184,7 +184,7 @@ void *
org_gnome_evolution_mono_get_type(void *a, void *b)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(EPluginMonoClass), NULL, NULL, (GClassInitFunc) epm_class_init, NULL, NULL,
@@ -196,6 +196,6 @@ org_gnome_evolution_mono_get_type(void *a, void *b)
domain = mono_jit_init("Evolution");
mono_thread_attach(domain);
}
-
+
return GUINT_TO_POINTER(type);
}
diff --git a/plugins/new-mail-notify/new-mail-notify.c b/plugins/new-mail-notify/new-mail-notify.c
index 9960e40b11..139838b64a 100644
--- a/plugins/new-mail-notify/new-mail-notify.c
+++ b/plugins/new-mail-notify/new-mail-notify.c
@@ -49,18 +49,18 @@ static void
send_dbus_message (const char *name, const char *data, guint new)
{
DBusMessage *message;
-
+
/* Create a new message on the DBUS_INTERFACE */
if (!(message = dbus_message_new_signal (DBUS_PATH, DBUS_INTERFACE, name)))
return;
-
+
/* Appends the data as an argument to the message */
dbus_message_append_args (message,
#if DBUS_VERSION >= 310
DBUS_TYPE_STRING, &data,
#else
DBUS_TYPE_STRING, data,
-#endif
+#endif
DBUS_TYPE_INVALID);
if (new) {
@@ -70,14 +70,14 @@ send_dbus_message (const char *name, const char *data, guint new)
DBUS_TYPE_STRING, &display_name, DBUS_TYPE_UINT32, &new,
#else
DBUS_TYPE_STRING, display_name, DBUS_TYPE_UINT32, new,
-#endif
+#endif
DBUS_TYPE_INVALID);
-
+
}
/* Sends the message */
dbus_connection_send (bus, message, NULL);
-
+
/* Frees the message */
dbus_message_unref (message);
}
@@ -102,9 +102,9 @@ reinit_dbus (gpointer user_data)
{
if (!enabled || init_dbus ())
return FALSE;
-
+
/* keep trying to re-establish dbus connection */
-
+
return TRUE;
}
@@ -115,12 +115,12 @@ filter_function (DBusConnection *connection, DBusMessage *message, void *user_da
strcmp (dbus_message_get_path (message), DBUS_PATH_LOCAL) == 0) {
dbus_connection_unref (bus);
bus = NULL;
-
+
g_timeout_add (3000, reinit_dbus, NULL);
-
+
return DBUS_HANDLER_RESULT_HANDLED;
}
-
+
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
@@ -128,22 +128,22 @@ static gboolean
init_dbus (void)
{
DBusError error;
-
+
if (bus != NULL)
return TRUE;
-
+
dbus_error_init (&error);
if (!(bus = dbus_bus_get (DBUS_BUS_SESSION, &error))) {
g_warning ("could not get system bus: %s\n", error.message);
dbus_error_free (&error);
return FALSE;
}
-
+
dbus_connection_setup_with_g_main (bus, NULL);
dbus_connection_set_exit_on_disconnect (bus, FALSE);
-
+
dbus_connection_add_filter (bus, filter_function, NULL, NULL);
-
+
return TRUE;
}
@@ -154,17 +154,17 @@ e_plugin_lib_enable (EPluginLib *ep, int enable)
if (enable) {
if (!init_dbus ())
return -1;
-
+
enabled = TRUE;
} else {
if (bus != NULL) {
dbus_connection_unref (bus);
bus = NULL;
}
-
+
enabled = FALSE;
}
-
+
return 0;
}
diff --git a/plugins/plugin-manager/plugin-manager.c b/plugins/plugin-manager/plugin-manager.c
index 86b94c290d..4352254bf7 100644
--- a/plugins/plugin-manager/plugin-manager.c
+++ b/plugins/plugin-manager/plugin-manager.c
@@ -91,7 +91,7 @@ eppm_show_plugin(Manager *m, EPlugin *ep)
string = g_strdup_printf("<span size=\"x-large\">%s</span>", ep->name);
gtk_label_set_markup(GTK_LABEL(m->items[LABEL_NAME]), string);
g_free(string);
-
+
if (ep->authors) {
GSList *l = ep->authors;
GString *out = g_string_new("");
@@ -154,7 +154,7 @@ eppm_enable_toggled(GtkCellRendererToggle *renderer, const char *path_string, Ma
EPlugin *plugin;
path = gtk_tree_path_new_from_string(path_string);
-
+
if (gtk_tree_model_get_iter(m->model, &iter, path)) {
gtk_tree_model_get(m->model, &iter, COL_PLUGIN_DATA, &plugin, -1);
e_plugin_enable(plugin, !plugin->enabled);
@@ -165,7 +165,7 @@ eppm_enable_toggled(GtkCellRendererToggle *renderer, const char *path_string, Ma
COL_PLUGIN_ENABLED, plugin->enabled,
-1);
}
-
+
gtk_tree_path_free(path);
}
@@ -231,8 +231,8 @@ org_gnome_plugin_manager_manage(void *ep, ESMenuTargetShell *t)
m->dialog = (GtkDialog *)gtk_dialog_new_with_buttons(_("Plugin Manager"),
(GtkWindow *)gtk_widget_get_toplevel(t->target.widget),
GTK_DIALOG_DESTROY_WITH_PARENT,
- _("Con_figure"), RESPONSE_CONFIGURE,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+ _("Con_figure"), RESPONSE_CONFIGURE,
+ GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
NULL);
gtk_window_set_default_size((GtkWindow *)m->dialog, 640, 400);
@@ -377,7 +377,7 @@ e_plugin_lib_enable(EPluginLib *ep, int enable)
return 0;
}
-int
+int
e_plugin_lib_configure(EPluginLib *ep)
{
d(printf ("\n\a e_plugin_lib_configure in plugin-manager\n\a"));
diff --git a/plugins/prefer-plain/prefer-plain.c b/plugins/prefer-plain/prefer-plain.c
index ff96e91da1..4846486053 100644
--- a/plugins/prefer-plain/prefer-plain.c
+++ b/plugins/prefer-plain/prefer-plain.c
@@ -105,8 +105,8 @@ org_gnome_prefer_plain_multipart_alternative(void *ep, EMFormatHookTarget *t)
em_format_format_source(t->format, t->stream, t->part);
return;
}
-
- nparts = camel_multipart_get_number(mp);
+
+ nparts = camel_multipart_get_number(mp);
for (i=0; i<nparts; i++) {
part = camel_multipart_get_part(mp, i);
if (part && camel_content_type_is(camel_mime_part_get_content_type(part), "text", "plain")) {
diff --git a/plugins/print-message/print-message.c b/plugins/print-message/print-message.c
index 71d875a070..e8a7c84be7 100644
--- a/plugins/print-message/print-message.c
+++ b/plugins/print-message/print-message.c
@@ -3,16 +3,16 @@
* Authors: Vivek Jain <jvivek@novell.com>
*
* Copyright 2004 Novell, Inc. (www.novell.com)
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -40,7 +40,7 @@ void org_gnome_compose_print_message (EPlugin *ep, EMMenuTargetWidget *t);
void org_gnome_print_message (EPlugin *ep, EMMenuTargetWidget *t);
void org_gnome_print_preview (EPlugin *ep, EMMenuTargetWidget *t);
-void
+void
org_gnome_print_message (EPlugin *ep, EMMenuTargetWidget *t)
{
EMsgComposer *composer = (EMsgComposer *)t->target.widget;
diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c
index 5d11e7c86f..e2f87bfce3 100644
--- a/plugins/publish-calendar/publish-calendar.c
+++ b/plugins/publish-calendar/publish-calendar.c
@@ -50,7 +50,7 @@ static void update_timestamp (EPublishUri *uri);
static void publish (EPublishUri *uri);
static void
-publish_uri_async (EPublishUri *uri)
+publish_uri_async (EPublishUri *uri)
{
GThread *thread = NULL;
GError *error = NULL;
@@ -83,13 +83,13 @@ publish (EPublishUri *uri)
password = e_passwords_get_password ("Calendar", uri->location);
username = gnome_vfs_uri_get_user_name (vfs_uri);
- req_pass = ((username && *username) && !(uri->service_type == TYPE_ANON_FTP &&
+ req_pass = ((username && *username) && !(uri->service_type == TYPE_ANON_FTP &&
!strcmp (username, "anonymous"))) ? TRUE:FALSE;
if (!password && req_pass) {
gboolean remember;
char *prompt = g_strdup_printf (_("Enter the password for `%s'"), uri->location);
-
+
password = e_passwords_ask_password (_("Enter password"), "", uri->location, prompt,
E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET|E_PASSWORDS_ONLINE,
&remember,
@@ -500,7 +500,7 @@ publish_calendar_locations (EPlugin *epl, EConfigHookItemFactoryData *data)
ui->treeview = glade_xml_get_widget (xml, "url list");
if (store == NULL)
store = gtk_list_store_new (URL_LIST_N_COLUMNS, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_POINTER);
- else
+ else
gtk_list_store_clear (store);
gtk_tree_view_set_model (GTK_TREE_VIEW (ui->treeview), GTK_TREE_MODEL (store));
@@ -556,7 +556,7 @@ publish_calendar_locations (EPlugin *epl, EConfigHookItemFactoryData *data)
return toplevel;
}
-static gpointer
+static gpointer
publish_urls (gpointer data)
{
GSList *l;
@@ -574,7 +574,7 @@ action_publish (EPlugin *ep, ECalMenuTargetSelect *t)
{
GThread *thread = NULL;
GError *error = NULL;
-
+
thread = g_thread_create ((GThreadFunc) publish_urls, NULL, FALSE, &error);
if (!thread) {
g_warning (G_STRLOC ": %s", error->message);
diff --git a/plugins/publish-calendar/publish-format-fb.c b/plugins/publish-calendar/publish-format-fb.c
index c6b14cf030..7a4eae3b65 100644
--- a/plugins/publish-calendar/publish-format-fb.c
+++ b/plugins/publish-calendar/publish-format-fb.c
@@ -62,9 +62,9 @@ write_calendar (gchar *uid, ESourceList *source_list, GnomeVFSHandle *handle)
g_error_free (error);
return FALSE;
}
-
+
if (e_cal_get_cal_address (client, &email, &error)) {
- if (email && *email)
+ if (email && *email)
users = g_list_append (users, email);
}
@@ -93,14 +93,14 @@ write_calendar (gchar *uid, ESourceList *source_list, GnomeVFSHandle *handle)
/* FIXME: EError */
g_object_unref (client);
g_error_free (error);
- if (users)
+ if (users)
g_list_free (users);
g_free (email);
-
+
return FALSE;
}
-
- if (users)
+
+ if (users)
g_list_free (users);
g_free (email);
diff --git a/plugins/publish-calendar/publish-format-ical.c b/plugins/publish-calendar/publish-format-ical.c
index 1208cdbd42..5f620accc9 100644
--- a/plugins/publish-calendar/publish-format-ical.c
+++ b/plugins/publish-calendar/publish-format-ical.c
@@ -33,7 +33,7 @@ typedef struct {
GHashTable *zones;
ECal *ecal;
} CompTzData;
-
+
static void
insert_tz_comps (icalparameter *param, void *cb_data)
{
@@ -44,16 +44,16 @@ insert_tz_comps (icalparameter *param, void *cb_data)
GError *error = NULL;
tzid = icalparameter_get_tzid (param);
-
+
if (g_hash_table_lookup (tdata->zones, tzid))
return;
-
+
if (!e_cal_get_timezone (tdata->ecal, tzid, &zone, &error)) {
g_warning ("Could not get the timezone information for %s : %s \n", tzid, error->message);
g_error_free (error);
return;
}
-
+
tzcomp = icalcomponent_new_clone (icaltimezone_get_component (zone));
g_hash_table_insert (tdata->zones, (gpointer) tzid, (gpointer) tzcomp);
}
@@ -96,7 +96,7 @@ write_calendar (gchar *uid, ESourceList *source_list, GnomeVFSHandle *handle)
GnomeVFSFileSize bytes_written = 0;
GnomeVFSResult result;
CompTzData tdata;
-
+
tdata.zones = g_hash_table_new (g_str_hash, g_str_equal);
tdata.ecal = client;
diff --git a/plugins/publish-calendar/publish-location.c b/plugins/publish-calendar/publish-location.c
index 372b484e3f..e4414a8109 100644
--- a/plugins/publish-calendar/publish-location.c
+++ b/plugins/publish-calendar/publish-location.c
@@ -60,12 +60,12 @@ migrateURI (const gchar *xml, xmlDocPtr doc)
username = xmlGetProp (root, (const unsigned char *)"username");
vfs_uri = gnome_vfs_uri_new ((char *)location);
-
+
if (!vfs_uri) {
g_warning ("Could not form the uri for %s \n", location);
- goto cleanup;
+ goto cleanup;
}
-
+
gnome_vfs_uri_set_user_name ((GnomeVFSURI *)vfs_uri, (char *)username);
temp = gnome_vfs_uri_to_string (vfs_uri, GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD | GNOME_VFS_URI_HIDE_PASSWORD);
uri->location = g_strdup_printf ("dav://%s", temp);
@@ -132,7 +132,7 @@ e_publish_uri_from_xml (const gchar *xml)
if ((username = xmlGetProp (root, (const unsigned char *)"username"))) {
xmlFree (username);
return migrateURI (xml, doc);
-
+
}
uri = g_new0 (EPublishUri, 1);
diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c
index 4d6268664d..627c64fa87 100644
--- a/plugins/publish-calendar/url-editor-dialog.c
+++ b/plugins/publish-calendar/url-editor-dialog.c
@@ -287,10 +287,10 @@ set_from_uri (UrlEditorDialog *dialog)
else
uri->service_type = TYPE_URI;
- if (euri->user)
+ if (euri->user)
gtk_entry_set_text (GTK_ENTRY (dialog->username_entry), euri->user);
- if (euri->host)
+ if (euri->host)
gtk_entry_set_text (GTK_ENTRY (dialog->server_entry), euri->host);
if (euri->port) {
diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c
index bfe1fbbd8d..a39f5cffdf 100644
--- a/plugins/sa-junk-plugin/em-junk-filter.c
+++ b/plugins/sa-junk-plugin/em-junk-filter.c
@@ -116,11 +116,11 @@ pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err,
CamelStream *stream;
char *program;
pid_t pid;
-
+
if (camel_debug_start ("junk")) {
int i;
-
+
printf ("pipe_to_sa ");
for (i = 0; argv[i]; i++)
printf ("%s ", argv[i]);
@@ -134,14 +134,14 @@ pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err,
return rv_err;
}
g_free (program);
-
+
if (pipe (fds) == -1) {
errnosav = errno;
d(printf ("failed to create a pipe (for use with spamassassin: %s\n", strerror (errno)));
errno = errnosav;
return rv_err;
}
-
+
if (output_buffer && pipe (out_fds) == -1) {
errnosav = errno;
d(printf ("failed to create a pipe (for use with spamassassin: %s\n", strerror (errno)));
@@ -150,13 +150,13 @@ pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err,
errno = errnosav;
return rv_err;
}
-
+
if (!(pid = fork ())) {
/* child process */
int maxfd, fd, nullfd;
-
+
nullfd = open ("/dev/null", O_WRONLY);
-
+
if (dup2 (fds[0], STDIN_FILENO) == -1 ||
dup2 (nullfd, STDERR_FILENO) == -1 ||
(output_buffer == NULL && dup2 (nullfd, STDOUT_FILENO) == -1) ||
@@ -167,11 +167,11 @@ pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err,
close (out_fds [1]);
setsid ();
-
+
maxfd = sysconf (_SC_OPEN_MAX);
for (fd = 3; fd < maxfd; fd++)
fcntl (fd, F_SETFD, FD_CLOEXEC);
-
+
execvp (argv[0], argv);
_exit (rv_err & 0377);
} else if (pid < 0) {
@@ -185,15 +185,15 @@ pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err,
errno = errnosav;
return rv_err;
}
-
+
/* parent process */
close (fds[0]);
if (output_buffer)
close (out_fds [1]);
-
+
if (msg) {
stream = camel_stream_fs_new_with_fd (fds[1]);
-
+
camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (msg), stream);
camel_stream_flush (stream);
camel_stream_close (stream);
@@ -207,21 +207,21 @@ pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err,
CamelStreamMem *memstream;
stream = camel_stream_fs_new_with_fd (out_fds[0]);
-
+
memstream = (CamelStreamMem *) camel_stream_mem_new ();
camel_stream_mem_set_byte_array (memstream, output_buffer);
-
+
camel_stream_write_to_stream (stream, (CamelStream *) memstream);
camel_object_unref (stream);
g_byte_array_append (output_buffer, (unsigned char *)"", 1);
d(printf ("child process output: %s len: %d\n", output_buffer->data, output_buffer->len));
}
-
+
if (wait_for_termination) {
d(printf ("wait for child %d termination\n", pid));
result = waitpid (pid, &status, 0);
-
+
d(printf ("child %d terminated with result %d status %d exited %d exitstatus %d\n", pid, result, status, WIFEXITED (status), WEXITSTATUS (status)));
if (result == -1 && errno == EINTR) {
@@ -236,7 +236,7 @@ pipe_to_sa_full (CamelMimeMessage *msg, const char *in, char **argv, int rv_err,
result = waitpid (pid, &status, WNOHANG);
}
}
-
+
if (result != -1 && WIFEXITED (status))
return WEXITSTATUS (status);
else
@@ -270,17 +270,17 @@ em_junk_sa_test_spamd_running (char *binary, gboolean system)
pthread_mutex_lock (&em_junk_sa_preferred_socket_path_lock);
d(fprintf (stderr, "test if spamd is running (system %d) or using socket path %s\n", system, em_junk_sa_get_socket_path ()));
-
+
argv[i++] = binary;
argv[i++] = "-x";
-
+
if (!system) {
argv[i++] = "-U";
argv[i++] = em_junk_sa_get_socket_path ();
}
-
+
argv[i] = NULL;
-
+
rv = pipe_to_sa (NULL, "From test@127.0.0.1", argv) == 0;
d(fprintf (stderr, "result: %d (%s)\n", rv, rv ? "success" : "failed"));
@@ -298,7 +298,7 @@ em_junk_sa_test_spamassassin (void)
"--version",
NULL,
};
-
+
if (pipe_to_sa (NULL, NULL, argv) != 0)
em_junk_sa_available = FALSE;
else
@@ -324,7 +324,7 @@ em_junk_sa_run_spamd (char *binary)
argv[i++] = binary;
argv[i++] = "--socketpath";
argv[i++] = em_junk_sa_get_socket_path ();
-
+
if (em_junk_sa_local_only)
argv[i++] = "--local";
@@ -336,7 +336,7 @@ em_junk_sa_run_spamd (char *binary)
argv[i] = NULL;
d(fprintf (stderr, "trying to run %s with socket path %s\n", binary, em_junk_sa_get_socket_path ()));
-
+
if (!pipe_to_sa_full (NULL, NULL, argv, -1, 0, NULL)) {
struct timespec time_req;
struct stat stat_buf;
@@ -411,7 +411,7 @@ em_junk_sa_test_spamd (void)
em_junk_sa_spamc_binaries [0] = em_junk_sa_spamc_gconf_binary;
em_junk_sa_spamc_binaries [1] = NULL;
}
-
+
if (em_junk_sa_spamd_gconf_binary) {
em_junk_sa_spamd_binaries [0] = em_junk_sa_spamd_gconf_binary;
em_junk_sa_spamd_binaries [1] = NULL;
@@ -465,7 +465,7 @@ em_junk_sa_test_spamd (void)
em_junk_sa_find_spamc ();
d(fprintf (stderr, "use spamd: %s\n", em_junk_sa_use_spamc ? "yes" : "no"));
-
+
em_junk_sa_spamd_tested = TRUE;
}
@@ -481,7 +481,7 @@ em_junk_sa_is_available (void)
em_junk_sa_test_spamd ();
pthread_mutex_unlock (&em_junk_sa_init_lock);
-
+
return em_junk_sa_available;
}
@@ -548,7 +548,7 @@ em_junk_sa_check_junk(EPlugin *ep, EMJunkHookTarget *target)
CamelMimeMessage *msg = target->m;
d(fprintf (stderr, "em_junk_sa_check_junk\n"));
-
+
if (!em_junk_sa_is_available ())
return FALSE;
@@ -572,7 +572,7 @@ em_junk_sa_check_junk(EPlugin *ep, EMJunkHookTarget *target)
if (em_junk_sa_local_only)
argv [i++] = "--local";
}
-
+
argv[i] = NULL;
rv = pipe_to_sa_full (msg, NULL, argv, 0, 1, out) != 0;
@@ -605,25 +605,25 @@ em_junk_sa_check_junk(EPlugin *ep, EMJunkHookTarget *target)
static guint
get_spamassassin_version ()
-{
+{
GByteArray *out = NULL;
int i;
-
+
char * argv[3] = {
"sa-learn",
"--version",
NULL
};
-
+
if (!em_junk_sa_checked_spamassassin_version){
out = g_byte_array_new ();
-
+
if (pipe_to_sa_full (NULL, NULL, argv, -1, 1, out) != 0){
if(out)
g_byte_array_free (out, TRUE);
return em_junk_sa_spamassassin_version;
}
-
+
if(out->len > 0){
for(i = 0; i < out->len; i++){
if(g_ascii_isdigit (out->data[i])){
@@ -631,14 +631,14 @@ get_spamassassin_version ()
em_junk_sa_checked_spamassassin_version = TRUE;
break;
}
- }
+ }
}
if(out)
g_byte_array_free (out, TRUE);
}
-
+
return em_junk_sa_spamassassin_version;
}
@@ -654,18 +654,18 @@ em_junk_sa_report_junk (EPlugin *ep, EMJunkHookTarget *target)
NULL,
NULL
};
- gchar *sub = NULL;
+ gchar *sub = NULL;
CamelMimeMessage *msg = target->m;
-
+
sub = g_strdup (camel_mime_message_get_subject (msg));
g_print ("\nreport junk?? %s\n", sub);
-
+
d(fprintf (stderr, "em_junk_sa_report_junk\n"));
-
+
if (em_junk_sa_is_available ()) {
if (em_junk_sa_local_only)
argv[4] = "--local";
-
+
pthread_mutex_lock (&em_junk_sa_report_lock);
pipe_to_sa (msg, NULL, argv);
pthread_mutex_unlock (&em_junk_sa_report_lock);
@@ -687,11 +687,11 @@ em_junk_sa_report_non_junk (EPlugin *ep, EMJunkHookTarget *target)
CamelMimeMessage *msg = target->m;
d(fprintf (stderr, "em_junk_sa_report_notjunk\n"));
-
+
if (em_junk_sa_is_available ()) {
if (em_junk_sa_local_only)
argv[4] = "--local";
-
+
pthread_mutex_lock (&em_junk_sa_report_lock);
pipe_to_sa (msg, NULL, argv);
pthread_mutex_unlock (&em_junk_sa_report_lock);
@@ -708,13 +708,13 @@ em_junk_sa_commit_reports (EPlugin *ep, EMJunkHookTarget *target)
NULL,
NULL
};
-
+
d(fprintf (stderr, "em_junk_sa_commit_reports\n"));
-
+
if (em_junk_sa_is_available ()) {
if (em_junk_sa_local_only)
argv[2] = "--local";
-
+
pthread_mutex_lock (&em_junk_sa_report_lock);
pipe_to_sa (NULL, NULL, argv);
pthread_mutex_unlock (&em_junk_sa_report_lock);
@@ -734,10 +734,10 @@ em_junk_sa_setting_notify(GConfClient *gconf, guint cnxn_id, GConfEntry *entry,
char *tkey;
g_return_if_fail (gconf_entry_get_key (entry) != NULL);
-
+
if (!(value = gconf_entry_get_value (entry)))
return;
-
+
tkey = strrchr(entry->key, '/');
g_return_if_fail (tkey != NULL);
@@ -847,10 +847,10 @@ org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFact
GtkWidget *check, *vbox, *label;
char *text = g_strdup_printf (" <small>%s</small>", _("This will make Spamassasin more reliable, but slower"));
guint i = ((GtkTable *)data->parent)->nrows;
-
+
if (data->old)
return data->old;
-
+
check = gtk_check_button_new_with_mnemonic (_("I_nclude remote tests"));
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), text);
diff --git a/plugins/save-attachments/save-attachments.c b/plugins/save-attachments/save-attachments.c
index c4558fb1ec..269a9e95c7 100644
--- a/plugins/save-attachments/save-attachments.c
+++ b/plugins/save-attachments/save-attachments.c
@@ -218,8 +218,8 @@ save_part(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, void *d)
/* FIXME: if part == data->msg then we need to save this
* differently, not using the envelope MimePart */
- /*
- * The underlying em_utils_save_part_to_file ain't using gnome-vfs. Therefor
+ /*
+ * The underlying em_utils_save_part_to_file ain't using gnome-vfs. Therefor
* the POSIX access-call should suffice for checking the file existence.
*/
@@ -297,7 +297,7 @@ toggle_changed(GtkWidget *entry, const char *spath, struct _save_data *data)
{
GtkTreePath *path;
GtkTreeIter iter;
-
+
path = gtk_tree_path_new_from_string(spath);
if (gtk_tree_model_get_iter((GtkTreeModel *)data->model, &iter, path)) {
gboolean on;
@@ -305,7 +305,7 @@ toggle_changed(GtkWidget *entry, const char *spath, struct _save_data *data)
gtk_tree_model_get((GtkTreeModel *)data->model, &iter, 0, &on, -1);
gtk_tree_store_set(data->model, &iter, 0, !on, -1);
}
-
+
gtk_tree_path_free (path);
}
@@ -360,7 +360,7 @@ save_got_message(CamelFolder *folder, const char *uid, CamelMimeMessage *msg, vo
g_signal_connect(renderer, "toggled", G_CALLBACK(toggle_changed), data);
gtk_tree_view_insert_column_with_attributes((GtkTreeView *)tree, -1,
- _("Save"), renderer, "active", 0, NULL);
+ _("Save"), renderer, "active", 0, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes((GtkTreeView *)tree, -1,
_("Name"), renderer, "text", 2, NULL);
diff --git a/plugins/save-calendar/csv-format.c b/plugins/save-calendar/csv-format.c
index 8ee52e2641..8deaf05282 100644
--- a/plugins/save-calendar/csv-format.c
+++ b/plugins/save-calendar/csv-format.c
@@ -84,7 +84,7 @@ static GString *
add_list_to_csv (GString *line, GSList *list_in, CsvConfig *config, gint type)
{
- /*
+ /*
* This one will write 'ECalComponentText' and 'const char' GSLists. It will
* put quotes around the complete written value if there's was only one value
* but it required having quotes and if there was more than one value (in which
@@ -122,7 +122,7 @@ add_list_to_csv (GString *line, GSList *list_in, CsvConfig *config, gint type)
if (list)
tmp = g_string_append (tmp, config->delimiter);
}
-
+
if (needquotes)
line = g_string_append (line, config->quote);
line = g_string_append_len (line, tmp->str, tmp->len);
@@ -139,7 +139,7 @@ static GString *
add_nummeric_to_csv (GString *line, gint *nummeric, CsvConfig *config)
{
- /*
+ /*
* This one will write {-1}..{00}..{01}..{99}
* it prepends a 0 if it's < 10 and > -1
*/
@@ -159,25 +159,25 @@ add_time_to_csv (GString *line, icaltimetype *time, CsvConfig *config)
gboolean needquotes = FALSE;
struct tm mytm = icaltimetype_to_tm (time);
gchar *str = (gchar*) g_malloc (sizeof (gchar) * 200);
-
- /*
+
+ /*
* Translator: the %F %T is the thirth argument for a strftime function.
* It lets you define the formatting of the date in the csv-file.
* */
e_utf8_strftime (str, 200, _("%F %T"), &mytm);
-
+
needquotes = string_needsquotes (str, config);
-
+
if (needquotes)
- line = g_string_append (line, config->quote);
-
+ line = g_string_append (line, config->quote);
+
line = g_string_append (line, str);
-
+
if (needquotes)
line = g_string_append (line, config->quote);
-
+
g_free (str);
-
+
}
line = g_string_append (line, config->delimiter);
@@ -191,8 +191,8 @@ string_needsquotes (const char *value, CsvConfig *config)
/* This is the actual need for quotes-checker */
- /*
- * These are the simple substring-checks
+ /*
+ * These are the simple substring-checks
*
* Example: {Mom, can you please do that for me?}
* Will be written as {"Mom, can you please do that for me?"}
@@ -202,15 +202,15 @@ string_needsquotes (const char *value, CsvConfig *config)
if (!needquotes) {
needquotes = strstr (value, config->newline) ? TRUE:FALSE;
- if (!needquotes)
+ if (!needquotes)
needquotes = strstr (value, config->quote) ? TRUE:FALSE;
}
- /*
+ /*
* If the special-char is char+onespace (so like {, } {" }, {\n }) and it occurs
* the value that is going to be written
- *
+ *
* In this case we don't trust the user . . . and are going to quote the string
* just to play save -- Quoting is always allowed in the CSV format. If you can
* avoid it, it's better to do so since a lot applications don't support CSV
@@ -220,7 +220,7 @@ string_needsquotes (const char *value, CsvConfig *config)
* This example will be written as {"Mom,can you please do that for me?"} because
* there's a {,} behind {Mom} and the delimiter is {, } (so we searched only the
* first character of {, } and didn't trust the user).
- */
+ */
if (!needquotes) {
@@ -234,7 +234,7 @@ string_needsquotes (const char *value, CsvConfig *config)
if (!needquotes) {
len = strlen (config->quote);
if ((len == 2) && (config->quote[1] == ' ')) {
- needquotes = strchr
+ needquotes = strchr
(value, config->quote[0])?TRUE:FALSE;
}
}
@@ -283,13 +283,13 @@ userstring_to_systemstring (const gchar *userstring)
case '\\':
str = g_string_append_c (str, '\\');
i++;
- break;
+ break;
case 'r':
str = g_string_append_c (str, '\r');
- i++;
+ i++;
break;
case 't':
- str = g_string_append_c (str, '\t');
+ str = g_string_append_c (str, '\t');
i++;
break;
}
@@ -303,17 +303,17 @@ userstring_to_systemstring (const gchar *userstring)
retval = str->str;
g_string_free (str, FALSE);
- return retval;
+ return retval;
}
static void
do_save_calendar_csv (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, char *dest_uri)
{
- /*
- * According to some documentation about CSV, newlines 'are' allowed
+ /*
+ * According to some documentation about CSV, newlines 'are' allowed
* in CSV-files. But you 'do' have to put the value between quotes.
- * The helper 'string_needsquotes' will check for that
+ * The helper 'string_needsquotes' will check for that
*
* http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm
* http://www.creativyst.com/cgi-bin/Prod/15/eg/csv2xml.pl
@@ -347,7 +347,7 @@ do_save_calendar_csv (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource
}
config = g_new (CsvConfig, 1);
-
+
tmp = gtk_entry_get_text (GTK_ENTRY(d->delimiter_entry));
config->delimiter = userstring_to_systemstring (tmp?tmp:", ");
tmp = gtk_entry_get_text (GTK_ENTRY(d->newline_entry));
@@ -368,15 +368,15 @@ do_save_calendar_csv (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource
if (result != GNOME_VFS_OK) {
gnome_vfs_create (&handle, dest_uri, GNOME_VFS_OPEN_WRITE, TRUE, GNOME_VFS_PERM_USER_ALL);
result = gnome_vfs_open_uri (&handle, uri, GNOME_VFS_OPEN_WRITE);
- }
+ }
}
if (result == GNOME_VFS_OK && doit && e_cal_get_object_list_as_comp (source_client, "#t", &objects, NULL)) {
if (config->header) {
-
+
gint i=0;
-
+
static gchar *labels[] = {
N_("UID"),
N_("Summary"),
@@ -403,14 +403,14 @@ do_save_calendar_csv (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource
line = g_string_append(line, config->delimiter);
line = g_string_append(line, _(labels[i]));
}
-
+
line = g_string_append (line, config->newline);
gnome_vfs_write (handle, line->str, line->len, NULL);
g_string_free (line, TRUE);
}
-
+
while (objects != NULL) {
ECalComponent *comp = objects->data;
gchar *delimiter_temp = NULL;
@@ -419,7 +419,7 @@ do_save_calendar_csv (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource
ECalComponentDateTime temp_dt;
struct icaltimetype *temp_time;
int *temp_int;
- ECalComponentText temp_comptext;
+ ECalComponentText temp_comptext;
line = g_string_new ("");
@@ -501,7 +501,7 @@ do_save_calendar_csv (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource
/* Append a newline (record delimiter) */
delimiter_temp = config->delimiter;
config->delimiter = config->newline;
-
+
line = add_time_to_csv (line, temp_time, config);
/* And restore for the next record */
@@ -548,7 +548,7 @@ create_options_widget (FormatHandler *handler)
*csv_options = gtk_expander_new (_("Advanced options for the CSV format")),
*vbox = gtk_vbox_new (FALSE, 0);
CsvPluginData *d = handler->data;
-
+
d->delimiter_entry = gtk_entry_new ();
d->newline_entry = gtk_entry_new ();
d->quote_entry = gtk_entry_new ();
@@ -563,20 +563,20 @@ create_options_widget (FormatHandler *handler)
gtk_table_set_col_spacings (GTK_TABLE (table), 5);
label = gtk_label_new (_("Value delimiter:"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.0);
- gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
- (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
gtk_table_attach (GTK_TABLE (table), d->delimiter_entry, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0);
label = gtk_label_new (_("Record delimiter:"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.0);
- gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
gtk_table_attach (GTK_TABLE (table), d->newline_entry, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0);
label = gtk_label_new (_("Encapsulate values with:"));
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.0);
- gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
- (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0);
gtk_table_attach (GTK_TABLE (table), d->quote_entry, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0);
diff --git a/plugins/save-calendar/ical-format.c b/plugins/save-calendar/ical-format.c
index 46be87e53a..ce57d00576 100644
--- a/plugins/save-calendar/ical-format.c
+++ b/plugins/save-calendar/ical-format.c
@@ -1,8 +1,8 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
- * Authors: Rodrigo Moya <rodrigo@novell.com>
+ * Authors: Rodrigo Moya <rodrigo@novell.com>
* Philip Van Hoof <pvanhoof@gnome.org>
- *
+ *
* Copyright 2004 Novell, Inc. (www.novell.com)
*
* This program is free software; you can redistribute it and/or
@@ -68,16 +68,16 @@ insert_tz_comps (icalparameter *param, void *cb_data)
GError *error = NULL;
tzid = icalparameter_get_tzid (param);
-
+
if (g_hash_table_lookup (tdata->zones, tzid))
return;
-
+
if (!e_cal_get_timezone (tdata->ecal, tzid, &zone, &error)) {
g_warning ("Could not get the timezone information for %s : %s \n", tzid, error->message);
g_error_free (error);
return;
}
-
+
tzcomp = icalcomponent_new_clone (icaltimezone_get_component (zone));
g_hash_table_insert (tdata->zones, (gpointer) tzid, (gpointer) tzcomp);
}
@@ -97,7 +97,7 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc
GList *objects;
icalcomponent *top_level = NULL;
GnomeVFSURI *uri;
- gboolean doit = TRUE;
+ gboolean doit = TRUE;
primary_source = e_source_selector_peek_primary_selection (target->selector);
@@ -127,7 +127,7 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc
while (objects != NULL) {
icalcomponent *icalcomp = objects->data;
-
+
icalcomponent_foreach_tzid (icalcomp, insert_tz_comps, &tdata);
icalcomponent_add_component (top_level, icalcomp);
@@ -142,7 +142,7 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc
/* save the file */
uri = gnome_vfs_uri_new (dest_uri);
-
+
result = gnome_vfs_open_uri (&handle, uri, GNOME_VFS_OPEN_READ);
if (result == GNOME_VFS_OK)
doit = e_error_run(GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET (target->selector))),
@@ -157,18 +157,18 @@ do_save_calendar_ical (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSourc
gnome_vfs_result_to_string (result));
}
}
-
+
if (result == GNOME_VFS_OK) {
char *ical_str;
GnomeVFSFileSize bytes_written;
-
+
ical_str = icalcomponent_as_ical_string (top_level);
if ((result = gnome_vfs_write (handle, (gconstpointer) ical_str, strlen (ical_str), &bytes_written))
!= GNOME_VFS_OK) {
display_error_message (gtk_widget_get_toplevel (GTK_WIDGET (target->selector)),
gnome_vfs_result_to_string (result));
}
-
+
gnome_vfs_close (handle);
}
}
diff --git a/plugins/save-calendar/rdf-format.c b/plugins/save-calendar/rdf-format.c
index c3f2dbbefa..33cded34bd 100644
--- a/plugins/save-calendar/rdf-format.c
+++ b/plugins/save-calendar/rdf-format.c
@@ -48,7 +48,7 @@
#include "format-handler.h"
-static void
+static void
add_string_to_rdf (xmlNodePtr node, const gchar *tag, const char *value);
/* Use { */
@@ -72,7 +72,7 @@ calendar_config_get_timezone (void)
config = gconf_client_get_default ();
retval = gconf_client_get_string (config, CALENDAR_CONFIG_TIMEZONE, NULL);
- if (!retval)
+ if (!retval)
retval = g_strdup ("UTC");
return retval;
@@ -97,7 +97,7 @@ display_error_message (GtkWidget *parent, GError *error)
}
/* Some helpers for the xml stuff */
-static void
+static void
add_list_to_rdf (xmlNodePtr node, const gchar *tag, GSList *list_in, gint type)
{
if (list_in) {
@@ -126,7 +126,7 @@ add_list_to_rdf (xmlNodePtr node, const gchar *tag, GSList *list_in, gint type)
}
}
-static void
+static void
add_nummeric_to_rdf (xmlNodePtr node, const gchar *tag, gint *nummeric)
{
if (nummeric) {
@@ -149,7 +149,7 @@ add_time_to_rdf (xmlNodePtr node, const gchar *tag, icaltimetype *time)
/*
* Translator: the %FT%T is the thirth argument for a strftime function.
* It lets you define the formatting of the date in the rdf-file.
- * Also check out http://www.w3.org/2002/12/cal/tzd
+ * Also check out http://www.w3.org/2002/12/cal/tzd
* */
e_utf8_strftime (str, 200, _("%FT%T"), &mytm);
@@ -166,7 +166,7 @@ add_time_to_rdf (xmlNodePtr node, const gchar *tag, icaltimetype *time)
}
-static void
+static void
add_string_to_rdf (xmlNodePtr node, const gchar *tag, const char *value)
{
if (value) {
@@ -183,10 +183,10 @@ static void
do_save_calendar_rdf (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type, char *dest_uri)
{
- /*
- * According to some documentation about CSV, newlines 'are' allowed
+ /*
+ * According to some documentation about CSV, newlines 'are' allowed
* in CSV-files. But you 'do' have to put the value between quotes.
- * The helper 'string_needsquotes' will check for that
+ * The helper 'string_needsquotes' will check for that
*
* http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm
* http://www.creativyst.com/cgi-bin/Prod/15/eg/csv2xml.pl
@@ -219,7 +219,7 @@ do_save_calendar_rdf (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource
uri = gnome_vfs_uri_new (dest_uri);
result = gnome_vfs_open_uri (&handle, uri, GNOME_VFS_OPEN_READ);
- if (result == GNOME_VFS_OK)
+ if (result == GNOME_VFS_OK)
doit = e_error_run(GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET (target->selector))),
E_ERROR_ASK_FILE_EXISTS_OVERWRITE, dest_uri, NULL) == GTK_RESPONSE_OK;
@@ -228,7 +228,7 @@ do_save_calendar_rdf (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource
if (result != GNOME_VFS_OK) {
gnome_vfs_create (&handle, dest_uri, GNOME_VFS_OPEN_WRITE, TRUE, GNOME_VFS_PERM_USER_ALL);
result = gnome_vfs_open_uri (&handle, uri, GNOME_VFS_OPEN_WRITE);
- }
+ }
}
@@ -274,7 +274,7 @@ do_save_calendar_rdf (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource
ECalComponentDateTime temp_dt;
struct icaltimetype *temp_time;
int *temp_int;
- ECalComponentText temp_comptext;
+ ECalComponentText temp_comptext;
xmlNodePtr c_node = xmlNewChild (fnode, NULL, (const unsigned char *)"component", NULL);
xmlNodePtr node = xmlNewChild (c_node, NULL, (const unsigned char *)"Vevent", NULL);
diff --git a/plugins/save-calendar/save-calendar.c b/plugins/save-calendar/save-calendar.c
index bce7bc3504..bd5dff3f06 100644
--- a/plugins/save-calendar/save-calendar.c
+++ b/plugins/save-calendar/save-calendar.c
@@ -53,14 +53,14 @@ void org_gnome_save_calendar (EPlugin *ep, ECalPopupTargetSource *target);
void org_gnome_save_tasks (EPlugin *ep, ECalPopupTargetSource *target);
-static void
+static void
extra_widget_foreach_hide (GtkWidget *widget, gpointer data)
{
if (widget != data)
gtk_widget_hide (widget);
}
-static void
+static void
on_type_combobox_changed (GtkComboBox *combobox, gpointer data)
{
FormatHandler *handler = NULL;
@@ -68,23 +68,23 @@ on_type_combobox_changed (GtkComboBox *combobox, gpointer data)
GtkTreeIter iter;
GtkTreeModel *model = gtk_combo_box_get_model (combobox);
- gtk_container_foreach (GTK_CONTAINER (extra_widget),
+ gtk_container_foreach (GTK_CONTAINER (extra_widget),
extra_widget_foreach_hide, combobox);
gtk_combo_box_get_active_iter (combobox, &iter);
- gtk_tree_model_get (model, &iter,
+ gtk_tree_model_get (model, &iter,
DEST_HANDLER, &handler, -1);
if (handler->options_widget)
{
gtk_widget_show (handler->options_widget);
- }
+ }
}
-static void
+static void
format_handlers_foreach_free (gpointer data, gpointer user_data)
{
FormatHandler *handler = data;
@@ -98,14 +98,14 @@ format_handlers_foreach_free (gpointer data, gpointer user_data)
g_free (data);
}
-static void
+static void
ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSourceType type)
{
FormatHandler *handler = NULL;
GtkWidget *extra_widget = gtk_vbox_new (FALSE, 0);
GtkComboBox *combo = GTK_COMBO_BOX(gtk_combo_box_new ());
- GtkTreeModel *model = GTK_TREE_MODEL (gtk_list_store_new
+ GtkTreeModel *model = GTK_TREE_MODEL (gtk_list_store_new
(N_DEST_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER));
GtkCellRenderer *renderer=NULL;
GtkListStore *store = GTK_LIST_STORE (model);
@@ -116,33 +116,33 @@ ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSource
GList *format_handlers = NULL;
/* The available formathandlers */
- format_handlers = g_list_append (format_handlers,
+ format_handlers = g_list_append (format_handlers,
ical_format_handler_new ());
- format_handlers = g_list_append (format_handlers,
+ format_handlers = g_list_append (format_handlers,
csv_format_handler_new ());
- format_handlers = g_list_append (format_handlers,
+ format_handlers = g_list_append (format_handlers,
rdf_format_handler_new ());
/* The Type GtkComboBox */
- gtk_box_pack_start (GTK_BOX (extra_widget), GTK_WIDGET (combo),
+ gtk_box_pack_start (GTK_BOX (extra_widget), GTK_WIDGET (combo),
TRUE, TRUE, 0);
gtk_combo_box_set_model (combo, model);
gtk_list_store_clear (store);
renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
- gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo),
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo),
renderer, "text", DEST_NAME_COLUMN, NULL);
while (format_handlers) {
handler = format_handlers->data;
gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter, DEST_NAME_COLUMN,
+ gtk_list_store_set (store, &iter, DEST_NAME_COLUMN,
handler->combo_label, -1);
gtk_list_store_set (store, &iter, DEST_HANDLER, handler, -1);
if (handler->options_widget) {
- gtk_box_pack_start (GTK_BOX (extra_widget),
+ gtk_box_pack_start (GTK_BOX (extra_widget),
GTK_WIDGET (handler->options_widget), TRUE, TRUE, 0);
gtk_widget_hide (handler->options_widget);
}
@@ -157,7 +157,7 @@ ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSource
}
- g_signal_connect (G_OBJECT(combo), "changed",
+ g_signal_connect (G_OBJECT(combo), "changed",
G_CALLBACK (on_type_combobox_changed), extra_widget);
dialog = gtk_file_chooser_dialog_new (_("Select destination file"),
@@ -178,10 +178,10 @@ ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSource
char *tmp = NULL;
gtk_combo_box_get_active_iter (combo, &iter);
- gtk_tree_model_get (model, &iter,
+ gtk_tree_model_get (model, &iter,
DEST_HANDLER, &handler, -1);
- dest_uri = gtk_file_chooser_get_uri
+ dest_uri = gtk_file_chooser_get_uri
(GTK_FILE_CHOOSER (dialog));
tmp = strstr (dest_uri, handler->filename_ext);
@@ -202,7 +202,7 @@ ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSource
g_list_free (format_handlers);
/* Now we can destroy it */
- gtk_widget_destroy (dialog);
+ gtk_widget_destroy (dialog);
g_free (dest_uri);
}
diff --git a/plugins/select-one-source/mark-calendar-offline.c b/plugins/select-one-source/mark-calendar-offline.c
index dea9baf28a..fee8595883 100644
--- a/plugins/select-one-source/mark-calendar-offline.c
+++ b/plugins/select-one-source/mark-calendar-offline.c
@@ -20,7 +20,7 @@
*/
/* This is prototype code only, this may, or may not, use undocumented
- * unstable or private internal function calls.
+ * unstable or private internal function calls.
* This code has been derived from the source of the sample eplugin
* select_one_source.
*/
@@ -38,7 +38,7 @@ void
org_gnome_mark_calendar_no_offline (EPlugin *ep, ECalPopupTargetSource *target)
{
ESource *source;
-
+
source = e_source_selector_peek_primary_selection (target->selector);
e_source_set_property (source, "offline", "0");
}
@@ -47,7 +47,7 @@ void
org_gnome_mark_calendar_offline (EPlugin *ep, ECalPopupTargetSource *target)
{
ESource *source;
-
+
source = e_source_selector_peek_primary_selection (target->selector);
e_source_set_property (source, "offline", "1");
}
diff --git a/plugins/select-one-source/select-one-source.c b/plugins/select-one-source/select-one-source.c
index 12aa5bda95..e571c77935 100644
--- a/plugins/select-one-source/select-one-source.c
+++ b/plugins/select-one-source/select-one-source.c
@@ -35,10 +35,10 @@ org_gnome_select_one_source (EPlugin *ep, ECalPopupTargetSource *target)
{
GSList *selection, *l;
ESource *primary_source;
-
+
selection = e_source_selector_get_selection (target->selector);
primary_source = e_source_selector_peek_primary_selection (target->selector);
-
+
for (l = selection; l; l = l->next) {
ESource *source = l->data;
@@ -47,6 +47,6 @@ org_gnome_select_one_source (EPlugin *ep, ECalPopupTargetSource *target)
}
e_source_selector_select_source (target->selector, primary_source);
-
+
e_source_selector_free_selection (selection);
}
diff --git a/plugins/startup-wizard/startup-wizard.c b/plugins/startup-wizard/startup-wizard.c
index 117fcb77d2..793d2514be 100644
--- a/plugins/startup-wizard/startup-wizard.c
+++ b/plugins/startup-wizard/startup-wizard.c
@@ -59,17 +59,17 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target)
GSList *accounts;
EMAccountEditor *emae;
GnomeDruidPageEdge *start_page;
-
+
client = gconf_client_get_default ();
accounts = gconf_client_get_list (client, "/apps/evolution/mail/accounts", GCONF_VALUE_STRING, NULL);
g_object_unref (client);
-
+
if (accounts != NULL) {
g_slist_foreach (accounts, (GFunc) g_free, NULL);
g_slist_free (accounts);
return;
- }
+ }
/** @HookPoint-EMConfig: New Mail Account Wizard
* @Id: org.gnome.evolution.mail.config.accountWizard
@@ -91,7 +91,7 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target)
"\n"
"Please click the \"Forward\" button to continue. "));
g_signal_connect (emae->editor, "delete-event", G_CALLBACK (startup_wizard_delete), NULL);
-
+
gtk_widget_show (emae->editor);
gtk_main ();
}
@@ -101,15 +101,15 @@ startup_wizard_timezone_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data
{
ETimezoneDialog *etd;
GtkWidget *page;
-
+
etd = e_timezone_dialog_new ();
g_object_set_data (G_OBJECT (hook_data->config), IMPORT_TIMEZONE_DIALOG, etd);
-
+
page = gnome_druid_page_standard_new_with_vals (_("Timezone"), NULL, NULL);
e_timezone_dialog_reparent (etd, GNOME_DRUID_PAGE_STANDARD (page)->vbox);
e_timezone_dialog_set_timezone (etd, NULL);
-
+
gnome_druid_append_page (GNOME_DRUID (hook_data->parent), GNOME_DRUID_PAGE (page));
return GTK_WIDGET (page);
@@ -138,7 +138,7 @@ startup_wizard_importer_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data
sep = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (GNOME_DRUID_PAGE_STANDARD (page)->vbox), sep, FALSE, FALSE, 3);
-
+
table = gtk_table_new(g_slist_length(import_importers), 2, FALSE);
for (l = import_importers; l; l = l->next) {
EImportImporter *eii = l->data;
@@ -153,7 +153,7 @@ startup_wizard_importer_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data
gtk_widget_show(label);
g_free(str);
- gtk_misc_set_alignment((GtkMisc *)label, 0, .5);
+ gtk_misc_set_alignment((GtkMisc *)label, 0, .5);
gtk_table_attach((GtkTable *)table, label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0);
if (w)
@@ -162,7 +162,7 @@ startup_wizard_importer_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data
}
gtk_widget_show(table);
gtk_box_pack_start((GtkBox *)((GnomeDruidPageStandard *)page)->vbox, table, FALSE, FALSE, 3);
-
+
gnome_druid_append_page (GNOME_DRUID (hook_data->parent), GNOME_DRUID_PAGE (page));
return page;
diff --git a/plugins/subject-thread/subject-thread.c b/plugins/subject-thread/subject-thread.c
index 867b01ec1b..c2d518e6cf 100644
--- a/plugins/subject-thread/subject-thread.c
+++ b/plugins/subject-thread/subject-thread.c
@@ -39,7 +39,7 @@ static void
toggled_cb (GtkWidget *widget, EConfig *config)
{
EMConfigTargetPrefs *target = (EMConfigTargetPrefs *) config->target;
-
+
/* Save the new setting to gconf */
gconf_client_set_bool (target->gconf, GCONF_KEY, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)), NULL);
}
@@ -49,7 +49,7 @@ org_gnome_subject_thread_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_
{
GtkWidget *check;
EMConfigTargetPrefs *target = (EMConfigTargetPrefs *) hook_data->config->target;
-
+
/* Create the checkbox we will display, complete with mnemonic that is unique in the dialog */
check = gtk_check_button_new_with_mnemonic (_("F_all back to threading messages by subject"));
@@ -58,10 +58,10 @@ org_gnome_subject_thread_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_
/* Listen for the item being toggled on and off */
g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (toggled_cb), hook_data->config);
-
+
/* Pack the checkbox in the parent widget and show it */
gtk_box_pack_start (GTK_BOX (hook_data->parent), check, FALSE, FALSE, 0);
gtk_widget_show (check);
-
+
return check;
}
diff --git a/plugins/tnef-attachments/tnef-plugin.c b/plugins/tnef-attachments/tnef-plugin.c
index 0faac25811..cea0081cfe 100644
--- a/plugins/tnef-attachments/tnef-plugin.c
+++ b/plugins/tnef-attachments/tnef-plugin.c
@@ -44,7 +44,7 @@ void saveVTask(TNEFStruct *tnef);
void org_gnome_format_tnef(void *ep, EMFormatHookTarget *t);
/* Other Prototypes */
-void fprintProperty(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, char text[]);
+void fprintProperty(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, char text[]);
void fprintUserProp(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, char text[]);
void quotedfprint(FILE *fptr, variableLength *vl);
void cstylefprint(FILE *fptr, variableLength *vl);
@@ -69,11 +69,11 @@ org_gnome_format_tnef(void *ep, EMFormatHookTarget *t)
int len;
TNEFStruct *tnef;
tnef = (TNEFStruct *) g_malloc(sizeof(TNEFStruct));
-
+
tmpdir = e_mkdtemp("tnef-attachment-XXXXXX");
if (tmpdir == NULL)
return;
-
+
filepath = tmpdir;
name = g_build_filename(tmpdir, ".evo-attachment.tnef", NULL);
@@ -96,8 +96,8 @@ org_gnome_format_tnef(void *ep, EMFormatHookTarget *t)
tnef->Debug = verbose;
if (TNEFParseFile(name, tnef) == -1) {
printf("ERROR processing file\n");
- }
- processTnef(tnef);
+ }
+ processTnef(tnef);
TNEFFree(tnef);
/* Extraction done */
@@ -121,13 +121,13 @@ org_gnome_format_tnef(void *ep, EMFormatHookTarget *t)
char *path;
const char *type;
- if (!strcmp(d->d_name, ".")
- || !strcmp(d->d_name, "..")
+ if (!strcmp(d->d_name, ".")
+ || !strcmp(d->d_name, "..")
|| !strcmp(d->d_name, ".evo-attachment.tnef"))
continue;
-
+
path = g_build_filename(tmpdir, d->d_name, NULL);
-
+
stream = camel_stream_fs_new_with_name(path, O_RDONLY, 0);
content = camel_data_wrapper_new();
camel_data_wrapper_construct_from_stream(content, stream);
@@ -138,20 +138,20 @@ org_gnome_format_tnef(void *ep, EMFormatHookTarget *t)
camel_medium_set_content_object((CamelMedium *)part, content);
camel_object_unref(content);
-
+
type = em_utils_snoop_type(part);
if (type)
camel_data_wrapper_set_mime_type((CamelDataWrapper *)part, type);
-
+
camel_mime_part_set_filename(part, d->d_name);
-
+
g_free(path);
-
+
camel_multipart_add_part(mp, part);
}
-
+
closedir(dir);
-
+
len = t->format->part_id->len;
g_string_append_printf(t->format->part_id, ".tnef");
@@ -161,7 +161,7 @@ org_gnome_format_tnef(void *ep, EMFormatHookTarget *t)
t->item->handler.old->handler(t->format, t->stream, t->part, t->item->handler.old);
g_string_truncate(t->format->part_id, len);
-
+
camel_object_unref(mainpart);
goto ok;
@@ -186,12 +186,12 @@ e_plugin_lib_enable(EPluginLib *ep, int enable)
if (enable) {
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
- }
+ }
return 0;
}
-void processTnef(TNEFStruct *tnef) {
+void processTnef(TNEFStruct *tnef) {
variableLength *filename;
variableLength *filedata;
Attachment *p;
@@ -203,7 +203,7 @@ void processTnef(TNEFStruct *tnef) {
FILE *fptr;
ifilename = (char *) g_malloc(sizeof(char) * 256);
-
+
/* First see if this requires special processing. */
/* ie: it's a Contact Card, Task, or Meeting request (vCal/vCard) */
if (tnef->messageClass[0] != 0) {
@@ -218,8 +218,8 @@ void processTnef(TNEFStruct *tnef) {
foundCal = 1;
}
}
-
- if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
+
+ if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_STRING8,0x24))) != MAPI_UNDEFINED) {
if (strcmp(filename->data, "IPM.Appointment") == 0) {
/* If it's "indicated" twice, we don't want to save 2 calendar entries. */
@@ -245,16 +245,16 @@ void processTnef(TNEFStruct *tnef) {
} else {
sprintf(ifilename, "%s/%s.rtf", filepath, tnef->subject.data);
}
- for(i=0; i<strlen(ifilename); i++)
- if (ifilename[i] == ' ')
+ for(i=0; i<strlen(ifilename); i++)
+ if (ifilename[i] == ' ')
ifilename[i] = '_';
if ((fptr = fopen(ifilename, "wb"))==NULL) {
printf("ERROR: Error writing file to disk!");
} else {
fwrite(buf->data,
- sizeof(BYTE),
- buf->size,
+ sizeof(BYTE),
+ buf->size,
fptr);
fclose(fptr);
}
@@ -262,7 +262,7 @@ void processTnef(TNEFStruct *tnef) {
buf->data="";
buf->size=0;
}
- }
+ }
}
}
@@ -273,15 +273,15 @@ void processTnef(TNEFStruct *tnef) {
count++;
/* Make sure it has a size. */
if (p->FileData.size > 0) {
- object = 1;
-
+ object = 1;
+
/* See if the contents are stored as "attached data" */
/* Inside the MAPI blocks. */
- if((filedata = MAPIFindProperty(&(p->MAPI),
- PROP_TAG(PT_OBJECT, PR_ATTACH_DATA_OBJ)))
+ if((filedata = MAPIFindProperty(&(p->MAPI),
+ PROP_TAG(PT_OBJECT, PR_ATTACH_DATA_OBJ)))
== MAPI_UNDEFINED) {
- if((filedata = MAPIFindProperty(&(p->MAPI),
- PROP_TAG(PT_BINARY, PR_ATTACH_DATA_OBJ)))
+ if((filedata = MAPIFindProperty(&(p->MAPI),
+ PROP_TAG(PT_BINARY, PR_ATTACH_DATA_OBJ)))
== MAPI_UNDEFINED) {
/* Nope, standard TNEF stuff. */
filedata = &(p->FileData);
@@ -301,7 +301,7 @@ void processTnef(TNEFStruct *tnef) {
/* Has a TNEF signature, so process it. */
TNEFInitialize(emb_tnef);
emb_tnef->Debug = tnef->Debug;
- if (TNEFParseMemory(filedata->data+16,
+ if (TNEFParseMemory(filedata->data+16,
filedata->size-16, emb_tnef) != -1) {
processTnef(emb_tnef);
RealAttachment = 0;
@@ -317,7 +317,7 @@ void processTnef(TNEFStruct *tnef) {
/* Has a TNEF signature, so process it. */
TNEFInitialize(emb_tnef);
emb_tnef->Debug = tnef->Debug;
- if (TNEFParseMemory(filedata->data,
+ if (TNEFParseMemory(filedata->data,
filedata->size, emb_tnef) != -1) {
processTnef(emb_tnef);
RealAttachment = 0;
@@ -328,11 +328,11 @@ void processTnef(TNEFStruct *tnef) {
if ((RealAttachment == 1) || (saveintermediate == 1)) {
/* Ok, it's not an embedded stream, so now we */
/* process it. */
- if ((filename = MAPIFindProperty(&(p->MAPI),
- PROP_TAG(30,0x3707)))
+ if ((filename = MAPIFindProperty(&(p->MAPI),
+ PROP_TAG(30,0x3707)))
== MAPI_UNDEFINED) {
- if ((filename = MAPIFindProperty(&(p->MAPI),
- PROP_TAG(30,0x3001)))
+ if ((filename = MAPIFindProperty(&(p->MAPI),
+ PROP_TAG(30,0x3001)))
== MAPI_UNDEFINED) {
filename = &(p->Title);
}
@@ -348,27 +348,27 @@ void processTnef(TNEFStruct *tnef) {
} else {
sprintf(ifilename, "%s/%s", filepath, filename->data);
}
- for(i=0; i<strlen(ifilename); i++)
- if (ifilename[i] == ' ')
+ for(i=0; i<strlen(ifilename); i++)
+ if (ifilename[i] == ' ')
ifilename[i] = '_';
if ((fptr = fopen(ifilename, "wb"))==NULL) {
printf("ERROR: Error writing file to disk!");
} else {
if (object == 1) {
- fwrite(filedata->data + 16,
- sizeof(BYTE),
- filedata->size - 16,
+ fwrite(filedata->data + 16,
+ sizeof(BYTE),
+ filedata->size - 16,
fptr);
} else {
- fwrite(filedata->data,
- sizeof(BYTE),
- filedata->size,
+ fwrite(filedata->data,
+ sizeof(BYTE),
+ filedata->size,
fptr);
}
fclose(fptr);
- }
- }
+ }
+ }
} /* if size>0 */
p=p->next;
} /* while p!= null */
@@ -413,8 +413,8 @@ void saveVCard(TNEFStruct *tnef) {
sprintf(ifilename, "%s/%s.vcard", filepath, vl->data);
}
}
- for(i=0; i<strlen(ifilename); i++)
- if (ifilename[i] == ' ')
+ for(i=0; i<strlen(ifilename); i++)
+ if (ifilename[i] == ' ')
ifilename[i] = '_';
printf("%s\n", ifilename);
@@ -429,7 +429,7 @@ void saveVCard(TNEFStruct *tnef) {
fprintProperty(tnef, fptr, PT_STRING8, PR_NICKNAME, "NICKNAME:%s\n");
fprintUserProp(tnef, fptr, PT_STRING8, 0x8554, "MAILER:Microsoft Outlook %s\n");
fprintProperty(tnef, fptr, PT_STRING8, PR_SPOUSE_NAME, "X-EVOLUTION-SPOUSE:%s\n");
- fprintProperty(tnef, fptr, PT_STRING8, PR_MANAGER_NAME, "X-EVOLUTION-MANAGER:%s\n");
+ fprintProperty(tnef, fptr, PT_STRING8, PR_MANAGER_NAME, "X-EVOLUTION-MANAGER:%s\n");
fprintProperty(tnef, fptr, PT_STRING8, PR_ASSISTANT, "X-EVOLUTION-ASSISTANT:%s\n");
/* Organizational */
@@ -638,21 +638,21 @@ void saveVCard(TNEFStruct *tnef) {
vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x8084));
}
if (vl != MAPI_UNDEFINED) {
- if (vl->size > 0)
+ if (vl->size > 0)
fprintf(fptr, "EMAIL:%s\n", vl->data);
}
if ((vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x8093))) == MAPI_UNDEFINED) {
vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x8094));
}
if (vl != MAPI_UNDEFINED) {
- if (vl->size > 0)
+ if (vl->size > 0)
fprintf(fptr, "EMAIL:%s\n", vl->data);
}
if ((vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x80a3))) == MAPI_UNDEFINED) {
vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x80a4));
}
if (vl != MAPI_UNDEFINED) {
- if (vl->size > 0)
+ if (vl->size > 0)
fprintf(fptr, "EMAIL:%s\n", vl->data);
}
@@ -786,7 +786,7 @@ char * getRruleDayname(unsigned char a) {
return(daystring);
}
-void printRrule(FILE *fptr, char *recur_data, int size, TNEFStruct *tnef)
+void printRrule(FILE *fptr, char *recur_data, int size, TNEFStruct *tnef)
{
variableLength *filename;
@@ -806,21 +806,21 @@ void printRrule(FILE *fptr, char *recur_data, int size, TNEFStruct *tnef)
fprintf(fptr, ";INTERVAL=%d", *(filename->data));
}
if (recur_data[0x16] == 0x22 || recur_data[0x16] == 0x21) {
- fprintf(fptr, ";COUNT=%d",
+ fprintf(fptr, ";COUNT=%d",
getRruleCount(recur_data[0x1B], recur_data[0x1A]));
}
} else if (recur_data[0x16] == 0x3E) {
fprintf(fptr, ";BYDAY=MO,TU,WE,TH,FR");
if (recur_data[0x1A] == 0x22 || recur_data[0x1A] == 0x21) {
- fprintf(fptr, ";COUNT=%d",
+ fprintf(fptr, ";COUNT=%d",
getRruleCount(recur_data[0x1F], recur_data[0x1E]));
}
}
} else if (recur_data[0x04] == 0x0B) {
- fprintf(fptr, "WEEKLY;INTERVAL=%d;BYDAY=%s",
+ fprintf(fptr, "WEEKLY;INTERVAL=%d;BYDAY=%s",
recur_data[0x0E], getRruleDayname(recur_data[0x16]));
if (recur_data[0x1A] == 0x22 || recur_data[0x1A] == 0x21) {
- fprintf(fptr, ";COUNT=%d",
+ fprintf(fptr, ";COUNT=%d",
getRruleCount(recur_data[0x1F], recur_data[0x1E]));
}
} else if (recur_data[0x04] == 0x0C) {
@@ -829,11 +829,11 @@ void printRrule(FILE *fptr, char *recur_data, int size, TNEFStruct *tnef)
fprintf(fptr, ";INTERVAL=%d;BYMONTHDAY=%d", recur_data[0x0E],
recur_data[0x16]);
if (recur_data[0x1A] == 0x22 || recur_data[0x1A] == 0x21) {
- fprintf(fptr, ";COUNT=%d", getRruleCount(recur_data[0x1F],
+ fprintf(fptr, ";COUNT=%d", getRruleCount(recur_data[0x1F],
recur_data[0x1E]));
}
} else if (recur_data[0x06] == 0x03) {
- fprintf(fptr, ";BYDAY=%s;BYSETPOS=%d;INTERVAL=%d",
+ fprintf(fptr, ";BYDAY=%s;BYSETPOS=%d;INTERVAL=%d",
getRruleDayname(recur_data[0x16]),
recur_data[0x1A] == 0x05 ? -1 : recur_data[0x1A],
recur_data[0x0E]);
@@ -901,17 +901,17 @@ void saveVCalendar(TNEFStruct *tnef) {
fprintf(fptr, "VERSION:2.0\n");
fprintf(fptr, "BEGIN:VEVENT\n");
- /* UID
- After alot of comparisons, I'm reasonably sure this is totally
+ /* UID
+ After alot of comparisons, I'm reasonably sure this is totally
wrong. But it's not really necessary. */
-
- /* I think it only exists to connect future modification entries to
- this entry. so as long as it's incorrectly interpreted the same way
+
+ /* I think it only exists to connect future modification entries to
+ this entry. so as long as it's incorrectly interpreted the same way
every time, it should be ok :) */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_BINARY, 0x3))) == MAPI_UNDEFINED) {
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_BINARY, 0x23))) == MAPI_UNDEFINED) {
filename = NULL;
}
@@ -926,28 +926,28 @@ void saveVCalendar(TNEFStruct *tnef) {
/* Sequence */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_LONG, 0x8201))) != MAPI_UNDEFINED) {
ddword_ptr = (DDWORD*)filename->data;
fprintf(fptr, "SEQUENCE:%i\n", (int) *ddword_ptr);
}
- if ((filename=MAPIFindProperty(&(tnef->MapiProperties),
- PROP_TAG(PT_BINARY, PR_SENDER_SEARCH_KEY)))
+ if ((filename=MAPIFindProperty(&(tnef->MapiProperties),
+ PROP_TAG(PT_BINARY, PR_SENDER_SEARCH_KEY)))
!= MAPI_UNDEFINED) {
charptr = filename->data;
charptr2 = strstr(charptr, ":");
- if (charptr2 == NULL)
+ if (charptr2 == NULL)
charptr2 = charptr;
else
charptr2++;
- fprintf(fptr, "ORGANIZER;CN=\"%s\":MAILTO:%s\n",
+ fprintf(fptr, "ORGANIZER;CN=\"%s\":MAILTO:%s\n",
charptr2, charptr2);
}
/* Required Attendees */
- if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_STRING8, 0x823b))) != MAPI_UNDEFINED) {
- /* We have a list of required participants, so
+ /* We have a list of required participants, so
write them out. */
if (filename->size > 1) {
charptr = filename->data-1;
@@ -958,7 +958,7 @@ void saveVCalendar(TNEFStruct *tnef) {
if (charptr2 != NULL) {
*charptr2 = 0;
}
- while (*charptr == ' ')
+ while (*charptr == ' ')
charptr++;
fprintf(fptr, "ATTENDEE;PARTSTAT=NEEDS-ACTION;");
fprintf(fptr, "ROLE=REQ-PARTICIPANT;RSVP=TRUE;");
@@ -968,7 +968,7 @@ void saveVCalendar(TNEFStruct *tnef) {
}
}
/* Optional attendees */
- if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_STRING8, 0x823c))) != MAPI_UNDEFINED) {
/* The list of optional participants */
if (filename->size > 1) {
@@ -980,7 +980,7 @@ void saveVCalendar(TNEFStruct *tnef) {
if (charptr2 != NULL) {
*charptr2 = 0;
}
- while (*charptr == ' ')
+ while (*charptr == ' ')
charptr++;
fprintf(fptr, "ATTENDEE;PARTSTAT=NEEDS-ACTION;");
fprintf(fptr, "ROLE=OPT-PARTICIPANT;RSVP=TRUE;");
@@ -990,7 +990,7 @@ void saveVCalendar(TNEFStruct *tnef) {
}
}
}
- } else if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
+ } else if ((filename = MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_STRING8, 0x8238))) != MAPI_UNDEFINED) {
if (filename->size > 1) {
charptr = filename->data-1;
@@ -1001,7 +1001,7 @@ void saveVCalendar(TNEFStruct *tnef) {
if (charptr2 != NULL) {
*charptr2 = 0;
}
- while (*charptr == ' ')
+ while (*charptr == ' ')
charptr++;
fprintf(fptr, "ATTENDEE;PARTSTAT=NEEDS-ACTION;");
fprintf(fptr, "ROLE=REQ-PARTICIPANT;RSVP=TRUE;");
@@ -1014,8 +1014,8 @@ void saveVCalendar(TNEFStruct *tnef) {
}
/* Summary */
filename = NULL;
- if((filename=MAPIFindProperty(&(tnef->MapiProperties),
- PROP_TAG(PT_STRING8, PR_CONVERSATION_TOPIC)))
+ if((filename=MAPIFindProperty(&(tnef->MapiProperties),
+ PROP_TAG(PT_STRING8, PR_CONVERSATION_TOPIC)))
!= MAPI_UNDEFINED) {
fprintf(fptr, "SUMMARY:");
cstylefprint(fptr, filename);
@@ -1033,14 +1033,14 @@ void saveVCalendar(TNEFStruct *tnef) {
printRtf(fptr, &buf);
free(buf->data);
}
-
- }
+
+ }
/* Location */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_STRING8, 0x0002))) == MAPI_UNDEFINED) {
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_STRING8, 0x8208))) == MAPI_UNDEFINED) {
filename = NULL;
}
@@ -1050,9 +1050,9 @@ void saveVCalendar(TNEFStruct *tnef) {
}
/* Date Start */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_SYSTIME, 0x820d))) == MAPI_UNDEFINED) {
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_SYSTIME, 0x8516))) == MAPI_UNDEFINED) {
filename=NULL;
}
@@ -1060,15 +1060,15 @@ void saveVCalendar(TNEFStruct *tnef) {
if (filename != NULL) {
fprintf(fptr, "DTSTART:");
MAPISysTimetoDTR(filename->data, &thedate);
- fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
+ fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
/* Date End */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_SYSTIME, 0x820e))) == MAPI_UNDEFINED) {
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_SYSTIME, 0x8517))) == MAPI_UNDEFINED) {
filename=NULL;
}
@@ -1076,23 +1076,23 @@ void saveVCalendar(TNEFStruct *tnef) {
if (filename != NULL) {
fprintf(fptr, "DTEND:");
MAPISysTimetoDTR(filename->data, &thedate);
- fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
+ fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
/* Date Stamp */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_SYSTIME, 0x8202))) != MAPI_UNDEFINED) {
fprintf(fptr, "CREATED:");
MAPISysTimetoDTR(filename->data, &thedate);
- fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
+ fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
/* Class */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_BOOLEAN, 0x8506))) != MAPI_UNDEFINED) {
ddword_ptr = (DDWORD*)filename->data;
ddword_val = SwapDDWord((BYTE*)ddword_ptr);
@@ -1105,7 +1105,7 @@ void saveVCalendar(TNEFStruct *tnef) {
}
/* Recurrence */
filename = NULL;
- if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
+ if ((filename=MAPIFindUserProp(&(tnef->MapiProperties),
PROP_TAG(PT_BINARY, 0x8216))) != MAPI_UNDEFINED) {
printRrule(fptr, filename->data, filename->size, tnef);
}
@@ -1127,7 +1127,7 @@ void saveVTask(TNEFStruct *tnef) {
FILE *fptr;
DDWORD *ddword_ptr;
DDWORD ddword_val;
-
+
vl = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_CONVERSATION_TOPIC));
if (vl == MAPI_UNDEFINED) {
@@ -1135,7 +1135,7 @@ void saveVTask(TNEFStruct *tnef) {
}
index = strlen(vl->data);
- while (vl->data[index] == ' ')
+ while (vl->data[index] == ' ')
vl->data[index--] = 0;
if (filepath == NULL) {
@@ -1143,8 +1143,8 @@ void saveVTask(TNEFStruct *tnef) {
} else {
sprintf(ifilename, "%s/%s.vcf", filepath, vl->data);
}
- for(i=0; i<strlen(ifilename); i++)
- if (ifilename[i] == ' ')
+ for(i=0; i<strlen(ifilename); i++)
+ if (ifilename[i] == ' ')
ifilename[i] = '_';
printf("%s\n", ifilename);
@@ -1165,7 +1165,7 @@ void saveVTask(TNEFStruct *tnef) {
if (filename != MAPI_UNDEFINED) {
fprintf(fptr, "ORGANIZER:%s\n", filename->data);
}
-
+
if ((filename = MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, PR_DISPLAY_TO))) != MAPI_UNDEFINED) {
filename = MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(PT_STRING8, 0x811f));
@@ -1179,7 +1179,7 @@ void saveVTask(TNEFStruct *tnef) {
if (charptr2 != NULL) {
*charptr2 = 0;
}
- while (*charptr == ' ')
+ while (*charptr == ' ')
charptr++;
fprintf(fptr, "ATTENDEE;CN=%s;ROLE=REQ-PARTICIPANT:%s\n", charptr, charptr);
charptr = charptr2;
@@ -1203,7 +1203,7 @@ void saveVTask(TNEFStruct *tnef) {
if (filename != MAPI_UNDEFINED) {
fprintf(fptr, "DTSTAMP:");
MAPISysTimetoDTR(filename->data, &thedate);
- fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
+ fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
@@ -1213,7 +1213,7 @@ void saveVTask(TNEFStruct *tnef) {
if (filename != MAPI_UNDEFINED) {
fprintf(fptr, "DUE:");
MAPISysTimetoDTR(filename->data, &thedate);
- fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
+ fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
@@ -1222,7 +1222,7 @@ void saveVTask(TNEFStruct *tnef) {
if (filename != MAPI_UNDEFINED) {
fprintf(fptr, "LAST-MODIFIED:");
MAPISysTimetoDTR(filename->data, &thedate);
- fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
+ fprintf(fptr,"%04i%02i%02iT%02i%02i%02iZ\n",
thedate.wYear, thedate.wMonth, thedate.wDay,
thedate.wHour, thedate.wMinute, thedate.wSecond);
}
@@ -1248,24 +1248,24 @@ void saveVTask(TNEFStruct *tnef) {
void fprintProperty(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, char text[]) {
variableLength *vl;
- if ((vl=MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(proptype, propid))) != MAPI_UNDEFINED) {
+ if ((vl=MAPIFindProperty(&(tnef->MapiProperties), PROP_TAG(proptype, propid))) != MAPI_UNDEFINED) {
if (vl->size > 0) {
if ((vl->size == 1) && (vl->data[0] == 0)) {
- } else {
- fprintf(fptr, text, vl->data);
- }
+ } else {
+ fprintf(fptr, text, vl->data);
+ }
}
}
}
void fprintUserProp(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid, char text[]) {
variableLength *vl;
- if ((vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(proptype, propid))) != MAPI_UNDEFINED) {
+ if ((vl=MAPIFindUserProp(&(tnef->MapiProperties), PROP_TAG(proptype, propid))) != MAPI_UNDEFINED) {
if (vl->size > 0) {
if ((vl->size == 1) && (vl->data[0] == 0)) {
- } else {
- fprintf(fptr, text, vl->data);
- }
+ } else {
+ fprintf(fptr, text, vl->data);
+ }
}
}
}
@@ -1273,23 +1273,23 @@ void fprintUserProp(TNEFStruct *tnef, FILE *fptr, DWORD proptype, DWORD propid,
void quotedfprint(FILE *fptr, variableLength *vl) {
int index;
- for (index=0;index<vl->size-1; index++) {
- if (vl->data[index] == '\n') {
- fprintf(fptr, "=0A");
- } else if (vl->data[index] == '\r') {
- } else {
- fprintf(fptr, "%c", vl->data[index]);
- }
+ for (index=0;index<vl->size-1; index++) {
+ if (vl->data[index] == '\n') {
+ fprintf(fptr, "=0A");
+ } else if (vl->data[index] == '\r') {
+ } else {
+ fprintf(fptr, "%c", vl->data[index]);
+ }
}
}
void cstylefprint(FILE *fptr, variableLength *vl) {
int index;
- for (index=0;index<vl->size-1; index++) {
- if (vl->data[index] == '\n') {
- fprintf(fptr, "\\n");
- } else if (vl->data[index] == '\r') {
+ for (index=0;index<vl->size-1; index++) {
+ if (vl->data[index] == '\n') {
+ fprintf(fptr, "\\n");
+ } else if (vl->data[index] == '\r') {
/* Print nothing. */
} else if (vl->data[index] == ';') {
fprintf(fptr, "\\;");
@@ -1297,9 +1297,9 @@ void cstylefprint(FILE *fptr, variableLength *vl) {
fprintf(fptr, "\\,");
} else if (vl->data[index] == '\\') {
fprintf(fptr, "\\");
- } else {
- fprintf(fptr, "%c", vl->data[index]);
- }
+ } else {
+ fprintf(fptr, "%c", vl->data[index]);
+ }
}
}
@@ -1329,9 +1329,9 @@ void printRtf(FILE *fptr, variableLength *vl) {
key = 0;
}
if ((brace_ct == 1) && (key == 0)) {
- if (*byte == '\n') {
- fprintf(fptr, "\\n");
- } else if (*byte == '\r') {
+ if (*byte == '\n') {
+ fprintf(fptr, "\\n");
+ } else if (*byte == '\r') {
/* Print nothing. */
} else if (*byte == ';') {
fprintf(fptr, "\\;");
@@ -1339,9 +1339,9 @@ void printRtf(FILE *fptr, variableLength *vl) {
fprintf(fptr, "\\,");
} else if (*byte == '\\') {
fprintf(fptr, "\\");
- } else {
+ } else {
fprintf(fptr, "%c", *byte);
- }
+ }
}
}
fprintf(fptr, "\n");
diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c
index 876412099c..9d953b4997 100644
--- a/shell/e-component-registry.c
+++ b/shell/e-component-registry.c
@@ -201,7 +201,7 @@ query_components (EComponentRegistry *registry)
}
label = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:button_label", languages);
-
+
tooltips = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:button_tooltips", languages);
menu_label = bonobo_server_info_prop_lookup (& info_list->_buffer[i], "evolution:menu_label", languages);
diff --git a/shell/e-config-upgrade.c b/shell/e-config-upgrade.c
index 75c6e6228a..a8a012c058 100644
--- a/shell/e-config-upgrade.c
+++ b/shell/e-config-upgrade.c
@@ -141,9 +141,9 @@ e_config_upgrade(int major, int minor, int revision)
conf_file = g_build_filename (g_get_home_dir (), "evolution", "config.xmldb", NULL);
config_doc = e_xml_parse_file (conf_file);
g_free (conf_file);
-
+
if (config_doc && major <=1 && minor < 3) {
- GConfClient *gconf;
+ GConfClient *gconf;
/* move bonobo config to gconf */
gconf = gconf_client_get_default ();
diff --git a/shell/e-corba-config-page.c b/shell/e-corba-config-page.c
index bc8bf8507c..290bdfcb04 100644
--- a/shell/e-corba-config-page.c
+++ b/shell/e-corba-config-page.c
@@ -60,7 +60,7 @@ impl_dispose (GObject *object)
bonobo_object_release_unref (priv->config_control_interface, &ev);
priv->config_control_interface = CORBA_OBJECT_NIL;
}
-
+
CORBA_exception_free (&ev);
(* G_OBJECT_CLASS (e_corba_config_page_parent_class)->dispose) (object);
@@ -99,7 +99,7 @@ e_corba_config_page_init (ECorbaConfigPage *corba_config_page)
priv = g_new (ECorbaConfigPagePrivate, 1);
priv->config_control_interface = CORBA_OBJECT_NIL;
-
+
corba_config_page->priv = priv;
}
@@ -127,7 +127,7 @@ e_corba_config_page_construct (ECorbaConfigPage *corba_config_page,
control_widget = bonobo_widget_new_control_from_objref (control, CORBA_OBJECT_NIL);
gtk_widget_show (control_widget);
gtk_container_add (GTK_CONTAINER (corba_config_page), control_widget);
-
+
/* Notice we *don't* unref the corba_object here as
bonobo_widget_new_control_from_objref() effectively takes ownership
for the object that we get from ::__get_control. */
diff --git a/shell/e-history.c b/shell/e-history.c
index d73e9ea54c..c8288f3eaf 100644
--- a/shell/e-history.c
+++ b/shell/e-history.c
@@ -63,7 +63,7 @@ static void
e_history_class_init (EHistoryClass *klass)
{
GObjectClass *object_class;
-
+
object_class = G_OBJECT_CLASS (klass);
object_class->finalize = impl_finalize;
}
diff --git a/shell/e-shell-folder-title-bar.c b/shell/e-shell-folder-title-bar.c
index 24bf3a58e8..5f12035239 100644
--- a/shell/e-shell-folder-title-bar.c
+++ b/shell/e-shell-folder-title-bar.c
@@ -470,8 +470,8 @@ e_shell_folder_title_bar_init (EShellFolderTitleBar *shell_folder_title_bar)
/**
* e_shell_folder_title_bar_construct:
- * @folder_title_bar:
- *
+ * @folder_title_bar:
+ *
* Construct the folder title bar widget.
**/
void
@@ -552,11 +552,11 @@ e_shell_folder_title_bar_construct (EShellFolderTitleBar *folder_title_bar)
/**
* e_shell_folder_title_bar_new:
- * @void:
- *
+ * @void:
+ *
* Create a new title bar widget.
- *
- * Return value:
+ *
+ * Return value:
**/
GtkWidget *
e_shell_folder_title_bar_new (void)
@@ -572,9 +572,9 @@ e_shell_folder_title_bar_new (void)
/**
* e_shell_folder_title_bar_set_title:
- * @folder_title_bar:
- * @title:
- *
+ * @folder_title_bar:
+ * @title:
+ *
* Set the title for the title bar.
**/
void
@@ -629,9 +629,9 @@ e_shell_folder_title_bar_set_folder_bar_label (EShellFolderTitleBar *folder_titl
/**
* e_shell_folder_title_bar_set_icon:
- * @folder_title_bar:
- * @icon:
- *
+ * @folder_title_bar:
+ * @icon:
+ *
* Set the name of the icon for the title bar.
**/
void
@@ -668,9 +668,9 @@ e_shell_folder_title_bar_set_icon (EShellFolderTitleBar *folder_title_bar,
/**
* e_shell_folder_title_bar_set_toggle_state:
- * @folder_title_bar:
- * @state:
- *
+ * @folder_title_bar:
+ * @state:
+ *
* Set whether the title bar's button is in pressed state (TRUE) or not (FALSE).
**/
void
@@ -689,9 +689,9 @@ e_shell_folder_title_bar_set_toggle_state (EShellFolderTitleBar *folder_title_ba
/**
* e_shell_folder_title_bar_set_clickable:
- * @folder_title_bar:
- * @clickable:
- *
+ * @folder_title_bar:
+ * @clickable:
+ *
* Specify whether the title in the @folder_title_bar is clickable. If not,
* the arrow pixmap is not shown.
**/
diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c
index ab8d4f6caa..23223614ec 100644
--- a/shell/e-shell-importer.c
+++ b/shell/e-shell-importer.c
@@ -90,7 +90,7 @@ typedef struct _ImportDialogImporterPage {
typedef struct _ImportData {
EShell *shell;
EShellWindow *window;
-
+
GladeXML *wizard;
GtkWidget *dialog;
GtkWidget *druid;
@@ -166,9 +166,9 @@ create_help (const char *name)
break;
}
- if (i >= num_info)
+ if (i >= num_info)
g_warning ("i > num_info\n");
-
+
label = gtk_label_new(i < num_info ? _(info[i].text): NULL);
gtk_widget_show (label);
@@ -286,14 +286,14 @@ importer_file_page_new (ImportData *data)
gtk_box_pack_start (GTK_BOX (page->vbox), table, TRUE, TRUE, 0);
label = gtk_label_new_with_mnemonic (_("F_ilename:"));
- gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row + 1,
+ gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row + 1,
GTK_FILL, 0, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5);
page->filename = gtk_file_chooser_button_new (_("Select a file"), GTK_FILE_CHOOSER_ACTION_OPEN);
g_signal_connect (GTK_FILE_CHOOSER_BUTTON (page->filename), "selection-changed", G_CALLBACK (filename_changed), data);
- gtk_table_attach (GTK_TABLE (table), page->filename, 1, 2,
+ gtk_table_attach (GTK_TABLE (table), page->filename, 1, 2,
row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_label_set_mnemonic_widget(GTK_LABEL(label), page->filename);
@@ -305,7 +305,7 @@ importer_file_page_new (ImportData *data)
gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5);
page->filetype = gtk_option_menu_new ();
- gtk_table_attach (GTK_TABLE (table), page->filetype, 1, 2,
+ gtk_table_attach (GTK_TABLE (table), page->filetype, 1, 2,
row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_label_set_mnemonic_widget(GTK_LABEL(label), page->filetype);
@@ -334,7 +334,7 @@ importer_type_page_new (ImportData *data)
page = g_new0 (ImportDialogTypePage, 1);
page->vbox = gtk_vbox_new (FALSE, 5);
- page->intelligent = gtk_radio_button_new_with_mnemonic (NULL,
+ page->intelligent = gtk_radio_button_new_with_mnemonic (NULL,
_("Import data and settings from _older programs"));
gtk_box_pack_start (GTK_BOX (page->vbox), page->intelligent, FALSE, FALSE, 0);
page->file = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (page->intelligent),
@@ -402,7 +402,7 @@ prepare_intelligent_page (GnomeDruidPage *dpage,
gtk_widget_show(label);
g_free(str);
- gtk_misc_set_alignment((GtkMisc *)label, 0, .5);
+ gtk_misc_set_alignment((GtkMisc *)label, 0, .5);
gtk_table_attach((GtkTable *)table, label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0);
if (w)
@@ -424,8 +424,8 @@ import_druid_cancel (GnomeDruid *druid,
}
static gboolean
-import_druid_esc (GnomeDruid *druid,
- GdkEventKey *event,
+import_druid_esc (GnomeDruid *druid,
+ GdkEventKey *event,
ImportData *data)
{
if (event->keyval == GDK_Escape) {
@@ -450,7 +450,7 @@ import_druid_weak_notify (void *blah,
g_slist_free(data->filepage->items);
g_object_unref(data->import);
-
+
g_object_unref(data->wizard);
g_free(data);
}
@@ -493,7 +493,7 @@ import_intelligent_done(EImport *ei, void *d)
} else
import_done(ei, d);
}
-
+
static void
import_druid_finish (GnomeDruidPage *page,
GnomeDruid *druid,
@@ -678,7 +678,7 @@ e_shell_importer_start_import (EShellWindow *shell_window)
data->import = e_import_new("org.gnome.evolution.shell.importer");
icon = e_icon_factory_get_icon ("stock_mail-import", E_ICON_SIZE_DIALOG);
-
+
dialog_open = TRUE;
data->window = shell_window;
data->shell = e_shell_window_peek_shell (data->window);
@@ -692,7 +692,7 @@ e_shell_importer_start_import (EShellWindow *shell_window)
"Evolution:shell");
e_dialog_set_transient_for (GTK_WINDOW (data->dialog), GTK_WIDGET (shell_window));
g_object_weak_ref ((GObject *)data->dialog, dialog_weak_notify, &dialog_open);
-
+
data->druid = glade_xml_get_widget (data->wizard, "druid1");
g_signal_connect (data->druid, "cancel",
G_CALLBACK (import_druid_cancel), data);
@@ -730,9 +730,9 @@ e_shell_importer_start_import (EShellWindow *shell_window)
html = create_help ("intelligent_html");
gtk_box_pack_start (GTK_BOX (data->importerpage->vbox), html, FALSE, TRUE, 0);
gtk_box_reorder_child (GTK_BOX (data->importerpage->vbox), html, 0);
-
+
gtk_box_pack_start (GTK_BOX (GNOME_DRUID_PAGE_STANDARD (data->intelligent)->vbox), data->importerpage->vbox, TRUE, TRUE, 0);
-
+
/* File selection and file type page */
data->filedialog = glade_xml_get_widget (data->wizard, "page2-file");
diff --git a/shell/e-shell-nm-glib.c b/shell/e-shell-nm-glib.c
index a85cfd50f4..e14a2afee8 100644
--- a/shell/e-shell-nm-glib.c
+++ b/shell/e-shell-nm-glib.c
@@ -48,7 +48,7 @@ static void e_shell_glib_network_monitor (libnm_glib_ctx *ctx, gpointer user_dat
if (line_status == E_SHELL_LINE_STATUS_ONLINE && state == LIBNM_NO_NETWORK_CONNECTION) {
shell_state = GNOME_Evolution_FORCED_OFFLINE;
- e_shell_go_offline (shell, window, shell_state);
+ e_shell_go_offline (shell, window, shell_state);
} else if (line_status == E_SHELL_LINE_STATUS_OFFLINE && state == LIBNM_ACTIVE_NETWORK_CONNECTION) {
shell_state = GNOME_Evolution_USER_ONLINE;
e_shell_go_online (shell, window, shell_state);
@@ -66,11 +66,11 @@ int e_shell_nm_glib_initialise (EShellWindow *window)
if (!nm_ctx) {
fprintf (stderr, "Could not initialize libnm.\n");
return FALSE;
- }
+ }
}
id = libnm_glib_register_callback (nm_ctx, e_shell_glib_network_monitor, window, NULL);
-
+
return TRUE;
}
diff --git a/shell/e-shell-nm.c b/shell/e-shell-nm.c
index 4c0a8a52e1..de06ed2d8a 100644
--- a/shell/e-shell-nm.c
+++ b/shell/e-shell-nm.c
@@ -51,9 +51,9 @@ reinit_dbus (gpointer user_data)
{
if (init_dbus (user_data))
return FALSE;
-
+
/* keep trying to re-establish dbus connection */
-
+
return TRUE;
}
@@ -68,41 +68,41 @@ e_shell_network_monitor (DBusConnection *connection G_GNUC_UNUSED,
EShell *shell = e_shell_window_peek_shell ((EShellWindow *) user_data);
GNOME_Evolution_ShellState shell_state;
EShellLineStatus line_status;
-
+
dbus_error_init (&error);
object = dbus_message_get_path (message);
-
+
if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected") &&
strcmp (dbus_message_get_path (message), DBUS_PATH_LOCAL) == 0) {
dbus_connection_unref (dbus_connection);
dbus_connection = NULL;
-
+
g_timeout_add (3000, reinit_dbus, window);
-
+
return DBUS_HANDLER_RESULT_HANDLED;
}
-
+
if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNoLongerActive"))
status = E_SHELL_LINE_DOWN;
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNowActive"))
+ else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNowActive"))
status = E_SHELL_LINE_UP;
else
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-
+
if (!dbus_message_get_args (message, &error, DBUS_TYPE_OBJECT_PATH,
&object, DBUS_TYPE_INVALID))
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-
+
line_status = e_shell_get_line_status (shell);
-
+
if (line_status == E_SHELL_LINE_STATUS_ONLINE && status == E_SHELL_LINE_DOWN) {
shell_state = GNOME_Evolution_FORCED_OFFLINE;
- e_shell_go_offline (shell, window, shell_state);
+ e_shell_go_offline (shell, window, shell_state);
} else if (line_status == E_SHELL_LINE_STATUS_OFFLINE && status == E_SHELL_LINE_UP) {
shell_state = GNOME_Evolution_USER_ONLINE;
e_shell_go_online (shell, window, shell_state);
}
-
+
return DBUS_HANDLER_RESULT_HANDLED;
}
@@ -110,23 +110,23 @@ static gboolean
init_dbus (EShellWindow *window)
{
DBusError error;
-
+
if (dbus_connection != NULL)
return TRUE;
-
+
dbus_error_init (&error);
if (!(dbus_connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error))) {
g_warning ("could not get system bus: %s\n", error.message);
dbus_error_free (&error);
return FALSE;
}
-
+
dbus_connection_setup_with_g_main (dbus_connection, NULL);
dbus_connection_set_exit_on_disconnect (dbus_connection, FALSE);
-
+
if (!dbus_connection_add_filter (dbus_connection, e_shell_network_monitor, window, NULL))
goto exception;
-
+
dbus_bus_add_match (dbus_connection,
"type='signal',"
"interface='" NM_DBUS_INTERFACE "',"
@@ -136,21 +136,21 @@ init_dbus (EShellWindow *window)
dbus_error_free (&error);
goto exception;
}
-
+
return TRUE;
-
+
exception:
-
+
dbus_connection_unref (dbus_connection);
dbus_connection = NULL;
-
+
return FALSE;
}
int e_shell_dbus_initialise (EShellWindow *window)
{
g_type_init ();
-
+
return init_dbus (window);
}
diff --git a/shell/e-shell-settings-dialog.c b/shell/e-shell-settings-dialog.c
index ec6495dde8..a6de85d45c 100644
--- a/shell/e-shell-settings-dialog.c
+++ b/shell/e-shell-settings-dialog.c
@@ -158,7 +158,7 @@ load_pages (EShellSettingsDialog *dialog)
int i, j;
priv = dialog->priv;
-
+
CORBA_exception_init (&ev);
control_list = bonobo_activation_query ("repo_ids.has('IDL:GNOME/Evolution/ConfigControl:" BASE_VERSION "')", NULL, &ev);
@@ -249,15 +249,15 @@ load_pages (EShellSettingsDialog *dialog)
if (page->type != NULL) {
Bonobo_StringList list = page->type->v._u.value_stringv;
-
+
for (j = 0; j < list._length; j++) {
if (g_hash_table_lookup (priv->types, list._buffer[j]) == NULL)
- g_hash_table_insert (priv->types, g_strdup (list._buffer[j]),
+ g_hash_table_insert (priv->types, g_strdup (list._buffer[j]),
GINT_TO_POINTER (i));
}
}
-
-
+
+
page_free (page);
}
@@ -276,11 +276,11 @@ impl_finalize (GObject *object)
dialog = E_SHELL_SETTINGS_DIALOG (object);
priv = dialog->priv;
-
+
g_hash_table_destroy (priv->types);
g_free (priv);
-
+
(* G_OBJECT_CLASS (e_shell_settings_dialog_parent_class)->finalize) (object);
}
@@ -309,7 +309,7 @@ e_shell_settings_dialog_init (EShellSettingsDialog *dialog)
load_pages (dialog);
set_dialog_size (dialog);
-
+
gtk_window_set_title (GTK_WINDOW (dialog), _("Evolution Preferences"));
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
}
@@ -331,13 +331,13 @@ e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, const char *typ
EShellSettingsDialogPrivate *priv;
gpointer key, value;
int page;
-
+
g_return_if_fail (dialog != NULL);
g_return_if_fail (E_IS_SHELL_SETTINGS_DIALOG (dialog));
g_return_if_fail (type != NULL);
priv = dialog->priv;
-
+
if (!g_hash_table_lookup_extended (priv->types, type, &key, &value)) {
char *slash, *supertype;
@@ -350,7 +350,7 @@ e_shell_settings_dialog_show_type (EShellSettingsDialog *dialog, const char *typ
value = NULL;
}
page = GPOINTER_TO_INT (value);
-
+
e_multi_config_dialog_show_page (E_MULTI_CONFIG_DIALOG (dialog), page);
}
diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c
index c8846dfff8..0343c4eb25 100644
--- a/shell/e-shell-utils.c
+++ b/shell/e-shell-utils.c
@@ -118,14 +118,14 @@ e_shell_folder_name_is_valid (const char *name,
*reason_return = _("No folder name specified.");
return FALSE;
}
-
+
/* GtkEntry is broken - if you hit KP_ENTER you get a \r inserted... */
if (strchr (name, '\r')) {
if (reason_return != NULL)
*reason_return = _("Folder name cannot contain the Return character.");
return FALSE;
}
-
+
if (strchr (name, E_PATH_SEPARATOR) != NULL) {
if (reason_return != NULL)
*reason_return = _("Folder name cannot contain the character \"/\".");
@@ -145,7 +145,7 @@ e_shell_folder_name_is_valid (const char *name,
}
*reason_return = NULL;
-
+
return TRUE;
}
diff --git a/shell/e-shell-window-commands.c b/shell/e-shell-window-commands.c
index 799cb2002d..7700e86608 100644
--- a/shell/e-shell-window-commands.c
+++ b/shell/e-shell-window-commands.c
@@ -639,7 +639,7 @@ static const char *authors[] = {
NULL
};
-static const char *documentors[] = {
+static const char *documentors[] = {
"Aaron Weber",
"Binika Preet",
"Dan Winship",
@@ -688,7 +688,7 @@ command_help_faq (BonoboUIComponent *uih,
{
/* FIXME Show when we have a faq */
/* FIXME use the error */
- gnome_url_show ("http://gnome.org/projects/evolution/faq.shtml", NULL);
+ gnome_url_show ("http://gnome.org/projects/evolution/faq.shtml", NULL);
}
#endif
@@ -780,7 +780,7 @@ command_forget_passwords (BonoboUIComponent *ui_component,
void *data,
const char *path)
{
- if (e_error_run (NULL, "shell:forget-passwords", NULL) == GTK_RESPONSE_OK)
+ if (e_error_run (NULL, "shell:forget-passwords", NULL) == GTK_RESPONSE_OK)
e_passwords_forget_passwords();
}
@@ -853,7 +853,7 @@ static EPixmap pixmaps [] = {
E_PIXMAP ("/menu/File/FileClose", "window-close", E_ICON_SIZE_MENU),
E_PIXMAP ("/menu/File/FileExit", "application-exit", E_ICON_SIZE_MENU),
E_PIXMAP ("/menu/Edit/Settings", "preferences-desktop", E_ICON_SIZE_MENU),
-
+
E_PIXMAP_END
};
@@ -994,7 +994,7 @@ view_buttons_hide_item_toggled_handler (BonoboUIComponent *ui_componen
gboolean is_visible;
sidebar = e_shell_window_peek_sidebar (shell_window);
-
+
is_visible = state[0] == '0';
e_sidebar_set_show_buttons (sidebar, is_visible);
@@ -1026,7 +1026,7 @@ view_statusbar_item_toggled_handler (BonoboUIComponent *ui_component,
gboolean is_visible;
GConfClient *gconf_client;
- is_visible = state[0] == '1';
+ is_visible = state[0] == '1';
if(is_visible)
gtk_widget_show (status_bar);
else
@@ -1047,7 +1047,7 @@ view_sidebar_item_toggled_handler (BonoboUIComponent *ui_component,
gboolean is_visible;
GConfClient *gconf_client;
- is_visible = state[0] == '1';
+ is_visible = state[0] == '1';
if(is_visible)
gtk_widget_show (side_bar);
else
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index a76183c7f6..d897160807 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -106,7 +106,7 @@ struct _EShellWindowPrivate {
/* The sidebar. */
GtkWidget *sidebar;
-
+
/* Notebooks used to switch between components. */
GtkWidget *sidebar_notebook;
GtkWidget *view_notebook;
@@ -467,7 +467,7 @@ sidebar_button_pressed_callback (ESidebar *sidebar,
ComponentView *component_view;
if ((component_view = get_component_view (window, button_id))) {
- e_shell_create_window (window->priv->shell.eshell,
+ e_shell_create_window (window->priv->shell.eshell,
component_view->component_id,
window);
}
@@ -624,7 +624,7 @@ setup_nm_support (EShellWindow *window)
e_shell_nm_glib_initialise (window);
#elif NM_SUPPORT
e_shell_dbus_initialise (window);
- #endif
+ #endif
}
static void
@@ -688,7 +688,7 @@ setup_widgets (EShellWindow *window)
gboolean visible;
char *style;
int mode;
-
+
priv->paned = gtk_hpaned_new ();
gtk_widget_show (priv->paned);
@@ -730,7 +730,7 @@ setup_widgets (EShellWindow *window)
style = gconf_client_get_string (gconf_client,
"/apps/evolution/shell/view_defaults/buttons_style",
NULL);
-
+
if (gconf_string_to_enum (button_styles, style, &mode)) {
switch (mode) {
case E_SIDEBAR_MODE_TEXT:
@@ -755,7 +755,7 @@ setup_widgets (EShellWindow *window)
"state", "1", NULL);
break;
}
-
+
e_sidebar_set_mode (E_SIDEBAR (priv->sidebar), mode);
}
g_free (style);
@@ -870,7 +870,7 @@ impl_dispose (GObject *object)
EShellWindowPrivate *priv = self->priv;
priv->destroyed = TRUE;
-
+
if (priv->shell.eshell != NULL) {
g_object_remove_weak_pointer (G_OBJECT (priv->shell.eshell), &priv->shell.pointer);
priv->shell.eshell = NULL;
@@ -889,11 +889,11 @@ impl_dispose (GObject *object)
if (priv->store_window_size_timer) {
g_source_remove (priv->store_window_size_timer);
self->priv->store_window_size_timer = 0;
-
+
/* There was a timer. Let us store the settings.*/
- store_window_size (GTK_WIDGET (self));
+ store_window_size (GTK_WIDGET (self));
}
-
+
#ifdef NM_SUPPORT_GLIB
e_shell_nm_glib_dispose (E_SHELL_WINDOW (object));
#elif NM_SUPPORT
@@ -1015,7 +1015,7 @@ e_shell_window_init (EShellWindow *shell_window)
priv->tooltips = gtk_tooltips_new ();
priv->shell_view = e_shell_view_new(shell_window);
priv->destroyed = FALSE;
-
+
shell_window->priv = priv;
/** @HookPoint: Shell Main Menu
@@ -1234,7 +1234,7 @@ e_shell_window_save_defaults (EShellWindow *window)
NULL);
g_free (prop);
}
-
+
/* SideBar visibility setting */
prop = bonobo_ui_component_get_prop (e_shell_window_peek_bonobo_ui_component (window),
"/commands/ViewSideBar",
@@ -1248,7 +1248,7 @@ e_shell_window_save_defaults (EShellWindow *window)
NULL);
g_free (prop);
}
-
+
g_object_unref (client);
}
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 0fdf766903..4e651453a4 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -165,11 +165,11 @@ set_interactive (EShell *shell,
GtkWidget *view;
g_return_if_fail (E_IS_SHELL (shell));
-
+
shell->priv->is_interactive = interactive;
num_windows = g_list_length (shell->priv->windows);
-
+
/* We want to send the "interactive" message only when the first
window is created */
if (num_windows != 1)
@@ -196,7 +196,7 @@ set_interactive (EShell *shell,
/* Ignore errors, the components can decide to not implement
this interface. */
-
+
CORBA_exception_free (&ev);
}
}
@@ -249,7 +249,7 @@ impl_Shell_createNewWindow (PortableServer_Servant servant,
/* refs?? */
shell_view = e_shell_view_new(shell_window);
-
+
return BONOBO_OBJREF(shell_view);
}
@@ -283,14 +283,14 @@ impl_Shell_handleURI (PortableServer_Servant servant,
if (show) {
GtkWidget *shell_window;
-
+
shell_window = (GtkWidget *)e_shell_create_window (shell, component_info->id, NULL);
if (shell_window == NULL) {
CORBA_exception_set (ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Shell_ComponentNotFound, NULL);
return;
}
}
-
+
GNOME_Evolution_Component_handleURI (component_info->iface, uri, ev);
/* not an error not to implement it */
if (ev->_id != NULL && strcmp(ev->_id, ex_CORBA_NO_IMPLEMENT) == 0)
@@ -556,10 +556,10 @@ detect_version (GConfClient *gconf, int *major, int *minor, int *revision)
{
char *val, *evolution_dir;
struct stat st;
-
+
evolution_dir = g_build_filename (g_get_home_dir (), "evolution", NULL);
-
- val = gconf_client_get_string(gconf, "/apps/evolution/version", NULL);
+
+ val = gconf_client_get_string(gconf, "/apps/evolution/version", NULL);
if (val) {
/* Since 1.4.0 We've been keeping the version key in gconf */
sscanf(val, "%d.%d.%d", major, minor, revision);
@@ -593,7 +593,7 @@ detect_version (GConfClient *gconf, int *major, int *minor, int *revision)
}
g_free (tmp);
if (config_doc)
- xmlFreeDoc (config_doc);
+ xmlFreeDoc (config_doc);
}
g_free (evolution_dir);
@@ -615,9 +615,9 @@ attempt_upgrade (EShell *shell, int major, int minor, int revision)
CORBA_Environment ev;
CORBA_exception_init (&ev);
-
+
GNOME_Evolution_Component_upgradeFromVersion (info->iface, major, minor, revision, &ev);
-
+
if (BONOBO_EX (&ev)) {
char *exception_text;
CORBA_char *id = CORBA_exception_id(&ev);
@@ -654,7 +654,7 @@ attempt_upgrade (EShell *shell, int major, int minor, int revision)
* @shell: An EShell object to construct
* @iid: OAFIID for registering the shell into the name server
* @startup_line_mode: How to set up the line mode (online or offline) initally.
- *
+ *
* Construct @shell so that it uses the specified @corba_object.
*
* Return value: The result of the operation.
@@ -668,31 +668,31 @@ e_shell_construct (EShell *shell,
CORBA_Object corba_object;
gboolean start_online;
GSList *component;
-
+
g_return_val_if_fail (E_IS_SHELL (shell), E_SHELL_CONSTRUCT_RESULT_INVALIDARG);
g_return_val_if_fail (startup_line_mode == E_SHELL_STARTUP_LINE_MODE_CONFIG
|| startup_line_mode == E_SHELL_STARTUP_LINE_MODE_ONLINE
|| startup_line_mode == E_SHELL_STARTUP_LINE_MODE_OFFLINE,
E_SHELL_CONSTRUCT_RESULT_INVALIDARG);
-
+
priv = shell->priv;
priv->iid = g_strdup (iid);
/* Now we can register into OAF. Notice that we shouldn't be
registering into OAF until we are sure we can complete. */
-
+
/* FIXME: Multi-display stuff. */
corba_object = bonobo_object_corba_objref (BONOBO_OBJECT (shell));
if (bonobo_activation_active_server_register (iid, corba_object) != Bonobo_ACTIVATION_REG_SUCCESS)
return E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER;
while (gtk_events_pending ())
- gtk_main_iteration ();
-
+ gtk_main_iteration ();
+
/* activate all the components (peek list does this implictly) */
/* Do we really need to assign the result of this to the list? */
component = e_component_registry_peek_list (shell->priv->component_registry);
-
+
e_shell_attempt_upgrade(shell);
priv->is_initialized = TRUE;
@@ -725,10 +725,10 @@ e_shell_construct (EShell *shell,
* @start_online: Whether to start in on-line mode or not.
* @construct_result_return: A pointer to an EShellConstructResult variable into
* which the result of the operation will be stored.
- *
+ *
* Create a new EShell.
- *
- * Return value:
+ *
+ * Return value:
**/
EShell *
e_shell_new (EShellStartupLineMode startup_line_mode,
@@ -793,10 +793,10 @@ fail:
/**
* e_shell_attempt_upgrade:
- * @shell:
- *
+ * @shell:
+ *
* Upgrade config and components from the currently installed version.
- *
+ *
* Return value: %TRUE If it works. If it fails the application will exit.
**/
gboolean
@@ -904,13 +904,13 @@ check_old:
/** @Event: Shell attempted upgrade
* @Id: upgrade.done
* @Target: ESMenuTargetState
- *
+ *
* This event is emitted whenever the shell successfully attempts an upgrade.
*
*/
ese = es_event_peek();
e_event_emit((EEvent *)ese, "upgrade.done", (EEventTarget *)es_event_target_new_upgrade(ese, cmajor, cminor, crevision));
-
+
return TRUE;
}
@@ -919,9 +919,9 @@ check_old:
* @shell: The shell for which to create a new window.
* @component_id: Id or alias of the component to display in the new window.
* @template_window: Window from which to copy the window settings (can be %NULL).
- *
+ *
* Create a new window for @uri.
- *
+ *
* Return value: The new window.
**/
EShellWindow *
@@ -952,7 +952,7 @@ e_shell_create_window (EShell *shell,
if (!session_started) {
ESEvent *ese;
-
+
session_started = TRUE;
ese = es_event_peek();
e_event_emit((EEvent *)ese, "started.done", (EEventTarget *)es_event_target_new_shell(ese, shell));
@@ -981,9 +981,9 @@ e_shell_request_close_window (EShell *shell,
/**
* e_shell_peek_uri_schema_registry:
* @shell: An EShell object.
- *
+ *
* Get the schema registry associated to @shell.
- *
+ *
* Return value: A pointer to the EUriSchemaRegistry associated to @shell.
**/
EUriSchemaRegistry *
@@ -998,11 +998,11 @@ e_shell_peek_uri_schema_registry (EShell *shell)
/**
* e_shell_peek_component_registry:
- * @shell:
- *
+ * @shell:
+ *
* Get the component registry associated to @shell.
- *
- * Return value:
+ *
+ * Return value:
**/
EComponentRegistry *
e_shell_peek_component_registry (EShell *shell)
@@ -1015,10 +1015,10 @@ e_shell_peek_component_registry (EShell *shell)
/**
* e_shell_save_settings:
- * @shell:
- *
+ * @shell:
+ *
* Save the settings for this shell.
- *
+ *
* Return value: %TRUE if it worked, %FALSE otherwise. Even if %FALSE is
* returned, it is possible that at least part of the settings for the windows
* have been saved.
@@ -1040,8 +1040,8 @@ e_shell_save_settings (EShell *shell)
/**
* e_shell_close_all_windows:
- * @shell:
- *
+ * @shell:
+ *
* Destroy all the windows in @shell.
**/
void
@@ -1054,7 +1054,7 @@ e_shell_close_all_windows (EShell *shell)
g_return_if_fail (E_IS_SHELL (shell));
if (shell->priv->windows)
- e_shell_save_settings (shell);
+ e_shell_save_settings (shell);
priv = shell->priv;
for (p = priv->windows; p != NULL; p = pnext) {
@@ -1069,9 +1069,9 @@ e_shell_close_all_windows (EShell *shell)
/**
* e_shell_get_line_status:
* @shell: A pointer to an EShell object.
- *
+ *
* Get the line status for @shell.
- *
+ *
* Return value: The current line status for @shell.
**/
EShellLineStatus
@@ -1100,7 +1100,7 @@ set_line_status_finished(EShell *shell)
/** @Event: Shell online state changed
* @Id: state.changed
* @Target: ESMenuTargetState
- *
+ *
* This event is emitted whenever the shell online state changes.
*
* Only the online and offline states are emitted.
@@ -1133,10 +1133,10 @@ set_line_status(EShell *shell, GNOME_Evolution_ShellState shell_state)
gboolean status;
priv = shell->priv;
-
+
if (shell_state == GNOME_Evolution_FORCED_OFFLINE || shell_state == GNOME_Evolution_USER_OFFLINE)
status = FALSE;
- else
+ else
status = TRUE;
if ((status && priv->line_status == E_SHELL_LINE_STATUS_ONLINE)
@@ -1165,7 +1165,7 @@ set_line_status(EShell *shell, GNOME_Evolution_ShellState shell_state)
GNOME_Evolution_Component_setLineStatus(info->iface, shell_state, bonobo_object_corba_objref((BonoboObject *)priv->line_status_listener), &ev);
if (ev._major == CORBA_NO_EXCEPTION)
priv->line_status_pending++;
-
+
CORBA_exception_free (&ev);
}
@@ -1176,9 +1176,9 @@ set_line_status(EShell *shell, GNOME_Evolution_ShellState shell_state)
/**
* e_shell_go_offline:
- * @shell:
+ * @shell:
* @action_window: Obsolete/unused.
- *
+ *
* Make the shell go into off-line mode.
**/
void
@@ -1195,9 +1195,9 @@ e_shell_go_offline (EShell *shell,
/**
* e_shell_go_online:
- * @shell:
+ * @shell:
* @action_window: Obsolete/unused.
- *
+ *
* Make the shell go into on-line mode.
**/
void
@@ -1243,18 +1243,18 @@ e_shell_show_settings (EShell *shell,
EShellWindow *shell_window)
{
EShellPrivate *priv;
-
+
g_return_if_fail (shell != NULL);
g_return_if_fail (E_IS_SHELL (shell));
priv = shell->priv;
-
+
if (priv->settings_dialog.widget != NULL) {
gdk_window_show (priv->settings_dialog.widget->window);
gtk_widget_grab_focus (priv->settings_dialog.widget);
return;
}
-
+
priv->settings_dialog.widget = e_shell_settings_dialog_new ();
if (type != NULL)
diff --git a/shell/e-sidebar.c b/shell/e-sidebar.c
index 24f685a525..9bf9b0ae33 100644
--- a/shell/e-sidebar.c
+++ b/shell/e-sidebar.c
@@ -50,9 +50,9 @@ typedef struct {
struct _ESidebarPrivate {
ESidebarMode mode;
ESidebarMode toolbar_mode;
-
+
gboolean show;
-
+
GtkWidget *selection_widget;
GSList *buttons;
@@ -222,7 +222,7 @@ layout_buttons (ESidebar *sidebar)
gtk_widget_size_request (GTK_WIDGET (button->button_widget), &requisition);
max_btn_height = MAX (max_btn_height, requisition.height);
- max_btn_width = MAX (max_btn_width, requisition.width);
+ max_btn_width = MAX (max_btn_width, requisition.width);
}
/* Figure out how many rows and columns we'll use. */
@@ -264,7 +264,7 @@ layout_buttons (ESidebar *sidebar)
/* Layout the buttons. */
for (i = row_last; i >= 0; i --) {
int len, extra_width;
-
+
y -= max_btn_height;
x = H_PADDING + allocation->x;
len = g_slist_length (rows[i]);
@@ -306,13 +306,13 @@ do_layout (ESidebar *sidebar)
y = layout_buttons (sidebar);
else
y = allocation->y + allocation->height;
-
+
/* Place the selection widget. */
child_allocation.x = allocation->x;
child_allocation.y = allocation->y;
child_allocation.width = allocation->width;
child_allocation.height = y - allocation->y;
-
+
gtk_widget_size_allocate (sidebar->priv->selection_widget, & child_allocation);
}
@@ -380,7 +380,7 @@ impl_size_request (GtkWidget *widget,
if (!sidebar->priv->show)
return;
-
+
for (p = sidebar->priv->buttons; p != NULL; p = p->next) {
Button *button = p->data;
GtkRequisition button_requisition;
@@ -418,7 +418,7 @@ impl_dispose (GObject *object)
gconf_client_notify_remove (gconf_client, priv->style_changed_id);
priv->style_changed_id = 0;
}
-
+
g_object_unref (gconf_client);
(* G_OBJECT_CLASS (e_sidebar_parent_class)->dispose) (object);
@@ -431,7 +431,7 @@ boolean_handled_accumulator (GSignalInvocationHint *ihint,
gpointer dummy)
{
gboolean handled;
-
+
handled = g_value_get_boolean (handler_return);
g_value_set_boolean (return_accu, handled);
@@ -493,7 +493,7 @@ e_sidebar_init (ESidebar *sidebar)
ESidebarPrivate *priv;
GTK_WIDGET_SET_FLAGS (sidebar, GTK_NO_WINDOW);
-
+
priv = g_new0 (ESidebarPrivate, 1);
sidebar->priv = priv;
@@ -550,12 +550,12 @@ e_sidebar_add_button (ESidebar *sidebar,
icon_widget = gtk_image_new_from_pixbuf (icon);
gtk_widget_show (icon_widget);
-
+
label_widget = gtk_label_new (label);
gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5);
gtk_widget_show (label_widget);
button_tooltips = gtk_tooltips_new();
- gtk_tooltips_set_tip (GTK_TOOLTIPS (button_tooltips), button_widget, tooltips, NULL);
+ gtk_tooltips_set_tip (GTK_TOOLTIPS (button_tooltips), button_widget, tooltips, NULL);
switch (INTERNAL_MODE (sidebar)) {
case E_SIDEBAR_MODE_TEXT:
@@ -653,7 +653,7 @@ set_mode_internal (ESidebar *sidebar, ESidebarMode mode )
if (mode == INTERNAL_MODE (sidebar))
return;
-
+
for (p = sidebar->priv->buttons; p != NULL; p = p->next) {
Button *button = p->data;
@@ -703,8 +703,8 @@ style_changed_notify (GConfClient *gconf, guint id, GConfEntry *entry, void *dat
{
ESidebar *sidebar = data;
char *val;
- int mode;
-
+ int mode;
+
val = gconf_client_get_string (gconf, "/desktop/gnome/interface/toolbar_style", NULL);
if (val == NULL || !gconf_string_to_enum (toolbar_styles, val, &mode))
mode = E_SIDEBAR_MODE_BOTH;
@@ -728,9 +728,9 @@ e_sidebar_set_mode (ESidebar *sidebar, ESidebarMode mode)
if (sidebar->priv->style_changed_id) {
gconf_client_notify_remove (gconf_client, sidebar->priv->style_changed_id);
sidebar->priv->style_changed_id = 0;
- }
+ }
}
-
+
if (mode != E_SIDEBAR_MODE_TOOLBAR) {
set_mode_internal (sidebar, mode);
@@ -747,7 +747,7 @@ e_sidebar_set_mode (ESidebar *sidebar, ESidebarMode mode)
style_changed_notify, sidebar, NULL, NULL);
style_changed_notify (gconf_client, 0, NULL, sidebar);
}
-
+
g_object_unref (gconf_client);
sidebar->priv->mode = mode;
@@ -760,7 +760,7 @@ e_sidebar_set_show_buttons (ESidebar *sidebar, gboolean show)
if (sidebar->priv->show == show)
return;
-
+
for (p = sidebar->priv->buttons; p != NULL; p = p->next) {
Button *button = p->data;
@@ -774,7 +774,7 @@ e_sidebar_set_show_buttons (ESidebar *sidebar, gboolean show)
gtk_widget_queue_resize (GTK_WIDGET (sidebar));
}
-
+
gboolean
e_sidebar_get_show_buttons (ESidebar *sidebar)
{
diff --git a/shell/e-user-creatable-items-handler.c b/shell/e-user-creatable-items-handler.c
index b367113683..bd72b57f59 100644
--- a/shell/e-user-creatable-items-handler.c
+++ b/shell/e-user-creatable-items-handler.c
@@ -382,7 +382,7 @@ execute_verb (EUserCreatableItemsHandler *handler,
CORBA_Environment ev;
CORBA_exception_init (&ev);
-
+
GNOME_Evolution_Component_requestCreateItem (component->component, id, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
@@ -706,8 +706,8 @@ new_button_change (GConfClient *gconf,
priv = handler->priv;
val = gconf_client_get_string (gconf, "/desktop/gnome/interface/toolbar_style", NULL);
- set_combo_button_style (E_COMBO_BUTTON (priv->new_button),
- val, priv->default_menu_item->icon);
+ set_combo_button_style (E_COMBO_BUTTON (priv->new_button),
+ val, priv->default_menu_item->icon);
g_free (val);
gtk_widget_show (priv->new_button);
@@ -731,7 +731,7 @@ setup_toolbar_button (EUserCreatableItemsHandler *handler)
gtk_widget_show_all (priv->new_menu);
e_combo_button_set_menu (E_COMBO_BUTTON (priv->new_button),
GTK_MENU (priv->new_menu));
-
+
g_signal_connect (priv->new_button, "activate_default",
G_CALLBACK (default_activate), handler);
@@ -745,11 +745,11 @@ setup_toolbar_button (EUserCreatableItemsHandler *handler)
}
gtk_widget_set_sensitive (priv->new_button, TRUE);
-
- set_combo_button_style (E_COMBO_BUTTON (priv->new_button),
- val, priv->default_menu_item->icon);
- gconf_client_notify_add(gconf,"/desktop/gnome/interface/toolbar_style",
+ set_combo_button_style (E_COMBO_BUTTON (priv->new_button),
+ val, priv->default_menu_item->icon);
+
+ gconf_client_notify_add(gconf,"/desktop/gnome/interface/toolbar_style",
(GConfClientNotifyFunc)new_button_change, handler, NULL, NULL);
gtk_widget_show (priv->new_button);
@@ -775,7 +775,7 @@ impl_set_property (GObject *object, guint prop_id,
case PROP_THIS_COMPONENT:
handler->priv->this_component = g_value_dup_string (value);
- get_components_from_bonobo (handler);
+ get_components_from_bonobo (handler);
ensure_menu_items (handler);
break;
default:
@@ -843,7 +843,7 @@ static void
e_user_creatable_items_handler_class_init (EUserCreatableItemsHandlerClass *klass)
{
GObjectClass *object_class;
-
+
object_class = G_OBJECT_CLASS (klass);
object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
@@ -888,7 +888,7 @@ e_user_creatable_items_handler_new (const char *component_alias,
* e_user_creatable_items_handler_activate:
* @handler: the #EUserCreatableItemsHandler
* @ui_component: the #BonoboUIComponent to attach to
- *
+ *
* Set up the menus and toolbar items for @ui_component.
**/
void
diff --git a/shell/es-event.c b/shell/es-event.c
index 78847e3f49..89ba18f492 100644
--- a/shell/es-event.c
+++ b/shell/es-event.c
@@ -90,11 +90,11 @@ es_event_get_type(void)
/**
* es_event_peek:
- * @void:
- *
+ * @void:
+ *
* Get the singular instance of the shell event handler.
- *
- * Return value:
+ *
+ * Return value:
**/
ESEvent *es_event_peek(void)
{
@@ -148,7 +148,7 @@ es_event_target_new_upgrade(ESEvent *eme, int major, int minor, int revision)
t->minor = minor;
t->revision = revision;
- return t;
+ return t;
}
/* ********************************************************************** */
@@ -185,7 +185,7 @@ emeh_class_init(EPluginHookClass *klass)
/** @HookClass: Shell Main Menu
* @Id: org.gnome.evolution.shell.events:1.0
* @Target: ESEventTargetState
- *
+ *
* A hook for events coming from the shell.
**/
@@ -202,7 +202,7 @@ GType
es_event_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(ESEventHookClass), NULL, NULL, (GClassInitFunc) emeh_class_init, NULL, NULL,
@@ -212,6 +212,6 @@ es_event_hook_get_type(void)
emeh_parent_class = g_type_class_ref(e_event_hook_get_type());
type = g_type_register_static(e_event_hook_get_type(), "ESEventHook", &info, 0);
}
-
+
return type;
}
diff --git a/shell/es-menu.c b/shell/es-menu.c
index 2d62bf16f2..ed7ceef46c 100644
--- a/shell/es-menu.c
+++ b/shell/es-menu.c
@@ -100,10 +100,10 @@ ESMenu *es_menu_new(const char *menuid)
* es_menu_target_new_shell:
* @esm:
* @flags:
- *
+ *
* Create a new menu target for the shell.
- *
- * Return value:
+ *
+ * Return value:
**/
ESMenuTargetShell *
es_menu_target_new_shell(ESMenu *esm, guint32 flags)
@@ -150,7 +150,7 @@ esph_class_init(EPluginHookClass *klass)
/** @HookClass: Shell Main Menu
* @Id: org.gnome.evolution.shell.bonobomenu:1.0
* @Target: ESMenuTargetShell
- *
+ *
* A hook for the main menus from the shell component.
*
* These menu's will be available from all components, but
@@ -171,7 +171,7 @@ GType
es_menu_hook_get_type(void)
{
static GType type = 0;
-
+
if (!type) {
static const GTypeInfo info = {
sizeof(ESMenuHookClass), NULL, NULL, (GClassInitFunc) esph_class_init, NULL, NULL,
@@ -181,6 +181,6 @@ es_menu_hook_get_type(void)
esph_parent_class = g_type_class_ref(e_menu_hook_get_type());
type = g_type_register_static(e_menu_hook_get_type(), "ESMenuHook", &info, 0);
}
-
+
return type;
}
diff --git a/shell/evolution-component.c b/shell/evolution-component.c
index fd8a6e5d74..07de00c282 100644
--- a/shell/evolution-component.c
+++ b/shell/evolution-component.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
+/*
* Copyright (C) 2005 Novell, Inc.
*
* Authors: Michael Zucchi <notzed@novell.com>
diff --git a/shell/evolution-config-control.c b/shell/evolution-config-control.c
index 6b00fd8559..3e38a43456 100644
--- a/shell/evolution-config-control.c
+++ b/shell/evolution-config-control.c
@@ -129,7 +129,7 @@ evolution_config_control_class_init (EvolutionConfigControlClass *class)
epv = &class->epv;
epv->_get_control = impl__get_control;
epv->_get_eventSource = impl__get_eventSource;
-
+
parent_class = g_type_class_ref (PARENT_TYPE);
}
diff --git a/shell/evolution-listener.c b/shell/evolution-listener.c
index 83d5d6a34e..3e2cfa944c 100644
--- a/shell/evolution-listener.c
+++ b/shell/evolution-listener.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/*
+/*
* Copyright (C) 2005 Novell, Inc.
*
* Authors: Michael Zucchi <notzed@novell.com>
diff --git a/shell/evolution-shell-component-utils.c b/shell/evolution-shell-component-utils.c
index cbdbac0c10..bd63228deb 100644
--- a/shell/evolution-shell-component-utils.c
+++ b/shell/evolution-shell-component-utils.c
@@ -89,9 +89,9 @@ free_pixmaps (void)
/**
* e_get_activation_failure_msg:
* @ev: An exception returned by an oaf_activate call.
- *
+ *
* Get a descriptive error message from @ev.
- *
+ *
* Return value: A newly allocated string with the printable error message.
**/
char *
@@ -103,7 +103,7 @@ e_get_activation_failure_msg (CORBA_Environment *ev)
return NULL;
if (strcmp (CORBA_exception_id (ev), ex_Bonobo_GeneralError) != 0) {
- return bonobo_exception_get_text (ev);
+ return bonobo_exception_get_text (ev);
} else {
const Bonobo_GeneralError *oaf_general_error;
diff --git a/shell/importer/evolution-importer-client.c b/shell/importer/evolution-importer-client.c
index 24ed38b445..89cac677d3 100644
--- a/shell/importer/evolution-importer-client.c
+++ b/shell/importer/evolution-importer-client.c
@@ -66,7 +66,7 @@ evolution_importer_client_init (EvolutionImporterClient *client)
* @objref: The CORBA_Object to make a client for.
*
* Makes a client for @objref. @objref should be an Evolution_Importer.
- *
+ *
* Returns: A newly created EvolutionImporterClient.
*/
EvolutionImporterClient *
@@ -87,7 +87,7 @@ evolution_importer_client_new (const CORBA_Object objref)
* @id: The oafiid of the component to make a client for.
*
* Makes a client for the object returned by activating @id.
- *
+ *
* Returns: A newly created EvolutionImporterClient.
*/
EvolutionImporterClient *
@@ -123,7 +123,7 @@ evolution_importer_client_create_control (EvolutionImporterClient *client)
GtkWidget *widget = NULL;
Bonobo_Control control;
CORBA_Environment ev;
-
+
g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (EVOLUTION_IS_IMPORTER_CLIENT (client), NULL);
@@ -135,11 +135,11 @@ evolution_importer_client_create_control (EvolutionImporterClient *client)
/* FIXME Pass in container? */
widget = bonobo_widget_new_control_from_objref (control, NULL);
gtk_widget_show (widget);
- }
-
+ }
+
CORBA_exception_free (&ev);
- return widget;
+ return widget;
}
/**
@@ -165,7 +165,7 @@ evolution_importer_client_support_format (EvolutionImporterClient *client,
CORBA_exception_init (&ev);
corba_importer = client->objref;
- result = GNOME_Evolution_Importer_supportFormat (corba_importer,
+ result = GNOME_Evolution_Importer_supportFormat (corba_importer,
filename, &ev);
CORBA_exception_free (&ev);
@@ -242,9 +242,9 @@ evolution_importer_client_process_item (EvolutionImporterClient *client,
* evolution_importer_client_get_error:
* @client: The EvolutionImporterClient.
*
- * Gets the error as a string.
+ * Gets the error as a string.
*
- * Returns: The error as a string. If there is no error NULL is returned.
+ * Returns: The error as a string. If there is no error NULL is returned.
* Importers need not support this method and if so, NULL is also returned.
*/
const char *
@@ -261,6 +261,6 @@ evolution_importer_client_get_error (EvolutionImporterClient *client)
CORBA_exception_init (&ev);
str = GNOME_Evolution_Importer_getError (corba_importer, &ev);
-
+
return str;
}
diff --git a/shell/importer/evolution-importer-listener.c b/shell/importer/evolution-importer-listener.c
index 182c726ee4..85c9211377 100644
--- a/shell/importer/evolution-importer-listener.c
+++ b/shell/importer/evolution-importer-listener.c
@@ -110,12 +110,12 @@ impl_GNOME_Evolution_ImporterListener_notifyResult (PortableServer_Servant serva
out_result = corba_result_to_evolution (result);
if (priv->callback) {
- (priv->callback) (listener, out_result, more_items,
+ (priv->callback) (listener, out_result, more_items,
priv->closure);
}
return;
-}
+}
/* GObject methods */
@@ -152,7 +152,7 @@ corba_class_init (void)
epv = g_new0 (POA_GNOME_Evolution_ImporterListener__epv, 1);
epv->notifyResult = impl_GNOME_Evolution_ImporterListener_notifyResult;
-
+
vepv = &Listener_vepv;
vepv->_base_epv = base_epv;
vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
@@ -165,7 +165,7 @@ evolution_importer_listener_class_init (EvolutionImporterListenerClass *klass)
{
GObjectClass *object_class;
POA_GNOME_Evolution_ImporterListener__epv *epv = &klass->epv;
-
+
object_class = G_OBJECT_CLASS (klass);
object_class->finalize = finalise;
diff --git a/shell/importer/evolution-importer-listener.h b/shell/importer/evolution-importer-listener.h
index 14951a9fac..fdd673089e 100644
--- a/shell/importer/evolution-importer-listener.h
+++ b/shell/importer/evolution-importer-listener.h
@@ -49,7 +49,7 @@ typedef void (* EvolutionImporterListenerCallback) (EvolutionImporterListener *l
void *closure);
struct _EvolutionImporterListener {
BonoboObject parent;
-
+
EvolutionImporterListenerPrivate *priv;
};
diff --git a/shell/importer/evolution-importer.c b/shell/importer/evolution-importer.c
index 88322a7ba2..a437fd6209 100644
--- a/shell/importer/evolution-importer.c
+++ b/shell/importer/evolution-importer.c
@@ -80,7 +80,7 @@ impl_GNOME_Evolution_Importer_supportFormat (PortableServer_Servant servant,
priv = importer->priv;
if (priv->support_format_fn != NULL)
- return (priv->support_format_fn) (importer, filename,
+ return (priv->support_format_fn) (importer, filename,
priv->closure);
else
return FALSE;
@@ -222,7 +222,7 @@ evolution_importer_construct (EvolutionImporter *importer,
* @get_error_fn: The function to be called by the getError method.
* @closure: The data to be passed to all of the above functions.
*
- * Creates a new EvolutionImporter object. Of the parameters only
+ * Creates a new EvolutionImporter object. Of the parameters only
* @get_error_function and @closure may be #NULL.
*
* Returns: A newly created EvolutionImporter object.
diff --git a/shell/importer/evolution-importer.h b/shell/importer/evolution-importer.h
index 0314ec71cb..21d661d0ff 100644
--- a/shell/importer/evolution-importer.h
+++ b/shell/importer/evolution-importer.h
@@ -73,13 +73,13 @@ typedef enum {
struct _EvolutionImporter {
BonoboObject parent;
-
+
EvolutionImporterPrivate *priv;
};
struct _EvolutionImporterClass {
BonoboObjectClass parent_class;
-
+
POA_GNOME_Evolution_Importer__epv epv;
};
diff --git a/shell/importer/evolution-intelligent-importer.c b/shell/importer/evolution-intelligent-importer.c
index 8070f7be18..ff786efd3d 100644
--- a/shell/importer/evolution-intelligent-importer.c
+++ b/shell/importer/evolution-intelligent-importer.c
@@ -54,10 +54,10 @@ impl_GNOME_Evolution_IntelligentImporter__get_importername (PortableServer_Serva
CORBA_Environment *ev)
{
EvolutionIntelligentImporter *ii;
-
+
ii = evolution_intelligent_importer_from_servant (servant);
- return CORBA_string_dup (ii->priv->importername ?
+ return CORBA_string_dup (ii->priv->importername ?
ii->priv->importername : "");
}
@@ -82,8 +82,8 @@ impl_GNOME_Evolution_IntelligentImporter_canImport (PortableServer_Servant serva
ii = evolution_intelligent_importer_from_servant (servant);
priv = ii->priv;
-
- if (priv->can_import_fn != NULL)
+
+ if (priv->can_import_fn != NULL)
return (priv->can_import_fn) (ii, priv->closure);
else
return FALSE;
@@ -108,9 +108,9 @@ static void
finalise (GObject *object)
{
EvolutionIntelligentImporter *ii;
-
+
ii = EVOLUTION_INTELLIGENT_IMPORTER (object);
-
+
if (ii->priv == NULL)
return;
@@ -129,7 +129,7 @@ evolution_intelligent_importer_class_init (EvolutionIntelligentImporterClass *kl
object_class = G_OBJECT_CLASS (klass);
object_class->finalize = finalise;
-
+
parent_class = g_type_class_ref(PARENT_TYPE);
epv->_get_importername = impl_GNOME_Evolution_IntelligentImporter__get_importername;
epv->_get_message = impl_GNOME_Evolution_IntelligentImporter__get_message;
@@ -165,7 +165,7 @@ evolution_intelligent_importer_construct (EvolutionIntelligentImporter *ii,
* evolution_intelligent_importer_new:
* can_import_fn: The function that will be called to see if this importer can do
* anything.
- * import_data_fn: The function that will be called when the importer should
+ * import_data_fn: The function that will be called when the importer should
* import the data.
* importername: The name of this importer.
* message: The message that will be displayed when the importer can import.
diff --git a/shell/importer/intelligent.c b/shell/importer/intelligent.c
index db6906b836..47c1a9537e 100644
--- a/shell/importer/intelligent.c
+++ b/shell/importer/intelligent.c
@@ -1,20 +1,20 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* intelligent.c
- *
- * Authors:
+ *
+ * Authors:
* Iain Holmes <iain@ximian.com>
*
* Copyright 2001 Ximian, Inc. (www.ximian.com)
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
@@ -101,7 +101,7 @@ free_importer_dialog (IntelligentImporterDialog *d)
data = l->data;
CORBA_exception_init (&ev);
- if (data->object != CORBA_OBJECT_NIL)
+ if (data->object != CORBA_OBJECT_NIL)
bonobo_object_release_unref (data->object, &ev);
g_free (data->iid);
@@ -147,7 +147,7 @@ get_intelligent_importers (void)
for (i = 0; i < info_list->_length; i++) {
const Bonobo_ServerInfo *info;
-
+
info = info_list->_buffer + i;
iids_ret = g_list_prepend (iids_ret, g_strdup (info->iid));
}
@@ -207,7 +207,7 @@ create_gui (GList *importers)
d->clist = clist = gtk_clist_new (1);
gtk_clist_set_selection_mode (GTK_CLIST (d->clist), GTK_SELECTION_MULTIPLE);
-
+
label = gtk_label_new (_("Evolution can import data from the following files:"));
gtk_misc_set_alignment(GTK_MISC(label), 0, .5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label,
@@ -220,14 +220,14 @@ create_gui (GList *importers)
TRUE, TRUE, 0);
sw = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(sw),
- GTK_POLICY_AUTOMATIC,
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(sw),
+ GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
gtk_widget_set_size_request (sw, 300, 150);
gtk_container_add (GTK_CONTAINER (sw), clist);
gtk_box_pack_start (GTK_BOX (hbox), sw, TRUE, TRUE, 0);
-
+
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 2);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
@@ -246,10 +246,10 @@ create_gui (GList *importers)
prefix = g_strdup_printf ("=%s/evolution/config/Shell=/intelligent-importers/", g_get_home_dir ());
gnome_config_push_prefix (prefix);
g_free (prefix);
-
+
dontaskagain = gnome_config_get_bool (l->data);
gnome_config_pop_prefix ();
-
+
if (dontaskagain)
continue;
@@ -257,7 +257,7 @@ create_gui (GList *importers)
data->iid = g_strdup (l->data);
CORBA_exception_init (&ev);
- data->object = bonobo_activation_activate_from_id ((char *) data->iid, 0,
+ data->object = bonobo_activation_activate_from_id ((char *) data->iid, 0,
NULL, &ev);
if (ev._major != CORBA_NO_EXCEPTION) {
g_warning ("Could not start %s: %s", data->iid,
@@ -282,7 +282,7 @@ create_gui (GList *importers)
can_run = GNOME_Evolution_IntelligentImporter_canImport (data->object,
&ev);
if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Could not get canImport(%s): %s",
+ g_warning ("Could not get canImport(%s): %s",
data->iid, CORBA_exception_id (&ev));
bonobo_object_release_unref (data->object, &ev);
CORBA_exception_free (&ev);
@@ -291,7 +291,7 @@ create_gui (GList *importers)
continue;
}
CORBA_exception_free (&ev);
-
+
if (can_run == FALSE) {
CORBA_exception_init (&ev);
bonobo_object_release_unref (data->object, &ev);
@@ -305,7 +305,7 @@ create_gui (GList *importers)
data->name = g_strdup (GNOME_Evolution_IntelligentImporter__get_importername (data->object, &ev));
if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Could not get name(%s): %s",
+ g_warning ("Could not get name(%s): %s",
data->iid, CORBA_exception_id (&ev));
bonobo_object_release_unref (data->object, &ev);
CORBA_exception_free (&ev);
@@ -316,7 +316,7 @@ create_gui (GList *importers)
data->blurb = g_strdup (GNOME_Evolution_IntelligentImporter__get_message (data->object, &ev));
if (ev._major != CORBA_NO_EXCEPTION) {
- g_warning ("Could not get message(%s): %s",
+ g_warning ("Could not get message(%s): %s",
data->iid, CORBA_exception_id (&ev));
bonobo_object_release_unref (data->object, &ev);
CORBA_exception_free (&ev);
@@ -356,7 +356,7 @@ create_gui (GList *importers)
text[0] = data->name;
gtk_clist_prepend (GTK_CLIST (clist), text);
}
-
+
d->running = running;
dummy = gtk_drawing_area_new ();
gtk_widget_show (dummy);
@@ -365,7 +365,7 @@ create_gui (GList *importers)
/* Set the start to the blank page */
gtk_notebook_set_current_page (GTK_NOTEBOOK (d->placeholder), running);
- g_signal_connect((clist), "select-row",
+ g_signal_connect((clist), "select-row",
G_CALLBACK (select_row_cb), d);
g_signal_connect((clist), "unselect-row",
G_CALLBACK (unselect_row_cb), d);
@@ -386,10 +386,10 @@ intelligent_importer_init (void)
prefix = g_strdup_printf ("=%s/evolution/config/Shell=/intelligent-importers/", g_get_home_dir());
gnome_config_push_prefix (prefix);
g_free (prefix);
-
+
dontaskagain = gnome_config_get_bool ("Dontaskagain=False");
gnome_config_pop_prefix ();
-
+
if (dontaskagain) {
return;
}
@@ -423,7 +423,7 @@ intelligent_importer_init (void)
new_data = g_new (SelectedImporterData, 1);
new_data->iid = iid;
- /* Reference the remote object, and duplicate the
+ /* Reference the remote object, and duplicate the
local one. */
CORBA_exception_init (&ev);
new_data->importer = bonobo_object_dup_ref (data->object, &ev);
@@ -440,14 +440,14 @@ intelligent_importer_init (void)
selected = g_list_prepend (selected, new_data);
}
- /* Now destroy all the importers, as we've kept references to
+ /* Now destroy all the importers, as we've kept references to
the ones we need */
free_importer_dialog (d);
if (selected != NULL) {
/* Restart the selected ones */
start_importers (selected);
-
+
/* Free the selected list */
for (l = selected; l; l = l->next) {
CORBA_Environment ev;
@@ -464,12 +464,12 @@ intelligent_importer_init (void)
}
break;
-
+
case GTK_RESPONSE_CANCEL: /* Dont ask again */
prefix = g_strdup_printf ("=%s/evolution/config/Shell=/intelligent-importers/", g_get_home_dir());
gnome_config_push_prefix (prefix);
g_free (prefix);
-
+
gnome_config_set_bool ("Dontaskagain", TRUE);
gnome_config_pop_prefix ();
diff --git a/shell/main.c b/shell/main.c
index 114ead8835..4d9e785cc3 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -383,7 +383,7 @@ idle_cb (gchar **uris)
CORBA_Object_release (corba_shell, &ev);
CORBA_exception_free (&ev);
-
+
if (shell == NULL) {
/*there is another instance but because we don't open any windows
we must notify the startup was complete manually*/
@@ -397,7 +397,7 @@ idle_cb (gchar **uris)
#ifndef G_OS_WIN32
/* SIGSEGV handling.
-
+
The GNOME SEGV handler will lose if it's not run from the main Gtk
thread. So if we have to redirect the signal if the crash happens in another
thread. */
@@ -440,7 +440,7 @@ setup_segv_redirect (void)
sigaction (SIGSEGV, &sa, NULL);
sigaction (SIGBUS, &sa, NULL);
sigaction (SIGFPE, &sa, NULL);
-
+
sa.sa_handler = SIG_IGN;
sigaction (SIGXFSZ, &sa, NULL);
gnome_segv_handler = osa.sa_handler;
@@ -459,19 +459,19 @@ static const GOptionEntry options[] = {
{ "online", '\0', 0, G_OPTION_ARG_NONE, &start_online,
N_("Start in online mode"), NULL },
#ifdef KILL_PROCESS_CMD
- { "force-shutdown", '\0', 0, G_OPTION_ARG_NONE, &killev,
+ { "force-shutdown", '\0', 0, G_OPTION_ARG_NONE, &killev,
N_("Forcibly shut down all Evolution components"), NULL },
#endif
#if DEVELOPMENT
- { "force-migrate", '\0', 0, G_OPTION_ARG_NONE, &force_migrate,
+ { "force-migrate", '\0', 0, G_OPTION_ARG_NONE, &force_migrate,
N_("Forcibly re-migrate from Evolution 1.4"), NULL },
#endif
- { "debug", '\0', 0, G_OPTION_ARG_STRING, &evolution_debug_log,
+ { "debug", '\0', 0, G_OPTION_ARG_STRING, &evolution_debug_log,
N_("Send the debugging output of all components to a file."), NULL },
- { "disable-eplugin", '\0', 0, G_OPTION_ARG_NONE, &disable_eplugin,
+ { "disable-eplugin", '\0', 0, G_OPTION_ARG_NONE, &disable_eplugin,
N_("Disable loading of any plugins."), NULL },
- { "disable-preview", '\0', 0, G_OPTION_ARG_NONE, &disable_preview,
- N_("Disable preview pane of Mail, Contacts and Tasks."), NULL },
+ { "disable-preview", '\0', 0, G_OPTION_ARG_NONE, &disable_preview,
+ N_("Disable preview pane of Mail, Contacts and Tasks."), NULL },
{ "setup-only", '\0', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE,
&setup_only, NULL, NULL },
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &remaining_args, NULL, NULL },
@@ -506,7 +506,7 @@ main (int argc, char **argv)
g_option_context_set_translation_domain(context, GETTEXT_PACKAGE);
- program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
+ program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
GNOME_PROGRAM_STANDARD_PROPERTIES,
GNOME_PARAM_GOPTION_CONTEXT, context,
GNOME_PARAM_HUMAN_READABLE_NAME, _("Evolution"),
@@ -546,7 +546,7 @@ main (int argc, char **argv)
}
setup_segv_redirect ();
-
+
if (evolution_debug_log) {
int fd;
@@ -596,11 +596,11 @@ main (int argc, char **argv)
g_object_unref (client);
#else
- g_idle_add ((GSourceFunc) idle_cb, remaining_args);
+ g_idle_add ((GSourceFunc) idle_cb, remaining_args);
#endif
-
+
bonobo_main ();
-
+
e_icon_factory_shutdown ();
g_object_unref (program);
gnome_sound_shutdown ();
diff --git a/shell/test/evolution-test-component.c b/shell/test/evolution-test-component.c
index 1e1cc92483..b53608d4af 100644
--- a/shell/test/evolution-test-component.c
+++ b/shell/test/evolution-test-component.c
@@ -120,9 +120,9 @@ impl_requestCreateItem (PortableServer_Servant servant,
{
EvolutionTestComponent *evolution_test_component = EVOLUTION_TEST_COMPONENT (bonobo_object_from_servant (servant));
EvolutionTestComponentPrivate *priv;
-
+
priv = evolution_test_component->priv;
-
+
if (strcmp (item_type_name, CREATE_TEST_ID) == 0) {
g_message ("Creating test item");
} else {
@@ -171,7 +171,7 @@ factory (BonoboGenericFactory *factory,
bonobo_object_ref (object);
return object;
}
-
+
g_warning (FACTORY_ID ": Don't know what to do with %s", component_id);
return NULL;
diff --git a/smime/gui/cert-trust-dialog.c b/smime/gui/cert-trust-dialog.c
index 43ab1b856a..9de35ae073 100644
--- a/smime/gui/cert-trust-dialog.c
+++ b/smime/gui/cert-trust-dialog.c
@@ -92,7 +92,7 @@ ctd_response(GtkWidget *w, guint id, CertTrustDialogData *data)
e_cert_trust_has_trusted_ca (icert->trust, TRUE, FALSE, FALSE),
e_cert_trust_has_trusted_ca (icert->trust, FALSE, TRUE, FALSE),
e_cert_trust_has_trusted_ca (icert->trust, FALSE, FALSE, TRUE));
-
+
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
gboolean trust_ssl, trust_email, trust_objsign;
@@ -105,7 +105,7 @@ ctd_response(GtkWidget *w, guint id, CertTrustDialogData *data)
trust_ssl,
trust_email,
trust_objsign);
-
+
CERT_ChangeCertTrust(CERT_GetDefaultCertDB(), icert, &trust);
}
diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
index e417407c42..8a3c64321c 100644
--- a/smime/gui/certificate-manager.c
+++ b/smime/gui/certificate-manager.c
@@ -154,7 +154,7 @@ import_your (GtkWidget *widget, CertificateManagerData *cfm)
if (GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (filesel))) {
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (filesel));
-
+
if (e_cert_db_import_pkcs12_file (e_cert_db_peek (),
filename, NULL /* XXX */)) {
/* there's no telling how many certificates were added during the import,
@@ -201,7 +201,7 @@ delete_your (GtkWidget *widget, CertificateManagerData *cfm)
g_object_unref (cert);
}
}
-
+
}
static void
@@ -447,7 +447,7 @@ delete_contact (GtkWidget *widget, CertificateManagerData *cfm)
g_object_unref (cert);
}
}
-
+
}
static void
@@ -527,7 +527,7 @@ static void
view_ca (GtkWidget *widget, CertificateManagerData *cfm)
{
GtkTreeIter iter;
-
+
if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW(cfm->authoritycerts_treeview)),
NULL,
&iter)) {
@@ -551,7 +551,7 @@ static void
edit_ca (GtkWidget *widget, CertificateManagerData *cfm)
{
GtkTreeIter iter;
-
+
if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW(cfm->authoritycerts_treeview)),
NULL,
&iter)) {
@@ -570,7 +570,7 @@ edit_ca (GtkWidget *widget, CertificateManagerData *cfm)
e_cert_trust_has_trusted_ca (icert->trust, TRUE, FALSE, FALSE),
e_cert_trust_has_trusted_ca (icert->trust, FALSE, TRUE, FALSE),
e_cert_trust_has_trusted_ca (icert->trust, FALSE, FALSE, TRUE));
-
+
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) {
gboolean trust_ssl, trust_email, trust_objsign;
CERTCertTrust trust;
@@ -584,7 +584,7 @@ edit_ca (GtkWidget *widget, CertificateManagerData *cfm)
trust_ssl,
trust_email,
trust_objsign);
-
+
CERT_ChangeCertTrust (CERT_GetDefaultCertDB(), icert, &trust);
}
@@ -670,7 +670,7 @@ delete_ca (GtkWidget *widget, CertificateManagerData *cfm)
g_object_unref (cert);
}
}
-
+
}
static void
@@ -736,7 +736,7 @@ add_user_cert (CertificateManagerData *cfm, ECert *cert)
if (!parent_iter) {
/* create a new toplevel node */
gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL);
-
+
gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
0, organization, -1);
@@ -780,7 +780,7 @@ add_contact_cert (CertificateManagerData *cfm, ECert *cert)
if (!parent_iter) {
/* create a new toplevel node */
gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL);
-
+
gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
0, organization, -1);
@@ -823,7 +823,7 @@ add_ca_cert (CertificateManagerData *cfm, ECert *cert)
/* create a new toplevel node */
gtk_tree_store_append (GTK_TREE_STORE (model),
&iter, NULL);
-
+
gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
0, organization, -1);
diff --git a/smime/gui/certificate-viewer.c b/smime/gui/certificate-viewer.c
index 2580287042..342f3d8c95 100644
--- a/smime/gui/certificate-viewer.c
+++ b/smime/gui/certificate-viewer.c
@@ -115,7 +115,7 @@ fill_in_general (CertificateViewerData *cvm_data, ECert *cert)
else {
gtk_label_set_markup (GTK_LABEL (label), NOT_PART_OF_CERT_MARKUP);
}
-
+
label = glade_xml_get_widget (cvm_data->gui, "issued-by-ou");
if (e_cert_get_issuer_org_unit (cert)) {
gtk_label_set_text (GTK_LABEL (label), e_cert_get_issuer_org_unit (cert));
@@ -215,7 +215,7 @@ hierarchy_selection_changed (GtkTreeSelection *selection, CertificateViewerData
/* and blow away the field value */
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (cvm_data->field_text)),
"", 0);
- }
+ }
}
static void
@@ -242,7 +242,7 @@ fields_selection_changed (GtkTreeSelection *selection, CertificateViewerData *cv
if (value) {
GtkTextIter text_iter;
-
+
gtk_text_buffer_get_start_iter (gtk_text_view_get_buffer (GTK_TEXT_VIEW (cvm_data->field_text)),
&text_iter);
@@ -342,7 +342,7 @@ certificate_viewer_show (ECert *cert)
gtk_window_set_title (GTK_WINDOW (cvm_data->dialog),
title);
-
+
g_free (title);
fill_in_general (cvm_data, cert);
diff --git a/smime/gui/e-cert-selector.c b/smime/gui/e-cert-selector.c
index f9ca319509..d41be35ad6 100644
--- a/smime/gui/e-cert-selector.c
+++ b/smime/gui/e-cert-selector.c
@@ -129,13 +129,13 @@ ecs_cert_changed(GtkWidget *w, ECertSelector *ecs)
/**
* e_cert_selector_new:
- * @type:
- * @currentid:
- *
+ * @type:
+ * @currentid:
+ *
* Create a new ECertSelector dialog. @type specifies which type of cert to
* be selected, E_CERT_SELECTOR_SIGNER for signing certs, and
* E_CERT_SELECTOR_RECIPIENT for encrypting certs.
- *
+ *
* @currentid is the nickname of the cert currently selected for this user.
*
* You only need to connect to a single signal "selected" which will
@@ -199,7 +199,7 @@ e_cert_selector_new(int type, const char *currentid)
&& ((node->cert->nickname != NULL && strcmp(node->cert->nickname, currentid) == 0)
|| (node->cert->emailAddr != NULL && strcmp(node->cert->emailAddr, currentid) == 0)))
active = n;
-
+
n++;
}
@@ -236,7 +236,7 @@ e_cert_selector_finalise(GObject *o)
if (ecs->priv->certlist)
CERT_DestroyCertList(ecs->priv->certlist);
-
+
g_free(ecs->priv);
((GObjectClass *)e_cert_selector_parent_class)->finalize(o);
diff --git a/smime/lib/e-asn1-object.c b/smime/lib/e-asn1-object.c
index fe86d0ece5..6a30c223c9 100644
--- a/smime/lib/e-asn1-object.c
+++ b/smime/lib/e-asn1-object.c
@@ -28,23 +28,23 @@
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
- *
+ *
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
- *
+ *
* The Original Code is the Netscape security libraries.
- *
+ *
* The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
+ * Communications Corporation. Portions created by Netscape are
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
- *
+ *
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
- * "GPL"), in which case the provisions of the GPL are applicable
- * instead of those above. If you wish to allow use of your
+ * "GPL"), in which case the provisions of the GPL are applicable
+ * instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
@@ -148,7 +148,7 @@ e_asn1_object_get_type (void)
/* This function is used to interpret an integer that
was encoded in a DER buffer. This function is used
- when converting a DER buffer into a nsIASN1Object
+ when converting a DER buffer into a nsIASN1Object
structure. This interprets the buffer in data
as defined by the DER (Distinguised Encoding Rules) of
ASN1.
@@ -182,7 +182,7 @@ get_integer_256 (unsigned char *data, unsigned int nb)
item. It looks to see if this a multibyte length and then
interprets the buffer accordingly to get the actual length value.
This funciton is used mostly while parsing the DER headers.
-
+
A DER encoded item has the following structure:
<tag><length<data consisting of lenght bytes>
@@ -193,7 +193,7 @@ get_der_item_length (unsigned char *data, unsigned char *end,
{
unsigned char lbyte = *data++;
PRInt32 length = -1;
-
+
*indefinite = FALSE;
if (lbyte >= 0x80) {
/* Multibyte length */
@@ -202,7 +202,7 @@ get_der_item_length (unsigned char *data, unsigned char *end,
return -1;
}
if (nb > 0) {
-
+
if ((data+nb) > end) {
return -1;
}
@@ -216,7 +216,7 @@ get_der_item_length (unsigned char *data, unsigned char *end,
*bytesUsed = nb+1;
} else {
length = lbyte;
- *bytesUsed = 1;
+ *bytesUsed = 1;
}
return length;
}
@@ -282,7 +282,7 @@ build_from_der (EASN1Object *parent, char *data, char *end)
asn1object = e_asn1_object_new ();
asn1object->priv->tag = tagnum;
asn1object->priv->type = type;
-
+
if (!build_from_der (asn1object, data, (len == 0) ? end : data + len)) {
g_object_unref (asn1object);
return FALSE;
diff --git a/smime/lib/e-asn1-object.h b/smime/lib/e-asn1-object.h
index 99b422806a..251e4e80c9 100644
--- a/smime/lib/e-asn1-object.h
+++ b/smime/lib/e-asn1-object.h
@@ -47,7 +47,7 @@ enum {
E_ASN1_OBJECT_TYPE_INTEGER = 2,
E_ASN1_OBJECT_TYPE_BIT_STRING = 3,
E_ASN1_OBJECT_TYPE_OCTET_STRING = 4,
- E_ASN1_OBJECT_TYPE_NULL = 5,
+ E_ASN1_OBJECT_TYPE_NULL = 5,
E_ASN1_OBJECT_TYPE_OBJECT_ID = 6,
E_ASN1_OBJECT_TYPE_ENUMERATED = 10,
E_ASN1_OBJECT_TYPE_UTF8_STRING = 12,
@@ -59,7 +59,7 @@ enum {
E_ASN1_OBJECT_TYPE_UTC_TIME = 23,
E_ASN1_OBJECT_TYPE_GEN_TIME = 24,
E_ASN1_OBJECT_TYPE_VISIBLE_STRING = 26,
- E_ASN1_OBJECT_TYPE_UNIVERSAL_STRING = 28,
+ E_ASN1_OBJECT_TYPE_UNIVERSAL_STRING = 28,
E_ASN1_OBJECT_TYPE_BMP_STRING = 30,
E_ASN1_OBJECT_TYPE_HIGH_TAG_NUMBER = 31,
E_ASN1_OBJECT_TYPE_CONTEXT_SPECIFIC = 32,
diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c
index 0655f99424..91301052af 100644
--- a/smime/lib/e-cert-db.c
+++ b/smime/lib/e-cert-db.c
@@ -28,23 +28,23 @@
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
- *
+ *
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
- *
+ *
* The Original Code is the Netscape security libraries.
- *
+ *
* The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
+ * Communications Corporation. Portions created by Netscape are
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
- *
+ *
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
- * "GPL"), in which case the provisions of the GPL are applicable
- * instead of those above. If you wish to allow use of your
+ * "GPL"), in which case the provisions of the GPL are applicable
+ * instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
@@ -234,11 +234,11 @@ install_loadable_roots (void)
SECMODListLock *lock = SECMOD_GetDefaultModuleListLock ();
SECMODModule *RootsModule = NULL;
int i;
-
+
SECMOD_GetReadLock (lock);
while (!RootsModule && list) {
SECMODModule *module = list->module;
-
+
for (i = 0; i < module->slotCount; i++) {
PK11SlotInfo *slot = module->slots[i];
if (PK11_IsPresent (slot)) {
@@ -248,11 +248,11 @@ install_loadable_roots (void)
}
}
}
-
+
list = list->next;
}
SECMOD_ReleaseReadLock (lock);
-
+
if (RootsModule) {
/* Check version, and unload module if it is too old */
CK_INFO info;
@@ -265,24 +265,24 @@ install_loadable_roots (void)
* define the version we expect to have.
* Later version are fine.
* Older versions are not ok, and we will replace with our own version.
- */
+ */
if ((info.libraryVersion.major < NSS_BUILTINS_LIBRARY_VERSION_MAJOR)
|| (info.libraryVersion.major == NSS_BUILTINS_LIBRARY_VERSION_MAJOR
&& info.libraryVersion.minor < NSS_BUILTINS_LIBRARY_VERSION_MINOR)) {
PRInt32 modType;
-
+
SECMOD_DeleteModule (RootsModule->commonName, &modType);
-
+
RootsModule = NULL;
}
}
}
-
+
if (!RootsModule) {
#ifndef G_OS_WIN32
/* grovel in various places for mozilla's built-in
cert module.
-
+
XXX yes this is gross. *sigh*
*/
char *paths_to_check[] = {
@@ -294,10 +294,10 @@ install_loadable_roots (void)
"/opt/mozilla/lib",
"/opt/mozilla/lib/mozilla"
};
-
+
for (i = 0; i < G_N_ELEMENTS (paths_to_check); i ++) {
char *dll_path = g_module_build_path (paths_to_check [i], "nssckbi");
-
+
if (g_file_test (dll_path, G_FILE_TEST_EXISTS)) {
PRInt32 modType;
@@ -308,7 +308,7 @@ install_loadable_roots (void)
g_free (dll_path);
break;
}
-
+
g_free (dll_path);
}
#else
@@ -464,7 +464,7 @@ e_cert_db_find_cert_by_key (ECertDB *certdb,
}
dummy = NSSBase64_DecodeBuffer(NULL, &keyItem, db_key,
- (PRUint32)PL_strlen(db_key));
+ (PRUint32)PL_strlen(db_key));
/* someday maybe we can speed up the search using the moduleID and slotID*/
moduleID = NS_NSS_GET_LONG(keyItem.data);
@@ -543,7 +543,7 @@ e_cert_db_find_cert_by_email_address (ECertDB *certdb,
/* XXX free certlist? */
return NULL;
}
-
+
if (CERT_LIST_END(CERT_LIST_HEAD(certlist), certlist)) {
/* XXX gerror */
CERT_DestroyCertificate(any_cert);
@@ -617,7 +617,7 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
const char* cert0IssuerName;
const char* cert1SubjectName;
const char* cert1IssuerName;
-
+
cert0 = E_CERT (certs->data);
cert1 = E_CERT (certs->next->data);
@@ -629,16 +629,16 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
if (!strcmp(cert1IssuerName, cert0SubjectName)) {
/* In this case, the first cert in the list signed the second,
- so the first cert is the root. Let's display the last cert
+ so the first cert is the root. Let's display the last cert
in the list. */
certToShow = E_CERT (g_list_last (certs)->data);
}
else if (!strcmp(cert0IssuerName, cert1SubjectName)) {
- /* In this case the second cert has signed the first cert. The
+ /* In this case the second cert has signed the first cert. The
first cert is the leaf, so let's display it. */
certToShow = cert0;
} else {
- /* It's not a chain, so let's just show the first one in the
+ /* It's not a chain, so let's just show the first one in the
downloaded list. */
certToShow = cert0;
}
@@ -692,7 +692,7 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
}
/*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("trust is %d\n", trustBits));*/
-
+
nickname = CERT_MakeCANickname(tmpCert);
/*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Created nick \"%s\"\n", nickname.get()));*/
@@ -706,7 +706,7 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
srv = CERT_AddTempCertToPerm(tmpCert,
nickname,
- &trust);
+ &trust);
if (srv != SECSuccess) {
/* XXX gerror */
@@ -727,7 +727,7 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
certToShow = do_QueryElementAt(x509Certs, i);
certToShow->GetRawDER(&der.len, (PRUint8 **)&der.data);
- CERTCertificate *tmpCert2 =
+ CERTCertificate *tmpCert2 =
CERT_NewTempCertificate(certdb, &der, nsnull, PR_FALSE, PR_TRUE);
if (!tmpCert2) {
@@ -735,7 +735,7 @@ handle_ca_cert_download(ECertDB *cert_db, GList *certs, GError **error)
continue; /* Let's try to import the rest of 'em */
}
nickname.Adopt(CERT_MakeCANickname(tmpCert2));
- CERT_AddTempCertToPerm(tmpCert2, NS_CONST_CAST(char*,nickname.get()),
+ CERT_AddTempCertToPerm(tmpCert2, NS_CONST_CAST(char*,nickname.get()),
defaultTrust.GetTrust());
CERT_DestroyCertificate(tmpCert2);
}
@@ -762,15 +762,15 @@ e_cert_db_delete_cert (ECertDB *certdb,
if (cert->slot && e_cert_get_cert_type (ecert) != E_CERT_USER) {
/* To delete a cert of a slot (builtin, most likely), mark it as
completely untrusted. This way we keep a copy cached in the
- local database, and next time we try to load it off of the
- external token/slot, we'll know not to trust it. We don't
+ local database, and next time we try to load it off of the
+ external token/slot, we'll know not to trust it. We don't
want to do that with user certs, because a user may re-store
- the cert onto the card again at which point we *will* want to
+ the cert onto the card again at which point we *will* want to
trust that cert if it chains up properly. */
CERTCertTrust trust;
e_cert_trust_init_with_values (&trust, 0, 0, 0);
- srv = CERT_ChangeCertTrust(CERT_GetDefaultCertDB(),
+ srv = CERT_ChangeCertTrust(CERT_GetDefaultCertDB(),
cert, &trust);
}
@@ -802,7 +802,7 @@ e_cert_db_import_certs (ECertDB *certdb,
for (i=0; i<certCollection->numcerts; i++) {
SECItem *currItem = &certCollection->rawCerts[i];
ECert *cert;
-
+
cert = e_cert_new_from_der ((char*)currItem->data, currItem->len);
if (!cert) {
/* XXX gerror */
@@ -822,7 +822,7 @@ e_cert_db_import_certs (ECertDB *certdb,
/* XXX gerror */
PORT_FreeArena(arena, PR_FALSE);
rv = FALSE;
- }
+ }
g_list_foreach (certs, (GFunc)g_object_unref, NULL);
g_list_free (certs);
@@ -870,7 +870,7 @@ e_cert_db_import_email_cert (ECertDB *certdb,
for ( i = 0; i < numcerts; i++ ) {
rawCerts[i] = &certCollection->rawCerts[i];
}
-
+
srv = CERT_ImportCerts(CERT_GetDefaultCertDB(), certUsageEmailSigner,
numcerts, rawCerts, NULL, PR_TRUE, PR_FALSE,
NULL);
@@ -884,14 +884,14 @@ e_cert_db_import_email_cert (ECertDB *certdb,
loser:
if (cert)
CERT_DestroyCertificate(cert);
- if (arena)
+ if (arena)
PORT_FreeArena(arena, PR_TRUE);
return rv;
}
static char *
default_nickname (CERTCertificate *cert)
-{
+{
/* nsNSSShutDownPreventionLock locker; */
char *username = NULL;
char *caname = NULL;
@@ -906,19 +906,19 @@ default_nickname (CERTCertificate *cert)
CERTCertDBHandle *defaultcertdb = CERT_GetDefaultCertDB();
username = CERT_GetCommonName(&cert->subject);
- if ( username == NULL )
+ if ( username == NULL )
username = PL_strdup("");
- if ( username == NULL )
+ if ( username == NULL )
goto loser;
-
+
caname = CERT_GetOrgName(&cert->issuer);
- if ( caname == NULL )
+ if ( caname == NULL )
caname = PL_strdup("");
-
- if ( caname == NULL )
+
+ if ( caname == NULL )
goto loser;
-
+
count = 1;
nickFmt = "%1$s's %2$s ID";
@@ -940,28 +940,28 @@ default_nickname (CERTCertificate *cert)
tmp = NULL;
}
tmp = nickname;
- while ( 1 ) {
+ while ( 1 ) {
if ( count > 1 ) {
nickname = PR_smprintf("%s #%d", tmp, count);
}
-
- if ( nickname == NULL )
+
+ if ( nickname == NULL )
goto loser;
-
+
if (PK11_IsInternal(slot)) {
/* look up the nickname to make sure it isn't in use already */
dummycert = CERT_FindCertByNickname(defaultcertdb, nickname);
-
+
} else {
/*
- * Check the cert against others that already live on the smart
+ * Check the cert against others that already live on the smart
* card.
*/
dummycert = PK11_FindCertFromNickname(nickname, NULL);
if (dummycert != NULL) {
/*
* Make sure the subject names are different.
- */
+ */
if (CERT_CompareName(&cert->subject, &dummycert->subject) == SECEqual) {
/*
* There is another certificate with the same nickname and
@@ -973,9 +973,9 @@ default_nickname (CERTCertificate *cert)
}
}
}
- if ( dummycert == NULL )
+ if ( dummycert == NULL )
goto done;
-
+
/* found a cert, destroy it and loop */
CERT_DestroyCertificate(dummycert);
if (tmp != nickname) PR_Free(nickname);
@@ -1081,7 +1081,7 @@ e_cert_db_import_user_cert (ECertDB *certdb,
rv = TRUE;
}
}
-
+
loser:
if (arena) {
PORT_FreeArena(arena, PR_FALSE);
@@ -1120,7 +1120,7 @@ e_cert_db_import_certs_from_file (ECertDB *cert_db,
case E_CERT_SITE:
/* good */
break;
-
+
default:
/* not supported (yet) */
/* XXX gerror */
@@ -1138,7 +1138,7 @@ e_cert_db_import_certs_from_file (ECertDB *cert_db,
close (fd);
return FALSE;
}
-
+
buf = g_malloc (sb.st_size);
if (!buf) {
/* XXX gerror */
@@ -1149,7 +1149,7 @@ e_cert_db_import_certs_from_file (ECertDB *cert_db,
bytes_read = read (fd, buf, sb.st_size);
close (fd);
-
+
if (bytes_read != sb.st_size) {
/* XXX gerror */
rv = FALSE;
@@ -1169,7 +1169,7 @@ e_cert_db_import_certs_from_file (ECertDB *cert_db,
case E_CERT_CONTACT:
rv = e_cert_db_import_email_cert (cert_db, buf, bytes_read, error);
break;
-
+
default:
rv = FALSE;
break;
@@ -1177,7 +1177,7 @@ e_cert_db_import_certs_from_file (ECertDB *cert_db,
}
g_free (buf);
- return rv;
+ return rv;
}
gboolean
@@ -1277,7 +1277,7 @@ e_cert_db_get_certs_from_package (PRArenaPool *arena,
guint32 length)
{
/*nsNSSShutDownPreventionLock locker;*/
- CERTDERCerts *collectArgs =
+ CERTDERCerts *collectArgs =
(CERTDERCerts *)PORT_ArenaZAlloc(arena, sizeof(CERTDERCerts));
SECStatus sec_rv;
@@ -1286,7 +1286,7 @@ e_cert_db_get_certs_from_package (PRArenaPool *arena,
collectArgs->arena = arena;
sec_rv = CERT_DecodeCertPackage(data,
- length, collect_certs,
+ length, collect_certs,
(void *)collectArgs);
if (sec_rv != SECSuccess)
diff --git a/smime/lib/e-cert-trust.c b/smime/lib/e-cert-trust.c
index d7de98bbc2..b51f24f316 100644
--- a/smime/lib/e-cert-trust.c
+++ b/smime/lib/e-cert-trust.c
@@ -28,27 +28,27 @@
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
- *
+ *
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
- *
+ *
* The Original Code is the Netscape security libraries.
- *
+ *
* The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
+ * Communications Corporation. Portions created by Netscape are
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
- *
+ *
* Contributor(s):
* Ian McGreer <mcgreer@netscape.com>
* Javier Delgadillo <javi@netscape.com>
- *
+ *
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
- * "GPL"), in which case the provisions of the GPL are applicable
- * instead of those above. If you wish to allow use of your
+ * "GPL"), in which case the provisions of the GPL are applicable
+ * instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
@@ -74,8 +74,8 @@ e_cert_trust_init (CERTCertTrust *trust)
void
e_cert_trust_init_with_values (CERTCertTrust *trust,
- unsigned int ssl,
- unsigned int email,
+ unsigned int ssl,
+ unsigned int email,
unsigned int objsign)
{
memset(trust, 0, sizeof(CERTCertTrust));
@@ -90,7 +90,7 @@ e_cert_trust_copy (CERTCertTrust *trust, CERTCertTrust *t)
if (t)
memcpy(trust, t, sizeof(CERTCertTrust));
else
- memset(trust, 0, sizeof(CERTCertTrust));
+ memset(trust, 0, sizeof(CERTCertTrust));
}
void
@@ -241,7 +241,7 @@ e_cert_trust_set_trusted_ca (CERTCertTrust *trust)
PR_FALSE, PR_FALSE);
}
-void
+void
e_cert_trust_set_valid_peer (CERTCertTrust *trust)
{
e_cert_trust_set_ssl_trust (trust,
@@ -258,7 +258,7 @@ e_cert_trust_set_valid_peer (CERTCertTrust *trust)
PR_FALSE, PR_FALSE);
}
-void
+void
e_cert_trust_set_valid_server_peer (CERTCertTrust *trust)
{
e_cert_trust_set_ssl_trust (trust,
@@ -275,7 +275,7 @@ e_cert_trust_set_valid_server_peer (CERTCertTrust *trust)
PR_FALSE, PR_FALSE);
}
-void
+void
e_cert_trust_set_trusted_peer (CERTCertTrust *trust)
{
e_cert_trust_set_ssl_trust (trust,
@@ -321,8 +321,8 @@ e_cert_trust_has_any_ca (CERTCertTrust *trust)
PRBool
e_cert_trust_has_ca (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
+ PRBool checkSSL,
+ PRBool checkEmail,
PRBool checkObjSign)
{
if (checkSSL && !e_cert_trust_has_trust(trust->sslFlags, CERTDB_VALID_CA))
@@ -336,8 +336,8 @@ e_cert_trust_has_ca (CERTCertTrust *trust,
PRBool
e_cert_trust_has_peer (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
+ PRBool checkSSL,
+ PRBool checkEmail,
PRBool checkObjSign)
{
if (checkSSL && !e_cert_trust_has_trust(trust->sslFlags, CERTDB_VALID_PEER))
@@ -361,8 +361,8 @@ e_cert_trust_has_any_user (CERTCertTrust *trust)
PRBool
e_cert_trust_has_user (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
+ PRBool checkSSL,
+ PRBool checkEmail,
PRBool checkObjSign)
{
if (checkSSL && !e_cert_trust_has_trust(trust->sslFlags, CERTDB_USER))
@@ -376,8 +376,8 @@ e_cert_trust_has_user (CERTCertTrust *trust,
PRBool
e_cert_trust_has_trusted_ca (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
+ PRBool checkSSL,
+ PRBool checkEmail,
PRBool checkObjSign)
{
if (checkSSL && !(e_cert_trust_has_trust(trust->sslFlags, CERTDB_TRUSTED_CA) ||
@@ -386,7 +386,7 @@ e_cert_trust_has_trusted_ca (CERTCertTrust *trust,
if (checkEmail && !(e_cert_trust_has_trust(trust->emailFlags, CERTDB_TRUSTED_CA) ||
e_cert_trust_has_trust(trust->emailFlags, CERTDB_TRUSTED_CLIENT_CA)))
return PR_FALSE;
- if (checkObjSign &&
+ if (checkObjSign &&
!(e_cert_trust_has_trust(trust->objectSigningFlags, CERTDB_TRUSTED_CA) ||
e_cert_trust_has_trust(trust->objectSigningFlags, CERTDB_TRUSTED_CLIENT_CA)))
return PR_FALSE;
@@ -395,15 +395,15 @@ e_cert_trust_has_trusted_ca (CERTCertTrust *trust,
PRBool
e_cert_trust_has_trusted_peer (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
+ PRBool checkSSL,
+ PRBool checkEmail,
PRBool checkObjSign)
{
if (checkSSL && !(e_cert_trust_has_trust(trust->sslFlags, CERTDB_TRUSTED)))
return PR_FALSE;
if (checkEmail && !(e_cert_trust_has_trust(trust->emailFlags, CERTDB_TRUSTED)))
return PR_FALSE;
- if (checkObjSign &&
+ if (checkObjSign &&
!(e_cert_trust_has_trust(trust->objectSigningFlags, CERTDB_TRUSTED)))
return PR_FALSE;
return PR_TRUE;
diff --git a/smime/lib/e-cert-trust.h b/smime/lib/e-cert-trust.h
index 00252cb19e..72fd5a9987 100644
--- a/smime/lib/e-cert-trust.h
+++ b/smime/lib/e-cert-trust.h
@@ -31,8 +31,8 @@ G_BEGIN_DECLS
void e_cert_trust_init (CERTCertTrust *trust);
void e_cert_trust_init_with_values (CERTCertTrust *trust,
- unsigned int ssl,
- unsigned int email,
+ unsigned int ssl,
+ unsigned int email,
unsigned int objsign);
void e_cert_trust_copy (CERTCertTrust *dst_trust, CERTCertTrust *src_trust);
void e_cert_trust_add_ca_trust (CERTCertTrust *trust, PRBool ssl, PRBool email, PRBool objSign);
@@ -58,25 +58,25 @@ void e_cert_trust_set_trusted_peer (CERTCertTrust *trust);
void e_cert_trust_set_user (CERTCertTrust *trust);
PRBool e_cert_trust_has_any_ca (CERTCertTrust *trust);
PRBool e_cert_trust_has_ca (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
+ PRBool checkSSL,
+ PRBool checkEmail,
PRBool checkObjSign);
PRBool e_cert_trust_has_peer (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
+ PRBool checkSSL,
+ PRBool checkEmail,
PRBool checkObjSign);
PRBool e_cert_trust_has_any_user (CERTCertTrust *trust);
PRBool e_cert_trust_has_user (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
+ PRBool checkSSL,
+ PRBool checkEmail,
PRBool checkObjSign);
PRBool e_cert_trust_has_trusted_ca (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
+ PRBool checkSSL,
+ PRBool checkEmail,
PRBool checkObjSign);
PRBool e_cert_trust_has_trusted_peer (CERTCertTrust *trust,
- PRBool checkSSL,
- PRBool checkEmail,
+ PRBool checkSSL,
+ PRBool checkEmail,
PRBool checkObjSign);
void e_cert_trust_add_trust (unsigned int *t, unsigned int v);
PRBool e_cert_trust_has_trust (unsigned int t, unsigned int v);
diff --git a/smime/lib/e-cert.c b/smime/lib/e-cert.c
index f006751e4b..eb7b05374f 100644
--- a/smime/lib/e-cert.c
+++ b/smime/lib/e-cert.c
@@ -28,23 +28,23 @@
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
- *
+ *
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
- *
+ *
* The Original Code is the Netscape security libraries.
- *
+ *
* The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
+ * Communications Corporation. Portions created by Netscape are
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
- *
+ *
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
- * "GPL"), in which case the provisions of the GPL are applicable
- * instead of those above. If you wish to allow use of your
+ * "GPL"), in which case the provisions of the GPL are applicable
+ * instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
@@ -159,7 +159,7 @@ e_cert_dispose (GObject *object)
g_free (ec->priv);
ec->priv = NULL;
-
+
if (G_OBJECT_CLASS (parent_class)->dispose)
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -253,7 +253,7 @@ e_cert_populate (ECert *cert)
cert->priv->serial_number = CERT_Hexify (&cert->priv->cert->serialNumber, TRUE);
memset(fingerprint, 0, sizeof fingerprint);
- PK11_HashBuf(SEC_OID_SHA1, fingerprint,
+ PK11_HashBuf(SEC_OID_SHA1, fingerprint,
cert->priv->cert->derCert.data,
cert->priv->cert->derCert.len);
fpItem.data = fingerprint;
@@ -261,7 +261,7 @@ e_cert_populate (ECert *cert)
cert->priv->sha1_fingerprint = CERT_Hexify (&fpItem, TRUE);
memset(fingerprint, 0, sizeof fingerprint);
- PK11_HashBuf(SEC_OID_MD5, fingerprint,
+ PK11_HashBuf(SEC_OID_MD5, fingerprint,
cert->priv->cert->derCert.data,
cert->priv->cert->derCert.len);
fpItem.data = fingerprint;
@@ -509,7 +509,7 @@ e_cert_get_ca_cert(ECert *ecert)
}
static gboolean
-get_int_value (SECItem *versionItem,
+get_int_value (SECItem *versionItem,
unsigned long *version)
{
SECStatus srv;
@@ -561,7 +561,7 @@ process_version (SECItem *versionItem,
}
static gboolean
-process_serial_number_der (SECItem *serialItem,
+process_serial_number_der (SECItem *serialItem,
EASN1Object **retItem)
{
char *serialNumber;
@@ -585,7 +585,7 @@ get_default_oid_format (SECItem *oid,
char buf[300];
unsigned int len;
int written;
-
+
unsigned long val = oid->data[0];
unsigned int i = val % 40;
val /= 40;
@@ -596,11 +596,11 @@ get_default_oid_format (SECItem *oid,
val = 0;
for (i = 1; i < oid->len; ++i) {
- /* In this loop, we have to parse a DER formatted
- If the first bit is a 1, then the integer is
- represented by more than one byte. If the
+ /* In this loop, we have to parse a DER formatted
+ If the first bit is a 1, then the integer is
+ represented by more than one byte. If the
first bit is set then we continue on and add
- the values of the later bytes until we get
+ the values of the later bytes until we get
a byte without the first bit set.
*/
unsigned long j;
@@ -616,7 +616,7 @@ get_default_oid_format (SECItem *oid,
len += written;
if (len >= sizeof (buf))
g_warning ("OID data to big to display in 300 chars.");
- val = 0;
+ val = 0;
}
*text = g_strdup (buf);
@@ -625,7 +625,7 @@ get_default_oid_format (SECItem *oid,
static gboolean
get_oid_text (SECItem *oid, char **text)
-{
+{
SECOidTag oidTag = SECOID_FindOIDTag(oid);
char *temp;
@@ -690,7 +690,7 @@ get_oid_text (SECItem *oid, char **text)
break;
}
- return TRUE;
+ return TRUE;
}
@@ -699,7 +699,7 @@ process_raw_bytes (SECItem *data, char **text)
{
/* This function is used to display some DER bytes
that we have not added support for decoding.
- It prints the value of the byte out into a
+ It prints the value of the byte out into a
string that can later be displayed as a byte
string. We place a new line after 24 bytes
to break up extermaly long sequence of bytes.
@@ -716,7 +716,7 @@ process_raw_bytes (SECItem *data, char **text)
}
*text = g_string_free (str, FALSE);
return TRUE;
-}
+}
static gboolean
process_sec_algorithm_id (SECAlgorithmID *algID,
@@ -776,7 +776,7 @@ process_subject_public_key_info (CERTSubjectPublicKeyInfo *spki,
e_asn1_object_append_child (spkiSequence, sequenceItem);
/* The subjectPublicKey field is encoded as a bit string.
- ProcessRawBytes expects the lenght to be in bytes, so
+ ProcessRawBytes expects the lenght to be in bytes, so
let's convert the lenght into a temporary SECItem.
*/
data.data = spki->subjectPublicKey.data;
@@ -797,7 +797,7 @@ process_subject_public_key_info (CERTSubjectPublicKeyInfo *spki,
}
static gboolean
-process_ns_cert_type_extensions (SECItem *extData,
+process_ns_cert_type_extensions (SECItem *extData,
GString *text)
{
SECItem decoded;
@@ -805,7 +805,7 @@ process_ns_cert_type_extensions (SECItem *extData,
decoded.data = NULL;
decoded.len = 0;
- if (SECSuccess != SEC_ASN1DecodeItem(NULL, &decoded,
+ if (SECSuccess != SEC_ASN1DecodeItem(NULL, &decoded,
SEC_ASN1_GET(SEC_BitStringTemplate), extData)) {
g_string_append (text, _("Error: Unable to process extension"));
return TRUE;
@@ -854,7 +854,7 @@ process_key_usage_extensions (SECItem *extData, GString *text)
decoded.data = NULL;
decoded.len = 0;
- if (SECSuccess != SEC_ASN1DecodeItem(NULL, &decoded,
+ if (SECSuccess != SEC_ASN1DecodeItem(NULL, &decoded,
SEC_ASN1_GET(SEC_BitStringTemplate), extData)) {
g_string_append (text, _("Error: Unable to process extension"));
return TRUE;
@@ -891,12 +891,12 @@ process_key_usage_extensions (SECItem *extData, GString *text)
g_string_append (text, _("CRL Signer"));
g_string_append (text, "\n");
}
-
+
return TRUE;
}
static gboolean
-process_extension_data (SECOidTag oidTag, SECItem *extData,
+process_extension_data (SECOidTag oidTag, SECItem *extData,
GString *str)
{
gboolean rv;
@@ -912,7 +912,7 @@ process_extension_data (SECOidTag oidTag, SECItem *extData,
rv = process_raw_bytes (extData, &text);
g_string_append (str, text);
g_free (text);
- break;
+ break;
}
}
return rv;
@@ -956,7 +956,7 @@ process_single_extension (CERTCertExtension *extension,
}
static gboolean
-process_extensions (CERTCertExtension **extensions,
+process_extensions (CERTCertExtension **extensions,
EASN1Object *parentSequence)
{
EASN1Object *extensionSequence = e_asn1_object_new ();
@@ -1002,19 +1002,19 @@ process_name (CERTName *name, char **value)
/* The above whille loop will put us at the last member
* of the array which is a NULL pointer. So let's back
- * up one spot so that we have the last non-NULL entry in
- * the array in preparation for traversing the
+ * up one spot so that we have the last non-NULL entry in
+ * the array in preparation for traversing the
* RDN's (Relative Distinguished Name) in reverse order.
*/
lastRdn--;
-
+
/*
* Loop over name contents in _reverse_ RDN order appending to string
- * When building the Ascii string, NSS loops over these entries in
+ * When building the Ascii string, NSS loops over these entries in
* reverse order, so I will as well. The difference is that NSS
* will always place them in a one line string separated by commas,
* where I want each entry on a single line. I can't just use a comma
- * as my delimitter because it is a valid character to have in the
+ * as my delimitter because it is a valid character to have in the
* value portion of the AVA and could cause trouble when parsing.
*/
for (rdn = lastRdn; rdn >= rdns; rdn--) {
@@ -1072,15 +1072,15 @@ create_tbs_certificate_asn1_struct (ECert *cert, EASN1Object **seq)
EASN1Object *sequence = e_asn1_object_new ();
char *text;
EASN1Object *subitem;
- SECItem data;
+ SECItem data;
e_asn1_object_set_display_name (sequence, _("Certificate"));
-
+
if (!process_version (&cert->priv->cert->version, &subitem))
return FALSE;
e_asn1_object_append_child (sequence, subitem);
g_object_unref (subitem);
-
+
if (!process_serial_number_der (&cert->priv->cert->serialNumber, &subitem))
return FALSE;
e_asn1_object_append_child (sequence, subitem);
@@ -1113,7 +1113,7 @@ create_tbs_certificate_asn1_struct (ECert *cert, EASN1Object **seq)
nsCOMPtr<nsIX509CertValidity> validityData;
GetValidity(getter_AddRefs(validityData));
PRTime notBefore, notAfter;
-
+
validityData->GetNotBefore(&notBefore);
validityData->GetNotAfter(&notAfter);
validityData = 0;
@@ -1127,7 +1127,7 @@ create_tbs_certificate_asn1_struct (ECert *cert, EASN1Object **seq)
if (NS_FAILED(rv))
return rv;
#endif
-
+
subitem = e_asn1_object_new ();
e_asn1_object_set_display_name (subitem, _("Subject"));
diff --git a/smime/lib/e-pkcs12.c b/smime/lib/e-pkcs12.c
index 49a5f53e56..99b1d46753 100644
--- a/smime/lib/e-pkcs12.c
+++ b/smime/lib/e-pkcs12.c
@@ -28,23 +28,23 @@
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
- *
+ *
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
- *
+ *
* The Original Code is the Netscape security libraries.
- *
+ *
* The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
+ * Communications Corporation. Portions created by Netscape are
* Copyright (C) 2000 Netscape Communications Corporation. All
* Rights Reserved.
- *
+ *
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
- * "GPL"), in which case the provisions of the GPL are applicable
- * instead of those above. If you wish to allow use of your
+ * "GPL"), in which case the provisions of the GPL are applicable
+ * instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
@@ -114,7 +114,7 @@ e_pkcs12_dispose (GObject *object)
g_free (pk->priv);
pk->priv = NULL;
-
+
if (G_OBJECT_CLASS (parent_class)->dispose)
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -196,8 +196,8 @@ input_to_decoder (SEC_PKCS12DecoderContext *dcx, const char *path, GError **erro
}
/* feed the file data into the decoder */
- srv = SEC_PKCS12DecoderUpdate(dcx,
- (unsigned char*) buf,
+ srv = SEC_PKCS12DecoderUpdate(dcx,
+ (unsigned char*) buf,
amount);
if (srv) {
/* XXX g_error */
@@ -228,9 +228,9 @@ prompt_for_password (char *title, char *prompt, SECItem *pwd)
const char *inptr = passwd;
unsigned char *outptr;
gunichar2 c;
-
+
SECITEM_AllocItem(NULL, pwd, sizeof (gunichar2) * (len + 1));
-
+
outptr = pwd->data;
while (inptr && (c = (gunichar2) (g_utf8_get_char (inptr) & 0xffff))) {
inptr = g_utf8_next_char (inptr);
@@ -238,10 +238,10 @@ prompt_for_password (char *title, char *prompt, SECItem *pwd)
*outptr++ = ((char *) &c)[0];
*outptr++ = ((char *) &c)[1];
}
-
+
*outptr++ = 0;
*outptr++ = 0;
-
+
memset (passwd, 0, strlen (passwd));
g_free (passwd);
}
@@ -333,7 +333,7 @@ e_pkcs12_import_from_file (EPKCS12 *pkcs12, const char *path, GError **error)
gboolean rv = TRUE;
gboolean wantRetry;
PK11SlotInfo *slot;
-
+
printf ("importing pkcs12 from `%s'\n", path);
slot = PK11_GetInternalKeySlot();
@@ -371,7 +371,7 @@ nickname_collision(SECItem *oldNick, PRBool *cancel, void *wincx)
/* The user is trying to import a PKCS#12 file that doesn't have the
attribute we use to set the nickname. So in order to reduce the
number of interactions we require with the user, we'll build a nickname
- for the user. The nickname isn't prominently displayed in the UI,
+ for the user. The nickname isn't prominently displayed in the UI,
so it's OK if we generate one on our own here.
XXX If the NSS API were smarter and actually passed a pointer to
the CERTCertificate* we're importing we could actually just
@@ -385,12 +385,12 @@ nickname_collision(SECItem *oldNick, PRBool *cancel, void *wincx)
/* If we've gotten this far, that means there isn't a certificate
in the database that has the same subject name as the cert we're
- trying to import. So we need to come up with a "nickname" to
- satisfy the NSS requirement or fail in trying to import.
- Basically we use a default nickname from a properties file and
+ trying to import. So we need to come up with a "nickname" to
+ satisfy the NSS requirement or fail in trying to import.
+ Basically we use a default nickname from a properties file and
see if a certificate exists with that nickname. If there isn't, then
- create update the count by one and append the string '#1' Or
- whatever the count currently is, and look for a cert with
+ create update the count by one and append the string '#1' Or
+ whatever the count currently is, and look for a cert with
that nickname. Keep updating the count until we find a nickname
without a corresponding cert.
XXX If a user imports *many* certs without the 'friendly name'
@@ -423,6 +423,6 @@ static gboolean
handle_error(int myerr)
{
printf ("handle_error (%d)\n", myerr);
-
+
return FALSE;
}
diff --git a/tools/killev.c b/tools/killev.c
index 70f3dd803a..029fc47235 100644
--- a/tools/killev.c
+++ b/tools/killev.c
@@ -190,7 +190,7 @@ main (int argc, char **argv)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- gnome_program_init (PACKAGE, VERSION, LIBGNOME_MODULE, argc, argv,
+ gnome_program_init (PACKAGE, VERSION, LIBGNOME_MODULE, argc, argv,
GNOME_PROGRAM_STANDARD_PROPERTIES,
NULL);
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c
index 48bf09a1b0..e1a75412bb 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.c
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -112,7 +112,7 @@ static void set_map_timezone (ETimezoneDialog *etd,
icaltimezone *zone);
static void on_combo_changed (GtkEditable *entry,
ETimezoneDialog *etd);
-static void map_destroy_cb (gpointer data,
+static void map_destroy_cb (gpointer data,
GObject *where_object_was);
G_DEFINE_TYPE (ETimezoneDialog, e_timezone_dialog, G_TYPE_OBJECT)
@@ -311,7 +311,7 @@ get_local_offset (void)
time_t now = time(NULL), t_gmt, t_local;
struct tm gmt, local;
int diff;
-
+
gmtime_r (&now, &gmt);
localtime_r (&now, &local);
t_gmt = mktime (&gmt);
@@ -326,7 +326,7 @@ static icaltimezone*
get_local_timezone(void)
{
icaltimezone *zone;
-
+
tzset();
zone = icaltimezone_get_builtin_timezone_from_offset (-timezone, tzname[0]);
@@ -420,13 +420,13 @@ zone_display_name_with_offset (icaltimezone *zone)
int offset;
char buffer [100];
time_t now = time(NULL);
-
+
gmtime_r ((const time_t *) &now, &local);
tt = tm_to_icaltimetype (&local, TRUE);
offset = icaltimezone_get_utc_offset(zone, &tt, NULL);
format_utc_offset (offset, buffer);
-
+
display_name = icaltimezone_get_display_name (zone);
if (icaltimezone_get_builtin_timezone (display_name))
display_name = _(display_name);
@@ -438,7 +438,7 @@ static const char *
zone_display_name (icaltimezone *zone)
{
const char *display_name;
-
+
display_name = icaltimezone_get_display_name (zone);
if (icaltimezone_get_builtin_timezone (display_name))
display_name = _(display_name);
@@ -479,7 +479,7 @@ on_map_motion (GtkWidget *widget, GdkEventMotion *event, gpointer data)
double longitude, latitude;
icaltimezone *new_zone;
char *display=NULL;
-
+
etd = E_TIMEZONE_DIALOG (data);
priv = etd->priv;
@@ -503,7 +503,7 @@ on_map_motion (GtkWidget *widget, GdkEventMotion *event, gpointer data)
gtk_label_set_text (GTK_LABEL (priv->preview_label), display);
g_free (display);
-
+
return TRUE;
}
@@ -543,7 +543,7 @@ on_map_visibility_changed (GtkWidget *w, GdkEventVisibility *event,
{
ETimezoneDialog *etd;
ETimezoneDialogPrivate *priv;
-
+
etd = E_TIMEZONE_DIALOG (data);
priv = etd->priv;
@@ -570,31 +570,31 @@ on_map_button_pressed (GtkWidget *w, GdkEventButton *event, gpointer data)
ETimezoneDialog *etd;
ETimezoneDialogPrivate *priv;
double longitude, latitude;
-
+
etd = E_TIMEZONE_DIALOG (data);
priv = etd->priv;
e_map_window_to_world (priv->map, (double) event->x, (double) event->y,
&longitude, &latitude);
-
+
if (event->button != 1) {
e_map_zoom_out (priv->map);
} else {
if (e_map_get_magnification (priv->map) <= 1.0)
e_map_zoom_to_location (priv->map, longitude,
latitude);
-
+
if (priv->point_selected)
e_map_point_set_color_rgba (priv->map,
priv->point_selected,
E_TIMEZONE_DIALOG_MAP_POINT_NORMAL_RGBA);
priv->point_selected = priv->point_hover;
-
+
priv->zone = get_zone_from_point (etd, priv->point_selected);
gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (priv->timezone_combo)->entry),
zone_display_name (priv->zone));
}
-
+
return TRUE;
}
@@ -673,7 +673,7 @@ e_timezone_dialog_set_timezone (ETimezoneDialog *etd,
{
ETimezoneDialogPrivate *priv;
char *display = NULL;
-
+
g_return_if_fail (E_IS_TIMEZONE_DIALOG (etd));
if (!zone) {
@@ -684,7 +684,7 @@ e_timezone_dialog_set_timezone (ETimezoneDialog *etd,
if (zone)
display = zone_display_name_with_offset(zone);
-
+
priv = etd->priv;
priv->zone = zone;
@@ -796,7 +796,7 @@ e_timezone_dialog_reparent (ETimezoneDialog *etd,
static void
map_destroy_cb(gpointer data, GObject *where_object_was)
{
-
+
ETimezoneDialogPrivate *priv = data;
if (priv->timeout_id) {
g_source_remove(priv->timeout_id);
diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c
index 7b286daa30..08db6c9402 100644
--- a/widgets/menus/gal-define-views-dialog.c
+++ b/widgets/menus/gal-define-views-dialog.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-define-views-dialog.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -73,7 +73,7 @@ gal_define_views_dialog_class_init (GalDefineViewsDialogClass *klass)
object_class->get_property = gal_define_views_dialog_get_property;
object_class->dispose = gal_define_views_dialog_dispose;
- g_object_class_install_property (object_class, PROP_COLLECTION,
+ g_object_class_install_property (object_class, PROP_COLLECTION,
g_param_spec_object ("collection",
_("Collection"),
/*_( */"XXX blurb" /*)*/,
@@ -109,7 +109,7 @@ gdvd_button_new_dialog_callback (GtkWidget *widget, int id, GalDefineViewsDialog
gtk_list_store_append (GTK_LIST_STORE (dialog->model), &iter);
gtk_list_store_set (GTK_LIST_STORE (dialog->model), &iter,
COL_GALVIEW_NAME, name,
- COL_GALVIEW_DATA, item,
+ COL_GALVIEW_DATA, item,
-1);
gal_view_edit (view, GTK_WINDOW (dialog));
@@ -168,7 +168,7 @@ gdvd_button_delete_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
gal_view_collection_delete_view (dialog->collection, row);
path = gtk_tree_model_get_path (dialog->model, &iter);
gtk_list_store_remove (GTK_LIST_STORE (dialog->model), &iter);
-
+
if (gtk_tree_path_prev (path)) {
gtk_tree_model_get_iter (dialog->model, &iter, path);
} else {
@@ -201,7 +201,7 @@ gdvd_button_copy_callback(GtkWidget *widget, GalDefineViewsDialog *dialog)
}
#endif
-
+
static void
gdvd_cursor_changed_callback (GtkWidget *widget, GalDefineViewsDialog *dialog)
{
@@ -237,7 +237,7 @@ static void
dialog_response (GalDefineViewsDialog *dialog, int response_id, gpointer data)
{
gal_view_collection_save (dialog->collection);
-}
+}
static void
gal_define_views_dialog_init (GalDefineViewsDialog *dialog)
@@ -321,7 +321,7 @@ gal_define_views_dialog_set_collection(GalDefineViewsDialog *dialog,
/* hide built in views */
/*if (item->built_in == 1)
continue;*/
-
+
char *title = NULL;
title = e_str_without_underscores (item->title);
@@ -348,7 +348,7 @@ gal_define_views_dialog_set_collection(GalDefineViewsDialog *dialog,
COL_GALVIEW_NAME, _("Name"),
renderer, "text", COL_GALVIEW_NAME,
NULL);
-
+
/* set sort column */
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (dialog->model),
COL_GALVIEW_NAME, GTK_SORT_ASCENDING);
@@ -394,7 +394,7 @@ gal_define_views_dialog_set_property (GObject *object, guint prop_id, const GVal
GalDefineViewsDialog *dialog;
dialog = GAL_DEFINE_VIEWS_DIALOG (object);
-
+
switch (prop_id){
case PROP_COLLECTION:
if (g_value_get_object (value))
diff --git a/widgets/menus/gal-define-views-dialog.h b/widgets/menus/gal-define-views-dialog.h
index 2978c997ad..e353886d21 100644
--- a/widgets/menus/gal-define-views-dialog.h
+++ b/widgets/menus/gal-define-views-dialog.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-define-views-dialog.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c
index 55435876b4..09bedf2381 100644
--- a/widgets/menus/gal-define-views-model.c
+++ b/widgets/menus/gal-define-views-model.c
@@ -174,14 +174,14 @@ gal_define_views_model_class_init (GalDefineViewsModelClass *klass)
object_class->set_property = gal_define_views_model_set_property;
object_class->get_property = gal_define_views_model_get_property;
- g_object_class_install_property (object_class, PROP_EDITABLE,
+ g_object_class_install_property (object_class, PROP_EDITABLE,
g_param_spec_boolean ("editable",
_("Editable"),
/*_( */"XXX blurb" /*)*/,
FALSE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_COLLECTION,
+ g_object_class_install_property (object_class, PROP_COLLECTION,
g_param_spec_object ("collection",
_("Collection"),
/*_( */"XXX blurb" /*)*/,
diff --git a/widgets/menus/gal-define-views-model.h b/widgets/menus/gal-define-views-model.h
index 75a2cb75cb..339439680d 100644
--- a/widgets/menus/gal-define-views-model.h
+++ b/widgets/menus/gal-define-views-model.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-define-views-model.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/menus/gal-view-collection.c b/widgets/menus/gal-view-collection.c
index 728ed5544c..f286ee445d 100644
--- a/widgets/menus/gal-view-collection.c
+++ b/widgets/menus/gal-view-collection.c
@@ -395,7 +395,7 @@ load_single_dir (GalViewCollection *collection,
xmlNode *child;
char *filename = g_build_filename(dir, "galview.xml", NULL);
char *default_view;
-
+
if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {
#ifdef G_OS_WIN32
gchar *locale_filename = g_win32_locale_filename_from_utf8 (filename);
@@ -406,7 +406,7 @@ load_single_dir (GalViewCollection *collection,
doc = xmlParseFile (filename);
#endif
}
-
+
if (!doc) {
g_free (filename);
return;
diff --git a/widgets/menus/gal-view-collection.h b/widgets/menus/gal-view-collection.h
index a74d6fa869..d5a1e493ef 100644
--- a/widgets/menus/gal-view-collection.h
+++ b/widgets/menus/gal-view-collection.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-collection.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/menus/gal-view-etable.c b/widgets/menus/gal-view-etable.c
index d27cbdbae1..de58cf91e9 100644
--- a/widgets/menus/gal-view-etable.c
+++ b/widgets/menus/gal-view-etable.c
@@ -87,7 +87,7 @@ gal_view_etable_edit (GalView *view, GtkWindow *parent)
G_CALLBACK(config_changed), view);
}
-static void
+static void
gal_view_etable_load (GalView *view,
const char *filename)
{
diff --git a/widgets/menus/gal-view-etable.h b/widgets/menus/gal-view-etable.h
index e44f09ae33..83d1259fca 100644
--- a/widgets/menus/gal-view-etable.h
+++ b/widgets/menus/gal-view-etable.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-etable.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/menus/gal-view-factory-etable.h b/widgets/menus/gal-view-factory-etable.h
index 6bce7d7fd3..2535ef01b4 100644
--- a/widgets/menus/gal-view-factory-etable.h
+++ b/widgets/menus/gal-view-factory-etable.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-factory-etable.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/menus/gal-view-factory.c b/widgets/menus/gal-view-factory.c
index b570e3491b..e1fd210bd2 100644
--- a/widgets/menus/gal-view-factory.c
+++ b/widgets/menus/gal-view-factory.c
@@ -92,8 +92,8 @@ gal_view_factory_get_type_code (GalViewFactory *factory)
static void
gal_view_factory_class_init (GalViewFactoryClass *klass)
{
- klass->get_title = NULL;
- klass->new_view = NULL;
+ klass->get_title = NULL;
+ klass->new_view = NULL;
}
static void
diff --git a/widgets/menus/gal-view-factory.h b/widgets/menus/gal-view-factory.h
index de119f1596..939917d488 100644
--- a/widgets/menus/gal-view-factory.h
+++ b/widgets/menus/gal-view-factory.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-factory.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/menus/gal-view-instance-save-as-dialog.c b/widgets/menus/gal-view-instance-save-as-dialog.c
index 50428b80fc..1a3b917c28 100644
--- a/widgets/menus/gal-view-instance-save-as-dialog.c
+++ b/widgets/menus/gal-view-instance-save-as-dialog.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-define-views-dialog.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -117,7 +117,7 @@ gal_view_instance_save_as_dialog_set_property (GObject *object, guint prop_id, c
GalViewInstanceSaveAsDialog *dialog;
dialog = GAL_VIEW_INSTANCE_SAVE_AS_DIALOG (object);
-
+
switch (prop_id){
case PROP_INSTANCE:
if (g_value_get_object (value))
@@ -174,7 +174,7 @@ gal_view_instance_save_as_dialog_class_init (GalViewInstanceSaveAsDialogClass *k
object_class->get_property = gal_view_instance_save_as_dialog_get_property;
object_class->dispose = gal_view_instance_save_as_dialog_dispose;
- g_object_class_install_property (object_class, PROP_INSTANCE,
+ g_object_class_install_property (object_class, PROP_INSTANCE,
g_param_spec_object ("instance",
_("Instance"),
/*_( */"XXX blurb" /*)*/,
@@ -223,7 +223,7 @@ gal_view_instance_save_as_dialog_init (GalViewInstanceSaveAsDialog *dialog)
gal_view_instance_save_as_dialog_set_instance (dialog, dialog->instance);
gtk_widget_show_all (table);
}
-
+
gvisad_setup_radio_buttons (dialog);
gtk_window_set_policy(GTK_WINDOW(dialog), FALSE, TRUE, FALSE);
gtk_window_set_title (GTK_WINDOW (dialog), _("Save Current View"));
diff --git a/widgets/menus/gal-view-instance-save-as-dialog.h b/widgets/menus/gal-view-instance-save-as-dialog.h
index c2fda0996b..5808d9840c 100644
--- a/widgets/menus/gal-view-instance-save-as-dialog.h
+++ b/widgets/menus/gal-view-instance-save-as-dialog.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-define-views-dialog.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index 0cb8b0934e..fbdcf608cc 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-instance.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -243,7 +243,7 @@ load_current_view (GalViewInstance *instance)
xmlDoc *doc = NULL;
xmlNode *root;
GalView *view = NULL;
-
+
if (g_file_test (instance->current_view_filename, G_FILE_TEST_IS_REGULAR)) {
#ifdef G_OS_WIN32
gchar *locale_filename = g_win32_locale_filename_from_utf8 (instance->current_view_filename);
@@ -254,7 +254,7 @@ load_current_view (GalViewInstance *instance)
doc = xmlParseFile(instance->current_view_filename);
#endif
}
-
+
if (doc == NULL) {
instance->current_id = g_strdup (gal_view_instance_get_default_view (instance));
@@ -303,9 +303,9 @@ load_current_view (GalViewInstance *instance)
* gal_view_instance_new:
* @collection: This %GalViewCollection should be loaded before being passed to this function.
* @instance_id: Which instance of this type of object is this (for most of evo, this is the folder id.)
- *
+ *
* Create a new %GalViewInstance.
- *
+ *
* Return value: The new %GalViewInstance.
**/
GalViewInstance *
@@ -466,7 +466,7 @@ gal_view_instance_exists (GalViewInstance *instance)
return TRUE;
else
return FALSE;
-
+
}
typedef struct {
@@ -492,7 +492,7 @@ add_popup_radio_item (EPopupMenu *menu_item,
gpointer closure,
gboolean value)
{
- EPopupMenu menu_item_struct =
+ EPopupMenu menu_item_struct =
E_POPUP_RADIO_ITEM_CC (title,
fn,
closure,
@@ -509,7 +509,7 @@ add_popup_menu_item (EPopupMenu *menu_item,
GCallback fn,
gpointer closure)
{
- EPopupMenu menu_item_struct =
+ EPopupMenu menu_item_struct =
E_POPUP_ITEM_CC (title,
fn,
closure,
@@ -598,7 +598,7 @@ gal_view_instance_free_popup_menu (GalViewInstance *instance, EPopupMenu *menu)
{
int i;
/* This depends on the first non-custom closure to be a separator or a terminator. */
- for (i = 0; menu[i].name && *(menu[i].name); i++) {
+ for (i = 0; menu[i].name && *(menu[i].name); i++) {
g_object_unref (((ListenerClosure *)(menu[i].closure))->instance);
g_free (menu[i].closure);
}
diff --git a/widgets/menus/gal-view-instance.h b/widgets/menus/gal-view-instance.h
index 1d1c6a3310..f1ebf1cdfa 100644
--- a/widgets/menus/gal-view-instance.h
+++ b/widgets/menus/gal-view-instance.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-instance.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c
index 26b592fa98..d2b9929a2a 100644
--- a/widgets/menus/gal-view-menus.c
+++ b/widgets/menus/gal-view-menus.c
@@ -99,7 +99,7 @@ remove_instance (GalViewMenus *gvm)
if (gvm->priv->instance) {
if (gvm->priv->instance_changed_id != 0)
g_signal_handler_disconnect (gvm->priv->instance, gvm->priv->instance_changed_id);
-
+
if (gvm->priv->instance->collection && gvm->priv->collection_changed_id != 0)
g_signal_handler_disconnect (gvm->priv->instance->collection, gvm->priv->collection_changed_id);
}
@@ -154,7 +154,7 @@ gal_view_menus_finalize (GObject *object)
if (gvm->priv->component)
bonobo_object_unref (gvm->priv->component);
-
+
if (gvm->priv->define_views_dialog)
g_object_weak_unref (G_OBJECT (gvm->priv->define_views_dialog), clear_define_views_dialog, gvm);
@@ -285,7 +285,7 @@ build_menus(GalViewMenus *menus)
place = bonobo_ui_node_new_child(submenu, "placeholder");
bonobo_ui_node_set_attr(place, "name", "ViewBegin");
-
+
submenu = bonobo_ui_node_new_child(place, "submenu");
bonobo_ui_node_set_attr(submenu, "name", "CurrentView");
bonobo_ui_node_set_attr(submenu, "_label", N_("C_urrent View"));
@@ -302,7 +302,7 @@ build_menus(GalViewMenus *menus)
ListenerClosure *closure;
char *label;
char *tip;
-
+
menuitem = bonobo_ui_node_new_child(submenu, "menuitem");
bonobo_ui_node_set_attr(menuitem, "name", item->id);
bonobo_ui_node_set_attr(menuitem, "id", item->id);
@@ -343,7 +343,7 @@ build_menus(GalViewMenus *menus)
menuitem = bonobo_ui_node_new_child(submenu, "separator");
bonobo_ui_node_set_attr(menuitem, "name", "GalView:first_sep");
bonobo_ui_node_set_attr(menuitem, "f", "");
-
+
menuitem = bonobo_ui_node_new_child(submenu, "menuitem");
bonobo_ui_node_set_attr(menuitem, "name", "custom_view");
@@ -366,7 +366,7 @@ build_menus(GalViewMenus *menus)
command = bonobo_ui_node_new_child(commands, "cmd");
bonobo_ui_node_set_attr(command, "name", "SaveCurrentView");
- bonobo_ui_node_set_attr(command, "_tip", N_("Save current custom view"));
+ bonobo_ui_node_set_attr(command, "_tip", N_("Save current custom view"));
}
menuitem = bonobo_ui_node_new_child(submenu, "separator");
@@ -380,7 +380,7 @@ build_menus(GalViewMenus *menus)
command = bonobo_ui_node_new_child(commands, "cmd");
bonobo_ui_node_set_attr(command, "name", "DefineViews");
- bonobo_ui_node_set_attr(command, "_tip", N_("Create or edit views"));
+ bonobo_ui_node_set_attr(command, "_tip", N_("Create or edit views"));
}
xml = bonobo_ui_node_to_string(root, TRUE);
diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c
index 89ead8d7b9..b87d1064f9 100644
--- a/widgets/menus/gal-view-new-dialog.c
+++ b/widgets/menus/gal-view-new-dialog.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-new-dialog.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -60,14 +60,14 @@ gal_view_new_dialog_class_init (GalViewNewDialogClass *klass)
object_class->get_property = gal_view_new_dialog_get_property;
object_class->dispose = gal_view_new_dialog_dispose;
- g_object_class_install_property (object_class, PROP_NAME,
+ g_object_class_install_property (object_class, PROP_NAME,
g_param_spec_string ("name",
_("Name"),
/*_( */"XXX blurb" /*)*/,
NULL,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_FACTORY,
+ g_object_class_install_property (object_class, PROP_FACTORY,
g_param_spec_object ("factory",
_("Factory"),
/*_( */"XXX blurb" /*)*/,
@@ -114,7 +114,7 @@ static void
gal_view_new_dialog_dispose (GObject *object)
{
GalViewNewDialog *gal_view_new_dialog = GAL_VIEW_NEW_DIALOG(object);
-
+
if (gal_view_new_dialog->gui)
g_object_unref(gal_view_new_dialog->gui);
gal_view_new_dialog->gui = NULL;
@@ -137,7 +137,7 @@ sensitize_ok_response (GalViewNewDialog *dialog)
{
gboolean ok = TRUE;
const char *text;
-
+
text = gtk_entry_get_text (GTK_ENTRY (dialog->entry));
if (!text || !text[0])
ok = FALSE;
@@ -244,7 +244,7 @@ gal_view_new_dialog_set_property (GObject *object, guint prop_id, const GValue *
GtkWidget *entry;
dialog = GAL_VIEW_NEW_DIALOG (object);
-
+
switch (prop_id){
case PROP_NAME:
entry = glade_xml_get_widget(dialog->gui, "entry-name");
diff --git a/widgets/menus/gal-view-new-dialog.h b/widgets/menus/gal-view-new-dialog.h
index 6aceb28031..3d898d45cd 100644
--- a/widgets/menus/gal-view-new-dialog.h
+++ b/widgets/menus/gal-view-new-dialog.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view-new-dialog.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -54,7 +54,7 @@ typedef struct _GalViewNewDialogClass GalViewNewDialogClass;
struct _GalViewNewDialog
{
GtkDialog parent;
-
+
/* item specific fields */
GladeXML *gui;
diff --git a/widgets/menus/gal-view.c b/widgets/menus/gal-view.c
index 4a2403eedb..66d7d3ffa6 100644
--- a/widgets/menus/gal-view.c
+++ b/widgets/menus/gal-view.c
@@ -63,7 +63,7 @@ gal_view_edit (GalView *view,
* @view: The view to load to
* @filename: The file to load from
*/
-void
+void
gal_view_load (GalView *view,
const char *filename)
{
@@ -179,10 +179,10 @@ gal_view_class_init (GalViewClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- klass->edit = NULL;
- klass->load = NULL;
- klass->save = NULL;
- klass->get_title = NULL;
+ klass->edit = NULL;
+ klass->load = NULL;
+ klass->save = NULL;
+ klass->get_title = NULL;
klass->clone = NULL;
klass->changed = NULL;
diff --git a/widgets/menus/gal-view.h b/widgets/menus/gal-view.h
index 428053fa57..bad347e824 100644
--- a/widgets/menus/gal-view.h
+++ b/widgets/menus/gal-view.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* gal-view.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/misc/e-activity-handler.c b/widgets/misc/e-activity-handler.c
index c324268db4..b9351878a6 100644
--- a/widgets/misc/e-activity-handler.c
+++ b/widgets/misc/e-activity-handler.c
@@ -246,7 +246,7 @@ static void
e_activity_handler_class_init (EActivityHandlerClass *activity_handler_class)
{
GObjectClass *object_class = (GObjectClass *) activity_handler_class;
-
+
object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
}
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index 0525887cc4..192fba56e0 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -70,7 +70,7 @@ static GnomeIconListClass *parent_class = NULL;
struct _EAttachmentBarPrivate {
GtkWidget *attach; /* attachment file dialogue, if active */
-
+
gboolean batch_unref;
GPtrArray *attachments;
char *path;
@@ -92,7 +92,7 @@ static char *
size_to_string (gulong size)
{
char *size_string;
-
+
/* FIXME: The following should probably go into a separate module, as
we might have to do the same thing in other places as well. Also,
I am not sure this will be OK for all the languages. */
@@ -109,7 +109,7 @@ attachment_destroy (EAttachmentBar *bar, EAttachment *attachment)
{
if (bar->priv->batch_unref)
return;
-
+
if (g_ptr_array_remove (bar->priv->attachments, attachment)) {
update (bar);
g_signal_emit (bar, signals[CHANGED], 0);
@@ -127,13 +127,13 @@ static void
add_common (EAttachmentBar *bar, EAttachment *attachment)
{
g_return_if_fail (attachment != NULL);
-
+
g_ptr_array_add (bar->priv->attachments, attachment);
g_object_weak_ref ((GObject *) attachment, (GWeakNotify) attachment_destroy, bar);
g_signal_connect (attachment, "changed", G_CALLBACK (attachment_changed_cb), bar);
-
+
update (bar);
-
+
g_signal_emit (bar, signals[CHANGED], 0);
}
@@ -148,9 +148,9 @@ add_from_file (EAttachmentBar *bar, const char *file_name, const char *dispositi
{
EAttachment *attachment;
CamelException ex;
-
+
camel_exception_init (&ex);
-
+
if ((attachment = e_attachment_new (file_name, disposition, &ex))) {
add_common (bar, attachment);
} else {
@@ -170,7 +170,7 @@ calculate_height_width(EAttachmentBar *bar, int *new_width, int *new_height)
int width, height, icon_width;
PangoFontMetrics *metrics;
PangoContext *context;
-
+
context = gtk_widget_get_pango_context ((GtkWidget *) bar);
metrics = pango_context_get_metrics (context, ((GtkWidget *) bar)->style->font_desc, pango_context_get_language (context));
width = PANGO_PIXELS (pango_font_metrics_get_approximate_char_width (metrics)) * 15;
@@ -205,20 +205,20 @@ e_attachment_bar_create_attachment_cache (EAttachment *attachment)
GdkPixbufLoader *loader;
gboolean error = TRUE;
GdkPixbuf *pixbuf;
-
+
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (attachment->body));
mstream = (CamelStreamMem *) camel_stream_mem_new ();
-
+
camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) mstream);
-
+
/* Stream image into pixbuf loader */
loader = gdk_pixbuf_loader_new ();
error = !gdk_pixbuf_loader_write (loader, mstream->buffer->data, mstream->buffer->len, NULL);
gdk_pixbuf_loader_close (loader, NULL);
-
+
if (!error) {
int ratio, width, height;
-
+
/* Shrink pixbuf */
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
width = gdk_pixbuf_get_width (pixbuf);
@@ -240,7 +240,7 @@ e_attachment_bar_create_attachment_cache (EAttachment *attachment)
width = 1;
}
}
-
+
attachment->pixbuf_cache = gdk_pixbuf_scale_simple (pixbuf, width,height,GDK_INTERP_BILINEAR);
pixbuf = attachment->pixbuf_cache;
g_object_ref(pixbuf);
@@ -248,7 +248,7 @@ e_attachment_bar_create_attachment_cache (EAttachment *attachment)
attachment->pixbuf_cache = NULL;
g_warning ("GdkPixbufLoader Error");
}
-
+
/* Destroy everything */
g_object_unref (loader);
camel_object_unref (mstream);
@@ -262,14 +262,14 @@ update (EAttachmentBar *bar)
GnomeIconList *icon_list;
int bar_width, bar_height;
int i;
-
+
priv = bar->priv;
icon_list = GNOME_ICON_LIST (bar);
-
+
gnome_icon_list_freeze (icon_list);
-
+
gnome_icon_list_clear (icon_list);
-
+
/* FIXME could be faster, but we don't care. */
for (i = 0; i < priv->attachments->len; i++) {
EAttachment *attachment;
@@ -277,9 +277,9 @@ update (EAttachmentBar *bar)
char *size_string, *label;
GdkPixbuf *pixbuf = NULL;
const char *desc;
-
+
attachment = priv->attachments->pdata[i];
-
+
if (!attachment->is_available_local || !attachment->body) {
if ((pixbuf = e_icon_factory_get_icon("mail-attachment", E_ICON_SIZE_DIALOG))) {
attachment->index = gnome_icon_list_append_pixbuf (icon_list, pixbuf, NULL, "");
@@ -287,9 +287,9 @@ update (EAttachmentBar *bar)
}
continue;
}
-
+
content_type = camel_mime_part_get_content_type (attachment->body);
- /* Get the image out of the attachment
+ /* Get the image out of the attachment
and create a thumbnail for it */
if ((pixbuf = attachment->pixbuf_cache)) {
g_object_ref(pixbuf);
@@ -298,20 +298,20 @@ update (EAttachmentBar *bar)
CamelStreamMem *mstream;
GdkPixbufLoader *loader;
gboolean error = TRUE;
-
+
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (attachment->body));
mstream = (CamelStreamMem *) camel_stream_mem_new ();
-
+
camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) mstream);
-
+
/* Stream image into pixbuf loader */
loader = gdk_pixbuf_loader_new ();
error = !gdk_pixbuf_loader_write (loader, mstream->buffer->data, mstream->buffer->len, NULL);
gdk_pixbuf_loader_close (loader, NULL);
-
+
if (!error) {
int ratio, width, height;
-
+
/* Shrink pixbuf */
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
width = gdk_pixbuf_get_width (pixbuf);
@@ -333,7 +333,7 @@ update (EAttachmentBar *bar)
width = 1;
}
}
-
+
attachment->pixbuf_cache = gdk_pixbuf_scale_simple (pixbuf, width, height,
GDK_INTERP_BILINEAR);
pixbuf = attachment->pixbuf_cache;
@@ -342,32 +342,32 @@ update (EAttachmentBar *bar)
pixbuf = NULL;
g_warning ("GdkPixbufLoader Error");
}
-
+
/* Destroy everything */
g_object_unref (loader);
camel_object_unref (mstream);
}
-
+
desc = camel_mime_part_get_description (attachment->body);
if (!desc || *desc == '\0') {
if (attachment->file_name)
desc = attachment->file_name;
- else
+ else
desc = camel_mime_part_get_filename (attachment->body);
}
-
+
if (!desc)
desc = _("attachment");
-
+
if (attachment->size && (size_string = size_to_string (attachment->size))) {
label = g_strdup_printf ("%s (%s)", desc, size_string);
g_free (size_string);
} else
label = g_strdup (desc);
-
+
if (pixbuf == NULL) {
char *mime_type;
-
+
mime_type = camel_content_type_simple (content_type);
pixbuf = e_icon_for_mime_type (mime_type, 48);
if (pixbuf == NULL) {
@@ -376,60 +376,60 @@ update (EAttachmentBar *bar)
}
g_free (mime_type);
}
-
+
if (pixbuf) {
GdkPixbuf *pixbuf_orig = pixbuf;
pixbuf = gdk_pixbuf_add_alpha (pixbuf_orig, TRUE, 255, 255, 255);
-
+
/* gdk_pixbuf_add_alpha returns a newly allocated pixbuf,
- free the original one.
+ free the original one.
*/
g_object_unref (pixbuf_orig);
-
+
/* In case of a attachment bar, in a signed/encrypted part, display the status as a emblem*/
if (attachment->sign) {
/* Show the signature status at the right-bottom.*/
GdkPixbuf *sign = NULL;
int x, y;
-
+
if (attachment->sign == CAMEL_CIPHER_VALIDITY_SIGN_BAD)
sign = e_icon_factory_get_icon ("stock_signature-bad", E_ICON_SIZE_MENU);
else if (attachment->sign == CAMEL_CIPHER_VALIDITY_SIGN_GOOD)
sign = e_icon_factory_get_icon ("stock_signature-ok", E_ICON_SIZE_MENU);
else
sign = e_icon_factory_get_icon ("stock_signature", E_ICON_SIZE_MENU);
-
+
x = gdk_pixbuf_get_width (pixbuf) - 17;
y = gdk_pixbuf_get_height (pixbuf) - 17;
-
+
gdk_pixbuf_copy_area (sign, 0, 0, 16, 16, pixbuf, x, y);
g_object_unref (sign);
}
-
+
if (attachment->encrypt) {
/* Show the encryption status at the top left.*/
GdkPixbuf *encrypt = e_icon_factory_get_icon ("stock_lock-ok", E_ICON_SIZE_MENU);
-
+
gdk_pixbuf_copy_area (encrypt, 0, 0, 16, 16, pixbuf, 1, 1);
g_object_unref (encrypt);
}
-
+
gnome_icon_list_append_pixbuf (icon_list, pixbuf, NULL, label);
g_object_unref (pixbuf);
}
-
+
g_free (label);
}
-
+
gnome_icon_list_thaw (icon_list);
-
+
/* Resize */
if (bar->expand) {
gtk_widget_get_size_request ((GtkWidget *) bar, &bar_width, &bar_height);
-
+
if (bar->priv->attachments->len) {
int per_col, rows, height, width;
-
+
calculate_height_width(bar, &width, &height);
per_col = bar_width / width;
per_col = (per_col ? per_col : 1);
@@ -450,19 +450,19 @@ update_remote_file (EAttachment *attachment, EAttachmentBar *bar)
update (bar);
return;
}
-
+
base = g_path_get_basename(attachment->file_name);
msg = g_strdup_printf("%s (%d%%)", base, attachment->percentage);
g_free(base);
icon_list = GNOME_ICON_LIST (bar);
-
+
gnome_icon_list_freeze (icon_list);
item = gnome_icon_list_get_icon_text_item (icon_list, attachment->index);
if (!item->is_text_allocated)
g_free (item->text);
-
+
gnome_icon_text_item_configure (item, item->x, item->y, item->width, item->fontname, msg, item->is_editable, TRUE);
gnome_icon_list_thaw (icon_list);
@@ -478,12 +478,12 @@ e_attachment_bar_remove_selected (EAttachmentBar *bar)
GPtrArray *temp_arr;
g_return_if_fail (E_IS_ATTACHMENT_BAR (bar));
-
+
priv = bar->priv;
-
+
if (!(items = gnome_icon_list_get_selection ((GnomeIconList *) bar)))
return;
-
+
temp_arr = g_ptr_array_new ();
while (items != NULL) {
if ((id = GPOINTER_TO_INT (items->data) - nrem) < priv->attachments->len) {
@@ -492,19 +492,19 @@ e_attachment_bar_remove_selected (EAttachmentBar *bar)
g_ptr_array_remove_index (priv->attachments, id);
nrem++;
}
-
+
items = items->next;
}
g_ptr_array_foreach (temp_arr, (GFunc)g_object_unref, NULL);
g_ptr_array_free (temp_arr, TRUE);
-
+
update (bar);
g_signal_emit (bar, signals[CHANGED], 0);
-
+
id++;
-
+
if ((left = gnome_icon_list_get_num_icons ((GnomeIconList *) bar)) > 0)
gnome_icon_list_focus_icon ((GnomeIconList *) bar, left > id ? id : left - 1);
}
@@ -528,18 +528,18 @@ e_attachment_bar_edit_selected (EAttachmentBar *bar)
EAttachment *attachment;
GList *items;
int id;
-
+
g_return_if_fail (E_IS_ATTACHMENT_BAR (bar));
-
+
priv = bar->priv;
-
+
items = gnome_icon_list_get_selection ((GnomeIconList *) bar);
while (items != NULL) {
if ((id = GPOINTER_TO_INT (items->data)) < priv->attachments->len) {
attachment = priv->attachments->pdata[id];
e_attachment_edit (attachment, GTK_WIDGET (bar));
}
-
+
items = items->next;
}
}
@@ -548,7 +548,7 @@ GtkWidget **
e_attachment_bar_get_selector(EAttachmentBar *bar)
{
g_return_val_if_fail (E_IS_ATTACHMENT_BAR (bar), NULL);
-
+
return &bar->priv->attach;
}
@@ -568,25 +568,25 @@ e_attachment_bar_get_selected (EAttachmentBar *bar)
EAttachment *attachment;
GList *items;
int id;
-
+
g_return_val_if_fail (E_IS_ATTACHMENT_BAR (bar), NULL);
-
+
priv = bar->priv;
-
+
items = gnome_icon_list_get_selection ((GnomeIconList *) bar);
-
+
while (items != NULL) {
if ((id = GPOINTER_TO_INT (items->data)) < priv->attachments->len) {
attachment = priv->attachments->pdata[id];
attachments = g_slist_prepend (attachments, attachment);
g_object_ref (attachment);
}
-
+
items = items->next;
}
-
+
attachments = g_slist_reverse (attachments);
-
+
return attachments;
}
@@ -606,18 +606,18 @@ e_attachment_bar_get_attachment (EAttachmentBar *bar, int id)
struct _EAttachmentBarPrivate *priv;
EAttachment *attachment;
GSList *attachments;
-
+
g_return_val_if_fail (E_IS_ATTACHMENT_BAR (bar), NULL);
-
+
priv = bar->priv;
-
+
if (id == -1 || id > priv->attachments->len)
return e_attachment_bar_get_selected (bar);
-
+
attachment = priv->attachments->pdata[id];
attachments = g_slist_prepend (NULL, attachment);
g_object_ref (attachment);
-
+
return attachments;
}
@@ -635,11 +635,11 @@ e_attachment_bar_get_all_attachments (EAttachmentBar *bar)
GSList *attachments = NULL;
EAttachment *attachment;
int i;
-
+
g_return_val_if_fail (E_IS_ATTACHMENT_BAR (bar), NULL);
-
+
priv = bar->priv;
-
+
for (i = priv->attachments->len - 1; i >= 0; i--) {
attachment = priv->attachments->pdata[i];
if (attachment->is_available_local) {
@@ -647,7 +647,7 @@ e_attachment_bar_get_all_attachments (EAttachmentBar *bar)
g_object_ref (attachment);
}
}
-
+
return attachments;
}
@@ -659,17 +659,17 @@ e_attachment_bar_get_parts (EAttachmentBar *bar)
EAttachment *attachment;
GSList *parts = NULL;
int i;
-
+
g_return_val_if_fail (E_IS_ATTACHMENT_BAR (bar), NULL);
-
+
priv = bar->priv;
-
+
for (i = 0; i < priv->attachments->len; i++) {
attachment = priv->attachments->pdata[i];
if (attachment->is_available_local)
parts = g_slist_prepend (parts, attachment->body);
}
-
+
return parts;
}
@@ -682,7 +682,7 @@ destroy (GtkObject *object)
struct _EAttachmentBarPrivate *priv = bar->priv;
EAttachment *attachment;
int i;
-
+
if ((priv = bar->priv)) {
priv->batch_unref = TRUE;
for (i = 0; i < priv->attachments->len; i++) {
@@ -691,17 +691,17 @@ destroy (GtkObject *object)
g_object_unref (attachment);
}
g_ptr_array_free (priv->attachments, TRUE);
-
+
if (priv->attach)
gtk_widget_destroy (priv->attach);
-
+
if (priv->path)
g_free (priv->path);
-
+
g_free (priv);
bar->priv = NULL;
}
-
+
if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
@@ -713,10 +713,10 @@ temp_save_part (CamelMimePart *part, gboolean readonly)
char *tmpdir, *path, *mfilename = NULL, *utf8_mfilename = NULL;
CamelStream *stream;
CamelDataWrapper *wrapper;
-
+
if (!(tmpdir = e_mkdtemp ("evolution-tmp-XXXXXX")))
return NULL;
-
+
if (!(filename = camel_mime_part_get_filename (part))) {
/* This is the default filename used for temporary file creation */
filename = _("Unknown");
@@ -727,17 +727,17 @@ temp_save_part (CamelMimePart *part, gboolean readonly)
g_free (utf8_mfilename);
filename = (const char *) mfilename;
}
-
+
path = g_build_filename (tmpdir, filename, NULL);
g_free (tmpdir);
g_free (mfilename);
-
+
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (part));
if (readonly)
stream = camel_stream_fs_new_with_name (path, O_RDWR|O_CREAT|O_TRUNC, 0444);
- else
+ else
stream = camel_stream_fs_new_with_name (path, O_RDWR|O_CREAT|O_TRUNC, 0644);
-
+
if (!stream) {
/* TODO handle error conditions */
g_message ("DEBUG: could not open the file to write\n");
@@ -768,48 +768,48 @@ eab_drag_data_get(EAttachmentBar *bar, GdkDragContext *drag, GtkSelectionData *d
int len, n, i = 0;
CamelURL *url;
GList *items;
-
+
if (info)
return;
-
+
items = gnome_icon_list_get_selection (GNOME_ICON_LIST (bar));
len = g_list_length (items);
-
+
uris = g_malloc0 (sizeof (char *) * (len + 1));
-
+
for ( ; items != NULL; items = items->next) {
if (!((n = GPOINTER_TO_INT (items->data)) < priv->attachments->len))
continue;
-
+
attachment = priv->attachments->pdata[n];
-
+
if (!attachment->is_available_local)
continue;
-
+
if (attachment->store_uri) {
uris[i++] = attachment->store_uri;
continue;
}
-
+
/* If we are not able to save, ignore it */
if (!(path = temp_save_part (attachment->body, FALSE)))
continue;
-
+
url = camel_url_new ("file://", NULL);
camel_url_set_path (url, path);
attachment->store_uri = camel_url_to_string (url, 0);
camel_url_free (url);
g_free (path);
-
+
uris[i++] = attachment->store_uri;
}
-
+
uris[i] = NULL;
-
+
gtk_selection_data_set_uris (data, uris);
-
+
g_free (uris);
-
+
return;
}
@@ -821,7 +821,7 @@ eab_button_release_event(EAttachmentBar *bar, GdkEventButton *event, gpointer du
int length;
GtkTargetEntry drag_types[] = {
{ "text/uri-list", 0, 0 },
- };
+ };
if (event && event->button == 1) {
selected = gnome_icon_list_get_selection(icon_list);
@@ -844,20 +844,20 @@ eab_button_press_event(EAttachmentBar *bar, GdkEventButton *event, gpointer dumm
gboolean take_selected = FALSE;
GtkTargetEntry drag_types[] = {
{ "text/uri-list", 0, 0 },
- };
+ };
selected = gnome_icon_list_get_selection(icon_list);
length = g_list_length (selected);
if (event) {
icon_number = gnome_icon_list_get_icon_at(icon_list, event->x, event->y);
- if (icon_number < 0) {
+ if (icon_number < 0) {
/* When nothing is selected, deselect all */
gnome_icon_list_unselect_all (icon_list);
length = 0;
selected = NULL;
}
-
+
if (event->button == 1) {
/* If something is selected, then allow drag or else help to select */
if (length)
@@ -866,27 +866,27 @@ eab_button_press_event(EAttachmentBar *bar, GdkEventButton *event, gpointer dumm
gtk_drag_source_unset((GtkWidget *)bar);
return FALSE;
}
-
+
/* If not r-click dont progress any more.*/
if (event->button != 3)
return FALSE;
-
+
/* When a r-click on something, if it is in the already selected list, consider a r-click of multiple things
- * or deselect all and select only this for r-click
+ * or deselect all and select only this for r-click
*/
if (icon_number >= 0) {
for (tmp = selected; tmp; tmp = tmp->next) {
if (GPOINTER_TO_INT(tmp->data) == icon_number)
take_selected = TRUE;
}
-
+
if (!take_selected) {
gnome_icon_list_unselect_all(icon_list);
gnome_icon_list_select_icon(icon_list, icon_number);
}
}
}
-
+
return FALSE;
}
@@ -899,15 +899,15 @@ eab_icon_clicked_cb (EAttachmentBar *bar, GdkEvent *event, gpointer *dummy)
CamelURL *url;
char *path;
GSList *p;
-
+
if (E_IS_ATTACHMENT_BAR (bar) && event->type == GDK_2BUTTON_PRESS) {
p = e_attachment_bar_get_selected (bar);
if (p && p->next == NULL) {
attachment = p->data;
-
+
/* Check if the file is stored already */
if (!attachment->store_uri) {
- path = temp_save_part (attachment->body, TRUE);
+ path = temp_save_part (attachment->body, TRUE);
url = camel_url_new ("file://", NULL);
camel_url_set_path (url, path);
attachment->store_uri = camel_url_to_string (url, 0);
@@ -922,10 +922,10 @@ eab_icon_clicked_cb (EAttachmentBar *bar, GdkEvent *event, gpointer *dummy)
g_error_free (error);
error = NULL;
}
-
+
ret = TRUE;
}
-
+
if (p) {
g_slist_foreach (p, (GFunc) g_object_unref, NULL);
g_slist_free (p);
@@ -941,15 +941,15 @@ static void
class_init (EAttachmentBarClass *klass)
{
GtkObjectClass *object_class;
-
+
object_class = GTK_OBJECT_CLASS (klass);
-
+
parent_class = g_type_class_ref (gnome_icon_list_get_type ());
-
+
object_class->destroy = destroy;
-
+
/* Setup signals. */
-
+
signals[CHANGED] =
g_signal_new ("changed",
E_TYPE_ATTACHMENT_BAR,
@@ -964,14 +964,14 @@ static void
init (EAttachmentBar *bar)
{
struct _EAttachmentBarPrivate *priv;
-
+
priv = g_new (struct _EAttachmentBarPrivate, 1);
-
+
priv->attach = NULL;
priv->batch_unref = FALSE;
priv->attachments = g_ptr_array_new ();
priv->path = NULL;
-
+
bar->priv = priv;
bar->expand = FALSE;
}
@@ -981,7 +981,7 @@ GType
e_attachment_bar_get_type (void)
{
static GType type = 0;
-
+
if (type == 0) {
static const GTypeInfo info = {
sizeof (EAttachmentBarClass),
@@ -992,10 +992,10 @@ e_attachment_bar_get_type (void)
0,
(GInstanceInitFunc) init,
};
-
+
type = g_type_register_static (GNOME_TYPE_ICON_LIST, "EAttachmentBar", &info, 0);
}
-
+
return type;
}
@@ -1005,19 +1005,19 @@ e_attachment_bar_new (GtkAdjustment *adj)
EAttachmentBar *new;
GnomeIconList *icon_list;
int icon_width, window_height;
-
+
new = g_object_new (e_attachment_bar_get_type (), NULL);
-
+
icon_list = GNOME_ICON_LIST (new);
-
+
calculate_height_width (new, &icon_width, &window_height);
-
+
gnome_icon_list_construct (icon_list, icon_width, adj, 0);
-
+
gtk_widget_set_size_request (GTK_WIDGET (new), icon_width * 4, window_height);
GTK_WIDGET_SET_FLAGS (new, GTK_CAN_FOCUS);
-
+
gnome_icon_list_set_separators (icon_list, ICON_SEPARATORS);
gnome_icon_list_set_row_spacing (icon_list, ICON_ROW_SPACING);
gnome_icon_list_set_col_spacing (icon_list, ICON_COL_SPACING);
@@ -1025,14 +1025,14 @@ e_attachment_bar_new (GtkAdjustment *adj)
gnome_icon_list_set_text_spacing (icon_list, ICON_TEXT_SPACING);
gnome_icon_list_set_selection_mode (icon_list, GTK_SELECTION_MULTIPLE);
- atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (new)),
+ atk_object_set_name (gtk_widget_get_accessible (GTK_WIDGET (new)),
_("Attachment Bar"));
-
+
g_signal_connect (new, "button_release_event", G_CALLBACK(eab_button_release_event), NULL);
g_signal_connect (new, "button_press_event", G_CALLBACK(eab_button_press_event), NULL);
g_signal_connect (new, "drag-data-get", G_CALLBACK(eab_drag_data_get), NULL);
g_signal_connect (icon_list, "event", G_CALLBACK (eab_icon_clicked_cb), NULL);
-
+
return GTK_WIDGET (new);
}
@@ -1042,10 +1042,10 @@ get_default_charset (void)
GConfClient *gconf;
const char *locale;
char *charset;
-
+
gconf = gconf_client_get_default ();
charset = gconf_client_get_string (gconf, "/apps/evolution/mail/composer/charset", NULL);
-
+
if (!charset || charset[0] == '\0') {
g_free (charset);
charset = gconf_client_get_string (gconf, "/apps/evolution/mail/format/charset", NULL);
@@ -1054,12 +1054,12 @@ get_default_charset (void)
charset = NULL;
}
}
-
+
g_object_unref (gconf);
-
+
if (!charset && (locale = e_iconv_locale_charset ()))
charset = g_strdup (locale);
-
+
return charset ? charset : g_strdup ("us-ascii");
}
@@ -1070,13 +1070,13 @@ attach_to_multipart (CamelMultipart *multipart,
{
CamelContentType *content_type;
CamelDataWrapper *content;
-
+
if (!attachment->body)
return;
content_type = camel_mime_part_get_content_type (attachment->body);
content = camel_medium_get_content_object (CAMEL_MEDIUM (attachment->body));
-
+
if (!CAMEL_IS_MULTIPART (content)) {
if (camel_content_type_is (content_type, "text", "*")) {
CamelTransferEncoding encoding;
@@ -1086,21 +1086,21 @@ attach_to_multipart (CamelMultipart *multipart,
const char *charset;
char *buf = NULL;
char *type;
-
+
charset = camel_content_type_param (content_type, "charset");
-
+
stream = camel_stream_null_new ();
filter_stream = camel_stream_filter_new_with_stream (stream);
bestenc = camel_mime_filter_bestenc_new (CAMEL_BESTENC_GET_ENCODING);
camel_stream_filter_add (filter_stream, CAMEL_MIME_FILTER (bestenc));
camel_object_unref (stream);
-
+
camel_data_wrapper_decode_to_stream (content, CAMEL_STREAM (filter_stream));
camel_object_unref (filter_stream);
-
+
encoding = camel_mime_filter_bestenc_get_best_encoding (bestenc, CAMEL_BESTENC_8BIT);
camel_mime_part_set_encoding (attachment->body, encoding);
-
+
if (encoding == CAMEL_TRANSFER_ENCODING_7BIT) {
/* the text fits within us-ascii so this is safe */
/* FIXME: check that this isn't iso-2022-jp? */
@@ -1108,12 +1108,12 @@ attach_to_multipart (CamelMultipart *multipart,
} else if (!charset) {
if (!default_charset)
default_charset = buf = get_default_charset ();
-
+
/* FIXME: We should really check that this fits within the
default_charset and if not find one that does and/or
allow the user to specify? */
}
-
+
if (!charset) {
/* looks kinda nasty, but this is how ya have to do it */
camel_content_type_set_param (content_type, "charset", default_charset);
@@ -1122,13 +1122,13 @@ attach_to_multipart (CamelMultipart *multipart,
g_free (type);
g_free (buf);
}
-
+
camel_object_unref (bestenc);
} else if (!CAMEL_IS_MIME_MESSAGE (content)) {
camel_mime_part_set_encoding (attachment->body, CAMEL_TRANSFER_ENCODING_BASE64);
}
}
-
+
camel_multipart_add_part (multipart, attachment->body);
}
@@ -1138,12 +1138,12 @@ e_attachment_bar_to_multipart (EAttachmentBar *bar, CamelMultipart *multipart, c
struct _EAttachmentBarPrivate *priv;
EAttachment *attachment;
int i;
-
+
g_return_if_fail (E_IS_ATTACHMENT_BAR (bar));
g_return_if_fail (CAMEL_IS_MULTIPART (multipart));
-
+
priv = bar->priv;
-
+
for (i = 0; i < priv->attachments->len; i++) {
attachment = priv->attachments->pdata[i];
if (attachment->is_available_local)
@@ -1156,7 +1156,7 @@ guint
e_attachment_bar_get_num_attachments (EAttachmentBar *bar)
{
g_return_val_if_fail (E_IS_ATTACHMENT_BAR (bar), 0);
-
+
return bar->priv->attachments->len;
}
@@ -1166,7 +1166,7 @@ e_attachment_bar_attach (EAttachmentBar *bar, const char *file_name, const char
{
g_return_if_fail (E_IS_ATTACHMENT_BAR (bar));
g_return_if_fail (file_name != NULL && disposition != NULL);
-
+
add_from_file (bar, file_name, disposition);
}
@@ -1174,27 +1174,27 @@ void
e_attachment_bar_add_attachment (EAttachmentBar *bar, EAttachment *attachment)
{
g_return_if_fail (E_IS_ATTACHMENT_BAR (bar));
-
+
add_common (bar, attachment);
}
-int
+int
e_attachment_bar_get_download_count (EAttachmentBar *bar)
{
struct _EAttachmentBarPrivate *priv;
EAttachment *attachment;
int i, n = 0;
-
+
g_return_val_if_fail (E_IS_ATTACHMENT_BAR (bar), 0);
-
+
priv = bar->priv;
-
+
for (i = 0; i < priv->attachments->len; i++) {
attachment = priv->attachments->pdata[i];
if (!attachment->is_available_local)
n++;
}
-
+
return n;
}
@@ -1204,9 +1204,9 @@ e_attachment_bar_attach_remote_file (EAttachmentBar *bar, const char *url, const
EAttachment *attachment;
CamelException ex;
GtkWindow *parent;
-
+
g_return_if_fail (E_IS_ATTACHMENT_BAR (bar));
-
+
if (!bar->priv->path)
bar->priv->path = e_mkdtemp ("attach-XXXXXX");
@@ -1226,6 +1226,6 @@ void
e_attachment_bar_attach_mime_part (EAttachmentBar *bar, CamelMimePart *part)
{
g_return_if_fail (E_IS_ATTACHMENT_BAR (bar));
-
+
add_from_mime_part (bar, part);
}
diff --git a/widgets/misc/e-attachment-bar.h b/widgets/misc/e-attachment-bar.h
index 7c87c1287d..84b1331b3b 100644
--- a/widgets/misc/e-attachment-bar.h
+++ b/widgets/misc/e-attachment-bar.h
@@ -52,13 +52,13 @@ typedef struct _EAttachmentBarClass EAttachmentBarClass;
struct _EAttachmentBar {
GnomeIconList parent;
gboolean expand;
-
+
struct _EAttachmentBarPrivate *priv;
};
struct _EAttachmentBarClass {
GnomeIconListClass parent_class;
-
+
void (* changed) (EAttachmentBar *bar);
};
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index d9ec749ebc..8aff418feb 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -86,12 +86,12 @@ finalise (GObject *object)
{
EAttachment *attachment = (EAttachment *) object;
GtkWidget *dialog;
-
+
if (attachment->editor_gui != NULL) {
dialog = glade_xml_get_widget (attachment->editor_gui, "dialog");
g_signal_emit_by_name (dialog, "response", GTK_RESPONSE_CLOSE);
}
-
+
if (attachment->is_available_local) {
camel_object_unref (attachment->body);
if (attachment->pixbuf_cache != NULL)
@@ -101,10 +101,10 @@ finalise (GObject *object)
gnome_vfs_async_cancel(attachment->handle);
g_free (attachment->description);
}
-
+
g_free (attachment->file_name);
g_free (attachment->store_uri);
-
+
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -128,14 +128,14 @@ static void
class_init (EAttachmentClass *klass)
{
GObjectClass *object_class;
-
+
object_class = (GObjectClass*) klass;
parent_class = g_type_class_ref (G_TYPE_OBJECT);
-
+
object_class->finalize = finalise;
klass->changed = real_changed;
klass->update = real_update_attachment;
-
+
signals[CHANGED] = g_signal_new ("changed",
E_TYPE_ATTACHMENT,
G_SIGNAL_RUN_FIRST,
@@ -152,7 +152,7 @@ class_init (EAttachmentClass *klass)
NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
+
}
static void
@@ -176,7 +176,7 @@ GType
e_attachment_get_type (void)
{
static GType type = 0;
-
+
if (type == 0) {
static const GTypeInfo info = {
sizeof (EAttachmentClass),
@@ -189,10 +189,10 @@ e_attachment_get_type (void)
0,
(GInstanceInitFunc) init,
};
-
+
type = g_type_register_static (G_TYPE_OBJECT, "EAttachment", &info, 0);
}
-
+
return type;
}
@@ -240,7 +240,7 @@ attachment_guess_mime_type (const char *file_name)
type = g_strdup (gnome_vfs_file_info_get_mime_type (info));
- if (type && strcmp (type, "text/directory") == 0 &&
+ if (type && strcmp (type, "text/directory") == 0 &&
file_ext_is (file_name, ".vcf") &&
g_file_get_contents (file_name, &content, NULL, NULL) &&
content) {
@@ -283,16 +283,16 @@ e_attachment_new (const char *file_name, const char *disposition, CamelException
char *mime_type;
char *filename;
CamelURL *url;
-
+
g_return_val_if_fail (file_name != NULL, NULL);
-
+
if (g_stat (file_name, &statbuf) < 0) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot attach file %s: %s"),
file_name, g_strerror (errno));
return NULL;
}
-
+
/* return if it's not a regular file */
if (!S_ISREG (statbuf.st_mode)) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -300,21 +300,21 @@ e_attachment_new (const char *file_name, const char *disposition, CamelException
file_name);
return NULL;
}
-
+
if (!(stream = camel_stream_fs_new_with_name (file_name, O_RDONLY, 0))) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot attach file %s: %s"),
file_name, g_strerror (errno));
return NULL;
}
-
+
if ((mime_type = attachment_guess_mime_type (file_name))) {
if (!g_ascii_strcasecmp (mime_type, "message/rfc822")) {
wrapper = (CamelDataWrapper *) camel_mime_message_new ();
} else {
wrapper = camel_data_wrapper_new ();
}
-
+
camel_data_wrapper_construct_from_stream (wrapper, stream);
camel_data_wrapper_set_mime_type (wrapper, mime_type);
g_free (mime_type);
@@ -323,17 +323,17 @@ e_attachment_new (const char *file_name, const char *disposition, CamelException
camel_data_wrapper_construct_from_stream (wrapper, stream);
camel_data_wrapper_set_mime_type (wrapper, "application/octet-stream");
}
-
+
camel_object_unref (stream);
-
+
part = camel_mime_part_new ();
camel_medium_set_content_object (CAMEL_MEDIUM (part), wrapper);
camel_object_unref (wrapper);
-
+
camel_mime_part_set_disposition (part, disposition);
filename = g_path_get_basename (file_name);
camel_mime_part_set_filename (part, filename);
-
+
#if 0
/* Note: Outlook 2002 is broken with respect to Content-Ids on
non-multipart/related parts, so as an interoperability
@@ -344,7 +344,7 @@ e_attachment_new (const char *file_name, const char *disposition, CamelException
camel_mime_part_set_content_id (part, content_id);
g_free (content_id);
#endif
-
+
new = g_object_new (E_TYPE_ATTACHMENT, NULL);
new->editor_gui = NULL;
new->body = part;
@@ -353,12 +353,12 @@ e_attachment_new (const char *file_name, const char *disposition, CamelException
new->handle = NULL;
new->is_available_local = TRUE;
new->file_name = filename;
-
+
url = camel_url_new ("file://", NULL);
camel_url_set_path (url, file_name);
new->store_uri = camel_url_to_string (url, 0);
camel_url_free (url);
-
+
return new;
}
@@ -384,16 +384,16 @@ async_progress_update_cb (GnomeVFSAsyncHandle *handle,
download_info->attachment->percentage = 0;
g_signal_emit (download_info->attachment, signals[UPDATE], 0);
}
-
+
if (info->phase == GNOME_VFS_XFER_PHASE_COMPLETED) {
CamelException ex;
-
+
if (!info->file_size) {
if (info->vfs_status == GNOME_VFS_OK)
info->vfs_status = GNOME_VFS_ERROR_EOF;
goto error_msg;
}
-
+
download_info->attachment->handle = NULL;
camel_exception_init (&ex);
e_attachment_build_remote_file (download_info->file_name, download_info->attachment, "attachment", &ex);
@@ -430,21 +430,21 @@ async_progress_update_cb (GnomeVFSAsyncHandle *handle,
static void
download_to_local_path (GnomeVFSURI *source_uri, GnomeVFSURI *target_uri, DownloadInfo *download_info)
-
+
{
GList *source_uri_list;
GList *target_uri_list;
-
+
source_uri_list = g_list_append (NULL, source_uri);
target_uri_list = g_list_append (NULL, target_uri);
-
+
/* Callback info */
gnome_vfs_async_xfer (&download_info->attachment->handle, /* handle_return */
source_uri_list, /* source_uri_list */
target_uri_list, /* target_uri_list */
GNOME_VFS_XFER_DEFAULT, /* xfer_options */
- GNOME_VFS_XFER_ERROR_MODE_ABORT, /* error_mode */
- GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE, /* overwrite_mode */
+ GNOME_VFS_XFER_ERROR_MODE_ABORT, /* error_mode */
+ GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE, /* overwrite_mode */
GNOME_VFS_PRIORITY_DEFAULT, /* priority */
(GnomeVFSAsyncXferProgressCallback) async_progress_update_cb,
download_info, /* update_callback_data */
@@ -459,13 +459,13 @@ e_attachment_new_remote_file (GtkWindow *error_dlg_parent, const char *uri, cons
DownloadInfo *download_info;
CamelURL *url;
char *base;
-
+
g_return_val_if_fail (uri != NULL, NULL);
-
+
url = camel_url_new (uri, NULL);
base = g_path_get_basename (url->path);
camel_url_free (url);
-
+
new = g_object_new (E_TYPE_ATTACHMENT, NULL);
new->editor_gui = NULL;
new->body = NULL;
@@ -475,16 +475,16 @@ e_attachment_new_remote_file (GtkWindow *error_dlg_parent, const char *uri, cons
new->is_available_local = FALSE;
new->percentage = 0;
new->file_name = g_build_filename (path, base, NULL);
-
+
g_free (base);
-
+
download_info = g_new (DownloadInfo, 1);
download_info->attachment = new;
download_info->file_name = g_strdup (new->file_name);
download_info->uri = g_strdup (uri);
download_info->parent = error_dlg_parent;
download_to_local_path (gnome_vfs_uri_new (uri), gnome_vfs_uri_new (new->file_name), download_info);
-
+
return new;
}
@@ -499,9 +499,9 @@ e_attachment_build_remote_file (const char *file_name, EAttachment *attachment,
char *mime_type;
char *filename;
CamelURL *url;
-
+
g_return_if_fail (file_name != NULL);
-
+
if (g_stat (file_name, &statbuf) == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot attach file %s: %s"),
@@ -509,7 +509,7 @@ e_attachment_build_remote_file (const char *file_name, EAttachment *attachment,
g_message ("Cannot attach file %s: %s\n", file_name, g_strerror (errno));
return;
}
-
+
/* return if it's not a regular file */
if (!S_ISREG (statbuf.st_mode)) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -518,21 +518,21 @@ e_attachment_build_remote_file (const char *file_name, EAttachment *attachment,
g_message ("Cannot attach file %s: not a regular file", file_name);
return;
}
-
+
if (!(stream = camel_stream_fs_new_with_name (file_name, O_RDONLY, 0))) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot attach file %s: %s"),
file_name, g_strerror (errno));
return;
}
-
+
if ((mime_type = attachment_guess_mime_type (file_name))) {
if (!g_ascii_strcasecmp (mime_type, "message/rfc822")) {
wrapper = (CamelDataWrapper *) camel_mime_message_new ();
} else {
wrapper = camel_data_wrapper_new ();
}
-
+
camel_data_wrapper_construct_from_stream (wrapper, stream);
camel_data_wrapper_set_mime_type (wrapper, mime_type);
g_free (mime_type);
@@ -541,9 +541,9 @@ e_attachment_build_remote_file (const char *file_name, EAttachment *attachment,
camel_data_wrapper_construct_from_stream (wrapper, stream);
camel_data_wrapper_set_mime_type (wrapper, "application/octet-stream");
}
-
+
camel_object_unref (stream);
-
+
part = camel_mime_part_new ();
camel_medium_set_content_object (CAMEL_MEDIUM (part), wrapper);
camel_object_unref (wrapper);
@@ -552,12 +552,12 @@ e_attachment_build_remote_file (const char *file_name, EAttachment *attachment,
camel_mime_part_set_disposition (part, "inline");
else
camel_mime_part_set_disposition (part, "attachment");
-
+
if (!attachment->file_name)
filename = g_path_get_basename (file_name);
else
filename = g_path_get_basename (attachment->file_name);
-
+
camel_mime_part_set_filename (part, filename);
if (attachment->description) {
@@ -565,14 +565,14 @@ e_attachment_build_remote_file (const char *file_name, EAttachment *attachment,
g_free (attachment->description);
attachment->description = NULL;
}
-
+
attachment->editor_gui = NULL;
attachment->body = part;
attachment->size = statbuf.st_size;
attachment->guessed_type = TRUE;
g_free (attachment->file_name);
attachment->file_name = filename;
-
+
url = camel_url_new ("file://", NULL);
camel_url_set_path (url, file_name);
attachment->store_uri = camel_url_to_string (url, 0);
@@ -584,16 +584,16 @@ e_attachment_build_remote_file (const char *file_name, EAttachment *attachment,
/**
* e_attachment_new_from_mime_part:
* @part: a CamelMimePart
- *
+ *
* Return value: a new EAttachment based on the mime part
**/
EAttachment *
e_attachment_new_from_mime_part (CamelMimePart *part)
{
EAttachment *new;
-
+
g_return_val_if_fail (CAMEL_IS_MIME_PART (part), NULL);
-
+
new = g_object_new (E_TYPE_ATTACHMENT, NULL);
new->editor_gui = NULL;
camel_object_ref (part);
@@ -602,7 +602,7 @@ e_attachment_new_from_mime_part (CamelMimePart *part)
new->is_available_local = TRUE;
new->size = 0;
new->file_name = g_strdup (camel_mime_part_get_filename(part));
-
+
return new;
}
@@ -634,7 +634,7 @@ static void
set_entry (GladeXML *xml, const char *widget_name, const char *value)
{
GtkEntry *entry;
-
+
entry = GTK_ENTRY (glade_xml_get_widget (xml, widget_name));
if (entry == NULL)
g_warning ("Entry for `%s' not found.", widget_name);
@@ -647,7 +647,7 @@ connect_widget (GladeXML *gui, const char *name, const char *signal_name,
GCallback func, gpointer data)
{
GtkWidget *widget;
-
+
widget = glade_xml_get_widget (gui, name);
g_signal_connect (widget, signal_name, func, data);
}
@@ -657,14 +657,14 @@ close_cb (GtkWidget *widget, gpointer data)
{
EAttachment *attachment;
DialogData *dialog_data;
-
+
dialog_data = (DialogData *) data;
attachment = dialog_data->attachment;
-
+
gtk_widget_destroy (dialog_data->dialog);
g_object_unref (attachment->editor_gui);
attachment->editor_gui = NULL;
-
+
destroy_dialog_data (dialog_data);
}
@@ -674,16 +674,16 @@ ok_cb (GtkWidget *widget, gpointer data)
DialogData *dialog_data;
EAttachment *attachment;
const char *str;
-
+
dialog_data = (DialogData *) data;
attachment = dialog_data->attachment;
-
+
str = gtk_entry_get_text (dialog_data->file_name_entry);
if (attachment->is_available_local)
camel_mime_part_set_filename (attachment->body, str);
g_free (attachment->file_name);
attachment->file_name = g_strdup (str);
-
+
str = gtk_entry_get_text (dialog_data->description_entry);
if (attachment->is_available_local) {
camel_mime_part_set_description (attachment->body, str);
@@ -691,13 +691,13 @@ ok_cb (GtkWidget *widget, gpointer data)
g_free (attachment->description);
attachment->description = g_strdup (str);
}
-
+
str = gtk_entry_get_text (dialog_data->mime_type_entry);
if (attachment->is_available_local) {
camel_mime_part_set_content_type (attachment->body, str);
camel_data_wrapper_set_mime_type(camel_medium_get_content_object(CAMEL_MEDIUM (attachment->body)), str);
}
-
+
if (attachment->is_available_local) {
switch (gtk_toggle_button_get_active (dialog_data->disposition_checkbox)) {
case 0:
@@ -713,7 +713,7 @@ ok_cb (GtkWidget *widget, gpointer data)
} else {
attachment->disposition = gtk_toggle_button_get_active (dialog_data->disposition_checkbox);
}
-
+
changed (attachment);
close_cb (widget, data);
}
@@ -737,29 +737,29 @@ e_attachment_edit (EAttachment *attachment, GtkWidget *parent)
GtkWidget *window;
char *type;
char *filename;
-
+
g_return_if_fail (E_IS_ATTACHMENT (attachment));
-
+
if (attachment->editor_gui != NULL) {
window = glade_xml_get_widget (attachment->editor_gui, "dialog");
gdk_window_show (window->window);
return;
}
-
+
filename = g_build_filename (EVOLUTION_GLADEDIR, "e-attachment.glade", NULL);
editor_gui = glade_xml_new (filename, NULL, NULL);
g_free (filename);
-
+
if (editor_gui == NULL) {
g_warning ("Cannot load `e-attachment.glade'");
return;
}
-
+
attachment->editor_gui = editor_gui;
-
+
gtk_window_set_transient_for (GTK_WINDOW (glade_xml_get_widget (editor_gui, "dialog")),
GTK_WINDOW (gtk_widget_get_toplevel (parent)));
-
+
dialog_data = g_new (DialogData, 1);
dialog_data->attachment = attachment;
dialog_data->dialog = glade_xml_get_widget (editor_gui, "dialog");
@@ -767,7 +767,7 @@ e_attachment_edit (EAttachment *attachment, GtkWidget *parent)
dialog_data->description_entry = GTK_ENTRY (glade_xml_get_widget (editor_gui, "description_entry"));
dialog_data->mime_type_entry = GTK_ENTRY (glade_xml_get_widget (editor_gui, "mime_type_entry"));
dialog_data->disposition_checkbox = GTK_TOGGLE_BUTTON (glade_xml_get_widget (editor_gui, "disposition_checkbox"));
-
+
if (attachment->is_available_local && attachment->body) {
set_entry (editor_gui, "file_name_entry", camel_mime_part_get_filename (attachment->body));
set_entry (editor_gui, "description_entry", camel_mime_part_get_description (attachment->body));
@@ -775,7 +775,7 @@ e_attachment_edit (EAttachment *attachment, GtkWidget *parent)
type = camel_content_type_simple (content_type);
set_entry (editor_gui, "mime_type_entry", type);
g_free (type);
-
+
disposition = camel_mime_part_get_disposition (attachment->body);
gtk_toggle_button_set_active (dialog_data->disposition_checkbox,
disposition && !g_ascii_strcasecmp (disposition, "inline"));
@@ -788,12 +788,12 @@ e_attachment_edit (EAttachment *attachment, GtkWidget *parent)
} else {
set_entry (editor_gui, "mime_type_entry", "");
}
-
+
gtk_toggle_button_set_active (dialog_data->disposition_checkbox, attachment->disposition);
}
-
+
connect_widget (editor_gui, "dialog", "response", (GCallback)response_cb, dialog_data);
-
+
/* make sure that when the parent gets hidden/closed that our windows also close */
parent = gtk_widget_get_toplevel (parent);
gtk_signal_connect_while_alive (GTK_OBJECT (parent), "destroy", (GCallback) close_cb, dialog_data,
diff --git a/widgets/misc/e-attachment.h b/widgets/misc/e-attachment.h
index 478dc07d22..3b03a0aa72 100644
--- a/widgets/misc/e-attachment.h
+++ b/widgets/misc/e-attachment.h
@@ -58,7 +58,7 @@ struct _EAttachment {
gulong size;
GdkPixbuf *pixbuf_cache;
-
+
GnomeVFSAsyncHandle *handle;
gboolean is_available_local;
int percentage;
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index cb4c35695c..7cbfc2f958 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -1,14 +1,14 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
* Bolian Yin <bolian.yin@sun.com>
*
* Copyright 2000, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -389,7 +389,7 @@ e_calendar_item_init (ECalendarItem *calitem)
calitem->move_selection_when_moving = TRUE;
calitem->preserve_day_when_moving = FALSE;
calitem->display_popup = TRUE;
-
+
calitem->x1 = 0.0;
calitem->y1 = 0.0;
calitem->x2 = 0.0;
@@ -548,7 +548,7 @@ e_calendar_item_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
item = GNOME_CANVAS_ITEM (o);
calitem = E_CALENDAR_ITEM (o);
-
+
switch (arg_id){
case ARG_YEAR:
ivalue = GTK_VALUE_INT (*arg);
@@ -971,11 +971,11 @@ layout_set_day_text (ECalendarItem *calitem, PangoLayout *layout, int day_index)
/* we use strlen because we actually want to count bytes */
if (day_index == 6)
- char_size = strlen (day);
+ char_size = strlen (day);
else
char_size = strlen (day) - strlen (g_utf8_find_next_char (day, NULL));
- pango_layout_set_text (layout, day, char_size);
+ pango_layout_set_text (layout, day, char_size);
}
static void
@@ -1543,7 +1543,7 @@ e_calendar_item_draw (GnomeCanvasItem *canvas_item,
gdk_cairo_set_source_color (cr, &base);
cairo_rectangle (cr, calitem->x1 - x, calitem->y1 - y,
calitem->x2 - calitem->x1 + 1,
- calitem->y2 - calitem->y1 + 1);
+ calitem->y2 - calitem->y1 + 1);
cairo_fill (cr);
cairo_restore (cr);
@@ -1618,11 +1618,11 @@ layout_set_day_text (ECalendarItem *calitem, PangoLayout *layout, int day_index)
/* we use strlen because we actually want to count bytes */
if (day_index == 6)
- char_size = strlen (day);
+ char_size = strlen (day);
else
char_size = strlen (day) - strlen (g_utf8_find_next_char (day, NULL));
- pango_layout_set_text (layout, day, char_size);
+ pango_layout_set_text (layout, day, char_size);
}
static void
@@ -1992,7 +1992,7 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
pango_layout_set_text (layout, buffer, num_chars);
cairo_translate (cr, text_x, text_y);
pango_cairo_update_layout (cr, layout);
- pango_cairo_show_layout (cr, layout);
+ pango_cairo_show_layout (cr, layout);
cairo_restore (cr);
}
@@ -2077,7 +2077,7 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
gdk_cairo_set_source_color (cr, box_color);
cairo_rectangle (cr, day_x , day_y,
calitem->cell_width - 1,
- calitem->cell_height - 1);
+ calitem->cell_height - 1);
cairo_stroke (cr);
cairo_restore (cr);
}
@@ -2098,7 +2098,7 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
digit = day_num % 10;
day_x -= calitem->digit_widths[digit];
buffer[num_chars++] = digit + '0';
-
+
cairo_save (cr);
if (fg_color) {
gdk_cairo_set_source_color (cr, fg_color);
@@ -2118,7 +2118,7 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
pango_cairo_show_layout (cr, layout);
cairo_restore (cr);
}
-
+
/* See if we've reached the end of a month. */
if (day_num == days_in_month[mon]) {
month_offset++;
@@ -2150,7 +2150,7 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
gdk_gc_set_foreground (fg_gc, &style->fg[GTK_STATE_NORMAL]);
g_object_unref (layout);
-
+
pango_font_metrics_unref (font_metrics);
cairo_destroy (cr);
}
@@ -2165,35 +2165,35 @@ e_calendar_item_get_week_number (ECalendarItem *calitem,
GDate date;
guint weekday, yearday;
int offset, week_num;
-
+
/* FIXME: check what happens at year boundaries. */
-
+
g_date_clear (&date, 1);
g_date_set_dmy (&date, day, month + 1, year);
-
+
/* This results in a value of 0 (Monday) - 6 (Sunday). (or -1 on error - oops!!) */
weekday = g_date_get_weekday (&date) - 1;
-
+
/* Calculate the offset from the start of the week. */
offset = (calitem->week_start_day + 7 - weekday) % 7;
-
+
/* Calculate the day of the year, from 0 to 365. */
yearday = g_date_get_day_of_year (&date) - 1;
-
+
/* If the week starts on or after 29th December, it is week 1 of the
next year, since there are 4 days in the next year. */
g_date_subtract_days (&date, offset);
if (g_date_get_month (&date) == 12 && g_date_get_day (&date) >= 29)
return 1;
-
+
/* Calculate the week number, from 0. */
week_num = (yearday - offset) / 7;
-
+
/* If the first week starts on or after Jan 5th, then we need to add
1 since the previous week will really be the first week. */
if ((yearday - offset) % 7 >= 4)
week_num++;
-
+
/* Add 1 so week numbers are from 1 to 53. */
return week_num + 1;
}
@@ -2549,7 +2549,7 @@ e_calendar_item_button_press (ECalendarItem *calitem,
&all_week))
return FALSE;
- if (event->button.button == 3 && day == -1
+ if (event->button.button == 3 && day == -1
&& e_calendar_item_get_display_popup (calitem)) {
e_calendar_item_show_popup_menu (calitem,
(GdkEventButton*) event,
@@ -3077,7 +3077,7 @@ e_calendar_item_set_first_month(ECalendarItem *calitem,
gint selected_day;
struct tm tmp_tm = { 0 };
- old_days_in_selection = e_calendar_item_get_inclusive_days (calitem, calitem->selection_start_month_offset, calitem->selection_start_day,
+ old_days_in_selection = e_calendar_item_get_inclusive_days (calitem, calitem->selection_start_month_offset, calitem->selection_start_day,
calitem->selection_end_month_offset, calitem->selection_end_day);
/* Calculate the currently selected day */
@@ -3086,9 +3086,9 @@ e_calendar_item_set_first_month(ECalendarItem *calitem,
tmp_tm.tm_mday = calitem->selection_start_day;
tmp_tm.tm_isdst = -1;
mktime (&tmp_tm);
-
+
selected_day = (tmp_tm.tm_wday + 6) % 7;
-
+
/* Make sure the selection will be displayed. */
if (calitem->selection_start_month_offset < 0
|| calitem->selection_start_month_offset >= num_months) {
@@ -3137,7 +3137,7 @@ e_calendar_item_get_max_days_sel (ECalendarItem *calitem)
/* Set the maximum number of days selectable */
-void
+void
e_calendar_item_set_max_days_sel (ECalendarItem *calitem,
gint days)
{
@@ -3147,7 +3147,7 @@ e_calendar_item_set_max_days_sel (ECalendarItem *calitem,
/* Get the maximum number of days before whole weeks are selected */
-gint
+gint
e_calendar_item_get_days_start_week_sel(ECalendarItem *calitem)
{
return calitem->days_to_start_week_selection;
@@ -3155,21 +3155,21 @@ e_calendar_item_get_days_start_week_sel(ECalendarItem *calitem)
/* Set the maximum number of days before whole weeks are selected */
-void
+void
e_calendar_item_set_days_start_week_sel(ECalendarItem *calitem,
gint days)
{
calitem->days_to_start_week_selection = days;
}
-gboolean
+gboolean
e_calendar_item_get_display_popup (ECalendarItem *calitem)
{
return calitem->display_popup;
}
-void
+void
e_calendar_item_set_display_popup (ECalendarItem *calitem,
gboolean display)
{
@@ -3609,7 +3609,7 @@ e_calendar_item_set_selection_if_emission (ECalendarItem *calitem,
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (calitem));
}
-void
+void
e_calendar_item_style_set (GtkWidget *widget, ECalendarItem *calitem)
{
calitem->colors[E_CALENDAR_ITEM_COLOR_TODAY_BOX] = widget->style->bg[GTK_STATE_SELECTED];
@@ -3671,13 +3671,13 @@ e_calendar_item_ensure_days_visible (ECalendarItem *calitem,
calitem->month += (months_shown - 1);
e_calendar_item_normalize_date (calitem, &calitem->year,
&calitem->month);
-
+
e_calendar_item_get_month_info (calitem, 0, 0,
&first_day_offset,
&days_in_month,
&days_in_prev_month);
- if (end_day >= E_CALENDAR_ROWS_PER_MONTH * E_CALENDAR_COLS_PER_MONTH -
+ if (end_day >= E_CALENDAR_ROWS_PER_MONTH * E_CALENDAR_COLS_PER_MONTH -
first_day_offset - days_in_month) {
need_update = TRUE;
diff --git a/widgets/misc/e-calendar-item.h b/widgets/misc/e-calendar-item.h
index a538395736..efd6d60a73 100644
--- a/widgets/misc/e-calendar-item.h
+++ b/widgets/misc/e-calendar-item.h
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 2000, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -78,7 +78,7 @@ typedef enum
E_CALENDAR_ITEM_COLOR_SELECTION_BG_FOCUSED,
E_CALENDAR_ITEM_COLOR_SELECTION_BG,
E_CALENDAR_ITEM_COLOR_PREV_OR_NEXT_MONTH_FG,
-
+
E_CALENDAR_ITEM_COLOR_LAST
} ECalendarItemColors;
@@ -168,7 +168,7 @@ struct _ECalendarItem
be changed when the user explicitly selects a day. */
gboolean move_selection_when_moving;
- /* Whether the selection day is preserved when we move back/forward
+ /* Whether the selection day is preserved when we move back/forward
one month. Used for the work week and week view. */
gboolean preserve_day_when_moving;
diff --git a/widgets/misc/e-calendar.h b/widgets/misc/e-calendar.h
index 061fb2f8ce..3afff4bd52 100644
--- a/widgets/misc/e-calendar.h
+++ b/widgets/misc/e-calendar.h
@@ -1,13 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Author :
+/*
+ * Author :
* Damon Chaplin <damon@ximian.com>
*
* Copyright 2000, Ximian, Inc.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index 441973e6e9..54f35653da 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-canvas-background.c - background color for canvas.
* Copyright 2001, Ximian, Inc.
*
@@ -96,7 +96,7 @@ ecb_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y
/* Wrong BBox's are the source of redraw nightmares */
gnome_canvas_item_i2c_affine (GNOME_CANVAS_ITEM (ecb), i2c);
-
+
i1.x = ecb->priv->x1;
i1.y = ecb->priv->y1;
i2.x = ecb->priv->x2;
@@ -336,7 +336,7 @@ static void
ecb_realize (GnomeCanvasItem *item)
{
ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item);
-
+
if (GNOME_CANVAS_ITEM_CLASS (ecb_parent_class)->realize)
GNOME_CANVAS_ITEM_CLASS (ecb_parent_class)->realize (item);
@@ -346,7 +346,7 @@ ecb_realize (GnomeCanvasItem *item)
gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
set_stipple (ecb, NULL, FALSE);
-
+
ecb->priv->needs_redraw = 1;
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb));
}
@@ -370,7 +370,7 @@ ecb_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
int x1, x2, y1, y2;
double i2c [6];
ArtPoint upper_left, lower_right, ecb_base_point;
-
+
/*
* Find out our real position after grouping
*/
@@ -423,7 +423,7 @@ static void
ecb_style_set (ECanvasBackground *ecb, GtkStyle *previous_style)
{
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (ecb);
-
+
if (GTK_WIDGET_REALIZED (item->canvas)) {
gdk_gc_set_foreground (ecb->priv->gc, &GTK_WIDGET(item->canvas)->style->base[GTK_STATE_NORMAL]);
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb));
@@ -435,7 +435,7 @@ ecb_class_init (ECanvasBackgroundClass *ecb_class)
{
GnomeCanvasItemClass *item_class = GNOME_CANVAS_ITEM_CLASS (ecb_class);
GObjectClass *object_class = G_OBJECT_CLASS (ecb_class);
-
+
object_class->dispose = ecb_dispose;
object_class->set_property = ecb_set_property;
object_class->get_property = ecb_get_property;
diff --git a/widgets/misc/e-canvas-background.h b/widgets/misc/e-canvas-background.h
index eceeede97a..94da38baf9 100644
--- a/widgets/misc/e-canvas-background.h
+++ b/widgets/misc/e-canvas-background.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-canvas-background.h - background color for canvas.
* Copyright 2001, Ximian, Inc.
*
diff --git a/widgets/misc/e-canvas-utils.c b/widgets/misc/e-canvas-utils.c
index 1477bbccd7..d4ee0a1c36 100644
--- a/widgets/misc/e-canvas-utils.c
+++ b/widgets/misc/e-canvas-utils.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-canvas-utils.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -69,7 +69,7 @@ e_canvas_show_area (GnomeCanvas *canvas, double x1, double y1, double x2, double
{
GtkAdjustment *h, *v;
int dx = 0, dy = 0;
-
+
g_return_if_fail (canvas != NULL);
g_return_if_fail (GNOME_IS_CANVAS (canvas));
@@ -89,7 +89,7 @@ e_canvas_item_show_area (GnomeCanvasItem *item, double x1, double y1, double x2,
{
g_return_if_fail (item != NULL);
g_return_if_fail (GNOME_IS_CANVAS_ITEM (item));
-
+
gnome_canvas_item_i2w(item, &x1, &y1);
gnome_canvas_item_i2w(item, &x2, &y2);
@@ -102,7 +102,7 @@ e_canvas_area_shown (GnomeCanvas *canvas, double x1, double y1, double x2, doubl
{
GtkAdjustment *h, *v;
int dx = 0, dy = 0;
-
+
g_return_val_if_fail (canvas != NULL, FALSE);
g_return_val_if_fail (GNOME_IS_CANVAS (canvas), FALSE);
@@ -123,7 +123,7 @@ e_canvas_item_area_shown (GnomeCanvasItem *item, double x1, double y1, double x2
{
g_return_val_if_fail (item != NULL, FALSE);
g_return_val_if_fail (GNOME_IS_CANVAS_ITEM (item), FALSE);
-
+
gnome_canvas_item_i2w(item, &x1, &y1);
gnome_canvas_item_i2w(item, &x2, &y2);
@@ -153,10 +153,10 @@ void
e_canvas_item_show_area_delayed (GnomeCanvasItem *item, double x1, double y1, double x2, double y2, gint delay)
{
DoubsAndCanvas *dac;
-
+
g_return_if_fail (item != NULL);
g_return_if_fail (GNOME_IS_CANVAS_ITEM (item));
-
+
gnome_canvas_item_i2w(item, &x1, &y1);
gnome_canvas_item_i2w(item, &x2, &y2);
diff --git a/widgets/misc/e-canvas-utils.h b/widgets/misc/e-canvas-utils.h
index 258890cbd8..d13cd35c5f 100644
--- a/widgets/misc/e-canvas-utils.h
+++ b/widgets/misc/e-canvas-utils.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* Copyright 2000, 2001, Ximian, Inc.
*
* Authors:
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index b524daf3fb..1a7b4f8221 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-canvas-vbox.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -72,15 +72,15 @@ e_canvas_vbox_class_init (ECanvasVboxClass *klass)
klass->add_item = e_canvas_vbox_real_add_item;
klass->add_item_start = e_canvas_vbox_real_add_item_start;
-
+
object_class->set_property = e_canvas_vbox_set_property;
object_class->get_property = e_canvas_vbox_get_property;
object_class->dispose = e_canvas_vbox_dispose;
-
+
/* GnomeCanvasItem method overrides */
item_class->event = e_canvas_vbox_event;
item_class->realize = e_canvas_vbox_realize;
-
+
g_object_class_install_property (object_class, PROP_WIDTH,
g_param_spec_double ("width",
_( "Width" ),
@@ -128,7 +128,7 @@ e_canvas_vbox_set_property (GObject *object, guint prop_id, const GValue *value,
item = GNOME_CANVAS_ITEM (object);
e_canvas_vbox = E_CANVAS_VBOX (object);
-
+
switch (prop_id){
case PROP_WIDTH:
case PROP_MINIMUM_WIDTH:
@@ -233,7 +233,7 @@ e_canvas_vbox_event (GnomeCanvasItem *item, GdkEvent *event)
return GNOME_CANVAS_ITEM_CLASS (e_canvas_vbox_parent_class)->event (item, event);
}
return return_val;
-
+
}
static void
@@ -241,7 +241,7 @@ e_canvas_vbox_realize (GnomeCanvasItem *item)
{
if (GNOME_CANVAS_ITEM_CLASS(e_canvas_vbox_parent_class)->realize)
(* GNOME_CANVAS_ITEM_CLASS(e_canvas_vbox_parent_class)->realize) (item);
-
+
e_canvas_vbox_resize_children(item);
e_canvas_item_request_reflow(item);
}
@@ -332,7 +332,7 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, int flags )
if (max_width < item_width)
max_width = item_width;
list = g_list_next(list);
-
+
for( ; list; list = g_list_next(list)) {
running_height += e_canvas_vbox->spacing;
@@ -349,7 +349,7 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, int flags )
if (max_width < item_width)
max_width = item_width;
}
-
+
}
e_canvas_vbox->height = running_height;
e_canvas_vbox->width = max_width;
@@ -372,4 +372,4 @@ e_canvas_vbox_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
if (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item_start)
(E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item_start) (e_canvas_vbox, item);
}
-
+
diff --git a/widgets/misc/e-canvas-vbox.h b/widgets/misc/e-canvas-vbox.h
index ffd7cdbccf..d78d358095 100644
--- a/widgets/misc/e-canvas-vbox.h
+++ b/widgets/misc/e-canvas-vbox.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-canvas-vbox.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -75,7 +75,7 @@ struct _ECanvasVboxClass
void (* add_item_start) (ECanvasVbox *CanvasVbox, GnomeCanvasItem *item);
};
-/*
+/*
* To be added to a CanvasVbox, an item must have the argument "width" as
* a Read/Write argument and "height" as a Read Only argument. It
* should also do an ECanvas parent CanvasVbox request if its size
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 387f89730b..55b19ad2a3 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-canvas.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -276,7 +276,7 @@ e_canvas_key (GtkWidget *widget, GdkEventKey *event)
g_return_val_if_fail (event != NULL, FALSE);
canvas = GNOME_CANVAS (widget);
-
+
full_event.key = *event;
return emit_event (canvas, &full_event);
diff --git a/widgets/misc/e-canvas.h b/widgets/misc/e-canvas.h
index 410037baf4..de0f0f361c 100644
--- a/widgets/misc/e-canvas.h
+++ b/widgets/misc/e-canvas.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-canvas.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c
index 1dbe9ee01f..2b716e4622 100644
--- a/widgets/misc/e-cell-date-edit.c
+++ b/widgets/misc/e-cell-date-edit.c
@@ -174,7 +174,7 @@ e_cell_date_edit_init (ECellDateEdit *ecde)
gtk_window_set_policy (GTK_WINDOW (ecde->popup_window),
TRUE, TRUE, FALSE);
-
+
frame = gtk_frame_new (NULL);
gtk_container_add (GTK_CONTAINER (ecde->popup_window), frame);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
@@ -349,7 +349,7 @@ e_cell_date_edit_set_arg (GtkObject *o,
gboolean bvalue;
ecde = E_CELL_DATE_EDIT (o);
-
+
switch (arg_id){
case ARG_SHOW_TIME:
bvalue = GTK_VALUE_BOOL (*arg);
@@ -572,7 +572,7 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde,
GtkRequisition popup_requisition;
gint avail_height, screen_width, column_width, row_height;
double x1, y1, wx, wy;
-
+
gdk_window_get_origin (canvas->window, x, y);
x1 = e_table_header_col_diff (eti->header, 0, view_col + 1);
@@ -591,7 +591,7 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde,
x1 = wx;
y1 = wy;
-
+
*x += x1;
/* The ETable positions don't include the grid lines, I think, so we
add 1. */
@@ -604,9 +604,9 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde,
/* We'll use the entire screen width if needed, but we save space for
the vertical scrollbar in case we need to show that. */
screen_width = gdk_screen_width ();
-
+
gtk_widget_size_request (ecde->popup_window, &popup_requisition);
-
+
/* Calculate the desired width. */
*width = popup_requisition.width;
diff --git a/widgets/misc/e-cell-percent.c b/widgets/misc/e-cell-percent.c
index 57679fd589..f8336812b4 100644
--- a/widgets/misc/e-cell-percent.c
+++ b/widgets/misc/e-cell-percent.c
@@ -116,7 +116,7 @@ ecp_set_value (ECellText *cell, ETableModel *model, int col, int row,
}
static void
-e_cell_percent_class_init (ECellPercentClass *ecpc)
+e_cell_percent_class_init (ECellPercentClass *ecpc)
{
ECellTextClass *ectc = (ECellTextClass *) ecpc;
@@ -140,7 +140,7 @@ e_cell_percent_init (ECellPercent *ecp)
* interpreted as being an int.
*
* See ECellText for other features.
- *
+ *
* Returns: an ECell object that can be used to render numbers.
*/
ECell *
@@ -149,6 +149,6 @@ e_cell_percent_new (const char *fontname, GtkJustification justify)
ECellPercent *ecn = g_object_new (E_CELL_PERCENT_TYPE, NULL);
e_cell_text_construct (E_CELL_TEXT(ecn), fontname, justify);
-
+
return (ECell *) ecn;
}
diff --git a/widgets/misc/e-cell-renderer-combo.c b/widgets/misc/e-cell-renderer-combo.c
index 9bc0200662..e1d7ea0034 100644
--- a/widgets/misc/e-cell-renderer-combo.c
+++ b/widgets/misc/e-cell-renderer-combo.c
@@ -6,7 +6,7 @@
* Copyright (C) 2003 Ximian Inc.
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -53,7 +53,7 @@ ecrc_editing_done (GtkCellEditable *editable, ECellRendererCombo *cell)
return;
new_text = e_combo_cell_editable_get_text (E_COMBO_CELL_EDITABLE (editable));
-
+
g_signal_emit_by_name (cell, "edited", cell->priv->path, new_text);
g_free (cell->priv->path);
cell->priv->path = NULL;
@@ -84,7 +84,7 @@ ecrc_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, c
}
static void
-ecrc_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area,
+ecrc_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area,
gint *x_offset, gint *y_offset, gint *width, gint *height)
{
GtkWidget *btn;
@@ -158,7 +158,7 @@ e_cell_renderer_combo_class_init (ECellRendererComboClass *class)
{
GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class);
GObjectClass *obj_class = G_OBJECT_CLASS (class);
-
+
obj_class->get_property = ecrc_get_prop;
obj_class->set_property = ecrc_set_prop;
obj_class->finalize = ecrc_finalize;
diff --git a/widgets/misc/e-cell-renderer-combo.h b/widgets/misc/e-cell-renderer-combo.h
index 86fdc7cb6e..6b4b161c29 100644
--- a/widgets/misc/e-cell-renderer-combo.h
+++ b/widgets/misc/e-cell-renderer-combo.h
@@ -6,7 +6,7 @@
* Copyright (C) 2003 Ximian Inc.
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/widgets/misc/e-charset-picker.c b/widgets/misc/e-charset-picker.c
index 2f1a6d1e17..3254c9d42f 100644
--- a/widgets/misc/e-charset-picker.c
+++ b/widgets/misc/e-charset-picker.c
@@ -138,7 +138,7 @@ add_charset (GtkWidget *menu, ECharset *charset, gboolean free_name)
{
GtkWidget *item;
char *label;
-
+
if (charset->subclass) {
label = g_strdup_printf ("%s, %s (%s)",
_(classnames[charset->class]),
@@ -151,26 +151,26 @@ add_charset (GtkWidget *menu, ECharset *charset, gboolean free_name)
} else {
label = g_strdup (charset->name);
}
-
+
item = gtk_menu_item_new_with_label (label);
g_object_set_data_full ((GObject *) item, "charset",
charset->name, free_name ? g_free : NULL);
g_free (label);
-
+
gtk_widget_show (item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
g_signal_connect (item, "activate", G_CALLBACK (activate), menu);
-
+
return item;
}
static gboolean
-add_other_charset (GtkWidget *menu, GtkWidget *other, const char *new_charset)
+add_other_charset (GtkWidget *menu, GtkWidget *other, const char *new_charset)
{
ECharset charset = { NULL, E_CHARSET_UNKNOWN, NULL };
GtkWidget *item;
iconv_t ic;
-
+
ic = iconv_open ("UTF-8", new_charset);
if (ic == (iconv_t)-1) {
GtkWidget *window = gtk_widget_get_ancestor (other, GTK_TYPE_WINDOW);
@@ -179,25 +179,25 @@ add_other_charset (GtkWidget *menu, GtkWidget *other, const char *new_charset)
return FALSE;
}
iconv_close (ic);
-
+
/* Temporarily remove the "Other..." item */
g_object_ref (other);
gtk_container_remove (GTK_CONTAINER (menu), other);
-
+
/* Create new menu item */
charset.name = g_strdup (new_charset);
item = add_charset (menu, &charset, TRUE);
-
+
/* And re-add "Other..." */
gtk_menu_shell_append (GTK_MENU_SHELL (menu), other);
g_object_unref (other);
-
+
g_object_set_data_full ((GObject *) menu, "other_charset",
g_strdup (new_charset), g_free);
-
+
g_object_set_data ((GObject *) menu, "activated_item", item);
select_item (GTK_MENU_SHELL (menu), item);
-
+
return TRUE;
}
@@ -257,7 +257,7 @@ activate_other (GtkWidget *item, gpointer menu)
gtk_entry_set_text (GTK_ENTRY (entry), old_charset);
g_signal_connect (entry, "activate",
G_CALLBACK (activate_entry), dialog);
-
+
gtk_container_set_border_width (GTK_CONTAINER (dialog->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 12);
@@ -305,18 +305,18 @@ e_charset_picker_new (const char *default_charset)
GtkWidget *menu, *item;
int def, i;
const char *locale_charset;
-
+
g_get_charset (&locale_charset);
if (!g_ascii_strcasecmp (locale_charset, "US-ASCII"))
locale_charset = "iso-8859-1";
-
+
if (!default_charset)
default_charset = locale_charset;
for (def = 0; def < num_charsets; def++) {
if (!g_ascii_strcasecmp (charsets[def].name, default_charset))
break;
}
-
+
menu = gtk_menu_new ();
for (i = 0; i < num_charsets; i++) {
item = add_charset (menu, &charsets[i], FALSE);
@@ -325,13 +325,13 @@ e_charset_picker_new (const char *default_charset)
select_item (GTK_MENU_SHELL (menu), item);
}
}
-
+
/* do the Unknown/Other section */
gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_menu_item_new ());
-
+
if (def == num_charsets) {
ECharset other = { NULL, E_CHARSET_UNKNOWN, NULL };
-
+
/* Add an entry for @default_charset */
other.name = g_strdup (default_charset);
item = add_charset (menu, &other, TRUE);
@@ -341,13 +341,13 @@ e_charset_picker_new (const char *default_charset)
g_strdup (default_charset), g_free);
def++;
}
-
+
item = gtk_menu_item_new_with_label (_("Other..."));
g_signal_connect (item, "activate", G_CALLBACK (activate_other), menu);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
-
+
gtk_widget_show_all (menu);
-
+
return menu;
}
@@ -365,10 +365,10 @@ e_charset_picker_get_charset (GtkWidget *menu)
char *charset;
g_return_val_if_fail (GTK_IS_MENU (menu), NULL);
-
+
item = gtk_menu_get_active (GTK_MENU (menu));
charset = g_object_get_data ((GObject *) item, "charset");
-
+
return g_strdup (charset);
}
@@ -471,18 +471,18 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path,
const char *locale_charset;
GString *menuitems;
int def, i;
-
+
g_get_charset (&locale_charset);
if (!g_ascii_strcasecmp (locale_charset, "US-ASCII"))
locale_charset = "iso-8859-1";
-
+
if (!default_charset)
default_charset = locale_charset;
for (def = 0; def < num_charsets; def++) {
if (!g_ascii_strcasecmp (charsets[def].name, default_charset))
break;
}
-
+
label = g_strdup (_("Ch_aracter Encoding"));
encoded_label = bonobo_ui_util_encode_str (label);
menuitems = g_string_new ("");
@@ -490,19 +490,19 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path,
encoded_label);
g_free (encoded_label);
g_free (label);
-
+
for (i = 0; i < num_charsets; i++) {
char *command;
char *charset_name, *u;
-
+
/* escape _'s in the charset name so that it doesn't become an underline in a GtkLabel */
if ((u = strchr (charsets[i].name, '_'))) {
int extra = 1;
char *s, *d;
-
+
while ((u = strchr (u + 1, '_')))
extra++;
-
+
d = charset_name = g_alloca (strlen (charsets[i].name) + extra + 1);
s = charsets[i].name;
while (*s != '\0') {
@@ -514,7 +514,7 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path,
} else {
charset_name = charsets[i].name;
}
-
+
if (charsets[i].subclass) {
label = g_strdup_printf ("%s, %s (%s)",
_(classnames[charsets[i].class]),
@@ -527,39 +527,39 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path,
} else {
label = g_strdup (charset_name);
}
-
+
encoded_label = bonobo_ui_util_encode_str (label);
g_free (label);
-
+
command = g_strdup_printf ("<cmd name=\"Charset-%s\" label=\"%s\" type=\"radio\""
" group=\"charset_picker\" state=\"%d\"/>\n",
charsets[i].name, encoded_label, i == def);
-
+
bonobo_ui_component_set (uic, "/commands", command, NULL);
g_free (command);
-
+
g_string_append_printf (menuitems, " <menuitem name=\"Charset-%s\" verb=\"\"/>\n",
charsets[i].name);
-
+
g_free (encoded_label);
-
+
label = g_strdup_printf ("Charset-%s", charsets[i].name);
bonobo_ui_component_add_listener (uic, label, cb, user_data);
g_free (label);
}
-
+
if (def == num_charsets) {
char *command;
char *charset_name, *u;
-
+
/* escape _'s in the charset name so that it doesn't become an underline in a GtkLabel */
if ((u = strchr (default_charset, '_'))) {
int extra = 1;
char *s, *d;
-
+
while ((u = strchr (u + 1, '_')))
extra++;
-
+
d = charset_name = g_alloca (strlen (default_charset) + extra + 1);
s = (char *) default_charset;
while (*s != '\0') {
@@ -571,31 +571,31 @@ e_charset_picker_bonobo_ui_populate (BonoboUIComponent *uic, const char *path,
} else {
charset_name = (char *) default_charset;
}
-
+
label = g_strdup (charset_name);
encoded_label = bonobo_ui_util_encode_str (label);
g_free (label);
-
+
command = g_strdup_printf ("<cmd name=\"Charset-%s\" label=\"%s\" type=\"radio\""
" group=\"charset_picker\" state=\"1\"/>\n",
default_charset, encoded_label);
-
+
bonobo_ui_component_set (uic, "/commands", command, NULL);
g_free (command);
-
+
g_string_append (menuitems, " <separator/>\n");
g_string_append_printf (menuitems, " <menuitem name=\"Charset-%s\" verb=\"\"/>\n",
default_charset);
-
+
g_free (encoded_label);
-
+
label = g_strdup_printf ("Charset-%s", default_charset);
bonobo_ui_component_add_listener (uic, label, cb, user_data);
g_free (label);
}
-
+
g_string_append (menuitems, "</submenu>\n");
-
+
bonobo_ui_component_set (uic, path, menuitems->str, NULL);
g_string_free (menuitems, TRUE);
}
diff --git a/widgets/misc/e-colors.h b/widgets/misc/e-colors.h
index 863d816940..6427b62480 100644
--- a/widgets/misc/e-colors.h
+++ b/widgets/misc/e-colors.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-colors.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c
index a079729c13..5b732e1299 100644
--- a/widgets/misc/e-combo-button.c
+++ b/widgets/misc/e-combo-button.c
@@ -130,7 +130,7 @@ paint (EComboButton *combo_button,
"focus-line-width", &focus_width,
"focus-padding", &focus_pad,
"interior-focus", &interior_focus,
- NULL);
+ NULL);
if (GTK_WIDGET_HAS_DEFAULT (widget)
&& GTK_BUTTON (widget)->relief == GTK_RELIEF_NORMAL)
@@ -154,14 +154,14 @@ paint (EComboButton *combo_button,
GTK_WIDGET_STATE (widget), shadow_type,
area, widget, "button",
x, y, separator_x, height);
-
+
if (width - separator_x > 0)
gtk_paint_box (widget->style, widget->window,
GTK_WIDGET_STATE (widget), shadow_type,
area, widget, "button",
separator_x, y, width - separator_x, height);
}
-
+
if (GTK_WIDGET_HAS_FOCUS (widget)) {
if (interior_focus) {
x += widget->style->xthickness + focus_pad;
@@ -254,7 +254,7 @@ impl_destroy (GtkObject *object)
gtk_widget_destroy (priv->arrow_image);
priv->arrow_image = NULL;
}
-
+
if (priv->icon != NULL) {
g_object_unref (priv->icon);
priv->icon = NULL;
@@ -263,7 +263,7 @@ impl_destroy (GtkObject *object)
g_free (priv);
combo_button->priv = NULL;
}
-
+
(* GTK_OBJECT_CLASS (e_combo_button_parent_class)->destroy) (object);
}
@@ -304,11 +304,11 @@ impl_button_press_event (GtkWidget *widget,
combo_button = E_COMBO_BUTTON (widget);
priv = combo_button->priv;
- if (event->type == GDK_BUTTON_PRESS &&
+ if (event->type == GDK_BUTTON_PRESS &&
(event->button == 1 || event->button == 3)) {
GTK_BUTTON (widget)->button_down = TRUE;
- if (event->button == 3 ||
+ if (event->button == 3 ||
event->x >= priv->arrow_image->allocation.x) {
/* User clicked on the right side: pop up the menu. */
gtk_button_pressed (GTK_BUTTON (widget));
@@ -355,7 +355,7 @@ impl_expose_event (GtkWidget *widget,
return FALSE;
bin = GTK_BIN (widget);
-
+
paint (E_COMBO_BUTTON (widget), &event->area);
child_event = *event;
@@ -446,7 +446,7 @@ e_combo_button_init (EComboButton *combo_button)
priv = g_new (EComboButtonPrivate, 1);
combo_button->priv = priv;
-
+
priv->icon = NULL;
priv->menu = NULL;
priv->menu_popped_up = FALSE;
@@ -457,7 +457,7 @@ void
e_combo_button_pack_hbox (EComboButton *combo_button)
{
EComboButtonPrivate *priv;
-
+
priv = combo_button->priv;
if(priv->is_already_packed){
@@ -481,9 +481,9 @@ e_combo_button_pack_hbox (EComboButton *combo_button)
gtk_box_pack_end (GTK_BOX (priv->hbox), priv->arrow_image, TRUE, TRUE,
GTK_WIDGET (combo_button)->style->xthickness);
gtk_widget_show (priv->arrow_image);
-
+
gtk_widget_show (priv->hbox);
-
+
priv->is_already_packed = TRUE;
}
@@ -491,9 +491,9 @@ void
e_combo_button_pack_vbox (EComboButton *combo_button)
{
EComboButtonPrivate *priv;
-
+
priv = combo_button->priv;
-
+
if(priv->is_already_packed){
gtk_widget_destroy (priv->hbox);
}
@@ -504,7 +504,7 @@ e_combo_button_pack_vbox (EComboButton *combo_button)
priv->vbox = gtk_vbox_new (FALSE, 0);
gtk_widget_show (priv->vbox);
-
+
priv->icon_image = e_icon_factory_get_image (NULL, E_ICON_SIZE_MENU);
gtk_box_pack_start (GTK_BOX (priv->vbox), priv->icon_image, TRUE, TRUE, 0);
gtk_widget_show (priv->icon_image);
@@ -515,14 +515,14 @@ e_combo_button_pack_vbox (EComboButton *combo_button)
gtk_widget_show (priv->label);
gtk_box_pack_start (GTK_BOX(priv->hbox),priv->vbox, TRUE, TRUE, 0);
-
+
priv->arrow_image = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE);
gtk_box_pack_end (GTK_BOX (priv->hbox), priv->arrow_image, TRUE, TRUE,
GTK_WIDGET (combo_button)->style->xthickness);
gtk_widget_show (priv->arrow_image);
-
+
gtk_widget_show (priv->hbox);
-
+
priv->is_already_packed = TRUE;
}
diff --git a/widgets/misc/e-combo-cell-editable.c b/widgets/misc/e-combo-cell-editable.c
index 9e7794ca9f..c83525118a 100644
--- a/widgets/misc/e-combo-cell-editable.c
+++ b/widgets/misc/e-combo-cell-editable.c
@@ -6,7 +6,7 @@
* Copyright (C) 2003 Ximian Inc.
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
@@ -58,7 +58,7 @@ kill_popup (EComboCellEditable *ecce)
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (ecce));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (ecce));
}
-
+
static gboolean
popup_key_press_cb (GtkWidget *widget, GdkEventKey *event, EComboCellEditable *ecce)
{
@@ -90,19 +90,19 @@ popup_button_press_cb (GtkWidget *widget, GdkEventButton *event, EComboCellEdita
if (event->button != 1)
return FALSE;
-
+
gdk_window_get_root_origin (widget->window, &win_x, &win_y);
alloc = ecce->priv->popup->allocation;
rel_x = event->x_root - win_x - alloc.x;
rel_y = event->y_root - win_y - alloc.y;
-
+
if (rel_x > 0 && rel_x < alloc.width && rel_y > 0 && rel_y < alloc.height)
return FALSE;
-
+
ecce->priv->cancelled = TRUE;
kill_popup (ecce);
-
+
return FALSE;
}
@@ -112,8 +112,8 @@ tree_button_release_cb (GtkWidget *widget, GdkEventButton *event, EComboCellEdit
kill_popup (ecce);
return TRUE;
}
-
-static void
+
+static void
selection_changed_cb (GtkTreeSelection *selection, EComboCellEditable *ecce)
{
GtkTreeModel *model;
@@ -122,7 +122,7 @@ selection_changed_cb (GtkTreeSelection *selection, EComboCellEditable *ecce)
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
return;
-
+
gtk_tree_model_get (model, &iter, 0, &text, -1);
e_combo_cell_editable_set_text (ecce, text);
g_free (text);
@@ -138,7 +138,7 @@ build_popup (EComboCellEditable *ecce)
GList *l;
ecce->priv->popup = gtk_window_new (GTK_WINDOW_POPUP);
-
+
g_signal_connect (ecce->priv->popup, "button-press-event", G_CALLBACK (popup_button_press_cb), ecce);
g_signal_connect (ecce->priv->popup, "key-press-event", G_CALLBACK (popup_key_press_cb), ecce);
@@ -154,11 +154,11 @@ build_popup (EComboCellEditable *ecce)
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, l->data, -1);
}
-
+
gtk_tree_view_set_model (ecce->priv->tree_view, model);
g_object_unref (model);
gtk_container_add (GTK_CONTAINER (frame), GTK_WIDGET (ecce->priv->tree_view));
-
+
gtk_tree_view_set_headers_visible (ecce->priv->tree_view, FALSE);
gtk_tree_view_insert_column_with_attributes (ecce->priv->tree_view, 0, NULL,
@@ -171,7 +171,7 @@ build_popup (EComboCellEditable *ecce)
selection = gtk_tree_view_get_selection (ecce->priv->tree_view);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
g_signal_connect (selection, "changed", G_CALLBACK (selection_changed_cb), ecce);
-
+
gtk_widget_show (GTK_WIDGET (ecce->priv->tree_view));
}
@@ -188,14 +188,14 @@ lookup_row (GList *list, const gchar *text)
return result;
}
-static void
+static void
set_cursor (GtkTreeView *tree_view, gint index)
{
GtkTreePath *path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, index);
gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE);
-
+
gtk_tree_path_free (path);
}
@@ -207,13 +207,13 @@ grab_popup (GdkWindow *popup)
}
static void
-position_popup (EComboCellEditable *ecce, gint x, gint y, gint offset)
+position_popup (EComboCellEditable *ecce, gint x, gint y, gint offset)
{
GtkRequisition req;
gtk_widget_realize (ecce->priv->popup);
gtk_widget_size_request (ecce->priv->popup, &req);
-
+
if (req.height > gdk_screen_height () - y) {
y -= (offset + req.height);
if (y < 0)
@@ -321,7 +321,7 @@ ecce_init (EComboCellEditable *ecce)
box = gtk_hbox_new (FALSE, 0);
gtk_widget_show (box);
gtk_container_add (GTK_CONTAINER (ecce), box);
-
+
ecce->priv = g_new0 (EComboCellEditablePriv, 1);
entry = gtk_entry_new ();
@@ -354,9 +354,9 @@ ecce_class_init (GObjectClass *klass)
GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
klass->finalize = ecce_finalize;
-
+
widget_class->grab_focus = ecce_grab_focus;
-
+
parent_class = GTK_EVENT_BOX_CLASS (g_type_class_peek_parent (klass));
}
@@ -364,7 +364,7 @@ GType
e_combo_cell_editable_get_type (void)
{
static GType ecce_type = 0;
-
+
if (!ecce_type) {
static const GTypeInfo ecce_info = {
sizeof (EComboCellEditableClass),
@@ -380,15 +380,15 @@ e_combo_cell_editable_get_type (void)
static const GInterfaceInfo cell_editable_info = {
(GInterfaceInitFunc) ecce_cell_editable_init,
- NULL,
- NULL
+ NULL,
+ NULL
};
-
+
ecce_type = g_type_register_static (GTK_TYPE_EVENT_BOX, "EComboCellEditable", &ecce_info, 0);
-
+
g_type_add_interface_static (ecce_type, GTK_TYPE_CELL_EDITABLE, &cell_editable_info);
}
-
+
return ecce_type;
}
diff --git a/widgets/misc/e-combo-cell-editable.h b/widgets/misc/e-combo-cell-editable.h
index d8d5a1cd68..7d3b4d731b 100644
--- a/widgets/misc/e-combo-cell-editable.h
+++ b/widgets/misc/e-combo-cell-editable.h
@@ -6,7 +6,7 @@
* Copyright (C) 2003 Ximian Inc.
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
+ * modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
diff --git a/widgets/misc/e-config-page.h b/widgets/misc/e-config-page.h
index 8f231198fa..812f357fe2 100644
--- a/widgets/misc/e-config-page.h
+++ b/widgets/misc/e-config-page.h
@@ -53,7 +53,7 @@ struct _EConfigPage {
struct _EConfigPageClass {
GtkEventBoxClass parent_class;
-
+
};
diff --git a/widgets/misc/e-cursors.h b/widgets/misc/e-cursors.h
index 159c22bb42..115b6fbc26 100644
--- a/widgets/misc/e-cursors.h
+++ b/widgets/misc/e-cursors.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cursors.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index ec6ec6fbbf..206f1d7211 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -70,7 +70,7 @@
struct _EDateEditPrivate {
GtkWidget *date_entry;
GtkWidget *date_button;
-
+
GtkWidget *space;
GtkWidget *time_combo;
@@ -241,7 +241,7 @@ e_date_edit_get_type (void)
date_edit_type = g_type_register_static (GTK_TYPE_HBOX, "EDateEdit", &date_edit_info, 0);
}
-
+
return date_edit_type;
}
@@ -308,7 +308,7 @@ e_date_edit_init (EDateEdit *dedit)
*
* Description: Creates a new #EDateEdit widget which can be used
* to provide an easy to use way for entering dates and times.
- *
+ *
* Returns: a new #EDateEdit widget.
*/
GtkWidget *
@@ -344,7 +344,7 @@ create_children (EDateEdit *dedit)
atk_object_set_name (a11y, _("Date"));
gtk_box_pack_start (GTK_BOX (dedit), priv->date_entry, FALSE, TRUE, 0);
gtk_widget_set_size_request (priv->date_entry, 100, -1);
-
+
g_signal_connect (priv->date_entry, "key_press_event",
G_CALLBACK (on_date_entry_key_press),
dedit);
@@ -388,7 +388,7 @@ create_children (EDateEdit *dedit)
time_store = gtk_list_store_new (1, G_TYPE_STRING);
priv->time_combo = gtk_combo_box_entry_new_with_model (GTK_TREE_MODEL (time_store), 0);
g_object_unref (time_store);
-
+
/* We need to make sure labels are right-aligned, since we want digits to line up,
* and with a nonproportional font, the width of a space != width of a digit.
* Technically, only 12-hour format needs this, but we do it always, for consistency. */
@@ -592,7 +592,7 @@ e_date_edit_get_time (EDateEdit *dedit)
struct tm tmp_tm = { 0 };
g_return_val_if_fail (E_IS_DATE_EDIT (dedit), -1);
-
+
priv = dedit->priv;
/* Try to parse any new value now. */
@@ -832,7 +832,7 @@ e_date_edit_set_time_of_day (EDateEdit *dedit,
date_edit_signals [CHANGED], 0);
}
-void
+void
e_date_edit_set_date_and_time_of_day (EDateEdit *dedit,
gint year,
gint month,
@@ -848,7 +848,7 @@ e_date_edit_set_date_and_time_of_day (EDateEdit *dedit,
year - 1900, month - 1, day);
time_changed = e_date_edit_set_time_internal (dedit, TRUE, FALSE,
hour, minute);
-
+
e_date_edit_update_date_entry (dedit);
e_date_edit_update_time_entry (dedit);
e_date_edit_update_time_combo_state (dedit);
@@ -1570,7 +1570,7 @@ on_time_entry_key_press (GtkWidget *widget,
{
/* I'd like to use Alt+Up/Down for popping up the list, like Win32,
but the combo steals any Up/Down keys, so we use Alt+Return. */
-#if 0
+#if 0
if (event->state & GDK_MOD1_MASK
&& (event->keyval == GDK_Up || event->keyval == GDK_Down)) {
#else
@@ -1630,7 +1630,7 @@ on_date_entry_focus_out (GtkEntry *entry,
tmp_tm.tm_year = 0;
tmp_tm.tm_mon = 0;
tmp_tm.tm_mday = 0;
-
+
e_date_edit_check_date_changed (dedit);
if (!e_date_edit_date_is_valid (dedit)) {
@@ -1643,7 +1643,7 @@ on_date_entry_focus_out (GtkEntry *entry,
gtk_widget_destroy (msg_dialog);
e_date_edit_get_date (dedit,&tmp_tm.tm_year,&tmp_tm.tm_mon,&tmp_tm.tm_mday);
e_date_edit_set_date (dedit,tmp_tm.tm_year,tmp_tm.tm_mon,tmp_tm.tm_mday);
- gtk_widget_grab_focus (GTK_WIDGET (entry));
+ gtk_widget_grab_focus (GTK_WIDGET (entry));
return FALSE;
}
return FALSE;
@@ -1656,7 +1656,7 @@ on_time_entry_focus_out (GtkEntry *entry,
EDateEdit *dedit)
{
GtkWidget *msg_dialog;
-
+
e_date_edit_check_time_changed (dedit);
if (!e_date_edit_time_is_valid (dedit)) {
@@ -1732,7 +1732,7 @@ e_date_edit_update_date_entry (EDateEdit *dedit)
tmp_tm.tm_mday = priv->day;
tmp_tm.tm_isdst = -1;
- /* This is a strftime() format for a short date.
+ /* This is a strftime() format for a short date.
%x the preferred date representation for the current locale without the time*/
e_utf8_strftime (buffer, sizeof (buffer), "%x", &tmp_tm);
gtk_entry_set_text (GTK_ENTRY (priv->date_entry), buffer);
diff --git a/widgets/misc/e-dateedit.h b/widgets/misc/e-dateedit.h
index 1e9aa4142c..3f8def7146 100644
--- a/widgets/misc/e-dateedit.h
+++ b/widgets/misc/e-dateedit.h
@@ -38,13 +38,13 @@
*/
#ifndef __E_DATE_EDIT_H_
-#define __E_DATE_EDIT_H_
+#define __E_DATE_EDIT_H_
#include <time.h>
#include <glib.h>
#include <gtk/gtkhbox.h>
#include <gtk/gtkwidget.h>
-
+
#define E_TYPE_DATE_EDIT (e_date_edit_get_type ())
#define E_DATE_EDIT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_DATE_EDIT, EDateEdit))
#define E_DATE_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_DATE_EDIT, EDateEditClass))
diff --git a/widgets/misc/e-dropdown-button.c b/widgets/misc/e-dropdown-button.c
index 3fbdd3648e..4054e4a254 100644
--- a/widgets/misc/e-dropdown-button.c
+++ b/widgets/misc/e-dropdown-button.c
@@ -19,7 +19,7 @@
*
* Authors:
* Ettore Perazzoli <ettore@ximian.com>
- * Damon Chaplin <damon@ximian.com>
+ * Damon Chaplin <damon@ximian.com>
*/
#ifdef HAVE_CONFIG_H
@@ -167,7 +167,7 @@ e_dropdown_button_init (EDropdownButton *dropdown_button)
* @dropdown_button: A pointer to an %EDropdownButton object
* @label_text: Text to display in the button
* @menu: The menu to pop up when the button is pressed
- *
+ *
* Construct the @dropdown_button with the specified @label_text and the
* associated @menu.
**/
@@ -216,10 +216,10 @@ e_dropdown_button_construct (EDropdownButton *dropdown_button,
* e_dropdown_button_new:
* @label_text: Text to display in the button
* @menu: The menu to pop up when the button is pressed
- *
+ *
* Create a new dropdown button. When the button is clicked, the specified
* @menu will be popped up.
- *
+ *
* Return value: A pointer to the newly created %EDropdownButton.
**/
GtkWidget *
diff --git a/widgets/misc/e-expander.c b/widgets/misc/e-expander.c
index 4c2ecdb317..7c60c28d4b 100644
--- a/widgets/misc/e-expander.c
+++ b/widgets/misc/e-expander.c
@@ -112,7 +112,7 @@ GType
e_expander_get_type (void)
{
static GType expander_type = 0;
-
+
if (!expander_type)
{
static const GTypeInfo expander_info =
@@ -127,12 +127,12 @@ e_expander_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) e_expander_init,
};
-
+
expander_type = g_type_register_static (GTK_TYPE_BIN,
"EExpander",
&expander_info, 0);
}
-
+
return expander_type;
}
@@ -256,7 +256,7 @@ e_expander_init (EExpander *expander)
/* ESTUFF */
priv = g_new0 (EExpanderPrivate, 1);
g_object_set_data_full (G_OBJECT (expander), "e-expander-priv", priv, g_free);
-
+
/* ESTUFF priv = E_EXPANDER_GET_PRIVATE (expander); */
GTK_WIDGET_SET_FLAGS (expander, GTK_CAN_FOCUS);
@@ -281,7 +281,7 @@ e_expander_set_property (GObject *object,
GParamSpec *pspec)
{
EExpander *expander = E_EXPANDER (object);
-
+
switch (prop_id)
{
case PROP_EXPANDED:
@@ -315,7 +315,7 @@ e_expander_get_property (GObject *object,
EExpanderPrivate *priv;
priv = E_EXPANDER_GET_PRIVATE (expander);
-
+
switch (prop_id)
{
case PROP_EXPANDED:
@@ -366,7 +366,7 @@ e_expander_realize (GtkWidget *widget)
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
border_width = GTK_CONTAINER (widget)->border_width;
-
+
attributes.x = widget->allocation.x + border_width;
attributes.y = widget->allocation.y + border_width;
attributes.width = widget->allocation.width - 2 * border_width;
@@ -393,7 +393,7 @@ e_expander_realize (GtkWidget *widget)
widget->style = gtk_style_attach (widget->style, widget->window);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
}
-
+
static void
e_expander_size_request (GtkWidget *widget,
GtkRequisition *requisition)
@@ -827,7 +827,7 @@ e_expander_button_release (GtkWidget *widget,
if (event->button == 1 && priv->button_down)
{
g_signal_emit_by_name (expander, "activate");
-
+
priv->button_down = FALSE;
return TRUE;
}
diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c
index 121fb3c82a..e80f7747ef 100644
--- a/widgets/misc/e-filter-bar.c
+++ b/widgets/misc/e-filter-bar.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-search-bar.c
*
* Copyright (C) 2001 Ximian, Inc.
@@ -74,10 +74,10 @@ static void
full_rule_editor_response (GtkWidget *dialog, int response, void *data)
{
EFilterBar *efb = data;
-
+
if (response == GTK_RESPONSE_OK)
rule_context_save (efb->context, efb->userrules);
-
+
gtk_widget_destroy (dialog);
}
@@ -86,19 +86,19 @@ rule_editor_response (GtkWidget *dialog, int response, void *data)
{
EFilterBar *efb = data;
FilterRule *rule;
-
+
if (response == GTK_RESPONSE_OK) {
rule = g_object_get_data (G_OBJECT (dialog), "rule");
if (rule) {
if (!filter_rule_validate (rule))
return;
-
+
rule_context_add_rule (efb->context, rule);
/* FIXME: check return */
rule_context_save (efb->context, efb->userrules);
}
}
-
+
gtk_widget_destroy (dialog);
}
@@ -109,7 +109,7 @@ rule_advanced_response (GtkWidget *dialog, int response, void *data)
/* the below generates a compiler warning about incompatible pointer types */
ESearchBar *esb = (ESearchBar *)efb;
FilterRule *rule;
-
+
if (response == GTK_RESPONSE_OK || response == GTK_RESPONSE_APPLY) {
rule = g_object_get_data ((GObject *) dialog, "rule");
if (rule) {
@@ -117,7 +117,7 @@ rule_advanced_response (GtkWidget *dialog, int response, void *data)
if (!filter_rule_validate (rule))
return;
-
+
efb->current_query = rule;
g_object_ref (rule);
g_signal_emit_by_name (efb, "search_activated");
@@ -128,7 +128,7 @@ rule_advanced_response (GtkWidget *dialog, int response, void *data)
gtk_widget_modify_base (esb->viewoption, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
e_search_bar_set_text (esb,_("Advanced Search"));
gtk_widget_set_sensitive (esb->clear_button, TRUE);
-
+
if (response == GTK_RESPONSE_APPLY) {
if (!rule_context_find_rule (efb->context, rule->name, rule->source))
rule_context_add_rule (efb->context, rule);
@@ -139,7 +139,7 @@ rule_advanced_response (GtkWidget *dialog, int response, void *data)
} else {
e_search_bar_set_item_id (esb, esb->last_search_option);
}
-
+
if (response != GTK_RESPONSE_APPLY)
gtk_widget_destroy (dialog);
}
@@ -160,20 +160,20 @@ static void
do_advanced (ESearchBar *esb)
{
EFilterBar *efb = (EFilterBar *)esb;
-
+
d(printf("Advanced search!\n"));
-
+
if (!efb->save_dialog && !efb->setquery) {
GtkWidget *dialog, *w;
FilterRule *rule;
-
+
if (efb->current_query)
rule = filter_rule_clone (efb->current_query);
else {
rule = filter_rule_new ();
efb->current_query = rule;
}
-
+
w = filter_rule_get_widget (rule, efb->context);
filter_rule_set_source (rule, FILTER_SOURCE_INCOMING);
gtk_container_set_border_width (GTK_CONTAINER (w), 12);
@@ -183,17 +183,17 @@ do_advanced (ESearchBar *esb)
GTK_STOCK_SAVE, GTK_RESPONSE_APPLY,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
-
+
efb->save_dialog = dialog;
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
-
+
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 300);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 12);
-
+
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), w, TRUE, TRUE, 0);
-
+
g_object_ref (rule);
g_object_set_data_full ((GObject *) dialog, "rule", rule, (GDestroyNotify) g_object_unref);
@@ -202,9 +202,9 @@ do_advanced (ESearchBar *esb)
g_signal_connect (dialog, "response", G_CALLBACK (rule_advanced_response), efb);
g_object_weak_ref ((GObject *) dialog, (GWeakNotify) rule_editor_destroyed, efb);
-
+
e_search_bar_set_menu_sensitive (esb, E_FILTERBAR_SAVE_ID, FALSE);
-
+
gtk_widget_show (dialog);
}
}
@@ -215,7 +215,7 @@ save_search_dialog (ESearchBar *esb)
FilterRule *rule;
char *name, *text;
GtkWidget *dialog, *w;
-
+
EFilterBar *efb = (EFilterBar *)esb;
rule = filter_rule_clone (efb->current_query);
@@ -224,7 +224,7 @@ save_search_dialog (ESearchBar *esb)
filter_rule_set_name (rule, name);
g_free (text);
g_free (name);
-
+
w = filter_rule_get_widget (rule, efb->context);
filter_rule_set_source (rule, FILTER_SOURCE_INCOMING);
gtk_container_set_border_width (GTK_CONTAINER (w), 12);
@@ -261,14 +261,14 @@ menubar_activated (ESearchBar *esb, int id, void *data)
EFilterBar *efb = (EFilterBar *)esb;
GtkWidget *dialog;
GtkStyle *style;
-
+
d(printf ("menubar activated!\n"));
switch (id) {
case E_FILTERBAR_EDIT_ID:
if (!efb->save_dialog) {
efb->save_dialog = dialog = (GtkWidget *) rule_editor_new (efb->context, FILTER_SOURCE_INCOMING, _("_Searches"));
-
+
gtk_window_set_title (GTK_WINDOW (dialog), _("Searches"));
g_signal_connect (dialog, "response", G_CALLBACK (full_rule_editor_response), efb);
g_object_weak_ref ((GObject *) dialog, (GWeakNotify) rule_editor_destroyed, efb);
@@ -276,9 +276,9 @@ menubar_activated (ESearchBar *esb, int id, void *data)
}
break;
case E_FILTERBAR_SAVE_ID:
- if (efb->current_query && !efb->save_dialog)
+ if (efb->current_query && !efb->save_dialog)
save_search_dialog (esb);
-
+
d(printf("Save menu\n"));
break;
case E_FILTERBAR_ADVANCED_ID:
@@ -288,14 +288,14 @@ menubar_activated (ESearchBar *esb, int id, void *data)
if (id >= efb->menu_base && id < efb->menu_base + efb->menu_rules->len) {
#if d(!)0
GString *out = g_string_new ("");
-
+
printf("Selected rule: %s\n", ((FilterRule *)efb->menu_rules->pdata[id - efb->menu_base])->name);
filter_rule_build_code (efb->menu_rules->pdata[id - efb->menu_base], out);
printf("query: '%s'\n", out->str);
g_string_free (out, TRUE);
#endif
efb->current_query = (FilterRule *)efb->menu_rules->pdata[id - efb->menu_base];
-
+
efb->setquery = TRUE;
e_search_bar_set_item_id (esb, E_FILTERBAR_ADVANCED_ID);
efb->setquery = FALSE;
@@ -307,14 +307,14 @@ menubar_activated (ESearchBar *esb, int id, void *data)
gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, &(style->text [GTK_STATE_SELECTED] ));
gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, &(style->base [GTK_STATE_SELECTED] ));
gtk_widget_modify_base (esb->viewoption, GTK_STATE_NORMAL, &(style->base [GTK_STATE_SELECTED] ));
- e_search_bar_set_text (esb,_("Advanced Search"));
+ e_search_bar_set_text (esb,_("Advanced Search"));
g_signal_emit_by_name (efb, "search_activated", NULL);
efb->setquery = FALSE;
} else {
return;
}
}
-
+
g_signal_stop_emission_by_name (esb, "menu_activated");
}
@@ -324,7 +324,7 @@ option_changed (ESearchBar *esb, void *data)
EFilterBar *efb = (EFilterBar *)esb;
int id = e_search_bar_get_item_id (esb);
char *query;
-
+
d(printf("option changed, id = %d, setquery = %s %d\n", id, efb->setquery ? "true" : "false", esb->block_search));
if (esb->scopeitem_id == E_FILTERBAR_CURRENT_MESSAGE_ID) {
@@ -332,7 +332,7 @@ option_changed (ESearchBar *esb, void *data)
} else {
gtk_widget_set_sensitive (esb->option_button, TRUE);
}
-
+
if (efb->setquery)
return;
@@ -384,7 +384,7 @@ build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrA
char *source;
GSList *gtksux = NULL;
int num;
-
+
/* So gtk calls a signal again if you connect to it WHILE inside a changed event.
So this snot is to work around that shit fucked up situation */
for (i=0;i<rules->len;i++)
@@ -402,7 +402,7 @@ build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrA
dup_item_no_subitems (&dup_item, items + i);
g_array_append_vals (menu, &dup_item, 1);
}
-
+
*start = id;
if (type == 0) {
@@ -453,10 +453,10 @@ build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrA
g_slist_free_1(gtksux);
gtksux = next;
}
-
+
/* always add on the advanced menu */
if (type == 1) {
- ESearchBarItem sb_items[2] = { E_FILTERBAR_SEPARATOR, E_FILTERBAR_ADVANCED,
+ ESearchBarItem sb_items[2] = { E_FILTERBAR_SEPARATOR, E_FILTERBAR_ADVANCED,
/* E_FILTERBAR_SEPARATOR, E_FILTERBAR_SAVE */ };
ESearchBarItem dup_items[2];
@@ -466,11 +466,11 @@ build_items (ESearchBar *esb, ESearchBarItem *items, int type, int *start, GPtrA
/* dup_item_no_subitems (&dup_items[3], &sb_items[3]); */
g_array_append_vals (menu, &dup_items, 2);
}
-
+
item.id = -1;
item.text = NULL;
g_array_append_vals (menu, &item, 1);
-
+
return menu;
}
@@ -504,11 +504,11 @@ static void
free_items (ESearchBarItem *items)
{
int i;
-
- for (i = 0; items[i].id != -1; i++)
+
+ for (i = 0; items[i].id != -1; i++)
g_free (items[i].text);
-
+
g_free (items);
}
@@ -519,22 +519,22 @@ set_menu (ESearchBar *esb, ESearchBarItem *items)
EFilterBar *efb = E_FILTER_BAR (esb);
ESearchBarItem *default_items;
int i, num;
-
+
if (efb->default_items)
free_items (efb->default_items);
-
+
for (num = 0; items[num].id != -1; num++)
;
-
+
default_items = g_new (ESearchBarItem, num + 1);
for (i = 0; i < num + 1; i++) {
default_items[i].text = g_strdup (items[i].text);
default_items[i].id = items[i].id;
default_items[i].type = items[i].type;
}
-
+
efb->default_items = default_items;
-
+
generate_menu (esb, default_items);
}
@@ -543,11 +543,11 @@ set_option (ESearchBar *esb, ESearchBarItem *items)
{
GArray *menu;
EFilterBar *efb = (EFilterBar *)esb;
-
+
menu = build_items (esb, items, 1, &efb->option_base, efb->option_rules);
((ESearchBarClass *)parent_class)->set_option (esb, (ESearchBarItem *)menu->data);
free_built_items (menu);
-
+
e_search_bar_set_item_id (esb, efb->option_base);
}
@@ -556,7 +556,7 @@ context_changed (RuleContext *context, gpointer user_data)
{
EFilterBar *efb = E_FILTER_BAR (user_data);
ESearchBar *esb = E_SEARCH_BAR (user_data);
-
+
/* just generate whole menu again */
generate_menu (esb, efb->default_items);
}
@@ -566,7 +566,7 @@ context_rule_removed (RuleContext *context, FilterRule *rule, gpointer user_data
{
EFilterBar *efb = E_FILTER_BAR (user_data);
ESearchBar *esb = E_SEARCH_BAR (user_data);
-
+
/* just generate whole menu again */
generate_menu (esb, efb->default_items);
}
@@ -576,7 +576,7 @@ rule_changed (FilterRule *rule, gpointer user_data)
{
EFilterBar *efb = E_FILTER_BAR (user_data);
ESearchBar *esb = E_SEARCH_BAR (user_data);
-
+
/* just generate whole menu again */
generate_menu (esb, efb->default_items);
}
@@ -589,12 +589,12 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp
{
EFilterBar *efb = (EFilterBar *) object;
ESearchBar *esb = E_SEARCH_BAR (object);
-
+
switch (property_id) {
case PROP_QUERY:
if (efb->current_query) {
GString *out = g_string_new ("");
-
+
filter_rule_build_code (efb->current_query, out);
g_value_take_string (value, out->str);
g_string_free (out, FALSE);
@@ -609,9 +609,9 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp
int searchscope, item_id, n, view_id;
xmlNodePtr root, node;
xmlDocPtr doc;
-
+
item_id = e_search_bar_get_item_id ((ESearchBar *) efb);
-
+
doc = xmlNewDoc ((const unsigned char *)"1.0");
root = xmlNewDocNode (doc, NULL, (const unsigned char *)"state", NULL);
xmlDocSetRootElement (doc, root);
@@ -620,7 +620,7 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp
if (searchscope < E_FILTERBAR_CURRENT_FOLDER_ID)
item_id = esb->last_search_option;
-
+
if (item_id == E_FILTERBAR_ADVANCED_ID) {
/* advanced query, save the filterbar state */
node = xmlNewChild (root, NULL, (const unsigned char *)"filter-bar", NULL);
@@ -631,12 +631,12 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp
xmlSetProp (node, (const unsigned char *)"searchscope", (unsigned char *)buf);
sprintf (buf, "%d", view_id);
xmlSetProp (node, (const unsigned char *)"view_id", (unsigned char *)buf);
-
- xmlAddChild (node, filter_rule_xml_encode (efb->current_query));
+
+ xmlAddChild (node, filter_rule_xml_encode (efb->current_query));
} else {
/* simple query, save the searchbar state */
text = e_search_bar_get_text ((ESearchBar *) efb);
-
+
node = xmlNewChild (root, NULL, (const unsigned char *)"search-bar", NULL);
xmlSetProp (node, (const unsigned char *)"text", (unsigned char *)(text ? text : ""));
sprintf (buf, "%d", item_id);
@@ -647,18 +647,18 @@ get_property (GObject *object, guint property_id, GValue *value, GParamSpec *psp
xmlSetProp (node, (const unsigned char *)"view_id", (unsigned char *)buf);
g_free (text);
}
-
+
xmlDocDumpMemory (doc, &xmlbuf, &n);
xmlFreeDoc (doc);
-
+
/* remap to glib memory */
text = g_malloc (n + 1);
memcpy (text, (char *)xmlbuf, n);
text[n] = '\0';
xmlFree (xmlbuf);
-
+
g_value_take_string (value, text);
-
+
break; }
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -671,14 +671,14 @@ xml_get_prop_int (xmlNodePtr node, const char *prop)
{
char *buf;
int ret;
-
+
if ((buf = (char *)xmlGetProp (node, (unsigned char *)prop))) {
ret = strtol (buf, NULL, 10);
xmlFree (buf);
} else {
ret = -1;
}
-
+
return ret;
}
@@ -691,26 +691,26 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe
const char *state;
xmlDocPtr doc;
gboolean rule_set = FALSE, is_cur_folder=FALSE;
- int view_id, scope, item_id;
-
+ int view_id, scope, item_id;
+
switch (property_id) {
case PROP_STATE:
if ((state = g_value_get_string (value))) {
if (!(doc = xmlParseDoc ((unsigned char *) state)))
return;
-
+
root = doc->children;
if (strcmp ((char *)root->name, "state") != 0) {
xmlFreeDoc (doc);
return;
}
-
+
node = root->children;
while (node != NULL) {
if (!strcmp ((char *)node->name, "filter-bar")) {
FilterRule *rule = NULL;
-
+
view_id = xml_get_prop_int (node, "view_id");
scope = xml_get_prop_int (node, "searchscope");
item_id = xml_get_prop_int (node, "item_id");
@@ -719,12 +719,12 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe
if (scope == E_FILTERBAR_CURRENT_FOLDER_ID)
is_cur_folder = TRUE;
-
+
if ((node = node->children)) {
GtkStyle *style = gtk_widget_get_default_style ();
-
+
rule = filter_rule_new ();
- if (filter_rule_xml_decode (rule, node, efb->context) != 0) {
+ if (filter_rule_xml_decode (rule, node, efb->context) != 0) {
gtk_widget_modify_base (E_SEARCH_BAR (efb)->entry, GTK_STATE_NORMAL, NULL);
gtk_widget_modify_text (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, NULL);
gtk_widget_modify_base (((ESearchBar *)efb)->icon_entry, GTK_STATE_NORMAL, NULL);
@@ -736,7 +736,7 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe
gtk_widget_modify_base (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
gtk_widget_modify_text (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, &(style->text[GTK_STATE_SELECTED]));
gtk_widget_modify_base (((ESearchBar *)efb)->icon_entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
- gtk_widget_modify_base (((ESearchBar *)efb)->viewoption, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
+ gtk_widget_modify_base (((ESearchBar *)efb)->viewoption, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
g_object_set_data_full (object, "rule", rule, (GDestroyNotify) g_object_unref);
}
}
@@ -746,31 +746,31 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe
esb->block_search = TRUE;
e_search_bar_set_text (esb, _("Advanced Search"));
e_search_bar_set_item_menu ((ESearchBar *) efb, item_id);
- e_search_bar_set_search_scope ((ESearchBar *) efb, scope);
+ e_search_bar_set_search_scope ((ESearchBar *) efb, scope);
esb->block_search = FALSE;
efb->current_query = (FilterRule *)efb->option_rules->pdata[item_id - efb->option_base];
if (efb->config && efb->current_query) {
char *query = e_search_bar_get_text (esb);
efb->config (efb, efb->current_query, item_id, query, efb->config_data);
g_free (query);
-
+
}
}
e_search_bar_set_viewitem_id ((ESearchBar *) efb, view_id);
efb->current_query = rule;
efb->setquery = TRUE;
- e_search_bar_set_item_id ((ESearchBar *) efb, E_FILTERBAR_ADVANCED_ID);
+ e_search_bar_set_item_id ((ESearchBar *) efb, E_FILTERBAR_ADVANCED_ID);
efb->setquery = FALSE;
-
+
break;
} else if (!strcmp ((char *)node->name, "search-bar")) {
int subitem_id, item_id, scope, view_id;
char *text;
GtkStyle *style = gtk_widget_get_default_style ();
-
+
/* set the text first (it doesn't emit a signal) */
-
+
/* now set the item_id and subitem_id */
item_id = xml_get_prop_int (node, "item_id");
subitem_id = xml_get_prop_int (node, "subitem_id");
@@ -791,7 +791,7 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe
if (text && *text) {
efb->current_query = (FilterRule *)efb->option_rules->pdata[item_id - efb->option_base];
if (efb->config && efb->current_query)
- efb->config (efb, efb->current_query, item_id, text, efb->config_data);
+ efb->config (efb, efb->current_query, item_id, text, efb->config_data);
gtk_widget_set_sensitive (esb->clear_button, TRUE);
gtk_widget_modify_base (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
gtk_widget_modify_text (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, &(style->text[GTK_STATE_SELECTED]));
@@ -799,23 +799,23 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe
gtk_widget_modify_base (((ESearchBar *)efb)->viewoption, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
} else {
gtk_widget_modify_base (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, NULL);
- gtk_widget_modify_text (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, NULL);
+ gtk_widget_modify_text (((ESearchBar *)efb)->entry, GTK_STATE_NORMAL, NULL);
gtk_widget_modify_base (((ESearchBar *)efb)->icon_entry, GTK_STATE_NORMAL, NULL);
e_search_bar_paint (esb);
efb->current_query = (FilterRule *)efb->option_rules->pdata[item_id - efb->option_base];
if (efb->config && efb->current_query)
- efb->config (efb, efb->current_query, item_id, "", efb->config_data);
+ efb->config (efb, efb->current_query, item_id, "", efb->config_data);
}
-
+
xmlFree (text);
break;
}
-
+
node = node->next;
}
-
+
xmlFreeDoc (doc);
} else {
/* set default state */
@@ -823,16 +823,16 @@ set_property (GObject *object, guint property_id, const GValue *value, GParamSpe
e_search_bar_set_viewitem_id ((ESearchBar *) efb, 0);
e_search_bar_set_search_scope ((ESearchBar *) efb, E_FILTERBAR_CURRENT_FOLDER_ID);
}
-
+
/* we don't want to run option_changed */
efb->setquery = TRUE;
g_signal_emit_by_name (efb, "search_activated", NULL);
efb->setquery = FALSE;
-
+
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
+ break;
}
}
@@ -854,15 +854,15 @@ static void
dispose (GObject *object)
{
EFilterBar *bar;
-
+
g_return_if_fail (object != NULL);
g_return_if_fail (E_IS_FILTER_BAR (object));
-
+
bar = E_FILTER_BAR (object);
-
+
if (bar->context != NULL && bar->userrules != NULL)
rule_context_save (bar->context, bar->userrules);
-
+
if (bar->menu_rules != NULL) {
clear_rules(bar, bar->menu_rules);
clear_rules(bar, bar->option_rules);
@@ -902,24 +902,24 @@ class_init (EFilterBarClass *klass)
GObjectClass *object_class = (GObjectClass *) klass;
ESearchBarClass *esb_class = (ESearchBarClass *) klass;
GParamSpec *pspec;
-
+
parent_class = g_type_class_ref (e_search_bar_get_type ());
-
+
object_class->dispose = dispose;
object_class->get_property = get_property;
object_class->set_property = set_property;
-
+
esb_class->set_menu = set_menu;
esb_class->set_option = set_option;
-
+
pspec = g_param_spec_string ("query", NULL, NULL, NULL, G_PARAM_READABLE);
g_object_class_install_property (object_class, PROP_QUERY, pspec);
-
+
pspec = g_param_spec_string ("state", NULL, NULL, NULL, G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_STATE, pspec);
-
+
/*gtk_object_add_arg_type ("EFilterBar::query", GTK_TYPE_STRING, GTK_ARG_READABLE, ARG_QUERY);*/
-
+
#if 0
esb_signals [QUERY_CHANGED] =
gtk_signal_new ("query_changed",
@@ -928,7 +928,7 @@ class_init (EFilterBarClass *klass)
G_STRUCT_OFFSET (EFilterBarClass, query_changed),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
-
+
esb_signals [MENU_ACTIVATED] =
gtk_signal_new ("menu_activated",
GTK_RUN_LAST,
@@ -936,7 +936,7 @@ class_init (EFilterBarClass *klass)
G_STRUCT_OFFSET (EFilterBarClass, menu_activated),
g_cclosure_marshal_VOID__INT,
GTK_TYPE_NONE, 1, GTK_TYPE_INT);
-
+
gtk_object_class_add_signals (object_class, esb_signals, LAST_SIGNAL);
#endif
}
@@ -947,7 +947,7 @@ init (EFilterBar *efb)
g_signal_connect (efb, "menu_activated", G_CALLBACK (menubar_activated), NULL);
g_signal_connect (efb, "query_changed", G_CALLBACK (option_changed), NULL);
g_signal_connect (efb, "search_activated", G_CALLBACK (option_changed), NULL);
-
+
efb->menu_rules = g_ptr_array_new ();
efb->option_rules = g_ptr_array_new ();
}
@@ -963,16 +963,16 @@ e_filter_bar_new (RuleContext *context,
void *data)
{
EFilterBar *bar;
-
+
bar = g_object_new (e_filter_bar_get_type (), NULL);
e_filter_bar_new_construct (context, systemrules, userrules, config, data, bar);
-
+
return bar;
}
-void
+void
e_filter_bar_new_construct (RuleContext *context,
const char *systemrules,
const char *userrules,
@@ -983,18 +983,18 @@ e_filter_bar_new_construct (RuleContext *context,
bar->context = context;
g_object_ref (context);
-
+
bar->config = config;
bar->config_data = data;
-
+
bar->systemrules = g_strdup (systemrules);
bar->userrules = g_strdup (userrules);
-
+
bar->all_account_search_vf = NULL;
bar->account_search_vf = NULL;
-
+
e_search_bar_construct ((ESearchBar *)bar, &item, &item);
-
+
g_signal_connect (context, "changed", G_CALLBACK (context_changed), bar);
g_signal_connect (context, "rule_removed", G_CALLBACK (context_rule_removed), bar);
@@ -1004,7 +1004,7 @@ GtkType
e_filter_bar_get_type (void)
{
static GtkType type = 0;
-
+
if (!type) {
static const GtkTypeInfo info = {
"EFilterBar",
@@ -1016,9 +1016,9 @@ e_filter_bar_get_type (void)
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
-
+
type = gtk_type_unique (e_search_bar_get_type (), &info);
}
-
+
return type;
}
diff --git a/widgets/misc/e-filter-bar.h b/widgets/misc/e-filter-bar.h
index 4e64e29ccd..7588517c4b 100644
--- a/widgets/misc/e-filter-bar.h
+++ b/widgets/misc/e-filter-bar.h
@@ -58,18 +58,18 @@ struct _EFilterBar {
ESearchBar parent;
int menu_base, option_base;
GPtrArray *menu_rules, *option_rules;
-
+
ESearchBarItem *default_items;
-
+
GtkWidget *save_dialog; /* current save dialogue (so we dont pop up multiple ones) */
FilterRule *current_query; /* as it says */
int setquery; /* true when we're setting a query directly to advanced, so dont popup the dialog */
-
+
RuleContext *context;
char *systemrules;
char *userrules;
-
+
EFilterBarConfigRule config;
void *config_data;
@@ -122,7 +122,7 @@ EFilterBar *e_filter_bar_new (RuleContext *context,
const char *userrules,
EFilterBarConfigRule config,
void *data);
-void
+void
e_filter_bar_new_construct (RuleContext *context,
const char *systemrules,
const char *userrules,
diff --git a/widgets/misc/e-gui-utils.c b/widgets/misc/e-gui-utils.c
index bd94ddb4d9..3a827c430f 100644
--- a/widgets/misc/e-gui-utils.c
+++ b/widgets/misc/e-gui-utils.c
@@ -33,7 +33,7 @@ void
e_auto_kill_popup_menu_on_selection_done (GtkMenu *menu)
{
g_return_if_fail (GTK_IS_MENU (menu));
-
+
g_signal_connect (menu, "selection_done", G_CALLBACK (gtk_widget_destroy), menu);
}
diff --git a/widgets/misc/e-gui-utils.h b/widgets/misc/e-gui-utils.h
index de7f6a066b..a4d0c3795f 100644
--- a/widgets/misc/e-gui-utils.h
+++ b/widgets/misc/e-gui-utils.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-gui-utils.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/misc/e-hsv-utils.c b/widgets/misc/e-hsv-utils.c
index 9da22788f7..b42271fb19 100644
--- a/widgets/misc/e-hsv-utils.c
+++ b/widgets/misc/e-hsv-utils.c
@@ -30,22 +30,22 @@
how much you want their respective channels modified (and in what direction).
if it can't do the specified modification, it does it in the oppositon direction */
void
-e_hsv_tweak (GdkColor *colour, gdouble delta_h, gdouble delta_s, gdouble delta_v)
+e_hsv_tweak (GdkColor *colour, gdouble delta_h, gdouble delta_s, gdouble delta_v)
{
gdouble h, s, v, r, g, b;
r = colour->red / 65535.0f;
g = colour->green / 65535.0f;
b = colour->blue / 65535.0f;
-
+
e_rgb_to_hsv (r, g, b, &h, &s, &v);
-
+
if (h + delta_h < 0) {
h -= delta_h;
} else {
h += delta_h;
}
-
+
if (s + delta_s < 0) {
s -= delta_s;
} else {
@@ -59,7 +59,7 @@ e_hsv_tweak (GdkColor *colour, gdouble delta_h, gdouble delta_s, gdouble delta_v
}
e_hsv_to_rgb (h, s, v, &r, &g, &b);
-
+
colour->red = r * 65535.0f;
colour->green = g * 65535.0f;
colour->blue = b * 65535.0f;
diff --git a/widgets/misc/e-hsv-utils.h b/widgets/misc/e-hsv-utils.h
index 186818d7f6..f76bed73f6 100644
--- a/widgets/misc/e-hsv-utils.h
+++ b/widgets/misc/e-hsv-utils.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-hsv-utils.h - utilites for manipulating colours in HSV space
* Copyright (C) 1995-2001 Seth Nickell, Peter Mattis, Spencer Kimball and Josh MacDonald
*
diff --git a/widgets/misc/e-icon-entry.c b/widgets/misc/e-icon-entry.c
index 48a40e088e..c246edc04c 100644
--- a/widgets/misc/e-icon-entry.c
+++ b/widgets/misc/e-icon-entry.c
@@ -28,7 +28,7 @@
* Modified by the GTK+ Team and others 1997-2005. See the AUTHORS
* file in the gtk+ distribution for a list of people on the GTK+ Team.
* See the ChangeLog in the gtk+ distribution files for a list of changes.
- * These files are distributed with GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ * These files are distributed with GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*
*/
@@ -113,9 +113,9 @@ e_icon_entry_paint (GtkWidget *widget,
height -= 2 * focus_width;
}
- gtk_paint_flat_box (entry_widget->style, widget->window,
+ gtk_paint_flat_box (entry_widget->style, widget->window,
GTK_WIDGET_STATE (entry_widget), GTK_SHADOW_NONE,
- NULL, entry_widget, "entry_bg",
+ NULL, entry_widget, "entry_bg",
/* FIXME: was 0, 0 in gtk_entry_expose, but I think this is correct: */
x, y, width, height);
@@ -254,7 +254,7 @@ e_icon_entry_size_allocate (GtkWidget *widget,
child_allocation.width,
child_allocation.height);
}
-
+
child_allocation.x = container->border_width + xborder;
child_allocation.y = container->border_width + yborder;
child_allocation.width = MAX (allocation->width - (container->border_width + xborder) * 2, 0);
@@ -350,7 +350,7 @@ e_icon_entry_pack_widget (EIconEntry *entry,
}
}
-static void
+static void
set_cursor (GtkWidget *widget, GdkEventCrossing *event, gpointer dummy)
{
diff --git a/widgets/misc/e-icon-entry.h b/widgets/misc/e-icon-entry.h
index 0bdc00c94f..db3f01dc56 100644
--- a/widgets/misc/e-icon-entry.h
+++ b/widgets/misc/e-icon-entry.h
@@ -30,7 +30,7 @@
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
* file in the gtk+ distribution for a list of people on the GTK+ Team.
* See the ChangeLog in the gtk+ distribution files for a list of changes.
- * These files are distributed with GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ * These files are distributed with GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*
*/
diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c
index 319c2b55ac..c15cb54817 100644
--- a/widgets/misc/e-image-chooser.c
+++ b/widgets/misc/e-image-chooser.c
@@ -234,11 +234,11 @@ set_image_from_data (EImageChooser *chooser,
gdk_pixbuf_loader_write (loader, (unsigned char *)data, length, NULL);
gdk_pixbuf_loader_close (loader, NULL);
-
+
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
if (pixbuf)
g_object_ref (pixbuf);
-
+
g_object_unref (loader);
if (pixbuf) {
diff --git a/widgets/misc/e-image-chooser.h b/widgets/misc/e-image-chooser.h
index 4f9d177394..ff876038ae 100644
--- a/widgets/misc/e-image-chooser.h
+++ b/widgets/misc/e-image-chooser.h
@@ -49,7 +49,7 @@ struct _EImageChooserClass
/* signals */
void (*changed) (EImageChooser *chooser);
-
+
};
GtkWidget *e_image_chooser_new (void);
diff --git a/widgets/misc/e-info-label.c b/widgets/misc/e-info-label.c
index e38d4692cc..617a92f350 100644
--- a/widgets/misc/e-info-label.c
+++ b/widgets/misc/e-info-label.c
@@ -73,7 +73,7 @@ static void
el_class_init(GObjectClass *klass)
{
klass->finalize = el_finalise;
-
+
((GtkObjectClass *)klass)->destroy = el_destroy;
((GtkWidgetClass *)klass)->expose_event = el_expose_event;
}
@@ -101,12 +101,12 @@ e_info_label_get_type(void)
/**
* e_info_label_new:
- * @icon:
- *
+ * @icon:
+ *
* Create a new info label widget. @icon is the name of the icon
* (from the icon theme) to use for the icon image.
- *
- * Return value:
+ *
+ * Return value:
**/
GtkWidget *
e_info_label_new(const char *icon)
@@ -114,7 +114,7 @@ e_info_label_new(const char *icon)
EInfoLabel *el = g_object_new(e_info_label_get_type(), NULL);
GtkWidget *image;
char *name = e_icon_factory_get_icon_filename (icon, E_ICON_SIZE_MENU);
-
+
image = gtk_image_new_from_file(name);
g_free(name);
gtk_misc_set_padding((GtkMisc *)image, 6, 6);
@@ -128,10 +128,10 @@ e_info_label_new(const char *icon)
/**
* e_info_label_set_info:
- * @el:
- * @location:
- * @info:
- *
+ * @el:
+ * @location:
+ * @info:
+ *
* Set the information to show on the label. @location is some
* context about the current view. e.g. the folder name. If the
* label is too wide, this will be truncated.
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 17c1ecbb35..758d4f960c 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -124,11 +124,11 @@ static GtkWidgetClass *parent_class;
/**
* e_map_get_type:
- * @void:
- *
+ * @void:
+ *
* Registers the #EMap class if necessary, and returns the type ID
* associated to it.
- *
+ *
* Return value: The type ID of the #EMap class.
**/
@@ -608,10 +608,10 @@ e_map_key_press (GtkWidget *widget, GdkEventKey *event)
/**
* e_map_new:
- * @void:
- *
+ * @void:
+ *
* Creates a new empty map widget.
- *
+ *
* Return value: A newly-created map widget.
**/
@@ -635,7 +635,7 @@ e_map_new (void)
/* These functions translate coordinates between longitude/latitude and
* the image x/y offsets, using the equidistant cylindrical projection.
- *
+ *
* Longitude E <-180, 180]
* Latitude E <-90, 90] */
@@ -692,7 +692,7 @@ double
e_map_get_magnification (EMap *map)
{
EMapPrivate *priv;
-
+
priv = map->priv;
if (priv->zoom_state == E_MAP_ZOOMED_IN) return 2.0;
else return 1.0;
@@ -812,7 +812,7 @@ e_map_remove_point (EMap *map, EMapPoint *point)
update_render_pixbuf (map, GDK_INTERP_BILINEAR, TRUE);
repaint_point (map, point);
}
-
+
g_free (point);
}
@@ -878,11 +878,11 @@ e_map_point_is_in_view (EMap *map, EMapPoint *point)
if (!priv->map_render_pixbuf) return FALSE;
e_map_world_to_window (map, point->longitude, point->latitude, &x, &y);
-
+
if (x >= 0 && x < GTK_WIDGET (map)->allocation.width &&
y >= 0 && y < GTK_WIDGET (map)->allocation.height)
return TRUE;
-
+
return FALSE;
}
@@ -932,7 +932,7 @@ repaint_visible (EMap *map)
area.y = 0;
area.width = GTK_WIDGET (map)->allocation.width;
area.height = GTK_WIDGET (map)->allocation.height;
-
+
request_paint_area (map, &area);
}
@@ -1014,7 +1014,7 @@ update_render_pixbuf (EMap *map, GdkInterpType interp, gboolean render_overlays)
zoom, zoom, /* Scale (x, y) */
interp);
}
-
+
if (render_overlays)
{
/* Add points */
@@ -1056,7 +1056,7 @@ request_paint_area (EMap *view, GdkRectangle *area)
if (priv->yofs + height > gdk_pixbuf_get_height (priv->map_render_pixbuf))
height = gdk_pixbuf_get_height (priv->map_render_pixbuf) - priv->yofs;
-
+
/* We rely on the fast case always being the case, since we load and
* preprocess the source pixbuf ourselves */
@@ -1148,7 +1148,7 @@ repaint_point (EMap *map, EMapPoint *point)
GdkRectangle area;
double px, py;
- if (!e_map_point_is_in_view (map, point)) return;
+ if (!e_map_point_is_in_view (map, point)) return;
e_map_world_to_window (map, point->longitude, point->latitude, &px, &py);
@@ -1212,7 +1212,7 @@ smooth_center_at (EMap *map, int x, int y)
dx = (x < priv->xofs) ? -1 : (x > priv->xofs) ? 1 : 0;
dy = (y < priv->yofs) ? -1 : (y > priv->yofs) ? 1 : 0;
-
+
scroll_to (map, priv->xofs + dx, priv->yofs + dy);
}
}
@@ -1564,32 +1564,32 @@ zoom_in_smooth (EMap *map)
height = gdk_pixbuf_get_height (priv->map_render_pixbuf);
/* Center the target point as much as possible */
-
+
e_map_world_to_window (map, priv->zoom_target_long, priv->zoom_target_lat, &x, &y);
smooth_center_at (map, x + priv->xofs, y + priv->yofs);
/* Render and paint a temporary map without overlays, so they don't get in
* the way (look ugly) while zooming */
-
+
update_render_pixbuf (map, GDK_INTERP_BILINEAR, FALSE);
request_paint_area (map, &area);
-
+
/* Find out where in the area we're going to zoom to */
e_map_world_to_window (map, priv->zoom_target_long, priv->zoom_target_lat, &x, &y);
-
+
/* Pre-render the zoomed-in map, so we can put it there quickly when the
* blowup sequence ends */
-
+
priv->zoom_state = E_MAP_ZOOMED_IN;
update_render_pixbuf (map, GDK_INTERP_BILINEAR, TRUE);
-
+
/* Do the blowup */
-
+
blowup_window_area (window, priv->xofs, priv->yofs, x, y, width, height, 1.68);
/* Set new scroll offsets and paint the zoomed map */
-
+
e_map_world_to_window (map, priv->zoom_target_long, priv->zoom_target_lat, &x, &y);
priv->xofs = CLAMP (priv->xofs + x - area.width / 2.0, 0, E_MAP_GET_WIDTH (map) - area.width);
priv->yofs = CLAMP (priv->yofs + y - area.height / 2.0, 0, E_MAP_GET_HEIGHT (map) - area.height);
@@ -1673,7 +1673,7 @@ zoom_do (EMap *map)
/* if (e_map_get_smooth_zoom(map)) zoom_out_smooth(map); */
zoom_out (map);
}
-
+
g_signal_handlers_unblock_matched (priv->hadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map);
g_signal_handlers_unblock_matched (priv->vadj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, map);
diff --git a/widgets/misc/e-multi-config-dialog.c b/widgets/misc/e-multi-config-dialog.c
index 86bade5f97..bd73f1d2de 100644
--- a/widgets/misc/e-multi-config-dialog.c
+++ b/widgets/misc/e-multi-config-dialog.c
@@ -39,12 +39,12 @@
struct _EMultiConfigDialogPrivate {
GSList *pages;
-
+
GtkWidget *list_e_table;
ETableModel *list_e_table_model;
-
+
GtkWidget *notebook;
-
+
int set_page_timeout_id;
int set_page_timeout_page;
};
@@ -85,7 +85,7 @@ create_page_container (const char *description,
vbox = gtk_vbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), widget, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), widget, TRUE, TRUE, 0);
gtk_widget_show (widget);
gtk_widget_show (vbox);
@@ -248,7 +248,7 @@ canvas_realize (GtkWidget *widget, EMultiConfigDialog *dialog)
{
int i;
int row_count;
-
+
row_count = e_table_model_row_count (dialog->priv->list_e_table_model);
for (i = 0; i < row_count; i++) {
fill_in_pixbufs (dialog, i);
@@ -285,9 +285,9 @@ e_multi_config_dialog_init (EMultiConfigDialog *multi_config_dialog)
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (multi_config_dialog)->action_area), 12);
hbox = gtk_hbox_new (FALSE, 6);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
dialog_vbox = GTK_DIALOG (multi_config_dialog)->vbox;
-
+
gtk_container_add (GTK_CONTAINER (dialog_vbox), hbox);
list_e_table_model = e_table_memory_store_new (columns);
@@ -336,7 +336,7 @@ e_multi_config_dialog_init (EMultiConfigDialog *multi_config_dialog)
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (multi_config_dialog), GTK_RESPONSE_OK);
-
+
gtk_window_set_policy (GTK_WINDOW (multi_config_dialog),
FALSE /* allow_shrink */,
diff --git a/widgets/misc/e-pilot-settings.c b/widgets/misc/e-pilot-settings.c
index 6dfd4873f6..1c97306032 100644
--- a/widgets/misc/e-pilot-settings.c
+++ b/widgets/misc/e-pilot-settings.c
@@ -30,7 +30,7 @@
#include <libedataserverui/e-source-combo-box.h>
#include "e-pilot-settings.h"
-struct _EPilotSettingsPrivate
+struct _EPilotSettingsPrivate
{
GtkWidget *source;
GtkWidget *secret;
@@ -81,7 +81,7 @@ static void
init (EPilotSettings *ps)
{
EPilotSettingsPrivate *priv;
-
+
priv = g_new0 (EPilotSettingsPrivate, 1);
ps->priv = priv;
@@ -93,7 +93,7 @@ build_ui (EPilotSettings *ps, ESourceList *source_list)
{
EPilotSettingsPrivate *priv;
GtkWidget *lbl;
-
+
priv = ps->priv;
gtk_table_resize (GTK_TABLE (ps), 2, 2);
@@ -134,12 +134,12 @@ e_pilot_settings_new (ESourceList *source_list)
{
EPilotSettings *ps;
EPilotSettingsPrivate *priv;
-
+
ps = g_object_new (E_TYPE_PILOT_SETTINGS, NULL);
priv = ps->priv;
build_ui (ps, source_list);
-
+
return GTK_WIDGET (ps);
}
@@ -147,7 +147,7 @@ ESource *
e_pilot_settings_get_source (EPilotSettings *ps)
{
EPilotSettingsPrivate *priv;
-
+
g_return_val_if_fail (ps != NULL, NULL);
g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), NULL);
@@ -161,7 +161,7 @@ void
e_pilot_settings_set_source (EPilotSettings *ps, ESource *source)
{
EPilotSettingsPrivate *priv;
-
+
g_return_if_fail (ps != NULL);
g_return_if_fail (E_IS_PILOT_SETTINGS (ps));
@@ -175,12 +175,12 @@ gboolean
e_pilot_settings_get_secret (EPilotSettings *ps)
{
EPilotSettingsPrivate *priv;
-
+
g_return_val_if_fail (ps != NULL, FALSE);
g_return_val_if_fail (E_IS_PILOT_SETTINGS (ps), FALSE);
priv = ps->priv;
-
+
return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->secret));
}
@@ -188,7 +188,7 @@ void
e_pilot_settings_set_secret (EPilotSettings *ps, gboolean secret)
{
EPilotSettingsPrivate *priv;
-
+
g_return_if_fail (ps != NULL);
g_return_if_fail (E_IS_PILOT_SETTINGS (ps));
diff --git a/widgets/misc/e-popup-menu.c b/widgets/misc/e-popup-menu.c
index 8e790e41ed..8cd38b9331 100644
--- a/widgets/misc/e-popup-menu.c
+++ b/widgets/misc/e-popup-menu.c
@@ -51,9 +51,9 @@ make_item (GtkMenu *menu, GtkMenuItem *item, const char *name, GtkWidget *pixmap
label = gtk_label_new_with_mnemonic (name);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_widget_show (label);
-
+
gtk_container_add (GTK_CONTAINER (item), label);
-
+
if (pixmap && GTK_IS_IMAGE_MENU_ITEM (item)){
gtk_widget_show (pixmap);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), pixmap);
@@ -151,12 +151,12 @@ void
e_popup_menu_run (EPopupMenu *menu_list, GdkEvent *event, guint32 disable_mask, guint32 hide_mask, void *default_closure)
{
GtkMenu *menu;
-
+
g_return_if_fail (menu_list != NULL);
g_return_if_fail (event != NULL);
-
+
menu = e_popup_menu_create (menu_list, disable_mask, hide_mask, default_closure);
-
+
e_popup_menu (menu, event);
}
diff --git a/widgets/misc/e-popup-menu.h b/widgets/misc/e-popup-menu.h
index 91adb76a76..88e08de05f 100644
--- a/widgets/misc/e-popup-menu.h
+++ b/widgets/misc/e-popup-menu.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-popup-menu.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c
index 7fb79432d6..ee906a6670 100644
--- a/widgets/misc/e-printable.c
+++ b/widgets/misc/e-printable.c
@@ -51,7 +51,7 @@ static void
e_printable_class_init (EPrintableClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+
e_printable_signals [PRINT_PAGE] =
g_signal_new ("print_page",
G_OBJECT_CLASS_TYPE (object_class),
@@ -89,7 +89,7 @@ e_printable_class_init (EPrintableClass *klass)
e_util_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOLEAN,
G_TYPE_DOUBLE, 4, G_TYPE_OBJECT, G_TYPE_DOUBLE,
G_TYPE_DOUBLE, G_TYPE_BOOLEAN);
-
+
e_printable_signals [WILL_FIT] =
g_signal_new ("will_fit",
G_OBJECT_CLASS_TYPE (object_class),
@@ -100,7 +100,7 @@ e_printable_class_init (EPrintableClass *klass)
G_TYPE_BOOLEAN, 4, G_TYPE_OBJECT, G_TYPE_DOUBLE,
G_TYPE_DOUBLE, G_TYPE_BOOLEAN);
- klass->print_page = NULL;
+ klass->print_page = NULL;
klass->data_left = NULL;
klass->reset = NULL;
klass->height = NULL;
@@ -128,7 +128,7 @@ e_printable_print_page (EPrintable *e_printable,
{
g_return_if_fail (e_printable != NULL);
g_return_if_fail (E_IS_PRINTABLE (e_printable));
-
+
g_signal_emit (e_printable,
e_printable_signals [PRINT_PAGE], 0,
context,
@@ -157,7 +157,7 @@ e_printable_reset (EPrintable *e_printable)
{
g_return_if_fail (e_printable != NULL);
g_return_if_fail (E_IS_PRINTABLE (e_printable));
-
+
g_signal_emit (e_printable,
e_printable_signals [RESET], 0);
}
diff --git a/widgets/misc/e-printable.h b/widgets/misc/e-printable.h
index bc5443bc6f..b79e042d08 100644
--- a/widgets/misc/e-printable.h
+++ b/widgets/misc/e-printable.h
@@ -64,7 +64,7 @@ typedef struct {
GtkType e_printable_get_type (void);
EPrintable *e_printable_new (void);
-
+
/*
* Routines for emitting signals on the e_table */
void e_printable_print_page (EPrintable *e_printable,
diff --git a/widgets/misc/e-reflow-model.c b/widgets/misc/e-reflow-model.c
index 13460b975e..9efb689b46 100644
--- a/widgets/misc/e-reflow-model.c
+++ b/widgets/misc/e-reflow-model.c
@@ -246,7 +246,7 @@ e_reflow_model_changed (EReflowModel *e_reflow_model)
{
g_return_if_fail (e_reflow_model != NULL);
g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
-
+
d(print_tabs());
d(g_print("Emitting model_changed on model 0x%p.\n", e_reflow_model));
d(depth++);
@@ -269,7 +269,7 @@ e_reflow_model_comparison_changed (EReflowModel *e_reflow_model)
{
g_return_if_fail (e_reflow_model != NULL);
g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
-
+
d(print_tabs());
d(g_print("Emitting comparison_changed on model 0x%p.\n", e_reflow_model));
d(depth++);
@@ -283,7 +283,7 @@ e_reflow_model_comparison_changed (EReflowModel *e_reflow_model)
* @e_reflow_model: The model changed.
* @position: The position the items were insert in.
* @count: The number of items inserted.
- *
+ *
* Use this function to notify any views of the reflow model that a number of items have been inserted.
**/
void
@@ -305,7 +305,7 @@ e_reflow_model_items_inserted (EReflowModel *e_reflow_model, int position, int c
* e_reflow_model_item_removed:
* @e_reflow_model: The model changed.
* @n: The position from which the items were removed.
- *
+ *
* Use this function to notify any views of the reflow model that an
* item has been removed.
**/
diff --git a/widgets/misc/e-reflow-model.h b/widgets/misc/e-reflow-model.h
index f7fd74fd0c..07b29c4636 100644
--- a/widgets/misc/e-reflow-model.h
+++ b/widgets/misc/e-reflow-model.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-reflow-model.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -55,7 +55,7 @@ typedef struct {
GnomeCanvasItem *(*incarnate) (EReflowModel *etm, int n, GnomeCanvasGroup *parent);
int (*compare) (EReflowModel *etm, int n1, int n2);
void (*reincarnate) (EReflowModel *etm, int n, GnomeCanvasItem *item);
-
+
/*
* Signals
*/
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c
index a8306ffbb3..86f8fa6064 100644
--- a/widgets/misc/e-reflow.c
+++ b/widgets/misc/e-reflow.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-reflow.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -193,7 +193,7 @@ do_adjustment (gpointer user_data)
}
reflow->do_adjustment_idle_id = 0;
-
+
return FALSE;
}
@@ -226,10 +226,10 @@ cursor_changed (ESelectionModel *selection, int row, int col, EReflow *reflow)
NULL);
}
}
-
+
if (reflow->do_adjustment_idle_id == 0)
reflow->do_adjustment_idle_id = g_idle_add (do_adjustment, reflow);
-
+
}
@@ -334,7 +334,7 @@ reflow_columns (EReflow *reflow)
}
reflow->column_count = column_count;
- reflow->columns = g_renew (int, reflow->columns, column_count);
+ reflow->columns = g_renew (int, reflow->columns, column_count);
column_count --;
for (; column_count > column_start; column_count--) {
@@ -714,7 +714,7 @@ e_reflow_set_property (GObject *object, guint prop_id, const GValue *value, GPar
item = GNOME_CANVAS_ITEM (object);
reflow = E_REFLOW (object);
-
+
switch (prop_id){
case PROP_HEIGHT:
reflow->height = g_value_get_double (value);
@@ -811,11 +811,11 @@ e_reflow_dispose (GObject *object)
if (reflow->do_adjustment_idle_id)
g_source_remove (reflow->do_adjustment_idle_id);
- reflow->do_adjustment_idle_id = 0;
+ reflow->do_adjustment_idle_id = 0;
disconnect_model (reflow);
disconnect_selection (reflow);
-
+
g_free(reflow->empty_message);
reflow->empty_message = NULL;
@@ -839,7 +839,7 @@ e_reflow_realize (GnomeCanvasItem *item)
if (GNOME_CANVAS_ITEM_CLASS(e_reflow_parent_class)->realize)
(* GNOME_CANVAS_ITEM_CLASS(e_reflow_parent_class)->realize) (item);
-
+
reflow->arrow_cursor = gdk_cursor_new (GDK_SB_H_DOUBLE_ARROW);
reflow->default_cursor = gdk_cursor_new (GDK_LEFT_PTR);
@@ -866,7 +866,7 @@ e_reflow_realize (GnomeCanvasItem *item)
adjustment->step_increment = (reflow->column_width + E_REFLOW_FULL_GUTTER) / 2;
adjustment->page_increment = adjustment->page_size - adjustment->step_increment;
gtk_adjustment_changed(adjustment);
-
+
if (!item->canvas->aa) {
}
}
@@ -880,7 +880,7 @@ e_reflow_unrealize (GnomeCanvasItem *item)
if (!item->canvas->aa) {
}
-
+
gdk_cursor_unref (reflow->arrow_cursor);
gdk_cursor_unref (reflow->default_cursor);
reflow->arrow_cursor = NULL;
@@ -901,7 +901,7 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
{
EReflow *reflow;
int return_val = FALSE;
-
+
reflow = E_REFLOW (item);
switch( event->type )
@@ -910,8 +910,8 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
return_val = e_selection_model_key_press(reflow->selection, (GdkEventKey *) event);
break;
#if 0
- if (event->key.keyval == GDK_Tab ||
- event->key.keyval == GDK_KP_Tab ||
+ if (event->key.keyval == GDK_Tab ||
+ event->key.keyval == GDK_KP_Tab ||
event->key.keyval == GDK_ISO_Left_Tab) {
int i;
int count;
@@ -934,7 +934,7 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
return FALSE;
i++;
}
-
+
unsorted = e_sorter_sorted_to_model (E_SORTER (reflow->sorter), i);
if (reflow->items[unsorted] == NULL) {
reflow->items[unsorted] = e_reflow_model_incarnate (reflow->model, unsorted, GNOME_CANVAS_GROUP (reflow));
@@ -951,7 +951,7 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
}
#endif
case GDK_BUTTON_PRESS:
- switch(event->button.button)
+ switch(event->button.button)
{
case 1:
{
@@ -971,12 +971,12 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
reflow->start_x = reflow->which_column_dragged * (reflow->column_width + E_REFLOW_FULL_GUTTER) - E_REFLOW_DIVIDER_WIDTH / 2;
reflow->temp_column_width = reflow->column_width;
reflow->column_drag = TRUE;
-
- gnome_canvas_item_grab (item,
+
+ gnome_canvas_item_grab (item,
GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK,
reflow->arrow_cursor,
button->time);
-
+
reflow->previous_temp_column_width = -1;
reflow->need_column_resize = TRUE;
gnome_canvas_item_request_update(item);
@@ -992,7 +992,7 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
gtk_adjustment_set_value(adjustment, new_value);
}
break;
- case 5:
+ case 5:
{
GtkAdjustment *adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas));
gdouble new_value = adjustment->value;
@@ -1061,12 +1061,12 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, reflow->arrow_cursor);
reflow->default_cursor_shown = FALSE;
}
- } else
+ } else
if ( ! reflow->default_cursor_shown ) {
gdk_window_set_cursor(GTK_WIDGET(item->canvas)->window, reflow->default_cursor);
reflow->default_cursor_shown = TRUE;
}
-
+
}
break;
case GDK_ENTER_NOTIFY:
@@ -1155,7 +1155,7 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
}
if (reflow->column_drag) {
int start_line = e_reflow_pick_line(reflow,
- gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas))->value);
+ gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas))->value);
i = x - start_line * (column_width + E_REFLOW_FULL_GUTTER);
running_width = start_line * (column_width + E_REFLOW_FULL_GUTTER);
column_width = reflow->temp_column_width;
@@ -1170,7 +1170,7 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
/* Compute first column to draw. */
i /= column_width + E_REFLOW_FULL_GUTTER;
running_width += i * (column_width + E_REFLOW_FULL_GUTTER);
-
+
for ( ; i < reflow->column_count; i++) {
if ( running_width > x + width )
break;
@@ -1181,7 +1181,7 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
x_rect - x,
y_rect - y,
width_rect - 1,
- height_rect - 1);
+ height_rect - 1);
running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH;
}
}
@@ -1197,7 +1197,7 @@ e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gin
if (GNOME_CANVAS_ITEM_CLASS(e_reflow_parent_class)->update)
GNOME_CANVAS_ITEM_CLASS(e_reflow_parent_class)->update (item, affine, clip_path, flags);
-
+
x0 = item->x1;
y0 = item->y1;
x1 = item->x2;
@@ -1228,11 +1228,11 @@ e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gin
} else if (reflow->need_column_resize) {
int x_rect, y_rect, width_rect, height_rect;
int start_line = e_reflow_pick_line(reflow,
- gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas))->value);
+ gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas))->value);
gdouble running_width;
int i;
double column_width;
-
+
if ( reflow->previous_temp_column_width != -1 ) {
running_width = start_line * (reflow->column_width + E_REFLOW_FULL_GUTTER);
column_width = reflow->previous_temp_column_width;
@@ -1241,14 +1241,14 @@ e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gin
y_rect = E_REFLOW_BORDER_WIDTH;
width_rect = E_REFLOW_DIVIDER_WIDTH;
height_rect = reflow->height - (E_REFLOW_BORDER_WIDTH * 2);
-
+
for ( i = 0; i < reflow->column_count; i++) {
x_rect = running_width;
gnome_canvas_request_redraw(item->canvas, x_rect, y_rect, x_rect + width_rect, y_rect + height_rect);
running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH;
}
}
-
+
if ( reflow->temp_column_width != -1 ) {
running_width = start_line * (reflow->column_width + E_REFLOW_FULL_GUTTER);
column_width = reflow->temp_column_width;
@@ -1257,14 +1257,14 @@ e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gin
y_rect = E_REFLOW_BORDER_WIDTH;
width_rect = E_REFLOW_DIVIDER_WIDTH;
height_rect = reflow->height - (E_REFLOW_BORDER_WIDTH * 2);
-
+
for ( i = 0; i < reflow->column_count; i++) {
x_rect = running_width;
gnome_canvas_request_redraw(item->canvas, x_rect, y_rect, x_rect + width_rect, y_rect + height_rect);
running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH;
}
}
-
+
reflow->previous_temp_column_width = reflow->temp_column_width;
reflow->need_column_resize = FALSE;
}
@@ -1283,7 +1283,7 @@ e_reflow_point (GnomeCanvasItem *item,
distance = GNOME_CANVAS_ITEM_CLASS(e_reflow_parent_class)->point (item, x, y, cx, cy, actual_item);
if ((int) (distance * item->canvas->pixels_per_unit + 0.5) <= item->canvas->close_enough && *actual_item)
return distance;
-
+
*actual_item = item;
return 0;
#if 0
@@ -1317,7 +1317,7 @@ e_reflow_reflow( GnomeCanvasItem *item, int flags )
if (reflow->need_reflow_columns) {
reflow_columns (reflow);
}
-
+
old_width = reflow->width;
running_width = E_REFLOW_BORDER_WIDTH;
@@ -1359,7 +1359,7 @@ e_reflow_selection_event_real (EReflow *reflow, GnomeCanvasItem *item, GdkEvent
case 2:
row = er_find_item (reflow, item);
if (event->button.button == 1) {
- reflow->maybe_did_something =
+ reflow->maybe_did_something =
e_selection_model_maybe_do_something(reflow->selection, row, 0, event->button.state);
reflow->maybe_in_drag = TRUE;
} else {
@@ -1409,7 +1409,7 @@ e_reflow_class_init (EReflowClass *klass)
object_class->set_property = e_reflow_set_property;
object_class->get_property = e_reflow_get_property;
object_class->dispose = e_reflow_dispose;
-
+
/* GnomeCanvasItem method overrides */
item_class->event = e_reflow_event;
item_class->realize = e_reflow_realize;
@@ -1530,13 +1530,13 @@ e_reflow_init (EReflow *reflow)
"sorter", reflow->sorter,
NULL);
- reflow->selection_changed_id =
+ reflow->selection_changed_id =
g_signal_connect(reflow->selection, "selection_changed",
G_CALLBACK (selection_changed), reflow);
- reflow->selection_row_changed_id =
+ reflow->selection_row_changed_id =
g_signal_connect(reflow->selection, "selection_row_changed",
G_CALLBACK (selection_row_changed), reflow);
- reflow->cursor_changed_id =
+ reflow->cursor_changed_id =
g_signal_connect(reflow->selection, "cursor_changed",
G_CALLBACK (cursor_changed), reflow);
diff --git a/widgets/misc/e-reflow.h b/widgets/misc/e-reflow.h
index 4e47fbf900..1a11ddbddc 100644
--- a/widgets/misc/e-reflow.h
+++ b/widgets/misc/e-reflow.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-reflow.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -60,7 +60,7 @@ typedef struct _EReflowClass EReflowClass;
struct _EReflow
{
GnomeCanvasGroup parent;
-
+
/* item specific fields */
EReflowModel *model;
guint model_changed_id;
@@ -132,7 +132,7 @@ struct _EReflowClass
void (*column_width_changed) (EReflow *reflow, double width);
};
-/*
+/*
* To be added to a reflow, an item must have the argument "width" as
* a Read/Write argument and "height" as a Read Only argument. It
* should also do an ECanvas parent reflow request if its size
diff --git a/widgets/misc/e-search-bar.c b/widgets/misc/e-search-bar.c
index e93a532ed8..a4da8b3f79 100644
--- a/widgets/misc/e-search-bar.c
+++ b/widgets/misc/e-search-bar.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-search-bar.c
*
* Copyright (C) 2000, 2001 Ximian, Inc.
@@ -130,12 +130,12 @@ verb_name_from_id (int id)
static void
clear_search (ESearchBar *esb)
{
- e_search_bar_set_text (esb, "");
+ e_search_bar_set_text (esb, "");
esb->block_search = TRUE;
if (esb->item_id < 0)
- e_search_bar_set_item_id (esb, esb->last_search_option);
+ e_search_bar_set_item_id (esb, esb->last_search_option);
e_search_bar_set_viewitem_id (esb, 0);
- esb->block_search = FALSE;
+ esb->block_search = FALSE;
emit_search_activated (esb);
}
@@ -218,10 +218,10 @@ search_now_verb_cb (BonoboUIComponent *ui_component,
} else {
gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, NULL);
- gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
+ gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, NULL);
}
-
+
emit_search_activated (esb);
}
@@ -238,7 +238,7 @@ clear_verb_cb (BonoboUIComponent *ui_component,
gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, NULL);
clear_search (esb);
- gtk_entry_set_text (GTK_ENTRY (esb->entry), "");
+ gtk_entry_set_text (GTK_ENTRY (esb->entry), "");
gtk_widget_grab_focus (esb->entry);
}
@@ -293,7 +293,7 @@ get_selected_item_label (GtkWidget *menu)
item = gtk_menu_get_active ((GtkMenu *)menu);
label = gtk_bin_get_child ((GtkBin *)item);
- if (GTK_IS_LABEL (label))
+ if (GTK_IS_LABEL (label))
text = gtk_label_get_text ((GtkLabel *)label);
return text;
@@ -312,7 +312,7 @@ entry_focus_in_cb (GtkWidget *widget,
if (gdk_color_equal (&(entry_style->text[GTK_STATE_NORMAL]), &(default_style->text[GTK_STATE_INSENSITIVE]))) {
gtk_entry_set_text (GTK_ENTRY (esb->entry), "");
gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
- }
+ }
return FALSE;
}
@@ -327,7 +327,7 @@ paint_search_text (GtkWidget *widget, ESearchBar *esb)
text = gtk_entry_get_text (GTK_ENTRY (widget));
if (text && *text)
return FALSE;
-
+
if (!GTK_WIDGET_SENSITIVE (esb->option_button)) {
menu_widget = esb->scopeoption_menu;
text = g_object_get_data (G_OBJECT(gtk_menu_get_active ( GTK_MENU (esb->scopeoption_menu))),"string");
@@ -335,8 +335,8 @@ paint_search_text (GtkWidget *widget, ESearchBar *esb)
return FALSE;
else /* no query in search entry .. so set the current option */
text = get_selected_item_label (menu_widget);
-
-
+
+
if (text && *text) {
gchar *t;
@@ -350,7 +350,7 @@ paint_search_text (GtkWidget *widget, ESearchBar *esb)
g_free (t);
gtk_widget_set_sensitive (esb->clear_button, FALSE);
}
-
+
return FALSE;
}
@@ -376,16 +376,16 @@ entry_activated_cb (GtkWidget *widget,
GtkStyle *style = gtk_widget_get_default_style ();
if (text && *text) {
- gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
+ gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, &(style->text[GTK_STATE_SELECTED]));
- gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
+ gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
gtk_widget_modify_base (esb->viewoption, GTK_STATE_NORMAL, &(style->base[GTK_STATE_SELECTED]));
} else {
gtk_widget_modify_base (esb->entry, GTK_STATE_NORMAL, NULL);
- gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
+ gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
gtk_widget_modify_base (esb->icon_entry, GTK_STATE_NORMAL, NULL);
}
-
+
emit_search_activated (esb);
}
@@ -398,11 +398,11 @@ entry_changed_cb (GtkWidget *widget,
entry_style = gtk_widget_get_style (esb->entry);
default_style = gtk_widget_get_default_style ();
-
+
if (text && *text)
- if (gdk_color_equal (&(entry_style->text[GTK_STATE_NORMAL]), &(default_style->text[GTK_STATE_INSENSITIVE])))
+ if (gdk_color_equal (&(entry_style->text[GTK_STATE_NORMAL]), &(default_style->text[GTK_STATE_INSENSITIVE])))
gtk_widget_set_sensitive (esb->clear_button, FALSE);
- else
+ else
gtk_widget_set_sensitive (esb->clear_button, TRUE);
else
gtk_widget_set_sensitive (esb->clear_button, FALSE);
@@ -426,7 +426,7 @@ viewitem_activated_cb(GtkWidget *widget, ESearchBar *esb)
if (gdk_color_equal (&(entry_style->text[GTK_STATE_NORMAL]), &(default_style->text[GTK_STATE_INSENSITIVE]))) {
gtk_entry_set_text (GTK_ENTRY (esb->entry), "");
gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
- }
+ }
esb->block_search = TRUE;
emit_search_activated (esb);
@@ -449,14 +449,14 @@ scopeitem_activated_cb(GtkWidget *widget, ESearchBar *esb)
/* If the text is grayed, Its not the query string */
if (gdk_color_equal (&(entry_style->text[GTK_STATE_NORMAL]), &(default_style->text[GTK_STATE_INSENSITIVE]))) {
- gtk_widget_grab_focus (esb->entry);
+ gtk_widget_grab_focus (esb->entry);
gtk_entry_set_text (GTK_ENTRY (esb->entry), "");
gtk_widget_modify_text (esb->entry, GTK_STATE_NORMAL, NULL);
- }
+ }
- esb->block_search = TRUE;
+ esb->block_search = TRUE;
emit_search_activated (esb);
- esb->block_search = FALSE;
+ esb->block_search = FALSE;
}
static void
@@ -465,7 +465,7 @@ option_activated_cb (GtkWidget *widget,
{
int id;
const char *text;
-
+
id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "EsbItemId"));
e_search_bar_set_item_id (esb, id);
@@ -477,7 +477,7 @@ option_activated_cb (GtkWidget *widget,
t = g_strdup_printf ("%s: %s\n%s", _("Search"), text, _("Click here to change the search type"));
else
t = g_strdup_printf ("%s: %s", _("Search"), _("Click here to change the search type"));
-
+
gtk_tooltips_set_tip (esb->tooltips, esb->option_button, t, "Search type");
g_free (t);
}
@@ -517,12 +517,12 @@ entry_key_press_cb (GtkWidget *widget,
GdkEventKey *key_event,
ESearchBar *esb)
{
- if (((key_event->state & gtk_accelerator_get_default_mod_mask ()) ==
+ if (((key_event->state & gtk_accelerator_get_default_mod_mask ()) ==
GDK_MOD1_MASK) && (key_event->keyval == GDK_Down)) {
option_button_clicked_cb (NULL, NULL, esb);
return TRUE;
}
-
+
return FALSE;
}
@@ -571,17 +571,17 @@ append_xml_menu_item (GString *xml,
const char *accelerator)
{
char *encoded_label;
-
+
encoded_label = bonobo_ui_util_encode_str (label);
g_string_append_printf (xml, "<menuitem name=\"%s\" verb=\"%s\" label=\"%s\"",
name, verb, encoded_label);
g_free (encoded_label);
-
+
if (accelerator != NULL)
g_string_append_printf (xml, " accel=\"%s\"", accelerator);
if (stock != NULL)
g_string_append_printf (xml, " pixtype=\"stock\" pixname=\"%s\"", stock);
-
+
g_string_append (xml, "/>");
}
@@ -590,7 +590,7 @@ remove_bonobo_menus (ESearchBar *esb)
{
if (bonobo_ui_component_get_container (esb->ui_component) == CORBA_OBJECT_NIL)
return;
-
+
bonobo_ui_component_rm (esb->ui_component, "/menu/SearchPlaceholder", NULL);
}
@@ -601,37 +601,37 @@ setup_bonobo_menus (ESearchBar *esb)
GSList *p;
char *verb_name;
char *encoded_title;
-
+
xml = g_string_new ("");
-
+
encoded_title = bonobo_ui_util_encode_str (_("_Search"));
g_string_append_printf (xml, "<submenu name=\"Search\" label=\"%s\">", encoded_title);
g_free (encoded_title);
-
+
g_string_append (xml, "<placeholder name=\"SearchBar\">");
-
+
append_xml_menu_item (xml, "FindNow", _("_Find Now"), "gtk-find", "ESearchBar:FindNow", NULL);
append_xml_menu_item (xml, "Clear", _("_Clear"), "gtk-clear", "ESearchBar:Clear", "*Control**Shift*q");
-
+
for (p = esb->menu_items; p != NULL; p = p->next) {
const ESearchBarItem *item;
-
+
item = (const ESearchBarItem *) p->data;
-
+
verb_name = verb_name_from_id (item->id);
bonobo_ui_component_add_verb (esb->ui_component, verb_name, search_verb_cb, esb);
-
+
if (item->text == NULL)
g_string_append (xml, "<separator/>");
else
append_xml_menu_item (xml, verb_name, item->text, NULL, verb_name, NULL);
-
+
g_free (verb_name);
}
-
+
g_string_append (xml, "</placeholder>");
g_string_append (xml, "</submenu>");
-
+
remove_bonobo_menus (esb);
bonobo_ui_component_set (esb->ui_component, "/menu/SearchPlaceholder", xml->str, NULL);
@@ -696,7 +696,7 @@ set_option (ESearchBar *esb, ESearchBarItem *items)
GSList *group = NULL;
int i;
- if (esb->option_menu)
+ if (esb->option_menu)
gtk_widget_destroy (esb->option_menu);
esb->option_menu = menu = gtk_menu_new ();
@@ -715,7 +715,7 @@ set_option (ESearchBar *esb, ESearchBarItem *items)
item = gtk_menu_item_new_with_label (str);
break;
case ESB_ITEMTYPE_CHECK:
- item = gtk_check_menu_item_new_with_label (str);
+ item = gtk_check_menu_item_new_with_label (str);
break;
case ESB_ITEMTYPE_RADIO:
item = gtk_radio_menu_item_new_with_label (group, str);
@@ -796,7 +796,7 @@ static void
impl_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
ESearchBar *esb = E_SEARCH_BAR(object);
-
+
switch (prop_id) {
case PROP_ITEM_ID:
e_search_bar_set_item_id (esb, g_value_get_int (value));
@@ -805,7 +805,7 @@ impl_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp
case PROP_TEXT:
e_search_bar_set_text (esb, g_value_get_string (value));
break;
-
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -816,7 +816,7 @@ static void
impl_dispose (GObject *object)
{
ESearchBar *esb = E_SEARCH_BAR (object);
-
+
g_return_if_fail (object != NULL);
g_return_if_fail (E_IS_SEARCH_BAR (object));
@@ -835,14 +835,14 @@ impl_dispose (GObject *object)
g_object_unref (esb->suboption);
esb->suboption = NULL;
}
-
+
if (esb->pending_activate) {
g_source_remove (esb->pending_activate);
esb->pending_activate = 0;
}
free_menu_items (esb);
-
+
if (G_OBJECT_CLASS (parent_class)->dispose)
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -852,15 +852,15 @@ static void
class_init (ESearchBarClass *klass)
{
GObjectClass *object_class;
-
+
object_class = G_OBJECT_CLASS (klass);
-
+
parent_class = g_type_class_ref (gtk_hbox_get_type ());
-
+
object_class->set_property = impl_set_property;
object_class->get_property = impl_get_property;
object_class->dispose = impl_dispose;
-
+
klass->set_menu = set_menu;
klass->set_option = set_option;
@@ -871,13 +871,13 @@ class_init (ESearchBarClass *klass)
0, 0, 0,
G_PARAM_READWRITE | G_PARAM_LAX_VALIDATION));
- g_object_class_install_property (object_class, PROP_TEXT,
+ g_object_class_install_property (object_class, PROP_TEXT,
g_param_spec_string ("text",
_("Text"),
/*_( */"XXX blurb" /*)*/,
NULL,
G_PARAM_READWRITE));
-
+
esb_signals [QUERY_CHANGED] =
g_signal_new ("query_changed",
G_OBJECT_CLASS_TYPE (object_class),
@@ -886,7 +886,7 @@ class_init (ESearchBarClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
+
esb_signals [MENU_ACTIVATED] =
g_signal_new ("menu_activated",
G_OBJECT_CLASS_TYPE (object_class),
@@ -912,7 +912,7 @@ class_init (ESearchBarClass *klass)
G_STRUCT_OFFSET (ESearchBarClass, search_cleared),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ G_TYPE_NONE, 0);
}
static void
@@ -924,7 +924,7 @@ init (ESearchBar *esb)
esb->option = NULL;
esb->entry = NULL;
esb->suboption = NULL;
-
+
esb->option_menu = NULL;
esb->suboption_menu = NULL;
esb->option_button = NULL;
@@ -1018,7 +1018,7 @@ e_search_bar_construct (ESearchBar *search_bar,
gtk_box_pack_start (GTK_BOX(search_bar), search_bar->viewoption_box, FALSE, FALSE, 0);
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX(search_bar), hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX(search_bar), hbox, FALSE, FALSE, 0);
/* Search entry */
hbox = gtk_hbox_new (FALSE, 0);
@@ -1049,7 +1049,7 @@ e_search_bar_construct (ESearchBar *search_bar,
gtk_box_pack_end (GTK_BOX(hbox), search_bar->scopeoption_box, FALSE, FALSE, 0);
gtk_widget_hide (search_bar->scopeoption_box);
-
+
gtk_box_pack_end (GTK_BOX(search_bar), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
@@ -1057,7 +1057,7 @@ e_search_bar_construct (ESearchBar *search_bar,
e_search_bar_set_menu (search_bar, menu_items);
e_search_bar_set_option (search_bar, option_items);
- /*
+ /*
* If the default choice for the option menu has subitems, then we need to
* activate the search immediately. However, the developer won't have
* connected to the activated signal until after the object is constructed,
@@ -1073,7 +1073,7 @@ e_search_bar_set_menu (ESearchBar *search_bar, ESearchBarItem *menu_items)
{
g_return_if_fail (search_bar != NULL);
g_return_if_fail (E_IS_SEARCH_BAR (search_bar));
-
+
((ESearchBarClass *) GTK_OBJECT_GET_CLASS (search_bar))->set_menu (search_bar, menu_items);
}
@@ -1082,7 +1082,7 @@ e_search_bar_add_menu (ESearchBar *search_bar, ESearchBarItem *menu_item)
{
g_return_if_fail (search_bar != NULL);
g_return_if_fail (E_IS_SEARCH_BAR (search_bar));
-
+
set_menu (search_bar, menu_item);
}
@@ -1092,7 +1092,7 @@ e_search_bar_set_option (ESearchBar *search_bar, ESearchBarItem *option_items)
g_return_if_fail (search_bar != NULL);
g_return_if_fail (E_IS_SEARCH_BAR (search_bar));
g_return_if_fail (option_items != NULL);
-
+
((ESearchBarClass *) GTK_OBJECT_GET_CLASS (search_bar))->set_option (search_bar, option_items);
}
@@ -1108,18 +1108,18 @@ e_search_bar_set_viewoption_menufunc (ESearchBar *search_bar, ESearchBarMenuFunc
* @option_id: Identifier of the main option menu item under which the subitems
* are to be set.
* @subitems: Array of subitem information.
- *
+ *
* Sets the items for the secondary option menu of a search bar.
**/
-void
+void
e_search_bar_set_viewoption_menu (ESearchBar *search_bar, GtkWidget *menu)
{
- if (search_bar->viewoption_menu != NULL)
+ if (search_bar->viewoption_menu != NULL)
gtk_option_menu_remove_menu (GTK_OPTION_MENU (search_bar->viewoption));
-
- search_bar->viewoption_menu = menu;
- gtk_option_menu_set_menu (GTK_OPTION_MENU (search_bar->viewoption), search_bar->viewoption_menu);
+
+ search_bar->viewoption_menu = menu;
+ gtk_option_menu_set_menu (GTK_OPTION_MENU (search_bar->viewoption), search_bar->viewoption_menu);
g_signal_connect (search_bar->viewoption_menu,
"selection-done",
@@ -1143,7 +1143,7 @@ e_search_bar_get_selected_viewitem (ESearchBar *search_bar)
* @option_id: Identifier of the main option menu item under which the subitems
* are to be set.
* @subitems: Array of subitem information.
- *
+ *
* Sets the items for the secondary option menu of a search bar.
**/
void
@@ -1195,7 +1195,7 @@ e_search_bar_set_viewoption (ESearchBar *search_bar, int option_id, ESearchBarIt
* @search_bar: A search bar.
* are to be set.
* @scopeitems: Array of scope information.
- *
+ *
* Sets the items for the search scope option menu of a search bar.
**/
void
@@ -1204,7 +1204,7 @@ e_search_bar_set_scopeoption (ESearchBar *search_bar, ESearchBarItem *scopeitems
GtkWidget *menu;
GtkWidget *menu_item;
gint i;
-
+
gtk_widget_show (search_bar->scopeoption_box);
if (search_bar->scopeoption_menu != NULL) {
gtk_option_menu_remove_menu (GTK_OPTION_MENU (search_bar->scopeoption));
@@ -1218,7 +1218,7 @@ e_search_bar_set_scopeoption (ESearchBar *search_bar, ESearchBarItem *scopeitems
char *str;
str = e_str_without_underscores (_(scopeitems[i].text));
menu_item = gtk_menu_item_new_with_label (str);
- g_object_set_data_full (G_OBJECT (menu_item), "string",str, g_free);
+ g_object_set_data_full (G_OBJECT (menu_item), "string",str, g_free);
} else {
menu_item = gtk_menu_item_new ();
gtk_widget_set_sensitive (menu_item, FALSE);
@@ -1241,19 +1241,19 @@ e_search_bar_set_scopeoption (ESearchBar *search_bar, ESearchBarItem *scopeitems
/**
* e_search_bar_set_scopeoption_menu:
* @search_bar: A search bar.
- * @menu: the scope option menu
+ * @menu: the scope option menu
*
* Sets the items for the secondary option menu of a search bar.
**/
-void
+void
e_search_bar_set_scopeoption_menu (ESearchBar *search_bar, GtkMenu *menu)
{
- if (search_bar->scopeoption_menu != NULL)
+ if (search_bar->scopeoption_menu != NULL)
gtk_option_menu_remove_menu (GTK_OPTION_MENU (search_bar->scopeoption));
-
- search_bar->scopeoption_menu = GTK_WIDGET (menu);
- gtk_option_menu_set_menu (GTK_OPTION_MENU (search_bar->scopeoption), search_bar->scopeoption_menu);
+
+ search_bar->scopeoption_menu = GTK_WIDGET (menu);
+ gtk_option_menu_set_menu (GTK_OPTION_MENU (search_bar->scopeoption), search_bar->scopeoption_menu);
g_signal_connect (search_bar->scopeoption_menu,
"selection-done",
@@ -1268,11 +1268,11 @@ e_search_bar_new (ESearchBarItem *menu_items,
GtkWidget *widget;
g_return_val_if_fail (option_items != NULL, NULL);
-
+
widget = g_object_new (e_search_bar_get_type (), NULL);
-
+
e_search_bar_construct (E_SEARCH_BAR (widget), menu_items, option_items);
-
+
return widget;
}
@@ -1340,9 +1340,9 @@ void
e_search_bar_set_viewitem_id (ESearchBar *search_bar, int id)
{
int row;
-
+
g_return_if_fail (E_IS_SEARCH_BAR (search_bar));
-
+
row = find_id (search_bar->viewoption_menu, id, "EsbItemId", NULL);
if (row == -1)
return;
@@ -1356,16 +1356,16 @@ e_search_bar_set_viewitem_id (ESearchBar *search_bar, int id)
* e_search_bar_set_item_id:
* @search_bar: A search bar.
* @id: Identifier of the item to set.
- *
+ *
* Sets the active item in the options menu of a search bar.
**/
void
e_search_bar_set_item_id (ESearchBar *search_bar, int id)
{
int row;
-
+
g_return_if_fail (E_IS_SEARCH_BAR (search_bar));
-
+
row = find_id (search_bar->option_menu, id, "EsbItemId", NULL);
if (row == -1)
return;
@@ -1387,11 +1387,11 @@ e_search_bar_set_item_menu (ESearchBar *search_bar, int id)
int row;
GtkWidget *item;
g_return_if_fail (E_IS_SEARCH_BAR (search_bar));
-
+
row = find_id (search_bar->option_menu, id, "EsbItemId", &item);
- if (row == -1)
+ if (row == -1)
return;
-
+
gtk_menu_set_active ((GtkMenu *)search_bar->option_menu, row);
if (id>=0)
gtk_check_menu_item_set_active ((GtkCheckMenuItem *)item, TRUE);
@@ -1401,20 +1401,20 @@ e_search_bar_set_item_menu (ESearchBar *search_bar, int id)
* e_search_bar_set_search_scope:
* @search_bar: A search bar.
* @id: Identifier of the item to set.
- *
+ *
* Sets the active item in the options menu of a search bar.
**/
void
e_search_bar_set_search_scope (ESearchBar *search_bar, int id)
{
int row;
-
+
g_return_if_fail (E_IS_SEARCH_BAR (search_bar));
-
+
row = find_id (search_bar->scopeoption_menu, id, "EsbItemId", NULL);
if (row == -1)
return;
-
+
search_bar->scopeitem_id = id;
gtk_option_menu_set_history (GTK_OPTION_MENU (search_bar->scopeoption), row);
@@ -1426,9 +1426,9 @@ e_search_bar_set_search_scope (ESearchBar *search_bar, int id)
/**
* e_search_bar_get_item_id:
* @search_bar: A search bar.
- *
+ *
* Queries the currently selected item in the options menu of a search bar.
- *
+ *
* Return value: Identifier of the selected item in the options menu.
**/
int
@@ -1439,7 +1439,7 @@ e_search_bar_get_item_id (ESearchBar *search_bar)
g_return_val_if_fail (search_bar != NULL, -1);
g_return_val_if_fail (E_IS_SEARCH_BAR (search_bar), -1);
-
+
menu_item = gtk_menu_get_active (GTK_MENU (search_bar->option_menu));
item_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu_item), "EsbItemId"));
search_bar->item_id = item_id;
@@ -1450,9 +1450,9 @@ e_search_bar_get_item_id (ESearchBar *search_bar)
/**
* e_search_bar_get_search_scope:
* @search_bar: A search bar.
- *
+ *
* Queries the currently selected search type in the options menu of a search bar.
- *
+ *
* Return value: Identifier of the selected item in the options menu.
**/
int
@@ -1475,9 +1475,9 @@ e_search_bar_get_search_scope (ESearchBar *search_bar)
/**
* e_search_bar_get_viewitem_id:
* @search_bar: A search bar.
- *
+ *
* Queries the currently selected item in the viewoptions menu of a search bar.
- *
+ *
* Return value: Identifier of the selected item in the viewoptions menu.
* If the search bar currently contains an entry rather than a a viewoption menu,
* a value less than zero is returned.
@@ -1490,7 +1490,7 @@ e_search_bar_get_viewitem_id (ESearchBar *search_bar)
g_return_val_if_fail (search_bar != NULL, -1);
g_return_val_if_fail (E_IS_SEARCH_BAR (search_bar), -1);
-
+
menu_item = gtk_menu_get_active (GTK_MENU (search_bar->viewoption_menu));
viewitem_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu_item), "EsbItemId"));
@@ -1504,7 +1504,7 @@ e_search_bar_get_viewitem_id (ESearchBar *search_bar)
* @search_bar: A search bar.
* @item_id: Identifier of the item to set.
* @subitem_id: Identifier of the subitem to set.
- *
+ *
* Sets the item and subitem ids for a search bar. This is intended to switch
* to an item that has subitems.
**/
@@ -1543,9 +1543,9 @@ e_search_bar_set_text (ESearchBar *search_bar, const char *text)
/**
* e_search_bar_get_text:
* @search_bar: A search bar.
- *
+ *
* Queries the text of the entry line in a search bar.
- *
+ *
* Return value: The text string that is in the entry line of the search bar.
* This must be freed using g_free(). If a suboption menu is active instead
* of an entry, NULL is returned.
diff --git a/widgets/misc/e-search-bar.h b/widgets/misc/e-search-bar.h
index 12f0129b4e..7c4144ce2f 100644
--- a/widgets/misc/e-search-bar.h
+++ b/widgets/misc/e-search-bar.h
@@ -69,12 +69,12 @@ struct _ESearchBar
BonoboUIComponent *ui_component;
GSList *menu_items;
-
+
/* item specific fields */
GtkWidget *option;
GtkWidget *entry;
GtkWidget *suboption; /* an option menu for the choices associated with some options */
-
+
/* PRIVATE */
GtkWidget *dropdown_holder; /* holds the dropdown */
GtkWidget *option_menu;
@@ -143,8 +143,8 @@ void e_search_bar_add_menu (ESearchBar *search_bar,
void e_search_bar_set_option (ESearchBar *search_bar,
ESearchBarItem *option_items);
void e_search_bar_paint (ESearchBar *search_bar);
-void e_search_bar_set_viewoption (ESearchBar *search_bar,
- int option_id,
+void e_search_bar_set_viewoption (ESearchBar *search_bar,
+ int option_id,
ESearchBarItem *subitems);
void e_search_bar_set_menu_sensitive (ESearchBar *search_bar,
diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c
index ffb3c8dc94..ed846e7711 100644
--- a/widgets/misc/e-selection-model-array.c
+++ b/widgets/misc/e-selection-model-array.c
@@ -70,7 +70,7 @@ e_selection_model_array_delete_rows(ESelectionModelArray *esma, int row, int cou
} else if (esma->cursor_row < 0) {
esma->cursor_row = -1;
}
- if (esma->cursor_row >= 0)
+ if (esma->cursor_row >= 0)
e_bit_array_change_one_row(esma->eba, esma->cursor_row, TRUE);
esma->selected_row = -1;
@@ -177,7 +177,7 @@ esma_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp
}
}
-/**
+/**
* e_selection_model_is_row_selected
* @selection: #ESelectionModel to check
* @n: The row to check
@@ -197,7 +197,7 @@ esma_is_row_selected (ESelectionModel *selection,
return FALSE;
}
-/**
+/**
* e_selection_model_foreach
* @selection: #ESelectionModel to traverse
* @callback: The callback function to call back.
@@ -206,7 +206,7 @@ esma_is_row_selected (ESelectionModel *selection,
* This routine calls the given callback function once for each
* selected row, passing closure as the closure.
*/
-static void
+static void
esma_foreach (ESelectionModel *selection,
EForeachFunc callback,
gpointer closure)
@@ -216,7 +216,7 @@ esma_foreach (ESelectionModel *selection,
e_bit_array_foreach(esma->eba, callback, closure);
}
-/**
+/**
* e_selection_model_clear
* @selection: #ESelectionModel to clear
*
@@ -241,7 +241,7 @@ esma_clear(ESelectionModel *selection)
#define PART(x,n) (((x) & (0x01010101 << n)) >> n)
#define SECTION(x, n) (((x) >> (n * 8)) & 0xff)
-/**
+/**
* e_selection_model_selected_count
* @selection: #ESelectionModel to count
*
@@ -259,7 +259,7 @@ esma_selected_count (ESelectionModel *selection)
return 0;
}
-/**
+/**
* e_selection_model_select_all
* @selection: #ESelectionModel to select all
*
@@ -284,7 +284,7 @@ esma_select_all (ESelectionModel *selection)
e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), 0, 0);
}
-/**
+/**
* e_selection_model_invert_selection
* @selection: #ESelectionModel to invert
*
@@ -299,7 +299,7 @@ esma_invert_selection (ESelectionModel *selection)
e_selection_model_array_confirm_row_count(esma);
e_bit_array_invert_selection(esma->eba);
-
+
esma->cursor_col = -1;
esma->cursor_row = -1;
esma->selection_start_row = 0;
@@ -376,7 +376,7 @@ esma_real_select_single_row (ESelectionModel *selection, int row)
ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
e_selection_model_array_confirm_row_count(esma);
-
+
e_bit_array_select_single_row(esma->eba, row);
esma->selection_start_row = row;
@@ -538,14 +538,14 @@ e_selection_model_array_class_init (ESelectionModelArrayClass *klass)
klass->get_row_count = NULL ;
- g_object_class_install_property (object_class, PROP_CURSOR_ROW,
+ g_object_class_install_property (object_class, PROP_CURSOR_ROW,
g_param_spec_int ("cursor_row",
_("Cursor Row"),
/*_( */"XXX blurb" /*)*/,
0, G_MAXINT, 0,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_CURSOR_COL,
+ g_object_class_install_property (object_class, PROP_CURSOR_COL,
g_param_spec_int ("cursor_col",
_("Cursor Column"),
/*_( */"XXX blurb" /*)*/,
diff --git a/widgets/misc/e-selection-model-array.h b/widgets/misc/e-selection-model-array.h
index 0635ce6715..e0fcb2221f 100644
--- a/widgets/misc/e-selection-model-array.h
+++ b/widgets/misc/e-selection-model-array.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-selection-model-array.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/misc/e-selection-model-simple.c b/widgets/misc/e-selection-model-simple.c
index c6d6288fa5..46b480b94c 100644
--- a/widgets/misc/e-selection-model-simple.c
+++ b/widgets/misc/e-selection-model-simple.c
@@ -48,7 +48,7 @@ e_selection_model_simple_class_init (ESelectionModelSimpleClass *klass)
G_DEFINE_TYPE (ESelectionModelSimple, e_selection_model_simple, e_selection_model_array_get_type())
-/**
+/**
* e_selection_model_simple_new
*
* This routine creates a new #ESelectionModelSimple.
diff --git a/widgets/misc/e-selection-model-simple.h b/widgets/misc/e-selection-model-simple.h
index 5b27dc9c0b..978289cab4 100644
--- a/widgets/misc/e-selection-model-simple.h
+++ b/widgets/misc/e-selection-model-simple.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-selection-model-simple.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c
index 786e0bd52b..230e3550a5 100644
--- a/widgets/misc/e-selection-model.c
+++ b/widgets/misc/e-selection-model.c
@@ -105,7 +105,7 @@ static void
esm_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
ESelectionModel *esm = E_SELECTION_MODEL (object);
-
+
switch (prop_id){
case PROP_SORTER:
drop_sorter(esm);
@@ -205,14 +205,14 @@ e_selection_model_class_init (ESelectionModelClass *klass)
klass->move_selection_end = NULL;
klass->set_selection_end = NULL;
- g_object_class_install_property (object_class, PROP_SORTER,
+ g_object_class_install_property (object_class, PROP_SORTER,
g_param_spec_object ("sorter",
_("Sorter"),
/*_( */"XXX blurb" /*)*/,
E_SORTER_TYPE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_SELECTION_MODE,
+ g_object_class_install_property (object_class, PROP_SELECTION_MODE,
g_param_spec_int ("selection_mode",
_("Selection Mode"),
/*_( */"XXX blurb" /*)*/,
@@ -220,7 +220,7 @@ e_selection_model_class_init (ESelectionModelClass *klass)
GTK_SELECTION_SINGLE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_CURSOR_MODE,
+ g_object_class_install_property (object_class, PROP_CURSOR_MODE,
g_param_spec_int ("cursor_mode",
_("Cursor Mode"),
/*_( */"XXX blurb" /*)*/,
@@ -229,7 +229,7 @@ e_selection_model_class_init (ESelectionModelClass *klass)
G_PARAM_READWRITE));
}
-/**
+/**
* e_selection_model_is_row_selected
* @selection: #ESelectionModel to check
* @n: The row to check
@@ -248,7 +248,7 @@ e_selection_model_is_row_selected (ESelectionModel *selection,
return FALSE;
}
-/**
+/**
* e_selection_model_foreach
* @selection: #ESelectionModel to traverse
* @callback: The callback function to call back.
@@ -257,7 +257,7 @@ e_selection_model_is_row_selected (ESelectionModel *selection,
* This routine calls the given callback function once for each
* selected row, passing closure as the closure.
*/
-void
+void
e_selection_model_foreach (ESelectionModel *selection,
EForeachFunc callback,
gpointer closure)
@@ -266,7 +266,7 @@ e_selection_model_foreach (ESelectionModel *selection,
E_SELECTION_MODEL_GET_CLASS(selection)->foreach (selection, callback, closure);
}
-/**
+/**
* e_selection_model_clear
* @selection: #ESelectionModel to clear
*
@@ -279,7 +279,7 @@ e_selection_model_clear(ESelectionModel *selection)
E_SELECTION_MODEL_GET_CLASS(selection)->clear (selection);
}
-/**
+/**
* e_selection_model_selected_count
* @selection: #ESelectionModel to count
*
@@ -296,7 +296,7 @@ e_selection_model_selected_count (ESelectionModel *selection)
return 0;
}
-/**
+/**
* e_selection_model_select_all
* @selection: #ESelectionModel to select all
*
@@ -310,7 +310,7 @@ e_selection_model_select_all (ESelectionModel *selection)
E_SELECTION_MODEL_GET_CLASS(selection)->select_all (selection);
}
-/**
+/**
* e_selection_model_invert_selection
* @selection: #ESelectionModel to invert
*
@@ -393,7 +393,7 @@ e_selection_model_set_selection_end (ESelectionModel *selection, int row)
E_SELECTION_MODEL_GET_CLASS(selection)->set_selection_end (selection, row);
}
-/**
+/**
* e_selection_model_do_something
* @selection: #ESelectionModel to do something to.
* @row: The row to do something in.
@@ -452,7 +452,7 @@ e_selection_model_do_something (ESelectionModel *selection,
}
}
-/**
+/**
* e_selection_model_maybe_do_something
* @selection: #ESelectionModel to do something to.
* @row: The row to do something in.
@@ -577,7 +577,7 @@ move_selection (ESelectionModel *selection,
return TRUE;
}
-/**
+/**
* e_selection_model_key_press
* @selection: #ESelectionModel to affect.
* @key: The event.
diff --git a/widgets/misc/e-selection-model.h b/widgets/misc/e-selection-model.h
index c8bca0d61f..e9b76723f2 100644
--- a/widgets/misc/e-selection-model.h
+++ b/widgets/misc/e-selection-model.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-selection-model.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/misc/e-send-options.c b/widgets/misc/e-send-options.c
index c4e407a9c3..cb84f1e5b0 100644
--- a/widgets/misc/e-send-options.c
+++ b/widgets/misc/e-send-options.c
@@ -59,7 +59,7 @@ struct _ESendOptionsDialogPrivate {
/* Security */
GtkWidget *security;
-
+
/* Widgets for Reply Requestion options */
GtkWidget *reply_request;
GtkWidget *reply_convenient;
@@ -86,7 +86,7 @@ struct _ESendOptionsDialogPrivate {
GtkWidget *when_declined;
GtkWidget *when_accepted;
GtkWidget *when_completed;
-
+
/* label widgets */
GtkWidget *security_label;
GtkWidget *priority_label;
@@ -94,7 +94,7 @@ struct _ESendOptionsDialogPrivate {
GtkWidget *sopts_label;
GtkWidget *opened_label;
GtkWidget *declined_label;
- GtkWidget *accepted_label;
+ GtkWidget *accepted_label;
GtkWidget *completed_label;
GtkWidget *until_label;
char *help_section;
@@ -120,40 +120,40 @@ e_send_options_get_widgets_data (ESendOptionsDialog *sod)
ESendOptionsDialogPrivate *priv;
ESendOptionsGeneral *gopts;
ESendOptionsStatusTracking *sopts;
-
+
priv = sod->priv;
gopts = sod->data->gopts;
sopts = sod->data->sopts;
-
+
gopts->priority = gtk_combo_box_get_active ((GtkComboBox *) priv->priority);
gopts->security = gtk_combo_box_get_active ((GtkComboBox *) priv->security);
-
+
gopts->reply_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->reply_request));
gopts->reply_convenient = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->reply_convenient));
gopts->reply_within = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (priv->within_days));
-
+
gopts->expiration_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->expiration));
gopts->expire_after = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (priv->expire_after));
gopts->delay_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->delay_delivery));
-
- if (e_date_edit_date_is_valid (E_DATE_EDIT (priv->delay_until)) &&
+
+ if (e_date_edit_date_is_valid (E_DATE_EDIT (priv->delay_until)) &&
e_date_edit_time_is_valid (E_DATE_EDIT(priv->delay_until)))
gopts->delay_until = e_date_edit_get_time (E_DATE_EDIT (priv->delay_until));
sopts->tracking_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->create_sent));
-
+
sopts->autodelete = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->autodelete));
-
+
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->delivered)))
sopts->track_when = E_DELIVERED;
else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->delivered_opened)))
sopts->track_when = E_DELIVERED_OPENED;
else
sopts->track_when = E_ALL;
-
+
sopts->opened = gtk_combo_box_get_active ((GtkComboBox *) priv->when_opened);
sopts->accepted = gtk_combo_box_get_active ((GtkComboBox *) priv->when_accepted);
- sopts->declined = gtk_combo_box_get_active ((GtkComboBox *) priv->when_declined);
+ sopts->declined = gtk_combo_box_get_active ((GtkComboBox *) priv->when_declined);
sopts->completed = gtk_combo_box_get_active ((GtkComboBox *) priv->when_completed);
}
@@ -162,56 +162,56 @@ e_send_options_fill_widgets_with_data (ESendOptionsDialog *sod)
{
ESendOptionsDialogPrivate *priv;
ESendOptionsGeneral *gopts;
- ESendOptionsStatusTracking *sopts;
+ ESendOptionsStatusTracking *sopts;
time_t tmp;
-
+
priv = sod->priv;
gopts = sod->data->gopts;
- sopts = sod->data->sopts;
+ sopts = sod->data->sopts;
tmp = time (NULL);
gtk_combo_box_set_active ((GtkComboBox *) priv->priority, gopts->priority);
gtk_combo_box_set_active ((GtkComboBox *) priv->security, gopts->security);
- if (gopts->reply_enabled)
+ if (gopts->reply_enabled)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->reply_request), TRUE);
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->reply_request), FALSE);
-
+
if (gopts->reply_convenient)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->reply_convenient), TRUE);
- else
+ else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->reply_within), TRUE);
-
+
gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->within_days), (gdouble) gopts->reply_within);
-
- if (gopts->expiration_enabled)
+
+ if (gopts->expiration_enabled)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->expiration), TRUE);
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->expiration), FALSE);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->expire_after), (gdouble) gopts->expire_after);
- if (gopts->delay_enabled)
+ if (gopts->delay_enabled)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->delay_delivery), TRUE);
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->delay_delivery), FALSE);
-
+
if (!gopts->delay_until || (!difftime (gopts->delay_until, tmp) < 0))
e_date_edit_set_time (E_DATE_EDIT (priv->delay_until), 0);
else
e_date_edit_set_time (E_DATE_EDIT (priv->delay_until), gopts->delay_until);
-
- if (sopts->tracking_enabled)
+
+ if (sopts->tracking_enabled)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->create_sent), TRUE);
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->create_sent), FALSE);
-
+
if (sopts->autodelete)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->autodelete), TRUE);
else
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->autodelete), FALSE);
-
+
switch (sopts->track_when) {
case E_DELIVERED:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->delivered), TRUE);
@@ -222,20 +222,20 @@ e_send_options_fill_widgets_with_data (ESendOptionsDialog *sod)
case E_ALL:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->all_info), TRUE);
}
-
+
gtk_combo_box_set_active ((GtkComboBox *) priv->when_opened, sopts->opened);
gtk_combo_box_set_active ((GtkComboBox *) priv->when_declined, sopts->declined);
gtk_combo_box_set_active ((GtkComboBox *) priv->when_accepted, sopts->accepted);
gtk_combo_box_set_active ((GtkComboBox *) priv->when_completed, sopts->completed);
-
+
}
-
-static void
+
+static void
sensitize_widgets (ESendOptionsDialog *sod)
{
ESendOptionsDialogPrivate *priv;
ESendOptionsGeneral *gopts;
- ESendOptionsStatusTracking *sopts;
+ ESendOptionsStatusTracking *sopts;
priv = sod->priv;
gopts = sod->data->gopts;
@@ -283,7 +283,7 @@ reply_request_toggled_cb (GtkWidget *toggle, gpointer data)
gboolean active;
ESendOptionsDialog *sod;
ESendOptionsDialogPrivate *priv;
-
+
sod = data;
priv = sod->priv;
active = GTK_TOGGLE_BUTTON (toggle)->active;
@@ -291,7 +291,7 @@ reply_request_toggled_cb (GtkWidget *toggle, gpointer data)
gtk_widget_set_sensitive (priv->reply_convenient, active);
gtk_widget_set_sensitive (priv->reply_within, active);
gtk_widget_set_sensitive (priv->within_days, active);
-
+
}
static void
@@ -300,7 +300,7 @@ delay_delivery_toggled_cb (GtkWidget *toggle, gpointer data)
gboolean active;
ESendOptionsDialog *sod;
ESendOptionsDialogPrivate *priv;
-
+
sod = data;
priv = sod->priv;
active = GTK_TOGGLE_BUTTON (toggle)->active;
@@ -335,14 +335,14 @@ delay_until_date_changed_cb (GtkWidget *dedit, gpointer data)
sod = data;
priv = sod->priv;
-
+
current = time (NULL);
tmp = e_date_edit_get_time (E_DATE_EDIT (priv->delay_until));
- if ((difftime (tmp, current) < 0) || !e_date_edit_time_is_valid (E_DATE_EDIT (priv->delay_until))
+ if ((difftime (tmp, current) < 0) || !e_date_edit_time_is_valid (E_DATE_EDIT (priv->delay_until))
|| !e_date_edit_date_is_valid (E_DATE_EDIT (priv->delay_until)))
e_date_edit_set_time (E_DATE_EDIT (priv->delay_until), 0);
-
+
}
static void
page_changed_cb (GtkNotebook *notebook, GtkNotebookPage *page, int num, gpointer data)
@@ -363,34 +363,34 @@ page_changed_cb (GtkNotebook *notebook, GtkNotebookPage *page, int num, gpointer
gtk_widget_hide (priv->completed_label);
gtk_widget_hide (priv->when_completed);
gtk_widget_set_sensitive (priv->autodelete, FALSE);
-
+
gtk_widget_show (priv->accepted_label);
gtk_widget_show (priv->when_accepted);
sod->data->sopts = sod->data->copts;
} else {
gtk_widget_set_sensitive (priv->autodelete, FALSE);
-
+
gtk_widget_show (priv->completed_label);
gtk_widget_show (priv->when_completed);
gtk_widget_show (priv->accepted_label);
gtk_widget_show (priv->when_accepted);
- sod->data->sopts = sod->data->topts;
+ sod->data->sopts = sod->data->topts;
}
}
e_send_options_fill_widgets_with_data (sod);
}
-
-
+
+
static void
init_widgets (ESendOptionsDialog *sod)
{
ESendOptionsDialogPrivate *priv;
-
- priv = sod->priv;
-
+
+ priv = sod->priv;
+
g_signal_connect (priv->expiration, "toggled", G_CALLBACK (expiration_toggled_cb), sod);
g_signal_connect (priv->reply_request, "toggled", G_CALLBACK (reply_request_toggled_cb), sod);
- g_signal_connect (priv->delay_delivery, "toggled", G_CALLBACK (delay_delivery_toggled_cb), sod);
+ g_signal_connect (priv->delay_delivery, "toggled", G_CALLBACK (delay_delivery_toggled_cb), sod);
g_signal_connect (priv->create_sent, "toggled", G_CALLBACK (sent_item_toggled_cb), sod);
g_signal_connect (GTK_DIALOG (priv->main), "response", G_CALLBACK(e_send_options_cb), sod);
@@ -401,7 +401,7 @@ init_widgets (ESendOptionsDialog *sod)
}
-
+
static gboolean
get_widgets (ESendOptionsDialog *sod)
{
@@ -446,7 +446,7 @@ get_widgets (ESendOptionsDialog *sod)
priv->declined_label = GW ("declined-label");
priv->accepted_label = GW ("accepted-label");
priv->completed_label = GW ("completed-label");
-
+
#undef GW
return (priv->priority
@@ -476,9 +476,9 @@ get_widgets (ESendOptionsDialog *sod)
&& priv->declined_label
&& priv->accepted_label
&& priv->completed_label);
-
+
}
-
+
static void
setup_widgets (ESendOptionsDialog *sod, Item_type type)
{
@@ -488,7 +488,7 @@ setup_widgets (ESendOptionsDialog *sod, Item_type type)
if (!priv->gopts_needed) {
gtk_notebook_set_show_tabs (priv->notebook, FALSE);
- gtk_notebook_set_current_page (priv->notebook, 1);
+ gtk_notebook_set_current_page (priv->notebook, 1);
gtk_widget_hide (priv->delay_until);
} else
gtk_notebook_set_show_tabs (priv->notebook, TRUE);
@@ -503,7 +503,7 @@ setup_widgets (ESendOptionsDialog *sod, Item_type type)
if (priv->global) {
GtkWidget *widget = gtk_label_new ("Calendar");
- gtk_label_set_text (GTK_LABEL (priv->sopts_label), "Mail");
+ gtk_label_set_text (GTK_LABEL (priv->sopts_label), "Mail");
gtk_notebook_append_page (priv->notebook, priv->status, widget);
gtk_widget_show (widget);
widget = gtk_label_new ("Task");
@@ -511,7 +511,7 @@ setup_widgets (ESendOptionsDialog *sod, Item_type type)
gtk_notebook_append_page (priv->notebook, priv->status,widget);
gtk_notebook_set_show_tabs (priv->notebook, TRUE);
}
-
+
switch (type) {
case E_ITEM_MAIL:
priv->help_section = g_strdup ("usage-mail");
@@ -541,11 +541,11 @@ e_sendoptions_dialog_new (void) {
ESendOptionsDialog *sod;
sod = g_object_new (E_TYPE_SENDOPTIONS_DIALOG, NULL);
-
+
return sod;
}
-void
+void
e_sendoptions_set_need_general_options (ESendOptionsDialog *sod, gboolean needed)
{
g_return_if_fail (E_IS_SENDOPTIONS_DIALOG (sod));
@@ -567,7 +567,7 @@ GtkWidget *
send_options_make_dateedit (void)
{
EDateEdit *dedit;
-
+
dedit = E_DATE_EDIT (e_date_edit_new ());
e_date_edit_set_show_date (dedit, TRUE);
@@ -590,7 +590,7 @@ static void e_send_options_cb (GtkDialog *dialog, gint state, gpointer func_data
{
ESendOptionsDialogPrivate *priv;
ESendOptionsDialog *sod;
- GError *error = NULL;
+ GError *error = NULL;
sod = func_data;
priv = sod->priv;
@@ -616,7 +616,7 @@ static void e_send_options_cb (GtkDialog *dialog, gint state, gpointer func_data
g_signal_emit (G_OBJECT (func_data), signals[SOD_RESPONSE], 0, state);
}
-gboolean
+gboolean
e_sendoptions_dialog_run (ESendOptionsDialog *sod, GtkWidget *parent, Item_type type)
{
ESendOptionsDialogPrivate *priv;
@@ -624,7 +624,7 @@ e_sendoptions_dialog_run (ESendOptionsDialog *sod, GtkWidget *parent, Item_type
gchar *filename;
g_return_val_if_fail (sod != NULL || E_IS_SENDOPTIONS_DIALOG (sod), FALSE);
-
+
priv = sod->priv;
filename = g_build_filename (EVOLUTION_GLADEDIR,
@@ -660,9 +660,9 @@ e_sendoptions_dialog_run (ESendOptionsDialog *sod, GtkWidget *parent, Item_type
sensitize_widgets (sod);
init_widgets (sod);
gtk_window_set_modal ((GtkWindow *)priv->main, TRUE);
-
+
gtk_widget_show (priv->main);
-
+
return TRUE;
}
@@ -691,17 +691,17 @@ e_sendoptions_dialog_finalize (GObject *object)
g_free (sod->data->mopts);
sod->data->mopts = NULL;
}
-
+
if (sod->data->copts) {
g_free (sod->data->copts);
sod->data->copts = NULL;
}
-
+
if (sod->data->topts) {
g_free (sod->data->topts);
sod->data->topts = NULL;
- }
-
+ }
+
if (sod->data) {
g_free (sod->data);
sod->data = NULL;
@@ -711,7 +711,7 @@ e_sendoptions_dialog_finalize (GObject *object)
g_free (sod->priv);
sod->priv = NULL;
}
-
+
if (parent_class->finalize)
(* parent_class->finalize) (object);
@@ -736,7 +736,7 @@ e_sendoptions_dialog_init (GObject *object)
ESendOptionsDialog *sod;
ESendOptionsDialogPrivate *priv;
ESendOptionsData *new;
-
+
sod = E_SENDOPTIONS_DIALOG (object);
new = g_new0 (ESendOptionsData, 1);
diff --git a/widgets/misc/e-send-options.h b/widgets/misc/e-send-options.h
index 4a46dae4d1..c096d4696c 100644
--- a/widgets/misc/e-send-options.h
+++ b/widgets/misc/e-send-options.h
@@ -101,7 +101,7 @@ typedef struct {
ESendOptionsStatusTracking *mopts;
ESendOptionsStatusTracking *copts;
ESendOptionsStatusTracking *topts;
-
+
} ESendOptionsData;
struct _ESendOptionsDialog {
@@ -123,4 +123,4 @@ void e_sendoptions_set_need_general_options (ESendOptionsDialog *sod, gboolean n
gboolean e_sendoptions_get_need_general_options (ESendOptionsDialog *sod);
gboolean e_sendoptions_dialog_run (ESendOptionsDialog *sod, GtkWidget *parent, Item_type type);
gboolean e_sendoptions_set_global (ESendOptionsDialog *sod, gboolean set);
-#endif
+#endif
diff --git a/widgets/misc/e-spinner.c b/widgets/misc/e-spinner.c
index bbd5d2e5f2..79ababe803 100644
--- a/widgets/misc/e-spinner.c
+++ b/widgets/misc/e-spinner.c
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright © 2000 Eazel, Inc.
* Copyright © 2002-2004 Marco Pesenti Gritti
* Copyright © 2004, 2006 Christian Persch
@@ -20,13 +20,13 @@
* Author: Andy Hertzfeld <andy@eazel.com>
*
* Ephy port by Marco Pesenti Gritti <marco@it.gnome.org>
- *
+ *
* $Id: e-spinner.c 12639 2006-12-12 17:06:55Z chpe $
*/
/*
* From Nautilus ephy-spinner.c
- */
+ */
#include "config.h"
@@ -259,7 +259,7 @@ e_spinner_images_load (GdkScreen *screen,
if (icon_info == NULL)
{
g_warning ("Throbber animation not found");
-
+
/* If the icon naming spec compliant name wasn't found, try the old name */
icon_info = gtk_icon_theme_lookup_icon (icon_theme,
SPINNER_FALLBACK_ICON_NAME,
@@ -463,7 +463,7 @@ e_spinner_cache_init (ESpinnerCache *cache)
static void
e_spinner_cache_finalize (GObject *object)
{
- ESpinnerCache *cache = E_SPINNER_CACHE (object);
+ ESpinnerCache *cache = E_SPINNER_CACHE (object);
ESpinnerCachePrivate *priv = cache->priv;
g_hash_table_destroy (priv->hash);
@@ -644,7 +644,7 @@ e_spinner_expose (GtkWidget *widget,
/* Otherwise |images| will be NULL anyway */
g_return_val_if_fail (images->n_animation_pixbufs > 0, FALSE);
-
+
g_return_val_if_fail (details->current_image >= 0 &&
details->current_image < images->n_animation_pixbufs, FALSE);
diff --git a/widgets/misc/e-spinner.h b/widgets/misc/e-spinner.h
index c3f4e9263a..e438b43aab 100644
--- a/widgets/misc/e-spinner.h
+++ b/widgets/misc/e-spinner.h
@@ -23,7 +23,7 @@
*/
/*
- * From Nautilus ephy-spinner.h
+ * From Nautilus ephy-spinner.h
*/
#ifndef E_SPINNER_H
#define E_SPINNER_H
diff --git a/widgets/misc/e-task-bar.c b/widgets/misc/e-task-bar.c
index eda370584c..075322dd97 100644
--- a/widgets/misc/e-task-bar.c
+++ b/widgets/misc/e-task-bar.c
@@ -93,7 +93,7 @@ static void
e_task_bar_init (ETaskBar *task_bar)
{
GtkWidget *label, *hbox;
-
+
task_bar->priv = g_new (ETaskBarPrivate, 1);
gtk_box_set_spacing (GTK_BOX (task_bar), 10);
@@ -101,7 +101,7 @@ e_task_bar_init (ETaskBar *task_bar)
label = gtk_label_new (NULL);
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
gtk_box_pack_start (GTK_BOX (task_bar), label, TRUE, TRUE, 0);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
task_bar->priv->message_label = label;
hbox = gtk_hbox_new (FALSE, 0);
@@ -208,7 +208,7 @@ e_task_bar_remove_task (ETaskBar *task_bar,
if (g_list_length (GTK_BOX (task_bar->priv->hbox)->children) == 0)
gtk_widget_hide (GTK_WIDGET (task_bar->priv->hbox));
}
-
+
ETaskWidget *
e_task_bar_get_task_widget (ETaskBar *task_bar,
int n)
diff --git a/widgets/misc/e-task-bar.h b/widgets/misc/e-task-bar.h
index 744b80272f..50301326d6 100644
--- a/widgets/misc/e-task-bar.h
+++ b/widgets/misc/e-task-bar.h
@@ -45,7 +45,7 @@ typedef struct _ETaskBarClass ETaskBarClass;
struct _ETaskBar {
GtkHBox parent;
-
+
ETaskBarPrivate *priv;
};
diff --git a/widgets/misc/e-task-widget.c b/widgets/misc/e-task-widget.c
index 0321587310..50d459d3f0 100644
--- a/widgets/misc/e-task-widget.c
+++ b/widgets/misc/e-task-widget.c
@@ -95,7 +95,7 @@ static void
e_task_widget_class_init (ETaskWidgetClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+
object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
}
@@ -149,7 +149,7 @@ e_task_widget_construct (ETaskWidget *task_widget,
gtk_widget_show (box);
gtk_widget_set_size_request (box, 1, -1);
-
+
/* FIXME: Experimenting Spinner widget instead of an image. REWORK THIS */
/* priv->icon_pixbuf = g_object_ref (icon_pixbuf); */
@@ -239,7 +239,7 @@ e_task_wiget_unalert (ETaskWidget *task_widget)
g_return_if_fail (task_widget != NULL);
g_return_if_fail (E_IS_TASK_WIDGET (task_widget));
}
-
+
const char *
e_task_widget_get_component_id (ETaskWidget *task_widget)
diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c
index cdbd715871..5aec40a125 100644
--- a/widgets/misc/e-unicode.c
+++ b/widgets/misc/e-unicode.c
@@ -321,7 +321,7 @@ e_utf8_to_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes)
ibl = bytes;
new = ob = g_new (char, ibl * 4 + 4);
obl = ibl * 4;
-
+
while (ibl > 0) {
e_iconv (ic, &ib, &ibl, &ob, &obl);
if (ibl > 0) {
@@ -337,16 +337,16 @@ e_utf8_to_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes)
ib += len;
ibl = bytes - (ib - string);
if (ibl > bytes) ibl = 0;
-
+
/* FIXME: this is wrong... what if the destination charset is 16 or 32 bit? */
*ob++ = '_';
obl--;
}
}
-
+
/* Make sure to terminate with plenty of padding */
memset (ob, 0, 4);
-
+
return new;
}
@@ -501,7 +501,7 @@ e_utf8_gtk_entry_set_text (GtkEntry *entry, const gchar *text)
else
gtk_entry_set_text (entry, text);
}
-
+
/*
* Translate \U+XXXX\ sequences to utf8 chars
*/
@@ -591,9 +591,9 @@ e_utf8_xml1_encode (const gchar *text)
* @outbuf: output buffer, must have at least 6 bytes of space.
* If %NULL, the length will be computed and returned
* and nothing will be written to @out.
- *
+ *
* Convert a single character to utf8
- *
+ *
* Return value: number of bytes written
**/
diff --git a/widgets/misc/e-url-entry.c b/widgets/misc/e-url-entry.c
index 59469cc6a0..1b921f07b0 100644
--- a/widgets/misc/e-url-entry.c
+++ b/widgets/misc/e-url-entry.c
@@ -83,7 +83,7 @@ class_init (EUrlEntryClass *klass)
widget_class = GTK_WIDGET_CLASS (klass);
parent_class = g_type_class_ref(gtk_hbox_get_type ());
-
+
object_class->destroy = destroy;
widget_class->mnemonic_activate = mnemonic_activate;
@@ -111,7 +111,7 @@ init (EUrlEntry *url_entry)
gtk_widget_show (priv->button);
gtk_widget_show (priv->entry);
-
+
g_signal_connect (priv->button, "clicked",
G_CALLBACK (button_clicked_cb), url_entry);
g_signal_connect (priv->entry, "changed",
@@ -122,7 +122,7 @@ static void
destroy (GtkObject *obj)
{
EUrlEntry *url_entry;
-
+
url_entry = E_URL_ENTRY (obj);
if (url_entry->priv) {
g_free (url_entry->priv);
@@ -158,12 +158,12 @@ GtkWidget *
e_url_entry_get_entry (EUrlEntry *url_entry)
{
EUrlEntryPrivate *priv;
-
+
g_return_val_if_fail (url_entry != NULL, NULL);
g_return_val_if_fail (E_IS_URL_ENTRY (url_entry), NULL);
priv = url_entry->priv;
-
+
return priv->entry;
}
@@ -185,10 +185,10 @@ entry_changed_cb (GtkEditable *editable, gpointer data)
EUrlEntry *url_entry;
EUrlEntryPrivate *priv;
const char *url;
-
+
url_entry = E_URL_ENTRY (data);
priv = url_entry->priv;
-
+
url = gtk_entry_get_text (GTK_ENTRY (priv->entry));
gtk_widget_set_sensitive (priv->button, url != NULL && *url != '\0');
}
diff --git a/widgets/misc/test-color.c b/widgets/misc/test-color.c
index 9117976a1a..6039e4b902 100644
--- a/widgets/misc/test-color.c
+++ b/widgets/misc/test-color.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* test-color.c
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/misc/test-dropdown-button.c b/widgets/misc/test-dropdown-button.c
index fef505d47a..80c6a37a14 100644
--- a/widgets/misc/test-dropdown-button.c
+++ b/widgets/misc/test-dropdown-button.c
@@ -19,7 +19,7 @@
*
* Authors:
* Ettore Perazzoli <ettore@ximian.com>
- * Damon Chaplin <damon@ximian.com>
+ * Damon Chaplin <damon@ximian.com>
*/
#ifdef HAVE_CONFIG_H
diff --git a/widgets/table/e-cell-checkbox.c b/widgets/table/e-cell-checkbox.c
index a8b251bbbb..b00b101afa 100644
--- a/widgets/table/e-cell-checkbox.c
+++ b/widgets/table/e-cell-checkbox.c
@@ -39,15 +39,15 @@ G_DEFINE_TYPE (ECellCheckbox, e_cell_checkbox, E_CELL_TOGGLE_TYPE)
static GdkPixbuf *checks [2];
static void
-ecc_print (ECellView *ecell_view, GtkPrintContext *context,
+ecc_print (ECellView *ecell_view, GtkPrintContext *context,
int model_col, int view_col, int row,
- double width, double height)
+ double width, double height)
{
cairo_t *cr = gtk_print_context_get_cairo_context (context);
const int value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
- cairo_save (cr);
-
+ cairo_save (cr);
+
if ( value == 1) {
cairo_set_line_width (cr, 2);
@@ -55,8 +55,8 @@ ecc_print (ECellView *ecell_view, GtkPrintContext *context,
cairo_line_to (cr, 7, 14);
cairo_line_to (cr, 11, 5);
cairo_stroke (cr);
- }
- cairo_restore (cr);
+ }
+ cairo_restore (cr);
}
static void
@@ -80,7 +80,7 @@ e_cell_checkbox_init (ECellCheckbox *eccb)
* Creates a new ECell renderer that can be used to render check
* boxes. the data provided from the model is cast to an integer.
* zero is used for the off display, and non-zero for checked status.
- *
+ *
* Returns: an ECell object that can be used to render checkboxes.
*/
ECell *
@@ -89,6 +89,6 @@ e_cell_checkbox_new (void)
ECellCheckbox *eccb = g_object_new (E_CELL_CHECKBOX_TYPE, NULL);
e_cell_toggle_construct (E_CELL_TOGGLE (eccb), 2, 2, checks);
-
+
return (ECell *) eccb;
}
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 764a2c2031..6a8992d119 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -140,7 +140,7 @@ e_cell_combo_init (ECellCombo *ecc)
gtk_window_set_policy (GTK_WINDOW (ecc->popup_window),
TRUE, TRUE, FALSE);
-
+
frame = gtk_frame_new (NULL);
gtk_container_add (GTK_CONTAINER (ecc->popup_window), frame);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
@@ -226,7 +226,7 @@ e_cell_combo_dispose (GObject *object)
void
-e_cell_combo_set_popdown_strings (ECellCombo *ecc,
+e_cell_combo_set_popdown_strings (ECellCombo *ecc,
GList *strings)
{
GList *elem;
@@ -278,7 +278,7 @@ e_cell_combo_do_popup (ECellPopup *ecp,
error_code = gdk_pointer_grab (ecc->popup_list->window, TRUE,
GDK_ENTER_NOTIFY_MASK |
- GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON1_MOTION_MASK,
@@ -388,11 +388,11 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
gint column_width, row_height, scrollbar_width;
double x1, y1;
double wx, wy;
-
+
/* This code is practically copied from GtkCombo. */
popup = GTK_SCROLLED_WINDOW (ecc->popup_scrolled_window);
popwin = GTK_BIN (ecc->popup_window);
-
+
gdk_window_get_origin (canvas->window, x, y);
x1 = e_table_header_col_diff (eti->header, 0, view_col + 1);
@@ -427,13 +427,13 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
the vertical scrollbar in case we need to show that. */
screen_width = gdk_screen_width ();
avail_width = screen_width - scrollbar_width;
-
+
gtk_widget_size_request (ecc->popup_list, &list_requisition);
- min_height = MIN (list_requisition.height,
+ min_height = MIN (list_requisition.height,
popup->vscrollbar->requisition.height);
if (!GTK_LIST (ecc->popup_list)->children)
list_requisition.height += E_CELL_COMBO_LIST_EMPTY_HEIGHT;
-
+
/* Calculate the desired width. */
*width = list_requisition.width
+ 2 * popwin->child->style->xthickness
@@ -587,7 +587,7 @@ e_cell_combo_button_release (GtkWidget *popup_window,
GtkWidget *event_widget;
event_widget = gtk_get_event_widget ((GdkEvent*) event);
-
+
/* See if the button was released in the list (or its children). */
while (event_widget && event_widget != ecc->popup_list)
event_widget = event_widget->parent;
diff --git a/widgets/table/e-cell-combo.h b/widgets/table/e-cell-combo.h
index ed8803f655..9be7f18c80 100644
--- a/widgets/table/e-cell-combo.h
+++ b/widgets/table/e-cell-combo.h
@@ -57,7 +57,7 @@ GType e_cell_combo_get_type (void);
ECell *e_cell_combo_new (void);
/* These must be UTF-8. */
-void e_cell_combo_set_popdown_strings (ECellCombo *ecc,
+void e_cell_combo_set_popdown_strings (ECellCombo *ecc,
GList *strings);
#endif /* _E_CELL_COMBO_H_ */
diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c
index 0d185310cc..eb8312b290 100644
--- a/widgets/table/e-cell-date.c
+++ b/widgets/table/e-cell-date.c
@@ -1,4 +1,4 @@
-/*
+/*
* e-cell-date.c - Date item for e-table.
* Copyright 2001, Ximian, Inc.
*
@@ -151,7 +151,7 @@ e_cell_date_init (ECellDate *ecd)
* rendered with strikeout, underline, or bolded. In the case of the
* "color_column" argument, the column in the model is expected to
* have a string that can be parsed by gdk_color_parse().
- *
+ *
* Returns: an ECell object that can be used to render dates.
*/
ECell *
@@ -160,7 +160,7 @@ e_cell_date_new (const char *fontname, GtkJustification justify)
ECellDate *ecd = g_object_new (E_CELL_DATE_TYPE, NULL);
e_cell_text_construct(E_CELL_TEXT(ecd), fontname, justify);
-
+
return (ECell *) ecd;
}
diff --git a/widgets/table/e-cell-date.h b/widgets/table/e-cell-date.h
index e6ca4964d5..a99f1ddd6d 100644
--- a/widgets/table/e-cell-date.h
+++ b/widgets/table/e-cell-date.h
@@ -1,4 +1,4 @@
-/*
+/*
* e-cell-date.h - Date item for e-table.
* Copyright 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-cell-float.c b/widgets/table/e-cell-float.c
index 1cd61efcbb..281000af23 100644
--- a/widgets/table/e-cell-float.c
+++ b/widgets/table/e-cell-float.c
@@ -40,9 +40,9 @@ static char *
ecf_get_text(ECellText *cell, ETableModel *model, int col, int row)
{
gfloat *fvalue;
-
+
fvalue = e_table_model_value_at (model, col, row);
-
+
return e_format_number_float (*fvalue);
}
@@ -76,7 +76,7 @@ e_cell_float_init (ECellFloat *cell_float)
* interpreted as being an int.
*
* See ECellText for other features.
- *
+ *
* Returns: an ECell object that can be used to render floats.
*/
ECell *
@@ -85,7 +85,7 @@ e_cell_float_new (const char *fontname, GtkJustification justify)
ECellFloat *ecn = g_object_new (E_CELL_FLOAT_TYPE, NULL);
e_cell_text_construct(E_CELL_TEXT(ecn), fontname, justify);
-
+
return (ECell *) ecn;
}
diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c
index 0dbee373cb..0f49d035c9 100644
--- a/widgets/table/e-cell-hbox.c
+++ b/widgets/table/e-cell-hbox.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cell-hbox.c - Hbox cell object.
* Copyright 2006 Novell, Inc.
*
@@ -55,13 +55,13 @@ ecv_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
ECellHbox *ecv = E_CELL_HBOX (ecell);
ECellHboxView *hbox_view = g_new0 (ECellHboxView, 1);
int i;
-
+
hbox_view->cell_view.ecell = ecell;
hbox_view->cell_view.e_table_model = table_model;
hbox_view->cell_view.e_table_item_view = e_table_item_view;
hbox_view->cell_view.kill_view_cb = NULL;
hbox_view->cell_view.kill_view_cb_data = NULL;
-
+
/* create our subcell view */
hbox_view->subcell_view_count = ecv->subcell_count;
hbox_view->subcell_views = g_new (ECellView *, hbox_view->subcell_view_count);
@@ -149,7 +149,7 @@ ecv_draw (ECellView *ecell_view, GdkDrawable *drawable,
int subcell_offset = 0;
int i;
int allotted_width = x2-x1;
-
+
for (i = 0; i < hbox_view->subcell_view_count; i++) {
/* Now cause our subcells to draw their contents,
shifted by subcell_offset pixels */
@@ -207,7 +207,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
* ECell::height method
*/
static int
-ecv_height (ECellView *ecell_view, int model_col, int view_col, int row)
+ecv_height (ECellView *ecell_view, int model_col, int view_col, int row)
{
ECellHboxView *hbox_view = (ECellHboxView *)ecell_view;
int height = 0, max_height = 0;
@@ -232,9 +232,9 @@ ecv_max_width (ECellView *ecell_view, int model_col, int view_col)
for (i = 0; i < hbox_view->subcell_view_count; i++) {
int cell_width = e_cell_max_width (hbox_view->subcell_views[i], hbox_view->model_cols[i], view_col);
-
+
if (cell_width < hbox_view->def_size_cols[i])
- cell_width = hbox_view->def_size_cols[i];
+ cell_width = hbox_view->def_size_cols[i];
width += cell_width;
}
@@ -291,10 +291,10 @@ e_cell_hbox_init (ECellHbox *ecv)
/**
* e_cell_hbox_new:
- *
+ *
* Creates a new ECell renderer that can be used to render multiple
* child cells.
- *
+ *
* Return value: an ECell object that can be used to render multiple
* child cells.
**/
@@ -314,7 +314,7 @@ e_cell_hbox_append (ECellHbox *hbox, ECell *subcell, int model_col, int size)
hbox->subcells = g_renew (ECell *, hbox->subcells, hbox->subcell_count);
hbox->model_cols = g_renew (int, hbox->model_cols, hbox->subcell_count);
hbox->def_size_cols = g_renew (int, hbox->def_size_cols, hbox->subcell_count);
-
+
hbox->subcells[hbox->subcell_count - 1] = subcell;
hbox->model_cols[hbox->subcell_count - 1] = model_col;
hbox->def_size_cols[hbox->subcell_count - 1] = size;
diff --git a/widgets/table/e-cell-hbox.h b/widgets/table/e-cell-hbox.h
index 448ed7c425..8965f2b1da 100644
--- a/widgets/table/e-cell-hbox.h
+++ b/widgets/table/e-cell-hbox.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cell-hbox.h - Hbox cell object.
* Copyright 2006, Novell, Inc.
*
@@ -54,7 +54,7 @@ typedef struct {
int subcell_view_count;
ECellView **subcell_views;
int *model_cols;
- int *def_size_cols;
+ int *def_size_cols;
} ECellHboxView;
typedef struct {
diff --git a/widgets/table/e-cell-number.c b/widgets/table/e-cell-number.c
index d87ffced8e..b4b7119c6b 100644
--- a/widgets/table/e-cell-number.c
+++ b/widgets/table/e-cell-number.c
@@ -1,4 +1,4 @@
-/*
+/*
* e-cell-number.c - Number item for e-table.
* Copyright 2001, Ximian, Inc.
*
@@ -68,7 +68,7 @@ e_cell_number_init (ECellNumber *cell_number)
* interpreted as being an int.
*
* See ECellText for other features.
- *
+ *
* Returns: an ECell object that can be used to render numbers.
*/
ECell *
@@ -77,7 +77,7 @@ e_cell_number_new (const char *fontname, GtkJustification justify)
ECellNumber *ecn = g_object_new (E_CELL_NUMBER_TYPE, NULL);
e_cell_text_construct(E_CELL_TEXT(ecn), fontname, justify);
-
+
return (ECell *) ecn;
}
diff --git a/widgets/table/e-cell-number.h b/widgets/table/e-cell-number.h
index 573f589108..ff9736f201 100644
--- a/widgets/table/e-cell-number.h
+++ b/widgets/table/e-cell-number.h
@@ -1,4 +1,4 @@
-/*
+/*
* e-cell-number.h - Number item for e-table.
* Copyright 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c
index 9963a2d361..36fd8a49b3 100644
--- a/widgets/table/e-cell-pixbuf.c
+++ b/widgets/table/e-cell-pixbuf.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cell-pixbuf.c - An ECell that displays a GdkPixbuf
* Copyright 2001, Ximian, Inc.
*
@@ -215,14 +215,14 @@ pixbuf_height (ECellView *ecell_view, int model_col, int view_col, int row)
* ECell::print method
*/
static void
-pixbuf_print (ECellView *ecell_view, GtkPrintContext *context,
+pixbuf_print (ECellView *ecell_view, GtkPrintContext *context,
int model_col, int view_col, int row,
double width, double height)
{
GdkPixbuf *pixbuf;
int scale;
cairo_t *cr = gtk_print_context_get_cairo_context (context);
-
+
pixbuf = (GdkPixbuf *) e_table_model_value_at (ecell_view->e_table_model, model_col, row);
if (pixbuf == NULL)
return;
@@ -231,12 +231,12 @@ pixbuf_print (ECellView *ecell_view, GtkPrintContext *context,
cairo_save (cr);
cairo_translate (cr, 0, (double)(height - scale) / (double)2);
gdk_cairo_set_source_pixbuf (cr, pixbuf, (double)scale, (double)scale);
- cairo_paint (cr);
+ cairo_paint (cr);
cairo_restore (cr);
}
static gdouble
-pixbuf_print_height (ECellView *ecell_view, GtkPrintContext *context,
+pixbuf_print_height (ECellView *ecell_view, GtkPrintContext *context,
int model_col, int view_col, int row,
double width)
{
@@ -249,11 +249,11 @@ pixbuf_print_height (ECellView *ecell_view, GtkPrintContext *context,
return 6;
}
}
-
+
pixbuf = (GdkPixbuf *) e_table_model_value_at (ecell_view->e_table_model, model_col, row);
if (!pixbuf)
return 0;
-
+
/* We give ourselves 3 pixels of padding on either side */
return gdk_pixbuf_get_height (pixbuf);
}
@@ -331,7 +331,7 @@ pixbuf_get_property (GObject *object,
ECellPixbuf *pixbuf;
pixbuf = E_CELL_PIXBUF (object);
-
+
switch (prop_id) {
case PROP_SELECTED_COLUMN:
g_value_set_int (value, pixbuf->selected_column);
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index c082c2416e..29eaafba4a 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -87,14 +87,14 @@ static void ecp_leave_edit (ECellView *ecv,
int row,
void *edit_context);
static void ecp_print (ECellView *ecv,
- GtkPrintContext *context,
+ GtkPrintContext *context,
int model_col,
int view_col,
int row,
double width,
double height);
static gdouble ecp_print_height (ECellView *ecv,
- GtkPrintContext *context,
+ GtkPrintContext *context,
int model_col,
int view_col,
int row,
@@ -102,7 +102,7 @@ static gdouble ecp_print_height (ECellView *ecv,
static int ecp_max_width (ECellView *ecv,
int model_col,
int view_col);
-static void ecp_show_tooltip (ECellView *ecv,
+static void ecp_show_tooltip (ECellView *ecv,
int model_col,
int view_col,
int row,
@@ -194,7 +194,7 @@ ecp_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
{
ECellPopup *ecp = E_CELL_POPUP (ecell);
ECellPopupView *ecp_view;
-
+
/* We must have a child ECell before we create any views. */
g_return_val_if_fail (ecp->child != NULL, NULL);
@@ -370,7 +370,7 @@ ecp_event (ECellView *ecv, GdkEvent *event, int model_col, int view_col,
* ECell::height method
*/
static int
-ecp_height (ECellView *ecv, int model_col, int view_col, int row)
+ecp_height (ECellView *ecv, int model_col, int view_col, int row)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -405,7 +405,7 @@ ecp_leave_edit (ECellView *ecv, int model_col, int view_col, int row,
static void
-ecp_print (ECellView *ecv, GtkPrintContext *context,
+ecp_print (ECellView *ecv, GtkPrintContext *context,
int model_col, int view_col, int row, double width, double height)
{
ECellPopupView *ecp_view = (ECellPopupView *) ecv;
@@ -416,7 +416,7 @@ ecp_print (ECellView *ecv, GtkPrintContext *context,
static gdouble
-ecp_print_height (ECellView *ecv, GtkPrintContext *context,
+ecp_print_height (ECellView *ecv, GtkPrintContext *context,
int model_col, int view_col, int row,
double width)
{
@@ -439,7 +439,7 @@ ecp_max_width (ECellView *ecv,
static void
-ecp_show_tooltip (ECellView *ecv,
+ecp_show_tooltip (ECellView *ecv,
int model_col,
int view_col,
int row,
@@ -454,7 +454,7 @@ ecp_show_tooltip (ECellView *ecv,
static char *
ecp_get_bg_color (ECellView *ecell_view, int row)
-{
+{
ECellPopupView *ecp_view = (ECellPopupView *) ecell_view;
return e_cell_get_bg_color (ecp_view->child_view, row);
diff --git a/widgets/table/e-cell-progress.c b/widgets/table/e-cell-progress.c
index d22978c09d..943cc769d2 100644
--- a/widgets/table/e-cell-progress.c
+++ b/widgets/table/e-cell-progress.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cell-progress.c - Progress display cell object.
* Copyright 1999-2002, Ximian, Inc.
* Copyright 2001, 2002, Krisztian Pifko <monsta@users.sourceforge.net>
@@ -64,14 +64,14 @@ eprog_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
ECellProgressView *progress_view = g_new0 (ECellProgressView, 1);
ETableItem *eti = E_TABLE_ITEM (e_table_item_view);
GnomeCanvas *canvas = GNOME_CANVAS_ITEM (eti)->canvas;
-
+
progress_view->cell_view.ecell = ecell;
progress_view->cell_view.e_table_model = table_model;
progress_view->cell_view.e_table_item_view = e_table_item_view;
progress_view->cell_view.kill_view_cb = NULL;
progress_view->cell_view.kill_view_cb_data = NULL;
progress_view->canvas = canvas;
-
+
return (ECellView *) progress_view;
}
@@ -87,7 +87,7 @@ eprog_kill_view (ECellView *ecell_view)
g_list_free(progress_view->cell_view.kill_view_cb_data);
g_free (ecell_view);
-}
+}
static void
eprog_realize (ECellView *ecell_view)
@@ -112,7 +112,7 @@ eprog_unrealize (ECellView *ecv)
static void
eprog_clear (ECellProgress *progress)
{
- memset(progress->buffer,0x00,progress->width*progress->height*4);
+ memset(progress->buffer,0x00,progress->width*progress->height*4);
}
static void
@@ -158,7 +158,7 @@ static void
eprog_draw_bar (ECellProgress *progress, guchar red, guchar green, guchar blue, gint value)
{
gint i, j, w;
-
+
w=value*(progress->width-2*(progress->padding+progress->border+1))/progress->max;
for (i=(progress->padding+progress->border+1)*4;i<(progress->padding+progress->border+1+w)*4;i+=4){
for (j=0;j<progress->height-2*(progress->padding+progress->border+1);j++){
@@ -180,10 +180,10 @@ eprog_draw (ECellView *ecell_view, GdkDrawable *drawable,
{
ECellProgress *progress = E_CELL_PROGRESS (ecell_view->ecell);
int x, y;
-
+
const int value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
-
+
if ((value > progress->max)||(value < progress->min)){
g_warning ("Value from the table model is %d, the states we support are [%d..%d]\n",
value, progress->min, progress->max);
@@ -257,7 +257,7 @@ eprog_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col
case GDK_BUTTON_PRESS:
if (!e_table_model_is_cell_editable(ecell_view->e_table_model, model_col, row))
return FALSE;
-
+
eprog_set_value (progress_view, model_col, view_col, row, value + 1);
return TRUE;
@@ -292,7 +292,7 @@ static void
eprog_dispose (GObject *object)
{
ECellProgress *eprog = E_CELL_PROGRESS (object);
-
+
g_object_unref (eprog->image);
g_free (eprog->image);
g_free (eprog->buffer);
@@ -371,7 +371,7 @@ e_cell_progress_construct (ECellProgress *eprog, int padding, int border, int mi
* Creates a new ECell renderer that can be used to render progress
* bars displaying the percentage of the current value between min
* and max.
- *
+ *
* Returns: an ECell object that can be used to render progress cells.
*/
ECell *
diff --git a/widgets/table/e-cell-progress.h b/widgets/table/e-cell-progress.h
index 9339038594..212d498f3b 100644
--- a/widgets/table/e-cell-progress.h
+++ b/widgets/table/e-cell-progress.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cell-progress.h - Progress display cell object.
* Copyright 1999-2002, Ximian, Inc.
* Copyright 2001, 2002, Krisztian Pifko <monsta@users.sourceforge.net>
diff --git a/widgets/table/e-cell-size.c b/widgets/table/e-cell-size.c
index 038ff9dc28..227592c4e3 100644
--- a/widgets/table/e-cell-size.c
+++ b/widgets/table/e-cell-size.c
@@ -37,7 +37,7 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row)
{
gint size = GPOINTER_TO_INT(e_table_model_value_at(model, col, row));
gfloat fsize;
-
+
if (size < 1024) {
return g_strdup_printf ("%d bytes", size);
} else {
@@ -94,7 +94,7 @@ e_cell_size_init (ECellSize *e_cell_size)
* rendered with strikeout, underline, or bolded. In the case of the
* "color_column" argument, the column in the model is expected to
* have a string that can be parsed by gdk_color_parse().
- *
+ *
* Returns: an ECell object that can be used to render file sizes. */
ECell *
e_cell_size_new (const char *fontname, GtkJustification justify)
@@ -102,7 +102,7 @@ e_cell_size_new (const char *fontname, GtkJustification justify)
ECellSize *ecd = g_object_new (E_CELL_SIZE_TYPE, NULL);
e_cell_text_construct(E_CELL_TEXT(ecd), fontname, justify);
-
+
return (ECell *) ecd;
}
diff --git a/widgets/table/e-cell-spin-button.c b/widgets/table/e-cell-spin-button.c
index 7f04af9358..ea7f294cfa 100644
--- a/widgets/table/e-cell-spin-button.c
+++ b/widgets/table/e-cell-spin-button.c
@@ -7,9 +7,9 @@
* Authors:
* Mikael Hallendal <micke@codefactory.se>
*
- * Celltype for drawing a spinbutton in a cell.
+ * Celltype for drawing a spinbutton in a cell.
*
- * Used ECellPopup by Damon Chaplin <damon@ximian.com> as base for
+ * Used ECellPopup by Damon Chaplin <damon@ximian.com> as base for
* buttondrawings.
*
* This library is free software; you can redistribute it and/or
@@ -54,24 +54,24 @@ static ECellView * ecsb_new_view (ECell *ecell,
static void ecsb_realize (ECellView *ecv);
static void ecsb_kill_view (ECellView *ecv);
static void ecsb_unrealize (ECellView *ecv);
-static void ecsb_draw (ECellView *ecv,
- GdkDrawable *drawable,
- int model_col,
- int view_col,
- int row,
- ECellFlags flags,
- int x1,
- int y1,
- int x2,
- int y2);
-
-static gint ecsb_event (ECellView *ecv,
- GdkEvent *event,
- int model_col,
- int view_col,
+static void ecsb_draw (ECellView *ecv,
+ GdkDrawable *drawable,
+ int model_col,
+ int view_col,
+ int row,
+ ECellFlags flags,
+ int x1,
+ int y1,
+ int x2,
+ int y2);
+
+static gint ecsb_event (ECellView *ecv,
+ GdkEvent *event,
+ int model_col,
+ int view_col,
int row,
- ECellFlags flags,
- ECellActions *actions);
+ ECellFlags flags,
+ ECellActions *actions);
static gint ecsb_height (ECellView *ecv,
int model_col,
@@ -79,14 +79,14 @@ static gint ecsb_height (ECellView *ecv,
int row);
static void * ecsb_enter_edit (ECellView *ecv,
- int model_col,
- int view_col,
+ int model_col,
+ int view_col,
int row);
static void ecsb_leave_edit (ECellView *ecv,
- int model_col,
- int view_col,
- int row,
+ int model_col,
+ int view_col,
+ int row,
void *context);
static void ecsb_focus (ECellView *ecell_view,
int model_col,
@@ -99,15 +99,15 @@ static void ecsb_focus (ECellView *ecell_view,
static void ecsb_unfocus (ECellView *ecell_view);
static void ecsb_show_tooltip (ECellView *ecv,
- int model_col,
- int view_col,
- int row,
- int col_width,
+ int model_col,
+ int view_col,
+ int row,
+ int col_width,
ETableTooltip *tooltip);
typedef struct {
ECellView cell_view;
-
+
ECellView *child_view;
} ECellSpinButtonView;
@@ -118,12 +118,12 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
-static void
+static void
e_cell_spin_button_class_init (ECellSpinButtonClass *klass)
{
ECellClass *ecc = E_CELL_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+
object_class->dispose = ecsb_dispose;
ecc->realize = ecsb_realize;
@@ -151,20 +151,20 @@ e_cell_spin_button_class_init (ECellSpinButtonClass *klass)
NULL, NULL,
e_util_marshal_NONE__POINTER_INT_INT_INT,
G_TYPE_NONE,
- 4, G_TYPE_POINTER, G_TYPE_INT,
+ 4, G_TYPE_POINTER, G_TYPE_INT,
G_TYPE_INT, G_TYPE_INT);
}
-static void
+static void
e_cell_spin_button_init (ECellSpinButton *ecsb)
{
g_return_if_fail (M_IS_CELL_SPIN_BUTTON (ecsb));
-
+
ecsb->up_pressed = FALSE;
ecsb->down_pressed = FALSE;
}
-static ECellView *
+static ECellView *
ecsb_new_view (ECell *ecell,
ETableModel *etm,
void *eti_view)
@@ -187,23 +187,23 @@ ecsb_new_view (ECell *ecell,
return (ECellView *) ecsb_view;
}
-static void
+static void
ecsb_realize (ECellView *ecv)
-{
+{
ECellSpinButtonView *ecsb_view;
-
+
g_return_if_fail (ecv != NULL);
ecsb_view = (ECellSpinButtonView *) ecv;
e_cell_realize (ecsb_view->child_view);
-}
+}
-static void
+static void
ecsb_kill_view (ECellView *ecv)
{
ECellSpinButtonView *ecsb_view;
-
+
g_return_if_fail (ecv != NULL);
ecsb_view = (ECellSpinButtonView *) ecv;
@@ -211,15 +211,15 @@ ecsb_kill_view (ECellView *ecv)
if (ecsb_view->child_view) {
e_cell_kill_view (ecsb_view->child_view);
}
-
+
g_free (ecsb_view);
}
-static void
+static void
ecsb_unrealize (ECellView *ecv)
-{
+{
ECellSpinButtonView *ecsb_view;
-
+
g_return_if_fail (ecv != NULL);
ecsb_view = (ECellSpinButtonView *) ecv;
@@ -227,16 +227,16 @@ ecsb_unrealize (ECellView *ecv)
e_cell_unrealize (ecsb_view->child_view);
}
-static void
-ecsb_draw (ECellView *ecv,
- GdkDrawable *drawable,
- int model_col,
- int view_col,
- int row,
- ECellFlags flags,
- int x1,
- int y1,
- int x2,
+static void
+ecsb_draw (ECellView *ecv,
+ GdkDrawable *drawable,
+ int model_col,
+ int view_col,
+ int row,
+ ECellFlags flags,
+ int x1,
+ int y1,
+ int x2,
int y2)
{
ECellSpinButton *ecsb;
@@ -245,38 +245,38 @@ ecsb_draw (ECellView *ecv,
GtkWidget *canvas;
GtkShadowType shadow = GTK_SHADOW_OUT;
GdkRectangle rect;
-
+
g_return_if_fail (ecv != NULL);
-
+
ecsb_view = (ECellSpinButtonView *) ecv;
ecsb = E_CELL_SPIN_BUTTON (ecsb_view->cell_view.ecell);
-
+
eti = E_TABLE_ITEM (ecsb_view->cell_view.e_table_item_view);
canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (eti)->canvas);
-
- if (eti->editing_col == view_col &&
+
+ if (eti->editing_col == view_col &&
eti->editing_row == row) {
/* Draw child (Whats shown under the buttons) */
- e_cell_draw (ecsb_view->child_view,
+ e_cell_draw (ecsb_view->child_view,
drawable, model_col, view_col,
- row, flags,
- x1, y1,
- x2 - E_CELL_SPIN_BUTTON_ARROW_WIDTH, y2);
+ row, flags,
+ x1, y1,
+ x2 - E_CELL_SPIN_BUTTON_ARROW_WIDTH, y2);
/* Draw down-arrow */
rect.x = x2 - E_CELL_SPIN_BUTTON_ARROW_WIDTH;
rect.y = y1 + (y2 - y1) / 2;
rect.width = E_CELL_SPIN_BUTTON_ARROW_WIDTH;
rect.height = (y2 - y1) / 2;
-
+
if (ecsb->down_pressed) {
shadow = GTK_SHADOW_IN;
} else {
shadow = GTK_SHADOW_OUT;
}
-
- gtk_paint_box (canvas->style, drawable,
+
+ gtk_paint_box (canvas->style, drawable,
GTK_STATE_NORMAL, shadow,
&rect, canvas, "ecellspinbutton_down",
rect.x, rect.y, rect.width, rect.height);
@@ -292,14 +292,14 @@ ecsb_draw (ECellView *ecv,
/* Draw up-arrow */
rect.y = y1;
-
+
if (ecsb->up_pressed) {
shadow = GTK_SHADOW_IN;
} else {
shadow = GTK_SHADOW_OUT;
}
- gtk_paint_box (canvas->style, drawable,
+ gtk_paint_box (canvas->style, drawable,
GTK_STATE_NORMAL, shadow,
&rect, canvas, "ecellspinbutton_up",
rect.x, rect.y, rect.width, rect.height);
@@ -314,34 +314,34 @@ ecsb_draw (ECellView *ecv,
rect.height);
} else {
/* Draw child */
- e_cell_draw (ecsb_view->child_view,
+ e_cell_draw (ecsb_view->child_view,
drawable, model_col, view_col,
- row, flags,
- x1, y1,
- x2, y2);
+ row, flags,
+ x1, y1,
+ x2, y2);
}
}
-static gint
-ecsb_event (ECellView *ecv,
- GdkEvent *event,
- int model_col,
- int view_col,
+static gint
+ecsb_event (ECellView *ecv,
+ GdkEvent *event,
+ int model_col,
+ int view_col,
int row,
- ECellFlags flags,
+ ECellFlags flags,
ECellActions *actions)
{
ECellSpinButton *ecsb;
ECellSpinButtonView *ecsb_view;
ETableItem *eti;
gint height, width;
-
+
g_return_val_if_fail (ecv != NULL, FALSE);
-
+
ecsb_view = (ECellSpinButtonView *) ecv;
ecsb = E_CELL_SPIN_BUTTON (ecsb_view->cell_view.ecell);
eti = E_TABLE_ITEM (ecsb_view->cell_view.e_table_item_view);
-
+
switch (event->type) {
case GDK_BUTTON_PRESS:
if (eti->editing_col == view_col &&
@@ -377,10 +377,10 @@ ecsb_event (ECellView *ecv,
row,
view_col,
row);
-
+
}
- }
-
+ }
+
break;
case GDK_BUTTON_RELEASE:
ecsb->up_pressed = FALSE;
@@ -401,29 +401,29 @@ ecsb_event (ECellView *ecv,
view_col, row, flags, actions);
}
-static gint
+static gint
ecsb_height (ECellView *ecv,
int model_col,
int view_col,
int row)
{
ECellSpinButtonView *ecsb_view;
-
+
g_return_val_if_fail (ecv != NULL, -1);
-
+
ecsb_view = (ECellSpinButtonView *) ecv;
return e_cell_height (ecsb_view->child_view, model_col, view_col, row);
}
-static void *
+static void *
ecsb_enter_edit (ECellView *ecv,
- int model_col,
- int view_col,
+ int model_col,
+ int view_col,
int row)
{
ECellSpinButtonView *ecsb_view;
-
+
g_return_val_if_fail (ecv != NULL, NULL);
ecsb_view = (ECellSpinButtonView *) ecv;
@@ -433,20 +433,20 @@ ecsb_enter_edit (ECellView *ecv,
}
-static void
+static void
ecsb_leave_edit (ECellView *ecv,
- int model_col,
- int view_col,
- int row,
+ int model_col,
+ int view_col,
+ int row,
void *context)
{
ECellSpinButtonView *ecsb_view;
-
+
g_return_if_fail (ecv != NULL);
-
+
ecsb_view = (ECellSpinButtonView *) ecv;
- e_cell_leave_edit (ecsb_view->child_view, model_col, view_col,
+ e_cell_leave_edit (ecsb_view->child_view, model_col, view_col,
row, context);
}
@@ -461,11 +461,11 @@ ecsb_focus (ECellView *ecell_view,
int y2)
{
ECellClass *klass;
-
+
klass = E_CELL_GET_CLASS (ecell_view->ecell);
if (klass->focus)
- klass->focus (ecell_view, model_col, view_col, row,
+ klass->focus (ecell_view, model_col, view_col, row,
x1, y1, x2, y2);
}
@@ -473,37 +473,37 @@ static void
ecsb_unfocus (ECellView *ecell_view)
{
ECellClass *klass;
-
+
klass = E_CELL_GET_CLASS (ecell_view->ecell);
if (klass->unfocus)
klass->unfocus (ecell_view);
}
-static void
+static void
ecsb_show_tooltip (ECellView *ecv,
- int model_col,
- int view_col,
- int row,
- int col_width,
+ int model_col,
+ int view_col,
+ int row,
+ int col_width,
ETableTooltip *tooltip)
{
ECellSpinButtonView *ecsb_view;
-
+
g_return_if_fail (ecv != NULL);
ecsb_view = (ECellSpinButtonView *) ecv;
-
- e_cell_show_tooltip (ecsb_view->child_view, model_col, view_col,
+
+ e_cell_show_tooltip (ecsb_view->child_view, model_col, view_col,
row, col_width, tooltip);
}
-static void
+static void
ecsb_dispose (GObject *object)
{
g_return_if_fail (object != NULL);
g_return_if_fail (M_IS_CELL_SPIN_BUTTON (object));
-
+
G_OBJECT_CLASS (e_cell_spin_button_parent_class)->dispose (object);
}
@@ -514,18 +514,18 @@ e_cell_spin_button_new (gint min,
ECell *child_cell)
{
ECellSpinButton *ecsb;
-
+
ecsb = g_object_new (E_CELL_SPIN_BUTTON_TYPE, NULL);
if (!child_cell) {
- child_cell = e_cell_number_new (NULL,
+ child_cell = e_cell_number_new (NULL,
GTK_JUSTIFY_LEFT);
-
+
g_signal_connect (ecsb, "step",
G_CALLBACK (e_cell_spin_button_step),
NULL);
}
-
+
ecsb->child = child_cell;
ecsb->min.i = min;
ecsb->max.i = max;
@@ -541,7 +541,7 @@ e_cell_spin_button_new_float (gfloat min,
ECell *child_cell)
{
ECellSpinButton *ecsb;
-
+
ecsb = g_object_new (E_CELL_SPIN_BUTTON_TYPE, NULL);
if (!child_cell) {
@@ -550,7 +550,7 @@ e_cell_spin_button_new_float (gfloat min,
G_CALLBACK (e_cell_spin_button_step_float),
NULL);
}
-
+
ecsb->child = child_cell;
ecsb->min.f = min;
ecsb->max.f = max;
@@ -566,30 +566,30 @@ e_cell_spin_button_step (ECellSpinButton *ecsb,
gint col,
gint row)
{
- ECellSpinButtonView *ecsb_view;
-
+ ECellSpinButtonView *ecsb_view;
+
ETableModel *etm;
gint value;
gint new_value;
gchar *str_value;
-
+
g_return_if_fail (ecsb != NULL);
g_return_if_fail (M_IS_CELL_SPIN_BUTTON (ecsb));
g_return_if_fail (ecv != NULL);
-
- ecsb_view = (ECellSpinButtonView *) ecv;
+
+ ecsb_view = (ECellSpinButtonView *) ecv;
etm = ecsb_view->cell_view.e_table_model;
-
+
value = GPOINTER_TO_INT (e_table_model_value_at (etm, col, row));
new_value = value;
-
+
switch (direction) {
case STEP_UP:
- new_value = CLAMP (value + ecsb->step.i,
+ new_value = CLAMP (value + ecsb->step.i,
ecsb->min.i, ecsb->max.i);
break;
case STEP_DOWN:
- new_value = CLAMP (value - ecsb->step.i,
+ new_value = CLAMP (value - ecsb->step.i,
ecsb->min.i, ecsb->max.i);
break;
default:
@@ -610,40 +610,40 @@ e_cell_spin_button_step_float (ECellSpinButton *ecsb,
gint col,
gint row)
{
- ECellSpinButtonView *ecsb_view;
-
+ ECellSpinButtonView *ecsb_view;
+
ETableModel *etm;
gfloat value;
gfloat new_value;
gchar *str_value;
-
+
g_return_if_fail (ecsb != NULL);
g_return_if_fail (M_IS_CELL_SPIN_BUTTON (ecsb));
g_return_if_fail (ecv != NULL);
-
- ecsb_view = (ECellSpinButtonView *) ecv;
+
+ ecsb_view = (ECellSpinButtonView *) ecv;
etm = ecsb_view->cell_view.e_table_model;
-
+
value = *(gfloat *) e_table_model_value_at (etm, col, row);
switch (direction) {
case STEP_UP:
- new_value = CLAMP (value + ecsb->step.f,
+ new_value = CLAMP (value + ecsb->step.f,
ecsb->min.f, ecsb->max.f);
break;
case STEP_DOWN:
- new_value = CLAMP (value - ecsb->step.f,
+ new_value = CLAMP (value - ecsb->step.f,
ecsb->min.f, ecsb->max.f);
break;
default:
new_value = value;
break;
};
-
+
str_value = g_strdup_printf ("%f", new_value);
e_table_model_set_value_at (etm, col, row, str_value);
-
+
g_free (str_value);
}
diff --git a/widgets/table/e-cell-spin-button.h b/widgets/table/e-cell-spin-button.h
index 9294857074..6bbd79bc99 100644
--- a/widgets/table/e-cell-spin-button.h
+++ b/widgets/table/e-cell-spin-button.h
@@ -7,9 +7,9 @@
* Authors:
* Mikael Hallendal <micke@codefactory.se>
*
- * Celltype for drawing a spinbutton in a cell.
+ * Celltype for drawing a spinbutton in a cell.
*
- * Used ECellPopup by Damon Chaplin <damon@ximian.com> as base for
+ * Used ECellPopup by Damon Chaplin <damon@ximian.com> as base for
* buttondrawings.
*
* This library is free software; you can redistribute it and/or
@@ -58,7 +58,7 @@ typedef struct {
ECellSpinButtonData min;
ECellSpinButtonData max;
ECellSpinButtonData step;
-
+
gboolean up_pressed;
gboolean down_pressed;
@@ -66,7 +66,7 @@ typedef struct {
typedef struct {
ECellClass parent_class;
-
+
/* Functions */
void (*step) (ECellSpinButton *mcsb,
ECellView *ecv,
@@ -82,9 +82,9 @@ ECell * e_cell_spin_button_new (gint min,
ECell *child_cell);
ECell * e_cell_spin_button_new_float (gfloat min,
- gfloat max,
+ gfloat max,
gfloat step,
- ECell *child_cell);
+ ECell *child_cell);
void e_cell_spin_button_step (ECellSpinButton *mcsb,
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 9c548b620f..5a55a51982 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -120,7 +120,7 @@ typedef struct {
int max_width;
int ref_count;
} ECellTextLineBreaks;
-
+
typedef struct _CellEdit CellEdit;
@@ -129,7 +129,7 @@ typedef struct {
GdkGC *gc;
GdkCursor *i_cursor;
GdkBitmap *stipple; /* Stipple for text */
-
+
GnomeCanvas *canvas;
/*
@@ -288,7 +288,7 @@ ect_stop_editing (ECellTextView *text_view, gboolean commit)
row = edit->row;
view_col = edit->view_col;
model_col = edit->model_col;
-
+
old_text = edit->old_text;
text = edit->text;
if (edit->tep)
@@ -306,7 +306,7 @@ ect_stop_editing (ECellTextView *text_view, gboolean commit)
g_timer_destroy (edit->timer);
edit->timer = NULL;
}
-
+
g_signal_handlers_disconnect_matched (
edit->im_context,
G_SIGNAL_MATCH_DATA, 0, 0,
@@ -354,20 +354,20 @@ ect_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
{
ECellTextView *text_view = g_new0 (ECellTextView, 1);
GnomeCanvas *canvas = GNOME_CANVAS_ITEM (e_table_item_view)->canvas;
-
+
text_view->cell_view.ecell = ecell;
text_view->cell_view.e_table_model = table_model;
text_view->cell_view.e_table_item_view = e_table_item_view;
text_view->cell_view.kill_view_cb = NULL;
text_view->cell_view.kill_view_cb_data = NULL;
-
+
text_view->canvas = canvas;
text_view->xofs = 0.0;
text_view->yofs = 0.0;
-
+
return (ECellView *)text_view;
}
@@ -395,11 +395,11 @@ static void
ect_realize (ECellView *ecell_view)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
-
+
text_view->gc = gdk_gc_new (GTK_WIDGET (text_view->canvas)->window);
text_view->i_cursor = gdk_cursor_new (GDK_XTERM);
-
+
if (E_CELL_CLASS (e_cell_text_parent_class)->realize)
(* E_CELL_CLASS (e_cell_text_parent_class)->realize) (ecell_view);
}
@@ -456,7 +456,7 @@ ect_free_color (gchar *color_spec, GdkColor *color, GdkColormap *colormap)
static PangoAttrList*
-build_attr_list (ECellTextView *text_view, int row, int text_length)
+build_attr_list (ECellTextView *text_view, int row, int text_length)
{
ECellView *ecell_view = (ECellView *) text_view;
@@ -512,7 +512,7 @@ layout_with_preedit (ECellTextView *text_view, int row, const char *text, gint w
gint preedit_length = 0;
gint text_length = strlen (text);
gint mlen = MIN(edit->selection_start,text_length);
-
+
gtk_im_context_get_preedit_string (edit->im_context,
&preedit_string,&preedit_attrs,
@@ -521,10 +521,10 @@ layout_with_preedit (ECellTextView *text_view, int row, const char *text, gint w
layout = edit->layout;
- g_string_prepend_len (tmp_string, text,text_length);
+ g_string_prepend_len (tmp_string, text,text_length);
if (preedit_length) {
-
+
/* mlen is the text_length in bytes, not chars
* check whether we are not inserting into
* the middle of a utf8 character
@@ -541,7 +541,7 @@ layout_with_preedit (ECellTextView *text_view, int row, const char *text, gint w
}
g_string_insert (tmp_string, mlen, preedit_string);
- }
+ }
pango_layout_set_text (layout, tmp_string->str, tmp_string->len);
@@ -594,13 +594,13 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width)
PangoFontDescription *desc = NULL, *fixed_desc = NULL;
char *fixed_family = NULL;
gint fixed_size = 0;
-
+
fixed_desc = pango_font_description_from_string (ect->font_name);
if (fixed_desc) {
fixed_family = (char *)pango_font_description_get_family (fixed_desc);
fixed_size = pango_font_description_get_size (fixed_desc);
- }
-
+ }
+
desc = pango_font_description_copy (gtk_widget_get_style (GTK_WIDGET (((GnomeCanvasItem *)ecell_view->e_table_item_view)->canvas))->font_desc);
pango_font_description_set_family (desc, fixed_family);
pango_font_description_set_size (desc, fixed_size);
@@ -609,7 +609,7 @@ build_layout (ECellTextView *text_view, int row, const char *text, gint width)
pango_font_description_free (desc);
pango_font_description_free (fixed_desc);
}
-
+
pango_layout_set_width (layout, width * PANGO_SCALE);
pango_layout_set_wrap (layout, PANGO_WRAP_CHAR);
@@ -780,7 +780,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
if (edit && edit->view_col == view_col && edit->row == row) {
layout = layout_with_preedit (text_view, row, edit->text ? edit->text : "?", x2 - x1);
- }
+ }
gdk_draw_layout (drawable, text_view->gc,
x_origin, y_origin,
@@ -836,7 +836,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
gdk_region_destroy (rect_region);
gdk_gc_set_clip_region (text_gc, clip_region);
- gdk_draw_layout (drawable, text_gc,
+ gdk_draw_layout (drawable, text_gc,
x_origin, y_origin,
layout);
gdk_gc_set_clip_region (text_gc, NULL);
@@ -848,7 +848,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
if (edit->show_cursor) {
PangoRectangle strong_pos, weak_pos;
pango_layout_get_cursor_pos (layout, edit->selection_start + edit->preedit_length, &strong_pos, &weak_pos);
-
+
draw_pango_rectangle (drawable, text_view->gc, x_origin, y_origin, strong_pos);
if (strong_pos.x != weak_pos.x ||
strong_pos.y != weak_pos.y ||
@@ -889,7 +889,7 @@ static void
ect_edit_select_all (ECellTextView *text_view)
{
g_return_if_fail (text_view->edit);
-
+
text_view->edit->selection_start = 0;
text_view->edit->selection_end = strlen (text_view->edit->text);
}
@@ -920,7 +920,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
if (!(flags & E_CELL_EDITING))
return 0;
-
+
if ( edit && !edit->preedit_length && flags & E_CELL_PREEDIT)
return 1;
@@ -934,31 +934,31 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
break;
case GDK_KEY_PRESS: /* Fall Through */
if (edit_display) {
- if (edit->im_context &&
+ if (edit->im_context &&
!edit->im_context_signals_registered) {
- g_signal_connect (edit->im_context,
+ g_signal_connect (edit->im_context,
"preedit_changed",
G_CALLBACK (\
e_cell_text_preedit_changed_cb),
text_view);
- g_signal_connect (edit->im_context,
+ g_signal_connect (edit->im_context,
"commit",
G_CALLBACK (\
- e_cell_text_commit_cb),
+ e_cell_text_commit_cb),
text_view);
- g_signal_connect (edit->im_context,
+ g_signal_connect (edit->im_context,
"retrieve_surrounding",
G_CALLBACK (\
- e_cell_text_retrieve_surrounding_cb),
+ e_cell_text_retrieve_surrounding_cb),
text_view);
- g_signal_connect (edit->im_context,
+ g_signal_connect (edit->im_context,
"delete_surrounding",
G_CALLBACK (\
- e_cell_text_delete_surrounding_cb),
+ e_cell_text_delete_surrounding_cb),
text_view);
edit->im_context_signals_registered = TRUE;
@@ -969,8 +969,8 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
} else {
if (edit && edit->im_context) {
g_signal_handlers_disconnect_matched (
- edit->im_context,
- G_SIGNAL_MATCH_DATA, 0, 0,
+ edit->im_context,
+ G_SIGNAL_MATCH_DATA, 0, 0,
NULL, NULL, edit);
edit->im_context_signals_registered = FALSE;
}
@@ -992,7 +992,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
else
return 1;
}
-
+
if (event->key.keyval == GDK_Escape){
/* if not changed, then pass this even to parent */
return_val = text_view->edit != NULL && text_view->edit->text && text_view->edit->old_text && 0 != strcmp (text_view->edit->text, text_view->edit->old_text);
@@ -1007,7 +1007,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
ect_edit_select_all (text_view);
edit = text_view->edit;
edit_display = TRUE;
- }
+ }
if (edit_display) {
GdkEventKey key = event->key;
if (key.type == GDK_KEY_PRESS &&
@@ -1033,7 +1033,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
#endif
_get_tep (edit);
return_val = e_text_event_processor_handle_event (edit->tep, &e_tep_event);
- if (e_tep_event.key.string)
+ if (e_tep_event.key.string)
g_free (e_tep_event.key.string);
break;
}
@@ -1046,7 +1046,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
d(g_print ("%s: %s\n", __FUNCTION__, press ? "GDK_BUTTON_PRESS" : "GDK_BUTTON_RELEASE"));
event->button.x -= 4;
event->button.y -= 1;
- if ((!edit_display)
+ if ((!edit_display)
&& e_table_model_is_cell_editable (ecell_view->e_table_model, model_col, row)
&& event->type == GDK_BUTTON_RELEASE
&& event->button.button == 1) {
@@ -1055,7 +1055,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
e_table_item_enter_edit (text_view->cell_view.e_table_item_view, view_col, row);
edit = text_view->edit;
edit_display = TRUE;
-
+
e_tep_event.button.type = GDK_BUTTON_PRESS;
e_tep_event.button.time = button.time;
e_tep_event.button.state = button.state;
@@ -1151,7 +1151,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
* ECell::height method
*/
static int
-ect_height (ECellView *ecell_view, int model_col, int view_col, int row)
+ect_height (ECellView *ecell_view, int model_col, int view_col, int row)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
gint height;
@@ -1193,10 +1193,10 @@ ect_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
view_col)->width - 8;
edit->layout = generate_layout (text_view, model_col, view_col, row, edit->cell_width);
-
+
edit->xofs_edit = 0.0;
edit->yofs_edit = 0.0;
-
+
edit->selection_start = 0;
edit->selection_end = 0;
edit->select_by_word = FALSE;
@@ -1213,14 +1213,14 @@ ect_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
edit->scroll_start = 0;
edit->show_cursor = TRUE;
edit->button_down = FALSE;
-
+
edit->tep = NULL;
edit->has_selection = FALSE;
-
+
edit->pointer_in = FALSE;
edit->default_cursor_shown = TRUE;
-
+
temp = e_cell_text_get_text(ect, ecell_view->e_table_model, model_col, row);
edit->old_text = g_strdup (temp);
e_cell_text_free_text(ect, temp);
@@ -1235,7 +1235,7 @@ ect_enter_edit (ECellView *ecell_view, int model_col, int view_col, int row)
}
#endif
ect_queue_redraw (text_view, view_col, row);
-
+
return NULL;
}
@@ -1332,7 +1332,7 @@ get_font_size (PangoLayout *layout, PangoFontDescription *font, const char *text
}
static void
-ect_print (ECellView *ecell_view, GtkPrintContext *context,
+ect_print (ECellView *ecell_view, GtkPrintContext *context,
int model_col, int view_col, int row,
double width, double height)
{
@@ -1342,7 +1342,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
PangoFontMetrics *font_metrics;
ECellText *ect = E_CELL_TEXT(ecell_view->ecell);
ECellTextView *ectView = (ECellTextView *)ecell_view;
- GtkWidget *canvas = GTK_WIDGET(ectView->canvas);
+ GtkWidget *canvas = GTK_WIDGET(ectView->canvas);
PangoDirection dir;
gboolean strikeout, underline;
cairo_t *cr;
@@ -1357,19 +1357,19 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
layout = gtk_print_context_create_pango_layout (context);
font_des = pango_font_description_from_string ("sans 12"); /* fix me font hardcoded */
pango_layout_set_font_description (layout, font_des);
-
+
pango_layout_set_text (layout, string, -1);
get_font_size (layout, font_des, string, &text_width, &text_height);
-
+
cairo_move_to(cr, 2, 2);
cairo_rectangle (cr, 2, 2, width + 2, height + 2);
- cairo_clip(cr);
+ cairo_clip(cr);
pango_context = gtk_widget_get_pango_context (canvas);
font_metrics = pango_context_get_metrics (pango_context,
canvas->style->font_desc, pango_context_get_language(pango_context));
- ty = (double)(text_height
- - pango_font_metrics_get_ascent (font_metrics)
+ ty = (double)(text_height
+ - pango_font_metrics_get_ascent (font_metrics)
- pango_font_metrics_get_descent (font_metrics)) / 2.0 /(double)PANGO_SCALE;
strikeout = ect->strikeout_column >= 0 && row >= 0 &&
@@ -1378,7 +1378,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
e_table_model_value_at(ecell_view->e_table_model, ect->underline_column, row);
dir = pango_find_base_dir (string, strlen(string));
-
+
if (underline) {
ly = ty + (double)pango_font_metrics_get_underline_position (font_metrics)/(double)PANGO_SCALE;
cairo_new_path (cr);
@@ -1408,10 +1408,10 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
cairo_set_line_width (cr,(double)pango_font_metrics_get_strikethrough_thickness (font_metrics)/(double)PANGO_SCALE);
cairo_stroke (cr);
- }
+ }
cairo_move_to(cr, 2, text_height- 5);
- pango_layout_set_width (layout, (width - 4)*PANGO_SCALE);
+ pango_layout_set_width (layout, (width - 4)*PANGO_SCALE);
pango_cairo_show_layout(cr, layout);
cairo_restore (cr);
@@ -1421,15 +1421,15 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
}
static gdouble
-ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
+ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
int model_col, int view_col, int row,
double width)
{
- /*
- * Font size is 16 by default. To leave some margin for cell
- * text area, 2 for footer, 2 for header, actual print height
+ /*
+ * Font size is 16 by default. To leave some margin for cell
+ * text area, 2 for footer, 2 for header, actual print height
* should be 16 + 4.
- * Height of some special font is much higher than others,
+ * Height of some special font is much higher than others,
* such as Arabic. So leave some more margin for cell.
` */
return 16 + 8;
@@ -1457,7 +1457,7 @@ ect_max_width (ECellView *ecell_view,
max_width = MAX (max_width, width);
g_object_unref (layout);
}
-
+
return max_width + 8;
}
@@ -1478,7 +1478,7 @@ ect_max_width_by_row (ECellView *ecell_view,
layout = generate_layout (text_view, model_col, view_col, row, 0);
pango_layout_get_pixel_size (layout, &width, NULL);
g_object_unref (layout);
-
+
return width + 8;
}
@@ -1488,7 +1488,7 @@ tooltip_event (GtkWidget *window,
ETableTooltip *tooltip)
{
gint ret_val = FALSE;
-
+
switch (event->type) {
case GDK_LEAVE_NOTIFY:
e_canvas_hide_tooltip (E_CANVAS(GNOME_CANVAS_ITEM(tooltip->eti)->canvas));
@@ -1523,7 +1523,7 @@ tooltip_event (GtkWidget *window,
}
static void
-ect_show_tooltip (ECellView *ecell_view,
+ect_show_tooltip (ECellView *ecell_view,
int model_col,
int view_col,
int row,
@@ -1775,7 +1775,7 @@ e_cell_text_class_init (ECellTextClass *klass)
object_class->get_property = ect_get_property;
object_class->set_property = ect_set_property;
- signals [TEXT_INSERTED] =
+ signals [TEXT_INSERTED] =
g_signal_new ("text_inserted",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST,
@@ -1786,7 +1786,7 @@ e_cell_text_class_init (ECellTextClass *klass)
G_TYPE_POINTER, G_TYPE_INT, G_TYPE_INT,
G_TYPE_INT, G_TYPE_INT);
- signals [TEXT_DELETED] =
+ signals [TEXT_DELETED] =
g_signal_new ("text_deleted",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_FIRST,
@@ -1852,7 +1852,7 @@ e_cell_text_class_init (ECellTextClass *klass)
use_ellipsis_default = FALSE;
}
}
-
+
gal_a11y_e_cell_registry_add_cell_type (NULL, E_CELL_TEXT_TYPE, gal_a11y_e_cell_text_new);
}
@@ -1883,12 +1883,12 @@ e_cell_text_get_cursor_locations (ECellTextView *tv,
&x, &y, NULL, &area.height);
gnome_canvas_item_get_bounds (GNOME_CANVAS_ITEM (parent_item), &x1, &y1, NULL, NULL);
-
+
gnome_canvas_get_scroll_offsets (GNOME_CANVAS (GNOME_CANVAS_ITEM (parent_item)->canvas), &cx, &cy);
index = edit->selection_end + edit->preedit_pos;
- pango_layout_get_cursor_pos (edit->layout,
+ pango_layout_get_cursor_pos (edit->layout,
index,
strong_pos ? &pango_strong_pos : NULL,
weak_pos ? &pango_weak_pos : NULL);
@@ -1913,7 +1913,7 @@ update_im_cursor_location (ECellTextView *tv)
{
CellEdit *edit=tv->edit;
GdkRectangle area;
-
+
e_cell_text_get_cursor_locations (tv, &area, NULL);
gtk_im_context_set_cursor_location (edit->im_context, &area);
@@ -1926,7 +1926,7 @@ e_cell_text_preedit_changed_cb (GtkIMContext *context,
gchar *preedit_string;
gint cursor_pos;
CellEdit *edit=tv->edit;
- gtk_im_context_get_preedit_string (edit->im_context, &preedit_string,
+ gtk_im_context_get_preedit_string (edit->im_context, &preedit_string,
NULL, &cursor_pos);
edit->preedit_length = strlen (preedit_string);
@@ -1944,7 +1944,7 @@ e_cell_text_commit_cb (GtkIMContext *context,
{
CellEdit *edit = tv->edit;
ETextEventProcessorCommand command;
-
+
if (g_utf8_validate (str, strlen (str), NULL)) {
command.action = E_TEP_INSERT;
command.position = E_TEP_SELECTION;
@@ -1966,7 +1966,7 @@ e_cell_text_retrieve_surrounding_cb (GtkIMContext *context,
strlen (edit->text),
MIN (edit->selection_start, edit->selection_end)
);
-
+
return TRUE;
}
@@ -2056,7 +2056,7 @@ e_cell_text_construct (ECellText *cell, const char *fontname, GtkJustification j
* rendered with strikeout, or bolded. In the case of the
* "color_column" argument, the column in the model is expected to
* have a string that can be parsed by gdk_color_parse().
- *
+ *
* Returns: an ECell object that can be used to render strings.
*/
ECell *
@@ -2107,7 +2107,7 @@ _blink_scroll_timeout (gpointer data)
gboolean scroll = FALSE;
gboolean redraw = FALSE;
int width, height;
-
+
g_timer_elapsed (edit->timer, &current_time);
if (edit->scroll_start + SCROLL_WAIT_TIME > 1000000) {
@@ -2198,9 +2198,9 @@ _get_position (ECellTextView *text_view, ETextEventProcessorCommand *command)
int unival;
int index;
int trailing;
-
+
switch (command->position) {
-
+
case E_TEP_VALUE:
return command->value;
@@ -2321,7 +2321,7 @@ _get_position (ECellTextView *text_view, ETextEventProcessorCommand *command)
return index;
case E_TEP_FORWARD_PARAGRAPH:
case E_TEP_BACKWARD_PARAGRAPH:
-
+
case E_TEP_FORWARD_PAGE:
case E_TEP_BACKWARD_PAGE:
return edit->selection_end;
@@ -2451,7 +2451,7 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *
gboolean redraw = FALSE;
int sel_start, sel_end;
-
+
/* If the EText isn't editable, then ignore any commands that would
modify the text. */
if (!ect->editable && (command->action == E_TEP_DELETE
@@ -2589,9 +2589,9 @@ e_cell_text_view_supply_selection (CellEdit *edit, guint time, GdkAtom selection
{
#if DO_SELECTION
GtkClipboard *clipboard;
-
+
clipboard = gtk_widget_get_clipboard (GTK_WIDGET (edit->text_view->canvas), selection);
-
+
if (selection == GDK_SELECTION_PRIMARY) {
edit->has_selection = TRUE;
}
@@ -2700,7 +2700,7 @@ e_cell_text_get_color (ECellTextView *cell_view, gchar *color_spec)
* If success, the [start, end) part of the text will be selected.
*
* This API is most likely to be used by a11y implementations.
- *
+ *
* Returns: whether the action is successful.
*/
gboolean
@@ -2748,7 +2748,7 @@ e_cell_text_set_selection (ECellView *cell_view,
* will return FALSE;
*
* This API is most likely to be used by a11y implementations.
- *
+ *
* Returns: whether the action is successful.
*/
gboolean
@@ -2871,7 +2871,7 @@ e_cell_text_delete_selection (ECellView *cell_view, gint col, gint row)
* @cell_view: the given cell view
* @col: column of the given cell in the model
* @row: row of the given cell in the model
- *
+ *
* Get the cell's text directly from CellEdit,
* during editting this cell, the cell's text value maybe inconsistant
* with the text got from table_model.
@@ -2888,11 +2888,11 @@ e_cell_text_get_text_by_view (ECellView *cell_view, gint col, gint row)
ectv = (ECellTextView *)cell_view;
edit = ectv->edit;
-
+
if (edit && ectv->edit->row == row && ectv->edit->model_col == col) { /* being editted now */
ret = g_strdup (edit->text);
} else{
- model_text = e_cell_text_get_text (E_CELL_TEXT (cell_view->ecell),
+ model_text = e_cell_text_get_text (E_CELL_TEXT (cell_view->ecell),
cell_view->e_table_model, col, row);
ret = g_strdup (model_text);
e_cell_text_free_text (E_CELL_TEXT (cell_view->ecell), model_text);
diff --git a/widgets/table/e-cell-text.h b/widgets/table/e-cell-text.h
index 040c794829..93b958be0d 100644
--- a/widgets/table/e-cell-text.h
+++ b/widgets/table/e-cell-text.h
@@ -8,7 +8,7 @@
* Chris Lahey <clahey@ximian.com>
*
* A lot of code taken from:
- *
+ *
* Text item type for GnomeCanvas widget
*
* GnomeCanvas is basically a port of the Tk toolkit's most excellent
@@ -63,7 +63,7 @@ typedef struct {
guint use_ellipsis : 1; /* Whether to use the ellipsis. */
guint editable : 1; /* Whether the text can be edited. */
-
+
int strikeout_column;
int underline_column;
int bold_column;
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c
index 9ae6cb2b56..ce98cbeb89 100644
--- a/widgets/table/e-cell-toggle.c
+++ b/widgets/table/e-cell-toggle.c
@@ -89,7 +89,7 @@ etog_kill_view (ECellView *ecell_view)
g_object_unref (toggle_view->pixmap_cache[i]);
g_free (toggle_view->pixmap_cache);
g_free (ecell_view);
-}
+}
static void
etog_realize (ECellView *ecell_view)
@@ -134,7 +134,7 @@ check_cache (ECellToggleView *toggle_view, int image_seq, int cache_seq)
gdk_pixmap_new (toggle_view->canvas->layout.bin_window, width, height,
gtk_widget_get_visual (GTK_WIDGET (toggle_view->canvas))->depth);
-
+
switch (cache_seq % 3) {
case 0:
color = GTK_WIDGET (toggle_view->canvas)->style->bg [GTK_STATE_SELECTED];
@@ -187,7 +187,7 @@ etog_draw (ECellView *ecell_view, GdkDrawable *drawable,
const int value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
-
+
if (value < 0 || value >= toggle->n_states){
g_warning ("Value from the table model is %d, the states we support are [0..%d)\n",
value, toggle->n_states);
@@ -261,7 +261,7 @@ etog_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
return FALSE;
#endif
- switch (event->type){
+ switch (event->type){
case GDK_KEY_PRESS:
if (event->key.keyval != GDK_space)
return FALSE;
@@ -269,7 +269,7 @@ etog_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
case GDK_BUTTON_PRESS:
if (!e_table_model_is_cell_editable(ecell_view->e_table_model, model_col, row))
return FALSE;
-
+
etog_set_value (toggle_view, model_col, view_col, row, value + 1);
return TRUE;
@@ -293,7 +293,7 @@ etog_height (ECellView *ecell_view, int model_col, int view_col, int row)
* ECell::print method
*/
static void
-etog_print (ECellView *ecell_view, GtkPrintContext *context,
+etog_print (ECellView *ecell_view, GtkPrintContext *context,
int model_col, int view_col, int row,
double width, double height)
{
@@ -303,7 +303,7 @@ etog_print (ECellView *ecell_view, GtkPrintContext *context,
const int value = GPOINTER_TO_INT (
e_table_model_value_at (ecell_view->e_table_model, model_col, row));
- cairo_t *cr;
+ cairo_t *cr;
if (value >= toggle->n_states){
g_warning ("Value from the table model is %d, the states we support are [0..%d)\n",
value, toggle->n_states);
@@ -313,13 +313,13 @@ etog_print (ECellView *ecell_view, GtkPrintContext *context,
cr = gtk_print_context_get_cairo_context (context);
cairo_save(cr);
image = toggle->images[value];
- cairo_translate (cr, 0 , 0);
+ cairo_translate (cr, 0 , 0);
image = gdk_pixbuf_add_alpha (image, TRUE, 255, 255, 255);
image_width = (double)gdk_pixbuf_get_width (image);
image_height = (double)gdk_pixbuf_get_height (image);
- cairo_rectangle (cr, image_width / 7, image_height / 3,
- image_width - image_width / 4,
- image_width - image_height / 7);
+ cairo_rectangle (cr, image_width / 7, image_height / 3,
+ image_width - image_width / 4,
+ image_width - image_height / 7);
cairo_clip (cr);
gdk_cairo_set_source_pixbuf (cr, image, 0, image_height / 4);
cairo_paint (cr);
@@ -327,7 +327,7 @@ etog_print (ECellView *ecell_view, GtkPrintContext *context,
}
static gdouble
-etog_print_height (ECellView *ecell_view, GtkPrintContext *context,
+etog_print_height (ECellView *ecell_view, GtkPrintContext *context,
int model_col, int view_col, int row,
double width)
{
@@ -377,7 +377,7 @@ etog_finalize (GObject *object)
{
ECellToggle *etog = E_CELL_TOGGLE (object);
int i;
-
+
for (i = 0; i < etog->n_states; i++)
g_object_unref (etog->images [i]);
@@ -435,7 +435,7 @@ e_cell_toggle_construct (ECellToggle *etog, int border, int n_states, GdkPixbuf
{
int max_height = 0;
int i;
-
+
etog->border = border;
etog->n_states = n_states;
@@ -459,10 +459,10 @@ e_cell_toggle_construct (ECellToggle *etog, int border, int n_states, GdkPixbuf
* @images: a collection of @n_states images, one for each state.
*
* Creates a new ECell renderer that can be used to render toggle
- * buttons with the images specified in @images. The value returned
+ * buttons with the images specified in @images. The value returned
* by ETableModel::get_value is typecase into an integer and clamped
* to the [0..n_states) range. That will select the image rendered.
- *
+ *
* Returns: an ECell object that can be used to render multi-state
* toggle cells.
*/
diff --git a/widgets/table/e-cell-toggle.h b/widgets/table/e-cell-toggle.h
index f2355410d4..3797248a5b 100644
--- a/widgets/table/e-cell-toggle.h
+++ b/widgets/table/e-cell-toggle.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cell-toggle.h - Multi-state image toggle cell object.
* Copyright 1999, 2000, Ximian, Inc.
*
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index d0c74e17a0..f56ee02bc5 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cell-tree.c - Tree cell object.
* Copyright 1999, 2000, 2001, Ximian, Inc.
*
@@ -128,13 +128,13 @@ ect_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
ECellTree *ect = E_CELL_TREE (ecell);
ECellTreeView *tree_view = g_new0 (ECellTreeView, 1);
GnomeCanvas *canvas = GNOME_CANVAS_ITEM (e_table_item_view)->canvas;
-
+
tree_view->cell_view.ecell = ecell;
tree_view->cell_view.e_table_model = table_model;
tree_view->cell_view.e_table_item_view = e_table_item_view;
tree_view->cell_view.kill_view_cb = NULL;
tree_view->cell_view.kill_view_cb_data = NULL;
-
+
/* create our subcell view */
tree_view->subcell_view = e_cell_new_view (ect->subcell, table_model, e_table_item_view /* XXX */);
@@ -176,7 +176,7 @@ ect_realize (ECellView *ecell_view)
tree_view->gc = gdk_gc_new (GTK_WIDGET (tree_view->canvas)->window);
- gdk_gc_set_line_attributes (tree_view->gc, 1,
+ gdk_gc_set_line_attributes (tree_view->gc, 1,
GDK_LINE_ON_OFF_DASH,
GDK_CAP_NOT_LAST,
GDK_JOIN_MITER);
@@ -220,7 +220,7 @@ draw_retro_expander (ECellTreeView *ectv, GdkDrawable *drawable, gboolean expand
NULL,
image,
rect->x, rect->y,
- rect->width - image_width / 2,
+ rect->width - image_width / 2,
rect->height - image_height / 2,
image_width, image_height,
GDK_RGB_DITHER_NORMAL,
@@ -290,7 +290,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
rect.y = y1;
rect.width = subcell_offset + node_image_width;
rect.height = y2 - y1;
-
+
gdk_gc_set_clip_rectangle (tree_view->gc, &rect);
gdk_gc_set_clip_rectangle (fg_gc, &rect);
clip_rect = &rect;
@@ -427,7 +427,7 @@ event_in_expander (GdkEvent *event, gint offset, gint height)
* ECell::height method
*/
static int
-ect_height (ECellView *ecell_view, int model_col, int view_col, int row)
+ect_height (ECellView *ecell_view, int model_col, int view_col, int row)
{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
@@ -489,7 +489,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
GdkRectangle area;
animate_closure_t *closure = g_new0 (animate_closure_t, 1);
int hgt;
-
+
e_table_item_get_cell_geometry (tree_view->cell_view.e_table_item_view,
&tmp_row, &view_col, &area.x, &area.y, NULL, &area.height);
area.width = offset - 2;
@@ -497,7 +497,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
if (hgt != area.height) /* Composite cells */
area.height += hgt;
-
+
draw_expander (tree_view, GTK_LAYOUT (tree_view->canvas)->bin_window,
expanded ? GTK_EXPANDER_SEMI_EXPANDED : GTK_EXPANDER_SEMI_COLLAPSED,
GTK_STATE_NORMAL, &area);
@@ -581,21 +581,21 @@ ect_max_width (ECellView *ecell_view, int model_col, int view_col)
if (!per_row)
subcell_max_width = e_cell_max_width (tree_view->subcell_view, model_col, view_col);
-
+
for (row = 0; row < number_of_rows; row++) {
ETreeModel *tree_model = e_cell_tree_get_tree_model(ecell_view->e_table_model, row);
ETreePath node;
GdkPixbuf *node_image;
int node_image_width = 0;
-
+
int offset, subcell_offset;
#if 0
gboolean expanded, expandable;
ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter(ecell_view->e_table_model, row);
#endif
-
+
node = e_cell_tree_get_node (ecell_view->e_table_model, row);
-
+
offset = offset_of_node (ecell_view->e_table_model, row);
subcell_offset = offset;
@@ -623,7 +623,7 @@ ect_max_width (ECellView *ecell_view, int model_col, int view_col)
if (expandable) {
GdkPixbuf *image;
- image = (expanded
+ image = (expanded
? E_CELL_TREE(tree_view->cell_view.ecell)->open_pixbuf
: E_CELL_TREE(tree_view->cell_view.ecell)->closed_pixbuf);
@@ -643,7 +643,7 @@ ect_max_width (ECellView *ecell_view, int model_col, int view_col)
static void
ect_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row,
int col_width, ETableTooltip *tooltip)
-{
+{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row);
ETreePath node = e_cell_tree_get_node (ecell_view->e_table_model, row);
@@ -663,12 +663,12 @@ ect_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row,
*/
static char *
ect_get_bg_color (ECellView *ecell_view, int row)
-{
+{
ECellTreeView *tree_view = (ECellTreeView *) ecell_view;
return e_cell_get_bg_color (tree_view->subcell_view, row);
}
-
+
/*
* ECellView::enter_edit method
*/
@@ -694,7 +694,7 @@ ect_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, voi
}
static void
-ect_print (ECellView *ecell_view, GtkPrintContext *context,
+ect_print (ECellView *ecell_view, GtkPrintContext *context,
int model_col, int view_col, int row,
double width, double height)
{
@@ -789,7 +789,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
}
static gdouble
-ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
+ect_print_height (ECellView *ecell_view, GtkPrintContext *context,
int model_col, int view_col, int row,
double width)
{
@@ -859,10 +859,10 @@ e_cell_tree_init (ECellTree *ect)
* @closed_pixbuf: pixbuf to be used instead of the '+' icon.
* @draw_lines: whether or not to draw the lines between parents/children/siblings.
* @subcell: the ECell to render to the right of the tree effects.
- *
+ *
* Constructs an ECellTree. used by subclasses that need to
* initialize a nested ECellTree. See e_cell_tree_new() for more info.
- *
+ *
**/
void
e_cell_tree_construct (ECellTree *ect,
@@ -870,7 +870,7 @@ e_cell_tree_construct (ECellTree *ect,
GdkPixbuf *closed_pixbuf,
gboolean draw_lines,
ECell *subcell)
-{
+{
ect->subcell = subcell;
if (subcell)
g_object_ref_sink (subcell);
@@ -893,14 +893,14 @@ e_cell_tree_construct (ECellTree *ect,
* @closed_pixbuf: pixbuf to be used instead of the '+' icon.
* @draw_lines: whether or not to draw the lines between parents/children/siblings.
* @subcell: the ECell to render to the right of the tree effects.
- *
+ *
* Creates a new ECell renderer that can be used to render tree
* effects that come from an ETreeModel. Various assumptions are made
* as to the fact that the ETableModel the ETable this cell is
* associated with is in fact an ETreeModel. The cell uses special
* columns to get at structural information (needed to draw the
* lines/icons.
- *
+ *
* Return value: an ECell object that can be used to render trees.
**/
ECell *
diff --git a/widgets/table/e-cell-tree.h b/widgets/table/e-cell-tree.h
index 8c59920c27..3b03990024 100644
--- a/widgets/table/e-cell-tree.h
+++ b/widgets/table/e-cell-tree.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cell-tree.h - Tree cell object.
* Copyright 1999, 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c
index ff060b9a86..e9033b4f23 100644
--- a/widgets/table/e-cell-vbox.c
+++ b/widgets/table/e-cell-vbox.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cell-vbox.c - Vbox cell object.
* Copyright 1999, 2000, 2001, Ximian, Inc.
*
@@ -55,13 +55,13 @@ ecv_new_view (ECell *ecell, ETableModel *table_model, void *e_table_item_view)
ECellVbox *ecv = E_CELL_VBOX (ecell);
ECellVboxView *vbox_view = g_new0 (ECellVboxView, 1);
int i;
-
+
vbox_view->cell_view.ecell = ecell;
vbox_view->cell_view.e_table_model = table_model;
vbox_view->cell_view.e_table_item_view = e_table_item_view;
vbox_view->cell_view.kill_view_cb = NULL;
vbox_view->cell_view.kill_view_cb_data = NULL;
-
+
/* create our subcell view */
vbox_view->subcell_view_count = ecv->subcell_count;
vbox_view->subcell_views = g_new (ECellView *, vbox_view->subcell_view_count);
@@ -198,7 +198,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
* ECell::height method
*/
static int
-ecv_height (ECellView *ecell_view, int model_col, int view_col, int row)
+ecv_height (ECellView *ecell_view, int model_col, int view_col, int row)
{
ECellVboxView *vbox_view = (ECellVboxView *)ecell_view;
int height = 0;
@@ -235,7 +235,7 @@ ecv_max_width (ECellView *ecell_view, int model_col, int view_col)
static void
ecv_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row,
int col_width, ETableTooltip *tooltip)
-{
+{
ECellVboxView *vbox_view = (ECellVboxView *) ecell_view;
EVboxModel *vbox_model = e_cell_vbox_get_vbox_model (ecell_view->e_table_model, row);
EVboxPath node = e_cell_vbox_get_node (ecell_view->e_table_model, row);
@@ -255,12 +255,12 @@ ecv_show_tooltip (ECellView *ecell_view, int model_col, int view_col, int row,
*/
static char *
ecv_get_bg_color (ECellView *ecell_view, int row)
-{
+{
ECellVboxView *vbox_view = (ECellVboxView *) ecell_view;
return e_cell_get_bg_color (vbox_view->subcell_views[0], row);
}
-
+
/*
* ECellView::enter_edit method
*/
@@ -286,7 +286,7 @@ ecv_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, voi
}
static void
-ecv_print (ECellView *ecell_view, GnomePrintContext *context,
+ecv_print (ECellView *ecell_view, GnomePrintContext *context,
int model_col, int view_col, int row,
double width, double height)
{
@@ -351,7 +351,7 @@ ecv_print (ECellView *ecell_view, GnomePrintContext *context,
/* now draw our icon if we're expandable */
if (expandable) {
double image_matrix [6] = {16, 0, 0, 16, 0, 0};
- GdkPixbuf *image = (expanded
+ GdkPixbuf *image = (expanded
? E_CELL_VBOX(vbox_view->cell_view.ecell)->open_pixbuf
: E_CELL_VBOX(vbox_view->cell_view.ecell)->closed_pixbuf);
int image_width, image_height, image_rowstride;
@@ -384,7 +384,7 @@ ecv_print (ECellView *ecell_view, GnomePrintContext *context,
}
static gdouble
-ecv_print_height (ECellView *ecell_view, GnomePrintContext *context,
+ecv_print_height (ECellView *ecell_view, GnomePrintContext *context,
int model_col, int view_col, int row,
double width)
{
@@ -463,10 +463,10 @@ e_cell_vbox_init (ECellVbox *ecv)
/**
* e_cell_vbox_new:
- *
+ *
* Creates a new ECell renderer that can be used to render multiple
* child cells.
- *
+ *
* Return value: an ECell object that can be used to render multiple
* child cells.
**/
diff --git a/widgets/table/e-cell-vbox.h b/widgets/table/e-cell-vbox.h
index 5d57122402..e80f23cba6 100644
--- a/widgets/table/e-cell-vbox.h
+++ b/widgets/table/e-cell-vbox.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cell-vbox.h - Vbox cell object.
* Copyright 1999 - 2002, Ximian, Inc.
*
diff --git a/widgets/table/e-cell.c b/widgets/table/e-cell.c
index 69d787f8eb..6d04c756ec 100644
--- a/widgets/table/e-cell.c
+++ b/widgets/table/e-cell.c
@@ -78,7 +78,7 @@ ec_height (ECellView *ecell_view, int model_col, int view_col, int row)
static void
ec_focus (ECellView *ecell_view, int model_col, int view_col, int row, int x1, int y1, int x2, int y2)
{
- ecell_view->focus_col = view_col;
+ ecell_view->focus_col = view_col;
ecell_view->focus_row = row;
ecell_view->focus_x1 = x1;
ecell_view->focus_y1 = y1;
@@ -180,7 +180,7 @@ e_cell_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_co
ecell_view, event, model_col, view_col, row, flags, actions);
}
-/**
+/**
* e_cell_new_view:
* @ecell: the Ecell that will create the new view
* @table_model: the table model the ecell is bound to
@@ -280,13 +280,13 @@ e_cell_draw (ECellView *ecell_view, GdkDrawable *drawable,
* @model_col: the column in the model being drawn.
* @view_col: the column in the view being drawn (what the model maps to).
* @row: the row being drawn
- * @width: width
+ * @width: width
* @height: height
*
* FIXME:
*/
void
-e_cell_print (ECellView *ecell_view, GtkPrintContext *context,
+e_cell_print (ECellView *ecell_view, GtkPrintContext *context,
int model_col, int view_col, int row,
double width, double height)
{
@@ -300,7 +300,7 @@ e_cell_print (ECellView *ecell_view, GtkPrintContext *context,
* FIXME:
*/
gdouble
-e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context,
+e_cell_print_height (ECellView *ecell_view, GtkPrintContext *context,
int model_col, int view_col, int row,
double width)
{
@@ -431,7 +431,7 @@ e_cell_free_state (ECellView *ecell_view, int model_col, int view_col, int row,
int
e_cell_max_width (ECellView *ecell_view, int model_col, int view_col)
{
- return ECVIEW_EC_CLASS(ecell_view)->max_width
+ return ECVIEW_EC_CLASS(ecell_view)->max_width
(ecell_view, model_col, view_col);
}
@@ -470,9 +470,9 @@ e_cell_max_width_by_row_implemented (ECellView *ecell_view)
{
return (ECVIEW_EC_CLASS(ecell_view)->max_width_by_row != NULL);
}
-
+
void
-e_cell_show_tooltip (ECellView *ecell_view, int model_col, int view_col,
+e_cell_show_tooltip (ECellView *ecell_view, int model_col, int view_col,
int row, int col_width, ETableTooltip *tooltip)
{
ECVIEW_EC_CLASS(ecell_view)->show_tooltip
@@ -494,4 +494,4 @@ e_cell_style_set(ECellView *ecell_view, GtkStyle *previous_style)
if (ECVIEW_EC_CLASS(ecell_view)->style_set)
ECVIEW_EC_CLASS(ecell_view)->style_set (ecell_view, previous_style);
}
-
+
diff --git a/widgets/table/e-cell.h b/widgets/table/e-cell.h
index 338695cb9e..b92e493e19 100644
--- a/widgets/table/e-cell.h
+++ b/widgets/table/e-cell.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-cell.h
* Copyright 1999, 2000, 2001, Ximian, Inc.
*
@@ -76,7 +76,7 @@ typedef struct _ECellView {
ECell *ecell;
ETableModel *e_table_model;
void *e_table_item_view;
-
+
gint focus_x1, focus_y1, focus_x2, focus_y2;
gint focus_col, focus_row;
@@ -88,7 +88,7 @@ typedef struct _ECellView {
typedef struct {
GtkObjectClass parent_class;
-
+
ECellView *(*new_view) (ECell *ecell, ETableModel *table_model, void *e_table_item_view);
void (*kill_view) (ECellView *ecell_view);
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index 572d79acc1..663d6f3a67 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -81,7 +81,7 @@ etcta_style_set (ETableClickToAdd *etcta, GtkStyle *previous_style)
if (etcta->rect) {
gnome_canvas_item_set (etcta->rect,
- "outline_color_gdk", &widget->style->fg[GTK_STATE_NORMAL],
+ "outline_color_gdk", &widget->style->fg[GTK_STATE_NORMAL],
"fill_color_gdk", &widget->style->bg[GTK_STATE_NORMAL],
NULL );
@@ -248,7 +248,7 @@ create_rect_and_text (ETableClickToAdd *etcta)
"y1", (double) 0,
"x2", (double) etcta->width - 1,
"y2", (double) etcta->height - 1,
- "outline_color_gdk", &widget->style->fg[GTK_STATE_NORMAL],
+ "outline_color_gdk", &widget->style->fg[GTK_STATE_NORMAL],
"fill_color_gdk", &widget->style->bg[GTK_STATE_NORMAL],
NULL);
@@ -332,8 +332,8 @@ item_key_press (ETableItem *item, int row, int col, GdkEvent *event, ETableClick
static void
set_initial_selection (ETableClickToAdd *etcta)
{
- e_selection_model_do_something (E_SELECTION_MODEL(etcta->selection),
- 0, e_table_header_prioritized_column (etcta->eth),
+ e_selection_model_do_something (E_SELECTION_MODEL(etcta->selection),
+ 0, e_table_header_prioritized_column (etcta->eth),
0);
}
@@ -401,7 +401,7 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
one = e_table_one_new(etcta->model);
etcta_add_one (etcta, one);
g_object_unref (one);
-
+
e_selection_model_clear(E_SELECTION_MODEL(etcta->selection));
etcta->row = gnome_canvas_item_new(GNOME_CANVAS_GROUP(item),
@@ -445,7 +445,7 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
break;
}
break;
-
+
default:
return FALSE;
}
@@ -456,7 +456,7 @@ static void
etcta_reflow (GnomeCanvasItem *item, int flags)
{
ETableClickToAdd *etcta = E_TABLE_CLICK_TO_ADD (item);
-
+
double old_height = etcta->height;
if (etcta->text) {
@@ -498,35 +498,35 @@ etcta_class_init (ETableClickToAddClass *klass)
item_class->unrealize = etcta_unrealize;
item_class->event = etcta_event;
- g_object_class_install_property (object_class, PROP_HEADER,
+ g_object_class_install_property (object_class, PROP_HEADER,
g_param_spec_object ("header",
_("Header"),
/*_( */"XXX blurb" /*)*/,
E_TABLE_HEADER_TYPE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_MODEL,
+ g_object_class_install_property (object_class, PROP_MODEL,
g_param_spec_object ("model",
_("Model"),
/*_( */"XXX blurb" /*)*/,
E_TABLE_MODEL_TYPE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_MESSAGE,
+ g_object_class_install_property (object_class, PROP_MESSAGE,
g_param_spec_string ("message",
_("Message"),
/*_( */"XXX blurb" /*)*/,
NULL,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_WIDTH,
+ g_object_class_install_property (object_class, PROP_WIDTH,
g_param_spec_double ("width",
_("Width"),
/*_( */"XXX blurb" /*)*/,
0.0, G_MAXDOUBLE, 0.0,
G_PARAM_READWRITE | G_PARAM_LAX_VALIDATION));
- g_object_class_install_property (object_class, PROP_HEIGHT,
+ g_object_class_install_property (object_class, PROP_HEIGHT,
g_param_spec_double ("height",
_("Height"),
/*_( */"XXX blurb" /*)*/,
@@ -586,7 +586,7 @@ etcta_init (ETableClickToAdd *etcta)
/**
* e_table_click_to_add_commit:
* @etcta: The %ETableClickToAdd to commit.
- *
+ *
* This routine commits the current thing being edited and returns to
* just displaying the click to add message.
**/
diff --git a/widgets/table/e-table-click-to-add.h b/widgets/table/e-table-click-to-add.h
index 3ef30e2587..d05bddbda2 100644
--- a/widgets/table/e-table-click-to-add.h
+++ b/widgets/table/e-table-click-to-add.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-click-to-add.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -52,7 +52,7 @@ typedef struct {
GnomeCanvasItem *row; /* If row is NULL, we're sitting with no data and a "Click here" message. */
GnomeCanvasItem *text; /* If text is NULL, row shouldn't be. */
GnomeCanvasItem *rect; /* What the heck. Why not. */
-
+
gdouble width;
gdouble height;
diff --git a/widgets/table/e-table-col-dnd.h b/widgets/table/e-table-col-dnd.h
index d47c97d3d9..50c3caa9ac 100644
--- a/widgets/table/e-table-col-dnd.h
+++ b/widgets/table/e-table-col-dnd.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-col-dnd.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-col.c b/widgets/table/e-table-col.c
index b53bc299e0..224334ad77 100644
--- a/widgets/table/e-table-col.c
+++ b/widgets/table/e-table-col.c
@@ -51,7 +51,7 @@ etc_dispose (GObject *object)
if (etc->text)
g_free (etc->text);
etc->text = NULL;
-
+
if (G_OBJECT_CLASS (e_table_col_parent_class)->dispose)
G_OBJECT_CLASS (e_table_col_parent_class)->dispose (object);
}
@@ -84,11 +84,11 @@ etc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *psp
break;
}
}
-
+
static void
e_table_col_class_init (ETableColClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = etc_dispose;
object_class->set_property = etc_set_property;
@@ -97,9 +97,9 @@ e_table_col_class_init (ETableColClass *klass)
g_object_class_install_property (object_class, PROP_COMPARE_COL,
g_param_spec_int ("compare_col",
_( "Width" ),
- "Width",
+ "Width",
0, G_MAXINT, 0,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE));
}
static void
@@ -112,7 +112,7 @@ e_table_col_init (ETableCol *etc)
etc->priority = 0;
}
-/**
+/**
* e_table_col_new:
* @col_idx: the column we represent in the model
* @text: a title for this column
@@ -126,7 +126,7 @@ e_table_col_init (ETableCol *etc)
* The ETableCol represents a column to be used inside an ETable. The
* ETableCol objects are inserted inside an ETableHeader (which is just a collection
* of ETableCols). The ETableHeader is the definition of the order in which
- * columns are shown to the user.
+ * columns are shown to the user.
*
* The @text argument is the the text that will be shown as a header to the
* user. @col_idx reflects where the data for this ETableCol object will
@@ -135,7 +135,7 @@ e_table_col_init (ETableCol *etc)
* column will always point to the same column inside the ETableModel.
*
* The @ecell argument is an ECell object that needs to know how to render the
- * data in the ETableModel for this specific row.
+ * data in the ETableModel for this specific row.
*
* Returns: the newly created ETableCol object.
*/
@@ -144,7 +144,7 @@ e_table_col_new (int col_idx, const char *text, double expansion, int min_width,
ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, int priority)
{
ETableCol *etc;
-
+
g_return_val_if_fail (expansion >= 0, NULL);
g_return_val_if_fail (min_width >= 0, NULL);
g_return_val_if_fail (ecell != NULL, NULL);
@@ -152,7 +152,7 @@ e_table_col_new (int col_idx, const char *text, double expansion, int min_width,
g_return_val_if_fail (text != NULL, NULL);
etc = g_object_new (E_TABLE_COL_TYPE, NULL);
-
+
etc->is_pixbuf = FALSE;
etc->col_idx = col_idx;
@@ -174,7 +174,7 @@ e_table_col_new (int col_idx, const char *text, double expansion, int min_width,
return etc;
}
-/**
+/**
* e_table_col_new_with_pixbuf:
* @col_idx: the column we represent in the model
* @pixbuf: the image to be used for the header
@@ -187,7 +187,7 @@ e_table_col_new (int col_idx, const char *text, double expansion, int min_width,
* The ETableCol represents a column to be used inside an ETable. The
* ETableCol objects are inserted inside an ETableHeader (which is just a collection
* of ETableCols). The ETableHeader is the definition of the order in which
- * columns are shown to the user.
+ * columns are shown to the user.
*
* The @text argument is the the text that will be shown as a header to the
* user. @col_idx reflects where the data for this ETableCol object will
@@ -196,7 +196,7 @@ e_table_col_new (int col_idx, const char *text, double expansion, int min_width,
* column will always point to the same column inside the ETableModel.
*
* The @ecell argument is an ECell object that needs to know how to render the
- * data in the ETableModel for this specific row.
+ * data in the ETableModel for this specific row.
*
* Returns: the newly created ETableCol object.
*/
@@ -205,7 +205,7 @@ e_table_col_new_with_pixbuf (int col_idx, const char *text, GdkPixbuf *pixbuf, d
ECell *ecell, GCompareFunc compare, gboolean resizable, gboolean disabled, int priority)
{
ETableCol *etc;
-
+
g_return_val_if_fail (expansion >= 0, NULL);
g_return_val_if_fail (min_width >= 0, NULL);
g_return_val_if_fail (ecell != NULL, NULL);
diff --git a/widgets/table/e-table-col.h b/widgets/table/e-table-col.h
index f41713a973..3dae732469 100644
--- a/widgets/table/e-table-col.h
+++ b/widgets/table/e-table-col.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-col.h
* Copyright 1999, 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-column-specification.c b/widgets/table/e-table-column-specification.c
index 85497e51dd..8371176738 100644
--- a/widgets/table/e-table-column-specification.c
+++ b/widgets/table/e-table-column-specification.c
@@ -77,12 +77,12 @@ etcs_init (ETableColumnSpecification *specification)
specification->compare_col = 0;
specification->title = g_strdup("");
specification->pixbuf = NULL;
-
+
specification->expansion = 0;
specification->minimum_width = 0;
specification->resizable = FALSE;
specification->disabled = FALSE;
-
+
specification->cell = NULL;
specification->compare = NULL;
specification->search = NULL;
diff --git a/widgets/table/e-table-column-specification.h b/widgets/table/e-table-column-specification.h
index 9fc0db5737..54cd683d3d 100644
--- a/widgets/table/e-table-column-specification.h
+++ b/widgets/table/e-table-column-specification.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-column-specification.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-column.c b/widgets/table/e-table-column.c
index 653f33beff..b4a2bc5126 100644
--- a/widgets/table/e-table-column.c
+++ b/widgets/table/e-table-column.c
@@ -54,7 +54,7 @@ e_table_column_finalize (GObject *object)
*/
for (i = 0; i < cols; i++)
e_table_column_remove (etc, i);
-
+
G_OBJECT_CLASS (e_table_column_parent_class)->finalize (object);
}
@@ -73,8 +73,8 @@ e_table_column_class_init (GtkObjectClass *object_class)
NULL, NULL,
e_util_marshal_NONE__NONE,
G_TYPE_NONE, 0);
- etc_signals [DIMENSION_CHANGE] =
- g_signal_new ("dimension_change",
+ etc_signals [DIMENSION_CHANGE] =
+ g_signal_new ("dimension_change",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ETableColumn, dimension_change),
@@ -94,7 +94,7 @@ void
e_table_column_add_column (ETableColumn *etc, ETableCol *tc, int pos)
{
ETableCol **new_ptr;
-
+
g_return_if_fail (etc != NULL);
g_return_if_fail (E_IS_TABLE_COLUMN (etc));
g_return_if_fail (tc != NULL);
@@ -137,14 +137,14 @@ int
e_table_column_index (ETableColumn *etc, const char *identifier)
{
int i;
-
+
g_return_val_if_fail (etc != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
g_return_val_if_fail (identifier != NULL, 0);
for (i = 0; i < etc->col_count; i++){
ETableCol *tc = etc->columns [i];
-
+
if (strcmp (i->id, identifier) == 0)
return i;
}
@@ -156,7 +156,7 @@ int
e_table_column_get_index_at (ETableColumn *etc, int x_offset)
{
int i, total;
-
+
g_return_val_if_fail (etc != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
g_return_val_if_fail (identifier != NULL, 0);
@@ -177,7 +177,7 @@ e_table_column_get_columns (ETableColumn *etc)
{
ETableCol **ret;
int i;
-
+
g_return_val_if_fail (etc != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
@@ -202,7 +202,7 @@ ve_table_column_get_selected (ETableColumn *etc)
{
int i;
int selected = 0;
-
+
g_return_val_if_fail (etc != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
@@ -218,7 +218,7 @@ int
e_table_column_total_width (ETableColumn *etc)
{
int total;
-
+
g_return_val_if_fail (etc != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_COLUMN (etc), 0);
diff --git a/widgets/table/e-table-config-field.h b/widgets/table/e-table-config-field.h
index 5439a67f18..9ad8f76b6e 100644
--- a/widgets/table/e-table-config-field.h
+++ b/widgets/table/e-table-config-field.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-config-field.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c
index 9bada0a0cf..796f2e4a59 100644
--- a/widgets/table/e-table-config.c
+++ b/widgets/table/e-table-config.c
@@ -131,8 +131,8 @@ config_get_property (GObject *object,
static void
e_table_config_class_init (ETableConfigClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
klass->changed = NULL;
object_class->finalize = config_finalize;
@@ -279,11 +279,11 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
config->temp_state->sort_info);
widgets = &config->group [0];
}
-
+
for (i = 0; i < 4; i++){
gboolean sensitive = (i <= count);
char *text = "";
-
+
gtk_widget_set_sensitive (widgets [i].frames, sensitive);
/*
@@ -295,7 +295,7 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
g_signal_handler_block (
widgets [i].combo,
widgets [i].changed_id);
-
+
if (i < count){
GtkToggleButton *a, *d;
ETableSortColumn col =
@@ -306,7 +306,7 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
: e_table_sort_info_grouping_get_nth (
config->temp_state->sort_info,
i);
-
+
ETableColumnSpecification *column =
find_column_in_spec (config->source_spec, col.column);
@@ -329,11 +329,11 @@ update_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
widgets [i].radio_ascending);
d = GTK_TOGGLE_BUTTON (
widgets [i].radio_descending);
-
+
gtk_toggle_button_set_active (col.ascending ? a:d, 1);
} else {
GtkToggleButton *t;
-
+
t = GTK_TOGGLE_BUTTON (
widgets [i].radio_ascending);
@@ -370,13 +370,13 @@ config_sort_info_update (ETableConfig *config)
for (i = 0; i < count; i++) {
ETableSortColumn col = e_table_sort_info_sorting_get_nth (info, i);
ETableColumnSpecification *column;
-
+
column = find_column_in_spec (config->source_spec, col.column);
if (!column){
g_warning ("Could not find column model in specification");
continue;
}
-
+
g_string_append (res, dgettext (config->domain, (column)->title));
g_string_append_c (res, ' ');
g_string_append (
@@ -387,10 +387,10 @@ config_sort_info_update (ETableConfig *config)
if ((i + 1) != count)
g_string_append (res, ", ");
}
-
+
if (res->str [0] == 0)
g_string_append (res, _("Not sorted"));
-
+
gtk_label_set_text (GTK_LABEL(config->sort_label), res->str);
g_string_free (res, TRUE);
@@ -484,7 +484,7 @@ config_fields_info_update (ETableConfig *config)
break;
}
}
-
+
gtk_label_set_text (GTK_LABEL (config->fields_label), res->str);
g_string_free (res, TRUE);
}
@@ -503,13 +503,13 @@ do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
is_sort
? config->sort [0].combo
: config->group [0].combo));
-
+
if (is_sort)
dialog = GTK_DIALOG (config->dialog_sort);
else
dialog = GTK_DIALOG (config->dialog_group_by);
-
+
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (config->dialog_toplevel));
do {
@@ -541,10 +541,10 @@ do_sort_and_group_config_dialog (ETableConfig *config, gboolean is_sort)
running = 0;
break;
}
-
+
} while (running);
gtk_widget_hide (GTK_WIDGET (dialog));
-
+
if (is_sort)
config_sort_info_update (config);
else
@@ -585,7 +585,7 @@ do_fields_config_dialog (ETableConfig *config)
running = 0;
break;
}
-
+
} while (running);
gtk_widget_hide (GTK_WIDGET (config->dialog_show_fields));
@@ -619,51 +619,51 @@ create_global_store (ETableConfig *config)
}
}
-static char *spec = "<ETableSpecification gettext-domain=\"" GETTEXT_PACKAGE "\" no-headers=\"true\" cursor-mode=\"line\" "
-" draw-grid=\"false\" draw-focus=\"true\" selection-mode=\"browse\">"
-"<ETableColumn model_col= \"0\" _title=\"Name\" minimum_width=\"30\" resizable=\"true\" cell=\"string\" compare=\"string\"/>"
-"<ETableState> <column source=\"0\"/>"
-"<grouping/>"
-"</ETableState>"
-"</ETableSpecification>";
-
-GtkWidget *e_table_proxy_etable_shown_new (void);
-
-GtkWidget *
-e_table_proxy_etable_shown_new (void)
-{
- ETableModel *model = NULL;
- GtkWidget *widget;
- ETableScrolled *ets;
-
- model = e_table_subset_variable_new (global_store);
-
- widget = e_table_scrolled_new (model, NULL, spec, NULL);
- ets = E_TABLE_SCROLLED (widget);
- atk_object_set_name (gtk_widget_get_accessible ((GtkWidget *)ets->table), _("Show Fields"));
-
- return widget;
-}
-
-GtkWidget *e_table_proxy_etable_available_new (void);
-
-GtkWidget *
-e_table_proxy_etable_available_new (void)
-{
- ETableModel *model;
- GtkWidget *widget;
- ETableScrolled *ets;
-
- model = e_table_without_new (global_store,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-
- e_table_without_show_all (E_TABLE_WITHOUT (model));
-
- widget = e_table_scrolled_new (model, NULL, spec, NULL);
- ets = E_TABLE_SCROLLED (widget);
- atk_object_set_name (gtk_widget_get_accessible ((GtkWidget *)ets->table), _("Available Fields"));
-
- return widget;
+static char *spec = "<ETableSpecification gettext-domain=\"" GETTEXT_PACKAGE "\" no-headers=\"true\" cursor-mode=\"line\" "
+" draw-grid=\"false\" draw-focus=\"true\" selection-mode=\"browse\">"
+"<ETableColumn model_col= \"0\" _title=\"Name\" minimum_width=\"30\" resizable=\"true\" cell=\"string\" compare=\"string\"/>"
+"<ETableState> <column source=\"0\"/>"
+"<grouping/>"
+"</ETableState>"
+"</ETableSpecification>";
+
+GtkWidget *e_table_proxy_etable_shown_new (void);
+
+GtkWidget *
+e_table_proxy_etable_shown_new (void)
+{
+ ETableModel *model = NULL;
+ GtkWidget *widget;
+ ETableScrolled *ets;
+
+ model = e_table_subset_variable_new (global_store);
+
+ widget = e_table_scrolled_new (model, NULL, spec, NULL);
+ ets = E_TABLE_SCROLLED (widget);
+ atk_object_set_name (gtk_widget_get_accessible ((GtkWidget *)ets->table), _("Show Fields"));
+
+ return widget;
+}
+
+GtkWidget *e_table_proxy_etable_available_new (void);
+
+GtkWidget *
+e_table_proxy_etable_available_new (void)
+{
+ ETableModel *model;
+ GtkWidget *widget;
+ ETableScrolled *ets;
+
+ model = e_table_without_new (global_store,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+ e_table_without_show_all (E_TABLE_WITHOUT (model));
+
+ widget = e_table_scrolled_new (model, NULL, spec, NULL);
+ ets = E_TABLE_SCROLLED (widget);
+ atk_object_set_name (gtk_widget_get_accessible ((GtkWidget *)ets->table), _("Available Fields"));
+
+ return widget;
}
static void
@@ -703,7 +703,7 @@ dialog_response (GtkWidget *dialog, int response_id, ETableConfig *config)
|| response_id == GTK_RESPONSE_OK) {
gtk_widget_destroy (dialog);
}
-}
+}
/*
* Invoked by the Glade auto-connect code
@@ -743,7 +743,7 @@ static GtkWidget *
configure_dialog (GladeXML *gui, const char *widget_name, ETableConfig *config)
{
GtkWidget *w;
-
+
w = glade_xml_get_widget (gui, widget_name);
return w;
@@ -768,7 +768,7 @@ get_source_model_col_index (ETableConfig *config, gint idx)
ETableModel *src_model = E_TABLE_SUBSET (config->available_model)->source;
visible_index = e_table_subset_view_to_model_row (E_TABLE_SUBSET (config->available_model), idx);
-
+
return GPOINTER_TO_INT (e_table_model_value_at (src_model, 1, visible_index));
}
@@ -786,7 +786,7 @@ sort_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *sort)
if (s != NULL) {
ETableSortColumn c;
int col;
-
+
col = find_model_column_by_name (config->source_spec, s);
if (col == -1){
g_warning ("sort: This should not happen (%s)", s);
@@ -798,7 +798,7 @@ sort_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *sort)
config->sort [idx].radio_ascending)->active;
c.column = col;
e_table_sort_info_sorting_set_nth (sort_info, idx, c);
-
+
update_sort_and_group_config_dialog (config, TRUE);
} else {
e_table_sort_info_sorting_truncate (sort_info, idx);
@@ -816,7 +816,7 @@ sort_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *sort)
ETableConfigSortWidgets *base = &config->sort[0];
int idx = sort - base;
ETableSortColumn c;
-
+
c = e_table_sort_info_sorting_get_nth (si, idx);
c.ascending = t->active;
e_table_sort_info_sorting_set_nth (si, idx, c);
@@ -827,7 +827,7 @@ configure_sort_dialog (ETableConfig *config, GladeXML *gui)
{
GSList *l;
int i;
-
+
for (i = 0; i < 4; i++){
char buffer [80];
@@ -838,7 +838,7 @@ configure_sort_dialog (ETableConfig *config, GladeXML *gui)
GTK_COMBO_BOX (config->sort[i].combo), "", "");
snprintf (buffer, sizeof (buffer), "frame-sort-%d", i + 1);
- config->sort [i].frames =
+ config->sort [i].frames =
glade_xml_get_widget (gui, buffer);
snprintf (
@@ -896,7 +896,7 @@ group_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *group)
if (s != NULL) {
ETableSortColumn c;
int col;
-
+
col = find_model_column_by_name (config->source_spec, s);
if (col == -1){
g_warning ("grouping: this should not happen, %s", s);
@@ -908,7 +908,7 @@ group_combo_changed (GtkComboBox *combo_box, ETableConfigSortWidgets *group)
config->group [idx].radio_ascending)->active;
c.column = col;
e_table_sort_info_grouping_set_nth (sort_info, idx, c);
-
+
update_sort_and_group_config_dialog (config, FALSE);
} else {
e_table_sort_info_grouping_truncate (sort_info, idx);
@@ -926,7 +926,7 @@ group_ascending_toggled (GtkToggleButton *t, ETableConfigSortWidgets *group)
ETableConfigSortWidgets *base = &config->group[0];
int idx = group - base;
ETableSortColumn c;
-
+
c = e_table_sort_info_grouping_get_nth (si, idx);
c.ascending = t->active;
e_table_sort_info_grouping_set_nth (si, idx, c);
@@ -937,7 +937,7 @@ configure_group_dialog (ETableConfig *config, GladeXML *gui)
{
GSList *l;
int i;
-
+
for (i = 0; i < 4; i++){
char buffer [80];
@@ -949,7 +949,7 @@ configure_group_dialog (ETableConfig *config, GladeXML *gui)
GTK_COMBO_BOX (config->group[i].combo), "", "");
snprintf (buffer, sizeof (buffer), "frame-group-%d", i + 1);
- config->group [i].frames =
+ config->group [i].frames =
glade_xml_get_widget (gui, buffer);
snprintf (
@@ -969,11 +969,11 @@ configure_group_dialog (ETableConfig *config, GladeXML *gui)
"checkbutton-group-%d", i+1);
config->group [i].view_check = glade_xml_get_widget (
gui, buffer);
-
+
config->group [i].e_table_config = config;
}
-
+
for (l = config->column_names; l; l = l->next){
char *label = l->data;
@@ -1211,7 +1211,7 @@ setup_gui (ETableConfig *config)
g_free (filename);
g_object_unref (global_store);
-
+
config->dialog_toplevel = glade_xml_get_widget (
gui, "e-table-config");
@@ -1284,7 +1284,7 @@ e_table_config_construct (ETableConfig *config,
g_return_val_if_fail (header != NULL, NULL);
g_return_val_if_fail (spec != NULL, NULL);
g_return_val_if_fail (state != NULL, NULL);
-
+
config->source_spec = spec;
config->source_state = state;
config->header = g_strdup (header);
@@ -1314,7 +1314,7 @@ e_table_config_construct (ETableConfig *config,
config_sort_info_update (config);
config_group_info_update (config);
config_fields_info_update (config);
-
+
return E_TABLE_CONFIG (config);
}
diff --git a/widgets/table/e-table-config.h b/widgets/table/e-table-config.h
index 1ece37aabf..ca81b5bb6d 100644
--- a/widgets/table/e-table-config.h
+++ b/widgets/table/e-table-config.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-config.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -49,7 +49,7 @@ typedef struct {
GtkWidget *view_check; /* Only for group dialog */
guint changed_id, toggled_id;
void *e_table_config;
-} ETableConfigSortWidgets;
+} ETableConfigSortWidgets;
typedef struct {
diff --git a/widgets/table/e-table-defines.h b/widgets/table/e-table-defines.h
index 71b59202e5..7048cfa8fa 100644
--- a/widgets/table/e-table-defines.h
+++ b/widgets/table/e-table-defines.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-defines.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-example-1.c b/widgets/table/e-table-example-1.c
index f482062c9e..d4fefa27ef 100644
--- a/widgets/table/e-table-example-1.c
+++ b/widgets/table/e-table-example-1.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-example-1.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -42,16 +42,16 @@
* the ETableSimple class. Instead of creating your own ETableModel
* class, you simply create a new object of the ETableSimple class. You
* give it a bunch of functions that act as callbacks.
- *
+ *
* You also get to pass a void * to ETableSimple and it gets passed to
* your callbacks. This would be for having multiple models of the same
* type. This is just an example though, so we statically define all the
* data and ignore the void *data parameter.
- *
+ *
* In our example we will be creating a table model with 6 columns and 10
* rows. This corresponds to having 6 different types of information and
* 10 different sets of data in our database.
- *
+ *
* The headers will be hard coded, as will be the example data.
*
*/
@@ -219,7 +219,7 @@ create_table (void)
e_table_model = e_table_simple_new (
my_col_count, my_row_count, my_value_at,
my_set_value_at, my_is_cell_editable,
- my_duplicate_value, my_free_value,
+ my_duplicate_value, my_free_value,
my_initialize_value, my_value_is_empty,
my_value_to_string,
NULL);
@@ -234,7 +234,7 @@ create_table (void)
* First we create the header.
*/
e_table_header = e_table_header_new ();
-
+
/*
* Next we have to build renderers for all of the columns.
* Since all our columns are text columns, we can simply use
@@ -243,7 +243,7 @@ create_table (void)
* each column.
*/
cell_left_just = e_cell_text_new (e_table_model, NULL, GTK_JUSTIFY_LEFT);
-
+
/*
* Next we create a column object for each view column and add
* them to the header. We don't create a column object for
@@ -299,7 +299,7 @@ main (int argc, char *argv [])
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
create_table ();
-
+
gtk_main ();
e_cursors_shutdown ();
diff --git a/widgets/table/e-table-example-2.c b/widgets/table/e-table-example-2.c
index 17126e7572..328be5fcde 100644
--- a/widgets/table/e-table-example-2.c
+++ b/widgets/table/e-table-example-2.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-example-2.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -165,7 +165,7 @@ my_value_at (ETableModel *etc, int col, int row, void *data)
static void
my_set_value_at (ETableModel *etc, int col, int row, const void *val, void *data)
{
- if (col == COLOR_COLUMN){
+ if (col == COLOR_COLUMN){
} else if (col == IMPORTANCE_COLUMN){
importance_data[row] = (gboolean) val;
} else {
@@ -280,14 +280,14 @@ create_table ()
First we create the header. */
e_table_header = e_table_header_new ();
-
+
/* Next we have to build renderers for all of the columns.
Since all our columns are text columns, we can simply use
the same renderer over and over again. If we had different
types of columns, we could use a different renderer for
each column. */
cell_left_just = e_cell_text_new (e_table_model, NULL, GTK_JUSTIFY_LEFT);
-
+
/* Next we create a column object for each view column and add
them to the header. We don't create a column object for
the importance column since it will not be shown. */
@@ -300,7 +300,7 @@ create_table ()
/* Add it to the header. */
e_table_header_add_column (e_table_header, ecol, i);
}
-
+
/* Next we add a special column for the check box. */
cell_checkbox = e_cell_checkbox_new ();
@@ -343,7 +343,7 @@ main (int argc, char *argv [])
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
create_table ();
-
+
gtk_main ();
e_cursors_shutdown ();
diff --git a/widgets/table/e-table-extras.h b/widgets/table/e-table-extras.h
index f0ae91eefc..78cdccf918 100644
--- a/widgets/table/e-table-extras.h
+++ b/widgets/table/e-table-extras.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-extras.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-field-chooser-dialog.c b/widgets/table/e-table-field-chooser-dialog.c
index b56096f4a4..eeb34dd6ef 100644
--- a/widgets/table/e-table-field-chooser-dialog.c
+++ b/widgets/table/e-table-field-chooser-dialog.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-field-chooser-dialog.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -101,13 +101,13 @@ e_table_field_chooser_dialog_init (ETableFieldChooserDialog *e_table_field_choos
widget = e_table_field_chooser_new();
e_table_field_chooser_dialog->etfc = E_TABLE_FIELD_CHOOSER(widget);
-
+
g_object_set(widget,
"dnd_code", e_table_field_chooser_dialog->dnd_code,
"full_header", e_table_field_chooser_dialog->full_header,
"header", e_table_field_chooser_dialog->header,
NULL);
-
+
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(e_table_field_chooser_dialog)->vbox),
widget, TRUE, TRUE, 0);
diff --git a/widgets/table/e-table-field-chooser-dialog.h b/widgets/table/e-table-field-chooser-dialog.h
index 930c68f1af..32012e4494 100644
--- a/widgets/table/e-table-field-chooser-dialog.h
+++ b/widgets/table/e-table-field-chooser-dialog.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-field-chooser-dialog.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -54,7 +54,7 @@ typedef struct _ETableFieldChooserDialogClass ETableFieldChooserDialogClass;
struct _ETableFieldChooserDialog
{
GtkDialog parent;
-
+
/* item specific fields */
ETableFieldChooser *etfc;
gchar *dnd_code;
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index d7da7e89da..e5d3afc201 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -171,10 +171,10 @@ etfci_reflow (GnomeCanvasItem *item, gint flags)
}
etfci->height = height;
-
+
if (old_height != etfci->height)
e_canvas_item_request_parent_reflow(item);
-
+
gnome_canvas_item_request_update(item);
}
@@ -184,7 +184,7 @@ etfci_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flag
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
double i2c [6];
ArtPoint c1, c2, i1, i2;
-
+
if (GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)->update)
(*GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)->update)(item, affine, clip_path, flags);
@@ -230,7 +230,7 @@ static void
etfci_drop_full_header (ETableFieldChooserItem *etfci)
{
GObject *header;
-
+
if (!etfci->full_header)
return;
@@ -249,7 +249,7 @@ etfci_drop_full_header (ETableFieldChooserItem *etfci)
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
}
-static void
+static void
full_header_structure_changed (ETableHeader *header, ETableFieldChooserItem *etfci)
{
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
@@ -280,7 +280,7 @@ static void
etfci_drop_table_header (ETableFieldChooserItem *etfci)
{
GObject *header;
-
+
if (!etfci->header)
return;
@@ -299,7 +299,7 @@ etfci_drop_table_header (ETableFieldChooserItem *etfci)
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
}
-static void
+static void
table_header_structure_changed (ETableHeader *header, ETableFieldChooserItem *etfci)
{
e_canvas_item_request_reflow(GNOME_CANVAS_ITEM(etfci));
@@ -404,7 +404,7 @@ etfci_drag_data_get (GtkWidget *widget,
}
static void
-etfci_drag_end (GtkWidget *canvas,
+etfci_drag_end (GtkWidget *canvas,
GdkDragContext *context,
ETableFieldChooserItem *etfci)
{
@@ -444,7 +444,7 @@ etfci_unrealize (GnomeCanvasItem *item)
etfci->drag_end_id = 0;
g_signal_handler_disconnect (item->canvas, etfci->drag_data_get_id);
etfci->drag_data_get_id = 0;
-
+
if (GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)->unrealize)
(*GNOME_CANVAS_ITEM_CLASS (etfci_parent_class)->unrealize)(item);
}
@@ -478,7 +478,7 @@ etfci_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int widt
continue;
y2 += e_table_header_compute_height (ecol, GTK_WIDGET (canvas));
-
+
if (y1 > (y + height))
break;
@@ -582,7 +582,7 @@ etfci_event (GnomeCanvasItem *item, GdkEvent *e)
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
GnomeCanvas *canvas = item->canvas;
int x, y;
-
+
switch (e->type){
case GDK_MOTION_NOTIFY:
gnome_canvas_w2c (canvas, e->motion.x, e->motion.y, &x, &y);
@@ -590,22 +590,22 @@ etfci_event (GnomeCanvasItem *item, GdkEvent *e)
if (etfci_maybe_start_drag (etfci, x, y))
etfci_start_drag (etfci, e, x, y);
break;
-
+
case GDK_BUTTON_PRESS:
gnome_canvas_w2c (canvas, e->button.x, e->button.y, &x, &y);
-
+
if (e->button.button == 1){
etfci->click_x = x;
etfci->click_y = y;
etfci->maybe_drag = TRUE;
}
break;
-
+
case GDK_BUTTON_RELEASE: {
etfci->maybe_drag = FALSE;
break;
}
-
+
default:
return FALSE;
}
@@ -671,7 +671,7 @@ etfci_init (ETableFieldChooserItem *etfci)
etfci->full_header = NULL;
etfci->header = NULL;
etfci->combined_header = NULL;
-
+
etfci->height = etfci->width = 0;
etfci->font_desc = NULL;
diff --git a/widgets/table/e-table-field-chooser-item.h b/widgets/table/e-table-field-chooser-item.h
index 374df211a5..f2e97750f5 100644
--- a/widgets/table/e-table-field-chooser-item.h
+++ b/widgets/table/e-table-field-chooser-item.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-field-chooser-item.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c
index e3031072f6..67fd47708b 100644
--- a/widgets/table/e-table-field-chooser.c
+++ b/widgets/table/e-table-field-chooser.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-field-chooser.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -95,7 +95,7 @@ ensure_nonzero_step_increments (ETableFieldChooser *etfc)
/*
it looks pretty complicated to get height of column header
so use 16 pixels which should be OK
- */
+ */
if (va)
va->step_increment = 16.0;
if (ha)
@@ -134,7 +134,7 @@ static void resize(GnomeCanvas *canvas, ETableFieldChooser *etfc)
gnome_canvas_item_set( etfc->rect,
"x2", (double) etfc->last_alloc.width,
"y2", (double) height,
- NULL );
+ NULL );
ensure_nonzero_step_increments (etfc);
}
@@ -206,7 +206,7 @@ e_table_field_chooser_dispose (GObject *object)
if (etfc->full_header)
g_object_unref (etfc->full_header);
etfc->full_header = NULL;
-
+
if (etfc->header)
g_object_unref (etfc->header);
etfc->header = NULL;
diff --git a/widgets/table/e-table-field-chooser.h b/widgets/table/e-table-field-chooser.h
index 992ed189b4..f6dca643d7 100644
--- a/widgets/table/e-table-field-chooser.h
+++ b/widgets/table/e-table-field-chooser.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-field-chooser.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -51,7 +51,7 @@ typedef struct _ETableFieldChooserClass ETableFieldChooserClass;
struct _ETableFieldChooser
{
GtkVBox parent;
-
+
/* item specific fields */
GladeXML *gui;
GnomeCanvas *canvas;
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 114bcbfc04..57dd2d18a8 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -128,7 +128,7 @@ etgc_dispose (GObject *object)
G_OBJECT_CLASS (etgc_parent_class)->dispose (object);
}
-/**
+/**
* e_table_group_container_construct
* @parent: The %GnomeCanvasGroup to create a child of.
* @etgc: The %ETableGroupContainer.
@@ -168,7 +168,7 @@ e_table_group_container_construct (GnomeCanvasGroup *parent, ETableGroupContaine
etgc->open = TRUE;
}
-/**
+/**
* e_table_group_container_new
* @parent: The %GnomeCanvasGroup to create a child of.
* @full_header: The full header of the %ETable.
@@ -191,7 +191,7 @@ e_table_group_container_new (GnomeCanvasGroup *parent, ETableHeader *full_header
ETableGroupContainer *etgc;
g_return_val_if_fail (parent != NULL, NULL);
-
+
etgc = g_object_new (E_TABLE_GROUP_CONTAINER_TYPE, NULL);
e_table_group_container_construct (parent, etgc, full_header, header,
@@ -213,8 +213,8 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event)
switch (event->type) {
case GDK_KEY_PRESS:
- if (event->key.keyval == GDK_Tab ||
- event->key.keyval == GDK_KP_Tab ||
+ if (event->key.keyval == GDK_Tab ||
+ event->key.keyval == GDK_KP_Tab ||
event->key.keyval == GDK_ISO_Left_Tab) {
change_focus = TRUE;
use_col = TRUE;
@@ -248,7 +248,7 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event)
use_col = FALSE;
direction = E_FOCUS_START;
}
- if (change_focus){
+ if (change_focus){
GList *list;
for (list = etgc->children; list; list = list->next) {
ETableGroupContainerChildNode *child_node;
@@ -263,12 +263,12 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event)
old_col = 0;
if (start_col == -1)
start_col = e_table_header_count (e_table_group_get_header (child)) - 1;
-
+
if (direction == E_FOCUS_END)
list = list->prev;
else
list = list->next;
-
+
if (list) {
child_node = (ETableGroupContainerChildNode *)list->data;
child = child_node->child;
@@ -311,7 +311,7 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event)
return GNOME_CANVAS_ITEM_CLASS (etgc_parent_class)->event (item, event);
}
return return_val;
-
+
}
/* Realize handler for the text item */
@@ -354,7 +354,7 @@ compute_text (ETableGroupContainer *etgc, ETableGroupContainerChildNode *child_n
child_node->string,
(gint) child_node->count);
}
- gnome_canvas_item_set (child_node->text,
+ gnome_canvas_item_set (child_node->text,
"text", text,
NULL);
g_free (text);
@@ -848,7 +848,7 @@ etgc_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *ps
case PROP_HEIGHT:
g_value_set_double (value, etgc->height);
break;
- case PROP_WIDTH:
+ case PROP_WIDTH:
g_value_set_double (value, etgc->width);
break;
case PROP_MINIMUM_WIDTH:
@@ -894,7 +894,7 @@ etgc_class_init (ETableGroupContainerClass *klass)
g_object_class_install_property (object_class, PROP_TABLE_ALTERNATING_ROW_COLORS,
g_param_spec_boolean ("alternating_row_colors",
_( "Alternating Row Colors" ),
- _( "Alternating Row Colors" ),
+ _( "Alternating Row Colors" ),
FALSE,
G_PARAM_WRITABLE));
@@ -988,14 +988,14 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
if (frozen)
return;
-
+
if (GTK_OBJECT_FLAGS(etgc)& GNOME_CANVAS_ITEM_REALIZED){
gdouble running_height = 0;
gdouble running_width = 0;
gdouble old_height;
gdouble old_width;
-
+
old_height = etgc->height;
old_width = etgc->width;
if (etgc->children == NULL){
@@ -1004,7 +1004,7 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
gdouble extra_height = 0;
gdouble item_height = 0;
gdouble item_width = 0;
-
+
if (etgc->font_desc) {
PangoContext *context;
PangoFontMetrics *metrics;
@@ -1017,15 +1017,15 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
BUTTON_PADDING * 2;
pango_font_metrics_unref (metrics);
}
-
+
extra_height = MAX(extra_height, BUTTON_HEIGHT + BUTTON_PADDING * 2);
-
+
running_height = extra_height;
-
+
for ( list = etgc->children; list; list = g_list_next (list)){
ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
ETableGroup *child = child_node->child;
-
+
g_object_get (child,
"width", &item_width,
NULL);
@@ -1039,22 +1039,22 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
g_object_get (child,
"height", &item_height,
NULL);
-
+
e_canvas_item_move_absolute (GNOME_CANVAS_ITEM(child_node->text),
GROUP_INDENT,
running_height - BUTTON_PADDING);
-
+
e_canvas_item_move_absolute (GNOME_CANVAS_ITEM(child),
GROUP_INDENT,
running_height);
-
+
gnome_canvas_item_set (GNOME_CANVAS_ITEM(child_node->rect),
"x1", (double) 0,
"x2", (double) running_width + GROUP_INDENT,
"y1", (double) running_height - extra_height,
"y2", (double) running_height + item_height,
NULL);
-
+
running_height += item_height + extra_height;
}
running_height -= extra_height;
@@ -1142,7 +1142,7 @@ e_table_group_container_print_page (EPrintable *ep,
gdouble height,
gboolean quantize,
ETGCPrintContext *groupcontext)
-{
+{
cairo_t *cr;
gdouble yd = height;
gdouble child_height;
@@ -1156,7 +1156,7 @@ e_table_group_container_print_page (EPrintable *ep,
child_printable = groupcontext->child_printable;
child = groupcontext->child;
yd = 6.5 * 72;
- height = 5 * 72;
+ height = 5 * 72;
if (child_printable) {
if (child)
@@ -1185,7 +1185,7 @@ e_table_group_container_print_page (EPrintable *ep,
pango_font_description_free (desc);
while (1) {
- child_height = e_printable_height(child_printable, context, width,yd + 2 * TEXT_AREA_HEIGHT, quantize);
+ child_height = e_printable_height(child_printable, context, width,yd + 2 * TEXT_AREA_HEIGHT, quantize);
cr = gtk_print_context_get_cairo_context (context);
cairo_save (cr);
cairo_rectangle (cr, 0, 0, width,TEXT_AREA_HEIGHT);
@@ -1198,7 +1198,7 @@ e_table_group_container_print_page (EPrintable *ep,
cairo_rectangle (cr, 0, 0, width, TEXT_AREA_HEIGHT);
cairo_clip (cr);
cairo_restore (cr);
-
+
cairo_move_to(cr, 0, 0);
if (groupcontext->etgc->ecol->text)
string = g_strdup_printf ("%s : %s (%d item%s)",
@@ -1214,13 +1214,13 @@ e_table_group_container_print_page (EPrintable *ep,
pango_layout_set_text (layout, string, -1);
pango_cairo_show_layout (cr, layout);
g_free(string);
-
+
cairo_translate(cr, 2 * TEXT_AREA_HEIGHT, TEXT_AREA_HEIGHT) ;
cairo_move_to(cr, 0, 0);
cairo_rectangle (cr, 0, 0, width - 2 * TEXT_AREA_HEIGHT,child_height);
cairo_clip(cr);
-
- e_printable_print_page (child_printable, context, width-2 * TEXT_AREA_HEIGHT, 0, quantize);
+
+ e_printable_print_page (child_printable, context, width-2 * TEXT_AREA_HEIGHT, 0, quantize);
yd += child_height + TEXT_AREA_HEIGHT;
if (e_printable_data_left(child_printable))
@@ -1301,7 +1301,7 @@ e_table_group_container_height (EPrintable *ep,
if (yd != -1 && yd < TEXT_AREA_HEIGHT)
return 0;
-
+
while (1) {
child_height = e_printable_height(child_printable, context, width - 36, yd - (yd == -1 ? 0 : TEXT_AREA_HEIGHT), quantize);
@@ -1319,7 +1319,7 @@ e_table_group_container_height (EPrintable *ep,
if (!child) {
break;
}
-
+
child_node = child->data;
if (child_printable)
g_object_unref (child_printable);
@@ -1366,27 +1366,27 @@ e_table_group_container_will_fit (EPrintable *ep,
e_printable_reset(child_printable);
}
}
-
+
if (yd != -1 && yd < TEXT_AREA_HEIGHT)
will_fit = FALSE;
else {
while (1) {
child_height = e_printable_height(child_printable, context, width - 36, yd - (yd == -1 ? 0 : TEXT_AREA_HEIGHT), quantize);
-
+
if (yd != -1) {
if (!e_printable_will_fit(child_printable, context, width - 36, yd - (yd == -1 ? 0 : TEXT_AREA_HEIGHT), quantize)) {
will_fit = FALSE;
break;
}
-
+
yd += child_height + TEXT_AREA_HEIGHT;
}
-
+
child = child->next;
if (!child) {
break;
}
-
+
child_node = child->data;
if (child_printable)
g_object_unref (child_printable);
@@ -1407,7 +1407,7 @@ e_table_group_container_will_fit (EPrintable *ep,
static void
e_table_group_container_printable_destroy (gpointer data,
GObject *where_object_was)
-
+
{
ETGCPrintContext *groupcontext = data;
diff --git a/widgets/table/e-table-group-container.h b/widgets/table/e-table-group-container.h
index a4f203b596..999e5a154e 100644
--- a/widgets/table/e-table-group-container.h
+++ b/widgets/table/e-table-group-container.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-group-container.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c
index 17dabeaee3..c21a5ffcbd 100644
--- a/widgets/table/e-table-group-leaf.c
+++ b/widgets/table/e-table-group-leaf.c
@@ -570,7 +570,7 @@ etgl_class_init (ETableGroupLeafClass *klass)
g_object_class_install_property (object_class, PROP_TABLE_ALTERNATING_ROW_COLORS,
g_param_spec_boolean ("alternating_row_colors",
_( "Alternating Row Colors" ),
- _( "Alternating Row Colors" ),
+ _( "Alternating Row Colors" ),
FALSE,
G_PARAM_WRITABLE));
diff --git a/widgets/table/e-table-group-leaf.h b/widgets/table/e-table-group-leaf.h
index b7139d98c5..1a8a3ebb3d 100644
--- a/widgets/table/e-table-group-leaf.h
+++ b/widgets/table/e-table-group-leaf.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-group-leaf.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -40,7 +40,7 @@ G_BEGIN_DECLS
typedef struct {
ETableGroup group;
- /*
+ /*
* Item.
*/
ETableItem *item;
diff --git a/widgets/table/e-table-group.h b/widgets/table/e-table-group.h
index ec57184c26..a7993dc6f8 100644
--- a/widgets/table/e-table-group.h
+++ b/widgets/table/e-table-group.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-group.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -48,7 +48,7 @@ typedef struct {
*/
ETableHeader *full_header;
ETableHeader *header;
-
+
/*
* The model we pull data from.
*/
@@ -61,7 +61,7 @@ typedef struct {
guint transparent : 1;
guint has_focus : 1;
-
+
guint frozen : 1;
} ETableGroup;
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index a477f127ae..70e56a1933 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -85,7 +85,7 @@ static void ethi_drop_table_header (ETableHeaderItem *ethi);
/*
* They display the arrows for the drop location.
*/
-
+
static GtkWidget *arrow_up, *arrow_down;
/*
@@ -148,7 +148,7 @@ ethi_dispose (GObject *object){
if (ethi->config)
g_object_unref (ethi->config);
ethi->config = NULL;
-
+
if (G_OBJECT_CLASS (ethi_parent_class)->dispose)
(*G_OBJECT_CLASS (ethi_parent_class)->dispose) (object);
}
@@ -162,7 +162,7 @@ e_table_header_item_get_height (ETableHeaderItem *ethi)
g_return_val_if_fail (ethi != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER_ITEM (ethi), 0);
-
+
eth = ethi->eth;
numcols = e_table_header_count (eth);
@@ -186,10 +186,10 @@ static void
ethi_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
{
ETableHeaderItem *ethi = E_TABLE_HEADER_ITEM (item);
-
+
double i2c [6];
ArtPoint c1, c2, i1, i2;
-
+
if (GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update)
(*GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->update)(item, affine, clip_path, flags);
@@ -242,7 +242,7 @@ static void
ethi_drop_table_header (ETableHeaderItem *ethi)
{
GObject *header;
-
+
if (!ethi->eth)
return;
@@ -255,7 +255,7 @@ ethi_drop_table_header (ETableHeaderItem *ethi)
ethi->width = 0;
}
-static void
+static void
structure_changed (ETableHeader *header, ETableHeaderItem *ethi)
{
gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(ethi));
@@ -395,11 +395,11 @@ ethi_find_col_by_x (ETableHeaderItem *ethi, int x)
const int cols = e_table_header_count (ethi->eth);
int x1 = 0;
int col;
-
+
d(g_print ("%s:%d: x = %d, x1 = %d\n", __FUNCTION__, __LINE__, x, x1));
x1 += ethi->group_indent_width;
-
+
if (x < x1) {
d(g_print ("%s:%d: Returning 0\n", __FUNCTION__, __LINE__));
return 0;
@@ -427,7 +427,7 @@ ethi_find_col_by_x_nearest (ETableHeaderItem *ethi, int x)
int col;
x1 += ethi->group_indent_width;
-
+
if (x < x1)
return 0;
@@ -452,7 +452,7 @@ ethi_remove_drop_marker (ETableHeaderItem *ethi)
gtk_widget_hide (arrow_up);
gtk_widget_hide (arrow_down);
-
+
ethi->drag_mark = -1;
}
@@ -463,7 +463,7 @@ make_shaped_window_from_xpm (const char **xpm)
GdkPixmap *pixmap;
GdkBitmap *bitmap;
GtkWidget *win, *pix;
-
+
pixbuf = gdk_pixbuf_new_from_xpm_data (xpm);
gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &bitmap, 128);
g_object_unref (pixbuf);
@@ -476,10 +476,10 @@ make_shaped_window_from_xpm (const char **xpm)
gtk_container_add (GTK_CONTAINER (win), pix);
gtk_widget_shape_combine_mask (win, bitmap, 0, 0);
gtk_widget_pop_colormap ();
-
+
g_object_unref (pixmap);
g_object_unref (bitmap);
-
+
return win;
}
@@ -488,7 +488,7 @@ ethi_add_drop_marker (ETableHeaderItem *ethi, int col, gboolean recreate)
{
int rx, ry;
int x;
-
+
if (!recreate && ethi->drag_mark == col)
return;
@@ -497,7 +497,7 @@ ethi_add_drop_marker (ETableHeaderItem *ethi, int col, gboolean recreate)
x = e_table_header_col_diff (ethi->eth, 0, col);
if (col > 0)
x += ethi->group_indent_width;
-
+
if (!arrow_up){
arrow_up = make_shaped_window_from_xpm (arrow_up_xpm);
arrow_down = make_shaped_window_from_xpm (arrow_down_xpm);
@@ -526,18 +526,18 @@ static void
ethi_add_destroy_marker (ETableHeaderItem *ethi)
{
double x1;
-
+
if (ethi->remove_item)
gtk_object_destroy (GTK_OBJECT (ethi->remove_item));
if (!ethi->stipple)
ethi->stipple = gdk_bitmap_create_from_data (
NULL, gray50_bits, gray50_width, gray50_height);
-
+
x1 = (double) e_table_header_col_diff (ethi->eth, 0, ethi->drag_col);
if (ethi->drag_col > 0)
x1 += ethi->group_indent_width;
-
+
ethi->remove_item = gnome_canvas_item_new (
GNOME_CANVAS_GROUP (GNOME_CANVAS_ITEM (ethi)->canvas->root),
gnome_canvas_rect_get_type (),
@@ -557,7 +557,7 @@ ethi_remove_destroy_marker (ETableHeaderItem *ethi)
{
if (!ethi->remove_item)
return;
-
+
gtk_object_destroy (GTK_OBJECT (ethi->remove_item));
ethi->remove_item = NULL;
}
@@ -595,16 +595,16 @@ do_drag_motion(ETableHeaderItem *ethi,
(y >= 0) && (y <= (ethi->height))){
int col;
d(g_print("In header\n"));
-
+
col = ethi_find_col_by_x_nearest (ethi, x);
if (ethi->drag_col != -1 && (col == ethi->drag_col || col == ethi->drag_col + 1)) {
if (ethi->drag_col != -1)
ethi_remove_destroy_marker (ethi);
-
+
ethi_remove_drop_marker (ethi);
gdk_drag_status (context, context->suggested_action, time);
- }
+ }
else if (col != -1){
if (ethi->drag_col != -1)
ethi_remove_destroy_marker (ethi);
@@ -816,7 +816,7 @@ ethi_drag_data_get (GtkWidget *canvas,
{
if (ethi->drag_col != -1) {
ETableCol *ecol = e_table_header_get_column (ethi->eth, ethi->drag_col);
-
+
gchar *string = g_strdup_printf("%d", ecol->col_idx);
gtk_selection_data_set(selection_data,
GDK_SELECTION_TYPE_STRING,
@@ -840,13 +840,13 @@ ethi_drag_drop (GtkWidget *canvas,
if ((x >= 0) && (x <= (ethi->width)) &&
(y >= 0) && (y <= (ethi->height))){
int col;
-
+
col = ethi_find_col_by_x_nearest (ethi, x);
-
+
ethi_add_drop_marker (ethi, col, FALSE);
ethi->drop_col = col;
-
+
if (col != -1) {
char *target = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code);
d(g_print ("ethi - %s\n", target));
@@ -875,7 +875,7 @@ ethi_realize (GnomeCanvasItem *item)
{ TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
};
-
+
if (GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)-> realize)
(*GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->realize)(item);
@@ -889,7 +889,7 @@ ethi_realize (GnomeCanvasItem *item)
gtk_drag_dest_set (GTK_WIDGET (item->canvas), 0,
ethi_drop_types, ELEMENTS (ethi_drop_types),
GDK_ACTION_MOVE);
- g_free(ethi_drop_types[0].target);
+ g_free(ethi_drop_types[0].target);
/* Drop signals */
ethi->drag_motion_id = g_signal_connect (item->canvas, "drag_motion",
@@ -930,7 +930,7 @@ ethi_unrealize (GnomeCanvasItem *item)
g_object_unref (ethi->stipple);
ethi->stipple = NULL;
}
-
+
if (GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->unrealize)
(*GNOME_CANVAS_ITEM_CLASS (ethi_parent_class)->unrealize)(item);
}
@@ -951,19 +951,19 @@ ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width
int i;
for (i = 0; i < length; i++) {
ETableSortColumn column = e_table_sort_info_grouping_get_nth(ethi->sort_info, i);
- g_hash_table_insert (arrows,
+ g_hash_table_insert (arrows,
GINT_TO_POINTER ((gint) column.column),
GINT_TO_POINTER (column.ascending ?
- E_TABLE_COL_ARROW_DOWN :
+ E_TABLE_COL_ARROW_DOWN :
E_TABLE_COL_ARROW_UP));
}
length = e_table_sort_info_sorting_get_count(ethi->sort_info);
for (i = 0; i < length; i++) {
ETableSortColumn column = e_table_sort_info_sorting_get_nth(ethi->sort_info, i);
- g_hash_table_insert (arrows,
+ g_hash_table_insert (arrows,
GINT_TO_POINTER ((gint) column.column),
GINT_TO_POINTER (column.ascending ?
- E_TABLE_COL_ARROW_DOWN :
+ E_TABLE_COL_ARROW_DOWN :
E_TABLE_COL_ARROW_UP));
}
}
@@ -976,9 +976,9 @@ ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width
int col_width;
col_width = ecol->width;
-
+
x2 += col_width;
-
+
if (x1 > (x + width))
break;
@@ -1029,7 +1029,7 @@ is_pointer_on_division (ETableHeaderItem *ethi, int pos, int *the_total, int *re
if (col == 0)
total += ethi->group_indent_width;
-
+
total += ecol->width;
if ((total - TOLERANCE < pos)&& (pos < total + TOLERANCE)){
@@ -1058,7 +1058,7 @@ set_cursor (ETableHeaderItem *ethi, int pos)
int col;
GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas);
gboolean resizable = FALSE;
-
+
/* We might be invoked before we are realized */
if (!canvas->window)
return;
@@ -1084,7 +1084,7 @@ set_cursor (ETableHeaderItem *ethi, int pos)
}
}
}
-
+
if (resizable)
e_cursor_set (canvas->window, E_CURSOR_SIZE_X);
else
@@ -1111,7 +1111,7 @@ ethi_maybe_start_drag (ETableHeaderItem *ethi, GdkEventMotion *event)
ethi->maybe_drag = FALSE;
return FALSE;
}
-
+
if (MAX (abs (ethi->click_x - event->x),
abs (ethi->click_y - event->y)) <= 3)
return FALSE;
@@ -1149,10 +1149,10 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
ethi->sort_info, i);
group_indent ++;
g_hash_table_insert (
- arrows,
+ arrows,
GINT_TO_POINTER ((gint) column.column),
GINT_TO_POINTER (column.ascending ?
- E_TABLE_COL_ARROW_DOWN :
+ E_TABLE_COL_ARROW_DOWN :
E_TABLE_COL_ARROW_UP));
}
length = e_table_sort_info_sorting_get_count(ethi->sort_info);
@@ -1162,10 +1162,10 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
ethi->sort_info, i);
g_hash_table_insert (
- arrows,
+ arrows,
GINT_TO_POINTER ((gint) column.column),
GINT_TO_POINTER (column.ascending ?
- E_TABLE_COL_ARROW_DOWN :
+ E_TABLE_COL_ARROW_DOWN :
E_TABLE_COL_ARROW_UP));
}
}
@@ -1363,15 +1363,15 @@ ethi_popup_field_chooser(GtkWidget *widget, EthiHeaderInfo *info)
if (etfcd) {
gtk_window_present (GTK_WINDOW (etfcd));
-
+
return;
}
-
+
info->ethi->etfcd.widget = e_table_field_chooser_dialog_new ();
etfcd = info->ethi->etfcd.widget;
g_object_add_weak_pointer (G_OBJECT (etfcd), &info->ethi->etfcd.pointer);
-
+
g_object_set (info->ethi->etfcd.widget,
"full_header", info->ethi->full_header,
"header", info->ethi->eth,
@@ -1397,7 +1397,7 @@ ethi_popup_best_fit(GtkWidget *widget, EthiHeaderInfo *info)
info->col, &width);
/* Add 10 to stop it from "..."ing */
e_table_header_set_size (ethi->eth, info->col, width + 10);
-
+
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(ethi));
}
@@ -1435,7 +1435,7 @@ ethi_popup_customize_view(GtkWidget *widget, EthiHeaderInfo *info)
ETableHeaderItem *ethi = info->ethi;
ETableState *state;
ETableSpecification *spec;
-
+
if (ethi->config)
e_table_config_raise (E_TABLE_CONFIG (ethi->config));
else {
@@ -1526,7 +1526,7 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
ETableSortColumn column;
gboolean ascending = TRUE;
d( g_print("ethi_header_context_menu: \n") );
-
+
info->ethi = ethi;
info->col = ethi_find_col_by_x (ethi, event->x);
col = e_table_header_get_column (ethi->eth, info->col);
@@ -1534,11 +1534,11 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
popup = e_popup_menu_create_with_domain (ethi_context_menu,
1 +
0 +
- ((ethi->table || ethi->tree) ? 0 : 4) +
+ ((ethi->table || ethi->tree) ? 0 : 4) +
((e_table_header_count (ethi->eth) > 1) ? 0 : 8),
((e_table_sort_info_get_can_group (ethi->sort_info)) ? 0 : 16) +
128, info, GETTEXT_PACKAGE);
-
+
menu_item = gtk_menu_item_new_with_label (_("Sort By"));
gtk_widget_show (menu_item);
sub_menu = gtk_menu_new ();
@@ -1555,7 +1555,7 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
sort_col = column.column;
ascending = column.ascending;
}
-
+
/* Custom */
menu_item = gtk_check_menu_item_new_with_label (_("Custom"));
gtk_widget_show (menu_item);
@@ -1564,7 +1564,7 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE);
gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (menu_item), TRUE);
g_signal_connect (menu_item, "activate", G_CALLBACK (popup_custom), info);
-
+
/* Show a seperator */
menu_item = gtk_separator_menu_item_new ();
gtk_widget_show (menu_item);
@@ -1577,17 +1577,17 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
if (!ethi->full_header->columns[ncol]->sortable ||
ethi->full_header->columns[ncol]->disabled)
continue;
-
+
if (ncol == sort_col) {
text = g_strdup_printf("%s (%s)", ethi->full_header->columns[ncol]->text, ascending ? _("Ascending"):_("Descending"));
menu_item = gtk_check_menu_item_new_with_label (text);
g_free (text);
} else
menu_item = gtk_check_menu_item_new_with_label (ethi->full_header->columns[ncol]->text);
-
+
gtk_widget_show (menu_item);
gtk_menu_shell_prepend (GTK_MENU_SHELL (sub_menu), menu_item);
-
+
if (ncol == sort_col)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE);
gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (menu_item), TRUE);
@@ -1615,13 +1615,13 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
int length;
int i;
gboolean found = FALSE;
-
+
if (col == NULL)
return;
if (col->sortable)
model_col = col->col_idx;
-
+
length = e_table_sort_info_grouping_get_count(ethi->sort_info);
for (i = 0; i < length; i++) {
ETableSortColumn column = e_table_sort_info_grouping_get_nth(ethi->sort_info, i);
@@ -1635,7 +1635,7 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
break;
}
}
-
+
if (!found) {
length = e_table_sort_info_sorting_get_count(ethi->sort_info);
for (i = 0; i < length; i++) {
@@ -1643,7 +1643,7 @@ ethi_change_sort_state (ETableHeaderItem *ethi, ETableCol *col)
if (model_col == column.column || model_col == -1){
int ascending = column.ascending;
-
+
if (ascending == 0 && model_col != -1){
/*
* This means the user has clicked twice
@@ -1691,7 +1691,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
const gboolean resizing = ETHI_RESIZING (ethi);
int x, y, start, col;
int was_maybe_drag = 0;
-
+
switch (e->type){
case GDK_ENTER_NOTIFY:
convert (canvas, e->crossing.x, e->crossing.y, &x, &y);
@@ -1702,17 +1702,17 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
gdk_window_set_cursor (GTK_WIDGET (canvas)->window, NULL);
/* e_cursor_set (GTK_WIDGET (canvas)->window, E_CURSOR_ARROW);*/
break;
-
+
case GDK_MOTION_NOTIFY:
convert (canvas, e->motion.x, e->motion.y, &x, &y);
if (resizing){
int new_width;
-
+
if (ethi->resize_guide == NULL){
/* Quick hack until I actually bind the views */
ethi->resize_guide = GINT_TO_POINTER (1);
-
+
gnome_canvas_item_grab (item,
GDK_POINTER_MOTION_MASK |
GDK_BUTTON_RELEASE_MASK,
@@ -1730,16 +1730,16 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
} else
set_cursor (ethi, x);
break;
-
+
case GDK_BUTTON_PRESS:
if (e->button.button > 3)
return FALSE;
convert (canvas, e->button.x, e->button.y, &x, &y);
-
+
if (is_pointer_on_division (ethi, x, &start, &col) && e->button.button == 1){
ETableCol *ecol;
-
+
/*
* Record the important bits.
*
@@ -1748,7 +1748,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
* other event handlers).
*/
ecol = e_table_header_get_column (ethi->eth, col);
-
+
if (!ecol->resizable)
break;
ethi->resize_col = col;
@@ -1769,11 +1769,11 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
ethi_button_pressed (ethi, &e->button);
}
break;
-
+
case GDK_2BUTTON_PRESS:
if (!resizing)
break;
-
+
if (e->button.button != 1)
break;
else {
@@ -1788,12 +1788,12 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
ethi->maybe_drag = FALSE;
}
break;
-
+
case GDK_BUTTON_RELEASE: {
gboolean needs_ungrab = FALSE;
-
+
was_maybe_drag = ethi->maybe_drag;
-
+
ethi->maybe_drag = FALSE;
if (ethi->resize_col != -1){
@@ -1801,11 +1801,11 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
ethi_end_resize (ethi);
} else if (was_maybe_drag && ethi->sort_info) {
ETableCol *ecol;
-
+
ecol = e_table_header_get_column (ethi->eth, ethi_find_col_by_x (ethi, e->button.x));
ethi_change_sort_state (ethi, ecol);
}
-
+
if (needs_ungrab)
gnome_canvas_item_ungrab (item, e->button.time);
@@ -1816,15 +1816,15 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
EthiHeaderInfo *info = g_new(EthiHeaderInfo, 1);
ETableCol *ecol;
GtkMenu *popup;
-
+
info->ethi = ethi;
info->col = ethi->selected_col;
ecol = e_table_header_get_column (ethi->eth, info->col);
-
+
popup = e_popup_menu_create_with_domain (ethi_context_menu,
1 +
(ecol->sortable ? 0 : 2) +
- ((ethi->table || ethi->tree) ? 0 : 4) +
+ ((ethi->table || ethi->tree) ? 0 : 4) +
((e_table_header_count (ethi->eth) > 1) ? 0 : 8),
((e_table_sort_info_get_can_group (ethi->sort_info)) ? 0 : 16) +
128, info, GETTEXT_PACKAGE);
@@ -1834,7 +1834,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
e_popup_menu (popup, NULL);
} else if (e->key.keyval == GDK_space) {
ETableCol *ecol;
-
+
ecol = e_table_header_get_column (ethi->eth, ethi->selected_col);
ethi_change_sort_state (ethi, ecol);
} else if ((e->key.keyval == GDK_Right) || (e->key.keyval == GDK_KP_Right)) {
@@ -1842,7 +1842,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
if ((ethi->selected_col < 0) || (ethi->selected_col >= ethi->eth->col_count - 1))
ethi->selected_col = 0;
- else
+ else
ethi->selected_col++;
ecol = e_table_header_get_column (ethi->eth, ethi->selected_col);
ethi_change_sort_state (ethi, ecol);
@@ -1851,13 +1851,13 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
if ((ethi->selected_col <= 0) || (ethi->selected_col >= ethi->eth->col_count))
ethi->selected_col = ethi->eth->col_count - 1;
- else
+ else
ethi->selected_col--;
ecol = e_table_header_get_column (ethi->eth, ethi->selected_col);
ethi_change_sort_state (ethi, ecol);
}
break;
-
+
default:
return FALSE;
}
@@ -1966,7 +1966,7 @@ ethi_init (ETableHeaderItem *ethi)
ethi->drag_col = -1;
ethi->drag_mark = -1;
-
+
ethi->sort_info = NULL;
ethi->sort_info_changed_id = 0;
diff --git a/widgets/table/e-table-header-item.h b/widgets/table/e-table-header-item.h
index fe3733bbdf..824c6e0178 100644
--- a/widgets/table/e-table-header-item.h
+++ b/widgets/table/e-table-header-item.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-header-item.h
* Copyright 1999, 2000, 2001, Ximian, Inc.
*
@@ -55,7 +55,7 @@ typedef struct {
int resize_col;
int resize_start_pos;
int resize_min_width;
-
+
GtkObject *resize_guide;
int group_indent_width;
@@ -83,7 +83,7 @@ typedef struct {
* For column sorting info
*/
ETableSortInfo *sort_info;
-
+
guint scroll_direction : 4;
int last_drop_x;
int last_drop_y;
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index c36e8d11b3..0cc6c65030 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-header-utils.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -232,13 +232,13 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc,
* @str: the string we're drawing, passed in so we can change the layout if it needs eliding.
* @max_width: Maximum width in which the string must fit.
* @center: Whether to center the string in the available area if it does fit.
- *
+ *
* Draws a string, possibly trimming it so that it fits inside the specified
* maximum width. If it does not fit, an elision indicator is drawn after the
* last character that does fit.
**/
static void
-e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget,
+e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget,
int x, int y, PangoLayout *layout, char *str,
int max_width, gboolean center)
{
@@ -317,7 +317,7 @@ e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget,
* @button_width: Width for the complete button.
* @button_height: Height for the complete button.
* @arrow: Arrow type to use as a sort indicator.
- *
+ *
* Draws a button suitable for a table header.
**/
void
@@ -462,7 +462,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
g_object_unref (pixmap);
}
} else {
- e_table_draw_elided_string (drawable, gc, widget,
+ e_table_draw_elided_string (drawable, gc, widget,
inner_x, inner_y,
layout, ecol->text, inner_width, TRUE);
}
diff --git a/widgets/table/e-table-header-utils.h b/widgets/table/e-table-header-utils.h
index 2b44309eec..084291c39d 100644
--- a/widgets/table/e-table-header-utils.h
+++ b/widgets/table/e-table-header-utils.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-header-utils.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index 2a4e77014a..535a52c0aa 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -115,7 +115,7 @@ enqueue (ETableHeader *eth, int column, int width)
store = g_new(struct two_ints, 1);
store->column = column;
store->width = width;
-
+
eth->change_tail = g_slist_last(g_slist_append(eth->change_tail, store));
if (!eth->change_queue)
eth->change_queue = eth->change_tail;
@@ -139,7 +139,7 @@ eth_do_remove (ETableHeader *eth, int idx, gboolean do_unref)
{
if (do_unref)
g_object_unref (eth->columns [idx]);
-
+
memmove (&eth->columns [idx], &eth->columns [idx+1],
sizeof (ETableCol *) * (eth->col_count - idx - 1));
eth->col_count--;
@@ -151,7 +151,7 @@ eth_finalize (GObject *object)
ETableHeader *eth = E_TABLE_HEADER (object);
const int cols = eth->col_count;
int i;
-
+
if (eth->sort_info) {
if (eth->sort_info_group_change_id)
g_signal_handler_disconnect(G_OBJECT(eth->sort_info),
@@ -169,7 +169,7 @@ eth_finalize (GObject *object)
g_slist_free(eth->change_queue);
eth->change_queue = NULL;
}
-
+
/*
* Destroy columns
*/
@@ -214,7 +214,7 @@ eth_set_property (GObject *object, guint prop_id, const GValue *val, GParamSpec
eth->sort_info = E_TABLE_SORT_INFO(g_value_get_object (val));
if (eth->sort_info) {
g_object_ref(eth->sort_info);
- eth->sort_info_group_change_id
+ eth->sort_info_group_change_id
= g_signal_connect(G_OBJECT(eth->sort_info), "group_info_changed",
G_CALLBACK(eth_group_info_changed), eth);
}
@@ -259,21 +259,21 @@ e_table_header_class_init (ETableHeaderClass *klass)
g_object_class_install_property (
object_class, PROP_WIDTH,
- g_param_spec_double ("width", "Width", "Width",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
+ g_param_spec_double ("width", "Width", "Width",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
g_object_class_install_property (
object_class, PROP_WIDTH_EXTRAS,
- g_param_spec_double ("width_extras", "Width of Extras", "Width of Extras",
- 0.0, G_MAXDOUBLE, 0.0,
- G_PARAM_READWRITE));
+ g_param_spec_double ("width_extras", "Width of Extras", "Width of Extras",
+ 0.0, G_MAXDOUBLE, 0.0,
+ G_PARAM_READWRITE));
g_object_class_install_property (
object_class, PROP_SORT_INFO,
- g_param_spec_object ("sort_info", "Sort Info", "Sort Info",
+ g_param_spec_object ("sort_info", "Sort Info", "Sort Info",
E_TABLE_SORT_INFO_TYPE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE));
eth_signals [STRUCTURE_CHANGE] =
g_signal_new ("structure_change",
@@ -283,23 +283,23 @@ e_table_header_class_init (ETableHeaderClass *klass)
(GSignalAccumulator) NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- eth_signals [DIMENSION_CHANGE] =
- g_signal_new ("dimension_change",
+ eth_signals [DIMENSION_CHANGE] =
+ g_signal_new ("dimension_change",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ETableHeaderClass, dimension_change),
(GSignalAccumulator) NULL, NULL,
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
- eth_signals [EXPANSION_CHANGE] =
- g_signal_new ("expansion_change",
+ eth_signals [EXPANSION_CHANGE] =
+ g_signal_new ("expansion_change",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ETableHeaderClass, expansion_change),
(GSignalAccumulator) NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- eth_signals [REQUEST_WIDTH] =
+ eth_signals [REQUEST_WIDTH] =
g_signal_new ("request_width",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
@@ -324,7 +324,7 @@ e_table_header_init (ETableHeader *eth)
eth->sort_info_group_change_id = 0;
eth->columns = NULL;
-
+
eth->change_queue = NULL;
eth->change_tail = NULL;
@@ -348,7 +348,7 @@ eth_update_offsets (ETableHeader *eth)
{
int i;
int x = 0;
-
+
for (i = 0; i < eth->col_count; i++){
ETableCol *etc = eth->columns [i];
@@ -378,7 +378,7 @@ eth_do_insert (ETableHeader *eth, int pos, ETableCol *val)
* unref it after you add it.
*
* This function will emit the "structure_change" signal on the @eth object.
- * The ETableCol is assumed
+ * The ETableCol is assumed
*/
void
e_table_header_add_column (ETableHeader *eth, ETableCol *tc, int pos)
@@ -397,7 +397,7 @@ e_table_header_add_column (ETableHeader *eth, ETableCol *tc, int pos)
* We are the primary owners of the column
*/
g_object_ref (tc);
-
+
eth_do_insert (eth, pos, tc);
enqueue(eth, -1, eth->nominal_width);
@@ -464,7 +464,7 @@ e_table_header_count (ETableHeader *eth)
return eth->col_count;
}
-/**
+/**
* e_table_header_index:
* @eth: the ETableHeader to query
* @col: the column to fetch.
@@ -501,7 +501,7 @@ int
e_table_header_get_index_at (ETableHeader *eth, int x_offset)
{
int i, total;
-
+
g_return_val_if_fail (eth != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
@@ -531,7 +531,7 @@ e_table_header_get_columns (ETableHeader *eth)
{
ETableCol **ret;
int i;
-
+
g_return_val_if_fail (eth != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), NULL);
@@ -557,7 +557,7 @@ e_table_header_get_selected (ETableHeader *eth)
{
int i;
int selected = 0;
-
+
g_return_val_if_fail (eth != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
@@ -580,7 +580,7 @@ int
e_table_header_total_width (ETableHeader *eth)
{
int total, i;
-
+
g_return_val_if_fail (eth != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
@@ -601,7 +601,7 @@ int
e_table_header_min_width (ETableHeader *eth)
{
int total, i;
-
+
g_return_val_if_fail (eth != NULL, 0);
g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
@@ -626,7 +626,7 @@ void
e_table_header_move (ETableHeader *eth, int source_index, int target_index)
{
ETableCol *old;
-
+
g_return_if_fail (eth != NULL);
g_return_if_fail (E_IS_TABLE_HEADER (eth));
g_return_if_fail (source_index >= 0);
@@ -641,7 +641,7 @@ e_table_header_move (ETableHeader *eth, int source_index, int target_index)
eth_do_remove (eth, source_index, FALSE);
eth_do_insert (eth, target_index, old);
eth_update_offsets (eth);
-
+
g_signal_emit (G_OBJECT (eth), eth_signals [DIMENSION_CHANGE], 0, eth->width);
g_signal_emit (G_OBJECT (eth), eth_signals [STRUCTURE_CHANGE], 0);
}
@@ -692,7 +692,7 @@ eth_set_size (ETableHeader *eth, int idx, int size)
g_return_if_fail (E_IS_TABLE_HEADER (eth));
g_return_if_fail (idx >= 0);
g_return_if_fail (idx < eth->col_count);
-
+
/* If this column is not resizable, don't do anything. */
if (!eth->columns[idx]->resizable)
return;
@@ -713,7 +713,7 @@ eth_set_size (ETableHeader *eth, int idx, int size)
usable_width -= e_table_sort_info_grouping_get_count(eth->sort_info) * GROUP_INDENT;
/* Calculate minimum_width of stuff on the right as well as
- * total usable expansion on the right.
+ * total usable expansion on the right.
*/
for (; i < eth->col_count; i++) {
min_width += eth->columns[i]->min_width + eth->width_extras;
@@ -765,7 +765,7 @@ eth_set_size (ETableHeader *eth, int idx, int size)
g_signal_emit (G_OBJECT (eth), eth_signals [EXPANSION_CHANGE], 0);
return;
}
-
+
/* The old_expansion used by columns to the right. */
old_expansion = expansion;
old_expansion -= eth->columns[idx]->expansion;
@@ -829,7 +829,7 @@ e_table_header_col_diff (ETableHeader *eth, int start_col, int end_col)
total = 0;
for (col = start_col; col < end_col; col++){
-
+
total += eth->columns [col]->width;
}
@@ -895,7 +895,7 @@ e_table_header_update_horizontal (ETableHeader *eth)
for (i = 0; i < cols; i++) {
int width = 0;
-
+
g_signal_emit_by_name (G_OBJECT (eth),
"request_width",
i, &width);
diff --git a/widgets/table/e-table-header.h b/widgets/table/e-table-header.h
index 396eed77d6..172a2da314 100644
--- a/widgets/table/e-table-header.h
+++ b/widgets/table/e-table-header.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-header.h
* Copyright 1999, 2000, 2001, Ximian, Inc.
*
@@ -58,7 +58,7 @@ struct _ETableHeader {
int sort_info_group_change_id;
ETableCol **columns;
-
+
GSList *change_queue, *change_tail;
gint idle;
};
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index ecdfc52c6e..4957e1d86a 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -235,7 +235,7 @@ inline static gboolean
eti_editing (ETableItem *eti)
{
d(g_print("%s: %s\n", __FUNCTION__, (eti->editing_col == -1) ? "false":"true"));
-
+
if (eti->editing_col == -1)
return FALSE;
else
@@ -273,7 +273,7 @@ eti_get_cell_background_color (ETableItem *eti, int row, int col, gboolean selec
if (eti->alternating_row_colors) {
if (row % 2) {
-
+
} else {
if (!allocated) {
background = gdk_color_copy (background);
@@ -343,7 +343,7 @@ eti_realize_cell_views ( ETableItem *eti)
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED))
return;
-
+
for (i = 0; i < eti->n_cells; i++)
e_cell_realize (eti->cell_views [i]);
eti->cell_views_realized = 1;
@@ -373,7 +373,7 @@ eti_attach_cell_views (ETableItem *eti)
for (i = 0; i < eti->n_cells; i++){
ETableCol *ecol = e_table_header_get_column (eti->header, i);
-
+
eti->cell_views [i] = e_cell_new_view (ecol->ecell, eti->table_model, eti);
}
@@ -394,7 +394,7 @@ eti_unrealize_cell_views (ETableItem *eti)
if (eti->cell_views_realized == 0)
return;
-
+
eti_free_save_state (eti);
for (i = 0; i < eti->n_cells; i++)
@@ -406,14 +406,14 @@ static void
eti_detach_cell_views (ETableItem *eti)
{
int i;
-
+
eti_free_save_state (eti);
for (i = 0; i < eti->n_cells; i++){
e_cell_kill_view (eti->cell_views [i]);
eti->cell_views [i] = NULL;
}
-
+
g_free (eti->cell_views);
eti->cell_views = NULL;
eti->n_cells = 0;
@@ -429,14 +429,14 @@ eti_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y
/* Wrong BBox's are the source of redraw nightmares */
gnome_canvas_item_i2c_affine (GNOME_CANVAS_ITEM (eti), i2c);
-
+
i1.x = eti->x1;
i1.y = eti->y1;
i2.x = eti->x1 + eti->width;
i2.y = eti->y1 + eti->height;
art_affine_point (&c1, &i1, i2c);
art_affine_point (&c2, &i2, i2c);
-
+
*x1 = c1.x;
*y1 = c1.y;
*x2 = c2.x + 1;
@@ -589,7 +589,7 @@ eti_remove_header_model (ETableItem *eti)
eti->header_dim_change_id);
g_signal_handler_disconnect (G_OBJECT (eti->header),
eti->header_request_width_id);
-
+
if (eti->cell_views){
eti_unrealize_cell_views (eti);
eti_detach_cell_views (eti);
@@ -617,9 +617,9 @@ eti_row_height_real (ETableItem *eti, int row)
int h, max_h;
g_return_val_if_fail (cols == 0 || eti->cell_views, 0);
-
+
max_h = 0;
-
+
for (col = 0; col < cols; col++){
h = e_cell_height (eti->cell_views [col], view_to_model_col(eti, col), col, row);
@@ -661,7 +661,7 @@ height_cache_idle(ETableItem *eti)
return TRUE;
}
eti->height_cache_idle_id = 0;
- return FALSE;
+ return FALSE;
}
static void
@@ -710,8 +710,8 @@ eti_row_height (ETableItem *eti, int row)
}
if (eti->height_cache[row] == -1) {
eti->height_cache[row] = eti_row_height_real(eti, row);
- if (row > 0 &&
- eti->length_threshold != -1 &&
+ if (row > 0 &&
+ eti->length_threshold != -1 &&
eti->rows > eti->length_threshold &&
eti->height_cache[row] != eti_row_height(eti, 0)) {
eti->needs_compute_height = 1;
@@ -729,7 +729,7 @@ eti_row_height (ETableItem *eti, int row)
*
* The ETableItem might compute the whole height by asking every row its
* size. There is a special mode (designed to work when there are too
- * many rows in the table that performing the previous step could take
+ * many rows in the table that performing the previous step could take
* too long) set by the ETableItem->length_threshold that would determine
* when the height is computed by using the first row as the size for
* every other row in the ETableItem.
@@ -786,7 +786,7 @@ eti_item_region_redraw (ETableItem *eti, int x0, int y0, int x1, int y1)
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
ArtDRect rect;
double i2c [6];
-
+
rect.x0 = x0;
rect.y0 = y0;
rect.x1 = x1;
@@ -831,7 +831,7 @@ eti_get_region (ETableItem *eti,
int *x2p, int *y2p)
{
int x1, y1, x2, y2;
-
+
x1 = e_table_header_col_diff (eti->header, 0, start_col);
y1 = e_table_item_row_diff (eti, 0, start_row);
x2 = x1 + e_table_header_col_diff (eti->header, start_col, end_col + 1);
@@ -869,7 +869,7 @@ eti_request_region_redraw (ETableItem *eti,
start_col, start_row,
end_col, end_row,
&x1, &y1, &x2, &y2);
-
+
eti_item_region_redraw (eti, eti->x1 + x1 - border,
eti->y1 + y1 - border,
eti->x1 + x2 + 1 + border,
@@ -905,7 +905,7 @@ static void
eti_show_cursor (ETableItem *eti, int delay)
{
int cursor_row;
-
+
if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized))
return;
@@ -913,7 +913,7 @@ eti_show_cursor (ETableItem *eti, int delay)
eti->queue_show_cursor = TRUE;
return;
}
-
+
#if 0
g_object_get(eti->selection,
"cursor_row", &cursor_row,
@@ -962,14 +962,14 @@ eti_check_cursor_bounds (ETableItem *eti)
if (eti->frozen_count > 0) {
return;
}
-
+
if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized))
return;
if (eti->frozen_count > 0) {
return;
}
-
+
g_object_get(eti->selection,
"cursor_row", &cursor_row,
NULL);
@@ -1208,7 +1208,7 @@ eti_table_model_rows_deleted (ETableModel *table_model, int row, int count, ETab
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (eti));
}
-/**
+/**
* e_table_item_redraw_range
* @eti: %ETableItem which will be redrawn
* @start_col: The first col to redraw.
@@ -1226,10 +1226,10 @@ e_table_item_redraw_range (ETableItem *eti,
{
int border;
int cursor_col, cursor_row;
-
+
g_return_if_fail (eti != NULL);
g_return_if_fail (E_IS_TABLE_ITEM (eti));
-
+
g_object_get(eti->selection,
"cursor_col", &cursor_col,
"cursor_row", &cursor_row,
@@ -1258,7 +1258,7 @@ static void
eti_add_table_model (ETableItem *eti, ETableModel *table_model)
{
g_return_if_fail (eti->table_model == NULL);
-
+
eti->table_model = table_model;
g_object_ref (eti->table_model);
@@ -1303,7 +1303,7 @@ eti_add_table_model (ETableItem *eti, ETableModel *table_model)
}
eti_freeze (eti);
-
+
eti_table_model_changed (table_model, eti);
}
@@ -1311,7 +1311,7 @@ static void
eti_add_selection_model (ETableItem *eti, ESelectionModel *selection)
{
g_return_if_fail (eti->selection == NULL);
-
+
eti->selection = selection;
g_object_ref (eti->selection);
@@ -1376,7 +1376,7 @@ static int
eti_request_column_width (ETableHeader *eth, int col, ETableItem *eti)
{
int width = 0;
-
+
if (eti->cell_views && eti->cell_views_realized) {
width = e_cell_max_width (eti->cell_views[col], view_to_model_col(eti, col), col);
}
@@ -1388,12 +1388,12 @@ static void
eti_add_header_model (ETableItem *eti, ETableHeader *header)
{
g_return_if_fail (eti->header == NULL);
-
+
eti->header = header;
g_object_ref (header);
eti_header_structure_changed (header, eti);
-
+
eti->header_dim_change_id = g_signal_connect (
G_OBJECT (header), "dimension_change",
G_CALLBACK (eti_header_dim_changed), eti);
@@ -1402,7 +1402,7 @@ eti_add_header_model (ETableItem *eti, ETableHeader *header)
G_OBJECT (header), "structure_change",
G_CALLBACK (eti_header_structure_changed), eti);
- eti->header_request_width_id = g_signal_connect
+ eti->header_request_width_id = g_signal_connect
(G_OBJECT (header), "request_width",
G_CALLBACK (eti_request_column_width), eti);
}
@@ -1476,7 +1476,7 @@ eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe
eti_remove_table_model (eti);
eti_add_table_model (eti, E_TABLE_MODEL(g_value_get_object (value)));
break;
-
+
case PROP_SELECTION_MODEL:
g_signal_emit_by_name (G_OBJECT(eti),
"selection_model_removed", eti->selection);
@@ -1484,7 +1484,7 @@ eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe
if (g_value_get_object (value))
eti_add_selection_model (eti, E_SELECTION_MODEL(g_value_get_object(value)));
break;
-
+
case PROP_LENGTH_THRESHOLD:
eti->length_threshold = g_value_get_int (value);
break;
@@ -1595,13 +1595,13 @@ eti_init (ETableItem *eti)
eti->height_cache = NULL;
eti->height_cache_idle_id = 0;
eti->height_cache_idle_count = 0;
-
+
eti->length_threshold = -1;
eti->uniform_row_height = FALSE;
eti->uses_source_model = 0;
eti->source_model = NULL;
-
+
eti->row_guess = -1;
eti->cursor_mode = E_CURSOR_SIMPLE;
@@ -1682,7 +1682,7 @@ eti_realize (GnomeCanvasItem *item)
ETableItem *eti = E_TABLE_ITEM (item);
GtkWidget *canvas_widget = GTK_WIDGET (item->canvas);
GdkWindow *window;
-
+
if (GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->realize)
(*GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->realize)(item);
@@ -1723,7 +1723,7 @@ eti_realize (GnomeCanvasItem *item)
if (eti->cell_views == NULL)
eti_attach_cell_views (eti);
-
+
eti_realize_cell_views (eti);
free_height_cache(eti);
@@ -1929,23 +1929,23 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
}
yd += height_extra;
-
+
for (row = first_row; row < last_row; row++){
int xd;
gboolean selected;
gint cursor_col, cursor_row;
-
+
height = ETI_ROW_HEIGHT (eti, row);
xd = x_offset;
-
+
selected = e_selection_model_is_row_selected(E_SELECTION_MODEL (eti->selection), view_to_model_row(eti,row));
-
+
g_object_get(eti->selection,
"cursor_col", &cursor_col,
"cursor_row", &cursor_row,
NULL);
-
+
for (col = first_col; col < last_col; col++){
ETableCol *ecol = e_table_header_get_column (eti->header, col);
ECellView *ecell_view = eti->cell_views [col];
@@ -1998,7 +1998,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
e_cell_draw (ecell_view, drawable, ecol->col_idx, col, row, flags,
xd, yd, xd + ecol->width, yd + height);
-
+
if (!f_found) {
switch (eti->cursor_mode) {
case E_CURSOR_LINE:
@@ -2038,7 +2038,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
if (eti->vertical_draw_grid){
int xd = x_offset;
-
+
for (col = first_col; col <= last_col; col++){
ETableCol *ecol = e_table_header_get_column (eti->header, col);
@@ -2053,7 +2053,7 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width,
xd += ecol->width;
}
}
-
+
/*
* Draw focus
*/
@@ -2092,20 +2092,20 @@ find_cell (ETableItem *eti, double x, double y, int *view_col_res, int *view_row
*y1_res = y - eti->y1 - e_table_item_row_diff (eti, 0, eti->grabbed_row);
return TRUE;
}
-
+
if (cols == 0 || rows == 0)
return FALSE;
x -= eti->x1;
y -= eti->y1;
-
+
x1 = 0;
for (col = 0; col < cols - 1; col++, x1 = x2){
ETableCol *ecol = e_table_header_get_column (eti->header, col);
if (x < x1)
return FALSE;
-
+
x2 = x1 + ecol->width;
if (x <= x2)
@@ -2121,7 +2121,7 @@ find_cell (ETableItem *eti, double x, double y, int *view_col_res, int *view_row
return FALSE;
} else {
y1 = y2 = height_extra;
- if (y < height_extra)
+ if (y < height_extra)
return FALSE;
for (row = 0; row < rows - 1; row++, y1 = y2){
y2 += ETI_ROW_HEIGHT (eti, row) + height_extra;
@@ -2225,7 +2225,7 @@ _do_tooltip (ETableItem *eti)
if (!free_color)
eti->tooltip->foreground = gdk_color_copy(eti->tooltip->foreground);
- e_cell_show_tooltip (ecell_view,
+ e_cell_show_tooltip (ecell_view,
view_to_model_col (eti, eti->tooltip->col),
eti->tooltip->col,
eti->tooltip->row,
@@ -2339,7 +2339,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
"cursor_col", &cursor_col,
NULL);
- eti->maybe_did_something =
+ eti->maybe_did_something =
e_selection_model_maybe_do_something(E_SELECTION_MODEL (eti->selection), view_to_model_row(eti, row), view_to_model_col(eti, col), button.state);
g_object_get(eti->selection,
"cursor_row", &new_cursor_row,
@@ -2361,7 +2361,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
*/
if (eti_editing (eti)) {
- return_val = eti_e_cell_event (eti, ecell_view, (GdkEvent *) &button, button.time,
+ return_val = eti_e_cell_event (eti, ecell_view, (GdkEvent *) &button, button.time,
view_to_model_col(eti, col), col, row, E_CELL_EDITING | E_CELL_CURSOR);
if (return_val)
return TRUE;
@@ -2399,7 +2399,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
case 4:
case 5:
return FALSE;
-
+
}
break;
}
@@ -2445,7 +2445,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
}
#endif
-
+
if (!find_cell (eti, e->button.x, e->button.y, &col, &row, &x1, &y1))
return TRUE;
@@ -2483,7 +2483,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
case 4:
case 5:
return FALSE;
-
+
}
break;
}
@@ -2579,7 +2579,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
cross->crossing.time = e->motion.time;
return_val = eti_e_cell_event (eti, eti->cell_views [eti->motion_col],
cross, cross->crossing.time,
- view_to_model_col(eti, eti->motion_col),
+ view_to_model_col(eti, eti->motion_col),
eti->motion_col, eti->motion_row, 0);
}
@@ -2652,8 +2652,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
handled = FALSE;
break;
}
-
-
+
+
g_signal_emit (eti, eti_signals [KEY_PRESS], 0,
model_to_view_row(eti, cursor_row), cursor_col, e, &return_val);
if ((!return_val) &&
@@ -2678,15 +2678,15 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
eti_cursor_move_right (eti);
return_val = 1;
break;
-
+
case GDK_Up:
case GDK_KP_Up:
case GDK_Down:
case GDK_KP_Down:
if ((e->key.state & GDK_MOD1_MASK)
&& ((e->key.keyval == GDK_Down ) || (e->key.keyval == GDK_KP_Down))) {
- gint view_col = model_to_view_col(eti, cursor_col);
-
+ gint view_col = model_to_view_col(eti, cursor_col);
+
if ((view_col >= 0) && (view_col < eti->cols))
if (eti_e_cell_event (eti, eti->cell_views [view_col], e, ((GdkEventKey *)e)->time, cursor_col, view_col, model_to_view_row(eti, cursor_row), E_CELL_CURSOR))
return TRUE;
@@ -2698,7 +2698,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (eti->cursor_mode != E_CURSOR_LINE) {
eti_cursor_move (eti, model_to_view_row(eti, cursor_row), 0);
return_val = TRUE;
- } else
+ } else
return_val = e_selection_model_key_press(E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
break;
case GDK_End:
@@ -2706,7 +2706,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (eti->cursor_mode != E_CURSOR_LINE) {
eti_cursor_move (eti, model_to_view_row(eti, cursor_row), eti->cols - 1);
return_val = TRUE;
- } else
+ } else
return_val = e_selection_model_key_press(E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
break;
case GDK_Tab:
@@ -2730,7 +2730,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
eti_cursor_move_right (eti);
else if (cursor_row != view_to_model_row(eti, eti->rows - 1))
eti_cursor_move (eti, model_to_view_row(eti, cursor_row) + 1, 0);
- else
+ else
return_val = FALSE;
}
g_object_get(eti->selection,
@@ -2766,7 +2766,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (!return_val)
return_val = e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e);
break;
-
+
default:
handled = FALSE;
break;
@@ -2798,7 +2798,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
gint col, row;
row = model_to_view_row(eti, cursor_row);
col = model_to_view_col(eti, cursor_col);
- if (col != -1 && row != -1 && e_table_model_is_cell_editable(eti->table_model, cursor_col, row)) {
+ if (col != -1 && row != -1 && e_table_model_is_cell_editable(eti->table_model, cursor_col, row)) {
e_table_item_enter_edit (eti, col, row);
}
}
@@ -2821,7 +2821,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
eti->in_key_press = FALSE;
break;
}
-
+
case GDK_KEY_RELEASE: {
gint cursor_row, cursor_col;
@@ -2854,7 +2854,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (eti->motion_row != -1 && eti->motion_col != -1)
return_val = eti_e_cell_event (eti, eti->cell_views [eti->motion_col],
e, e->crossing.time,
- view_to_model_col(eti, eti->motion_col),
+ view_to_model_col(eti, eti->motion_col),
eti->motion_col, eti->motion_row, 0);
eti->motion_row = -1;
eti->motion_col = -1;
@@ -2867,7 +2867,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
if (eti->save_row != -1 &&
eti->save_col != -1 &&
!eti_editing (eti) &&
- e_table_model_is_cell_editable(eti->table_model, view_to_model_col (eti, eti->save_col), eti->save_row)) {
+ e_table_model_is_cell_editable(eti->table_model, view_to_model_col (eti, eti->save_col), eti->save_row)) {
e_table_item_enter_edit (eti, eti->save_col, eti->save_row);
e_cell_load_state (eti->cell_views [eti->editing_col], view_to_model_col(eti, eti->save_col),
eti->save_col, eti->save_row, eti->edit_ctx, eti->save_state);
@@ -2934,7 +2934,7 @@ eti_class_init (ETableItemClass *klass)
item_class->draw = eti_draw;
item_class->point = eti_point;
item_class->event = eti_event;
-
+
klass->cursor_change = NULL;
klass->cursor_activated = NULL;
klass->double_click = NULL;
@@ -2970,7 +2970,7 @@ eti_class_init (ETableItemClass *klass)
g_object_class_install_property (object_class, PROP_TABLE_ALTERNATING_ROW_COLORS,
g_param_spec_boolean ("alternating_row_colors",
_( "Alternating Row Colors" ),
- _( "Alternating Row Colors" ),
+ _( "Alternating Row Colors" ),
FALSE,
G_PARAM_WRITABLE));
@@ -3144,7 +3144,7 @@ eti_class_init (ETableItemClass *klass)
gal_a11y_e_table_item_init ();
}
-/**
+/**
* e_table_item_set_cursor:
* @eti: %ETableItem which will have the cursor set.
* @col: Column to select. -1 means the last column.
@@ -3163,7 +3163,7 @@ e_table_item_focus (ETableItem *eti, int col, int row, GdkModifierType state)
{
g_return_if_fail (eti != NULL);
g_return_if_fail (E_IS_TABLE_ITEM (eti));
-
+
if (row == -1) {
row = view_to_model_row(eti, eti->rows - 1);
}
@@ -3179,7 +3179,7 @@ e_table_item_focus (ETableItem *eti, int col, int row, GdkModifierType state)
}
}
-/**
+/**
* e_table_item_get_focused_column:
* @eti: %ETableItem which will have the cursor retrieved.
*
@@ -3189,12 +3189,12 @@ e_table_item_focus (ETableItem *eti, int col, int row, GdkModifierType state)
*/
gint
e_table_item_get_focused_column (ETableItem *eti)
-{
+{
int cursor_col;
g_return_val_if_fail (eti != NULL, -1);
g_return_val_if_fail (E_IS_TABLE_ITEM (eti), -1);
-
+
g_object_get(eti->selection,
"cursor_col", &cursor_col,
NULL);
@@ -3211,7 +3211,7 @@ eti_cursor_change (ESelectionModel *selection, int row, int col, ETableItem *eti
return;
view_row = model_to_view_row(eti, row);
-
+
if (eti->old_cursor_row != -1 && view_row != eti->old_cursor_row)
e_table_item_redraw_row (eti, eti->old_cursor_row);
@@ -3251,7 +3251,7 @@ eti_cursor_activated (ESelectionModel *selection, int row, int col, ETableItem *
view_row = model_to_view_row(eti, row);
view_col = model_to_view_col(eti, col);
-
+
if (view_row != -1 && view_col != -1) {
if (! e_table_model_has_change_pending (eti->table_model)) {
if (!eti->in_key_press) {
@@ -3293,7 +3293,7 @@ eti_selection_row_change (ESelectionModel *selection, int row, ETableItem *eti)
}
-/**
+/**
* e_table_item_enter_edit
* @eti: %ETableItem which will start being edited
* @col: The view col to edit.
@@ -3307,7 +3307,7 @@ e_table_item_enter_edit (ETableItem *eti, int col, int row)
{
g_return_if_fail (eti != NULL);
g_return_if_fail (E_IS_TABLE_ITEM (eti));
-
+
d(g_print("%s: %d, %d, eti_editing() = %s\n", __FUNCTION__, col, row, eti_editing(eti)?"true":"false"));
if (eti_editing (eti))
@@ -3319,7 +3319,7 @@ e_table_item_enter_edit (ETableItem *eti, int col, int row)
eti->edit_ctx = e_cell_enter_edit (eti->cell_views [col], view_to_model_col(eti, col), col, row);
}
-/**
+/**
* e_table_item_leave_edit_
* @eti: %ETableItem which will stop being edited
*
@@ -3330,7 +3330,7 @@ e_table_item_leave_edit (ETableItem *eti)
{
int col, row;
void *edit_ctx;
-
+
g_return_if_fail (eti != NULL);
g_return_if_fail (E_IS_TABLE_ITEM (eti));
@@ -3352,7 +3352,7 @@ e_table_item_leave_edit (ETableItem *eti)
col, row, edit_ctx);
}
-/**
+/**
* e_table_item_compute_location
* @eti: %ETableItem to look in.
* @x: A pointer to the x location to find in the %ETableItem.
@@ -3366,7 +3366,7 @@ e_table_item_leave_edit (ETableItem *eti)
* location is not in the %ETableItem, the height of the %ETableItem
* is removed from the value y points to.
*/
-void
+void
e_table_item_compute_location (ETableItem *eti,
int *x,
int *y,
@@ -3449,7 +3449,7 @@ eti_printed_row_height (ETableItem *eti, gdouble *widths, GtkPrintContext *conte
gdouble height = 0;
for (col = 0; col < cols; col++) {
ECellView *ecell_view = eti->cell_views [col];
- gdouble this_height = e_cell_print_height (ecell_view, context, view_to_model_col(eti, col), col, row,
+ gdouble this_height = e_cell_print_height (ecell_view, context, view_to_model_col(eti, col), col, row,
widths[col] - 1);
if (this_height > height)
height = this_height;
@@ -3463,12 +3463,12 @@ static gint
gp_draw_rect (GtkPrintContext *context, double x, double y, double width, double height)
{
cairo_t *cr;
- cr = gtk_print_context_get_cairo_context (context);
+ cr = gtk_print_context_get_cairo_context (context);
cairo_save (cr);
- cairo_rectangle (cr, x, y, width, height);
+ cairo_rectangle (cr, x, y, width, height);
cairo_set_line_width (cr, 0.5);
cairo_stroke (cr);
- cairo_restore (cr);
+ cairo_restore (cr);
return 0;
}
@@ -3486,18 +3486,18 @@ e_table_item_print_page (EPrintable *ep,
gdouble max_height;
int rows_printed = itemcontext->rows_printed;
int row, col, next_page = 0;
- double yd = height;
+ double yd = height;
cairo_t *cr;
gdouble *widths;
- cr = gtk_print_context_get_cairo_context (context);
+ cr = gtk_print_context_get_cairo_context (context);
max_height = gtk_print_context_get_height (context);
widths = e_table_item_calculate_print_widths (itemcontext->item->header, width);
/*
* Draw cells
*/
-
+
if (eti->horizontal_draw_grid){
gp_draw_rect(context, 0, yd, width, 1);
}
@@ -3506,7 +3506,7 @@ e_table_item_print_page (EPrintable *ep,
for (row = rows_printed; row < rows ; row++){
gdouble xd = 1, row_height;
row_height = eti_printed_row_height(eti, widths, context, row);
-
+
if (quantize) {
if (yd + row_height + 1 > max_height && row != rows_printed) {
next_page = 1;
@@ -3514,36 +3514,36 @@ e_table_item_print_page (EPrintable *ep,
}
} else {
if (yd > max_height) {
- next_page = 1;
+ next_page = 1;
break;
- }
- }
-
+ }
+ }
+
for (col = 0; col < cols; col++){
ECellView *ecell_view = eti->cell_views [col];
-
- cairo_save(cr);
+
+ cairo_save(cr);
cairo_translate(cr, xd, yd);
cairo_rectangle (cr, 0, 0, widths[col] - 1, row_height);
- cairo_clip(cr);
-
- e_cell_print (ecell_view, context,
- view_to_model_col(eti, col),
- col,
- row,
- widths[col] - 1,
- row_height + 2 );
-
+ cairo_clip(cr);
+
+ e_cell_print (ecell_view, context,
+ view_to_model_col(eti, col),
+ col,
+ row,
+ widths[col] - 1,
+ row_height + 2 );
+
cairo_restore (cr);
xd += widths[col];
}
-
+
yd += row_height;
if (eti->horizontal_draw_grid){
gp_draw_rect(context, 0, yd, width, 1);
}
yd ++;
- }
+ }
itemcontext->rows_printed = row;
if (eti->vertical_draw_grid){
@@ -3558,7 +3558,7 @@ e_table_item_print_page (EPrintable *ep,
if (next_page) {
cairo_show_page (cr);
next_page = 0;
- }
+ }
g_free (widths);
}
@@ -3595,17 +3595,17 @@ e_table_item_height (EPrintable *ep,
gdouble *widths;
int row;
gdouble yd = 0;
-
+
widths = e_table_item_calculate_print_widths (itemcontext->item->header, width);
/*
* Draw cells
*/
yd++;
-
+
for (row = rows_printed; row < rows; row++){
gdouble row_height;
-
+
row_height = eti_printed_row_height(item, widths, context, row);
if (quantize) {
if (max_height != -1 && yd + row_height + 1 > max_height && row != rows_printed) {
@@ -3623,7 +3623,7 @@ e_table_item_height (EPrintable *ep,
}
g_free (widths);
-
+
if (max_height != -1 && (!quantize) && yd > max_height)
yd = max_height;
@@ -3646,17 +3646,17 @@ e_table_item_will_fit (EPrintable *ep,
int row;
gdouble yd = 0;
gboolean ret_val = TRUE;
-
+
widths = e_table_item_calculate_print_widths (itemcontext->item->header, width);
/*
* Draw cells
*/
yd++;
-
+
for (row = rows_printed; row < rows; row++){
gdouble row_height;
-
+
row_height = eti_printed_row_height(item, widths, context, row);
if (quantize) {
if (max_height != -1 && yd + row_height + 1 > max_height && row != rows_printed) {
@@ -3691,14 +3691,14 @@ e_table_item_printable_destroy (gpointer data,
g_free(itemcontext);
}
-/**
+/**
* e_table_item_get_printable
* @eti: %ETableItem which will be printed
*
* This routine creates and returns an %EPrintable that can be used to
* print the given %ETableItem.
*
- * Returns: The %EPrintable.
+ * Returns: The %EPrintable.
*/
EPrintable *
e_table_item_get_printable (ETableItem *item)
diff --git a/widgets/table/e-table-item.h b/widgets/table/e-table-item.h
index 6937ed61b3..caabfe5581 100644
--- a/widgets/table/e-table-item.h
+++ b/widgets/table/e-table-item.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-item.h
* Copyright 1999, 2000, 2001, Ximian, Inc.
*
@@ -55,7 +55,7 @@ typedef struct {
int cols, rows;
int click_count;
-
+
/*
* Ids for the signals we connect to
*/
@@ -84,7 +84,7 @@ typedef struct {
int hadjustment_value_change_id;
int vadjustment_change_id;
int vadjustment_value_change_id;
-
+
GdkGC *fill_gc;
GdkGC *grid_gc;
GdkGC *focus_gc;
@@ -96,7 +96,7 @@ typedef struct {
guint draw_focus:1;
guint uniform_row_height:1;
guint cell_views_realized:1;
-
+
guint needs_redraw : 1;
guint needs_compute_height : 1;
guint needs_compute_width : 1;
@@ -146,7 +146,7 @@ typedef struct {
* the size
*/
int length_threshold;
-
+
gint row_guess;
ECursorMode cursor_mode;
diff --git a/widgets/table/e-table-memory-callbacks.c b/widgets/table/e-table-memory-callbacks.c
index 2b0fdaec21..4b05a42120 100644
--- a/widgets/table/e-table-memory-callbacks.c
+++ b/widgets/table/e-table-memory-callbacks.c
@@ -96,7 +96,7 @@ static void *
etmc_initialize_value (ETableModel *etm, int col)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
-
+
if (etmc->initialize_value)
return etmc->initialize_value (etm, col, etmc->data);
else
@@ -107,7 +107,7 @@ static gboolean
etmc_value_is_empty (ETableModel *etm, int col, const void *value)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
-
+
if (etmc->value_is_empty)
return etmc->value_is_empty (etm, col, value, etmc->data);
else
@@ -118,7 +118,7 @@ static char *
etmc_value_to_string (ETableModel *etm, int col, const void *value)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
-
+
if (etmc->value_to_string)
return etmc->value_to_string (etm, col, value, etmc->data);
else
@@ -129,7 +129,7 @@ static void
etmc_append_row (ETableModel *etm, ETableModel *source, int row)
{
ETableMemoryCalbacks *etmc = E_TABLE_MEMORY_CALLBACKS(etm);
-
+
if (etmc->append_row)
etmc->append_row (etm, source, row, etmc->data);
}
@@ -179,7 +179,7 @@ e_table_memory_callbacks_init (ETableMemoryCalbacks *etmc)
* Instead, ETableMemoryCalbacksModel uses a setup based in callback functions, every
* callback function signature mimics the signature of each ETableModel method
* and passes the extra @data pointer to each one of the method to provide them
- * with any context they might want to use.
+ * with any context they might want to use.
*
* Returns: An ETableMemoryCalbacksModel object (which is also an ETableModel
* object).
@@ -210,6 +210,6 @@ e_table_memory_callbacks_new (ETableMemoryCalbacksColumnCountFn col_count,
et->value_is_empty = value_is_empty;
et->value_to_string = value_to_string;
et->data = data;
-
+
return (ETableModel *) et;
}
diff --git a/widgets/table/e-table-memory-callbacks.h b/widgets/table/e-table-memory-callbacks.h
index 6a75008a94..1a43b02bdd 100644
--- a/widgets/table/e-table-memory-callbacks.h
+++ b/widgets/table/e-table-memory-callbacks.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-memory-callbacks.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-memory-store.c b/widgets/table/e-table-memory-store.c
index b4fe2d2a16..7ebbcbd70c 100644
--- a/widgets/table/e-table-memory-store.c
+++ b/widgets/table/e-table-memory-store.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-memory-store.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -145,7 +145,7 @@ static void *
etms_initialize_value (ETableModel *etm, int col)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
-
+
switch (etms->priv->columns[col].type) {
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING:
return g_strdup ("");
@@ -166,7 +166,7 @@ static gboolean
etms_value_is_empty (ETableModel *etm, int col, const void *value)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
-
+
switch (etms->priv->columns[col].type) {
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING:
return !(value && *(char *) value);
@@ -187,7 +187,7 @@ static char *
etms_value_to_string (ETableModel *etm, int col, const void *value)
{
ETableMemoryStore *etms = E_TABLE_MEMORY_STORE(etm);
-
+
switch (etms->priv->columns[col].type) {
case E_TABLE_MEMORY_STORE_COLUMN_TYPE_STRING:
return g_strdup (value);
@@ -239,7 +239,7 @@ etms_finalize (GObject *obj)
if (G_OBJECT_CLASS (e_table_memory_store_parent_class)->finalize)
G_OBJECT_CLASS (e_table_memory_store_parent_class)->finalize (obj);
}
-
+
static void
e_table_memory_store_init (ETableMemoryStore *etms)
{
@@ -291,7 +291,7 @@ e_table_memory_store_class_init (ETableMemoryStoreClass *klass)
* Instead, ETableMemoryStoreModel uses a setup based in callback functions, every
* callback function signature mimics the signature of each ETableModel method
* and passes the extra @data pointer to each one of the method to provide them
- * with any context they might want to use.
+ * with any context they might want to use.
*
* Returns: An ETableMemoryStoreModel object (which is also an ETableModel
* object).
@@ -323,7 +323,7 @@ e_table_memory_store_construct (ETableMemoryStore *etms, ETableMemoryStoreColumn
return E_TABLE_MODEL (etms);
}
-
+
void
e_table_memory_store_adopt_value_at (ETableMemoryStore *etms, int col, int row, void *value)
diff --git a/widgets/table/e-table-memory-store.h b/widgets/table/e-table-memory-store.h
index c95486fcd6..fe67e10d3d 100644
--- a/widgets/table/e-table-memory-store.h
+++ b/widgets/table/e-table-memory-store.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-memory-store.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-memory.c b/widgets/table/e-table-memory.c
index 824b8082cd..b708811cc5 100644
--- a/widgets/table/e-table-memory.c
+++ b/widgets/table/e-table-memory.c
@@ -113,12 +113,12 @@ e_table_memory_new (void)
/**
* e_table_memory_get_data:
- * @etmm:
- * @row:
- *
- *
- *
- * Return value:
+ * @etmm:
+ * @row:
+ *
+ *
+ *
+ * Return value:
**/
gpointer
e_table_memory_get_data (ETableMemory *etmm, int row)
@@ -131,11 +131,11 @@ e_table_memory_get_data (ETableMemory *etmm, int row)
/**
* e_table_memory_set_data:
- * @etmm:
- * @row:
- * @data:
- *
- *
+ * @etmm:
+ * @row:
+ * @data:
+ *
+ *
**/
void
e_table_memory_set_data (ETableMemory *etmm, int row, gpointer data)
@@ -148,14 +148,14 @@ e_table_memory_set_data (ETableMemory *etmm, int row, gpointer data)
/**
* e_table_memory_insert:
- * @table_model:
- * @parent_path:
- * @position:
- * @data:
- *
- *
- *
- * Return value:
+ * @table_model:
+ * @parent_path:
+ * @position:
+ * @data:
+ *
+ *
+ *
+ * Return value:
**/
void
e_table_memory_insert (ETableMemory *etmm,
@@ -182,12 +182,12 @@ e_table_memory_insert (ETableMemory *etmm,
/**
* e_table_memory_remove:
- * @etable:
- * @path:
- *
- *
- *
- * Return value:
+ * @etable:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
gpointer
e_table_memory_remove (ETableMemory *etmm, int row)
@@ -209,12 +209,12 @@ e_table_memory_remove (ETableMemory *etmm, int row)
/**
* e_table_memory_clear:
- * @etable:
- * @path:
- *
- *
- *
- * Return value:
+ * @etable:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
void
e_table_memory_clear (ETableMemory *etmm)
@@ -231,11 +231,11 @@ e_table_memory_clear (ETableMemory *etmm)
/**
* e_table_memory_freeze:
* @etmm: the ETableModel to freeze.
- *
+ *
* This function prepares an ETableModel for a period of much change.
* All signals regarding changes to the table are deferred until we
* thaw the table.
- *
+ *
**/
void
e_table_memory_freeze(ETableMemory *etmm)
@@ -251,11 +251,11 @@ e_table_memory_freeze(ETableMemory *etmm)
/**
* e_table_memory_thaw:
* @etmm: the ETableMemory to thaw.
- *
+ *
* This function thaws an ETableMemory. All the defered signals can add
* up to a lot, we don't know - so we just emit a model_changed
* signal.
- *
+ *
**/
void
e_table_memory_thaw(ETableMemory *etmm)
diff --git a/widgets/table/e-table-memory.h b/widgets/table/e-table-memory.h
index aba80e0520..d1f382cd6b 100644
--- a/widgets/table/e-table-memory.h
+++ b/widgets/table/e-table-memory.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-memory.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c
index 3d73bbf83a..36dd691a86 100644
--- a/widgets/table/e-table-model.c
+++ b/widgets/table/e-table-model.c
@@ -134,7 +134,7 @@ e_table_model_value_at (ETableModel *e_table_model, int col, int row)
* e_table_model_set_value_at:
* @e_table_model: the table model to operate on.
* @col: the column where the data will be stored in the model.
- * @row: the row where the data will be stored in the model.
+ * @row: the row where the data will be stored in the model.
* @value: the data to be stored.
*
* This function instructs the model to store the value in @data in the
@@ -277,8 +277,8 @@ e_table_model_finalize (GObject *object)
static void
e_table_model_class_init (ETableModelClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
object_class->finalize = e_table_model_finalize;
e_table_model_signals [MODEL_NO_CHANGE] =
@@ -345,27 +345,27 @@ e_table_model_class_init (ETableModelClass *klass)
e_util_marshal_VOID__INT_INT,
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
- klass->column_count = NULL;
- klass->row_count = NULL;
+ klass->column_count = NULL;
+ klass->row_count = NULL;
klass->append_row = NULL;
- klass->value_at = NULL;
- klass->set_value_at = NULL;
- klass->is_cell_editable = NULL;
+ klass->value_at = NULL;
+ klass->set_value_at = NULL;
+ klass->is_cell_editable = NULL;
klass->has_save_id = NULL;
klass->get_save_id = NULL;
klass->has_change_pending = NULL;
- klass->duplicate_value = NULL;
- klass->free_value = NULL;
- klass->initialize_value = NULL;
- klass->value_is_empty = NULL;
+ klass->duplicate_value = NULL;
+ klass->free_value = NULL;
+ klass->initialize_value = NULL;
+ klass->value_is_empty = NULL;
klass->value_to_string = NULL;
- klass->model_no_change = NULL;
- klass->model_changed = NULL;
+ klass->model_no_change = NULL;
+ klass->model_changed = NULL;
klass->model_row_changed = NULL;
klass->model_cell_changed = NULL;
klass->model_rows_inserted = NULL;
@@ -396,11 +396,11 @@ e_table_model_pre_change (ETableModel *e_table_model)
if (ETM_FROZEN (e_table_model))
return;
-
+
d(print_tabs());
d(g_print("Emitting pre_change on model 0x%p, a %s.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type)));
d(depth++);
- g_signal_emit (G_OBJECT (e_table_model),
+ g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals [MODEL_PRE_CHANGE], 0);
d(depth--);
}
@@ -423,10 +423,10 @@ e_table_model_no_change (ETableModel *e_table_model)
{
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
-
+
if (ETM_FROZEN (e_table_model))
return;
-
+
d(print_tabs());
d(g_print("Emitting model_no_change on model 0x%p, a %s.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type)));
d(depth++);
@@ -453,10 +453,10 @@ e_table_model_changed (ETableModel *e_table_model)
{
g_return_if_fail (e_table_model != NULL);
g_return_if_fail (E_IS_TABLE_MODEL (e_table_model));
-
+
if (ETM_FROZEN (e_table_model))
return;
-
+
d(print_tabs());
d(g_print("Emitting model_changed on model 0x%p, a %s.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type)));
d(depth++);
@@ -483,7 +483,7 @@ e_table_model_row_changed (ETableModel *e_table_model, int row)
if (ETM_FROZEN (e_table_model))
return;
-
+
d(print_tabs());
d(g_print("Emitting row_changed on model 0x%p, a %s, row %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
d(depth++);
@@ -511,7 +511,7 @@ e_table_model_cell_changed (ETableModel *e_table_model, int col, int row)
if (ETM_FROZEN (e_table_model))
return;
-
+
d(print_tabs());
d(g_print("Emitting cell_changed on model 0x%p, a %s, row %d, col %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row, col));
d(depth++);
@@ -539,7 +539,7 @@ e_table_model_rows_inserted (ETableModel *e_table_model, int row, int count)
if (ETM_FROZEN (e_table_model))
return;
-
+
d(print_tabs());
d(g_print("Emitting row_inserted on model 0x%p, a %s, row %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
d(depth++);
@@ -582,7 +582,7 @@ e_table_model_rows_deleted (ETableModel *e_table_model, int row, int count)
if (ETM_FROZEN (e_table_model))
return;
-
+
d(print_tabs());
d(g_print("Emitting row_deleted on model 0x%p, a %s, row %d.\n", e_table_model, gtk_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
d(depth++);
diff --git a/widgets/table/e-table-model.h b/widgets/table/e-table-model.h
index ba8e9f91b5..3bc5a2f526 100644
--- a/widgets/table/e-table-model.h
+++ b/widgets/table/e-table-model.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-model.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -69,7 +69,7 @@ typedef struct {
/* Return an allocated string. */
char *(*value_to_string) (ETableModel *etm, int col, const void *value);
-
+
/*
* Signals
*/
diff --git a/widgets/table/e-table-one.c b/widgets/table/e-table-one.c
index 817dcfd2dd..b374fd9cb3 100644
--- a/widgets/table/e-table-one.c
+++ b/widgets/table/e-table-one.c
@@ -104,7 +104,7 @@ static void *
one_initialize_value (ETableModel *etm, int col)
{
ETableOne *one = E_TABLE_ONE(etm);
-
+
if (one->source)
return e_table_model_initialize_value (one->source, col);
else
@@ -115,7 +115,7 @@ static gboolean
one_value_is_empty (ETableModel *etm, int col, const void *value)
{
ETableOne *one = E_TABLE_ONE(etm);
-
+
if (one->source)
return e_table_model_value_is_empty (one->source, col, value);
else
@@ -126,7 +126,7 @@ static char *
one_value_to_string (ETableModel *etm, int col, const void *value)
{
ETableOne *one = E_TABLE_ONE(etm);
-
+
if (one->source)
return e_table_model_value_to_string (one->source, col, value);
else
@@ -155,7 +155,7 @@ one_dispose (GObject *object)
for (i = 0; i < col_count; i++)
e_table_model_free_value(one->source, i, one->data[i]);
}
-
+
g_free (one->data);
}
one->data = NULL;
@@ -204,16 +204,16 @@ e_table_one_new (ETableModel *source)
eto = g_object_new (E_TABLE_ONE_TYPE, NULL);
eto->source = source;
-
+
col_count = e_table_model_column_count(source);
eto->data = g_new(void *, col_count);
for (i = 0; i < col_count; i++) {
eto->data[i] = e_table_model_initialize_value(source, i);
}
-
+
if (source)
g_object_ref(source);
-
+
return (ETableModel *) eto;
}
diff --git a/widgets/table/e-table-one.h b/widgets/table/e-table-one.h
index 44d0ed22a9..f32d8cc0d4 100644
--- a/widgets/table/e-table-one.h
+++ b/widgets/table/e-table-one.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-one.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -37,7 +37,7 @@ G_BEGIN_DECLS
typedef struct {
ETableModel parent;
-
+
ETableModel *source;
void **data;
} ETableOne;
diff --git a/widgets/table/e-table-scrolled.h b/widgets/table/e-table-scrolled.h
index d5671f28a3..1c7c0b48fd 100644
--- a/widgets/table/e-table-scrolled.h
+++ b/widgets/table/e-table-scrolled.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-scrolled.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c
index 50c319c66d..891ba665e4 100644
--- a/widgets/table/e-table-search.c
+++ b/widgets/table/e-table-search.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-search.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -56,9 +56,9 @@ e_table_search_search (ETableSearch *e_table_search, char *string, ETableSearchF
gboolean ret_val;
g_return_val_if_fail (e_table_search != NULL, FALSE);
g_return_val_if_fail (E_IS_TABLE_SEARCH (e_table_search), FALSE);
-
+
g_signal_emit (G_OBJECT (e_table_search),
- e_table_search_signals [SEARCH_SEARCH],
+ e_table_search_signals [SEARCH_SEARCH],
0, string, flags, &ret_val);
return ret_val;
@@ -69,7 +69,7 @@ e_table_search_accept (ETableSearch *e_table_search)
{
g_return_if_fail (e_table_search != NULL);
g_return_if_fail (E_IS_TABLE_SEARCH (e_table_search));
-
+
g_signal_emit (G_OBJECT (e_table_search),
e_table_search_signals [SEARCH_ACCEPT], 0);
}
@@ -108,11 +108,11 @@ static void
e_table_search_finalize (GObject *object)
{
ETableSearch *ets = (ETableSearch *) object;
-
+
drop_timeout (ets);
g_free (ets->priv->search_string);
g_free (ets->priv);
-
+
if (G_OBJECT_CLASS (e_table_search_parent_class)->finalize)
(*G_OBJECT_CLASS (e_table_search_parent_class)->finalize)(object);
}
diff --git a/widgets/table/e-table-search.h b/widgets/table/e-table-search.h
index eff681e0aa..ecb3efa6e9 100644
--- a/widgets/table/e-table-search.h
+++ b/widgets/table/e-table-search.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-search.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-selection-model.c b/widgets/table/e-table-selection-model.c
index 2b8ec0fa99..2706fd4ba4 100644
--- a/widgets/table/e-table-selection-model.c
+++ b/widgets/table/e-table-selection-model.c
@@ -105,7 +105,7 @@ model_changed_idle(ETableSelectionModel *etsm)
char *save_id = e_table_model_get_save_id(etm, i);
if (g_hash_table_lookup(etsm->hash, save_id))
e_selection_model_change_one_row(E_SELECTION_MODEL(etsm), i, TRUE);
-
+
if (etsm->cursor_id && !strcmp(etsm->cursor_id, save_id)) {
cursor_row = i;
cursor_col = e_selection_model_cursor_col(E_SELECTION_MODEL(etsm));
@@ -261,7 +261,7 @@ static void
etsm_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
ETableSelectionModel *etsm = E_TABLE_SELECTION_MODEL (object);
-
+
switch (prop_id){
case PROP_MODEL:
drop_model(etsm);
@@ -298,14 +298,14 @@ e_table_selection_model_class_init (ETableSelectionModelClass *klass)
esma_class->get_row_count = etsm_get_row_count;
- g_object_class_install_property (object_class, PROP_MODEL,
+ g_object_class_install_property (object_class, PROP_MODEL,
g_param_spec_object ("model",
_("Model"),
/*_( */"XXX blurb" /*)*/,
E_TABLE_MODEL_TYPE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_HEADER,
+ g_object_class_install_property (object_class, PROP_HEADER,
g_param_spec_object ("header",
_("Header"),
/*_( */"XXX blurb" /*)*/,
@@ -313,7 +313,7 @@ e_table_selection_model_class_init (ETableSelectionModelClass *klass)
G_PARAM_READWRITE));
}
-/**
+/**
* e_table_selection_model_new
*
* This routine creates a new #ETableSelectionModel.
diff --git a/widgets/table/e-table-selection-model.h b/widgets/table/e-table-selection-model.h
index ce98bd4b4e..60b7812413 100644
--- a/widgets/table/e-table-selection-model.h
+++ b/widgets/table/e-table-selection-model.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-selection-model.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-simple.c b/widgets/table/e-table-simple.c
index f47786e7b7..41ce63f943 100644
--- a/widgets/table/e-table-simple.c
+++ b/widgets/table/e-table-simple.c
@@ -56,7 +56,7 @@ static void
simple_append_row (ETableModel *etm, ETableModel *source, int row)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
-
+
if (simple->append_row)
simple->append_row (etm, source, row, simple->data);
}
@@ -139,7 +139,7 @@ static void *
simple_initialize_value (ETableModel *etm, int col)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
-
+
if (simple->initialize_value)
return simple->initialize_value (etm, col, simple->data);
else
@@ -150,7 +150,7 @@ static gboolean
simple_value_is_empty (ETableModel *etm, int col, const void *value)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
-
+
if (simple->value_is_empty)
return simple->value_is_empty (etm, col, value, simple->data);
else
@@ -161,7 +161,7 @@ static char *
simple_value_to_string (ETableModel *etm, int col, const void *value)
{
ETableSimple *simple = E_TABLE_SIMPLE(etm);
-
+
if (simple->value_to_string)
return simple->value_to_string (etm, col, value, simple->data);
else
@@ -219,7 +219,7 @@ e_table_simple_init (ETableSimple *simple)
* Instead, ETableSimpleModel uses a setup based in callback functions, every
* callback function signature mimics the signature of each ETableModel method
* and passes the extra @data pointer to each one of the method to provide them
- * with any context they might want to use.
+ * with any context they might want to use.
*
* Returns: An ETableSimpleModel object (which is also an ETableModel
* object).
diff --git a/widgets/table/e-table-simple.h b/widgets/table/e-table-simple.h
index db49cc6ced..fd489b5b54 100644
--- a/widgets/table/e-table-simple.h
+++ b/widgets/table/e-table-simple.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-simple.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -71,7 +71,7 @@ typedef struct {
ETableSimpleFreeValueFn free_value;
ETableSimpleInitializeValueFn initialize_value;
ETableSimpleValueIsEmptyFn value_is_empty;
- ETableSimpleValueToStringFn value_to_string;
+ ETableSimpleValueToStringFn value_to_string;
void *data;
} ETableSimple;
diff --git a/widgets/table/e-table-size-test.c b/widgets/table/e-table-size-test.c
index b70e890f1d..3260f9621f 100644
--- a/widgets/table/e-table-size-test.c
+++ b/widgets/table/e-table-size-test.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-size-test.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -41,16 +41,16 @@
* the ETableSimple class. Instead of creating your own ETableModel
* class, you simply create a new object of the ETableSimple class. You
* give it a bunch of functions that act as callbacks.
- *
+ *
* You also get to pass a void * to ETableSimple and it gets passed to
* your callbacks. This would be for having multiple models of the same
* type. This is just an example though, so we statically define all the
* data and ignore the void *data parameter.
- *
+ *
* In our example we will be creating a table model with 6 columns and 10
* rows. This corresponds to having 6 different types of information and
* 10 different sets of data in our database.
- *
+ *
* The headers will be hard coded, as will be the example data.
*
*/
@@ -234,7 +234,7 @@ create_table (void)
* First we create the header.
*/
e_table_header = e_table_header_new ();
-
+
/*
* Next we have to build renderers for all of the columns.
* Since all our columns are text columns, we can simply use
@@ -298,7 +298,7 @@ main (int argc, char *argv [])
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
create_table ();
-
+
gtk_main ();
e_cursors_shutdown ();
diff --git a/widgets/table/e-table-sort-info.c b/widgets/table/e-table-sort-info.c
index 8d8d8fe580..e91ade2381 100644
--- a/widgets/table/e-table-sort-info.c
+++ b/widgets/table/e-table-sort-info.c
@@ -46,7 +46,7 @@ static void
etsi_finalize (GObject *object)
{
ETableSortInfo *etsi = E_TABLE_SORT_INFO (object);
-
+
if (etsi->groupings)
g_free(etsi->groupings);
etsi->groupings = NULL;
@@ -107,7 +107,7 @@ e_table_sort_info_sort_info_changed (ETableSortInfo *info)
{
g_return_if_fail (info != NULL);
g_return_if_fail (E_IS_TABLE_SORT_INFO (info));
-
+
if (info->frozen) {
info->sort_info_changed = 1;
} else {
@@ -120,7 +120,7 @@ e_table_sort_info_group_info_changed (ETableSortInfo *info)
{
g_return_if_fail (info != NULL);
g_return_if_fail (E_IS_TABLE_SORT_INFO (info));
-
+
if (info->frozen) {
info->group_info_changed = 1;
} else {
@@ -139,7 +139,7 @@ e_table_sort_info_group_info_changed (ETableSortInfo *info)
* To thaw, invoke the e_table_sort_info_thaw() function, which will
* trigger any signals that might have been queued.
*/
-void
+void
e_table_sort_info_freeze (ETableSortInfo *info)
{
info->frozen++;
@@ -162,7 +162,7 @@ e_table_sort_info_thaw (ETableSortInfo *info)
info->frozen--;
if (info->frozen != 0)
return;
-
+
if (info->sort_info_changed) {
info->sort_info_changed = 0;
e_table_sort_info_sort_info_changed(info);
@@ -206,7 +206,7 @@ e_table_sort_info_grouping_real_truncate (ETableSortInfo *info, int length)
* @lenght: position where the truncation happens.
*
* This routine can be used to reduce or grow the number of grouping
- * criteria in the object.
+ * criteria in the object.
*/
void
e_table_sort_info_grouping_truncate (ETableSortInfo *info, int length)
@@ -283,7 +283,7 @@ e_table_sort_info_sorting_real_truncate (ETableSortInfo *info, int length)
* @lenght: position where the truncation happens.
*
* This routine can be used to reduce or grow the number of sort
- * criteria in the object.
+ * criteria in the object.
*/
void
e_table_sort_info_sorting_truncate (ETableSortInfo *info, int length)
@@ -335,7 +335,7 @@ e_table_sort_info_sorting_set_nth (ETableSortInfo *info, int n, ETableSortColu
* This creates a new e_table_sort_info object that contains no
* grouping and no sorting defined as of yet. This object is used
* to keep track of multi-level sorting and multi-level grouping of
- * the ETable.
+ * the ETable.
*
* Returns: A new %ETableSortInfo object
*/
@@ -418,7 +418,7 @@ e_table_sort_info_save_to_node (ETableSortInfo *info,
int i;
const int sort_count = e_table_sort_info_sorting_get_count (info);
const int group_count = e_table_sort_info_grouping_get_count (info);
-
+
grouping = xmlNewChild (parent, NULL, (const unsigned char *)"grouping", NULL);
for (i = 0; i < group_count; i++) {
@@ -432,7 +432,7 @@ e_table_sort_info_save_to_node (ETableSortInfo *info,
for (i = 0; i < sort_count; i++) {
ETableSortColumn column = e_table_sort_info_sorting_get_nth(info, i);
xmlNode *new_node = xmlNewChild(grouping, NULL, (const unsigned char *)"leaf", NULL);
-
+
e_xml_set_integer_prop_by_name (new_node, (const unsigned char *)"column", column.column);
e_xml_set_bool_prop_by_name (new_node, (const unsigned char *)"ascending", column.ascending);
}
diff --git a/widgets/table/e-table-sort-info.h b/widgets/table/e-table-sort-info.h
index 5140b40d5a..81e02cae17 100644
--- a/widgets/table/e-table-sort-info.h
+++ b/widgets/table/e-table-sort-info.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-sort-info.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -45,12 +45,12 @@ struct _ETableSortColumn {
typedef struct {
GObject base;
-
+
gint group_count;
ETableSortColumn *groupings;
gint sort_count;
ETableSortColumn *sortings;
-
+
guint frozen : 1;
guint sort_info_changed : 1;
guint group_info_changed : 1;
diff --git a/widgets/table/e-table-sorted-variable.h b/widgets/table/e-table-sorted-variable.h
index f2cc695bc5..5c91c11aa1 100644
--- a/widgets/table/e-table-sorted-variable.h
+++ b/widgets/table/e-table-sorted-variable.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-sorted-variable.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -43,7 +43,7 @@ typedef struct {
ETableSubsetVariable base;
ETableSortInfo *sort_info;
-
+
ETableHeader *full_header;
int sort_info_changed_id;
diff --git a/widgets/table/e-table-sorted.c b/widgets/table/e-table-sorted.c
index 32985a5dd8..e2a5ecdde9 100644
--- a/widgets/table/e-table-sorted.c
+++ b/widgets/table/e-table-sorted.c
@@ -182,7 +182,7 @@ ets_proxy_model_row_changed (ETableSubset *subset, ETableModel *source, int row)
{
if (!E_TABLE_SORTED(subset)->sort_idle_id)
E_TABLE_SORTED(subset)->sort_idle_id = g_idle_add_full(50, (GSourceFunc) ets_sort_idle, subset, NULL);
-
+
if (E_TABLE_SUBSET_CLASS (ets_parent_class)->proxy_model_row_changed)
(E_TABLE_SUBSET_CLASS (ets_parent_class)->proxy_model_row_changed) (subset, source, row);
}
diff --git a/widgets/table/e-table-sorted.h b/widgets/table/e-table-sorted.h
index 297e622587..2fa1cafbdb 100644
--- a/widgets/table/e-table-sorted.h
+++ b/widgets/table/e-table-sorted.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-sorted.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -43,7 +43,7 @@ typedef struct {
ETableSubset base;
ETableSortInfo *sort_info;
-
+
ETableHeader *full_header;
int sort_info_changed_id;
diff --git a/widgets/table/e-table-sorter.c b/widgets/table/e-table-sorter.c
index 1d70c4959c..365b869795 100644
--- a/widgets/table/e-table-sorter.c
+++ b/widgets/table/e-table-sorter.c
@@ -165,10 +165,10 @@ ets_class_init (ETableSorterClass *klass)
sorter_class->model_to_sorted = ets_model_to_sorted ;
sorter_class->sorted_to_model = ets_sorted_to_model ;
sorter_class->get_model_to_sorted_array = ets_get_model_to_sorted_array ;
- sorter_class->get_sorted_to_model_array = ets_get_sorted_to_model_array ;
+ sorter_class->get_sorted_to_model_array = ets_get_sorted_to_model_array ;
sorter_class->needs_sorting = ets_needs_sorting ;
- g_object_class_install_property (object_class, PROP_SORT_INFO,
+ g_object_class_install_property (object_class, PROP_SORT_INFO,
g_param_spec_object ("sort_info",
_("Sort Info"),
/*_( */"XXX blurb" /*)*/,
@@ -198,7 +198,7 @@ ETableSorter *
e_table_sorter_new (ETableModel *source, ETableHeader *full_header, ETableSortInfo *sort_info)
{
ETableSorter *ets = g_object_new (E_TABLE_SORTER_TYPE, NULL);
-
+
ets->sort_info = sort_info;
g_object_ref(ets->sort_info);
ets->full_header = full_header;
@@ -220,7 +220,7 @@ e_table_sorter_new (ETableModel *source, ETableHeader *full_header, ETableSortIn
G_CALLBACK (ets_sort_info_changed), ets);
ets->group_info_changed_id = g_signal_connect (sort_info, "group_info_changed",
G_CALLBACK (ets_sort_info_changed), ets);
-
+
return ets;
}
diff --git a/widgets/table/e-table-sorter.h b/widgets/table/e-table-sorter.h
index e9bce1bfe7..e4c389c148 100644
--- a/widgets/table/e-table-sorter.h
+++ b/widgets/table/e-table-sorter.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-sorter.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-sorting-utils.c b/widgets/table/e-table-sorting-utils.c
index 9a3f1913d8..b2fb86958c 100644
--- a/widgets/table/e-table-sorting-utils.c
+++ b/widgets/table/e-table-sorting-utils.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-sorting-utils.c
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-sorting-utils.h b/widgets/table/e-table-sorting-utils.h
index d4ed88876b..cfcde6091b 100644
--- a/widgets/table/e-table-sorting-utils.h
+++ b/widgets/table/e-table-sorting-utils.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-sorting-utils.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c
index 8ee2eb3c8c..47bc9c4a13 100644
--- a/widgets/table/e-table-specification.c
+++ b/widgets/table/e-table-specification.c
@@ -106,7 +106,7 @@ etsp_init (ETableSpecification *etsp)
*
* Creates a new %ETableSpecification object. This object is used to hold the
* information about the rendering information for ETable.
- *
+ *
* Returns: a newly created %ETableSpecification object.
*/
ETableSpecification *
@@ -123,7 +123,7 @@ e_table_specification_new (void)
* @filename: a filename that contains an ETableSpecification
*
* This routine modifies @specification to reflect the state described
- * by the file @filename.
+ * by the file @filename.
*
* Returns: TRUE on success, FALSE on failure.
*/
@@ -279,7 +279,7 @@ e_table_specification_load_from_node (ETableSpecification *specification,
* @specification: An %ETableSpecification that you want to save
* @filename: a file name to store the specification.
*
- * This routine stores the @specification into @filename.
+ * This routine stores the @specification into @filename.
*
* Returns: 0 on success or -1 on error.
*/
@@ -289,20 +289,20 @@ e_table_specification_save_to_file (ETableSpecification *specification,
{
xmlDoc *doc;
int ret;
-
+
g_return_val_if_fail (specification != NULL, -1);
g_return_val_if_fail (filename != NULL, -1);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), -1);
-
+
if ((doc = xmlNewDoc ((const unsigned char *)"1.0")) == NULL)
return -1;
-
+
xmlDocSetRootElement (doc, e_table_specification_save_to_node (specification, doc));
-
+
ret = e_xml_save_file (filename, doc);
-
+
xmlFreeDoc (doc);
-
+
return ret;
}
@@ -312,7 +312,7 @@ e_table_specification_save_to_file (ETableSpecification *specification,
*
* Saves the state of @specification to a string.
*
- * Returns: an g_alloc() allocated string containing the stringified
+ * Returns: an g_alloc() allocated string containing the stringified
* representation of @specification. This stringified representation
* uses XML as a convenience.
*/
@@ -326,7 +326,7 @@ e_table_specification_save_to_string (ETableSpecification *specification)
g_return_val_if_fail (specification != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL);
-
+
doc = xmlNewDoc ((const unsigned char *)"1.0");
xmlDocSetRootElement (doc, e_table_specification_save_to_node (specification, doc));
xmlDocDumpMemory (doc, &string, &length);
@@ -342,7 +342,7 @@ e_table_specification_save_to_string (ETableSpecification *specification)
* @doc: Node where the specification is saved
*
* This routine saves the %ETableSpecification state in the object @specification
- * into the xmlDoc represented by @doc.
+ * into the xmlDoc represented by @doc.
*
* Returns: The node that has been attached to @doc with the contents
* of the ETableSpecification.
@@ -393,7 +393,7 @@ e_table_specification_save_to_node (ETableSpecification *specification,
if (specification->columns){
int i;
-
+
for (i = 0; specification->columns [i]; i++)
e_table_column_specification_save_to_node (
specification->columns [i],
@@ -422,7 +422,7 @@ e_table_specification_duplicate (ETableSpecification *spec)
g_return_val_if_fail (spec != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (spec), NULL);
-
+
new_spec = e_table_specification_new ();
spec_str = e_table_specification_save_to_string (spec);
if (!e_table_specification_load_from_string (new_spec, spec_str)) {
@@ -431,6 +431,6 @@ e_table_specification_duplicate (ETableSpecification *spec)
new_spec = NULL;
}
g_free (spec_str);
-
+
return new_spec;
}
diff --git a/widgets/table/e-table-specification.h b/widgets/table/e-table-specification.h
index bd2de91c67..75d07c7154 100644
--- a/widgets/table/e-table-specification.h
+++ b/widgets/table/e-table-specification.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-specification.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c
index 5e15a02c4b..57d4376612 100644
--- a/widgets/table/e-table-state.c
+++ b/widgets/table/e-table-state.c
@@ -52,7 +52,7 @@ etst_dispose (GObject *object)
G_OBJECT_CLASS (e_table_state_parent_class)->dispose (object);
}
-
+
static void
etst_finalize (GObject *object)
{
@@ -67,7 +67,7 @@ etst_finalize (GObject *object)
g_free (etst->expansions);
etst->expansions = NULL;
}
-
+
G_OBJECT_CLASS (e_table_state_parent_class)->finalize (object);
}
@@ -130,7 +130,7 @@ e_table_state_load_from_file (ETableState *state,
return FALSE;
}
-void
+void
e_table_state_load_from_string (ETableState *state,
const char *xml)
{
@@ -192,7 +192,7 @@ e_table_state_load_from_node (ETableState *state,
for (iterator = list, i = 0; iterator; i++) {
int_and_double *column_info = iterator->data;
-
+
state->columns [i] = column_info->column;
state->expansions [i] = column_info->expansion;
g_free (column_info);
@@ -206,14 +206,14 @@ e_table_state_save_to_file (ETableState *state,
const char *filename)
{
xmlDoc *doc;
-
+
if ((doc = xmlNewDoc ((const unsigned char *)"1.0")) == NULL)
return;
-
+
xmlDocSetRootElement (doc, e_table_state_save_to_node (state, NULL));
-
+
e_xml_save_file (filename, doc);
-
+
xmlFreeDoc (doc);
}
@@ -279,7 +279,7 @@ e_table_state_duplicate (ETableState *state)
{
ETableState *new_state;
char *copy;
-
+
g_return_val_if_fail (state != NULL, NULL);
g_return_val_if_fail (E_IS_TABLE_STATE (state), NULL);
diff --git a/widgets/table/e-table-state.h b/widgets/table/e-table-state.h
index 2c155eaa19..5612d3fe49 100644
--- a/widgets/table/e-table-state.h
+++ b/widgets/table/e-table-state.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-state.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c
index f8548139fe..14adabec8b 100644
--- a/widgets/table/e-table-subset-variable.c
+++ b/widgets/table/e-table-subset-variable.c
@@ -44,7 +44,7 @@ etssv_add (ETableSubsetVariable *etssv,
{
ETableModel *etm = E_TABLE_MODEL(etssv);
ETableSubset *etss = E_TABLE_SUBSET(etssv);
-
+
e_table_model_pre_change(etm);
if (etss->n_map + 1 > etssv->n_vals_allocated){
@@ -67,7 +67,7 @@ etssv_add_array (ETableSubsetVariable *etssv,
int i;
e_table_model_pre_change(etm);
-
+
if (etss->n_map + count > etssv->n_vals_allocated){
etssv->n_vals_allocated += MAX(INCREMENT_AMOUNT, count);
etss->map_table = g_realloc (etss->map_table, etssv->n_vals_allocated * sizeof(int));
@@ -87,7 +87,7 @@ etssv_add_all (ETableSubsetVariable *etssv)
int i;
e_table_model_pre_change(etm);
-
+
rows = e_table_model_row_count(etss->source);
if (etss->n_map + rows > etssv->n_vals_allocated){
etssv->n_vals_allocated += MAX(INCREMENT_AMOUNT, rows);
@@ -106,13 +106,13 @@ etssv_remove (ETableSubsetVariable *etssv,
ETableModel *etm = E_TABLE_MODEL(etssv);
ETableSubset *etss = E_TABLE_SUBSET(etssv);
int i;
-
+
for (i = 0; i < etss->n_map; i++){
if (etss->map_table[i] == row) {
e_table_model_pre_change (etm);
memmove (etss->map_table + i, etss->map_table + i + 1, (etss->n_map - i - 1) * sizeof(int));
etss->n_map --;
-
+
e_table_model_row_deleted (etm, i);
return TRUE;
}
@@ -216,7 +216,7 @@ e_table_subset_variable_clear (ETableSubsetVariable *etssv)
g_free (etss->map_table);
etss->map_table = (int *)g_new (unsigned int, 1);
etssv->n_vals_allocated = 1;
-
+
e_table_model_changed (etm);
}
diff --git a/widgets/table/e-table-subset-variable.h b/widgets/table/e-table-subset-variable.h
index a02b096dbb..5789e0696a 100644
--- a/widgets/table/e-table-subset-variable.h
+++ b/widgets/table/e-table-subset-variable.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-subset-variable.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -44,7 +44,7 @@ typedef struct {
typedef struct {
ETableSubsetClass parent_class;
-
+
void (*add) (ETableSubsetVariable *ets,
gint row);
void (*add_array) (ETableSubsetVariable *ets,
diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c
index 7c7e8a6def..0c4849a649 100644
--- a/widgets/table/e-table-subset.c
+++ b/widgets/table/e-table-subset.c
@@ -403,7 +403,7 @@ e_table_subset_construct (ETableSubset *etss, ETableModel *source, int nvals)
etss->n_map = nvals;
etss->source = source;
g_object_ref (source);
-
+
/* Init */
for (i = 0; i < nvals; i++)
etss->map_table [i] = i;
@@ -422,7 +422,7 @@ e_table_subset_construct (ETableSubset *etss, ETableModel *source, int nvals)
G_CALLBACK (etss_proxy_model_rows_inserted), etss);
etss->table_model_rows_deleted_id = g_signal_connect (G_OBJECT (source), "model_rows_deleted",
G_CALLBACK (etss_proxy_model_rows_deleted), etss);
-
+
return E_TABLE_MODEL (etss);
}
diff --git a/widgets/table/e-table-subset.h b/widgets/table/e-table-subset.h
index 04f1c7efe5..a17b0af976 100644
--- a/widgets/table/e-table-subset.h
+++ b/widgets/table/e-table-subset.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-subset.h - Implements a table that contains a subset of another table.
* Copyright 1999, 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-tooltip.h b/widgets/table/e-table-tooltip.h
index 40fbd5c7d2..2761fccb06 100644
--- a/widgets/table/e-table-tooltip.h
+++ b/widgets/table/e-table-tooltip.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-tooltip.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-tree.h b/widgets/table/e-table-tree.h
index dd9b844943..0261eb1b6c 100644
--- a/widgets/table/e-table-tree.h
+++ b/widgets/table/e-table-tree.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-tree.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-utils.h b/widgets/table/e-table-utils.h
index 1a2c213d2d..989a38945e 100644
--- a/widgets/table/e-table-utils.h
+++ b/widgets/table/e-table-utils.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-utils.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-table-without.c b/widgets/table/e-table-without.c
index f3c5965716..16e94b2505 100644
--- a/widgets/table/e-table-without.c
+++ b/widgets/table/e-table-without.c
@@ -50,7 +50,7 @@ struct _ETableWithoutPrivate {
void *closure;
};
-static gboolean
+static gboolean
check (ETableWithout *etw, int model_row)
{
gboolean ret_val;
@@ -67,7 +67,7 @@ check (ETableWithout *etw, int model_row)
return ret_val;
}
-static gboolean
+static gboolean
check_with_key (ETableWithout *etw, void *key, int model_row)
{
gboolean ret_val;
diff --git a/widgets/table/e-table-without.h b/widgets/table/e-table-without.h
index c0241dae2d..57d6a4cfe2 100644
--- a/widgets/table/e-table-without.h
+++ b/widgets/table/e-table-without.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-without.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -54,7 +54,7 @@ typedef struct {
typedef struct {
ETableSubsetClass parent_class;
-
+
} ETableWithoutClass;
GType e_table_without_get_type (void);
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 0925e399f9..a6adf312cf 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -206,7 +206,7 @@ static ETableCol *
current_search_col (ETable *et)
{
if (!et->search_col_set) {
- et->current_search_col =
+ et->current_search_col =
e_table_util_calculate_current_search_col (et->header,
et->full_header,
et->sort_info,
@@ -319,7 +319,7 @@ et_dispose (GObject *object)
et->group_info_change_id);
et->group_info_change_id = 0;
}
-
+
if (et->sort_info_change_id) {
g_signal_handler_disconnect (G_OBJECT (et->sort_info),
et->sort_info_change_id);
@@ -480,10 +480,10 @@ init_search (ETable *e_table)
e_table->search = e_table_search_new();
- e_table->search_search_id =
+ e_table->search_search_id =
g_signal_connect (G_OBJECT (e_table->search), "search",
G_CALLBACK (et_search_search), e_table);
- e_table->search_accept_id =
+ e_table->search_accept_id =
g_signal_connect (G_OBJECT (e_table->search), "accept",
G_CALLBACK (et_search_accept), e_table);
}
@@ -925,7 +925,7 @@ et_build_groups (ETable *et)
et->model,
et->sort_info,
0);
-
+
if (et->use_click_to_add_end)
e_canvas_vbox_add_item_start(E_CANVAS_VBOX(et->canvas_vbox), GNOME_CANVAS_ITEM(et->group));
else
@@ -1092,7 +1092,7 @@ static gint
table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data)
{
GnomeCanvas *canvas;
- ECanvas *ecanvas;
+ ECanvas *ecanvas;
ETable *etable;
gtk_widget_queue_draw (widget);
@@ -1108,8 +1108,8 @@ table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer d
etable = E_TABLE (data);
- if (e_table_model_row_count(etable->model) < 1
- && (etable->click_to_add)
+ if (e_table_model_row_count(etable->model) < 1
+ && (etable->click_to_add)
&& !(E_TABLE_CLICK_TO_ADD(etable->click_to_add)->row)) {
gnome_canvas_item_grab_focus (etable->canvas_vbox);
gnome_canvas_item_grab_focus (etable->click_to_add);
@@ -1160,7 +1160,7 @@ click_to_add_event (ETableClickToAdd *etcta, GdkEventKey *key, ETable *etable)
if (key->type != GDK_KEY_PRESS &&
key->type != GDK_KEY_RELEASE) {
return FALSE;
- }
+ }
switch (key->keyval) {
case GDK_Tab:
case GDK_KP_Tab:
@@ -1305,7 +1305,7 @@ e_table_set_state_object(ETable *e_table, ETableState *state)
connect_header (e_table, state);
- g_value_set_double (val, (double) (GTK_WIDGET(e_table->table_canvas)->allocation.width));
+ g_value_set_double (val, (double) (GTK_WIDGET(e_table->table_canvas)->allocation.width));
g_object_set_property (G_OBJECT (e_table->header), "width", val);
g_free (val);
@@ -1344,7 +1344,7 @@ e_table_set_state_object(ETable *e_table, ETableState *state)
g_object_set(e_table->click_to_add,
"header", e_table->header,
NULL);
-
+
e_table->need_rebuild = TRUE;
if (!e_table->rebuild_idle_id)
e_table->rebuild_idle_id = g_idle_add_full (20, changed_idle, e_table, NULL);
@@ -1452,11 +1452,11 @@ e_table_get_state_object (ETable *e_table)
/**
* e_table_get_state:
* @e_table: The #ETable to act on.
- *
+ *
* Builds a state object based on the current state and returns the
* string corresponding to that state.
- *
- * Return value:
+ *
+ * Return value:
* A string describing the current state of the #ETable.
**/
gchar *e_table_get_state (ETable *e_table)
@@ -1623,11 +1623,11 @@ et_real_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
* @ete: An optional #ETableExtras. (%NULL is valid.)
* @spec_str: The spec.
* @state_str: An optional state. (%NULL is valid.)
- *
+ *
* This is the internal implementation of e_table_new() for use by
* subclasses or language bindings. See e_table_new() for details.
- *
- * Return value:
+ *
+ * Return value:
* The passed in value @e_table or %NULL if there's an error.
**/
ETable *
@@ -1686,8 +1686,8 @@ e_table_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
* This is the internal implementation of e_table_new_from_spec_file()
* for use by subclasses or language bindings. See
* e_table_new_from_spec_file() for details.
- *
- * Return value:
+ *
+ * Return value:
* The passed in value @e_table or %NULL if there's an error.
**/
ETable *
@@ -1752,8 +1752,8 @@ e_table_construct_from_spec_file (ETable *e_table, ETableModel *etm, ETableExtra
* default sorting state and such. @state is an optional string
* specifying the current sorting state and such. If @state is NULL,
* then the default state from the spec will be used.
- *
- * Return value:
+ *
+ * Return value:
* The newly created #ETable or %NULL if there's an error.
**/
GtkWidget *
@@ -1779,7 +1779,7 @@ e_table_new (ETableModel *etm, ETableExtras *ete, const char *spec, const char *
* @ete: An optional #ETableExtras. (%NULL is valid.)
* @spec_fn: The filename of the spec.
* @state_fn: An optional state file. (%NULL is valid.)
- *
+ *
* This is very similar to e_table_new(), except instead of passing in
* strings you pass in the file names of the spec and state to load.
*
@@ -1789,8 +1789,8 @@ e_table_new (ETableModel *etm, ETableExtras *ete, const char *spec, const char *
* @state_fn is the filename of the initial state to load. If this is
* %NULL or if the specified file doesn't exist, the default state
* from the spec file is used.
- *
- * Return value:
+ *
+ * Return value:
* The newly created #ETable or %NULL if there's an error.
**/
GtkWidget *
@@ -1920,13 +1920,13 @@ void
e_table_save_specification (ETable *e_table, const char *filename)
{
xmlDoc *doc = et_build_tree (e_table);
-
+
g_return_if_fail(e_table != NULL);
g_return_if_fail(E_IS_TABLE(e_table));
g_return_if_fail(filename != NULL);
-
+
e_xml_save_file (filename, doc);
-
+
xmlFreeDoc (doc);
}
@@ -1961,7 +1961,7 @@ e_table_load_specification (ETable *e_table, gchar *filename)
* e_table_set_cursor_row:
* @e_table: The #ETable to set the cursor row of
* @row: The row number
- *
+ *
* Sets the cursor row and the selection to the given row number.
**/
void
@@ -1979,10 +1979,10 @@ e_table_set_cursor_row (ETable *e_table, int row)
/**
* e_table_get_cursor_row:
* @e_table: The #ETable to query
- *
+ *
* Calculates the cursor row. -1 means that we don't have a cursor.
- *
- * Return value:
+ *
+ * Return value:
* Cursor row
**/
int
@@ -2003,7 +2003,7 @@ e_table_get_cursor_row (ETable *e_table)
* @e_table: The #ETable to act on
* @callback: The callback function to call
* @closure: The value passed to the callback's closure argument
- *
+ *
* Calls the given @callback function once for every selected row.
*
* If you change the selection or delete or add rows to the table
@@ -2027,10 +2027,10 @@ e_table_selected_row_foreach (ETable *e_table,
/**
* e_table_selected_count:
* @e_table: The #ETable to query
- *
+ *
* Counts the number of selected rows.
- *
- * Return value:
+ *
+ * Return value:
* The number of rows selected.
**/
gint
@@ -2045,7 +2045,7 @@ e_table_selected_count (ETable *e_table)
/**
* e_table_select_all:
* @table: The #ETable to modify
- *
+ *
* Selects all the rows in @table.
**/
void
@@ -2060,7 +2060,7 @@ e_table_select_all (ETable *table)
/**
* e_table_invert_selection:
* @table: The #ETable to modify
- *
+ *
* Inverts the selection in @table.
**/
void
@@ -2076,10 +2076,10 @@ e_table_invert_selection (ETable *table)
/**
* e_table_get_printable:
* @e_table: #ETable to query
- *
+ *
* Used for printing your #ETable.
- *
- * Return value:
+ *
+ * Return value:
* The #EPrintable to print.
**/
EPrintable *
@@ -2094,7 +2094,7 @@ e_table_get_printable (ETable *e_table)
/**
* e_table_right_click_up:
* @table: The #ETable to modify.
- *
+ *
* Call this function when you're done handling the right click if you
* return TRUE from the "right_click" signal.
**/
@@ -2107,7 +2107,7 @@ e_table_right_click_up (ETable *table)
/**
* e_table_commit_click_to_add:
* @table: The #ETable to modify
- *
+ *
* Commits the current values in the click to add to the table.
**/
void
@@ -2244,11 +2244,11 @@ set_scroll_adjustments (ETable *table,
* e_table_get_next_row:
* @e_table: The #ETable to query
* @model_row: The model row to go from
- *
+ *
* This function is used when your table is sorted, but you're using
* model row numbers. It returns the next row in sorted order as a model row.
- *
- * Return value:
+ *
+ * Return value:
* The model row number.
**/
gint
@@ -2277,12 +2277,12 @@ e_table_get_next_row (ETable *e_table,
* e_table_get_prev_row:
* @e_table: The #ETable to query
* @model_row: The model row to go from
- *
+ *
* This function is used when your table is sorted, but you're using
* model row numbers. It returns the previous row in sorted order as
* a model row.
- *
- * Return value:
+ *
+ * Return value:
* The model row number.
**/
gint
@@ -2308,10 +2308,10 @@ e_table_get_prev_row (ETable *e_table,
* e_table_model_to_view_row:
* @e_table: The #ETable to query
* @model_row: The model row number
- *
+ *
* Turns a model row into a view row.
- *
- * Return value:
+ *
+ * Return value:
* The view row number.
**/
gint
@@ -2331,10 +2331,10 @@ e_table_model_to_view_row (ETable *e_table,
* e_table_view_to_model_row:
* @e_table: The #ETable to query
* @view_row: The view row number
- *
+ *
* Turns a view row into a model row.
- *
- * Return value:
+ *
+ * Return value:
* The model row number.
**/
gint
@@ -2357,7 +2357,7 @@ e_table_view_to_model_row (ETable *e_table,
* @y: Y coordinate for the pixel
* @row_return: Pointer to return the row value
* @col_return: Pointer to return the column value
- *
+ *
* Return the row and column for the cell in which the pixel at (@x, @y) is
* contained.
**/
@@ -2388,7 +2388,7 @@ e_table_get_cell_at (ETable *table,
* @y_return: Returns the y coordinate of the upper left hand corner of the cell with respect to the widget.
* @width_return: Returns the width of the cell.
* @height_return: Returns the height of the cell.
- *
+ *
* Returns the x, y, width, and height of the given cell. These can
* all be #NULL and they just won't be set.
**/
@@ -2416,11 +2416,11 @@ e_table_get_cell_geometry (ETable *table,
/**
* e_table_get_selection_model:
* @table: The #ETable to query
- *
+ *
* Returns the table's #ESelectionModel in case you want to access it
* directly.
- *
- * Return value:
+ *
+ * Return value:
* The #ESelectionModel.
**/
ESelectionModel *
@@ -2504,14 +2504,14 @@ struct _GtkDragSourceInfo
/**
* e_table_drag_get_data:
- * @table:
- * @row:
- * @col:
- * @context:
- * @target:
- * @time:
- *
- *
+ * @table:
+ * @row:
+ * @col:
+ * @context:
+ * @target:
+ * @time:
+ *
+ *
**/
void
e_table_drag_get_data (ETable *table,
@@ -2586,7 +2586,7 @@ e_table_drag_highlight (ETable *table,
/**
* e_table_drag_unhighlight:
* @table: The #ETable to unhighlight
- *
+ *
* Removes the highlight from an #ETable.
**/
void
@@ -2688,7 +2688,7 @@ et_real_start_drag (ETable *table, int row, int col, GdkEvent *event)
* @targets: Table of targets for this source
* @n_targets: Number of targets in @targets
* @actions: Actions allowed for this source
- *
+ *
* Registers this table as a drag site, and possibly adds default behaviors.
**/
void
@@ -2735,7 +2735,7 @@ e_table_drag_source_set (ETable *table,
/**
* e_table_drag_source_unset:
* @table: The #ETable to un set up as a drag site
- *
+ *
* Unregisters this #ETable as a drag site.
**/
void
@@ -2770,10 +2770,10 @@ e_table_drag_source_unset (ETable *table)
* @actions: The available actions supported by the drag
* @button: The button held down for the drag
* @event: The event that initiated the drag
- *
+ *
* Start a drag from this cell.
- *
- * Return value:
+ *
+ * Return value:
* The drag context.
**/
GdkDragContext *
@@ -2896,7 +2896,7 @@ scroll_timeout (gpointer data)
et->last_drop_x,
et->last_drop_y,
et->last_drop_time);
-
+
return TRUE;
}
diff --git a/widgets/table/e-table.h b/widgets/table/e-table.h
index 6be18b462d..7d6bb2a97e 100644
--- a/widgets/table/e-table.h
+++ b/widgets/table/e-table.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table.h - A graphical view of a Table.
* Copyright 1999, 2000, 2001, Ximian, Inc.
*
@@ -129,7 +129,7 @@ typedef struct {
guint uniform_row_height : 1;
guint allow_grouping : 1;
-
+
guint always_search : 1;
guint search_col_set : 1;
@@ -195,8 +195,8 @@ typedef struct {
int row,
int col,
GdkDragContext *context);
-
- /* Target side drag signals */
+
+ /* Target side drag signals */
void (* table_drag_leave) (ETable *table,
int row,
int col,
diff --git a/widgets/table/e-tree-memory-callbacks.c b/widgets/table/e-tree-memory-callbacks.c
index 7be5be153c..b10e14c262 100644
--- a/widgets/table/e-tree-memory-callbacks.c
+++ b/widgets/table/e-tree-memory-callbacks.c
@@ -102,7 +102,7 @@ etmc_sort_value_at (ETreeModel *etm, ETreePath node, int col)
if (etmc->sort_value_at)
return etmc->sort_value_at (etm, node, col, etmc->model_data);
- else
+ else
return etmc->value_at (etm, node, col, etmc->model_data);
}
@@ -156,7 +156,7 @@ static void *
etmc_initialize_value (ETreeModel *etm, int col)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
-
+
if (etmc->initialize_value)
return etmc->initialize_value (etm, col, etmc->model_data);
else
@@ -167,7 +167,7 @@ static gboolean
etmc_value_is_empty (ETreeModel *etm, int col, const void *value)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
-
+
if (etmc->value_is_empty)
return etmc->value_is_empty (etm, col, value, etmc->model_data);
else
@@ -178,7 +178,7 @@ static char *
etmc_value_to_string (ETreeModel *etm, int col, const void *value)
{
ETreeMemoryCallbacks *etmc = E_TREE_MEMORY_CALLBACKS(etm);
-
+
if (etmc->value_to_string)
return etmc->value_to_string (etm, col, value, etmc->model_data);
else
@@ -220,7 +220,7 @@ e_tree_memory_callbacks_init (ETreeMemoryCallbacks *etmc)
/**
* e_tree_memory_callbacks_new:
- *
+ *
* This initializes a new ETreeMemoryCallbacksModel object.
* ETreeMemoryCallbacksModel is an implementaiton of the somewhat
* abstract class ETreeMemory. The ETreeMemoryCallbacksModel is
@@ -231,8 +231,8 @@ e_tree_memory_callbacks_init (ETreeMemoryCallbacks *etmc)
* Instead, ETreeMemoryCallbacksModel uses a setup based in callback functions, every
* callback function signature mimics the signature of each ETreeModel method
* and passes the extra @data pointer to each one of the method to provide them
- * with any context they might want to use.
- *
+ * with any context they might want to use.
+ *
* ETreeMemoryCallbacks is to ETreeMemory as ETableSimple is to ETableModel.
*
* Return value: An ETreeMemoryCallbacks object (which is also an
diff --git a/widgets/table/e-tree-memory-callbacks.h b/widgets/table/e-tree-memory-callbacks.h
index 04df18ae7a..dcec18a8ba 100644
--- a/widgets/table/e-tree-memory-callbacks.h
+++ b/widgets/table/e-tree-memory-callbacks.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-tree-memory-callbacks.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -71,7 +71,7 @@ typedef struct {
ETreeMemoryCallbacksHasGetNodeByIdFn has_get_node_by_id;
ETreeMemoryCallbacksGetNodeByIdFn get_node_by_id;
- ETreeMemoryCallbacksValueAtFn sort_value_at;
+ ETreeMemoryCallbacksValueAtFn sort_value_at;
ETreeMemoryCallbacksValueAtFn value_at;
ETreeMemoryCallbacksSetValueAtFn set_value_at;
ETreeMemoryCallbacksIsEditableFn is_editable;
diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c
index 4ea1e01c3d..301468c3d4 100644
--- a/widgets/table/e-tree-memory.c
+++ b/widgets/table/e-tree-memory.c
@@ -166,11 +166,11 @@ e_tree_path_unlink (ETreeMemoryPath *path)
/**
* e_tree_memory_freeze:
* @etmm: the ETreeModel to freeze.
- *
+ *
* This function prepares an ETreeModel for a period of much change.
* All signals regarding changes to the tree are deferred until we
* thaw the tree.
- *
+ *
**/
void
e_tree_memory_freeze(ETreeMemory *etmm)
@@ -186,11 +186,11 @@ e_tree_memory_freeze(ETreeMemory *etmm)
/**
* e_tree_memory_thaw:
* @etmm: the ETreeMemory to thaw.
- *
+ *
* This function thaws an ETreeMemory. All the defered signals can add
* up to a lot, we don't know - so we just emit a model_changed
* signal.
- *
+ *
**/
void
e_tree_memory_thaw(ETreeMemory *etmm)
@@ -399,9 +399,9 @@ e_tree_memory_init (ETreeMemory *etmm)
/**
* e_tree_memory_construct:
- * @etree:
- *
- *
+ * @etree:
+ *
+ *
**/
void
e_tree_memory_construct (ETreeMemory *etmm)
@@ -432,18 +432,18 @@ void
e_tree_memory_set_expanded_default (ETreeMemory *etree, gboolean expanded)
{
g_return_if_fail (etree != NULL);
-
+
etree->priv->expanded_default = expanded;
}
/**
* e_tree_memory_node_get_data:
- * @etmm:
- * @node:
- *
- *
- *
- * Return value:
+ * @etmm:
+ * @node:
+ *
+ *
+ *
+ * Return value:
**/
gpointer
e_tree_memory_node_get_data (ETreeMemory *etmm, ETreePath node)
@@ -457,11 +457,11 @@ e_tree_memory_node_get_data (ETreeMemory *etmm, ETreePath node)
/**
* e_tree_memory_node_set_data:
- * @etmm:
- * @node:
- * @node_data:
- *
- *
+ * @etmm:
+ * @node:
+ * @node_data:
+ *
+ *
**/
void
e_tree_memory_node_set_data (ETreeMemory *etmm, ETreePath node, gpointer node_data)
@@ -475,14 +475,14 @@ e_tree_memory_node_set_data (ETreeMemory *etmm, ETreePath node, gpointer node_da
/**
* e_tree_memory_node_insert:
- * @tree_model:
- * @parent_path:
- * @position:
- * @node_data:
- *
- *
- *
- * Return value:
+ * @tree_model:
+ * @parent_path:
+ * @position:
+ * @node_data:
+ *
+ *
+ *
+ * Return value:
**/
ETreePath
e_tree_memory_node_insert (ETreeMemory *tree_model,
@@ -530,14 +530,14 @@ ETreePath e_tree_memory_node_insert_id (ETreeMemory *etree, ETreePath parent
/**
* e_tree_memory_node_insert_before:
- * @etree:
- * @parent:
- * @sibling:
- * @node_data:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @parent:
+ * @sibling:
+ * @node_data:
+ *
+ *
+ *
+ * Return value:
**/
ETreePath
e_tree_memory_node_insert_before (ETreeMemory *etree,
@@ -585,12 +585,12 @@ child_free(ETreeMemory *etree, ETreeMemoryPath *node)
/**
* e_tree_memory_node_remove:
- * @etree:
- * @path:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
gpointer
e_tree_memory_node_remove (ETreeMemory *etree, ETreePath node)
@@ -606,7 +606,7 @@ e_tree_memory_node_remove (ETreeMemory *etree, ETreePath node)
if (!etree->priv->frozen) {
e_tree_model_pre_change(E_TREE_MODEL(etree));
for (old_position = 0, sibling = path;
- sibling;
+ sibling;
old_position++, sibling = sibling->prev_sibling)
/* Empty intentionally*/;
old_position --;
@@ -661,7 +661,7 @@ e_tree_memory_sort_node (ETreeMemory *etmm,
ETreeMemoryPath *last;
e_tree_model_pre_change (E_TREE_MODEL (etmm));
-
+
i = 0;
for (child = path->first_child; child; child = child->next_sibling)
i++;
diff --git a/widgets/table/e-tree-memory.h b/widgets/table/e-tree-memory.h
index ca498c99eb..a1318e28d3 100644
--- a/widgets/table/e-tree-memory.h
+++ b/widgets/table/e-tree-memory.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-tree-memory.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index b694536763..54cece5d00 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -203,19 +203,19 @@ e_tree_model_init (ETreeModel *tree_model)
/**
* e_tree_model_node_changed:
- * @tree_model:
- * @node:
- *
- *
- *
- * Return value:
+ * @tree_model:
+ * @node:
+ *
+ *
+ *
+ * Return value:
**/
void
e_tree_model_pre_change (ETreeModel *tree_model)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
-
+
d(g_print("Emitting pre_change on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [PRE_CHANGE], 0);
@@ -223,19 +223,19 @@ e_tree_model_pre_change (ETreeModel *tree_model)
/**
* e_tree_model_node_changed:
- * @tree_model:
- * @node:
- *
- *
- *
- * Return value:
+ * @tree_model:
+ * @node:
+ *
+ *
+ *
+ * Return value:
**/
void
e_tree_model_no_change (ETreeModel *tree_model)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
-
+
d(g_print("Emitting no_change on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NO_CHANGE], 0);
@@ -243,19 +243,19 @@ e_tree_model_no_change (ETreeModel *tree_model)
/**
* e_tree_model_node_changed:
- * @tree_model:
- * @node:
- *
- *
- *
- * Return value:
+ * @tree_model:
+ * @node:
+ *
+ *
+ *
+ * Return value:
**/
void
e_tree_model_node_changed (ETreeModel *tree_model, ETreePath node)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
-
+
d(g_print("Emitting node_changed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_CHANGED], 0, node);
@@ -263,19 +263,19 @@ e_tree_model_node_changed (ETreeModel *tree_model, ETreePath node)
/**
* e_tree_model_node_data_changed:
- * @tree_model:
- * @node:
- *
- *
- *
- * Return value:
+ * @tree_model:
+ * @node:
+ *
+ *
+ *
+ * Return value:
**/
void
e_tree_model_node_data_changed (ETreeModel *tree_model, ETreePath node)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
-
+
d(g_print("Emitting node_data_changed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_DATA_CHANGED], 0, node);
@@ -283,19 +283,19 @@ e_tree_model_node_data_changed (ETreeModel *tree_model, ETreePath node)
/**
* e_tree_model_node_col_changed:
- * @tree_model:
- * @node:
- *
- *
- *
- * Return value:
+ * @tree_model:
+ * @node:
+ *
+ *
+ *
+ * Return value:
**/
void
e_tree_model_node_col_changed (ETreeModel *tree_model, ETreePath node, int col)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
-
+
d(g_print("Emitting node_col_changed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_COL_CHANGED], 0, node, col);
@@ -303,11 +303,11 @@ e_tree_model_node_col_changed (ETreeModel *tree_model, ETreePath node, int col)
/**
* e_tree_model_node_inserted:
- * @tree_model:
- * @parent_node:
- * @inserted_node:
- *
- *
+ * @tree_model:
+ * @parent_node:
+ * @inserted_node:
+ *
+ *
**/
void
e_tree_model_node_inserted (ETreeModel *tree_model,
@@ -325,18 +325,18 @@ e_tree_model_node_inserted (ETreeModel *tree_model,
/**
* e_tree_model_node_removed:
- * @tree_model:
- * @parent_node:
- * @removed_node:
- *
- *
+ * @tree_model:
+ * @parent_node:
+ * @removed_node:
+ *
+ *
**/
void
e_tree_model_node_removed (ETreeModel *tree_model, ETreePath parent_node, ETreePath removed_node, int old_position)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
-
+
d(g_print("Emitting node_removed on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_REMOVED], 0,
@@ -345,17 +345,17 @@ e_tree_model_node_removed (ETreeModel *tree_model, ETreePath parent_node, ETree
/**
* e_tree_model_node_deleted:
- * @tree_model:
- * @deleted_node:
- *
- *
+ * @tree_model:
+ * @deleted_node:
+ *
+ *
**/
void
e_tree_model_node_deleted (ETreeModel *tree_model, ETreePath deleted_node)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
-
+
d(g_print("Emitting node_deleted on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_DELETED], 0, deleted_node);
@@ -363,17 +363,17 @@ e_tree_model_node_deleted (ETreeModel *tree_model, ETreePath deleted_node)
/**
* e_tree_model_node_request_collapse:
- * @tree_model:
- * @collapsed_node:
- *
- *
+ * @tree_model:
+ * @collapsed_node:
+ *
+ *
**/
void
e_tree_model_node_request_collapse (ETreeModel *tree_model, ETreePath collapsed_node)
{
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
-
+
d(g_print("Emitting node_request_collapse on model 0x%p, a %s.\n", tree_model, gtk_type_name (GTK_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals [NODE_REQUEST_COLLAPSE], 0, collapsed_node);
@@ -402,7 +402,7 @@ e_tree_model_new (void)
*
* return values: the ETreePath corresponding to the root node.
*/
-ETreePath
+ETreePath
e_tree_model_get_root (ETreeModel *etree)
{
g_return_val_if_fail (etree != NULL, NULL);
@@ -416,14 +416,14 @@ e_tree_model_get_root (ETreeModel *etree)
/**
* e_tree_model_node_get_parent:
- * @etree:
- * @path:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
-ETreePath
+ETreePath
e_tree_model_node_get_parent (ETreeModel *etree, ETreePath node)
{
g_return_val_if_fail(etree != NULL, NULL);
@@ -435,14 +435,14 @@ e_tree_model_node_get_parent (ETreeModel *etree, ETreePath node)
/**
* e_tree_model_node_get_first_child:
- * @etree:
- * @node:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @node:
+ *
+ *
+ *
+ * Return value:
**/
-ETreePath
+ETreePath
e_tree_model_node_get_first_child (ETreeModel *etree, ETreePath node)
{
g_return_val_if_fail (etree != NULL, NULL);
@@ -456,14 +456,14 @@ e_tree_model_node_get_first_child (ETreeModel *etree, ETreePath node)
/**
* e_tree_model_node_get_last_child:
- * @etree:
- * @node:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @node:
+ *
+ *
+ *
+ * Return value:
**/
-ETreePath
+ETreePath
e_tree_model_node_get_last_child (ETreeModel *etree, ETreePath node)
{
g_return_val_if_fail (etree != NULL, NULL);
@@ -478,14 +478,14 @@ e_tree_model_node_get_last_child (ETreeModel *etree, ETreePath node)
/**
* e_tree_model_node_get_next:
- * @etree:
- * @node:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @node:
+ *
+ *
+ *
+ * Return value:
**/
-ETreePath
+ETreePath
e_tree_model_node_get_next (ETreeModel *etree, ETreePath node)
{
g_return_val_if_fail (etree != NULL, NULL);
@@ -499,14 +499,14 @@ e_tree_model_node_get_next (ETreeModel *etree, ETreePath node)
/**
* e_tree_model_node_get_prev:
- * @etree:
- * @node:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @node:
+ *
+ *
+ *
+ * Return value:
**/
-ETreePath
+ETreePath
e_tree_model_node_get_prev (ETreeModel *etree, ETreePath node)
{
g_return_val_if_fail (etree != NULL, NULL);
@@ -520,12 +520,12 @@ e_tree_model_node_get_prev (ETreeModel *etree, ETreePath node)
/**
* e_tree_model_node_is_root:
- * @etree:
- * @path:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
gboolean
e_tree_model_node_is_root (ETreeModel *etree, ETreePath node)
@@ -540,12 +540,12 @@ e_tree_model_node_is_root (ETreeModel *etree, ETreePath node)
/**
* e_tree_model_node_is_expandable:
- * @etree:
- * @path:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
gboolean
e_tree_model_node_is_expandable (ETreeModel *etree, ETreePath node)
@@ -571,12 +571,12 @@ e_tree_model_node_get_children (ETreeModel *etree, ETreePath node, ETreePath **n
/**
* e_tree_model_node_depth:
- * @etree:
- * @path:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
guint
e_tree_model_node_depth (ETreeModel *etree, ETreePath node)
@@ -761,12 +761,12 @@ e_tree_model_has_change_pending (ETreeModel *etree)
* @etree: The ETreeModel.
* @node: The ETreePath to the node we're getting the data from.
* @col: the column to retrieve data from
- *
+ *
* Return value: This function returns the value that is stored by the
* @etree in column @col and node @node. The data returned can be a
* pointer or any data value that can be stored inside a pointer.
*
- * The data returned is typically used by an sort renderer if it wants
+ * The data returned is typically used by an sort renderer if it wants
* to proxy the data of cell value_at at a better sorting order.
*
* The data returned must be valid until the model sends a signal that
@@ -793,7 +793,7 @@ e_tree_model_sort_value_at (ETreeModel *etree, ETreePath node, int col)
* @etree: The ETreeModel.
* @node: The ETreePath to the node we're getting the data from.
* @col: the column to retrieve data from
- *
+ *
* Return value: This function returns the value that is stored by the
* @etree in column @col and node @node. The data returned can be a
* pointer or any data value that can be stored inside a pointer.
@@ -831,12 +831,12 @@ e_tree_model_set_value_at (ETreeModel *etree, ETreePath node, int col, const voi
/**
* e_tree_model_node_is_editable:
- * @etree:
- * @path:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
gboolean
e_tree_model_node_is_editable (ETreeModel *etree, ETreePath node, int col)
@@ -851,12 +851,12 @@ e_tree_model_node_is_editable (ETreeModel *etree, ETreePath node, int col)
/**
* e_tree_model_duplicate_value:
- * @etree:
- * @path:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
void *
e_tree_model_duplicate_value (ETreeModel *etree, int col, const void *value)
@@ -871,12 +871,12 @@ e_tree_model_duplicate_value (ETreeModel *etree, int col, const void *value)
/**
* e_tree_model_free_value:
- * @etree:
- * @path:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
void
e_tree_model_free_value (ETreeModel *etree, int col, void *value)
@@ -889,12 +889,12 @@ e_tree_model_free_value (ETreeModel *etree, int col, void *value)
/**
* e_tree_model_initialize_value:
- * @etree:
- * @path:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
void *
e_tree_model_initialize_value (ETreeModel *etree, int col)
@@ -909,12 +909,12 @@ e_tree_model_initialize_value (ETreeModel *etree, int col)
/**
* e_tree_model_value_is_empty:
- * @etree:
- * @path:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
gboolean
e_tree_model_value_is_empty (ETreeModel *etree, int col, const void *value)
@@ -929,12 +929,12 @@ e_tree_model_value_is_empty (ETreeModel *etree, int col, const void *value)
/**
* e_tree_model_value_to_string:
- * @etree:
- * @path:
- *
- *
- *
- * Return value:
+ * @etree:
+ * @path:
+ *
+ *
+ *
+ * Return value:
**/
char *
e_tree_model_value_to_string (ETreeModel *etree, int col, const void *value)
@@ -949,12 +949,12 @@ e_tree_model_value_to_string (ETreeModel *etree, int col, const void *value)
/**
* e_tree_model_node_traverse:
- * @model:
- * @path:
- * @func:
- * @data:
- *
- *
+ * @model:
+ * @path:
+ * @func:
+ * @data:
+ *
+ *
**/
void
e_tree_model_node_traverse (ETreeModel *model, ETreePath path, ETreePathFunc func, gpointer data)
@@ -981,12 +981,12 @@ e_tree_model_node_traverse (ETreeModel *model, ETreePath path, ETreePathFunc fun
/**
* e_tree_model_node_traverse_preorder:
- * @model:
- * @path:
- * @func:
- * @data:
- *
- *
+ * @model:
+ * @path:
+ * @func:
+ * @data:
+ *
+ *
**/
void
e_tree_model_node_traverse_preorder (ETreeModel *model, ETreePath path, ETreePathFunc func, gpointer data)
@@ -1014,12 +1014,12 @@ e_tree_model_node_traverse_preorder (ETreeModel *model, ETreePath path, ETreePat
/**
* e_tree_model_node_traverse_preorder:
- * @model:
- * @path:
- * @func:
- * @data:
- *
- *
+ * @model:
+ * @path:
+ * @func:
+ * @data:
+ *
+ *
**/
static ETreePath
e_tree_model_node_real_traverse (ETreeModel *model, ETreePath path, ETreePath end_path, gboolean forward_direction, ETreePathFunc func, gpointer data)
@@ -1057,12 +1057,12 @@ e_tree_model_node_real_traverse (ETreeModel *model, ETreePath path, ETreePath en
/**
* e_tree_model_node_traverse_preorder:
- * @model:
- * @path:
- * @func:
- * @data:
- *
- *
+ * @model:
+ * @path:
+ * @func:
+ * @data:
+ *
+ *
**/
ETreePath
e_tree_model_node_find (ETreeModel *model, ETreePath path, ETreePath end_path, gboolean forward_direction, ETreePathFunc func, gpointer data)
diff --git a/widgets/table/e-tree-model.h b/widgets/table/e-tree-model.h
index ae20775fca..1d6168ff6f 100644
--- a/widgets/table/e-tree-model.h
+++ b/widgets/table/e-tree-model.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-tree-model.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -88,7 +88,7 @@ struct ETreeModelClass {
void *(*value_at) (ETreeModel *etm, ETreePath node, int col);
void (*set_value_at) (ETreeModel *etm, ETreePath node, int col, const void *val);
gboolean (*is_editable) (ETreeModel *etm, ETreePath node, int col);
-
+
void *(*duplicate_value) (ETreeModel *etm, int col, const void *value);
void (*free_value) (ETreeModel *etm, int col, void *value);
void *(*initialize_value) (ETreeModel *etm, int col);
diff --git a/widgets/table/e-tree-scrolled.h b/widgets/table/e-tree-scrolled.h
index 21d543e2d0..9671061222 100644
--- a/widgets/table/e-tree-scrolled.h
+++ b/widgets/table/e-tree-scrolled.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-tree-scrolled.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index be6be84dbe..2cd81690a5 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -357,7 +357,7 @@ etsm_is_path_selected (ETreeSelectionModel *etsm, ETreePath path)
return FALSE;
}
-/**
+/**
* e_selection_model_is_row_selected
* @selection: #ESelectionModel to check
* @n: The row to check
@@ -398,7 +398,7 @@ etsm_row_foreach_cb (gpointer key, gpointer value, gpointer user_data)
mac->callback(row, mac->closure);
}
-/**
+/**
* e_selection_model_foreach
* @selection: #ESelectionModel to traverse
* @callback: The callback function to call back.
@@ -407,7 +407,7 @@ etsm_row_foreach_cb (gpointer key, gpointer value, gpointer user_data)
* This routine calls the given callback function once for each
* selected row, passing closure as the closure.
*/
-static void
+static void
etsm_foreach (ESelectionModel *selection,
EForeachFunc callback,
gpointer closure)
@@ -422,7 +422,7 @@ etsm_foreach (ESelectionModel *selection,
g_hash_table_foreach(etsm->priv->paths, etsm_row_foreach_cb, &mac);
}
-/**
+/**
* e_selection_model_clear
* @selection: #ESelectionModel to clear
*
@@ -440,7 +440,7 @@ etsm_clear(ESelectionModel *selection)
e_selection_model_cursor_changed(E_SELECTION_MODEL(etsm), -1, -1);
}
-/**
+/**
* e_selection_model_selected_count
* @selection: #ESelectionModel to count
*
@@ -463,7 +463,7 @@ etsm_row_count (ESelectionModel *selection)
return e_table_model_row_count(E_TABLE_MODEL(etsm->priv->etta));
}
-/**
+/**
* e_selection_model_select_all
* @selection: #ESelectionModel to select all
*
@@ -490,7 +490,7 @@ etsm_select_all (ESelectionModel *selection)
e_selection_model_cursor_changed(E_SELECTION_MODEL(etsm), get_cursor_row(etsm), etsm->priv->cursor_col);
}
-/**
+/**
* e_selection_model_invert_selection
* @selection: #ESelectionModel to invert
*
@@ -802,28 +802,28 @@ e_tree_selection_model_class_init (ETreeSelectionModelClass *klass)
esm_class->move_selection_end = etsm_move_selection_end ;
esm_class->set_selection_end = etsm_set_selection_end ;
- g_object_class_install_property (object_class, PROP_CURSOR_ROW,
+ g_object_class_install_property (object_class, PROP_CURSOR_ROW,
g_param_spec_int ("cursor_row",
_("Cursor Row"),
/*_( */"XXX blurb" /*)*/,
0, G_MAXINT, 0,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_CURSOR_COL,
+ g_object_class_install_property (object_class, PROP_CURSOR_COL,
g_param_spec_int ("cursor_col",
_("Cursor Column"),
/*_( */"XXX blurb" /*)*/,
0, G_MAXINT, 0,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_MODEL,
+ g_object_class_install_property (object_class, PROP_MODEL,
g_param_spec_object ("model",
_("Model"),
"XXX blurb",
E_TREE_MODEL_TYPE,
G_PARAM_READWRITE));
- g_object_class_install_property (object_class, PROP_ETTA,
+ g_object_class_install_property (object_class, PROP_ETTA,
g_param_spec_object ("etta",
"ETTA",
"XXX blurb",
diff --git a/widgets/table/e-tree-selection-model.h b/widgets/table/e-tree-selection-model.h
index d574bf3ab6..2920ac6a9e 100644
--- a/widgets/table/e-tree-selection-model.h
+++ b/widgets/table/e-tree-selection-model.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-tree-selection-model.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-tree-simple.c b/widgets/table/e-tree-simple.c
index f63e991ec1..8d77ca7078 100644
--- a/widgets/table/e-tree-simple.c
+++ b/widgets/table/e-tree-simple.c
@@ -63,7 +63,7 @@ static void *
simple_initialize_value (ETableModel *etm, int col)
{
ETreeSimple *simple = E_TREE_SIMPLE(etm);
-
+
if (simple->initialize_value)
return simple->initialize_value (etm, col, simple->model_data);
else
@@ -74,7 +74,7 @@ static gboolean
simple_value_is_empty (ETableModel *etm, int col, const void *value)
{
ETreeSimple *simple = E_TREE_SIMPLE(etm);
-
+
if (simple->value_is_empty)
return simple->value_is_empty (etm, col, value, simple->model_data);
else
@@ -85,7 +85,7 @@ static char *
simple_value_to_string (ETableModel *etm, int col, const void *value)
{
ETreeSimple *simple = E_TREE_SIMPLE(etm);
-
+
if (simple->value_to_string)
return simple->value_to_string (etm, col, value, simple->model_data);
else
@@ -147,18 +147,18 @@ G_DEFINE_TYPE (ETreeSimple, e_tree_simple, E_TREE_MODEL_TYPE)
/**
* e_tree_simple_new:
- * @col_count:
- * @duplicate_value:
- * @free_value:
- * @initialize_value:
- * @value_is_empty:
- * @value_to_string:
- * @icon_at:
- * @value_at:
- * @set_value_at:
- * @is_editable:
- * @model_data:
- *
+ * @col_count:
+ * @duplicate_value:
+ * @free_value:
+ * @initialize_value:
+ * @value_is_empty:
+ * @value_to_string:
+ * @icon_at:
+ * @value_at:
+ * @set_value_at:
+ * @is_editable:
+ * @model_data:
+ *
* This initializes a new ETreeSimpleModel object. ETreeSimpleModel is
* an implementaiton of the abstract class ETreeModel. The ETreeSimpleModel
* is designed to allow people to easily create ETreeModels without having
@@ -167,8 +167,8 @@ G_DEFINE_TYPE (ETreeSimple, e_tree_simple, E_TREE_MODEL_TYPE)
* Instead, ETreeSimpleModel uses a setup based in callback functions, every
* callback function signature mimics the signature of each ETreeModel method
* and passes the extra @data pointer to each one of the method to provide them
- * with any context they might want to use.
- *
+ * with any context they might want to use.
+ *
* ETreeSimple is to ETreeModel as ETableSimple is to ETableModel.
*
* Return value: An ETreeSimple object (which is also an ETreeModel
diff --git a/widgets/table/e-tree-simple.h b/widgets/table/e-tree-simple.h
index d0b4f14828..c96acbcfe8 100644
--- a/widgets/table/e-tree-simple.h
+++ b/widgets/table/e-tree-simple.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-tree-simple.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-tree-sorted-variable.c b/widgets/table/e-tree-sorted-variable.c
index 0145a409d1..4bb9d9ada7 100644
--- a/widgets/table/e-tree-sorted-variable.c
+++ b/widgets/table/e-tree-sorted-variable.c
@@ -84,7 +84,7 @@ etsv_dispose (GObject *object)
if (etsv->sort_idle_id)
g_source_remove(etsv->sort_idle_id);
etsv->sort_idle_id = 0;
-
+
if (etsv->insert_idle_id)
g_source_remove(etsv->insert_idle_id);
etsv->insert_idle_id = 0;
@@ -359,7 +359,7 @@ etsv_sort_tree(ETreeSortedVariable *etsv, GNode *root)
GNode *childr;
etsv_sort_node(etsv, node);
-
+
for (child = node->child; child; child = child->next) {
etsv_sort_tree(etsv, child);
}
diff --git a/widgets/table/e-tree-sorted-variable.h b/widgets/table/e-tree-sorted-variable.h
index bf599a0b2d..e737b87e02 100644
--- a/widgets/table/e-tree-sorted-variable.h
+++ b/widgets/table/e-tree-sorted-variable.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-tree-sorted-variable.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -43,7 +43,7 @@ typedef struct {
ETreeModel base;
ETableSortInfo *sort_info;
-
+
ETableHeader *full_header;
int table_model_changed_id;
diff --git a/widgets/table/e-tree-sorted.c b/widgets/table/e-tree-sorted.c
index ea8f024dd4..62496a301f 100644
--- a/widgets/table/e-tree-sorted.c
+++ b/widgets/table/e-tree-sorted.c
@@ -519,7 +519,7 @@ resort_node (ETreeSorted *ets, ETreeSortedPath *path, gboolean resort_all_childr
path->child_needs_resort = 0;
}
}
- path->needs_resort = 0;
+ path->needs_resort = 0;
path->child_needs_resort = 0;
path->needs_regen_to_sort = 0;
path->resort_all_children = 0;
@@ -920,7 +920,7 @@ static void *
ets_initialize_value (ETreeModel *etm, int col)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
-
+
return e_tree_model_initialize_value (ets->priv->source, col);
}
@@ -928,7 +928,7 @@ static gboolean
ets_value_is_empty (ETreeModel *etm, int col, const void *value)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
-
+
return e_tree_model_value_is_empty (ets->priv->source, col, value);
}
@@ -936,7 +936,7 @@ static char *
ets_value_to_string (ETreeModel *etm, int col, const void *value)
{
ETreeSorted *ets = E_TREE_SORTED(etm);
-
+
return e_tree_model_value_to_string (ets->priv->source, col, value);
}
@@ -1153,7 +1153,7 @@ e_tree_sorted_class_init (ETreeSortedClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
klass->node_resorted = NULL;
-
+
object_class->dispose = ets_dispose;
object_class->finalize = ets_finalize;
@@ -1239,9 +1239,9 @@ e_tree_sorted_init (ETreeSorted *ets)
/**
* e_tree_sorted_construct:
- * @etree:
- *
- *
+ * @etree:
+ *
+ *
**/
void
e_tree_sorted_construct (ETreeSorted *ets, ETreeModel *source, ETableHeader *full_header, ETableSortInfo *sort_info)
@@ -1340,7 +1340,7 @@ e_tree_sorted_node_resorted (ETreeSorted *sorted, ETreePath node)
{
g_return_if_fail (sorted != NULL);
g_return_if_fail (E_IS_TREE_SORTED (sorted));
-
+
g_signal_emit (G_OBJECT (sorted), signals [NODE_RESORTED], 0, node);
}
diff --git a/widgets/table/e-tree-sorted.h b/widgets/table/e-tree-sorted.h
index d866bbd8fc..fce505f672 100644
--- a/widgets/table/e-tree-sorted.h
+++ b/widgets/table/e-tree-sorted.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-tree-sorted.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index afaf5f57fc..17e1987e86 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-tree-table-adapter.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -168,8 +168,8 @@ resort_node(ETreeTableAdapter *etta, GNode *gnode, gboolean recurse)
sort_needed = etta->priv->sort_info && e_table_sort_info_sorting_get_count (etta->priv->sort_info) > 0;
- for (i = 0, path = e_tree_model_node_get_first_child(etta->priv->source, node->path); path;
- path = e_tree_model_node_get_next(etta->priv->source, path), i++);
+ for (i = 0, path = e_tree_model_node_get_first_child(etta->priv->source, node->path); path;
+ path = e_tree_model_node_get_next(etta->priv->source, path), i++);
count = i;
if (count <= 1)
@@ -177,7 +177,7 @@ resort_node(ETreeTableAdapter *etta, GNode *gnode, gboolean recurse)
paths = g_new0(ETreePath, count);
- for (i = 0, path = e_tree_model_node_get_first_child(etta->priv->source, node->path); path;
+ for (i = 0, path = e_tree_model_node_get_first_child(etta->priv->source, node->path); path;
path = e_tree_model_node_get_next(etta->priv->source, path), i++)
paths[i] = path;
@@ -805,7 +805,7 @@ etta_proxy_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ET
generate_tree(etta, child);
else
insert_node(etta, parent, child);
-
+
e_table_model_changed(E_TABLE_MODEL(etta));
}
@@ -918,7 +918,7 @@ e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const char *f
TreeAndRoot tar;
xmlDocPtr doc;
xmlNode *root;
-
+
g_return_if_fail(etta != NULL);
doc = xmlNewDoc ((const unsigned char *)"1.0");
@@ -928,7 +928,7 @@ e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const char *f
tar.model = etta->priv->source;
tar.root = root;
tar.expanded_default = e_tree_model_get_expanded_default(etta->priv->source);
-
+
e_xml_set_integer_prop_by_name (root, (const unsigned char *)"vers", 2);
e_xml_set_bool_prop_by_name (root, (const unsigned char *)"default", tar.expanded_default);
@@ -1012,7 +1012,7 @@ set_collapsed_state_func (gpointer keyp, gpointer value, gpointer data)
void
e_tree_table_adapter_load_all_expanded_state (ETreeTableAdapter *etta, gboolean state)
{
-
+
g_return_if_fail(etta != NULL);
if (state)
@@ -1038,7 +1038,7 @@ e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *f
root = xmlDocGetRootElement (doc);
e_table_model_pre_change(E_TABLE_MODEL(etta));
-
+
model_default = e_tree_model_get_expanded_default(etta->priv->source);
if (!strcmp ((char *)root->name, "expanded_state")) {
@@ -1048,10 +1048,10 @@ e_tree_table_adapter_load_expanded_state (ETreeTableAdapter *etta, const char *f
if (state[0] == 't')
file_default = TRUE;
- else
+ else
file_default = FALSE; /* Even unspecified we'll consider as false */
}
-
+
/* Incase the default is changed, lets forget the changes and stick to default */
if (file_default != model_default) {
@@ -1136,7 +1136,7 @@ e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ETreePath path,
return;
node->expanded = expanded;
-
+
row = get_row(etta, path);
if (row == -1)
return;
@@ -1178,8 +1178,8 @@ e_tree_table_adapter_node_set_expanded_recurse (ETreeTableAdapter *etta, ETreePa
e_tree_table_adapter_node_set_expanded(etta, path, expanded);
- for (children = e_tree_model_node_get_first_child(etta->priv->source, path);
- children;
+ for (children = e_tree_model_node_get_first_child(etta->priv->source, path);
+ children;
children = e_tree_model_node_get_next(etta->priv->source, children)) {
e_tree_table_adapter_node_set_expanded_recurse(etta, children, expanded);
}
@@ -1197,13 +1197,13 @@ e_tree_table_adapter_row_of_node (ETreeTableAdapter *etta, ETreePath path)
return get_row(etta, path);
}
-gboolean
+gboolean
e_tree_table_adapter_root_node_is_visible(ETreeTableAdapter *etta)
{
return etta->priv->root_visible;
}
-void
+void
e_tree_table_adapter_show_node (ETreeTableAdapter *etta, ETreePath path)
{
ETreePath parent;
@@ -1216,7 +1216,7 @@ e_tree_table_adapter_show_node (ETreeTableAdapter *etta, ETreePath path)
}
}
-gboolean
+gboolean
e_tree_table_adapter_node_is_expanded (ETreeTableAdapter *etta, ETreePath path)
{
node_t *node = get_node(etta, path);
diff --git a/widgets/table/e-tree-table-adapter.h b/widgets/table/e-tree-table-adapter.h
index 36cbd09f27..0a57b593e8 100644
--- a/widgets/table/e-tree-table-adapter.h
+++ b/widgets/table/e-tree-table-adapter.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-tree-table-adapter.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 24ee33ff73..2c5f991bdc 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -275,7 +275,7 @@ static ETableCol *
current_search_col (ETree *et)
{
if (!et->priv->search_col_set) {
- et->priv->current_search_col =
+ et->priv->current_search_col =
e_table_util_calculate_current_search_col (et->priv->header,
et->priv->full_header,
et->priv->sort_info,
@@ -608,10 +608,10 @@ e_tree_init (ETree *e_tree)
e_tree->priv->search = e_table_search_new();
- e_tree->priv->search_search_id =
+ e_tree->priv->search_search_id =
g_signal_connect (G_OBJECT (e_tree->priv->search), "search",
G_CALLBACK (et_search_search), e_tree);
- e_tree->priv->search_accept_id =
+ e_tree->priv->search_accept_id =
g_signal_connect (G_OBJECT (e_tree->priv->search), "accept",
G_CALLBACK (et_search_accept), e_tree);
@@ -1124,7 +1124,7 @@ e_tree_setup_table (ETree *e_tree)
/**
* e_tree_set_search_column:
* @e_tree: #ETree object that will be modified
- * @col: Column index to use for searches
+ * @col: Column index to use for searches
*
* This routine sets the current search column to be used for keypress
* searches of the #ETree. If -1 is passed in for column, the current
@@ -1269,11 +1269,11 @@ e_tree_get_state_object (ETree *e_tree)
/**
* e_tree_get_state:
* @e_tree: The #ETree to act on
- *
+ *
* Builds a state object based on the current state and returns the
* string corresponding to that state.
- *
- * Return value:
+ *
+ * Return value:
* A string describing the current state of the #ETree.
**/
gchar *
@@ -1310,9 +1310,9 @@ e_tree_save_state (ETree *e_tree,
/**
* e_tree_get_spec:
* @e_tree: The #ETree to query
- *
+ *
* Returns the specification object.
- *
+ *
* Return value:
**/
ETableSpecification *
@@ -1352,7 +1352,7 @@ et_table_rows_deleted (ETableModel *table_model, int row, int count, ETree *et)
prev_node = e_tree_node_at_row (et, row-1);
node = e_tree_get_cursor (et);
-
+
/* Check if the cursor is a child of the node directly before the
* deleted region (implying that an expander was collapsed with
* the cursor inside it) */
@@ -1377,7 +1377,7 @@ et_connect_to_etta (ETree *et)
et->priv->table_cell_change_id = g_signal_connect (et->priv->etta, "model_cell_changed",
G_CALLBACK (et_table_cell_changed), et);
-
+
et->priv->table_rows_delete_id = g_signal_connect (et->priv->etta, "model_rows_deleted",
G_CALLBACK (et_table_rows_deleted), et);
@@ -1473,10 +1473,10 @@ et_real_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
* @ete: An optional #ETableExtras. (%NULL is valid.)
* @spec_str: The spec.
* @state_str: An optional state. (%NULL is valid.)
- *
+ *
* This is the internal implementation of e_tree_new() for use by
* subclasses or language bindings. See e_tree_new() for details.
- *
+ *
* Return value: %TRUE on success, %FALSE if an error occurred
**/
gboolean
@@ -1535,7 +1535,7 @@ e_tree_construct (ETree *e_tree, ETreeModel *etm, ETableExtras *ete,
* This is the internal implementation of e_tree_new_from_spec_file()
* for use by subclasses or language bindings. See
* e_tree_new_from_spec_file() for details.
- *
+ *
* Return value: %TRUE on success, %FALSE if an error occurred
**/
gboolean
@@ -1593,7 +1593,7 @@ e_tree_construct_from_spec_file (ETree *e_tree, ETreeModel *etm, ETableExtras *e
* @ete: An optional #ETableExtras (%NULL is valid.)
* @spec: The spec
* @state: An optional state (%NULL is valid.)
- *
+ *
* This function creates an #ETree from the given parameters. The
* #ETreeModel is a tree model to be represented. The #ETableExtras
* is an optional set of pixbufs, cells, and sorting functions to be
@@ -1604,8 +1604,8 @@ e_tree_construct_from_spec_file (ETree *e_tree, ETreeModel *etm, ETableExtras *e
* default sorting state and such. @state is an optional string
* specifying the current sorting state and such. If @state is NULL,
* then the default state from the spec will be used.
- *
- * Return value:
+ *
+ * Return value:
* The newly created #ETree or %NULL if there's an error.
**/
GtkWidget *
@@ -1634,7 +1634,7 @@ e_tree_new (ETreeModel *etm, ETableExtras *ete, const char *spec, const char *st
* @ete: An optional #ETableExtras. (%NULL is valid.)
* @spec_fn: The filename of the spec.
* @state_fn: An optional state file. (%NULL is valid.)
- *
+ *
* This is very similar to e_tree_new(), except instead of passing in
* strings you pass in the file names of the spec and state to load.
*
@@ -1644,8 +1644,8 @@ e_tree_new (ETreeModel *etm, ETableExtras *ete, const char *spec, const char *st
* @state_fn is the filename of the initial state to load. If this is
* %NULL or if the specified file doesn't exist, the default state
* from the spec file is used.
- *
- * Return value:
+ *
+ * Return value:
* The newly created #ETree or %NULL if there's an error.
**/
GtkWidget *
@@ -1851,7 +1851,7 @@ et_set_property (GObject *object,
NULL);
}
break;
-
+
case PROP_DRAW_FOCUS:
etree->priv->draw_focus = g_value_get_boolean (value);
if (etree->priv->item) {
@@ -2111,12 +2111,12 @@ e_tree_find_next (ETree *et, ETreeFindNextParams params, ETreePathFunc func, gpo
cursor = e_tree_get_cursor (et);
row = e_tree_table_adapter_row_of_node (et->priv->etta, cursor);
row_count = e_table_model_row_count (E_TABLE_MODEL (et->priv->etta));
-
+
if (params & E_TREE_FIND_NEXT_FORWARD)
found = find_next_in_range (et, row + 1, row_count - 1, func, data);
else
found = find_prev_in_range (et, row == -1 ? -1 : row - 1, 0, func, data);
-
+
if (found) {
e_tree_table_adapter_show_node (et->priv->etta, found);
e_tree_set_cursor (et, found);
@@ -2541,7 +2541,7 @@ e_tree_drag_begin (ETree *tree,
* @y: Y coordinate for the pixel
* @row_return: Pointer to return the row value
* @col_return: Pointer to return the column value
- *
+ *
* Return the row and column for the cell in which the pixel at (@x, @y) is
* contained.
**/
@@ -2577,7 +2577,7 @@ e_tree_get_cell_at (ETree *tree,
* @y_return: Returns the y coordinate of the upper right hand corner of the cell with respect to the widget.
* @width_return: Returns the width of the cell.
* @height_return: Returns the height of the cell.
- *
+ *
* Computes the data about this cell.
**/
void
@@ -2739,7 +2739,7 @@ scroll_timeout (gpointer data)
et->priv->last_drop_x,
et->priv->last_drop_y,
et->priv->last_drop_time);
-
+
return TRUE;
}
@@ -2866,8 +2866,8 @@ context_connect (ETree *et, GdkDragContext *context)
{
if (context == et->priv->last_drop_context)
return;
-
- if (et->priv->last_drop_context)
+
+ if (et->priv->last_drop_context)
g_object_weak_unref (G_OBJECT(et->priv->last_drop_context), context_destroyed, et);
else
g_object_ref (et);
@@ -3000,7 +3000,7 @@ et_drag_drop(GtkWidget *widget,
et->priv->drop_path = NULL;
et->priv->drop_col = -1;
- collapse_drag (et, path);
+ collapse_drag (et, path);
scroll_off (et);
return ret_val;
@@ -3222,7 +3222,7 @@ e_tree_class_init (ETreeClass *class)
G_TYPE_POINTER,
G_TYPE_INT,
GDK_TYPE_DRAG_CONTEXT);
-
+
et_signals[TREE_DRAG_LEAVE] =
g_signal_new ("tree_drag_leave",
G_OBJECT_CLASS_TYPE (object_class),
diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h
index e25110a0e6..2b3de1b042 100644
--- a/widgets/table/e-tree.h
+++ b/widgets/table/e-tree.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-tree.h
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -101,8 +101,8 @@ typedef struct {
ETreePath path,
int col,
GdkDragContext *context);
-
- /* Target side drag signals */
+
+ /* Target side drag signals */
void (* tree_drag_leave) (ETree *tree,
int row,
ETreePath path,
diff --git a/widgets/table/table-test.h b/widgets/table/table-test.h
index 60d62e8dc3..21696df835 100644
--- a/widgets/table/table-test.h
+++ b/widgets/table/table-test.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* table-test.c
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/table/test-check.c b/widgets/table/test-check.c
index 0fb1d38279..89f2af1ec2 100644
--- a/widgets/table/test-check.c
+++ b/widgets/table/test-check.c
@@ -78,7 +78,7 @@ value_at (ETableModel *etc, int col, int row, void *data)
return GINT_TO_POINTER (my_table [row].value);
else
return my_table [row].string;
-
+
}
static void
@@ -165,11 +165,11 @@ check_test (void)
GnomeCanvasItem *item;
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
-
+
e_table_model = e_table_simple_new (
col_count, row_count, value_at,
- set_value_at, is_cell_editable,
- duplicate_value, free_value,
+ set_value_at, is_cell_editable,
+ duplicate_value, free_value,
initialize_value, value_is_empty,
value_to_string,
NULL);
@@ -186,7 +186,7 @@ check_test (void)
col_0 = e_table_col_new_with_pixbuf (0, pixbuf, 0.0, 18, cell_image_check, e_int_compare, TRUE);
gdk_pixbuf_unref (pixbuf);
e_table_header_add_column (e_table_header, col_0, 0);
-
+
col_1 = e_table_col_new (1, "Item Name", 1.0, 20, cell_left_just, e_str_compare, TRUE);
e_table_header_add_column (e_table_header, col_1, 1);
e_table_col_set_arrow (col_1, E_TABLE_COL_ARROW_DOWN);
@@ -199,7 +199,7 @@ check_test (void)
g_signal_connect (canvas, "size_allocate",
G_CALLBACK (set_canvas_size), NULL);
-
+
gtk_container_add (GTK_CONTAINER (window), canvas);
gtk_widget_show_all (window);
gnome_canvas_item_new (
diff --git a/widgets/table/test-cols.c b/widgets/table/test-cols.c
index f0f0c970ae..b1dd6c4e6d 100644
--- a/widgets/table/test-cols.c
+++ b/widgets/table/test-cols.c
@@ -78,7 +78,7 @@ value_at (ETableModel *etc, int col, int row, void *data)
return GINT_TO_POINTER (my_table [row].value);
else
return my_table [row].string;
-
+
}
static void
@@ -164,7 +164,7 @@ multi_cols_test (void)
GnomeCanvasItem *item;
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
-
+
e_table_model = e_table_simple_new (
col_count, row_count, value_at,
set_value_at, is_cell_editable,
@@ -183,7 +183,7 @@ multi_cols_test (void)
{
GdkPixbuf **images = g_new (GdkPixbuf *, 3);
int i;
-
+
images [0] = gdk_pixbuf_new_from_file ("image1.png");
images [1] = gdk_pixbuf_new_from_file ("image2.png");
images [2] = gdk_pixbuf_new_from_file ("image3.png");
@@ -192,10 +192,10 @@ multi_cols_test (void)
for (i = 0; i < 3; i++)
gdk_pixbuf_unref (images [i]);
-
+
g_free (images);
- }
-
+ }
+
col_1 = e_table_col_new (1, "Item Name", 1.0, 20, cell_left_just, e_str_compare, TRUE);
e_table_header_add_column (e_table_header, col_1, 0);
@@ -209,7 +209,7 @@ multi_cols_test (void)
e_table_header_add_column (e_table_header_multiple, col_0, 0);
e_table_header_add_column (e_table_header_multiple, col_1, 1);
e_table_header_add_column (e_table_header_multiple, col_1, 2);
-
+
/*
* GUI
*/
@@ -218,7 +218,7 @@ multi_cols_test (void)
g_signal_connect (canvas, "size_allocate",
G_CALLBACK (set_canvas_size), NULL);
-
+
gtk_container_add (GTK_CONTAINER (window), canvas);
gtk_widget_show_all (window);
@@ -242,7 +242,7 @@ multi_cols_test (void)
NULL);
e_canvas_item_move_absolute (item, 0, 30);
-
+
gnome_canvas_item_new (
gnome_canvas_root (GNOME_CANVAS (canvas)),
e_table_header_item_get_type (),
diff --git a/widgets/text/e-text-model-repos.c b/widgets/text/e-text-model-repos.c
index d6687610b6..cb7309279e 100644
--- a/widgets/text/e-text-model-repos.c
+++ b/widgets/text/e-text-model-repos.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text-model-repos.c - Standard ETextModelReposFn definitions
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -45,7 +45,7 @@ e_repos_absolute (gint pos, gpointer data)
gint len = e_text_model_get_text_length (info->model);
pos += len + 1;
}
-
+
return e_text_model_validate_position (info->model, pos);
}
diff --git a/widgets/text/e-text-model-repos.h b/widgets/text/e-text-model-repos.h
index 46c928f133..2f1ef67430 100644
--- a/widgets/text/e-text-model-repos.h
+++ b/widgets/text/e-text-model-repos.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text-model-repos.h - Standard ETextModelReposFn definitions
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -56,7 +56,7 @@ typedef struct {
ETextModel *model;
gint pos; /* Location of first deleted character. */
gint len; /* Number of characters deleted. */
-} EReposDeleteShift;
+} EReposDeleteShift;
gint e_repos_delete_shift (gint pos, gpointer data);
diff --git a/widgets/text/e-text-model-test.c b/widgets/text/e-text-model-test.c
index efa4bc0402..13d6121414 100644
--- a/widgets/text/e-text-model-test.c
+++ b/widgets/text/e-text-model-test.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text-model-test.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -65,10 +65,10 @@ main (int argc, gchar **argv)
e_text_model_set_text (model, "My favorite website is http://www.ximian.com. My next favorite www.assbarn.com.");
// describe_model (model);
-
+
for (i=0; i<2; ++i) {
win[i] = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
+
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
canvas[i] = e_canvas_new ();
gtk_widget_pop_colormap ();
diff --git a/widgets/text/e-text-model.c b/widgets/text/e-text-model.c
index 1b4a507518..4f5cf529a6 100644
--- a/widgets/text/e-text-model.c
+++ b/widgets/text/e-text-model.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text-model.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -108,12 +108,12 @@ e_text_model_class_init (ETextModelClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
+
/* No default signal handlers. */
klass->changed = NULL;
klass->reposition = NULL;
klass->object_activated = NULL;
-
+
klass->validate_pos = e_text_model_real_validate_position;
klass->get_text = e_text_model_real_get_text;
@@ -127,7 +127,7 @@ e_text_model_class_init (ETextModelClass *klass)
klass->objectify = NULL;
klass->obj_count = NULL;
klass->get_nth_obj = NULL;
-
+
object_class->dispose = e_text_model_dispose;
}
@@ -201,7 +201,7 @@ e_text_model_real_set_text (ETextModel *model, const gchar *text)
g_string_set_size (model->priv->text, 0);
} else if (*model->priv->text->str == '\0' || strcmp (model->priv->text->str, text)) {
-
+
g_string_assign (model->priv->text, text);
changed = TRUE;
@@ -305,7 +305,7 @@ void
e_text_model_cancel_completion (ETextModel *model)
{
g_return_if_fail (E_IS_TEXT_MODEL (model));
-
+
g_signal_emit (model, e_text_model_signals[E_TEXT_MODEL_CANCEL_COMPLETION], 0);
}
@@ -383,7 +383,7 @@ e_text_model_set_text (ETextModel *model, const gchar *text)
void
e_text_model_insert (ETextModel *model, gint position, const gchar *text)
-{
+{
g_return_if_fail (model != NULL);
g_return_if_fail (E_IS_TEXT_MODEL (model));
@@ -535,7 +535,7 @@ e_text_model_get_object_at_offset (ETextModel *model, gint offset)
return E_TEXT_MODEL_GET_CLASS (model)->obj_at_offset (model, offset);
- } else {
+ } else {
/* If not, we fake it.*/
gint i, N, pos0, pos1;
@@ -547,7 +547,7 @@ e_text_model_get_object_at_offset (ETextModel *model, gint offset)
if (pos0 <= offset && offset < pos1)
return i;
}
-
+
}
return -1;
diff --git a/widgets/text/e-text-model.h b/widgets/text/e-text-model.h
index 5d6422f5c0..d45e3f37cd 100644
--- a/widgets/text/e-text-model.h
+++ b/widgets/text/e-text-model.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text-model.h
* Copyright 2000, 2001, Ximian, Inc.
*
diff --git a/widgets/text/e-text-test.c b/widgets/text/e-text-test.c
index ec6562787d..01396cbd78 100644
--- a/widgets/text/e-text-test.c
+++ b/widgets/text/e-text-test.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text-test.c - E-Text item test program
* Copyright 2000: Iain Holmes <ih@csd.abdn.ac.uk>
*
@@ -121,7 +121,7 @@ main (int argc,
gtk_entry_set_text(GTK_ENTRY(text), "Hello World! This is a really long string to test out the ellipsis stuff.");
gtk_container_add (GTK_CONTAINER (frame), text);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
-
+
frame = gtk_frame_new ("Font");
font = gtk_entry_new ();
gtk_entry_set_text(GTK_ENTRY(font), "fixed");
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 6941314dfa..f514f41672 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text.c - Text item for evolution.
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -155,7 +155,7 @@ static void e_text_editable_set_position (GtkEditable *editable,
gint position);
static gint e_text_editable_get_position (GtkEditable *editable);
#endif
-
+
/* IM Context Callbacks */
static void e_text_commit_cb (GtkIMContext *context,
const gchar *str,
@@ -203,7 +203,7 @@ e_text_dispose (GObject *object)
text->tooltip_owner = 0;
if (text->model_changed_signal_id)
- g_signal_handler_disconnect (text->model,
+ g_signal_handler_disconnect (text->model,
text->model_changed_signal_id);
text->model_changed_signal_id = 0;
@@ -236,13 +236,13 @@ e_text_dispose (GObject *object)
g_source_remove(text->timeout_id);
text->timeout_id = 0;
}
-
+
if (text->timer) {
g_timer_stop(text->timer);
g_timer_destroy(text->timer);
text->timer = NULL;
}
-
+
if ( text->tooltip_timeout ) {
g_source_remove (text->tooltip_timeout);
text->tooltip_timeout = 0;
@@ -297,7 +297,7 @@ insert_preedit_text (EText *text)
text->text = e_text_model_get_text(text->model);
length = strlen (text->text);
- g_string_prepend_len (tmp_string, text->text,length);
+ g_string_prepend_len (tmp_string, text->text,length);
if (text->preedit_len)
gtk_im_context_get_preedit_string (text->im_context,
@@ -309,7 +309,7 @@ insert_preedit_text (EText *text)
else
text->preedit_len = preedit_length = 0;
- cpos = g_utf8_offset_to_pointer (text->text, text->selection_start) - text->text;
+ cpos = g_utf8_offset_to_pointer (text->text, text->selection_start) - text->text;
if (preedit_length) {
g_string_insert (tmp_string, cpos, preedit_string);
@@ -428,7 +428,7 @@ reset_layout (EText *text)
pango_layout_context_changed (text->layout);
text->font_desc = pango_font_description_new ();
- pango_font_description_set_size (text->font_desc,
+ pango_font_description_set_size (text->font_desc,
pango_font_description_get_size ((GTK_WIDGET (item->canvas))->style->font_desc));
pango_font_description_set_family (text->font_desc,
pango_font_description_get_family ((GTK_WIDGET (item->canvas))->style->font_desc));
@@ -679,7 +679,7 @@ e_text_set_property (GObject *object,
GdkColor color = { 0, 0, 0, 0, };
GdkColor *pcolor;
gboolean color_changed;
-
+
gboolean needs_update = 0;
gboolean needs_reflow = 0;
@@ -694,7 +694,7 @@ e_text_set_property (GObject *object,
if ( text->model_changed_signal_id )
g_signal_handler_disconnect (text->model,
text->model_changed_signal_id);
-
+
if ( text->model_repos_signal_id )
g_signal_handler_disconnect (text->model,
text->model_repos_signal_id);
@@ -731,7 +731,7 @@ e_text_set_property (GObject *object,
}
text->tep = E_TEXT_EVENT_PROCESSOR(g_value_get_object (value));
g_object_ref(text->tep);
- text->tep_command_id =
+ text->tep_command_id =
g_signal_connect(text->tep,
"command",
G_CALLBACK(e_text_command),
@@ -898,7 +898,7 @@ e_text_set_property (GObject *object,
text->needs_split_into_lines = 1;
needs_reflow = 1;
break;
-
+
case PROP_BREAK_CHARACTERS:
if ( text->break_characters ) {
g_free(text->break_characters);
@@ -930,7 +930,7 @@ e_text_set_property (GObject *object,
}
needs_reflow = 1;
break;
-
+
case PROP_DRAW_BORDERS:
if (text->draw_borders != g_value_get_boolean (value)) {
text->draw_borders = g_value_get_boolean (value);
@@ -1096,7 +1096,7 @@ e_text_get_property (GObject *object,
case PROP_TEXT_HEIGHT:
g_value_set_double (value, text->height / text->item.canvas->pixels_per_unit);
break;
-
+
case PROP_EDITABLE:
g_value_set_boolean (value, text->editable);
break;
@@ -1112,7 +1112,7 @@ e_text_get_property (GObject *object,
case PROP_LINE_WRAP:
g_value_set_boolean (value, text->line_wrap);
break;
-
+
case PROP_BREAK_CHARACTERS:
g_value_set_string (value, g_strdup (text->break_characters));
break;
@@ -1136,11 +1136,11 @@ e_text_get_property (GObject *object,
case PROP_DRAW_BACKGROUND:
g_value_set_boolean (value, text->draw_background);
break;
-
+
case PROP_DRAW_BUTTON:
g_value_set_boolean (value, text->draw_button);
break;
-
+
case PROP_ALLOW_NEWLINES:
g_value_set_boolean (value, text->allow_newlines);
break;
@@ -1152,7 +1152,7 @@ e_text_get_property (GObject *object,
case PROP_IM_CONTEXT:
g_value_set_object (value, text->im_context);
break;
-
+
case PROP_HANDLE_POPUP:
g_value_set_boolean (value, text->handle_popup);
break;
@@ -1252,7 +1252,7 @@ e_text_realize (GnomeCanvasItem *item)
gdk_color_context_query_color (item->canvas->cc, &text->color);
gdk_gc_set_foreground (text->gc, &text->color);
#endif
-
+
text->i_cursor = gdk_cursor_new (GDK_XTERM);
text->default_cursor = gdk_cursor_new (GDK_LEFT_PTR);
}
@@ -1282,7 +1282,7 @@ _get_tep(EText *text)
{
if (!text->tep) {
text->tep = e_text_event_processor_emacs_like_new();
- text->tep_command_id =
+ text->tep_command_id =
g_signal_connect(text->tep,
"command",
G_CALLBACK(e_text_command),
@@ -1399,7 +1399,7 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
"width", &thiswidth,
"height", &thisheight,
NULL);
-
+
if (text->draw_borders){
gtk_paint_shadow (widget->style, drawable,
@@ -1412,9 +1412,9 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
if (text->draw_background) {
gtk_paint_flat_box (widget->style, drawable,
GTK_WIDGET_STATE(widget), GTK_SHADOW_NONE,
- NULL, widget, "entry_bg",
+ NULL, widget, "entry_bg",
thisx + widget->style->xthickness,
- thisy + widget->style->ythickness,
+ thisy + widget->style->ythickness,
thiswidth - widget->style->xthickness * 2,
thisheight - widget->style->ythickness * 2);
}
@@ -1513,7 +1513,7 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
}
- insert_preedit_text (text);
+ insert_preedit_text (text);
if (!pango_layout_get_text (text->layout))
return;
@@ -1533,7 +1533,7 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
rect.y = ypos;
rect.width = text->clip_cwidth - text->xofs;
rect.height = text->clip_cheight - text->yofs;
-
+
gdk_gc_set_clip_rectangle (main_gc, &rect);
clip_rect = &rect;
}
@@ -1583,7 +1583,7 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
if (start_index < line->start_index + line->length
&& end_index > line->start_index) {
-
+
if (start_index <= line->start_index)
s = line->start_index;
else
@@ -1624,7 +1624,7 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
}
gdk_gc_set_clip_region (text_gc, clip_region);
- gdk_draw_layout (drawable, text_gc,
+ gdk_draw_layout (drawable, text_gc,
xpos, ypos,
text->layout);
@@ -1807,7 +1807,7 @@ _blink_scroll_timeout (gpointer data)
gulong current_time;
gboolean scroll = FALSE;
gboolean redraw = FALSE;
-
+
g_timer_elapsed(text->timer, &current_time);
if (text->scroll_start + SCROLL_WAIT_TIME > 1000000) {
@@ -1917,7 +1917,7 @@ tooltip_ungrab (GtkWidget *tooltip, GdkEvent *event, EText *text)
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
e_canvas_hide_tooltip (E_CANVAS(GNOME_CANVAS_ITEM(text)->canvas));
-
+
gtk_propagate_event (GTK_WIDGET(GNOME_CANVAS_ITEM(text)->canvas), event);
return TRUE;
@@ -1994,7 +1994,7 @@ _do_tooltip (gpointer data)
canvas = e_canvas_new ();
gtk_container_add (GTK_CONTAINER (tooltip_window), canvas);
-
+
/* Get the longest line length */
pango_layout_get_size (text->layout, &max_width, NULL);
@@ -2094,7 +2094,7 @@ _do_tooltip (gpointer data)
"x2", (double) tooltip_width + 4 + (text->draw_borders ? BORDER_INDENT * 2 : 0),
"y2", (double) tooltip_height + 4 + (text->draw_borders ? BORDER_INDENT * 2 : 0),
NULL);
-
+
gtk_widget_show (canvas);
gtk_widget_realize (tooltip_window);
@@ -2102,11 +2102,11 @@ _do_tooltip (gpointer data)
tooltip_width + 4 + (text->draw_borders ? BORDER_INDENT * 2 : 0),
tooltip_height + 4 + (text->draw_borders ? BORDER_INDENT * 2 : 0));
gnome_canvas_set_scroll_region (GNOME_CANVAS(canvas), 0.0, 0.0,
- tooltip_width + (text->draw_borders ? BORDER_INDENT * 2 : 0),
+ tooltip_width + (text->draw_borders ? BORDER_INDENT * 2 : 0),
(double)tooltip_height + (text->draw_borders ? BORDER_INDENT * 2 : 0));
g_signal_connect (tooltip_window, "event",
G_CALLBACK(tooltip_event), text);
-
+
g_object_weak_ref (G_OBJECT (tooltip_window),
tooltip_destroy, text);
g_object_ref (text);
@@ -2118,9 +2118,9 @@ _do_tooltip (gpointer data)
gdk_keyboard_grab (tooltip_window->window, FALSE, GDK_CURRENT_TIME);
g_signal_connect (tooltip_window, "key-press-event", G_CALLBACK (tooltip_ungrab), text);
-
+
text->tooltip_owner = TRUE;
-
+
text->tooltip_timeout = 0;
return FALSE;
@@ -2212,11 +2212,11 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
/* Evil hack to disconnect the signal handlers for the previous Etext
* which was not disconnected because of being in preedit mode.
* In preedit mode the widget can go out of focus due to popups associated
- * with preedit.,but still the callbacks need to be connected.
- * Here when a new text widget comes into focus we can disconnect the
+ * with preedit.,but still the callbacks need to be connected.
+ * Here when a new text widget comes into focus we can disconnect the
* old one.Shouldn't hurt much, as in worst case, save_text which should
- * be disconnected will be overwritten and we will have signal
- * handlers connect to multiple e-texts but with subsequent commit these
+ * be disconnected will be overwritten and we will have signal
+ * handlers connect to multiple e-texts but with subsequent commit these
* should go away.
*/
@@ -2244,8 +2244,8 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
start_editing (text);
text->show_cursor = FALSE; /* so we'll redraw and the cursor will be shown */
} else {
- /* Incase we are not disconnecting the signals
- * for text, we are saving text for
+ /* Incase we are not disconnecting the signals
+ * for text, we are saving text for
* disconnecting in the next focus_in.
*/
if (!text->preedit_len && text->im_context) {
@@ -2275,11 +2275,11 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
}
return_val = 0;
break;
- case GDK_KEY_PRESS:
+ case GDK_KEY_PRESS:
/* Handle S-F10 key binding here. */
- if (event->key.keyval == GDK_F10
+ if (event->key.keyval == GDK_F10
&& (event->key.state & GDK_SHIFT_MASK)
&& text->handle_popup ){
@@ -2337,7 +2337,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
if (event->type == GDK_KEY_PRESS)
g_signal_emit (text, e_text_signals[E_TEXT_KEYPRESS], 0,
e_tep_event.key.keyval, e_tep_event.key.state);
-
+
if (e_tep_event.key.string)
g_free (e_tep_event.key.string);
@@ -2354,8 +2354,8 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
}
e_canvas_hide_tooltip (E_CANVAS(GNOME_CANVAS_ITEM(text)->canvas));
#if 0
- if ((!text->editing)
- && text->editable
+ if ((!text->editing)
+ && text->editable
&& event->type == GDK_BUTTON_RELEASE
&& event->button.button == 1) {
GdkEventButton button = event->button;
@@ -2373,8 +2373,8 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
e_tep_event.type = GDK_BUTTON_RELEASE;
}
#else
- if ((!text->editing)
- && text->editable
+ if ((!text->editing)
+ && text->editable
&& (event->button.button == 1 ||
event->button.button == 2)) {
e_canvas_item_grab_focus (item, TRUE);
@@ -2394,10 +2394,10 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
}
}
- /* Create our own double and triple click events,
+ /* Create our own double and triple click events,
as gnome-canvas doesn't forward them to us */
if (event->type == GDK_BUTTON_PRESS) {
- if (text->dbl_timeout == 0 &&
+ if (text->dbl_timeout == 0 &&
text->tpl_timeout == 0) {
text->dbl_timeout = g_timeout_add (200,
_click,
@@ -2408,10 +2408,10 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
text->tpl_timeout = g_timeout_add (200, _click, &(text->tpl_timeout));
} else {
e_tep_event.type = GDK_3BUTTON_PRESS;
- }
+ }
}
}
-
+
if (text->editing) {
GdkEventButton button = event->button;
e_tep_event.button.time = button.time;
@@ -2472,7 +2472,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
text->tooltip_timeout = 0;
}
}
-
+
text->pointer_in = FALSE;
if (text->editing || text->draw_borders) {
if ( ! text->default_cursor_shown ) {
@@ -2495,7 +2495,7 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event)
void
e_text_copy_clipboard (EText *text)
{
- gint selection_start_pos;
+ gint selection_start_pos;
gint selection_end_pos;
selection_start_pos = MIN (text->selection_start, text->selection_end);
@@ -2573,7 +2573,7 @@ primary_get_cb (GtkClipboard *clipboard,
sel_end = g_utf8_offset_to_pointer (text->text, sel_end) - text->text;
if (sel_start != sel_end) {
- gtk_selection_data_set_text (selection_data,
+ gtk_selection_data_set_text (selection_data,
text->text + sel_start,
sel_end - sel_start);
}
@@ -2596,13 +2596,13 @@ e_text_update_primary_selection (EText *text)
{ "UTF8_STRING", 0, 0 },
{ "UTF-8", 0, 0 },
{ "STRING", 0, 0 },
- { "TEXT", 0, 0 },
+ { "TEXT", 0, 0 },
{ "COMPOUND_TEXT", 0, 0 }
};
GtkClipboard *clipboard;
clipboard = gtk_widget_get_clipboard (GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas), GDK_SELECTION_PRIMARY);
-
+
if (text->selection_start != text->selection_end) {
if (!gtk_clipboard_set_with_owner (clipboard, targets, G_N_ELEMENTS (targets),
primary_get_cb, primary_clear_cb, G_OBJECT (text)))
@@ -2620,7 +2620,7 @@ paste_received (GtkClipboard *clipboard,
gpointer data)
{
EText *etext = E_TEXT (data);
-
+
if (text && g_utf8_validate (text, strlen (text), NULL)) {
if (etext->selection_end != etext->selection_start)
e_text_delete_selection (etext);
@@ -2728,7 +2728,7 @@ popup_targets_received (GtkClipboard *clipboard,
gtk_widget_show (menuitem);
submenu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu);
-
+
gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), menuitem);
gtk_im_multicontext_append_menuitems (GTK_IM_MULTICONTEXT (text->im_context),
@@ -2813,7 +2813,7 @@ next_word (EText *text, int start)
}
}
}
-
+
return g_utf8_pointer_to_offset (text->text, p);
}
@@ -2831,7 +2831,7 @@ find_offset_into_line (EText *text, int offset_into_text, char **start_of_line)
}
else {
p = g_utf8_find_prev_char (text->text, p);
-
+
while (p && p > text->text) {
if (*p == '\n') {
if (start_of_line)
@@ -2859,11 +2859,11 @@ _get_updated_position (EText *text, gboolean direction)
char *p = NULL;
gint new_pos = 0;
gint length = 0;
-
+
/* Basic sanity test, return whatever position we are currently at. */
g_return_val_if_fail (text->layout != NULL, text->selection_end);
- length = g_utf8_strlen (text->text, -1);
+ length = g_utf8_strlen (text->text, -1);
/* length checks to make sure we are not wandering off into nonexistant memory... */
if((text->selection_end >= length) && (TRUE == direction)) /* forward */
@@ -2871,7 +2871,7 @@ _get_updated_position (EText *text, gboolean direction)
/* checking for -ve value wont hurt! */
if((text->selection_end <= 0) && (FALSE == direction)) /* backward */
return 0;
-
+
/* check for validness of full text->text */
if(!g_utf8_validate(text->text, -1, NULL))
return text->selection_end;
@@ -2891,13 +2891,13 @@ _get_updated_position (EText *text, gboolean direction)
p = g_utf8_next_char (p);
else
p = g_utf8_prev_char (p);
-
+
/* validate the new string & return with original position if check fails */
if(!g_utf8_validate (p, -1, NULL))
break; /* will return old value of new_pos */
-
+
new_pos = g_utf8_pointer_to_offset (text->text, p);
-
+
/* if is_cursor_position is set, cursor can appear in front of character.
i.e. this is a grapheme boundary AND make some sanity checks */
if((new_pos >=0) && (new_pos < n_attrs) && (log_attrs[new_pos].is_cursor_position))
@@ -2908,10 +2908,10 @@ _get_updated_position (EText *text, gboolean direction)
break;
}
}
-
+
if(log_attrs)
g_free(log_attrs);
-
+
return new_pos;
}
@@ -2926,7 +2926,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
gint new_pos = 0;
switch (command->position) {
-
+
case E_TEP_VALUE:
new_pos = command->value;
break;
@@ -2946,7 +2946,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
case E_TEP_START_OF_LINE:
if (text->selection_end >= 1) {
-
+
p = g_utf8_offset_to_pointer (text->text, text->selection_end);
if (p != text->text) {
p = g_utf8_find_prev_char (text->text, p);
@@ -2965,7 +2965,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
case E_TEP_END_OF_LINE:
new_pos = -1;
length = g_utf8_strlen (text->text, -1);
-
+
if (text->selection_end >= length) {
new_pos = length;
} else {
@@ -2976,7 +2976,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
if (*p == '\n') {
new_pos = g_utf8_pointer_to_offset (text->text, p);
p = NULL;
- } else
+ } else
p = g_utf8_next_char (p);
}
}
@@ -2993,7 +2993,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
new_pos = length;
else
new_pos = _get_updated_position(text, TRUE); /* get updated position to display cursor */
-
+
break;
case E_TEP_BACKWARD_CHARACTER:
@@ -3032,7 +3032,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
}
}
}
-
+
break;
case E_TEP_FORWARD_LINE: {
@@ -3107,7 +3107,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
/* This is a silly hack to cause double-clicking on an object
to activate that object.
(Normally, double click == select word, which is why this is here.) */
-
+
obj_num = e_text_model_get_object_at_offset (text->model, text->selection_start);
if (obj_num != -1) {
e_text_model_activate_nth_object (text->model, obj_num);
@@ -3140,7 +3140,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
text->selection_start = e_text_model_validate_position (text->model, text->selection_start);
-
+
length = g_utf8_strlen (text->text, -1);
if (text->selection_end >= length) {
new_pos = length;
@@ -3169,7 +3169,7 @@ _get_position(EText *text, ETextEventProcessorCommand *command)
case E_TEP_FORWARD_PARAGRAPH:
case E_TEP_BACKWARD_PARAGRAPH:
-
+
case E_TEP_FORWARD_PAGE:
case E_TEP_BACKWARD_PAGE:
new_pos = text->selection_end;
@@ -3288,7 +3288,7 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
case E_TEP_SELECT:
text->selection_start = e_text_model_validate_position (text->model, text->selection_start); /* paranoia */
text->selection_end = _get_position(text, command);
-
+
e_text_update_primary_selection (text);
use_start = FALSE;
@@ -3346,7 +3346,7 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
break;
case E_TEP_GRAB:
e_canvas_item_grab (E_CANVAS (GNOME_CANVAS_ITEM(text)->canvas),
- GNOME_CANVAS_ITEM(text),
+ GNOME_CANVAS_ITEM(text),
GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK,
text->i_cursor,
command->time,
@@ -3392,7 +3392,7 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
/* check if we are using selection_start or selection_end for moving? */
selection_index = use_start ? text->selection_start : text->selection_end;
-
+
/* convert to a byte index */
selection_index = g_utf8_offset_to_pointer (text->text, selection_index) - text->text;
@@ -3431,14 +3431,14 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
if (xpos + 2 < text->xofs_edit) {
text->xofs_edit = xpos;
}
-
+
clip_width = text->clip_width;
if (clip_width >= 0 && text->draw_borders) {
clip_width -= 6;
if (clip_width < 0)
clip_width = 0;
}
-
+
if (xpos + pango_pos.width - clip_width > text->xofs_edit) {
text->xofs_edit = xpos + pango_pos.width - clip_width;
}
@@ -3456,13 +3456,13 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp
clip_height = text->height;
else
clip_height = text->clip_height;
-
+
if (clip_height >= 0 && text->draw_borders) {
clip_height -= 6;
if (clip_height < 0)
clip_height = 0;
}
-
+
if (ypos - clip_height > text->yofs_edit) {
text->yofs_edit = ypos - clip_height;
}
@@ -3572,7 +3572,7 @@ e_text_class_init (ETextClass *klass)
_( "Strikeout" ),
FALSE,
G_PARAM_READWRITE));
-
+
g_object_class_install_property (gobject_class, PROP_ANCHOR,
g_param_spec_enum ("anchor",
_( "Anchor" ),
@@ -3798,12 +3798,12 @@ e_text_init (EText *text)
text->revert = NULL;
- text->model_changed_signal_id =
+ text->model_changed_signal_id =
g_signal_connect (text->model,
"changed",
G_CALLBACK (e_text_text_model_changed),
text);
- text->model_repos_signal_id =
+ text->model_repos_signal_id =
g_signal_connect (text->model,
"reposition",
G_CALLBACK (e_text_text_model_reposition),
@@ -3894,9 +3894,9 @@ e_text_commit_cb (GtkIMContext *context,
}
}
-/*
+/*
* Fetch cursor location into Strong or Weak positions so as to
- * display the preedit candidate selection window in the right place
+ * display the preedit candidate selection window in the right place
*/
static void
e_text_get_cursor_locations (EText *text,
@@ -3939,7 +3939,7 @@ static void
update_im_cursor_position (EText *text)
{
GdkRectangle area;
-
+
e_text_get_cursor_locations (text, &area, NULL);
gtk_im_context_set_cursor_location (text->im_context, &area);
@@ -3952,7 +3952,7 @@ e_text_preedit_changed_cb (GtkIMContext *context,
gchar *preedit_string = NULL;
gint cursor_pos;
- gtk_im_context_get_preedit_string (context, &preedit_string,
+ gtk_im_context_get_preedit_string (context, &preedit_string,
NULL, &cursor_pos);
cursor_pos = CLAMP (cursor_pos, 0, g_utf8_strlen (preedit_string, -1));
@@ -3971,7 +3971,7 @@ e_text_retrieve_surrounding_cb (GtkIMContext *context,
text->text,
strlen (text->text),
g_utf8_offset_to_pointer (text->text, MIN (text->selection_start, text->selection_end)) - text->text);
-
+
return TRUE;
}
diff --git a/widgets/text/e-text.h b/widgets/text/e-text.h
index 0f911b002d..eb7539f14b 100644
--- a/widgets/text/e-text.h
+++ b/widgets/text/e-text.h
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-text.h - Text item for evolution.
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -102,7 +102,7 @@ typedef struct _ETextClass ETextClass;
struct _EText {
GnomeCanvasItem item;
-
+
ETextModel *model;
gint model_changed_signal_id;
gint model_repos_signal_id;