aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authornobody <nobody@localhost>2003-04-02 01:15:53 +0800
committernobody <nobody@localhost>2003-04-02 01:15:53 +0800
commit2e5b2bbb530b642dda56b332cfd93810ac415098 (patch)
treee2b63c11a404a5dd99d407c989c8846fd0d5379d /addressbook
parent5cda225087bfdc66e19edb703689e8af655e171c (diff)
downloadgsoc2013-evolution-EVOLUTION_1_2_4.tar
gsoc2013-evolution-EVOLUTION_1_2_4.tar.gz
gsoc2013-evolution-EVOLUTION_1_2_4.tar.bz2
gsoc2013-evolution-EVOLUTION_1_2_4.tar.lz
gsoc2013-evolution-EVOLUTION_1_2_4.tar.xz
gsoc2013-evolution-EVOLUTION_1_2_4.tar.zst
gsoc2013-evolution-EVOLUTION_1_2_4.zip
This commit was manufactured by cvs2svn to create tagEVOLUTION_1_2_4
'EVOLUTION_1_2_4'. svn path=/tags/EVOLUTION_1_2_4/; revision=20614
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog2878
-rw-r--r--addressbook/backend/ebook/e-book-util.c210
-rw-r--r--addressbook/backend/ebook/e-card-simple.c311
-rw-r--r--addressbook/backend/ebook/e-card-simple.h18
-rw-r--r--addressbook/backend/ebook/e-card.c1174
-rw-r--r--addressbook/backend/ebook/e-card.h28
-rw-r--r--addressbook/backend/ebook/evolution-ldif-importer.c138
-rw-r--r--addressbook/backend/ebook/evolution-vcard-importer.c105
-rw-r--r--addressbook/backend/pas/pas-backend-file.c598
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.c626
-rw-r--r--addressbook/gui/component/addressbook-component.c135
-rw-r--r--addressbook/gui/component/ldap-config.glade8052
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c190
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c589
-rw-r--r--addressbook/gui/component/select-names/e-select-names.h50
-rw-r--r--addressbook/gui/component/select-names/e-simple-card-bonobo.c117
-rw-r--r--addressbook/gui/component/select-names/select-names.glade889
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-address.c194
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c173
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c1232
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.h25
-rw-r--r--addressbook/gui/contact-editor/e-contact-save-as.c110
-rw-r--r--addressbook/gui/contact-editor/fulladdr.glade867
-rw-r--r--addressbook/gui/contact-editor/fullname.glade1047
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c411
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c117
-rw-r--r--addressbook/gui/widgets/e-minicard.c475
27 files changed, 10744 insertions, 10015 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 8099c016ac..79193a3f4b 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,1105 +1,52 @@
-2003-03-31 Chris Toshok <toshok@ximian.com>
+2003-02-11 JP Rosevear <jpr@ximian.com>
- * backend/ebook/e-book-util.c (get_local_book_uri): new function,
- just return the local uri.
- (set_default_book_uri_local): use get_local_book_uri.
- (e_book_default_book_open): only try and reload the default book
- if it's not already the local book.
-
-2003-03-31 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (card_removed): it emits a list now
-
-2003-03-31 Dan Winship <danw@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): Remove folder-selector button
- initialization.
- (e_select_names_new): Initialize folder-selector button here,
- using the passed-in EvolutionShellClient rather than depending on
- a global variable.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_activate_dialog): take an
- EvolutionShellClient and pass it to e_select_names_new().
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_SelectNames_activate_dialog): get a pointer to the shell
- from bonobo-activation, create a shell_client, and pass it to
- e_select_names_manager_activate_dialog.
-
- * backend/ebook/e-book-util.c (e_book_get_default_book_uri):
- constify return value
-
-2003-03-30 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-vcard.[ch]: braindead, and *extremely* forgiving
- vcard parser. not for public consumption yet.
-
-2003-03-30 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #39381 (again) ]
- * gui/component/e-address-popup.c (edit_contact_info_cb): add
- "GtkWidget *button" first arg, so we don't crash.
-
-2003-03-28 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #40403 ]
- * backend/ebook/e-card.c (e_card_get_vobject): revert the fix for
- 28945, as was done on the 1.2 branch. this is because the "fix"
- actually breaks internal use of contact lists. We need to make
- the exporting of contacts DTRT, instead of fixing it here.
-
-2003-03-28 Chris Toshok <toshok@ximian.com>
-
- [ fix the contact editor so that the only time the address is
- parsed is when the user types in the address GtkTextView. ]
- * gui/contact-editor/e-contact-editor.c (address_mailing_changed):
- make this use delivery addresses instead of labels.
- (full_addr_clicked): same.
- (find_address_mailing): same.
-
- * backend/ebook/e-card-simple.c
- (e_card_simple_set_delivery_address): make this operate similar to
- e_card_simple_set_address: it sets both the delivery address and
- the label for the address.
-
-2003-03-26 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #19178 ]
- * backend/ebook/evolution-ldif-importer.c (ebook_open): use
- e_book_load_address_book_by_uri on the passed in uri.
- (load_file_fn): pass the uri.
-
- * backend/ebook/evolution-vcard-importer.c (ebook_open): use
- e_book_load_address_book_by_uri on the passed in uri.
- (load_file_fn): pass the uri.
-
-2003-03-26 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #34651 ]
- * gui/component/select-names/e-select-names.c
- (select_entry_changed): strcmp -> g_utf8_collate.
- (update_query): encode the string we pass for the query.
-
-2003-03-26 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #34085 ]
- * gui/contact-list-editor/e-contact-list-editor.c
- (table_drag_data_received_cb): only successfully complete the drag
- if they dropped a valid vcard (or vcard list). Call
- gtk_drag_finish.
-
-2003-03-26 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/Makefile.am (INCLUDES): $evolution_uidir
- -> $evolutionuidir
-
-2003-03-26 Philip Zhao <philip.zhao@sun.com>
-
- [ fixes bug #39170 ]
- * backend/pas/pas-backend.c (pas_backend_create_card): remove
- 'return'.
- (pas_backend_remove_cards): same.
- (pas_backend_modify_card): same.
- (pas_backend_check_connection): same.
- (pas_backend_get_vcard): same.
- (pas_backend_get_cursor): same.
- (pas_backend_get_book_view): same.
- (pas_backend_get_completion_view): same.
- (pas_backend_get_changes): same.
- (pas_backend_authenticate_user): same.
- (pas_backend_get_supported_fields): same.
- (pas_backend_get_supported_auth_methods): same.
-
-2003-03-26 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (local_record_from_ecard): append the
- second line to the address if necessary
- (ecard_from_remote_record): split the address line in two if
- necessary
-
-2003-03-23 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/contact-list-editor.glade: set the
- dialog to "Visible: No" so it doesn't flash when we bring it up.
-
-2003-03-23 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #40026 ]
- * gui/contact-editor/e-contact-editor.c (set_field): add
- EContactEditor arg, and block/unblock signals around the
- gtk_entry_set_text, since that generates a "changed" signal which
- causes problems.
- (set_phone_field): take and pass along an EContactEditor arg.
- (set_fields): pass editor to set_field.
-
-2003-03-23 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/arrow.png: nuke.
-
- * gui/contact-editor/Makefile.am (EXTRA_DIST): remove images_DATA
- (images_DATA): nuke, don't need it anymore.
-
- * gui/contact-editor/e-contact-editor.c
- (connect_arrow_button_signal): rename _replace_button to this. we
- no longer create an image, as it's a GtkArrow in the .glade file
- now.
- (connect_arrow_button_signals): rename _replace_buttons to this.
- no longer pass the arrow.png's to _replace_button.
- (e_contact_editor_init): _replace_buttons ->
- connect_arrow_button_signals.
- (_arrow_pressed): remove some dead code, and some args that aren't
- used.
- (_phone_arrow_pressed): track change to _arrow_pressed.
- (_email_arrow_pressed): same.
- (_address_arrow_pressed): same.
-
-2003-03-23 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #31786 ]
- * gui/component/addressbook-config.c
- (addressbook_source_dialog_set_source): fix some gtk warnings.
- (set_advanced_button_state): the advanced dialog isn't present in
- the glade file anymore, so ifdef everything dealing with it.
- (addressbook_edit_server_dialog): same.
-
- * gui/component/ldap-config.glade: remove all the unused Advanced
- UI stuff to lessen the amount of strings needing translation.
-
-2003-03-23 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #32113 ]
- * backend/ebook/e-destination.h: add include_email arg to
- e_destination_get_textrep.
-
- * backend/ebook/e-destination.c (e_destination_get_textrep): add
- include_email arg. if it's TRUE, and if there's an email address to
- add
-
- * gui/contact-list-editor/e-contact-list-model.c
- (contact_list_value_at): use e_destination_get_textrep so we don't
- display QP text, and pass TRUE for include_email.
-
- * gui/widgets/e-minicard.c (add_field): same.
- (remodel): same.
-
- * gui/widgets/e-addressbook-treeview-adapter.c (adapter_get_value): same.
-
- * gui/widgets/e-addressbook-table-adapter.c (addressbook_value_at): same.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_insert_length): pass FALSE for
- include_email.
-
- * gui/component/select-names/e-select-names-model.c
- (e_select_names_model_get_textification): pass FALSE for
- include_email.
- (e_select_names_model_get_string): same.
- (e_select_names_model_replace): same.
- (e_select_names_model_name_pos): same.
- (e_select_names_model_text_pos): same.
-
-2003-03-19 Ettore Perazzoli <ettore@ximian.com>
-
- * backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.server.in.in:
- Replace "evolution:menu-name" prop with "evolution:menu_name". [#39692]
- * backend/ebook/GNOME_Evolution_Addressbook_LDIF_Importer.server.in.in: Likewise.
-
-2003-03-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-table-model.c
- (e_select_names_table_model_col_count): up the column count by one
- for the underline.
- (e_select_names_table_model_value_at): add handling for underline.
-
-2003-03-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/e-address-popup.c (email_menu_add_option): fix use
- of deprecated gtk_menu_append.
- (card_picker_selection_changed): change this to be used with the
- "changed" signal on GtkTreeSelection.
- (free_str): yeah, gross. i know.
- (card_picker_init): this needed some fixing, so the strings don't
- go away after we insert them into the model. also, connect to the
- "changed" GtkTreeSelection signal instead of using the nonexistant
- gtk_tree_selection_set_func.
- (e_address_popup_construct): gtk_style_unref -> g_object_unref.
- (popup_size_allocate_cb): nuke.
- (e_address_popup_ambiguous_email_add): use gtk_window_set_position
- and let the window manager place the window instead of doing it
- ourself.
-
-2003-03-18 Chris Toshok <toshok@ximian.com>
-
- [ Fixes addressbook bug #39730 ]
- * gui/component/ldap-config.glade: add response ids to the search
- base dialog.
-
- * gui/component/addressbook-config.c
- (addressbook_source_dialog_destroy): use g_object_unref, not
- gtk_widget_destroy, on the GladeXML.
- (addressbook_add_server_druid): call gtk_window_set_type_hint
- GDK_WINDOW_TYPE_HINT_DIALOG so this window looks like a dialog.
- (editor_modify_cb): no more apply button.
- (edit_dialog_apply_clicked): nuked.
- (edit_dialog_close_clicked): rename to _cancal_clicked.
- (edit_dialog_ok_clicked): call gtk_widget_destroy here instead of
- calling _cancel_clicked.
- (addressbook_edit_server_dialog): no more apply button, and
- close_button -> cancel_button. Also, set the hint to
- GDK_WINDOW_TYPE_HINT_DIALOG.
- (ldap_dialog_new): fix compiler warning.
- (addressbook_dialog_create_sources_table): same.
-
-2003-03-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-section.etspec: use
- alternating-row-colors="false"
-
- * gui/component/select-names/e-select-names.h: nuke prototypes for
- e_select_names_get_source/section.
-
- * gui/component/select-names/e-select-names.c (set_book): remove
- the signal disconnect from here.
- (addressbook_model_set_uri): same.
- (e_select_names_init): connect to the search_result signal on the
- addressbook model.
- (e_select_names_child_free): disconnect the changed_id signal.
- (e_select_names_add_section): set the underline column so the
- recipient tables look like they did when they were EEntry.
- (e_select_names_add_section): store off the changed_id.
- (e_select_names_get_section): nuke.
- (e_select_names_get_source): nuke.
-
-2003-03-18 JP Rosevear <jpr@ximian.com>
-
- * conduit/address-conduit.c (addrconduit_load_configuration): kill
- warning by sinking objects
-
-2003-03-18 Not Zed <NotZed@Ximian.com>
-
- * gui/component/select-names/e-select-names.c (set_book,
- addressbook_model_set_uri): disconnect/keep track of search result
- signal id.
- (e_select_names_init): Keep track of various signals, particularly
- status signal.
- (e_select_names_dispose): disconnect from any signals that are
- still active. Fixes crash for #38202.
-
-2003-03-13 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c
- (set_entry_changed_signals): use set_entry_changed_signal_email
- for the email entry so the email gets saved out.
- (set_entry_changed_signal_email): new function, analogous to
- set_entry_changed_signal_phone, but for email.
-
-2003-03-12 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #20210 ]
- * gui/component/select-names/e-select-names-popup.c
- (popup_menu_card): change "Edit Contact Info" to "View Contact
- Info", as you can't always edit the contact (if the book is read
- only).
- (popup_menu_list): same, but for a contact list.
-
-2003-03-11 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #39507 ]
- * gui/component/select-names/e-select-names.c (search_result): new
- function, sync the models after we do a search.
- (addressbook_model_set_uri): connect to search_result.
-
-2003-03-11 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): fix compiler warnings about deprecated
- functions.
- (e_select_names_child_free): unref the table model.
- (remove_address): re-enable.
- (section_right_click_cb): this is an ETable callback now.
- (e_select_names_add_section): remove a gross gross awful hack, and
- make the recipient tables ETables instead EEntry's. We lose the
- nice underlining, but we can add that back in as another ETable
- style (like strikeout and bold), and we also fix the longstanding
- scrolling problems (like bug #25148) and can finally remove
- addresses by double clicking on them (which is also a bug
- someplace I think.. dunno the # offhand.)
-
- * gui/component/select-names/e-select-names-table-model.c
- (clear_info): always set the count to -1, regardless of what
- model->data is.
-
- * gui/component/select-names/e-select-names-model.c: remove some
- unused enums.
-
- * gui/component/select-names/Makefile.am (etspec_DATA): add
- e-select-names-section.etspec
-
- * gui/component/select-names/e-select-names-section.etspec: new
- file, spec for the To:/Cc:/Bcc: etable's in the select-names
- dialog.
-
-2003-03-11 Not Zed <NotZed@Ximian.com>
-
- * backend/pas/pas-backend-file.c (INITIAL_VCARD): Updated phone
- number. Bug #37204.
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_send_card_list):
- re-enable in build, include e-destination.h. For #39256.
-
-2003-03-06 Ettore Perazzoli <ettore@ximian.com>
-
- * backend/ebook/load-pine-addressbook.c (ebook_create): Likewise.
- * backend/ebook/load-gnomecard-addressbook.c (ebook_create): Likewise.
- * backend/ebook/evolution-vcard-importer.c (ebook_create): Likewise.
- * backend/ebook/evolution-ldif-importer.c (ebook_create): Likewise.
- * backend/ebook/test-client.c (get_cursor_cb): Likewise.
- (ebook_create): Likewise.
- * gui/widgets/e-minicard.c (e_minicard_set_property): Likewise.
- (card_modified_cb): Likewise.
- (e_minicard_event): Likewise.
- * gui/widgets/gal-view-minicard.c (column_width_changed): Likewise.
- * gui/widgets/test-minicard-view.c (ebook_create): Likewise.
- * gui/widgets/gal-view-treeview.c (column_width_changed): Likewise.
-
-2003-03-05 Not Zed <NotZed@Ximian.com>
-
- * gui/component/addressbook-component.c (bonobo_main_quit_cb):
- removed.
- (owner_unset_cb): Basically a noop, the shell does the quit, we
- just note we have no owner anymore.
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- Fixes #37881
-
- * gui/component/select-names/e-simple-card-bonobo.c
- (impl_SimpleCard_get): if we get a null value, send back the empty
- string
-
-2003-03-04 JP Rosevear <jpr@ximian.com>
-
- * gui/component/select-names/e-select-names.etspec: reflect prior column addition
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_get_property_fn): set the arg properly
-
- * gui/component/select-names/Evolution-Addressbook-SelectNames.idl:
- add Icscalendar to field list
-
- * backend/pas/pas-backend-ldap.c: add icscalendar to prop list
-
- * backend/ebook/e-card.h: add icscalendar data member
-
- * backend/ebook/e-card.c: add icscalendar to list and its parse
- routine
- (e_card_get_vobject): add icscalendar prop value
- (parse_icscalendar): parse routine
- (e_card_class_init): add icscalendar arg
- (e_card_destroy): destroy icscalendar member
- (e_card_set_arg): set icscalendar
- (e_card_init): init icscalendar
- (e_card_get_arg): return icscalendar
-
- * backend/ebook/e-card-simple.c (field_data): add icscalendar
-
- * backend/ebook/e-card-simple.h: ditto
+ Fixes #37881
-2003-03-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_new): Don't set the "modal" property through
- g_object_new().
- (e_select_names_init): Explictly make the dialog modal here.
-
-2003-03-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (create_minicard_view): No need
- to do any reparenting here; the widget is created with no parent.
-
-2003-03-03 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): Instead of using gtk_widget_unparent(),
- remove the widget from the container using gtk_container_remove().
- This fixes a bunch of crashers in all the places using the
- ESelectNames widget/control.
-
-2003-02-28 Dan Winship <danw@ximian.com>
-
- * gui/contact-editor/Makefile.am: Build libecontacteditor as an
- uninstalled shared library.
-
- * gui/contact-list-editor/Makefile.am: Likewise for
- libecontactlisteditor
-
- * gui/merging/Makefile.am: and libecardmerging
-
- * gui/search/Makefile.am: and libeaddressbooksearch
-
- * gui/widgets/Makefile.am: and libeminicard
-
- * printing/Makefile.am: and libecontactprint
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- Update for new library names (and get rid of libtool portability
- warnings).
-
-2003-02-28 Dan Winship <danw@ximian.com>
-
- * backend/ebook/e-card.c (e_card_list_send, e_card_send): Remove
- these from here; talking to the mailer doesn't really belong at
- the libebook level anyway.
-
- * backend/ebook/Makefile.am: Remove Evolution-Composer CORBA
- stuff, which fixes some linking problems on OS X.
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_send_card_list,
- e_addressbook_send_card): Move from e-card.c and rename.
-
- * gui/widgets/Makefile.am: move Evolution-Composer CORBA stuff
- here
-
- * gui/widgets/e-addressbook-view.c (send_as, send_to,
- e_addressbook_view_send, e_addressbook_view_send_to): Update for
- new function names.
-
- * gui/contact-list-editor/e-contact-list-editor.c (file_send_as_cb,
- file_send_to_cb): Likewise
-
- * gui/contact-editor/e-contact-editor.c (file_send_as_cb,
- file_send_to_cb): Likewise
-
-2003-02-27 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (book_open_cb): use g_signal_connect
- here, not swapped... although since we pass the widget as the
- closure it really doesn't matter.
- (load_uri_auth_cb): use a GtkDialog here.
- (search_result): same.
-
- * gui/component/select-names/e-simple-card-bonobo.h: add prototype
- for e_simple_card_bonobo_construct to fix warning.
-
- * gui/widgets/e-addressbook-view.c (create_alphabet): remove call
- to gtk_widget_set_usize.
-
- * gui/contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_init): gtk_window_set_policy =>
- gtk_window_set_resizable.
-
- * gui/contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_init): same.
-
-2003-02-27 JP Rosevear <jpr@ximian.com>
-
- * conduit/Makefile.am: link to libversit libtool object
-
-2003-02-27 Rodney Dawes <dobey@ximian.com>
-
- * backend/ebook/Makefile.am: Fix for server files from Antonio Xu
-
-2003-02-26 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (e_book_load_uri): if we fail to activate
- factories for a given protocol, return.
-
- * gui/component/ldap-config.glade: remove the two unused custom
- widgets to cut down on gtk warning spam.
-
-2003-02-21 Dan Winship <danw@ximian.com>
-
- * backend/ebook/Makefile.am (libebook_la_LIBADD): depend on
- libversit.la, libcamel.la, libename.la, and libeutil.la.
- (test_client_LDADD, test_client_list_LDADD, test_card_LDADD,
- evolution_vcard_importer_LDADD, evolution_ldif_importer_LDADD,
- load_pine_addressbook_LDADD, load_gnomecard_addressbook_LDADD):
- Remove those dependencies from here, since they're pulled in by
- libebook.
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- Remove libebook's dependencies
-
- * gui/component/select-names/Makefile.am
- (libeselectnames_la_LIBADD): add this
-
- * gui/widgets/Makefile.am (various disabled *_test_LDADD): cleanup
-
- * printing/Makefile.am (contact_print_test_LDADD,
- contact_print_style_editor_test_LDADD): cleanup
-
-2003-02-20 Dan Winship <danw@ximian.com>
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- s/libemiscwidgets.a/libemiscwidgets.la/
-
- * gui/widgets/Makefile.am: Likewise (in a bunch of commented-out
- test programs)
-
-2003-02-19 Dan Winship <danw@ximian.com>
-
- * gui/widgets/e-addressbook-model.c: Make parent_class static.
-
- * gui/widgets/e-addressbook-reflow-adapter.c: Likewise
-
- * gui/widgets/e-addressbook-table-adapter.c: Likewise
-
-2003-02-19 Chris Toshok <toshok@ximian.com>
-
- [ fix #38074 ]
- * gui/component/e-address-popup.c (add_contacts_cb): first arg is
- a GtkWidget. duh.
-
-2003-02-19 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/contact-editor/Makefile.am (INCLUDES): Use $(evolutionuidir)
- instead of $(evolution_uidir). [Pointed out by Grzegorz Goawski.]
-
-2003-02-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_start_query): if we can complete solely
- from our cached cards, call e_completion_end_search from here when
- we're done.
-
-2003-02-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c
- (ensure_completion_uris_exist): plug memory leak (always free
- val).
-
-2003-02-16 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_search_timeout): move the bulk of the
- non-summary searching stuff here. we aggregate up to our
- threshold, then send them to the front end and register a timeout
- to do another batch. This keeps us from totally spamming the UI,
- making things a bit more responsive.
- (pas_backend_file_search): set up the closure and call the timeout
- in an idle func.
-
-2003-02-16 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_entry_new): indent properly.
-
-2003-02-16 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c (unlink_model):
- disconnect search_started and search_result.
- (addressbook_compare): if we're loading, just compare model
- positions (so we just append while loading).
- (remove_card): use e_reflow_model_item_removed.
- (search_started): new function, set loading = TRUE.
- (search_result): new function, set loading = FALSE and emit
- "comparison_changed".
- (e_addressbook_reflow_adapter_init): init loading and the new
- signal ids.
- (e_addressbook_reflow_adapter_construct): connect "search_started"
- and "search_result".
-
- * gui/widgets/e-addressbook-model.h (struct
- _EAddressbookModelClass): add search_started signal.
-
- * gui/widgets/e-addressbook-model.c
- (e_addressbook_model_class_init): new signal "search_started".
- (book_view_loaded): emit "search_started" after "model_changed".
- (remove_card): simplify this, and use CARD_REMOVED all the time,
- instead of just in the single card case.
-
-2003-02-10 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-file.c
- (pas_backend_file_search_timeout): split out the bulk of the
- non-summary searching logic to here. we do 1 "card_threshold"
- sized lump per timeout.
- (pas_backend_file_search): use pas_backend_file_search_timeout.
-
-2003-02-10 Chris Toshok <toshok@ximian.com>
-
- [ fixes bug #33066 ]
- * gui/contact-editor/e-contact-editor.c
- (set_urlentry_changed_signal_field): new function
- (set_entry_changed_signals): call
- set_urlentry_changed_signal_field for entry-web, entry-caluri, and
- entry-fburl.
- (fill_in_field): add handling for EUrlEntry's.
- (extract_field): same.
- (enable_widget): same.
- (e_contact_editor_create_date): show the widget.
- (e_contact_editor_create_web): same, create a url entry.
- (set_urlentry_changed_signal_field): new function
-
- * gui/contact-editor/contact-editor.glade: entry-web,
- entry-caluri, and entry-fburl are all custom widgets now.
-
-2003-02-10 Ettore Perazzoli <ettore@ximian.com>
-
- * backend/ebook/Makefile.am: Install load-pine-addressbook and
- load-gnomecard-addressbook into ${privdatadir}/tools. Install
- evolution-vcard-importer and evolution-ldif-importer into
- ${privlibexecdir}.
-
- * backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.server.in:
- Removed.
-
- * backend/ebook/GNOME_Evolution_Addressbook_LDIF_Importer.server.in:
- Removed.
-
- * backend/ebook/GNOME_Evolution_Addressbook_VCard_Importer.server.in.in:
- New. Specify an absolute path for the executable, using
- @LIBEXECDIR@.
- * backend/ebook/GNOME_Evolution_Addressbook_LDIF_Importer.server.in.in:
- Likewise.
-
-2003-02-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c
- (sexp_initials): gone.
- (match_initials): gone.
- (book_query_sexp): remove the primary handling.
- (book_query_score): same.
-
- * backend/ebook/e-card.c (e_card_set_property):
- g_value_get_pointer => g_value_get_object for "category_list".
-
- * backend/ebook/e-book.c (struct _EBookPrivate): add a comment.
-
- * backend/pas/pas-backend-ldap.c (func_beginswith): performance at
- the cost of a tiny bit of correctness. If the ldap server doesn't
- support evolutionPerson don't query on fileAs, use sn (since
- that's effectively what gets used in the display when fileAs isn't
- supported.)
-
-2003-02-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-completion.c: lots of
- changes here. should be a big performance gain. god i hope this
- is finally right.
-
-2003-02-08 Chris Toshok <toshok@ximian.com>
-
- [ huge change, all for 1 little performance problem :) fixes #18207 ]
- * gui/widgets/e-addressbook-model.c (get_view): use
- e_book_check_static_capability here to make things a little
- prettier.
- (remove_card): complain about my life, and add code to use one
- "model_changed" signal if we get back a list of cards instead of
- multiple "card_removed" signals.
-
- * gui/widgets/e-addressbook-model.h: little clean up.
-
- * gui/widgets/e-addressbook-view.c (delete): write a bulk-remove
- case for this. if the backend supports it, send all the ids at
- once. otherwise loop over the ids.
- (e_addressbook_view_delete_selection): fake a CardAndBook
- structure and call delete, instead of duplicating the code in 2
- places.
-
- * gui/component/addressbook.c (delete_contact_cb): don't call
- e_contact_editor_confirm_delete here, it's handled by the
- EAddressbookView.
-
- * backend/pas/pas-card-cursor.c (pas_card_cursor_construct): fix a
- compiler warning about a stupid crash.
-
- * backend/pas/pas-book.h (PASOperation): RemoveCard ->
- RemoveCards.
- (PASRemoveCardsReques): char *id -> GList *ids.
- (PASRequest): PASRemoveCardRequest -> PASRemoveCardsRequest.
-
- * backend/pas/pas-book.c (pas_book_queue_remove_cards): build up a
- GList from the id sequence.
- (pas_book_respond_remove): notifyCardRemoved ->
- notifyCardsRemoved.
- (impl_GNOME_Evolution_Addressbook_Book_removeCards): rename.
- (pas_book_free_request): free the idlist for RemoveCards.
- (pas_book_class_init): removeCard -> removeCards.
-
- * backend/pas/pas-book-view.h: change prototype for
- pas_book_view_notify_remove, and add prototype for
- pas_book_view_notify_remove_1.
-
- * backend/pas/pas-book-view.c (pas_book_view_notify_remove_1):
- build up a list and call pas_book_view_notify_remove.
- (pas_book_view_notify_remove): build up the corba id sequence and
- call BookViewListener::notifyCardsRemoved.
-
- * backend/pas/pas-backend.h: remove_card -> remove_cards.
-
- * backend/pas/pas-backend.c (pas_backend_remove_cards): rename
- from _remove_card.
- (process_client_requests): RemoveCard -> RemoveCards and
- _remove_card -> _remove_cards.
-
- * backend/pas/pas-backend-ldap.c (check_schema_support):
- g_strcasecmp -> g_ascii_strcasecmp.
- (remove_card_handler): _remove => _remove_1.
- (modify_card_modify_handler): same.
- (pas_backend_ldap_process_remove_cards): rename from _remove_card.
- (pas_backend_ldap_class_init): _remove_card -> _remove_cards.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_class_init):
- remove_card -> remove_cards.
- (pas_backend_file_get_static_capabilities): add "bulk-removes".
- (pas_backend_file_process_remove_cards): rewrite this function
- largely, so that it handles lists of ids. first we loop through
- and for every successful deletion we build a list of deleted
- ECards. Then for each view we build a list (a subset of the
- deleted ECard list) and pass back that list to the view.
- (pas_backend_file_process_modify_card): use _remove_1 instead of
- _remove.
- (ecard_matches_search): new function.
-
- * backend/pas/pas-backend-card-sexp.c
- (pas_backend_card_sexp_match_vcard): rewrite in terms of
- _match_ecard.
- (pas_backend_card_sexp_match_ecard): new function, the guts from
- _match_vcard.
-
- * backend/pas/pas-backend-card-sexp.h: add prototype for
- pas_backend_card_sexp_match_ecard.
-
- * backend/idl/addressbook.idl: the card removal stuff now takes
- CardIdList.
-
- * backend/ebook/e-book.c (e_book_get_static_capabilities): cache
- successful capability queries (since they're static).
- (e_book_check_static_capability): new, convenience function to
- check if a particular capability is supported.
- (e_book_remove_card_by_id): build a single element GList and call
- e_book_remove_cards.
- (e_book_remove_cards): build up a CORBA sequence from the GList
- and call Book::removeCards.
- (e_book_dispose): free the cached capabilities string.
-
- * backend/ebook/e-book.h: add new prototypes for
- e_book_check_static_capability and e_book_remove_cards.
-
- * backend/ebook/e-book-view.h (struct _EBookViewClass): rename
- "card_removed" signal to "cards_removed".
-
- * backend/ebook/e-book-view.c (e_book_view_do_removed_event): id
- -> ids, and free the id list.
- (e_book_view_check_listener_queue): CardRemovedEvent ->
- CardsRemovedEvent.
-
- * backend/ebook/e-book-view-listener.c
- (e_book_view_listener_queue_response): free the id list.
- (e_book_view_listener_queue_idlist_event): new function, used for
- cards_removed.
- (e_book_view_listener_queue_status_event): id -> ids.
- (e_book_view_listener_queue_sequence_event): same.
- (e_book_view_listener_queue_message_event): same.
- (impl_BookViewListener_notify_cards_removed): call
- queue_idlist_event.
- (e_book_view_listener_dispose): free the id list.
- (e_book_view_listener_class_init): track change to idl call.
-
- * backend/ebook/e-book-view-listener.h
- (EBookViewListenerOperation): CardRemovedEvent ->
- CardsRemovedEvent.
- (EBookViewListenerResponse): char *id -> GList *ids.
-
- * backend/ebook/e-book-listener.c
- (impl_BookListener_respond_remove_cards): rename from remove_card.
-
-2003-02-06 Chris Toshok <toshok@ximian.com>
-
- * gui/component/e-address-popup.c (email_table_save_card_cb):
- check the status, not the book, and unref the book here.
- (contact_editor_cb): same.
- (start_query): unref the book in the failure case.
- (add_card_idle_cb): addressbook_load_default_book returns void
- now.
- (edit_contact_info_cb): same.
- (e_address_popup_query): same.
-
- * gui/component/addressbook.c (control_activate_cb): track change
- to addressbook_load_uri return type.
- (set_prop): same.
- (addressbook_load_uri): return type is void now.
- (addressbook_load_default_book): same.
-
- * gui/component/addressbook.h:
- addressbook_load_uri/addressbook_load_default_book return void
- now.
-
- * conduit/address-conduit.c (start_addressbook_server):
- e_book_load_default_book returns void now.
-
- * backend/ebook/e-book-util.h: track changes to return types.
-
- * backend/ebook/e-book-util.c (e_book_load_address_book_by_uri):
- fallout from change to e_book_load_uri. return type for this
- function is void now too.
- (e_book_use_address_book_by_uri): same.
- (e_book_use_default_book): same.
- (e_book_load_default_book): same.
- (got_uri_book_cb): if unsuccessful and book is non-NULL, unref it
- here.
- (got_default_book_cb): same.
-
- * backend/ebook/e-book.c (e_book_load_uri): no longer return a
- gboolean. any error is communicated to the callback.
-
- * backend/ebook/e-book.h: e_book_load_uri no longer returns a
- gboolean (it's void.)
-
- * backend/ebook/evolution-ldif-importer.c (ebook_create): track
- change to the e_book_load_uri family of functions.
-
- * backend/ebook/test-client-list.c (ebook_create): same.
+ * gui/component/select-names/e-simple-card-bonobo.c
+ (impl_SimpleCard_get): if we get a null value, send back the empty
+ string
- * backend/ebook/test-client.c (ebook_create): same.
+2003-02-07 JP Rosevear <jpr@ximian.com>
- * backend/ebook/load-pine-addressbook.c (ebook_create): same.
+ * gui/component/select-names/e-select-names.etspec: reflect prior column addition
- * backend/ebook/evolution-vcard-importer.c (ebook_create): same.
+ * gui/component/select-names/e-select-names-bonobo.c
+ (entry_get_property_fn): set the arg properly
-2003-02-06 Ettore Perazzoli <ettore@ximian.com>
+ * gui/component/select-names/Evolution-Addressbook-SelectNames.idl:
+ add Icscalendar to field list
- * backend/ebook/Makefile.am (e-book-marshal.c, e-book-marshal.h):
- Use different tmp file names so these rules can be executed in
- parallel without interfering with each otehr.
+ * backend/pas/pas-backend-ldap.c: add icscalendar to prop list
- * backend/pas/Makefile.am: Make the ORBit compilation work
- properly with parallel makes (i.e. make sure it does not spawn
- multiple orbit-idl processes on the same IDL file at the same
- time).
- * gui/component/select-names/Makefile.am: Likewise.
- * backend/ebook/Makefile.am: Likewise.
+ * backend/ebook/e-card.h: add icscalendar data member
-2003-02-06 Dan Winship <danw@ximian.com>
+ * backend/ebook/e-card.c: add icscalendar to list and its parse
+ routine
+ (e_card_get_vobject): add icscalendar prop value
+ (parse_icscalendar): parse routine
+ (e_card_class_init): add icscalendar arg
+ (e_card_destroy): destroy icscalendar member
+ (e_card_set_arg): set icscalendar
+ (e_card_init): init icscalendar
+ (e_card_get_arg): return icscalendar
- * gui/component/addressbook-config.c (main):
- s/PACKAGE/GETTEXT_PACKAGE/ in gettext setup.
+ * backend/ebook/e-card-simple.c (field_data): add icscalendar
-2003-02-05 Dan Winship <danw@ximian.com>
+ * backend/ebook/e-card-simple.h: ditto
- * backend/ebook/Makefile.am (INCLUDES): Remove cruft.
- (libebookincludedir): Use privincludedir.
+2003-02-13 Jack Jia <jack.jia@sun.com>
- * backend/ebook/e-book-util.c: #include <string.h>
- * backend/ebook/e-card-compare.c: Likewise
- * backend/ebook/load-pine-addressbook.c: Likewise
- * backend/ebook/test-client.c: Likewise
+ [ fixes bug #34900 ]
+ * gui/contact-editor/e-contact-save-as.c: change the "delete_event"
+ signal to "destroy".
- * backend/ebook/evolution-vcard-importer.c: #include
- <e-book-util.h>
- (factory_fn): Fix this to actually return the importer.
+2003-02-03 Jack Jia <jack.jia@sun.com>
- * backend/ebook/evolution-ldif-importer.c (parseLine): #include
- <e-book-util.h> and <bonobo/bonobo-main.h>. Use g_ascii_strcmp.
+ [ the fix for #33672 ]
+ * gui/component/addressbook-component.c (remove_folder): delete the
+ file addressbook.db.summary, and replace "unlink" with a gnome-vfs
+ function "gnome_vfs_unlink_from_uri".
- * backend/ebook/e-card.c (e_card_email_match_single_string):
- (e_card_email_find_number): s/g_str/g_ascii_str/
- * backend/ebook/e-destination.c (e_destination_equal): Likewise.
- Also, add an "else return FALSE;"
-
-
- * backend/pas/Makefile.am (INCLUDES): Remove cruft
- (ldapschemadir): Use privdatadir
- (pasincludedir): Use privincludedir.
-
- * backend/pas/pas-book-factory.c (pas_book_factory_activate):
- Remove unused variable.
- * backend/pas/pas-book-view.c (pas_book_view_new): Likewise
-
-
- * printing/Makefile.am (ecpsdir): Define in terms of privdatadir.
- (gladedir): Defined in configure.in now.
-
- * printing/e-contact-print.c: #include <string.h>
-
- * printing/test-print.c: #include <bonobo/bonobo-main.h>
- * printing/test-contact-print-style-editor.c: Likewise
-
-
- * gui/contact-editor/Makefile.am (INCLUDES): Remove some cruft.
- rename ICONSDIR to IMAGESDIR.
- (images_DATA): Install arrow.png in imagesdir instead of
- privdatadir.
-
- * gui/contact-editor/e-contact-quick-add.c: #include <string.h>
-
- * gui/contact-editor/e-contact-editor.c: #include <string.h>
- (e_contact_editor_init): s/EVOLUTION_ICONSDIR/EVOLUTION_IMAGESDIR/
- (e_contact_editor_new): s/gtk_object_ref/g_object_ref/
- (_replace_button): Look in imagesdir, not privdatadir
- (_phone_arrow_pressed): Remove call to deprecated
- gtk_check_menu_item_set_show_toggle.
- (_email_arrow_pressed): Likewise
- (_address_arrow_pressed): Likewise
- (set_address_field): Remove unused variable
- (enable_widget):
- s/gtk_entry_set_editable/gtk_editable_set_editable/
-
- * gui/contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_init):
- s/EVOLUTION_ICONSDIR/EVOLUTION_IMAGESDIR
- (e_contact_editor_address_set_property):
- s/gtk_entry_set_editable/gtk_editable_set_editable/
-
- * gui/contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_init):
- s/EVOLUTION_ICONSDIR/EVOLUTION_IMAGESDIR
- (e_contact_editor_fullname_set_property): Likewise.
-
-
- * gui/contact-list-editor/Makefile.am (INCLUDES): Remove cruft,
- s/ICONSDIR/IMAGESDIR/
- (gladedir, etspecdir): Remove definitions.
-
- * gui/contact-list-editor/e-contact-list-editor.c: #include
- <string.h>
- (e_contact_list_editor_init): s/ICONSDIR/IMAGESDIR/
- (e_contact_list_editor_new): s/gtk_object_ref/g_object_ref/
-
- * gui/contact-list-editor/e-contact-list-model.c: #include <string.h>
-
-
- * gui/merging/Makefile.am (INCLUDES): Remove cruft.
- * gui/search/Makefile.am (ruledir): Define in terms of privdatadir
-
-
- * gui/widgets/Makefile.am (INCLUDES): Remove cruft.
- (gladedir, etspecdir): Remove definitions.
- (glade_DATA): Empty, so remove it.
-
- * gui/widgets/e-addressbook-reflow-adapter.c: #include <string.h>
- (addressbook_get_property): Remove unused variable
-
- * gui/widgets/e-addressbook-view.c: #include <string.h>
- (get_selection_model): Add a g_return_val_if_reached.
-
- * gui/widgets/e-minicard.c: #include string.h, gtkmain.h,
- gnome-canvas-pixbuf.h
- (field_changed): s/gtk_object_unref/g_object_unref/
- (get_left_width): Remove unused variable
-
- * gui/widgets/e-minicard-control.c: #include <string.h>
- (pstream_load, pstream_save): Use g_ascii_strcasecmp
-
- * gui/widgets/e-minicard-view.c: #include <string.h>
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_new): s/gtk_type_new/g_object_new/
-
-
- * gui/component/select-names/Makefile.am (INCLUDES): Remove cruft.
- (serverdir, gladedir, etspecdir): Remove definitions
-
- * gui/component/select-names/e-select-names.c: #include <string.h>
-
- * gui/component/select-names/e-select-names-popup.c
- (init_html_mail): Remove deprecated
- gtk_check_menu_item_set_show_toggle call.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_entry_free):
- s/gtk_timeout_remove/g_source_remove/
-
-
- * gui/component/Makefile.am (INCLUDES): Remove cruft, rename
- ICONSDIR to IMAGESDIR.
- (serverdir, gladedir): Remove defintions.
-
- * gui/component/addressbook-component.c (IS_CONTACT_TYPE): use
- g_ascii_strcasecmp
- (add_creatable_item): s/ICONSDIR/IMAGESDIR/
-
- * gui/component/component-factory.c: #include <string.h>
-
- * gui/component/e-address-widget.c: Likewise.
- (e_address_widget_destroy): s/gtk_idle_remove/g_source_remove/
- (e_address_widget_schedule_query): s/gtk_idle_add/g_idle_add/
-
-
- * conduit/Makefile.am (INCLUDES): Remove cruft
-
-2003-02-05 Dan Winship <danw@ximian.com>
-
- * gui/component/addressbook-config.c (main): Replace deprecated
- glade_gnome_init() with glade_init().
-
- * gui/contact-editor/test-editor.c (main): Likewise.
-
- * printing/test-contact-print-style-editor.c (main): Likewise.
-
- * printing/test-print.c (main): Likewise.
-
-2003-02-03 Chris Toshok <toshok@ximian.com>
-
- [ pull forward Jack Jia's fix for #34900 ]
- * gui/contact-editor/e-contact-save-as.c (e_contact_save_as): use
- a weak ref for the file selector.
- (e_contact_list_save_as): same.
- (destroy_it): rewrite this as a weak ref notify function.
- (close_it): remove frees of the info (it's freed in the weak ref
- function).
- (save_it): same.
-
-2003-02-03 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-component.c (remove_folder): pull
- forward Jack Jia's fix for #33672, but convert it to use unlink
- instead of the gnome-vfs stuff.
-
-2003-01-27 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/contact-editor.glade: add a scrolled window
- (SHADOW_IN) around the address textview.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/contact-editor.glade: rename the category
- entry to entry-categories.
-
- * gui/contact-editor/e-contact-editor.c
- (set_entry_changed_signals): use the specialized "changed" signal
- handlers for entry-company and entry-fullname.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am: i need to sleep more.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am (componentdir): need to assign this
- here or else the lib doesn't get built.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * printing/e-contact-print.c (e_contact_start_new_page): begin the
- new page after showing the last one.
- (complete_sequence): beginpage before we start printing.
- (e_contact_print_response): GtkDialog-ify this.
- (e_contact_print_dialog_new): "clicked" -> "response".
- (e_contact_print_card_dialog_new): same.
- (e_contact_print_card_list_dialog_new): same.
-
-2003-01-26 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (CONDUIT_SUBDIR): enable this, as building the
- conduit works if you have gnome-pilot2.
-
-2003-01-25 Chris Toshok <toshok@ximian.com>
-
- * conduit/address-conduit.c: GObjectify the stuff in here that
- refers to addressbook objects. the gnome-pilot stuff is still
- GtkObject for the moment.
-
-2003-01-24 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/Makefile.am (iconsdir): Remove definition; this is
- now in configure.in.
- * gui/contact-editor/Makefile.am (iconsdir): Likewise.
- * gui/contact-list-editor/Makefile.am (iconsdir): Likewise.
-
2003-01-23 Sean Gao <Sean.Gao@Sun.COM>
[ fixes bug #34898 ]
@@ -1111,373 +58,26 @@
[ fixes bug #36375 ]
* backend/pas/pas-backend-ldap.c: use PHONE_OTHER_FAX instead of
PHONE_OTHER for "other_fax".
-
-2003-01-23 Chris Toshok <toshok@ximian.com>
- [ fixes bug #31014, roll this in from the 1.2 branch ]
- * backend/pas/pas-backend-ldap.c: use "categories" instead of
- "category" for the ECard field so the UI/get_supported_fields stuff
- actually thinks its usable in the contact editor..
-
-2003-01-23 Chris Toshok <toshok@ximian.com>
+2003-01-10 Chris Toshok <toshok@ximian.com>
* backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): fix
for bug 34883 broke ssl transactions (at least those where we were
connecting to port 636). Move it to after the SSL stanza.
-2003-01-23 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/Makefile.am (componentdir): Remove
- definition; no need to set it here since it's now defined in
- configure.in
- * gui/component/Makefile.am (componentdir): Likewise.
-
-2003-01-22 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/Makefile.am (gladedir): Version using
- $(BASE_VERSION).
- (etspecdir): Likewise.
- (iconsdir): Likewise.
-
- * gui/contact-list-editor/Makefile.am (iconsdir): Version using
- $(BASE_VERSION).
- (gladedir): Likewise.
-
- * gui/merging/Makefile.am (gladedir): Version using $(BASE_VERSION).
-
- * gui/search/Makefile.am (ruledir): Version using $(BASE_VERSION).
-
- * gui/component/Makefile.am (INCLUDES): Update EVOLUTION_IMAGESDIR
- to be versioned through $(BASE_VERSION).
-
- * gui/widgets/e-addressbook-view.c (init_collection): Use
- EVOLUTION_GALVIEWSDIR.
-
- * gui/widgets/Makefile.am (INCLUDES): Define EVOLUTION_GALVIEWSDIR
- and update EVOLUTION_IMAGESDIR.
-
-2003-01-21 Radek Doulik <rodo@ximian.com>
-
- * printing/e-contact-print.c (e_contact_print_button): don't use
- gnome_print_multipage_new_from_sizes and add warning
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/widgets/e-addressbook-util.c
- (e_addressbook_prompt_save_dialog): Change dialog from
- Yes/No/Cancel to Discard/Cancel/Save to match the HIG.
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_init): Change dialog from OK/Cancel
- to Cancel/OK to match the HIG.
-
- * gui/contact-editor/e-contact-save-as.c (file_exists): Change
- dialog from Overwrite/Cancel to Cancel/Overwrite to match the HIG.
-
- * gui/contact-editor/e-contact-quick-add.c
- (build_quick_add_dialog): Fix typo s/reponse/response/. Also
- change the dialog to be Edit/Cancel/OK instead of OK/Edit/Cancel
- to match the HIG.
-
- * gui/contact-editor/e-contact-editor.c
- (e_contact_editor_confirm_delete): Make alert cancel/delete
- instead of delete/cancel to match the HIG.
-
- * gui/contact-editor/e-contact-editor-fullname.c
- (e_contact_editor_fullname_init): Make dialog Cancel/OK instead of
- OK/Cancel to match the HIG.
-
- * gui/contact-editor/e-contact-editor-address.c
- (e_contact_editor_address_init): Make dialog Cancel/OK instead of
- OK/Cancel to match the HIG.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): Make dialog Cancel/OK instead of OK/Cancel
- to match the HIG.
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/Makefile.am (EXTRA_DIST): Add $(schema_DATA).
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (control_activate_cb): try to load
- the uri again if it failed previously.
- (book_open_cb): set failed_to_load based on the response.
- (set_prop): initialize failed_to_load to FALSE before we kick off
- the first load.
-
- * backend/pas/pas-book-factory.c
- (pas_book_factory_process_request): if the load_uri fails, remove
- it from the hashtable and free it, so we'll try to load it again
- from scratch the next time it's requested instead of serving up a
- backend that doesn't function.
-
- * backend/pas/pas-backend.c (pas_backend_get_uri): we need to be
- able to get the uri from backends that aren't loaded (so we can
- remove them from the hashtable.)
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (query_ldap_root_dse): doh, fix
- build error.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-popup.c: #include
- gtklabel.h, fixes an unresolved symbol.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (query_ldap_root_dse): build up
- the list of supported auth_methods.
- (pas_backend_ldap_process_get_supported_auth_methods): respond
- with the list of auth methods we've built up.
- (pas_backend_ldap_dispose): unref the auth_method list.
- (pas_backend_ldap_class_init): hook up
- pas_backend_ldap_process_get_supported_auth_methods.
-
- * backend/pas/pas-backend.c
- (pas_backend_get_supported_auth_methods): new function.
- (process_client_requests): add clause for GetSupportedAuthMethods.
-
- * backend/pas/pas-backend.h: add prototype for
- pas_backend_get_supported_auth_methods, and add it to the class
- vtable.
-
- * backend/pas/pas-book.h: add GetSupportedAuthMethods enum member
- and PASGetSupportedAuthMethodsRequest. and add prototype for
- pas_book_respond_get_supported_auth_methods.
-
- * backend/pas/pas-book.c
- (pas_book_queue_get_supported_auth_methods): new function.
- (impl_GNOME_Evolution_Addressbook_Book_getSupportedAuthMethods):
- new function.
- (pas_book_respond_get_supported_auth_methods): new function.
- (pas_book_free_request): add clause for GetSupportedAuthMethods.
- (pas_book_class_init): hook up getSupportedAuthMethods.
-
- * backend/ebook/e-book-listener.c
- (e_book_listener_queue_get_supported_fields_response): fields ->
- list.
- (e_book_listener_queue_get_supported_auth_methods_response): new
- function.
- (impl_BookListener_response_get_supported_auth_methods): new
- function.
- (e_book_listener_class_init): hook up
- epv->notifySupportedAuthMethods.
-
- * backend/ebook/e-book-listener.h: add
- GetSupportedAuthMethodsResponse enum member, and change the field
- name from "fields" to list (and use it for both GetSupportedFields
- and GetSupportedAuthMethods)
-
- * backend/ebook/e-book.c (e_book_get_supported_auth_methods): new
- function.
- (e_book_do_response_get_supported_auth_methods): new function.
-
- * backend/ebook/e-book.h: add prototype for
- e_book_get_supported_auth_methods.
-
- * backend/idl/addressbook.idl: add getSupportedAuthMethods IDL
- call.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-book-factory.c (backend_last_client_gone_cb):
- deal with backends that might not have loaded successfully
- (they'll have a NULL uri).
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (e_select_names_bonobo_new): call e_select_names_bonobo_construct
- on the newly created object.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am: addressbook-config.etspec is gone.
-
- * gui/component/addressbook-config.c: make the sources table be a
- gtktreeview instead of an etable.
-
- * gui/component/ldap-config.glade: remove all references to
- gnome-hint.png
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-minicard.c (column_width_changed): fix
- parameter types here (this signal isn't generated from an ETable.)
-
- * gui/widgets/gal-view-factory-minicard.c: include e-util.h
-
- * gui/widgets/e-minicard.h: include gnome-canvas.h here.
-
- * gui/widgets/e-addressbook-table-adapter.c: #include
- e-destination.h here.
-
- * gui/widgets/e-minicard.c: same.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.[ch]: remove the select
- names stuff (the Related Contacts button/entry.)
-
- * gui/contact-editor/contact-editor.glade: same.
-
-2003-01-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in:
- comment out the factory oaf_server, and change the location of the
- SelectNames controls to be
- OAFIID:GNOME_Evolution_Addressbook_Factory so the normal
- addressbook.so will create them.
-
- * gui/component/select-names/Makefile.am
- (libeselectnames_la_SOURCES): remove the
- e-select-names-factory.[ch] stuff for the time being.
-
- * gui/component/component-factory.c (factory): we're now (for the
- time being) the factory for the select names control.
-
-2003-01-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c: oops, don't include
- e-treeview-selection-model.h unless we're building the treeview.
-
-2003-01-08 Jeffrey Stedfast <fejj@ximian.com>
-
- * backend/pas/pas-backend-ldap.c
- (pas_backend_ldap_process_authenticate_user): Fix to build.
-
-2003-01-08 Chris Toshok <toshok@ximian.com>
-
- * gui/component/apps_evolution_addressbook.schemas: add in the
- schema entry for minimum_query_length.
-
-2003-01-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.h: add
- E_ADDRESSBOOK_VIEW_TREEVIEW to the enum, ifdef'ed out.
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_class_init): add ifdefed treeview code.
- (init_collection): same.
- (display_view): same.
- (get_selection_model): same.
- (treeview_row_activated): same.
- (create_treeview_view): same.
- (change_view_type): same.xo
- (e_addressbook_view_print): same.
- (e_addressbook_view_print_preview): same.
-
- * gui/widgets/Makefile.am: add in the treeview sources (commented
- out).
-
-2003-01-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-minicard.c (gal_view_minicard_edit): add
- parent arg.
-
- * gui/widgets/e-addressbook-treeview-adapter.[ch]: new files, for
- a GtkTreeView view of contacts.
-
- * gui/widgets/gal-view-treeview.[ch]: same
-
- * gui/widgets/gal-view-favroty-treeview.[ch]: same
-
-2003-01-08 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/Makefile.am: $(datadir)/evolution/images instead
- of $(datadir)/images/evolution.
- * gui/contact-editor/Makefile.am: Likewise.
- * gui/contact-list-editor/Makefile.am (iconsdir): Likewise.
- * gui/widgets/Makefile.am: Likewise.
-
-2002-01-08 Dan Winship <danw@ximian.com>
-
- Move PASBook request handling into PASBackend itself since all
- existing backends do it exactly the same way. (Part of 32866).
-
- * backend/pas/pas-backend.h (PASBackendClass): add new methods for
- the various pas book requests.
-
- * backend/pas/pas-backend.c: Add a clients list to
- PASBackendPrivate.
- (pas_backend_create_card, etc): Add these to invoke the new
- methods.
- (process_client_requests, book_destroy_cb): Moved here and
- slightly rewritten from pas-backend-file.
- (last_client_gone): Now static.
- (add_client, remove_client): Default implementations, based on
- pas-backend-file, that add the client to/remove it from the
- backend's clients list and connect to its requests_queued signal.
- (pas_backend_init, pas_backend_dispose): Deal with the clients
- list.
-
- * backend/pas/pas-backend-file.c (struct _PASBackendFilePrivate):
- Remove GList *clients.
- (pas_backend_file_process_client_requests,
- pas_backend_file_book_destroy_db, pas_backend_file_add_client,
- pas_backend_file_remove_client): Gone.
- (pas_backend_file_class_init): Remove add_client/remove_client
- method initializations, add initializations for processing the
- various book requests.
-
- * backend/pas/pas-backend-ldap.c (struct _PASBackendLDAPPrivate):
- Remove GList *clients.
- (pas_backend_ldap_process_create_card, etc): Make these take the
- specific PAS*Request types rather than a generic PASRequest.
- (pas_backend_ldap_process_client_requests,
- pas_backend_ldap_book_destroy_db, pas_backend_ldap_add_client,
- pas_backend_ldap_remove_client): Gone.
- (pas_backend_ldap_class_init): Remove add_client/remove_client
- method initializations, add initializations for processing the
- various book requests.
-
-2003-01-07 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/evolutionperson.schema: fix the SYNTAX for the
- telephone attributes, and make the fax attributes more closely
- mirror those from core.schema. Fixes the schema for openldap-2.1.
-
-2003-01-06 Dan Winship <danw@ximian.com>
-
- * backend/idl/Makefile.am: remove idldir def (defined by
- configure.in now)
-
- * gui/component/select-names/Makefile.am: Likewise
-
2003-01-01 Chris Toshok <toshok@ximian.com>
- [ fixes the non-ui portion of #36183 ]
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_start_query): use the entry's
- minimum_query_length instead of a constant here.
- (e_select_names_completion_set_minimum_query_length): new
- function, set the entry's minimum_query_length.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_entry_new): set the minimum_query length
- after setting the completion books.
- (read_completion_settings_from_db): rename
- read_completion_books_from_db to this, and read the
- minimum_query_length too.
- (db_listener): rename uris_listener to this, and listen for
- changes on both the uris and minimum_query_length settings.
-
- * gui/component/select-names/e-select-names-completion.h: add
- prototype for e_select_names_completion_set_minimum_query_length.
-
- * gui/component/select-names/e-select-names-manager.h: add
- minimum_query_length to struct _ESelectNamesManager.
+ [ fixes bug #31014 ]
+ * backend/pas/pas-backend-ldap.c: use "categories" instead of
+ "category" for the ECard field so the UI/get_supported_fields stuff
+ actually thinks its usable in the contact editor..
-2002-12-19 Ettore Perazzoli <ettore@ximian.com>
+2003-01-01 Chris Toshok <toshok@ximian.com>
- * gui/component/addressbook-config.c
- (addressbook_config_control_new): Made it return an
- EvolutionConfigControl instead of a BonoboControl (and removed a
- bogus EvolutionConfigControl -> BonoboControl cast).
+ [ fixes bug #34883 ]
+ * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect):
+ perform an anonymous bind as the first thing after opening the
+ connection.
2002-12-17 Chris Toshok <toshok@ximian.com>
@@ -1486,152 +86,7 @@
(addressbook_value_at): don't free the return of
e_card_simple_get_const, as this causes a double free later on.
-2002-12-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/e-address-popup.c: convert the clist in here to a
- GtkTreeView. your guess is as good as mine if it works (i can't
- test it at present) but it compiles.
-
-2002-12-18 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (jump_to_letters):
- g_string_sprintfa -> g_string_append_printf.
- (create_alphabet): same.
- (create_minicard_view): remove gtk_widget_{push,pop}_visual.
-
- * gui/widgets/Makefile.am (INCLUDES): add -D*_DISABLE_DEPRECATED.
-
-2002-12-18 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard.c (e_minicard_realize): drop use of
- "font" arg.
- (get_left_width): use pango to calculate this instead of a GdkFont.
-
- * gui/widgets/e-minicard-view.c: drop include of e-unicode.h.
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_construct):
- don't need to create the font anymore.
-
- * gui/search/Makefile.am (INCLUDES): add -D*_DISABLE_DEPRECATED.
-
- * gui/search/e-addressbook-search-dialog.c
- (e_addressbook_search_dialog_new): use g_object_new instead of
- gtk_type_new.
-
- * gui/merging/Makefile.am (INCLUDES): add -D*_DISABLE_DEPRECATED.
-
- * gui/contact-list-editor/Makefile.am (INCLUDES): add
- -D*_DISABLE_DEPRECATED.
-
- * gui/contact-list-editor/e-contact-list-editor.c (is_named):
- strdup (or not, if we don't need to save the value) instead of
- using the e_utf8 functions.
- (fill_in_info): same.
-
- * gui/contact-editor/Makefile.am (INCLUDES): add
- -D*_DISABLE_DEPRECATED.
-
- * gui/contact-editor/e-contact-save-as.c (e_contact_save_as):
- strdup (or not, if we don't need to save the value) instead of
- using the e_utf8 functions.
- (e_contact_list_save_as): same.
-
- * gui/contact-editor/e-contact-quick-add.c (clicked_cb): strdup
- (or not, if we don't need to save the value) instead of using the
- e_utf8 functions.
- (build_quick_add_dialog): same.
-
- * gui/contact-editor/e-contact-editor.c (phone_entry_changed):
- strdup (or not, if we don't need to save the value) instead of
- using the e_utf8 functions.
- (file_as_set_style): same.
- (name_entry_changed): same.
- (full_name_clicked): same.
- (categories_clicked): same.
- (set_field): same.
- (fill_in_field): same.
- (fill_in_single_field): same.
- (extract_field): same.
- (extract_single_field): same.
-
- * gui/contact-editor/e-contact-editor-fullname.c (extract_field):
- just strdup, it's already utf8.
-
- * gui/contact-editor/e-contact-editor-address.c (extract_field):
- they're all entries, use GTK_ENTRY foo here.
-
- * gui/component/select-names/Makefile.am (INCLUDES): add
- -D*_DISABLE_DEPRECATED.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_add_section): remove the extra
- utf8_from_locale_string stuff.
-
- * gui/component/select-names/e-select-names-popup.c
- (set_uiinfo_label): gtk_container_children ->
- gtk_container_get_children, and remove the extra utf8 stuff.
-
- * gui/component/Makefile.am (INCLUDES): add
- -D*_DISABLE_DEPRECATED.
-
- * gui/component/addressbook-storage.c
- (addressbook_storage_init_source_uri): g_string_sprintfa ->
- g_string_append_printf.
-
- * gui/component/addressbook-config.c (focus_help):
- gtk_notebook_set_page -> gtk_notebook_set_current_page.
- (addressbook_source_dialog_set_source): same.
- (auth_optionmenu_activated): gtk_container_children ->
- gtk_container_get_children.
- (ssl_optionmenu_activated): same.
- (ssl_optionmenu_selected): same, and gtk_notebook_set_page ->
- gtk_notebook_set_current_page.
- (scope_optionmenu_activated): same.
- (set_advanced_button_state): same.
- (addressbook_ldap_init): hook "response" to gtk_widget_destroy to
- make the dialog go away when clicked.
- (addressbook_ldap_auth): same.
- (addressbook_root_dse_query): same.
- (do_ldap_root_dse_query): same.
- (addressbook_config_control_new): fix return type and cast.
- (main): remove call to gtk_widget_push_visual.
-
- * gui/component/addressbook-config.h:
- addressbook_config_control_new returns a BonoboObject, not a
- BonoboControl.
-
- * gui/component/addressbook.c: remove e-unicode.h include.
-
- * backend/pas/Makefile.am (INCLUDES): Add
- -DLIBGNOME_DISABLE_DEPRECATED.
-
- * backend/ebook/Makefile.am (INCLUDES): Add
- -DLIBGNOME_DISABLE_DEPRECATED.
-
- * backend/ebook/e-card.c (e_card_get_property): remove misleading
- comment.
-
-2002-12-17 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (build_card_from_entry):
- g_strcasecmp -> g_ascii_strcasecmp.
- (FIND_INSERT): same.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_load_uri):
- g_dirname -> g_path_get_dirname.
-
- * backend/pas/Makefile.am (INCLUDES): add
- -DG_DISABLE_DEPRECATED.
-
- * backend/ebook/Makefile.am (INCLUDES): add
- -DG_DISABLE_DEPRECATED.
-
-2002-12-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (uris_listener): oops, use strcmp, not !strcmp here.
-
-2002-12-17 Chris Toshok <toshok@ximian.com>
+2002-12-05 Chris Toshok <toshok@ximian.com>
[ Fixes bug #35135 ]
* backend/ebook/e-book-util.c (set_default_book_uri_local): don't
@@ -1643,116 +98,6 @@
(set_default_book_uri_from_bonobo_conf): install the bonobo conf
listener so we'll get updates.
-2002-12-16 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/addressbook-config.c
- (addressbook_config_control_new): Use
- evolution_shell_client_corba_objref() instead of BONOBO_OBJREF()
- to get the Shell CORBA object.
-
-2002-12-16 Jeffrey Stedfast <fejj@ximian.com>
-
- * gui/component/addressbook-config.c: Don't #include
- <e-util/e-html-utils.h>
-
-2002-12-09 Chris Toshok <toshok@ximian.com>
-
- * gui/search/e-addressbook-search-dialog.[ch]: GObject-ize this.
-
-2002-12-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (load_uri_auth_cb): pass
- "Addressbook" to e_passwords*.
- (addressbook_authenticate): same.
-
-2002-12-09 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook.c (search_cb): remove
- PENDING_PORT_WORK.
- (addressbook_search_activated): same.
- (addressbook_query_changed): same.
-
- * gui/component/Makefile.am (libevolution_addressbook_la_LIBADD):
- add libfilter.la back in.
-
-2002-12-09 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/widgets/e-minicard-control.c: #define MINICARD_CONTROL_ID.
-
-2002-12-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_error_dialog):
- connect ::response to gtk_widget_destroy so the dialog goes away.
-
- * gui/widgets/e-minicard-label.c (e_minicard_label_construct):
- don't use font_gdk anymore on EText. it doesn't exist.
-
-2002-12-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c (text_height): this
- uses pango now.
- (addressbook_height): same.
-
-2002-12-06 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book.c (e_book_commit_card): use e_card_set_book
- instead of basically duplicating its code here.
- (e_book_add_card): same.
-
-2002-12-06 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/e-cardlist-model.c: #include <string.h>.
-
- * gui/component/addressbook-storage.c: #include <string.h>,
- <ctype.h>, <unistd.h>.
-
- * gui/component/addressbook-factory.c: Removed.
-
- * gui/component/addressbook-component.c: #include
- <bonobo/bonobo-main.h>, <unistd.h> and <string.h>.
- (create_view): addressbook_new_control() instead of
- addressbook_factory_new_control().
-
- * gui/component/select-names/e-select-names.c
- (e_addressbook_create_ebook_table): Removed unused variable.
- (e_select_names_add_section): Removed unused variable.
-
- * gui/component/select-names/e-select-names-manager.c
- (focus_in_cb): Use g_source_remove() here instead of
- gtk_timeout_remove().
-
- * gui/component/component-factory.c: New.
-
- * gui/widgets/e-minicard-control.c
- (e_minicard_control_factory_init): Removed.
- (e_minicard_control_control_factory): Removed.
- (e_minicard_control_new): New.
-
- * gui/component/e-address-widget.c
- (e_address_widget_factory_init): Removed.
- (e_address_widget_new_control): Renamed from
- e_address_widget_factory_new_control(), made public.
- (e_address_widget_factory): Removed.
-
- * gui/component/e-address-popup.c (e_address_popup_new_control):
- New.
- (e_address_popup_factory_new_control): Removed.
- (e_address_popup_factory): Removed.
- (e_address_popup_factory_init): Removed.
-
- * gui/component/addressbook-config.c
- (addressbook_config_register_factory): Removed.
- (addressbook_config_create_control): New.
-
- * gui/component/addressbook-component.c
- (addressbook_component_factory_init): Removed.
- (addressbook_component_get_object): New.
- (owner_set_cb): Do not call addressbok_config_register_factory().
-
- * gui/component/addressbook.c (addressbook_factory_init): Removed.
- (addressbook_new_control): Renamed from
- addressbook_factory_new_control().
-
2002-12-05 Jeffrey Stedfast <fejj@ximian.com>
* gui/component/select-names/e-select-names.etspec: Use collate
@@ -1766,70 +111,35 @@
naming errors returned from query_ldap_root_dse, as some servers
(older openldap servers among others i'm sure) don't have a root
dse at all.
-
-2002-12-02 Not Zed <NotZed@Ximian.com>
-
- * gui/widgets/e-addressbook-view.c (e_contact_print_button):
- gnomedialog -> gtkdialog stuff. print dialog is a gtkdialog now.
- * gui/contact-editor/e-contact-editor.c: include gtkstock.h
+2002-12-02 Chris Toshok <toshok@ximian.com>
+ * backend/ebook/e-card.c (e_card_get_vobject): back out fix for
+ #28945 because it breaks some internal assumptions about the
+ structure of contact lists.
-2002-11-27 Not Zed <NotZed@Ximian.com>
+2002-11-30 Chris Toshok <toshok@ximian.com>
- * gui/contact-editor/e-contact-editor-address.c: #include gtkstock.h
+ [ the rest of the fix for #31763 ]
+ * gui/component/select-names/e-select-names.h (struct
+ _ESelectNames): add status_image.
-2002-11-29 Chris Toshok <toshok@ximian.com>
+ * gui/component/select-names/select-names.glade: add an icon to
+ the status bar.
- * gui/widgets/e-minicard-view-widget.c (column_width_changed): the
- detail is supposed to go after the signal id, not at the end of
- the parameter list.
+ * gui/component/select-names/e-select-names.c
+ (e_select_names_init): init (and initially hide) status_image.
+ (status_message): show the image if there's a status message, hide
+ it if there's not.
2002-11-28 Chris Toshok <toshok@ximian.com>
- [ roll forward from 1.2 branch, partial fix for #31763 ]
+
+ [ partial fix for #31763 ]
* gui/component/select-names/select-names.glade: add the Find
button back in.
-
-2002-11-28 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-view.c (create_minicard_view): remove
- the button_press_event handler (that did nothing). this makes it
- so button presses actually get to the canvas (and therefore we can
- now drag the lines in the reflow widget).
-
-2002-11-26 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-quick-add.c: add include for
- gtkstock.h.
-
- * gui/contact-list-editor/e-contact-list-model.c
- (e_contact_list_model_add_destination): add pre_change call.
- (e_contact_list_model_remove_row): same.
- (e_contact_list_model_remove_all): same.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (e_contact_list_editor_new): ref/sink the contact list editor so
- we don't get the floating unref warning from gtk.
-
- * gui/contact-editor/e-contact-editor.c (e_contact_editor_new):
- ref/sink the contact editor so we don't get the floating unref
- warning from gtk.
- (e_contact_editor_init): use g_build_filename instead of
- g_concat_dir_and_file.
-
- * gui/widgets/e-minicard-label.c
- (e_minicard_label_resize_children): use MAX (value, 0) to make
- sure we aren't passing negative values for clip-widths.
-
- * gui/widgets/e-minicard.c (e_minicard_realize): use MAX (value,
- 0) to make sure we aren't passing negative values for widths.
-
- * gui/contact-editor/e-contact-editor.c (e_contact_editor_init):
- use g_build_filename.
-
+
2002-11-26 Chris Toshok <toshok@ximian.com>
- [ roll forward from 1.2 branch ]
* backend/pas/pas-backend-file.c
(pas_backend_file_process_get_vcard): never pass NULL as the vcard
to the corba call, it causes a crash. This particular bug bit us
@@ -1838,67 +148,15 @@
2002-11-26 Chris Toshok <toshok@ximian.com>
- [ roll forward from 1.2 branch, Fixes addressbook bug #28945 ]
+ [ Fixes addressbook bug #28945 ]
* backend/ebook/e-card.c (e_card_get_vobject): if the email
property is xml, get the real address from the e-destination.
Fixes saving contact lists.
-2002-11-26 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-minicard.c (e_minicard_reflow): remove redundant
- setting of y2.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (e_contact_list_editor_init): show the table.
-
- * gui/component/select-names/e-select-names-completion.c: remove
- an unnecessary #include.
-
- * gui/component/addressbook-storage.c (addressbook_storage_setup):
- use g_build_filename.
-
- * gui/component/addressbook-component.c (remove_folder): use
- g_build_filename.
- (add_creatable_item): same.
- (ensure_completion_uris_exist): same, and use the right gconf
- paths for completion uris.
-
-2002-11-26 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-manager.c
- (read_completion_books_from_db): use new schema for
- completion/uris.
- (uris_listener): same.
-
- * gui/component/select-names/e-select-names.h: Convert to
- GtkDialog from GnomeDialog.
-
- * gui/component/select-names/e-select-names.c: Convert to
- GtkDialog from GnomeDialog.
- (folder_selected): use new schema for last_used_uri.
- (e_select_names_init): same.
- (e_select_names_set_default): use pango markup to set
- bold/not-bold.
- (e_select_names_add_section): don't bother creating an EEntry, we
- can use pango and a normal label. This also keeps us from
- wrapping "contacts ->" at the '-'.
-
- * gui/component/apps_evolution_addressbook.schemas: new file.
-
- * gui/component/Makefile.am: add the schema stuff.
-
-2002-11-24 Chris Toshok <toshok@ximian.com>
-
- * gui/component/addressbook-config.c (query_for_supported_bases):
- show the etable.
- (addressbook_add_server_druid): show_all before returning the
- dialog, so the druid shows up.
-
2002-11-23 Chris Toshok <toshok@ximian.com>
- [ roll forward from the 1.2 branch. fixes #25540, part of #29630,
- as well as other selection issues in the contact editor and ACL
- issues in the ldap backend ]
+ [ fixes #25540, part of #29630, as well as other selection issues
+ in the contact editor and ACL issues in the ldap backend ]
* backend/pas/pas-backend-ldap.c (check_schema_support): reset the
schema check state to FALSE if the read returned nothing (and the
user had not authenticated). we'll requery if/when they auth.
@@ -1943,1006 +201,38 @@
(e_contact_editor_address_set_arg): same, and make the labels
sensitive/insensitive depending on the editable state of the
dialog.
-
+
+2002-11-22 Chris Toshok <toshok@ximian.com>
+
+ * gui/widgets/e-addressbook-reflow-adapter.c (unlink_model): we
+ need to disconnect the model_changed signal too. This at the very
+ least is bad and at the worst could cause crashes.
+
2002-11-22 Chris Toshok <toshok@ximian.com>
- [ roll forward Sean.Gao@sun.com's fix for #16870 from the 1.2
- branch ]
+ [ fixes #16870, constibuted by Sean.Gao@sun.com ]
* backend/ebook/evolution-ldif-importer.c (getNextLDIFEntry):
- check for both LR and CRLF as empty line markers.
+ check for both LF and CRLF as empty line markers.
2002-11-22 Chris Toshok <toshok@ximian.com>
- [ rolling forward fix for #34254 from 1.2 branch ]
+ [ fixes #34254, contributed by Sean.Gao@sun.com ]
* backend/ebook/evolution-vcard-importer.c (check_file_is_vcard):
- use g-ascii_strncasecmp instead of strncmp.
- (support_format_fn): use g_ascii_strcasecmp instead of strcmp.
+ use g_strncasecmp instead of strncmp here.
+ (support_format_fn): use g_strcasecmp instead of strcmp here.
-2002-11-20 Chris Toshok <toshok@ximian.com>
+2002-11-21 Chris Toshok <toshok@ximian.com>
- * gui/component/addressbook-storage.h: roll forward the scope fix.
+ * gui/component/addressbook-storage.h: reorder the enum to match
+ the order used in the option menu in the .glade file. Fixes lots
+ of reports of scopes being saved as "base" instead of "one".
2002-11-20 Chris Toshok <toshok@ximian.com>
- * gui/contact-editor/e-contact-editor.c: roll forward the fix for
- the contact editor.
-
-2002-11-21 Not Zed <NotZed@Ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.c
- (entry_changed): Pass type to bonobo_ctonrol_set_property, and
- also NULL terminate the valist.
-
- * gui/component/select-names/e-select-names-text-model.c
- (changed_cb): Fix signature for signal.
-
-2002-11-19 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/select-names/GNOME_Evolution_Addressbook_SelectNames.server.in.in,
- * gui/component/select-names/Makefile.am: Same changes as below
- for the SelectNames component.
-
-2002-11-18 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): show the custom table.
-
-2002-11-18 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-minicard.c (gal_view_minicard_attach):
- remove the cast to (int) - column_width is a double.
-
- * gui/widgets/e-minicard.c (e_minicard_class_init): the height
- property is only readable, not readwrite.
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_class_init): make column_width a double
- property.
- (e_minicard_view_widget_set_property): don't cast to (int).
- column_width is double in the e-minicard-view.
- (e_minicard_view_widget_realize): same.
- (e_minicard_view_widget_get_property): use g_value_set_double for
- column_width.
-
-2002-11-17 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/Makefile.am (servers_DATA): oops,
- missed some "oaf"'s.
-
-2002-11-16 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c
- (e_contact_editor_build_phone_ui): sink the popup.
- (e_contact_editor_build_email_ui): same.
- (e_contact_editor_build_address_ui): same.
-
- * gui/component/addressbook-config.c (ldap_dialog_new): show
- everything from dialog->page down, so custom widgets show up.
-
-2002-11-15 Ettore Perazzoli <ettore@ximian.com>
-
- * gui/component/Makefile.am: Added rule to generate
- GNOME_Evolution_Addressbook.server.in from
- GNOME_Evolution_Addressbook.server.in.in, substituting
- @LIBEXECDIR@.
-
- * GNOME_Evolution_Addressbook.server.in.in: Renamed from
- GNOME_Evolution_Addressbook.server.in. Added @LIBEXECDIR@ before
- the location of the executable.
-
- * gui/component/select-names/select-names.glade: Ported to Glade
- 2.
-
- * gui/component/select-names/recipient.glade: Ported to Glade 2.
-
-2002-11-15 Rodney Dawes <dobey@ximian.com>
-
- * gui/component/addressbook-component.c: Use bonobo_main_quit.
-
-2002-11-14 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-factory-minicard.c: clean this up a tad.
-
- * gui/widgets/e-addressbook-view.c (init_collection): re-enable
- this.
- (setup_menus): same.
-
- * gui/widgets/gal-view-minicard.[ch]: more GObject work.
-
-2002-11-12 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (_popup_position): push_in
- = FALSE, no clue why... :)
- (_arrow_pressed): call g_signal_stop_emission here, seems to fix
- things.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_init): fix warnings.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_activate_dialog): fix warning.
-
- * gui/component/addressbook.c (forget_passwords_cb): remove the
- PENDING_PORT ifdef.
- (load_uri_auth_cb): same.
- (addressbook_authenticate): same.
-
- * gui/component/addressbook-factory.c (main): same.
-
- * gui/component/addressbook-storage.c (load_source_data): be
- silent about text nodes if they contain nothing but whitespace.
-
-2002-11-11 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-card-cursor.c (pas_card_cursor_dispose): guard
- against multiple invocations.
-
- * backend/pas/pas-backend-ldap.c (view_destroy): change signature
- to that of a weak ref notify function.
- (cursor_destroy): same.
- (pas_backend_ldap_book_destroy_cb): same.
- (get_cursor_handler): ::destroy -> weak_ref.
- (pas_backend_ldap_process_get_book_view): same.
- (pas_backend_ldap_add_client): same.
-
- * backend/pas/pas-backend-file.c (cursor_destroy): change
- signature to that of a weak ref notify function.
- (view_destroy): same.
- (pas_backend_file_book_destroy_cb): same.
- (pas_backend_file_process_get_cursor): ::destroy -> weak_ref.
- (pas_backend_file_process_get_book_view): same.
- (pas_backend_file_process_get_completion_view): same.
- (pas_backend_file_process_get_changes): same.
- (pas_backend_file_add_client): same.
-
- * backend/ebook/test-client.c (get_cursor_cb): unref the book and
- exit here.
- (get_card_cb): pass a query string to get_cursor.
-
- * backend/ebook/e-book-view.c (e_book_view_class_init): correct
- marshaller for "card_added".
-
-2002-11-11 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/test-reflow.c (destroy_callback): change signature
- to that of a weak ref notify function.
- (main): ::destroy -> weak_ref.
-
- * gui/widgets/test-minicard.c (destroy_callback): change signature
- to that of a weak ref notify function.
- (main): ::destroy -> weak_ref.
-
- * gui/widgets/test-minicard-view.c (destroy_callback): change
- signature to that of a weak ref notify function.
- (main): ::destroy -> weak_ref.
-
- * gui/widgets/test-minicard-label.c (destroy_callback): change
- signature to that of a weak ref notify function.
- (main): ::destroy -> weak_ref.
-
- * gui/widgets/e-minicard-widget.c (e_minicard_widget_init): ifdef
- out the call to gnome_canvas_set_scroll_region. It doesn't seem
- necessary judging from the rest of the code, and it also crashes
- the addressbook if it's in.
-
- * gui/widgets/e-minicard-widget-test.c (destroy_callback): change
- signature to that of a weak ref notify function.
- (main): ::destroy -> weak_ref.
-
- * gui/widgets/e-minicard-control.c (free_struct): change signature
- to that of a weak ref notify function.
- (e_minicard_control_factory): ::destroy -> weak_ref.
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_init):
- ::destroy -> weak_ref.
- (e_addressbook_view_print): same.
- (free_closure): change signature to that of a weak ref notify
- function.
- (e_contact_print_destroy): same.
- (invisible_destroyed): same.
-
- * gui/widgets/e-addressbook-util.c
- (e_addressbook_prompt_save_dialog): convert from GnomeDialog to
- GtkDialog.
- (e_addressbook_show_multiple_cards): same.
-
- * gui/contact-list-editor/e-contact-list-editor.c
- (prompt_to_save_changes): change response ids to use
- GTK_RESPONSE_.
-
- * gui/component/select-names/e-select-names-manager.c
- (clear_widget): new function.
- (e_select_names_manager_activate_dialog): ::destroy -> weak_ref.
-
- * gui/component/select-names/e-select-names.c (clear_widget):
- change signature to that of a weak ref notify function.
- (e_select_names_init): ::destroy -> weak_ref.
-
- * gui/component/e-address-popup.c (mini_wizard_destroy_cb): change
- signature to that of a weak ref notify function.
- (mini_wizard_new): ::destroy -> weak_ref.
-
- * gui/component/addressbook-config.c
- (addressbook_source_dialog_destroy): change signature to that of a
- weak ref notify function.
- (ldap_config_control_destroy_callback): same.
- (addressbook_add_server_druid): ::destroy -> weak_ref.
- (addressbook_edit_server_dialog): same.
- (ldap_config_control_new): same.
-
- * gui/component/addressbook.c (destroy_callback): change signature
- to that of a a weak ref notify function.
- (addressbook_factory_new_control): ::destroy -> weak_ref.
-
- * gui/merging/e-card-merging.c (response): rename clicked to this,
- and destroy the dialog here.
- (match_query_callback): ::clicked -> ::response
-
- * gui/merging/e-card-merging-book-commit-duplicate-detected.glade:
- convert.
-
- * gui/merging/e-card-duplicate-detected.glade: same.
-
-2002-11-11 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c (_arrow_pressed): change
- around a little, still ifdefed though.
-
- * gui/contact-editor/e-contact-save-as.c (file_exists): same.
- (save_it): deal with the GtkDialog response ids.
-
- * gui/contact-editor/e-contact-editor.c
- (e_contact_editor_confirm_delete): just build the dialog here
- (using gtk_message_dialog*).
-
- * gui/contact-editor/Makefile.am (glade_DATA): remove
- file-exists.glade and e-contact-editor-confirm-delete.glade.
-
-2002-11-11 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-card-cursor.c (pas_card_cursor_dispose): guard
- against multiple invocations.
-
- * backend/pas/pas-backend-ldap.c (view_destroy): change signature
- to that of weak ref's notify function - also, don't use the type
- check macros on the freed GObject.
- (cursor_destroy): same.
- (pas_backend_ldap_book_destroy_cb): same.
- (pas_backend_ldap_add_client): use weak_ref insteead of ::destroy.
- (get_cursor_handler): same.
- (pas_backend_ldap_process_get_book_view): same.
-
- * backend/pas/pas-backend-file.c (cursor_destroy): change
- signature to that of weak ref's notify function - also, don't use
- the type check macros on the freed GObject.
- (pas_backend_file_book_destroy_cb): same.
- (view_destroy): same.
- (pas_backend_file_process_get_cursor): use weak_ref instead of
- ::destroy.
- (pas_backend_file_process_get_book_view): same.
- (pas_backend_file_process_get_completion_view): same.
- (pas_backend_file_process_get_changes): same.
- (pas_backend_file_add_client): same.
-
-2002-11-10 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-card-sexp.c
- (pas_backend_card_sexp_dispose): guard against multiple
- invocations.
-
- * backend/pas/pas-card-cursor.c (pas_card_cursor_dispose): same.
-
- * backend/pas/pas-book.c (pas_book_dispose): same.
-
- * backend/pas/pas-book-view.c (pas_book_view_dispose): same.
-
- * backend/pas/pas-book-factory.c (pas_book_factory_dispose): same.
-
- * backend/pas/pas-backend-summary.c (pas_backend_summary_dispose): same.
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_dispose): same.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_dispose): same.
-
- * backend/ebook/e-book-listener.c (e_book_listener_dispose): guard
- against multiple invocations.
-
- * backend/ebook/e-card.c (e_card_dispose): same.
-
- * backend/ebook/e-card-simple.c (e_card_simple_dispose): same.
-
- * backend/ebook/e-card-cursor.c (e_card_cursor_dispose): same.
-
- * backend/ebook/e-book.c (e_book_dispose): same.
-
- * backend/ebook/e-book-view-listener.c (e_book_view_listener_dispose): same.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-model.c (free_data): guard against
- multiple invocations.
- (remove_book_view): same.
- (addressbook_dispose): same.
-
- * gui/widgets/e-addressbook-view.c (e_addressbook_view_dispose):
- same.
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_dispose): same.
-
- * gui/widgets/e-minicard-view.c (e_minicard_view_dispose): same.
-
- * gui/widgets/e-minicard-widget.c (e_minicard_widget_dispose):
- same.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (addressbook_get_property): oops, missed these casts.
-
- * gui/component/addressbook.c (get_master_list): remove the
- PENDING_PORT_WORK ifdef, just ported ECategoriesMasterList.
- (make_suboptions): same.
-
- * gui/contact-editor/e-contact-editor.c (categories_clicked):
- same.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/test-reflow.c: port work.
-
- * gui/widgets/test-minicard-view.c: port work.
-
- * gui/widgets/e-minicard.[ch]: port work.
-
- * gui/widgets/e-minicard-widget.c: port work.
-
- * gui/widgets/e-minicard-view.c: port work.
-
- * gui/widgets/e-minicard-view-widget.c
- (e_minicard_view_widget_size_allocate): gtk_->g_ change i missed.
- (e_minicard_view_widget_reflow): same.
-
- * gui/widgets/e-minicard-label.c: port work.
-
- * gui/widgets/e-minicard-control.c (get_prop): gtk_->g_ change i
- missed.
-
- * gui/widgets/e-addressbook-view.c (setup_menus): ifdef this
- PENDING_PORT_WORK for now.
- (has_email_address_1): gtk_->g_ change i missed.
- (print): remove the PENDING_PORT_WORK from here, as the print_*
- symbols now resolve.
- (delete): gtk_->g_ changes.
- (new_card): same.
- (new_list): same.
- (sources): same.
- (create_minicard_view): same.
- (table_double_click): same.
- (create_table_view): same.
- (e_contact_print_destroy): same.
- (e_contact_print_button): same.
- (e_addressbook_view_print): same, and remove the PENDING_PORT_WORK
- ifdef.
- (e_addressbook_view_print_preview): same.
- (do_remove): gtk_->g_ changes.
- (e_addressbook_view_save_state): same.
- (view_transfer_cards): same.
-
- * gui/widgets/e-addressbook-view.h (struct _EAddressbookView):
- GtkObject -> GObject.
-
- * gui/widgets/e-addressbook-util.c (e_addressbook_error_dialog):
- GnomeDialog -> GtkDialog.
-
- * gui/widgets/e-addressbook-table-adapter.c
- (addressbook_set_value_at): a gtk_->g_ change i missed.
- (e_addressbook_table_adapter_class_init): gtk_type_class ->
- g_type_class_peek_parent.
-
- * gui/widgets/e-addressbook-reflow-adapter.c
- (addressbook_get_property): use g_object_get_property for
- aggregated properties.
- (e_addressbook_reflow_adapter_class_init): gtk_type_class ->
- g_type_class_peek_parent.
-
- * gui/merging/e-card-merging.c (match_query_callback): some misc
- gtk_->g_ changes i missed.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-model.h: parent class
- is GObjectClass.
-
- * gui/component/select-names/e-simple-card-bonobo.c
- (impl_dispose): guard against multiple invocations, and chain
- dispose.
-
- * gui/component/select-names/e-select-names.c
- (e_select_names_dispose): guard against multiple invocations.
-
- * gui/component/select-names/e-select-names-text-model.c
- (e_select_names_text_model_dispose): guard against multiple
- invocations.
- (e_select_names_text_model_set_source): fix casts.
-
- * gui/component/select-names/e-select-names-table-model.c
- (e_select_names_table_model_add_source): remove the GTK_OBJECT
- cast, fixes a warning.
- (clear_info): guard against multiple invocations from ::dispose.
-
- * gui/component/select-names/e-select-names-manager.c
- (e_select_names_manager_dispose): same.
-
- * gui/component/select-names/e-select-names-completion.c
- (e_select_names_completion_dispose): same.
-
- * gui/component/select-names/e-select-names-bonobo.c
- (impl_dispose): guard against multiple invocations.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/contact-list-editor.glade: convert to glade-2
-
- * gui/contact-list-editor/e-contact-list-editor.c: port work.
-
- * gui/contact-list-editor/e-contact-list-model.[ch]: port work.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor-address.[ch]: port work.
-
- * gui/contact-editor/e-contact-editor-fullname.[ch]: port work.
-
- * gui/contact-editor/e-contact-editor.[ch]: port work.
-
- * gui/contact-editor/e-contact-quick-add.c: port work.
-
- * gui/contact-editor/e-contact-save-as.c: port work.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-util.c
- (set_default_book_uri_from_config_db): prepend /apps/Evolution to
- config db paths.
-
- * gui/component/select-names/e-select-names-manager.c (read_completion_books_from_db): same.
- (uris_listener): same.
-
-2002-11-08 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/e-contact-editor.c: more porting work.
-
- * e-contact-editor-fullname.[ch]: more porting work.
-
- * e-contact-editor.c: more porting work.
-
- * e-contact-quick-add.c: more porting work.
-
- * e-contact-save-as.c: more porting work.
-
- * test-editor.c: more porting work.
-
- * e-contact-editor-confirm-delete.glade, file-exists.glade,
- fulladdr.glade, fullname.glade: run these through
- libglade-convert.
-
-2002-11-07 Chris Toshok <toshok@ximian.com>
-
- * gui/component/Makefile.am (evolution_addressbook_LDADD): add
- lots of libs back in since they're building now.
-
- * gui/component/addressbook-config.c: more porting work.
-
- * gui/component/addressbook.c: more porting work.
-
- * gui/component/e-address-popup.[ch]: more porting work.
-
- * gui/component/e-address-widget.[ch]: more porting work.
-
- * gui/component/e-cardlist-model.[ch]: more porting work.
-
-2002-11-07 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-select-names-bonobo.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names-completion.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names-manager.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names-model.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names-popup.c: more
- porting work.
-
- * gui/component/select-names/e-select-names-table-model.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names-text-model.[ch]: more
- porting work.
-
- * gui/component/select-names/e-select-names.[ch]: more
- porting work.
-
-2002-11-07 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/Makefile.am: tests are linking now, and link in
- libcamel.la.
-
- * backend/ebook/e-destination.c (e_destination_get_name): un-ifdef
- since camel is compiling.
- (e_destination_get_email): same.
- (e_destination_get_address): same.
- (e_destination_get_textrep): same.
-
- * backend/ebook/e-card-compare.c (name_fragment_match): use e_utf8_casefold_*.
- (name_fragment_match_with_synonyms): same.
- (e_card_compare_name_to_string_full): same.
- (e_card_compare_name): same.
-
-2002-11-07 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-util.h: add prototypes for e_utf8_casefold_collate{_len}
-
- * backend/ebook/e-book-util.c (e_utf8_casefold_collate_len): move
- utf8_casefold_collate_len here.
- (e_utf8_casefold_collate): move utf8_casefold_collate here.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * printing/e-contact-print-envelope.c: port this to
- gnome2/gnomeprint2.
-
- * printing/e-contact-print-style-editor.c: same.
-
- * printing/e-contact-print.c: same.
-
- * printing/test-contact-print-style-editor.c: same.
-
- * printing/test-print.c: same.
-
- * printing/e-contact-print.glade: libglade-convert to libglade-2.
-
- * printing/Makefile.am (contact_print_test_LDADD)
- (contact_print_style_editor_test_LDADD): remove libcamel.la from
- these for the time being to get things linking.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-minicard.[ch]: gobjectify this.
-
- * gui/widgets/e-minicard.[ch]: gobjectify this.
- (e_minicard_class_init): change the
- min/max values of the width/height paramspecs so that they can
- actually be set to something other than 0.0.
-
- * gui/widgets/e-minicard-widget.[ch]: gobjectify this.
-
- * gui/widgets/e-minicard-view.[ch]: gobjectify this.
- (set_empty_message): don't need e_utf8_from_locale_string anymore.
-
- * gui/widgets/e-minicard-view-widget.[ch]: gobjectify this.
-
- * gui/widgets/e-minicard-label.[ch]: gobjectify this.
-
- * gui/widgets/e-addressbook-view.[ch]: gobjectify this.
-
- * gui/widgets/e-addressbook-table-adapter.[ch]: gobjectify this.
-
- * gui/widgets/e-addressbook-reflow-adapter.[ch]: gobjectify this.
-
- * gui/widgets/e-addressbook-model.[ch]: gobjectify this.
-
- * gui/widgets/e-minicard-control.c (e_minicard_control_factory):
- fix bonobo_persist_stream_new api change.
-
- * gui/contact-list-editor/e-contact-list-model.c
- (e_contact_list_model_add_destination): get rid of the
- gtk_object_sink here.
-
- * gui/component/ldap-config.glade: glade-2 version of this file.
-
- * gui/component/e-address-popup.c (e_address_popup_refresh_names):
- don't need e_utf8_to_gtk_string anymore.
-
- * gui/component/addressbook.c (make_suboptions): don't need
- e_utf8_to_locale_string anymore.
-
- * gui/component/addressbook-config.c
- (addressbook_dialog_get_source): get rid of the e_utf8 gtk_entry
- functions.
- (addressbook_source_dialog_set_source): same.
- (general_tab_check): same.
- (port_changed_func): same.
- (connecting_tab_check): same.
- (query_for_supported_bases): same.
- (display_name_check): same.
- (display_name_page_prepare): same.
- (edit_source_clicked): same.
- (addressbook_config_create_new_source): same.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-card-sexp.c
- (pas_backend_card_sexp_class_init): use g_type_class_peek_parent.
-
- * backend/pas/pas-card-cursor.c (pas_card_cursor_class_init): same.
-
- * backend/pas/pas-book-view.c (pas_book_view_class_init): same.
-
- * backend/pas/pas-book-factory.c (pas_book_factory_class_init): same.
-
- * backend/pas/pas-backend-summary.c (pas_backend_summary_class_init): same.
-
- * backend/pas/pas-backend-ldap.c (pas_backend_ldap_class_init): same.
-
- * backend/pas/pas-backend-file.c (pas_backend_file_class_init): same.
-
- * backend/ebook/e-book-marshal.list: ENUM -> INT.
-
- * backend/ebook/e-book-view.c (e_book_view_dispose): guard against
- this being called multiple times.
- (e_book_view_class_init): ENUM -> INT in the sequence_complete
- signal.
-
- * backend/ebook/e-book.c (e_book_do_response_open): un-ifdef the
- component_died signal stuff.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-util.c (e_book_expand_uri): call
- g_build_filename, not g_build_path.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-destination.[ch]: fix the gnome-xml headers.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/gal-view-minicard.c: fix the gnome-xml headers.
-
- * gui/widgets/e-addressbook-view.c
- (e_addressbook_view_class_init): convert from gtk signals and args
- to GSignal and GObject properties.
- (e_addressbook_view_dispose): rename _destroy to this.
- (e_addressbook_view_set_property): rework _set_arg to this.
- (e_addressbook_view_get_property): rework _get_arg to this.
- (display_view): if we're here we need to choose a view, regardless
- of whether or not the GAL_IS_VIEW_* macros tell us which type it
- is.
-
- * gui/widgets/e-addressbook-table-adapter.c: fix the gnome-xml
- headers.
-
- * gui/widgets/e-addressbook-model.c
- (e_addressbook_model_class_init): use INT, not ENUM in the signal here.
-
- * gui/component/addressbook-config.c: another big gtk_* -> g_*
- renaming.
-
- * gui/component/addressbook.c: same.
-
- * gui/component/e-address-popup.c: same.
-
- * gui/component/e-address-widget.c: same.
-
- * gui/component/e-cardlist-model.c: fix the gnome-xml headers, and
- more gtk_* -> g_* renaming.
-
- * gui/component/addressbook-component.c (owner_set_cb): use
- evolution_shell_client_corba_objref as per ettore's change to
- EvolutionShellClient..
- (create_view): fix the call to bonobo_control_set_property.
- (create_component): gtk_signal_connect -> g_signal_connect.
-
- * gui/component/addressbook-storage.c: fix the gnome-xml
- headers.
- (addressbook_storage_setup): use
- evolution_shell_client_corba_objref as per ettore's change to
- EvolutionShellClient..
- (addressbook_get_other_contact_storage): gtk_signal_connect ->
- g_signal_connect.
- (load_source_data): root->childs -> root->childrens.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * gui/search/e-addressbook-search-dialog.c: fix some #include's.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (SUBDIRS): only build the backend and gui dirs for
- now. printing and conduits are no-man's land at present.
-
- * addressbook/gui/merging/e-card-merging.[ch]: Port to
- GObject/gnome2.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * gui/component/.cvsignore: ignore the new .server file.
-
- * gui/component/Makefile.am: typical port stuff. switch the .oaf
- to .server, and leave out a lot of libs so we can actually get
- things linking.
-
- * gui/component/GNOME_Evolution_Addressbook.server.in: rename
- .oaf.in here.
-
- * gui/component/addressbook-component.c: Port to GObject/gnome2.
-
- * gui/component/addressbook-config.c: Port to GObject/gnome2.
-
- * gui/component/addressbook-factory.c: Port to GObject/gnome2.
-
- * gui/component/addressbook-storage.c: Port to GObject/gnome2.
-
- * gui/component/addressbook.[ch]: Port to GObject/gnome2.
-
- * gui/component/e-address-popup.[ch]: Port to GObject/gnome2.
-
- * gui/component/e-address-widget.[ch]: Port to GObject/gnome2.
-
- * gui/component/e-cardlist-model.h: Port to GObject/gnome2.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-list-editor/.cvsignore: ignore the marshal generated
- stuff.
-
- * gui/contact-list-editor/Makefile.am: typical port stuff. add
- marshaller generation foo, dist it...
-
- * gui/contact-list-editor/e-contact-list-editor.[ch]: Port to
- GObject/gnome2.
-
- * gui/contact-list-editor/e-contact-list-model.[ch]: Port to
- GObject/gnome2.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * gui/contact-editor/.cvsignore: ignore the marshal generated
- stuff.
-
- * gui/contact-editor/Makefile.am: typical port stuff. add
- marshaller generation foo, dist it...
-
- * gui/contact-editor/e-contact-editor-address.[ch]: Port to GObject/gnome2.
-
- * gui/contact-editor/e-contact-editor-fullname.c: Port to GObject/gnome2.
-
- * gui/contact-editor/e-contact-editor.c: Port to GObject/gnome2.
-
- * gui/contact-editor/e-contact-quick-add.c: Port to GObject/gnome2.
-
- * gui/contact-editor/e-contact-save-as.[ch]: Port to GObject/gnome2.
-
- * gui/contact-editor/test-editor.c: Port to GObject/gnome2.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * gui/widgets/e-addressbook-model.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/e-addressbook-reflow-adapter.c: Port to
- GObject/gnome2.
-
- * gui/widgets/e-addressbook-table-adapter.c: Port to
- GObject/gnome2.
-
- * gui/widgets/e-addressbook-util.c: Port to GObject/gnome2.
-
- * gui/widgets/e-addressbook-view.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-control.c: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-label.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-view-widget.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-view.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-widget-test.c: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard-widget.c: Port to GObject/gnome2.
-
- * gui/widgets/e-minicard.[ch]: Port to GObject/gnome2.
-
- * gui/widgets/gal-view-factory-minicard.c: Port to GObject/gnome2.
-
- * gui/widgets/gal-view-minicard.c: Port to GObject/gnome2.
-
- * gui/widgets/test-minicard-label.c: Port to GObject/gnome2.
-
- * gui/widgets/test-minicard-view.c: Port to GObject/gnome2.
-
- * gui/widgets/test-minicard.c: Port to GObject/gnome2.
-
- * gui/widgets/test-reflow.c: Port to GObject/gnome2.
-
- * gui/widgets/Makefile.am: typical port stuff. add marshaller
- generation foo, dist it...
-
- * gui/widgets/.cvsignore: ignore the marshaller stuff.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * gui/component/select-names/e-simple-card-bonobo.[ch]: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names.[ch]: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-text-model.c: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-table-model.c: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-popup.[ch]: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-model.c: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-manager.[ch]: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-factory.c: Port to
- GObject/gnome2.
-
- * gui/component/select-names/e-select-names-completion.[ch]: Port
- to GObject/gnome2.
-
- * gui/component/select-names/e-select-names-bonobo.[ch]: Port to
- GObject/gnome2.
-
- * gui/component/select-names/Makefile.am: typical port stuff. add
- marshaller generation foo, dist it, and switch the .oaf to .server
-
- * gui/component/select-names/.cvsignore: ignore the marshaller
- stuff.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/.cvsignore: ignore the generated marshaller files.
-
- * backend/ebook/e-destination.c (e_destination_dispose): rename
- e_destination_destroy.
- (e_destination_equal): ifdef this out for now, PENDING_PORT_WORK.
- (e_destination_get_name): same.
- (e_destination_get_email): same.
- (e_destination_get_address): same.
- (e_destination_get_textrep): same.
-
- * backend/ebook/Makefile.am: don't build the executables
- (importers and loaders) for now. Also, s/oaf/server, and use
- INTLTOOL_SERVER_RULE.
-
- * backend/ebook/e-book-util.c (e_book_get_config_database):
- un-#ifdef this.
- (e_book_default_book_open): un-#ifdef ths code in here that relies
- on the e_config_listener.
-
-2002-11-05 Dan Winship <danw@ximian.com>
-
- * backend/pas/pas-backend-ldap.c (send_pending_adds): copy a
- memleak fix from pas-backend-ad.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-card.c: g_date_* => g_date_get_*, fixes
- G_DISABLE_DEPRECATED build.
-
- * backend/ebook/e-book-listener.[ch]: remove the servant crap i'd
- c&p'ed and put in here.
-
- * backend/ebook/e-book-view-listener.[ch]: remove the servant crap
- i'd c&p'ed and put in here.
-
- * backend/pas/pas-book-factory.[ch]: subclass from BonoboObject,
- and remove the servant crap from here too. whee.
-
- * backend/pas/pas-card-cursor.[ch]: remove the servant crap i'd
- c&p'ed and put in here.
-
- * backend/pas/pas-book.[ch]: remove the servant crap i'd c&p'ed
- and put in here.
-
- * backend/pas/pas-book-view.[ch]: remove the servant crap i'd
- c&p'ed and put in here.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * backend/pas/pas-backend-card-sexp.[ch]: port to gnome 2.
-
- * backend/pas/pas-backend-file.[ch]: same.
-
- * backend/pas/pas-backend-file.[ch]: same.
-
- * backend/pas/pas-backend-ldap.[ch]: same.
-
- * backend/pas/pas-backend-summary.[ch]: same.
-
- * backend/pas/pas-backend.[ch]: same.
-
- * backend/pas/pas-book-factory.[ch]: same.
-
- * backend/pas/pas-book-view.[ch]: same.
-
- * backend/pas/pas-book.[ch]: same.
-
- * backend/pas/pas-card-cursor.[ch]: same.
-
- * backend/pas/pas-marshal.list: list of marshallers.
-
- * backend/pas/Makefile.am (libpas_a_SOURCES): add pas-marshal.c
- also add the marshal building foo.
-
- * backend/pas/.cvsignore: ignore pas-marshal.[ch]
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/test-client-list.c (main): don't call
- bonobo_activation_init directly.
-
- * backend/ebook/test-client.c (get_card_cb): don't unref the card
- here since we never reffed it.
- (main): no need to call bonobo_activation_init, as
- gnome_program_init did it for us.
-
- * backend/ebook/e-card-simple.c (e_card_simple_get_property):
- s/g_value_{set,get}_pointer/g_value_{set,get}_object
-
- * backend/ebook/e-book-util.c (set_default_book_uri_local): make
- sure to terminate args with NULL for g_build_filename.
-
- * backend/ebook/e-book-listener.c: nuke e_book_listener_get_type
- and use the BONOBO_TYPE_FUNC_FULL macro.
-
- * backend/ebook/e-book-listener.h: add the epv to
- EBookListenerClass so BONOBO_TYPE_FUNC_FULL works.
-
- * backend/ebook/e-book-view-listener.c: nuke
- e_book_view_listener_get_type and use the BONOBO_TYPE_FUNC_FULL
- macro.
-
- * backend/ebook/e-book-view-listener.h: add the epv to
- EBookViewListenerClass so BONOBO_TYPE_FUNC_FULL works.
-
-2002-11-02 Chris Toshok <toshok@ximian.com>
-
- * backend/ebook/e-book-types.h: just include glib.h instead of the
- gtk stuff.
-
- * backend/ebook/e-book-listener.[ch]: convert to
- GObject/bonobo-activation/etc/etc.
- * e-book-util.[ch]: same.
- * e-book-view-listener.[ch]: same.
- * e-book-view.[ch]: same.
- * e-book.[ch]: same.
- * e-card-compare.[ch]: same.
- * e-card-cursor.[ch]: same.
- * e-card-simple.[ch]: same.
- * e-card.[ch]: same.
- * e-destination.[ch]: same.
- * evolution-ldif-importer.c: same.
- * evolution-vcard-importer.c: same.
- * load-gnomecard-addressbook.c: same.
- * load-pine-addressbok.c: same.
- * test-card.c: same.
- * test-client-list.c: same.
- * test-client.c: same.
-
- * backend/ebook/Makefile.am: add e-book-marshal.c to SOURCES, add
- e-book-marshal.[ch] to CLEANFILES, and add e-book-marshal.list to
- EXTRA_DIST. Also, remove the camel libs from the test LDADD's,
- and leave e-destination.[ch] out of the build.
-
- * backend/ebook/.cvsignore: ignore e-book-marshal.[ch]
-
- * backend/ebook/e-book-marshal.list: marshallers for e-book.
+ [ Should fixes bugs #30323, #33097, #33930, #33332 ]
+ * gui/contact-editor/e-contact-editor.c: unref the *@(&E(@
+ select_names_contacts object. fixes the very, very, very
+ longstanding crash when modifying the list of completion folders.
2002-10-28 Larry Ewing <lewing@ximian.com>
diff --git a/addressbook/backend/ebook/e-book-util.c b/addressbook/backend/ebook/e-book-util.c
index cc00d045f4..dac9022051 100644
--- a/addressbook/backend/ebook/e-book-util.c
+++ b/addressbook/backend/ebook/e-book-util.c
@@ -27,10 +27,12 @@
#include <config.h>
#include "e-book-util.h"
-#include <string.h>
-#include <glib.h>
-#include <glib-object.h>
-#include <e-util/e-config-listener.h>
+#include <gtk/gtkobject.h>
+#include <gtk/gtksignal.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-util.h>
+#include <bonobo/bonobo-listener.h>
+#include <bonobo/bonobo-event-source.h>
#include "e-card-compare.h"
typedef struct _CommonBookInfo CommonBookInfo;
@@ -55,7 +57,7 @@ e_book_expand_uri (const char *uri)
char *ret_val;
char *file_name;
- file_name = g_build_filename(uri + offset, "addressbook.db", NULL);
+ file_name = g_concat_dir_and_file(uri + offset, "addressbook.db");
ret_val = g_strdup_printf("file://%s", file_name);
g_free(file_name);
return ret_val;
@@ -73,27 +75,32 @@ got_uri_book_cb (EBook *book, EBookStatus status, gpointer closure)
if (status == E_BOOK_STATUS_SUCCESS) {
info->cb (book, info->closure);
} else {
- if (book)
- g_object_unref (book);
info->cb (NULL, info->closure);
}
g_free (info);
}
-void
+gboolean
e_book_load_address_book_by_uri (EBook *book, const char *uri, EBookCallback open_response, gpointer closure)
{
+ gboolean rv;
char *real_uri;
- g_return_if_fail (book != NULL);
- g_return_if_fail (E_IS_BOOK (book));
- g_return_if_fail (open_response != NULL);
+ g_return_val_if_fail (book != NULL, FALSE);
+ g_return_val_if_fail (E_IS_BOOK (book), FALSE);
+ g_return_val_if_fail (open_response != NULL, FALSE);
real_uri = e_book_expand_uri (uri);
- e_book_load_uri (book, real_uri, open_response, closure);
+ rv = e_book_load_uri (book, real_uri, open_response, closure);
+
+ if (!rv) {
+ g_warning ("Couldn't load addressbook %s", real_uri);
+ }
g_free (real_uri);
+
+ return rv;
}
void
@@ -109,16 +116,19 @@ e_book_use_address_book_by_uri (const char *uri, EBookCommonCallback cb, gpointe
info->closure = closure;
book = e_book_new ();
- e_book_load_address_book_by_uri (book, uri, got_uri_book_cb, info);
+ if (! e_book_load_address_book_by_uri (book, uri, got_uri_book_cb, info)) {
+ gtk_object_unref (GTK_OBJECT (book));
+ g_free (info);
+ }
}
-EConfigListener *
-e_book_get_config_database ()
+Bonobo_ConfigDatabase
+e_book_get_config_database (CORBA_Environment *ev)
{
- static EConfigListener *config_db;
+ static Bonobo_ConfigDatabase config_db;
if (config_db == NULL)
- config_db = e_config_listener_new ();
+ config_db = bonobo_get_object ("wombat:", "Bonobo/ConfigDatabase", ev);
return config_db;
}
@@ -136,7 +146,7 @@ got_default_book_cb (EBook *book, EBookStatus status, gpointer closure)
default book got loaded twice. */
if (common_default_book) {
- g_object_unref (book);
+ gtk_object_unref (GTK_OBJECT (book));
book = common_default_book;
}
@@ -147,8 +157,7 @@ got_default_book_cb (EBook *book, EBookStatus status, gpointer closure)
}
} else {
- if (book)
- g_object_unref (book);
+
info->cb (NULL, info->closure);
}
@@ -173,33 +182,22 @@ e_book_use_default_book (EBookCommonCallback cb, gpointer closure)
info->closure = closure;
book = e_book_new ();
- e_book_load_default_book (book, got_default_book_cb, info);
+ if (! e_book_load_default_book (book, got_default_book_cb, info)) {
+ gtk_object_unref (GTK_OBJECT (book));
+ g_free (info);
+ }
}
static char *default_book_uri;
-static char*
-get_local_book_uri (void)
-{
- char *filename;
- char *uri;
-
- filename = g_build_filename (g_get_home_dir(),
- "evolution/local/Contacts/addressbook.db",
- NULL);
- uri = g_strdup_printf ("file://%s", filename);
-
- g_free (filename);
-
- return uri;
-}
-
static void
set_default_book_uri_local (void)
{
- g_free (default_book_uri);
+ char *filename;
- default_book_uri = get_local_book_uri ();
+ filename = gnome_util_prepend_user_home ("evolution/local/Contacts/addressbook.db");
+ default_book_uri = g_strdup_printf ("file://%s", filename);
+ g_free (filename);
}
static void
@@ -217,33 +215,37 @@ set_default_book_uri (char *val)
}
}
-#define DEFAULT_CONTACTS_URI_PATH "/apps/evolution/shell/default_folders/contacts_uri"
static void
-default_folder_listener (EConfigListener *cl, const char *key, gpointer data)
+default_folder_listener (BonoboListener *listener, char *event_name,
+ CORBA_any *any, CORBA_Environment *ev,
+ gpointer user_data)
{
+ Bonobo_ConfigDatabase config_db;
char *val;
- if (strcmp (key, DEFAULT_CONTACTS_URI_PATH))
- return;
-
- val = e_config_listener_get_string (cl, DEFAULT_CONTACTS_URI_PATH);
+ config_db = e_book_get_config_database (ev);
+ val = bonobo_config_get_string (config_db, "/DefaultFolders/contacts_uri", ev);
set_default_book_uri (val);
}
static void
-set_default_book_uri_from_config_db (void)
+set_default_book_uri_from_bonobo_conf (void)
{
char *val;
- EConfigListener* config_db;
+ Bonobo_ConfigDatabase config_db;
+ CORBA_Environment ev;
- config_db = e_book_get_config_database ();
- val = e_config_listener_get_string_with_default (config_db, DEFAULT_CONTACTS_URI_PATH, NULL, NULL);
+ CORBA_exception_init (&ev);
+ config_db = e_book_get_config_database (&ev);
+ val = bonobo_config_get_string (config_db, "/DefaultFolders/contacts_uri", &ev);
- g_signal_connect (config_db,
- "key_changed",
- G_CALLBACK (default_folder_listener), NULL);
+ bonobo_event_source_client_add_listener (config_db, default_folder_listener,
+ "Bonobo/ConfigDatabase:change/DefaultFolders:contacts_uri",
+ NULL,
+ NULL);
+ CORBA_exception_free (&ev);
set_default_book_uri (val);
}
@@ -262,34 +264,28 @@ e_book_default_book_open (EBook *book, EBookStatus status, gpointer closure)
g_free (default_book_closure);
/* If there's a transient error, report it to the caller, but
- * if the old default folder has disappeared, fall back to the
- * local contacts folder instead, except when the default
- * folder is also the local folder.
+ * if the old default folder has disappeared, fall back to
+ * the local contacts folder instead.
*/
if (status == E_BOOK_STATUS_PROTOCOL_NOT_SUPPORTED ||
status == E_BOOK_STATUS_NO_SUCH_BOOK) {
- char *local_uri = get_local_book_uri();
- if (strcmp (local_uri, default_book_uri)) {
- set_default_book_uri_local ();
- e_book_load_default_book (book, user_response, user_closure);
- }
- else
- user_response (book, status, user_closure);
- g_free (local_uri);
+ set_default_book_uri_local ();
+ e_book_load_default_book (book, user_response, user_closure);
} else {
user_response (book, status, user_closure);
}
}
-void
+gboolean
e_book_load_default_book (EBook *book, EBookCallback open_response, gpointer closure)
{
- const char *uri;
+ char *uri;
+ gboolean rv;
DefaultBookClosure *default_book_closure;
- g_return_if_fail (book != NULL);
- g_return_if_fail (E_IS_BOOK (book));
- g_return_if_fail (open_response != NULL);
+ g_return_val_if_fail (book != NULL, FALSE);
+ g_return_val_if_fail (E_IS_BOOK (book), FALSE);
+ g_return_val_if_fail (open_response != NULL, FALSE);
uri = e_book_get_default_book_uri ();
@@ -298,16 +294,21 @@ e_book_load_default_book (EBook *book, EBookCallback open_response, gpointer clo
default_book_closure->closure = closure;
default_book_closure->open_response = open_response;
- e_book_load_uri (book, uri,
- e_book_default_book_open, default_book_closure);
+ rv = e_book_load_uri (book, uri,
+ e_book_default_book_open, default_book_closure);
+
+ if (!rv) {
+ g_warning ("Couldn't load default addressbook");
+ }
+ return rv;
}
-const char *
+char*
e_book_get_default_book_uri ()
{
if (!default_book_uri)
- set_default_book_uri_from_config_db ();
+ set_default_book_uri_from_bonobo_conf ();
return default_book_uri;
}
@@ -335,15 +336,15 @@ struct _SimpleQueryInfo {
static void
book_add_simple_query (EBook *book, SimpleQueryInfo *info)
{
- GList *pending = g_object_get_data (G_OBJECT(book), "sq_pending");
+ GList *pending = gtk_object_get_data (GTK_OBJECT (book), "sq_pending");
pending = g_list_prepend (pending, info);
- g_object_set_data (G_OBJECT (book), "sq_pending", pending);
+ gtk_object_set_data (GTK_OBJECT (book), "sq_pending", pending);
}
static SimpleQueryInfo *
book_lookup_simple_query (EBook *book, guint tag)
{
- GList *pending = g_object_get_data (G_OBJECT (book), "sq_pending");
+ GList *pending = gtk_object_get_data (GTK_OBJECT (book), "sq_pending");
while (pending) {
SimpleQueryInfo *sq = pending->data;
if (sq->tag == tag)
@@ -356,7 +357,7 @@ book_lookup_simple_query (EBook *book, guint tag)
static void
book_remove_simple_query (EBook *book, SimpleQueryInfo *info)
{
- GList *pending = g_object_get_data (G_OBJECT (book), "sq_pending");
+ GList *pending = gtk_object_get_data (GTK_OBJECT (book), "sq_pending");
GList *i;
for (i=pending; i != NULL; i = g_list_next (i)) {
@@ -366,17 +367,17 @@ book_remove_simple_query (EBook *book, SimpleQueryInfo *info)
break;
}
}
- g_object_set_data (G_OBJECT (book), "sq_pending", pending);
+ gtk_object_set_data (GTK_OBJECT (book), "sq_pending", pending);
}
static guint
book_issue_tag (EBook *book)
{
- gpointer ptr = g_object_get_data (G_OBJECT (book), "sq_tag");
+ gpointer ptr = gtk_object_get_data (GTK_OBJECT (book), "sq_tag");
guint tag = GPOINTER_TO_UINT (ptr);
if (tag == 0)
tag = 1;
- g_object_set_data (G_OBJECT (book), "sq_tag", GUINT_TO_POINTER (tag+1));
+ gtk_object_set_data (GTK_OBJECT (book), "sq_tag", GUINT_TO_POINTER (tag+1));
return tag;
}
@@ -387,7 +388,7 @@ simple_query_new (EBook *book, const char *query, EBookSimpleQueryCallback cb, g
sq->tag = book_issue_tag (book);
sq->book = book;
- g_object_ref (book);
+ gtk_object_ref (GTK_OBJECT (book));
sq->query = g_strdup (query);
sq->cb = cb;
sq->closure = closure;
@@ -403,17 +404,17 @@ static void
simple_query_disconnect (SimpleQueryInfo *sq)
{
if (sq->add_tag) {
- g_signal_handler_disconnect (sq->view, sq->add_tag);
+ gtk_signal_disconnect (GTK_OBJECT (sq->view), sq->add_tag);
sq->add_tag = 0;
}
if (sq->seq_complete_tag) {
- g_signal_handler_disconnect (sq->view, sq->seq_complete_tag);
+ gtk_signal_disconnect (GTK_OBJECT (sq->view), sq->seq_complete_tag);
sq->seq_complete_tag = 0;
}
if (sq->view) {
- g_object_unref (sq->view);
+ gtk_object_unref (GTK_OBJECT (sq->view));
sq->view = NULL;
}
}
@@ -429,9 +430,9 @@ simple_query_free (SimpleQueryInfo *sq)
g_free (sq->query);
if (sq->book)
- g_object_unref (sq->book);
+ gtk_object_unref (GTK_OBJECT (sq->book));
- g_list_foreach (sq->cards, (GFunc) g_object_unref, NULL);
+ g_list_foreach (sq->cards, (GFunc) gtk_object_unref, NULL);
g_list_free (sq->cards);
g_free (sq);
@@ -446,7 +447,7 @@ simple_query_card_added_cb (EBookView *view, const GList *cards, gpointer closur
return;
sq->cards = g_list_concat (sq->cards, g_list_copy ((GList *) cards));
- g_list_foreach ((GList *) cards, (GFunc) g_object_ref, NULL);
+ g_list_foreach ((GList *) cards, (GFunc) gtk_object_ref, NULL);
}
static void
@@ -480,12 +481,16 @@ simple_query_book_view_cb (EBook *book, EBookStatus status, EBookView *book_view
}
sq->view = book_view;
- g_object_ref (book_view);
+ gtk_object_ref (GTK_OBJECT (book_view));
- sq->add_tag = g_signal_connect (sq->view, "card_added",
- G_CALLBACK (simple_query_card_added_cb), sq);
- sq->seq_complete_tag = g_signal_connect (sq->view, "sequence_complete",
- G_CALLBACK (simple_query_sequence_complete_cb), sq);
+ sq->add_tag = gtk_signal_connect (GTK_OBJECT (sq->view),
+ "card_added",
+ GTK_SIGNAL_FUNC (simple_query_card_added_cb),
+ sq);
+ sq->seq_complete_tag = gtk_signal_connect (GTK_OBJECT (sq->view),
+ "sequence_complete",
+ GTK_SIGNAL_FUNC (simple_query_sequence_complete_cb),
+ sq);
}
guint
@@ -783,26 +788,3 @@ e_book_query_address_default (const gchar *email,
e_book_use_default_book (have_address_book_open_cb, info);
}
-
-/* bad place for this i know. */
-int
-e_utf8_casefold_collate_len (const gchar *str1, const gchar *str2, int len)
-{
- gchar *s1 = g_utf8_casefold(str1, len);
- gchar *s2 = g_utf8_casefold(str2, len);
- int rv;
-
- rv = g_utf8_collate (s1, s2);
-
- g_free (s1);
- g_free (s2);
-
- return rv;
-}
-
-int
-e_utf8_casefold_collate (const gchar *str1, const gchar *str2)
-{
- return e_utf8_casefold_collate_len (str1, str2, -1);
-}
-
diff --git a/addressbook/backend/ebook/e-card-simple.c b/addressbook/backend/ebook/e-card-simple.c
index db008011cd..daab2f211c 100644
--- a/addressbook/backend/ebook/e-card-simple.c
+++ b/addressbook/backend/ebook/e-card-simple.c
@@ -13,19 +13,19 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <bonobo/bonobo-i18n.h>
+#include <gtk/gtkobject.h>
+#include <gal/util/e-unicode-i18n.h>
#include <gal/util/e-util.h>
#include <libversit/vcc.h>
#include "e-card-simple.h"
-/* Object property IDs */
+/* Object argument IDs */
enum {
- PROP_0,
- PROP_CARD,
+ ARG_0,
+ ARG_CARD,
};
-static GObjectClass *parent_class;
typedef enum _ECardSimpleInternalType ECardSimpleInternalType;
typedef struct _ECardSimpleFieldData ECardSimpleFieldData;
@@ -115,9 +115,9 @@ static int field_data_count = sizeof (field_data) / sizeof (field_data[0]);
static void e_card_simple_init (ECardSimple *simple);
static void e_card_simple_class_init (ECardSimpleClass *klass);
-static void e_card_simple_dispose (GObject *object);
-static void e_card_simple_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_card_simple_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
+static void e_card_simple_destroy (GtkObject *object);
+static void e_card_simple_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
+static void e_card_simple_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
static void fill_in_info(ECardSimple *simple);
@@ -208,25 +208,24 @@ char *address_names[] = {
*
* Return value: The type ID of the &ECardSimple class.
**/
-GType
+GtkType
e_card_simple_get_type (void)
{
- static GType simple_type = 0;
+ static GtkType simple_type = 0;
if (!simple_type) {
- static const GTypeInfo simple_info = {
- sizeof (ECardSimpleClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_card_simple_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ GtkTypeInfo simple_info = {
+ "ECardSimple",
sizeof (ECardSimple),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_card_simple_init,
+ sizeof (ECardSimpleClass),
+ (GtkClassInitFunc) e_card_simple_class_init,
+ (GtkObjectInitFunc) e_card_simple_init,
+ NULL, /* reserved_1 */
+ NULL, /* reserved_2 */
+ (GtkClassInitFunc) NULL
};
- simple_type = g_type_register_static (G_TYPE_OBJECT, "ECardSimple", &simple_info, 0);
+ simple_type = gtk_type_unique (gtk_object_get_type (), &simple_info);
}
return simple_type;
@@ -241,10 +240,10 @@ e_card_simple_get_type (void)
ECardSimple *
e_card_simple_new (ECard *card)
{
- ECardSimple *simple = g_object_new (E_TYPE_CARD_SIMPLE, NULL);
- g_object_set(simple,
- "card", card,
- NULL);
+ ECardSimple *simple = E_CARD_SIMPLE(gtk_type_new(e_card_simple_get_type()));
+ gtk_object_set(GTK_OBJECT(simple),
+ "card", card,
+ NULL);
return simple;
}
@@ -320,22 +319,16 @@ e_card_simple_get_vcard_assume_utf8 (ECardSimple *simple)
static void
e_card_simple_class_init (ECardSimpleClass *klass)
{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS(klass);
+ GtkObjectClass *object_class;
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
+ object_class = GTK_OBJECT_CLASS(klass);
- object_class->dispose = e_card_simple_dispose;
- object_class->get_property = e_card_simple_get_property;
- object_class->set_property = e_card_simple_set_property;
+ gtk_object_add_arg_type ("ECardSimple::card",
+ GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_CARD);
- g_object_class_install_property (object_class, PROP_CARD,
- g_param_spec_object ("card",
- _("ECard"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_CARD,
- G_PARAM_READWRITE));
+ object_class->destroy = e_card_simple_destroy;
+ object_class->get_arg = e_card_simple_get_arg;
+ object_class->set_arg = e_card_simple_set_arg;
}
/*
@@ -343,103 +336,73 @@ e_card_simple_class_init (ECardSimpleClass *klass)
*/
static void
-e_card_simple_dispose (GObject *object)
+e_card_simple_destroy (GtkObject *object)
{
ECardSimple *simple;
int i;
simple = E_CARD_SIMPLE (object);
- if (simple->card) {
- g_object_unref(simple->card);
- simple->card = NULL;
- }
- if (simple->temp_fields) {
- g_list_foreach(simple->temp_fields, (GFunc) g_free, NULL);
- g_list_free(simple->temp_fields);
- simple->temp_fields = NULL;
- }
-
- for(i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i++) {
- if (simple->phone[i]) {
- e_card_phone_unref (simple->phone[i]);
- simple->phone[i] = NULL;
- }
- }
- for(i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i++) {
- if (simple->email[i]) {
- g_free(simple->email[i]);
- simple->email[i] = NULL;
- }
- }
- for(i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) {
- if (simple->address[i]) {
- e_card_address_label_unref(simple->address[i]);
- simple->address[i] = NULL;
- }
- }
- for(i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) {
- if (simple->delivery[i]) {
- e_card_delivery_address_unref(simple->delivery[i]);
- simple->delivery[i] = NULL;
- }
- }
+ if (simple->card)
+ gtk_object_unref(GTK_OBJECT(simple->card));
+ g_list_foreach(simple->temp_fields, (GFunc) g_free, NULL);
+ g_list_free(simple->temp_fields);
+ simple->temp_fields = NULL;
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ for(i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i++)
+ e_card_phone_unref (simple->phone[i]);
+ for(i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i++)
+ g_free(simple->email[i]);
+ for(i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++)
+ e_card_address_label_unref(simple->address[i]);
+ for(i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++)
+ e_card_delivery_address_unref(simple->delivery[i]);
}
/* Set_arg handler for the simple */
static void
-e_card_simple_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+e_card_simple_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
ECardSimple *simple;
simple = E_CARD_SIMPLE (object);
- switch (prop_id) {
- case PROP_CARD:
+ switch (arg_id) {
+ case ARG_CARD:
if (simple->card)
- g_object_unref(simple->card);
+ gtk_object_unref(GTK_OBJECT(simple->card));
g_list_foreach(simple->temp_fields, (GFunc) g_free, NULL);
g_list_free(simple->temp_fields);
simple->temp_fields = NULL;
- if (g_value_get_object (value))
- simple->card = E_CARD(g_value_get_object (value));
+ if (GTK_VALUE_OBJECT(*arg))
+ simple->card = E_CARD(GTK_VALUE_OBJECT(*arg));
else
simple->card = NULL;
if(simple->card)
- g_object_ref(simple->card);
+ gtk_object_ref(GTK_OBJECT(simple->card));
fill_in_info(simple);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ return;
}
}
/* Get_arg handler for the simple */
static void
-e_card_simple_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+e_card_simple_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
ECardSimple *simple;
simple = E_CARD_SIMPLE (object);
- switch (prop_id) {
- case PROP_CARD:
+ switch (arg_id) {
+ case ARG_CARD:
e_card_simple_sync_card(simple);
- g_value_set_object (value, simple->card);
+ GTK_VALUE_OBJECT (*arg) = (GtkObject *) simple->card;
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ arg->type = GTK_TYPE_INVALID;
break;
}
}
@@ -481,12 +444,12 @@ fill_in_info(ECardSimple *simple)
EIterator *iterator;
- g_object_get(card,
- "address_label", &address_list,
- "address", &delivery_list,
- "phone", &phone_list,
- "email", &email_list,
- NULL);
+ gtk_object_get(GTK_OBJECT(card),
+ "address_label", &address_list,
+ "address", &delivery_list,
+ "phone", &phone_list,
+ "email", &email_list,
+ NULL);
for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i++) {
e_card_phone_unref(simple->phone[i]);
simple->phone[i] = NULL;
@@ -510,7 +473,7 @@ fill_in_info(ECardSimple *simple)
}
}
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
for (i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i++) {
g_free(simple->email[i]);
@@ -525,7 +488,7 @@ fill_in_info(ECardSimple *simple)
}
}
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) {
e_card_address_label_unref(simple->address[i]);
@@ -540,7 +503,7 @@ fill_in_info(ECardSimple *simple)
}
}
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) {
e_card_delivery_address_unref(simple->delivery[i]);
@@ -555,7 +518,7 @@ fill_in_info(ECardSimple *simple)
}
}
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
e_card_free_empty_lists (card);
}
}
@@ -577,12 +540,12 @@ e_card_simple_sync_card(ECardSimple *simple)
EIterator *iterator;
- g_object_get(card,
- "address_label", &address_list,
- "address", &delivery_list,
- "phone", &phone_list,
- "email", &email_list,
- NULL);
+ gtk_object_get(GTK_OBJECT(card),
+ "address_label", &address_list,
+ "address", &delivery_list,
+ "phone", &phone_list,
+ "email", &email_list,
+ NULL);
for (iterator = e_list_get_iterator(phone_list); e_iterator_is_valid(iterator); e_iterator_next(iterator) ) {
int i;
@@ -622,7 +585,7 @@ e_card_simple_sync_card(ECardSimple *simple)
}
}
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
for (i = 0; i < E_CARD_SIMPLE_PHONE_ID_LAST; i ++) {
if (simple->phone[i]) {
simple->phone[i]->flags = phone_correspondences[i];
@@ -648,7 +611,7 @@ e_card_simple_sync_card(ECardSimple *simple)
}
}
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
for (i = 0; i < E_CARD_SIMPLE_EMAIL_ID_LAST; i ++) {
if (simple->email[i]) {
e_list_append(email_list, simple->email[i]);
@@ -677,7 +640,7 @@ e_card_simple_sync_card(ECardSimple *simple)
}
}
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++) {
if (simple->address[i]) {
simple->address[i]->flags &= ~E_CARD_ADDR_MASK;
@@ -708,7 +671,7 @@ e_card_simple_sync_card(ECardSimple *simple)
}
}
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i ++) {
if (simple->delivery[i]) {
simple->delivery[i]->flags &= ~E_CARD_ADDR_MASK;
@@ -783,8 +746,6 @@ void e_card_simple_set_delivery_address (ECardSimple *simple
{
e_card_delivery_address_unref(simple->delivery[id]);
simple->delivery[id] = e_card_delivery_address_ref(delivery);
- e_card_address_label_unref(simple->address[id]);
- simple->address[id] = e_card_delivery_address_to_label(simple->delivery[id]);
simple->changed = TRUE;
}
@@ -809,17 +770,17 @@ char *e_card_simple_get (ECardSimple *simple,
switch(type) {
case E_CARD_SIMPLE_INTERNAL_TYPE_STRING:
if (simple->card) {
- g_object_get(simple->card,
- field_data[field].ecard_field, &string,
- NULL);
+ gtk_object_get(GTK_OBJECT(simple->card),
+ field_data[field].ecard_field, &string,
+ NULL);
return g_strdup(string);
} else
return NULL;
case E_CARD_SIMPLE_INTERNAL_TYPE_DATE:
if (simple->card) {
- g_object_get(simple->card,
- field_data[field].ecard_field, &date,
- NULL);
+ gtk_object_get(GTK_OBJECT(simple->card),
+ field_data[field].ecard_field, &date,
+ NULL);
if (date != NULL) {
char buf[26];
struct tm then;
@@ -857,9 +818,9 @@ char *e_card_simple_get (ECardSimple *simple,
case E_CARD_SIMPLE_INTERNAL_TYPE_BOOL:
if (simple->card) {
gboolean boole;
- g_object_get (simple->card,
- field_data[field].ecard_field, &boole,
- NULL);
+ gtk_object_get (GTK_OBJECT (simple->card),
+ field_data[field].ecard_field, &boole,
+ NULL);
if (boole)
return g_strdup("true");
else
@@ -873,19 +834,19 @@ char *e_card_simple_get (ECardSimple *simple,
if (simple->card) {
gboolean is_list;
- g_object_get(simple->card,
- "file_as", &string,
- NULL);
+ gtk_object_get(GTK_OBJECT(simple->card),
+ "file_as", &string,
+ NULL);
if (string && *string)
return g_strdup(string);
- g_object_get(simple->card,
- "full_name", &string,
- NULL);
+ gtk_object_get(GTK_OBJECT(simple->card),
+ "full_name", &string,
+ NULL);
if (string && *string)
return g_strdup(string);
- g_object_get(simple->card,
- "org", &string,
- NULL);
+ gtk_object_get(GTK_OBJECT(simple->card),
+ "org", &string,
+ NULL);
if (string && *string)
return g_strdup(string);
is_list = e_card_evolution_list (simple->card);
@@ -899,33 +860,33 @@ char *e_card_simple_get (ECardSimple *simple,
return NULL;
case E_CARD_SIMPLE_FIELD_FAMILY_NAME:
if (simple->card) {
- g_object_get (simple->card,
- "name", &name,
- NULL);
+ gtk_object_get (GTK_OBJECT(simple->card),
+ "name", &name,
+ NULL);
return g_strdup (name->family);
} else
return NULL;
case E_CARD_SIMPLE_FIELD_GIVEN_NAME:
if (simple->card) {
- g_object_get (simple->card,
- "name", &name,
- NULL);
+ gtk_object_get (GTK_OBJECT(simple->card),
+ "name", &name,
+ NULL);
return g_strdup (name->given);
} else
return NULL;
case E_CARD_SIMPLE_FIELD_ADDITIONAL_NAME:
if (simple->card) {
- g_object_get (simple->card,
- "name", &name,
- NULL);
+ gtk_object_get (GTK_OBJECT(simple->card),
+ "name", &name,
+ NULL);
return g_strdup (name->additional);
} else
return NULL;
case E_CARD_SIMPLE_FIELD_NAME_SUFFIX:
if (simple->card) {
- g_object_get (simple->card,
- "name", &name,
- NULL);
+ gtk_object_get (GTK_OBJECT(simple->card),
+ "name", &name,
+ NULL);
return g_strdup (name->suffix);
} else
return NULL;
@@ -1001,9 +962,9 @@ file_as_get_style (ECardSimple *simple)
if (!company)
company = g_strdup("");
if (filestring) {
- g_object_get (simple->card,
- "name", &name,
- NULL);
+ gtk_object_get (GTK_OBJECT (simple->card),
+ "name", &name,
+ NULL);
if (!name) {
goto end;
@@ -1039,9 +1000,9 @@ file_as_set_style(ECardSimple *simple, int style)
if (!company)
company = g_strdup("");
- g_object_get (simple->card,
- "name", &name,
- NULL);
+ gtk_object_get (GTK_OBJECT (simple->card),
+ "name", &name,
+ NULL);
if (name) {
string = name_to_style(name, company, style);
e_card_simple_set(simple, E_CARD_SIMPLE_FIELD_FILE_AS, string);
@@ -1064,17 +1025,17 @@ void e_card_simple_set (ECardSimple *simple,
case E_CARD_SIMPLE_FIELD_FULL_NAME:
case E_CARD_SIMPLE_FIELD_ORG:
style = file_as_get_style(simple);
- g_object_set(simple->card,
- field_data[field].ecard_field, data,
- NULL);
+ gtk_object_set(GTK_OBJECT(simple->card),
+ field_data[field].ecard_field, data,
+ NULL);
file_as_set_style(simple, style);
break;
default:
switch(type) {
case E_CARD_SIMPLE_INTERNAL_TYPE_STRING:
- g_object_set(simple->card,
- field_data[field].ecard_field, data,
- NULL);
+ gtk_object_set(GTK_OBJECT(simple->card),
+ field_data[field].ecard_field, data,
+ NULL);
break;
case E_CARD_SIMPLE_INTERNAL_TYPE_DATE:
break; /* FIXME!!!! */
@@ -1108,9 +1069,9 @@ void e_card_simple_set (ECardSimple *simple,
boole = FALSE;
else if (!strcasecmp (data, "false"))
boole = FALSE;
- g_object_set (simple->card,
- field_data[field].ecard_field, boole,
- NULL);
+ gtk_object_set (GTK_OBJECT (simple->card),
+ field_data[field].ecard_field, boole,
+ NULL);
}
break;
}
@@ -1150,7 +1111,7 @@ const char *e_card_simple_get_ecard_field (ECardSimple *simple,
const char *e_card_simple_get_name (ECardSimple *simple,
ECardSimpleField field)
{
- return _(field_data[field].name);
+ return U_(field_data[field].name);
}
gboolean
@@ -1181,7 +1142,7 @@ e_card_simple_get_allow_newlines (ECardSimple *simple,
const char *e_card_simple_get_short_name (ECardSimple *simple,
ECardSimpleField field)
{
- return _(field_data[field].short_name);
+ return U_(field_data[field].short_name);
}
void e_card_simple_arbitrary_foreach (ECardSimple *simple,
@@ -1191,9 +1152,9 @@ void e_card_simple_arbitrary_foreach (ECardSimple
if (simple->card) {
EList *list;
EIterator *iterator;
- g_object_get(simple->card,
- "arbitrary", &list,
- NULL);
+ gtk_object_get(GTK_OBJECT(simple->card),
+ "arbitrary", &list,
+ NULL);
for (iterator = e_list_get_iterator(list); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
const ECardArbitrary *arbitrary = e_iterator_get(iterator);
if (callback)
@@ -1209,9 +1170,9 @@ const ECardArbitrary *e_card_simple_get_arbitrary (ECardSimple *sim
if (simple->card) {
EList *list;
EIterator *iterator;
- g_object_get(simple->card,
- "arbitrary", &list,
- NULL);
+ gtk_object_get(GTK_OBJECT(simple->card),
+ "arbitrary", &list,
+ NULL);
for (iterator = e_list_get_iterator(list); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
const ECardArbitrary *arbitrary = e_iterator_get(iterator);
if (!strcasecmp(arbitrary->key, key))
@@ -1234,9 +1195,9 @@ void e_card_simple_set_arbitrary (ECardSimple *sim
EIterator *iterator;
simple->changed = TRUE;
- g_object_get(simple->card,
- "arbitrary", &list,
- NULL);
+ gtk_object_get(GTK_OBJECT(simple->card),
+ "arbitrary", &list,
+ NULL);
for (iterator = e_list_get_iterator(list); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
const ECardArbitrary *arbitrary = e_iterator_get(iterator);
if (!strcasecmp(arbitrary->key, key)) {
@@ -1263,9 +1224,9 @@ e_card_simple_set_name (ECardSimple *simple, ECardName *name)
{
int style;
style = file_as_get_style(simple);
- g_object_set (simple->card,
- "name", name,
- NULL);
+ gtk_object_set (GTK_OBJECT (simple->card),
+ "name", name,
+ NULL);
file_as_set_style(simple, style);
}
diff --git a/addressbook/backend/ebook/e-card-simple.h b/addressbook/backend/ebook/e-card-simple.h
index 868d4e1573..b2b5147f3d 100644
--- a/addressbook/backend/ebook/e-card-simple.h
+++ b/addressbook/backend/ebook/e-card-simple.h
@@ -13,18 +13,17 @@
#define __E_CARD_SIMPLE_H__
#include <time.h>
-#include <glib-object.h>
+#include <gtk/gtk.h>
#include <stdio.h>
#include <ebook/e-card.h>
#include <ebook/e-card-types.h>
#include <e-util/e-list.h>
#define E_TYPE_CARD_SIMPLE (e_card_simple_get_type ())
-#define E_CARD_SIMPLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CARD_SIMPLE, ECardSimple))
-#define E_CARD_SIMPLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CARD_SIMPLE, ECardSimpleClass))
-#define E_IS_CARD_SIMPLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CARD_SIMPLE))
-#define E_IS_CARD_SIMPLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CARD_SIMPLE))
-#define E_CARD_SIMPLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_CARD_SIMPLE, ECardSimpleClass))
+#define E_CARD_SIMPLE(obj) (GTK_CHECK_CAST ((obj), E_TYPE_CARD_SIMPLE, ECardSimple))
+#define E_CARD_SIMPLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_CARD_SIMPLE, ECardSimpleClass))
+#define E_IS_CARD_SIMPLE(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_CARD_SIMPLE))
+#define E_IS_CARD_SIMPLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_CARD_SIMPLE))
typedef enum _ECardSimplePhoneId ECardSimplePhoneId;
typedef enum _ECardSimpleEmailId ECardSimpleEmailId;
@@ -139,7 +138,7 @@ typedef struct _ECardSimple ECardSimple;
typedef struct _ECardSimpleClass ECardSimpleClass;
struct _ECardSimple {
- GObject object;
+ GtkObject object;
ECard *card;
GList *temp_fields;
@@ -153,7 +152,7 @@ struct _ECardSimple {
};
struct _ECardSimpleClass {
- GObjectClass parent_class;
+ GtkObjectClass parent_class;
};
typedef void (*ECardSimpleArbitraryCallback) (const ECardArbitrary *arbitrary, gpointer closure);
@@ -227,7 +226,8 @@ ECardSimpleField e_card_simple_map_phone_to_field (ECardSimplePho
ECardSimpleField e_card_simple_map_email_to_field (ECardSimpleEmailId email_id);
ECardSimpleField e_card_simple_map_address_to_field (ECardSimpleAddressId address_id);
-GType e_card_simple_get_type (void);
+/* Standard Gtk function */
+GtkType e_card_simple_get_type (void);
#endif /* ! __E_CARD_SIMPLE_H__ */
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index 945888dad7..9c77ab6a4b 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -12,6 +12,7 @@
#include "e-card.h"
+#include <gal/util/e-i18n.h>
#include <gal/widgets/e-unicode.h>
#include <ctype.h>
@@ -21,13 +22,15 @@
#include <time.h>
#include <math.h>
-#include <bonobo/bonobo-i18n.h>
+#include <gtk/gtkobject.h>
+#include <bonobo/bonobo-object-client.h>
#include <gal/util/e-util.h>
#include <libversit/vcc.h>
#include "e-util/ename/e-name-western.h"
#include "e-util/ename/e-address-western.h"
#include "e-book.h"
+#include "e-destination.h"
#define is_a_prop_of(obj,prop) (isAPropertyOf ((obj),(prop)))
#define str_val(obj) (the_str = (vObjectValueType (obj))? fakeCString (vObjectUStringZValue (obj)) : calloc (1, 1))
@@ -39,55 +42,53 @@
#define XEV_LIST_SHOW_ADDRESSES "X-EVOLUTION-LIST-SHOW_ADDRESSES"
#define XEV_RELATED_CONTACTS "X-EVOLUTION-RELATED_CONTACTS"
-/* Object property IDs */
+/* Object argument IDs */
enum {
- PROP_0,
- PROP_FILE_AS,
- PROP_FULL_NAME,
- PROP_NAME,
- PROP_ADDRESS,
- PROP_ADDRESS_LABEL,
- PROP_PHONE,
- PROP_EMAIL,
- PROP_BIRTH_DATE,
- PROP_URL,
- PROP_ORG,
- PROP_ORG_UNIT,
- PROP_OFFICE,
- PROP_TITLE,
- PROP_ROLE,
- PROP_MANAGER,
- PROP_ASSISTANT,
- PROP_NICKNAME,
- PROP_SPOUSE,
- PROP_ANNIVERSARY,
- PROP_MAILER,
- PROP_CALURI,
- PROP_FBURL,
- PROP_ICSCALENDAR,
- PROP_NOTE,
- PROP_RELATED_CONTACTS,
- PROP_CATEGORIES,
- PROP_CATEGORY_LIST,
- PROP_WANTS_HTML,
- PROP_WANTS_HTML_SET,
- PROP_EVOLUTION_LIST,
- PROP_EVOLUTION_LIST_SHOW_ADDRESSES,
- PROP_ARBITRARY,
- PROP_ID,
- PROP_LAST_USE,
- PROP_USE_SCORE,
+ ARG_0,
+ ARG_FILE_AS,
+ ARG_FULL_NAME,
+ ARG_NAME,
+ ARG_ADDRESS,
+ ARG_ADDRESS_LABEL,
+ ARG_PHONE,
+ ARG_EMAIL,
+ ARG_BIRTH_DATE,
+ ARG_URL,
+ ARG_ORG,
+ ARG_ORG_UNIT,
+ ARG_OFFICE,
+ ARG_TITLE,
+ ARG_ROLE,
+ ARG_MANAGER,
+ ARG_ASSISTANT,
+ ARG_NICKNAME,
+ ARG_SPOUSE,
+ ARG_ANNIVERSARY,
+ ARG_MAILER,
+ ARG_CALURI,
+ ARG_FBURL,
+ ARG_ICSCALENDAR,
+ ARG_NOTE,
+ ARG_RELATED_CONTACTS,
+ ARG_CATEGORIES,
+ ARG_CATEGORY_LIST,
+ ARG_WANTS_HTML,
+ ARG_WANTS_HTML_SET,
+ ARG_EVOLUTION_LIST,
+ ARG_EVOLUTION_LIST_SHOW_ADDRESSES,
+ ARG_ARBITRARY,
+ ARG_ID,
+ ARG_LAST_USE,
+ ARG_USE_SCORE,
};
-static GObjectClass *parent_class;
-
static void parse(ECard *card, VObject *vobj, char *default_charset);
static void e_card_init (ECard *card);
static void e_card_class_init (ECardClass *klass);
-static void e_card_dispose (GObject *object);
-static void e_card_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_card_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
+static void e_card_destroy (GtkObject *object);
+static void e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
+static void e_card_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
static void assign_string(VObject *vobj, char *default_charset, char **string);
@@ -182,25 +183,24 @@ struct {
*
* Return value: The type ID of the &ECard class.
**/
-GType
+GtkType
e_card_get_type (void)
{
- static GType card_type = 0;
+ static GtkType card_type = 0;
if (!card_type) {
- static const GTypeInfo card_info = {
- sizeof (ECardClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_card_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ GtkTypeInfo card_info = {
+ "ECard",
sizeof (ECard),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_card_init,
+ sizeof (ECardClass),
+ (GtkClassInitFunc) e_card_class_init,
+ (GtkObjectInitFunc) e_card_init,
+ NULL, /* reserved_1 */
+ NULL, /* reserved_2 */
+ (GtkClassInitFunc) NULL
};
- card_type = g_type_register_static (G_TYPE_OBJECT, "ECard", &card_info, 0);
+ card_type = gtk_type_unique (gtk_object_get_type (), &card_info);
}
return card_type;
@@ -209,7 +209,7 @@ e_card_get_type (void)
ECard *
e_card_new_with_default_charset (char *vcard, char *default_charset)
{
- ECard *card = g_object_new (E_TYPE_CARD, NULL);
+ ECard *card = E_CARD(gtk_type_new(e_card_get_type()));
VObject *vobj = Parse_MIME(vcard, strlen(vcard));
while(vobj) {
VObject *next;
@@ -248,7 +248,7 @@ e_card_duplicate(ECard *card)
if (card->book) {
new_card->book = card->book;
- g_object_ref (new_card->book);
+ gtk_object_ref (GTK_OBJECT (new_card->book));
}
return new_card;
@@ -282,7 +282,7 @@ e_card_get_use_score(ECard *card)
e_card_get_today (&today);
g_date_set_dmy (&last_use, card->last_use->day, card->last_use->month, card->last_use->year);
- days_since_last_use = g_date_get_julian (&today) - g_date_get_julian (&last_use);
+ days_since_last_use = g_date_julian (&today) - g_date_julian (&last_use);
/* Apply a seven-day "grace period" to the use score decay. */
days_since_last_use -= 7;
@@ -306,9 +306,9 @@ e_card_touch(ECard *card)
if (card->last_use == NULL)
card->last_use = g_new (ECardDate, 1);
- card->last_use->day = g_date_get_day (&today);
- card->last_use->month = g_date_get_month (&today);
- card->last_use->year = g_date_get_year (&today);
+ card->last_use->day = g_date_day (&today);
+ card->last_use->month = g_date_month (&today);
+ card->last_use->year = g_date_year (&today);
card->raw_use_score = use_score + 1.0;
}
@@ -360,10 +360,10 @@ e_card_set_book (ECard *card, EBook *book)
g_return_if_fail (card && E_IS_CARD (card));
if (card->book)
- g_object_unref (card->book);
+ gtk_object_unref (GTK_OBJECT (card->book));
card->book = book;
if (card->book)
- g_object_ref (card->book);
+ gtk_object_ref (GTK_OBJECT (card->book));
}
gchar *
@@ -543,7 +543,7 @@ e_card_get_vobject (const ECard *card, gboolean assumeUTF8)
if (!(is_ascii || assumeUTF8))
addPropValue (addressprop, "CHARSET", "UTF-8");
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
}
if ( card->address_label ) {
@@ -558,7 +558,7 @@ e_card_get_vobject (const ECard *card, gboolean assumeUTF8)
set_address_flags (labelprop, address_label->flags);
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
}
if ( card->phone ) {
@@ -570,7 +570,7 @@ e_card_get_vobject (const ECard *card, gboolean assumeUTF8)
set_phone_flags (phoneprop, phone->flags);
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
}
if ( card->email ) {
@@ -580,7 +580,7 @@ e_card_get_vobject (const ECard *card, gboolean assumeUTF8)
emailprop = ADD_PROP_VALUE(vobj, VCEmailAddressProp, (char *) e_iterator_get(iterator));
addProp (emailprop, VCInternetProp);
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
}
if ( card->bday ) {
@@ -834,9 +834,9 @@ parse_email(ECard *card, VObject *vobj, char *default_charset)
EList *list;
assign_string(vobj, default_charset, &next_email);
- g_object_get(card,
- "email", &list,
- NULL);
+ gtk_object_get(GTK_OBJECT(card),
+ "email", &list,
+ NULL);
e_list_append(list, next_email);
g_free (next_email);
}
@@ -864,9 +864,9 @@ parse_phone(ECard *card, VObject *vobj, char *default_charset)
assign_string(vobj, default_charset, &(next_phone->number));
next_phone->flags = get_phone_flags(vobj);
- g_object_get(card,
- "phone", &list,
- NULL);
+ gtk_object_get(GTK_OBJECT(card),
+ "phone", &list,
+ NULL);
e_list_append(list, next_phone);
e_card_phone_unref (next_phone);
}
@@ -886,9 +886,9 @@ parse_address(ECard *card, VObject *vobj, char *default_charset)
next_addr->code = e_v_object_get_child_value (vobj, VCPostalCodeProp, default_charset);
next_addr->country = e_v_object_get_child_value (vobj, VCCountryNameProp, default_charset);
- g_object_get(card,
- "address", &list,
- NULL);
+ gtk_object_get(GTK_OBJECT(card),
+ "address", &list,
+ NULL);
e_list_append(list, next_addr);
e_card_delivery_address_unref (next_addr);
}
@@ -902,9 +902,9 @@ parse_address_label(ECard *card, VObject *vobj, char *default_charset)
next_addr->flags = get_address_flags (vobj);
assign_string(vobj, default_charset, &next_addr->data);
- g_object_get(card,
- "address_label", &list,
- NULL);
+ gtk_object_get(GTK_OBJECT(card),
+ "address_label", &list,
+ NULL);
e_list_append(list, next_addr);
e_card_address_label_unref (next_addr);
}
@@ -1063,7 +1063,7 @@ add_list_unique(ECard *card, EList *list, char *string)
e_list_append(list, temp);
}
g_free(temp);
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
}
static void
@@ -1073,9 +1073,9 @@ do_parse_categories(ECard *card, char *str)
char *copy = g_new(char, length + 1);
int i, j;
EList *list;
- g_object_get(card,
- "category_list", &list,
- NULL);
+ gtk_object_get(GTK_OBJECT(card),
+ "category_list", &list,
+ NULL);
for (i = 0, j = 0; str[i]; i++, j++) {
switch (str[i]) {
case '\\':
@@ -1198,9 +1198,9 @@ parse_arbitrary(ECard *card, VObject *vobj, char *default_charset)
assign_string(vobj, default_charset, &(arbitrary->value));
- g_object_get(card,
- "arbitrary", &list,
- NULL);
+ gtk_object_get(GTK_OBJECT(card),
+ "arbitrary", &list,
+ NULL);
e_list_append(list, arbitrary);
e_card_arbitrary_unref(arbitrary);
}
@@ -1242,7 +1242,7 @@ parse_use_score(ECard *card, VObject *vobj, char *default_charset)
static void
parse_attribute(ECard *card, VObject *vobj, char *default_charset)
{
- ParsePropertyFunc function = g_hash_table_lookup(E_CARD_GET_CLASS(card)->attribute_jump_table, vObjectName(vobj));
+ ParsePropertyFunc function = g_hash_table_lookup(E_CARD_CLASS(GTK_OBJECT(card)->klass)->attribute_jump_table, vObjectName(vobj));
if ( function )
function(card, vobj, default_charset);
}
@@ -1280,11 +1280,9 @@ static void
e_card_class_init (ECardClass *klass)
{
int i;
- GObjectClass *object_class;
+ GtkObjectClass *object_class;
- object_class = G_OBJECT_CLASS(klass);
-
- parent_class = g_type_class_ref (G_TYPE_OBJECT);
+ object_class = GTK_OBJECT_CLASS(klass);
klass->attribute_jump_table = g_hash_table_new(g_str_hash, g_str_equal);
@@ -1292,257 +1290,81 @@ e_card_class_init (ECardClass *klass)
g_hash_table_insert(klass->attribute_jump_table, attribute_jump_array[i].key, attribute_jump_array[i].function);
}
- object_class->dispose = e_card_dispose;
- object_class->get_property = e_card_get_property;
- object_class->set_property = e_card_set_property;
-
- g_object_class_install_property (object_class, PROP_FILE_AS,
- g_param_spec_string ("file_as",
- _("File As"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_FULL_NAME,
- g_param_spec_string ("full_name",
- _("Full Name"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- 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_ADDRESS,
- g_param_spec_object ("address",
- _("Address"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_LIST,
- G_PARAM_READABLE));
-
- g_object_class_install_property (object_class, PROP_ADDRESS_LABEL,
- g_param_spec_object ("address_label",
- _("Address Label"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_LIST,
- G_PARAM_READABLE));
-
- g_object_class_install_property (object_class, PROP_PHONE,
- g_param_spec_object ("phone",
- _("Phone"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_LIST,
- G_PARAM_READABLE));
-
- g_object_class_install_property (object_class, PROP_EMAIL,
- g_param_spec_object ("email",
- _("Email"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_LIST,
- G_PARAM_READABLE));
-
- g_object_class_install_property (object_class, PROP_BIRTH_DATE,
- g_param_spec_pointer ("birth_date",
- _("Birth date"),
- /*_( */"XXX blurb" /*)*/,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_URL,
- g_param_spec_string ("url",
- _("URL"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_ORG,
- g_param_spec_string ("org",
- _("Organization"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_ORG_UNIT,
- g_param_spec_string ("org_unit",
- _("Organizational Unit"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_OFFICE,
- g_param_spec_string ("office",
- _("Office"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_TITLE,
- g_param_spec_string ("title",
- _("Title"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_ROLE,
- g_param_spec_string ("role",
- _("Role"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_MANAGER,
- g_param_spec_string ("manager",
- _("Manager"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_ASSISTANT,
- g_param_spec_string ("assistant",
- _("Assistant"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_NICKNAME,
- g_param_spec_string ("nickname",
- _("Nickname"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_SPOUSE,
- g_param_spec_string ("spouse",
- _("Spouse"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_ANNIVERSARY,
- g_param_spec_pointer ("anniversary",
- _("Anniversary"),
- /*_( */"XXX blurb" /*)*/,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_MAILER,
- g_param_spec_string ("mailer",
- _("Mailer"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_CALURI,
- g_param_spec_string ("caluri",
- _("Calendar URI"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_FBURL,
- g_param_spec_string ("fburl",
- _("Free/Busy URL"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_ICSCALENDAR,
- g_param_spec_string ("icscalendar",
- _("ICS Calendar"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_NOTE,
- g_param_spec_string ("note",
- _("Note"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_RELATED_CONTACTS,
- g_param_spec_string ("related_contacts",
- _("Related Contacts"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_CATEGORIES,
- g_param_spec_string ("categories",
- _("Categories"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_CATEGORY_LIST,
- g_param_spec_object ("category list",
- _("Category List"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_LIST,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_WANTS_HTML,
- g_param_spec_boolean ("wants_html",
- _("Wants HTML"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_WANTS_HTML_SET,
- g_param_spec_boolean ("wants_html_set",
- _("Wants HTML set"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READABLE));
-
- g_object_class_install_property (object_class, PROP_EVOLUTION_LIST,
- g_param_spec_boolean ("list",
- _("List"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EVOLUTION_LIST_SHOW_ADDRESSES,
- g_param_spec_boolean ("list_show_addresses",
- _("List Show Addresses"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_ARBITRARY,
- g_param_spec_object ("arbitrary",
- _("Arbitrary"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_LIST,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_ID,
- g_param_spec_string ("id",
- _("ID"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_LAST_USE,
- g_param_spec_pointer ("last_use",
- _("Last Use"),
- /*_( */"XXX blurb" /*)*/,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_USE_SCORE,
- /* XXX at some point we
- should remove
- LAX_VALIDATION and figure
- out some hard min & max
- scores. */
- g_param_spec_float ("use_score",
- _("Use Score"),
- /*_( */"XXX blurb" /*)*/,
- 0.0,
- 0.0,
- 0.0,
- G_PARAM_READWRITE | G_PARAM_LAX_VALIDATION));
+ gtk_object_add_arg_type ("ECard::file_as",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FILE_AS);
+ gtk_object_add_arg_type ("ECard::full_name",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FULL_NAME);
+ gtk_object_add_arg_type ("ECard::name",
+ GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_NAME);
+ gtk_object_add_arg_type ("ECard::address",
+ GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_ADDRESS);
+ gtk_object_add_arg_type ("ECard::address_label",
+ GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_ADDRESS_LABEL);
+ gtk_object_add_arg_type ("ECard::phone",
+ GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_PHONE);
+ gtk_object_add_arg_type ("ECard::email",
+ GTK_TYPE_OBJECT, GTK_ARG_READABLE, ARG_EMAIL);
+ gtk_object_add_arg_type ("ECard::birth_date",
+ GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_BIRTH_DATE);
+ gtk_object_add_arg_type ("ECard::url",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_URL);
+ gtk_object_add_arg_type ("ECard::org",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ORG);
+ gtk_object_add_arg_type ("ECard::org_unit",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ORG_UNIT);
+ gtk_object_add_arg_type ("ECard::office",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_OFFICE);
+ gtk_object_add_arg_type ("ECard::title",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_TITLE);
+ gtk_object_add_arg_type ("ECard::role",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ROLE);
+ gtk_object_add_arg_type ("ECard::manager",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_MANAGER);
+ gtk_object_add_arg_type ("ECard::assistant",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ASSISTANT);
+ gtk_object_add_arg_type ("ECard::nickname",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_NICKNAME);
+ gtk_object_add_arg_type ("ECard::spouse",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_SPOUSE);
+ gtk_object_add_arg_type ("ECard::anniversary",
+ GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_ANNIVERSARY);
+ gtk_object_add_arg_type ("ECard::mailer",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_MAILER);
+ gtk_object_add_arg_type ("ECard::caluri",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_CALURI);
+ gtk_object_add_arg_type ("ECard::fburl",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_FBURL);
+ gtk_object_add_arg_type ("ECard::icscalendar",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ICSCALENDAR);
+ gtk_object_add_arg_type ("ECard::note",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_NOTE);
+ gtk_object_add_arg_type ("ECard::related_contacts",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_RELATED_CONTACTS);
+ gtk_object_add_arg_type ("ECard::categories",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_CATEGORIES);
+ gtk_object_add_arg_type ("ECard::category_list",
+ GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_CATEGORY_LIST);
+ gtk_object_add_arg_type ("ECard::wants_html",
+ GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_WANTS_HTML);
+ gtk_object_add_arg_type ("ECard::wants_html_set",
+ GTK_TYPE_BOOL, GTK_ARG_READABLE, ARG_WANTS_HTML);
+ gtk_object_add_arg_type ("ECard::list",
+ GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_EVOLUTION_LIST);
+ gtk_object_add_arg_type ("ECard::list_show_addresses",
+ GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_EVOLUTION_LIST_SHOW_ADDRESSES);
+ gtk_object_add_arg_type ("ECard::arbitrary",
+ GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_ARBITRARY);
+ gtk_object_add_arg_type ("ECard::id",
+ GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_ID);
+ gtk_object_add_arg_type ("ECard::last_use",
+ GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_LAST_USE);
+ gtk_object_add_arg_type ("ECard::use_score",
+ GTK_TYPE_FLOAT, GTK_ARG_READWRITE, ARG_USE_SCORE);
+
+
+ object_class->destroy = e_card_destroy;
+ object_class->get_arg = e_card_get_arg;
+ object_class->set_arg = e_card_set_arg;
}
ECardPhone *
@@ -1936,7 +1758,7 @@ e_card_email_match_single_string (const gchar *a, const gchar *b)
for (xa=a; *xa && *xa != '@'; ++xa);
for (xb=b; *xb && *xb != '@'; ++xb);
- if (xa-a != xb-b || *xa != *xb || g_ascii_strncasecmp (a, b, xa-a))
+ if (xa-a != xb-b || *xa != *xb || g_strncasecmp (a, b, xa-a))
return FALSE;
if (*xa == '\0')
@@ -1977,7 +1799,7 @@ e_card_email_match_string (const ECard *card, const gchar *str)
if (e_card_email_match_single_string (e_iterator_get (iter), str))
return TRUE;
}
- g_object_unref (iter);
+ gtk_object_unref (GTK_OBJECT (iter));
return FALSE;
}
@@ -1996,14 +1818,14 @@ e_card_email_find_number (const ECard *card, const gchar *email)
iter = e_list_get_iterator (card->email);
for (e_iterator_reset (iter); e_iterator_is_valid (iter); e_iterator_next (iter)) {
- if (!g_ascii_strcasecmp (e_iterator_get (iter), email))
+ if (!g_strcasecmp (e_iterator_get (iter), email))
goto finished;
++count;
}
count = -1;
finished:
- g_object_unref (iter);
+ gtk_object_unref (GTK_OBJECT (iter));
return count;
}
@@ -2013,82 +1835,75 @@ e_card_email_find_number (const ECard *card, const gchar *email)
*/
static void
-e_card_dispose (GObject *object)
+e_card_destroy (GtkObject *object)
{
ECard *card = E_CARD(object);
+ g_free(card->id);
+ if (card->book)
+ gtk_object_unref (GTK_OBJECT (card->book));
+ g_free(card->file_as);
+ g_free(card->fname);
+ e_card_name_unref(card->name);
+ g_free(card->bday);
+
+ g_free(card->url);
+ g_free(card->org);
+ g_free(card->org_unit);
+ g_free(card->office);
+ g_free(card->title);
+ g_free(card->role);
+ g_free(card->manager);
+ g_free(card->assistant);
+ g_free(card->nickname);
+ g_free(card->spouse);
+ g_free(card->anniversary);
+ g_free(card->caluri);
+ g_free(card->fburl);
+ g_free(card->icscalendar);
+ g_free(card->note);
+ g_free(card->related_contacts);
-#define FREE_IF(x) do { if ((x)) { g_free (x); x = NULL; } } while (0)
-#define UNREF_IF(x) do { if ((x)) { g_object_unref (x); x = NULL; } } while (0)
-
- FREE_IF (card->id);
- UNREF_IF (card->book);
- FREE_IF(card->file_as);
- FREE_IF(card->fname);
- if (card->name) {
- e_card_name_unref(card->name);
- card->name = NULL;
- }
- FREE_IF(card->bday);
-
- FREE_IF(card->url);
- FREE_IF(card->org);
- FREE_IF(card->org_unit);
- FREE_IF(card->office);
- FREE_IF(card->title);
- FREE_IF(card->role);
- FREE_IF(card->manager);
- FREE_IF(card->assistant);
- FREE_IF(card->nickname);
- FREE_IF(card->spouse);
- FREE_IF(card->anniversary);
- FREE_IF(card->caluri);
- FREE_IF(card->fburl);
- FREE_IF(card->icscalendar);
- FREE_IF(card->note);
- FREE_IF(card->related_contacts);
-
- UNREF_IF (card->categories);
- UNREF_IF (card->email);
- UNREF_IF (card->phone);
- UNREF_IF (card->address);
- UNREF_IF (card->address_label);
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ if (card->categories)
+ gtk_object_unref(GTK_OBJECT(card->categories));
+ if (card->email)
+ gtk_object_unref(GTK_OBJECT(card->email));
+ if (card->phone)
+ gtk_object_unref(GTK_OBJECT(card->phone));
+ if (card->address)
+ gtk_object_unref(GTK_OBJECT(card->address));
+ if (card->address_label)
+ gtk_object_unref(GTK_OBJECT(card->address_label));
}
/* Set_arg handler for the card */
static void
-e_card_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
ECard *card;
card = E_CARD (object);
- switch (prop_id) {
- case PROP_FILE_AS:
+ switch (arg_id) {
+ case ARG_FILE_AS:
g_free(card->file_as);
- card->file_as = g_strdup(g_value_get_string (value));
+ card->file_as = g_strdup(GTK_VALUE_STRING(*arg));
if (card->file_as == NULL)
card->file_as = g_strdup("");
break;
- case PROP_FULL_NAME:
+ case ARG_FULL_NAME:
g_free(card->fname);
- card->fname = g_strdup(g_value_get_string (value));
+ card->fname = g_strdup(GTK_VALUE_STRING(*arg));
if (card->fname == NULL)
card->fname = g_strdup("");
e_card_name_unref (card->name);
card->name = e_card_name_from_string (card->fname);
break;
- case PROP_NAME:
+ case ARG_NAME:
e_card_name_unref (card->name);
- card->name = e_card_name_ref(g_value_get_pointer (value));
+ card->name = e_card_name_ref(GTK_VALUE_POINTER(*arg));
if (card->name == NULL)
card->name = e_card_name_new();
if (card->fname == NULL) {
@@ -2108,193 +1923,189 @@ e_card_set_property (GObject *object,
card->file_as = string;
}
break;
- case PROP_CATEGORIES:
+ case ARG_CATEGORIES:
if (card->categories)
- g_object_unref(card->categories);
+ gtk_object_unref(GTK_OBJECT(card->categories));
card->categories = NULL;
- if (g_value_get_string (value))
- do_parse_categories(card, (char*)g_value_get_string (value));
+ if (GTK_VALUE_STRING(*arg))
+ do_parse_categories(card, GTK_VALUE_STRING(*arg));
break;
- case PROP_CATEGORY_LIST:
+ case ARG_CATEGORY_LIST:
if (card->categories)
- g_object_unref(card->categories);
- card->categories = E_LIST(g_value_get_object(value));
+ gtk_object_unref(GTK_OBJECT(card->categories));
+ card->categories = E_LIST(GTK_VALUE_OBJECT(*arg));
if (card->categories)
- g_object_ref(card->categories);
+ gtk_object_ref(GTK_OBJECT(card->categories));
break;
- case PROP_BIRTH_DATE:
+ case ARG_BIRTH_DATE:
g_free(card->bday);
- if (g_value_get_pointer (value)) {
+ if (GTK_VALUE_POINTER (*arg)) {
card->bday = g_new (ECardDate, 1);
- memcpy (card->bday, g_value_get_pointer (value), sizeof (ECardDate));
+ memcpy (card->bday, GTK_VALUE_POINTER (*arg), sizeof (ECardDate));
} else {
card->bday = NULL;
}
break;
- case PROP_URL:
+ case ARG_URL:
g_free(card->url);
- card->url = g_strdup(g_value_get_string(value));
+ card->url = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_ORG:
+ case ARG_ORG:
g_free(card->org);
- card->org = g_strdup(g_value_get_string(value));
+ card->org = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_ORG_UNIT:
+ case ARG_ORG_UNIT:
g_free(card->org_unit);
- card->org_unit = g_strdup(g_value_get_string(value));
+ card->org_unit = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_OFFICE:
+ case ARG_OFFICE:
g_free(card->office);
- card->office = g_strdup(g_value_get_string(value));
+ card->office = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_TITLE:
+ case ARG_TITLE:
g_free(card->title);
- card->title = g_strdup(g_value_get_string(value));
+ card->title = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_ROLE:
+ case ARG_ROLE:
g_free(card->role);
- card->role = g_strdup(g_value_get_string(value));
+ card->role = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_MANAGER:
+ case ARG_MANAGER:
g_free(card->manager);
- card->manager = g_strdup(g_value_get_string(value));
+ card->manager = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_ASSISTANT:
+ case ARG_ASSISTANT:
g_free(card->assistant);
- card->assistant = g_strdup(g_value_get_string(value));
+ card->assistant = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_NICKNAME:
+ case ARG_NICKNAME:
g_free(card->nickname);
- card->nickname = g_strdup(g_value_get_string(value));
+ card->nickname = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_SPOUSE:
+ case ARG_SPOUSE:
g_free(card->spouse);
- card->spouse = g_strdup(g_value_get_string(value));
+ card->spouse = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_ANNIVERSARY:
+ case ARG_ANNIVERSARY:
g_free(card->anniversary);
- if (g_value_get_pointer (value)) {
+ if (GTK_VALUE_POINTER (*arg)) {
card->anniversary = g_new (ECardDate, 1);
- memcpy (card->anniversary, g_value_get_pointer (value), sizeof (ECardDate));
+ memcpy (card->anniversary, GTK_VALUE_POINTER (*arg), sizeof (ECardDate));
} else {
card->anniversary = NULL;
}
break;
- case PROP_MAILER:
+ case ARG_MAILER:
g_free(card->mailer);
- card->mailer = g_strdup(g_value_get_string(value));
+ card->mailer = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_CALURI:
+ case ARG_CALURI:
g_free(card->caluri);
- card->caluri = g_strdup(g_value_get_string(value));
+ card->caluri = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_FBURL:
+ case ARG_FBURL:
g_free(card->fburl);
- card->fburl = g_strdup(g_value_get_string(value));
+ card->fburl = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_ICSCALENDAR:
+ case ARG_ICSCALENDAR:
g_free(card->icscalendar);
- card->icscalendar = g_strdup(g_value_get_string(value));
+ card->icscalendar = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_NOTE:
+ case ARG_NOTE:
g_free (card->note);
- card->note = g_strdup(g_value_get_string(value));
+ card->note = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_RELATED_CONTACTS:
+ case ARG_RELATED_CONTACTS:
g_free (card->related_contacts);
- card->related_contacts = g_strdup(g_value_get_string(value));
+ card->related_contacts = g_strdup(GTK_VALUE_STRING(*arg));
break;
- case PROP_WANTS_HTML:
- card->wants_html = g_value_get_boolean (value);
+ case ARG_WANTS_HTML:
+ card->wants_html = GTK_VALUE_BOOL(*arg);
card->wants_html_set = TRUE;
break;
- case PROP_ARBITRARY:
+ case ARG_ARBITRARY:
if (card->arbitrary)
- g_object_unref(card->arbitrary);
- card->arbitrary = E_LIST(g_value_get_pointer(value));
+ gtk_object_unref(GTK_OBJECT(card->arbitrary));
+ card->arbitrary = E_LIST(GTK_VALUE_OBJECT(*arg));
if (card->arbitrary)
- g_object_ref(card->arbitrary);
+ gtk_object_ref(GTK_OBJECT(card->arbitrary));
break;
- case PROP_ID:
+ case ARG_ID:
g_free(card->id);
- card->id = g_strdup(g_value_get_string(value));
+ card->id = g_strdup(GTK_VALUE_STRING(*arg));
if (card->id == NULL)
card->id = g_strdup ("");
break;
- case PROP_LAST_USE:
+ case ARG_LAST_USE:
g_free(card->last_use);
- if (g_value_get_pointer (value)) {
+ if (GTK_VALUE_POINTER (*arg)) {
card->last_use = g_new (ECardDate, 1);
- memcpy (card->last_use, g_value_get_pointer (value), sizeof (ECardDate));
+ memcpy (card->last_use, GTK_VALUE_POINTER (*arg), sizeof (ECardDate));
} else {
card->last_use = NULL;
}
break;
- case PROP_USE_SCORE:
- card->raw_use_score = g_value_get_float (value);
+ case ARG_USE_SCORE:
+ card->raw_use_score = GTK_VALUE_FLOAT(*arg);
break;
- case PROP_EVOLUTION_LIST:
- card->list = g_value_get_boolean (value);
+ case ARG_EVOLUTION_LIST:
+ card->list = GTK_VALUE_BOOL(*arg);
break;
- case PROP_EVOLUTION_LIST_SHOW_ADDRESSES:
- card->list_show_addresses = g_value_get_boolean (value);
+ case ARG_EVOLUTION_LIST_SHOW_ADDRESSES:
+ card->list_show_addresses = GTK_VALUE_BOOL(*arg);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ return;
}
}
/* Get_arg handler for the card */
static void
-e_card_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+e_card_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
ECard *card;
card = E_CARD (object);
- switch (prop_id) {
- case PROP_FILE_AS:
- g_value_set_string (value, card->file_as);
+ switch (arg_id) {
+ case ARG_FILE_AS:
+ GTK_VALUE_STRING (*arg) = card->file_as;
break;
- case PROP_FULL_NAME:
- g_value_set_string (value, card->fname);
+ case ARG_FULL_NAME:
+ GTK_VALUE_STRING (*arg) = card->fname;
break;
- case PROP_NAME:
- g_value_set_pointer (value, card->name);
+ case ARG_NAME:
+ GTK_VALUE_POINTER(*arg) = card->name;
break;
- case PROP_ADDRESS:
+ case ARG_ADDRESS:
if (!card->address)
card->address = e_list_new((EListCopyFunc) e_card_delivery_address_ref,
(EListFreeFunc) e_card_delivery_address_unref,
NULL);
- g_value_set_object (value, card->address);
+ GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->address);
break;
- case PROP_ADDRESS_LABEL:
+ case ARG_ADDRESS_LABEL:
if (!card->address_label)
card->address_label = e_list_new((EListCopyFunc) e_card_address_label_ref,
(EListFreeFunc) e_card_address_label_unref,
NULL);
- g_value_set_object (value, card->address_label);
+ GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->address_label);
break;
- case PROP_PHONE:
+ case ARG_PHONE:
if (!card->phone)
card->phone = e_list_new((EListCopyFunc) e_card_phone_ref,
(EListFreeFunc) e_card_phone_unref,
NULL);
- g_value_set_object (value, card->phone);
+ GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->phone);
break;
- case PROP_EMAIL:
+ case ARG_EMAIL:
if (!card->email)
card->email = e_list_new((EListCopyFunc) g_strdup,
(EListFreeFunc) g_free,
NULL);
- g_value_set_object (value, card->email);
+ GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->email);
break;
- case PROP_CATEGORIES:
+ case ARG_CATEGORIES:
{
int i;
char ** strs;
@@ -2310,102 +2121,103 @@ e_card_get_property (GObject *object,
strs[i] = (char *)e_iterator_get(iterator);
}
strs[i] = 0;
- g_value_set_string(value, g_strjoinv(", ", strs));
+ GTK_VALUE_STRING(*arg) = g_strjoinv(", ", strs);
g_free(strs);
}
break;
- case PROP_CATEGORY_LIST:
+ case ARG_CATEGORY_LIST:
if (!card->categories)
card->categories = e_list_new((EListCopyFunc) g_strdup,
(EListFreeFunc) g_free,
NULL);
- g_value_set_object (value, card->categories);
+ GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->categories);
break;
- case PROP_BIRTH_DATE:
- g_value_set_pointer (value, card->bday);
+ case ARG_BIRTH_DATE:
+ GTK_VALUE_POINTER(*arg) = card->bday;
break;
- case PROP_URL:
- g_value_set_string (value, card->url);
+ case ARG_URL:
+ GTK_VALUE_STRING(*arg) = card->url;
break;
- case PROP_ORG:
- g_value_set_string (value, card->org);
+ case ARG_ORG:
+ GTK_VALUE_STRING(*arg) = card->org;
break;
- case PROP_ORG_UNIT:
- g_value_set_string (value, card->org_unit);
+ case ARG_ORG_UNIT:
+ GTK_VALUE_STRING(*arg) = card->org_unit;
break;
- case PROP_OFFICE:
- g_value_set_string (value, card->office);
+ case ARG_OFFICE:
+ GTK_VALUE_STRING(*arg) = card->office;
break;
- case PROP_TITLE:
- g_value_set_string (value, card->title);
+ case ARG_TITLE:
+ GTK_VALUE_STRING(*arg) = card->title;
break;
- case PROP_ROLE:
- g_value_set_string (value, card->role);
+ case ARG_ROLE:
+ GTK_VALUE_STRING(*arg) = card->role;
break;
- case PROP_MANAGER:
- g_value_set_string (value, card->manager);
+ case ARG_MANAGER:
+ GTK_VALUE_STRING(*arg) = card->manager;
break;
- case PROP_ASSISTANT:
- g_value_set_string (value, card->assistant);
+ case ARG_ASSISTANT:
+ GTK_VALUE_STRING(*arg) = card->assistant;
break;
- case PROP_NICKNAME:
- g_value_set_string (value, card->nickname);
+ case ARG_NICKNAME:
+ GTK_VALUE_STRING(*arg) = card->nickname;
break;
- case PROP_SPOUSE:
- g_value_set_string (value, card->spouse);
+ case ARG_SPOUSE:
+ GTK_VALUE_STRING(*arg) = card->spouse;
break;
- case PROP_ANNIVERSARY:
- g_value_set_pointer (value, card->anniversary);
+ case ARG_ANNIVERSARY:
+ GTK_VALUE_POINTER(*arg) = card->anniversary;
break;
- case PROP_MAILER:
- g_value_set_string (value, card->mailer);
+ case ARG_MAILER:
+ GTK_VALUE_STRING(*arg) = card->mailer;
break;
- case PROP_CALURI:
- g_value_set_string (value, card->caluri);
+ case ARG_CALURI:
+ GTK_VALUE_STRING(*arg) = card->caluri;
break;
- case PROP_FBURL:
- g_value_set_string (value, card->fburl);
+ case ARG_FBURL:
+ GTK_VALUE_STRING(*arg) = card->fburl;
break;
- case PROP_ICSCALENDAR:
- g_value_set_string (value, card->icscalendar);
+ case ARG_ICSCALENDAR:
+ GTK_VALUE_STRING(*arg) = card->icscalendar;
break;
- case PROP_NOTE:
- g_value_set_string (value, card->note);
+ case ARG_NOTE:
+ GTK_VALUE_STRING(*arg) = card->note;
break;
- case PROP_RELATED_CONTACTS:
- g_value_set_string (value, card->related_contacts);
+ case ARG_RELATED_CONTACTS:
+ GTK_VALUE_STRING(*arg) = card->related_contacts;
break;
- case PROP_WANTS_HTML:
- g_value_set_boolean (value, card->wants_html);
+ case ARG_WANTS_HTML:
+ GTK_VALUE_BOOL(*arg) = card->wants_html;
break;
- case PROP_WANTS_HTML_SET:
- g_value_set_boolean (value, card->wants_html_set);
+ case ARG_WANTS_HTML_SET:
+ GTK_VALUE_BOOL(*arg) = card->wants_html_set;
break;
- case PROP_ARBITRARY:
+ case ARG_ARBITRARY:
if (!card->arbitrary)
card->arbitrary = e_list_new((EListCopyFunc) e_card_arbitrary_ref,
(EListFreeFunc) e_card_arbitrary_unref,
NULL);
- g_value_set_object (value, card->arbitrary);
+ GTK_VALUE_OBJECT(*arg) = GTK_OBJECT(card->arbitrary);
break;
- case PROP_ID:
- g_value_set_string (value, card->id);
+ case ARG_ID:
+ GTK_VALUE_STRING(*arg) = card->id;
break;
- case PROP_LAST_USE:
- g_value_set_pointer (value, card->last_use);
+ case ARG_LAST_USE:
+ GTK_VALUE_POINTER(*arg) = card->last_use;
break;
- case PROP_USE_SCORE:
- g_value_set_float (value, e_card_get_use_score (card));
+
+ case ARG_USE_SCORE:
+ GTK_VALUE_FLOAT(*arg) = e_card_get_use_score (card);
break;
- case PROP_EVOLUTION_LIST:
- g_value_set_boolean (value, card->list);
+ case ARG_EVOLUTION_LIST:
+ GTK_VALUE_BOOL(*arg) = card->list;
break;
- case PROP_EVOLUTION_LIST_SHOW_ADDRESSES:
- g_value_set_boolean (value, card->list_show_addresses);
+ case ARG_EVOLUTION_LIST_SHOW_ADDRESSES:
+ GTK_VALUE_BOOL(*arg) = card->list_show_addresses;
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ arg->type = GTK_TYPE_INVALID;
break;
}
}
@@ -2461,7 +2273,7 @@ e_card_load_cards_from_file_with_default_charset(const char *filename, char *def
GList *list = NULL;
while(vobj) {
VObject *next;
- ECard *card = g_object_new (E_TYPE_CARD, NULL);
+ ECard *card = E_CARD(gtk_type_new(e_card_get_type()));
parse(card, vobj, default_charset);
next = nextVObjectInList(vobj);
cleanVObject(vobj);
@@ -2485,7 +2297,7 @@ e_card_load_cards_from_string_with_default_charset(const char *str, char *defaul
GList *list = NULL;
while(vobj) {
VObject *next;
- ECard *card = g_object_new (E_TYPE_CARD, NULL);
+ ECard *card = E_CARD(gtk_type_new(e_card_get_type()));
parse(card, vobj, default_charset);
next = nextVObjectInList(vobj);
cleanVObject(vobj);
@@ -2506,32 +2318,32 @@ void
e_card_free_empty_lists (ECard *card)
{
if (card->address && e_list_length (card->address) == 0) {
- g_object_unref (card->address);
+ gtk_object_unref (GTK_OBJECT (card->address));
card->address = NULL;
}
if (card->address_label && e_list_length (card->address_label) == 0) {
- g_object_unref (card->address_label);
+ gtk_object_unref (GTK_OBJECT (card->address_label));
card->address_label = NULL;
}
if (card->phone && e_list_length (card->phone) == 0) {
- g_object_unref (card->phone);
+ gtk_object_unref (GTK_OBJECT (card->phone));
card->phone = NULL;
}
if (card->email && e_list_length (card->email) == 0) {
- g_object_unref (card->email);
+ gtk_object_unref (GTK_OBJECT (card->email));
card->email = NULL;
}
if (card->categories && e_list_length (card->categories) == 0) {
- g_object_unref (card->categories);
+ gtk_object_unref (GTK_OBJECT (card->categories));
card->categories = NULL;
}
if (card->arbitrary && e_list_length (card->arbitrary) == 0) {
- g_object_unref (card->arbitrary);
+ gtk_object_unref (GTK_OBJECT (card->arbitrary));
card->arbitrary = NULL;
}
}
@@ -2734,6 +2546,278 @@ set_address_flags (VObject *vobj, ECardAddressFlags flags)
}
}
+#include <Evolution-Composer.h>
+
+#define COMPOSER_OAFID "OAFIID:GNOME_Evolution_Mail_Composer"
+
+void
+e_card_list_send (GList *cards, ECardDisposition disposition)
+{
+ BonoboObjectClient *bonobo_server;
+ GNOME_Evolution_Composer composer_server;
+ CORBA_Environment ev;
+
+ if (cards == NULL)
+ return;
+
+ /* First, I obtain an object reference that represents the Composer. */
+ bonobo_server = bonobo_object_activate (COMPOSER_OAFID, 0);
+
+ g_return_if_fail (bonobo_server != NULL);
+
+ composer_server = bonobo_object_corba_objref (BONOBO_OBJECT (bonobo_server));
+
+ CORBA_exception_init (&ev);
+
+ if (disposition == E_CARD_DISPOSITION_AS_TO) {
+ GNOME_Evolution_Composer_RecipientList *to_list, *cc_list, *bcc_list;
+ CORBA_char *subject;
+ int to_i, bcc_i;
+ GList *iter;
+ gint to_length = 0, bcc_length = 0;
+
+ /* Figure out how many addresses of each kind we have. */
+ for (iter = cards; iter != NULL; iter = g_list_next (iter)) {
+ ECard *card = E_CARD (iter->data);
+ if (e_card_evolution_list (card)) {
+ gint len = card->email ? e_list_length (card->email) : 0;
+ if (e_card_evolution_list_show_addresses (card))
+ to_length += len;
+ else
+ bcc_length += len;
+ } else {
+ if (card->email != NULL)
+ ++to_length;
+ }
+ }
+
+ /* Now I have to make a CORBA sequences that represents a recipient list with
+ the right number of entries, for the cards. */
+ to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
+ to_list->_maximum = to_length;
+ to_list->_length = to_length;
+ if (to_length > 0) {
+ to_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (to_length);
+ }
+
+ cc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
+ cc_list->_maximum = cc_list->_length = 0;
+
+ bcc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
+ bcc_list->_maximum = bcc_length;
+ bcc_list->_length = bcc_length;
+ if (bcc_length > 0) {
+ bcc_list->_buffer = CORBA_sequence_GNOME_Evolution_Composer_Recipient_allocbuf (bcc_length);
+ }
+
+ to_i = 0;
+ bcc_i = 0;
+ while (cards != NULL) {
+ ECard *card = cards->data;
+ EIterator *iterator;
+ gchar *name, *addr;
+ gboolean is_list, is_hidden, free_name_addr;
+ GNOME_Evolution_Composer_Recipient *recipient;
+
+ if (card->email != NULL) {
+
+ is_list = e_card_evolution_list (card);
+ is_hidden = is_list && !e_card_evolution_list_show_addresses (card);
+
+ for (iterator = e_list_get_iterator (card->email); e_iterator_is_valid (iterator); e_iterator_next (iterator)) {
+
+ if (is_hidden) {
+ recipient = &(bcc_list->_buffer[bcc_i]);
+ ++bcc_i;
+ } else {
+ recipient = &(to_list->_buffer[to_i]);
+ ++to_i;
+ }
+
+ name = "";
+ addr = "";
+ free_name_addr = FALSE;
+ if (e_iterator_is_valid (iterator)) {
+
+ if (is_list) {
+ /* We need to decode the list entries, which are XMLified EDestinations. */
+ EDestination *dest = e_destination_import (e_iterator_get (iterator));
+ if (dest != NULL) {
+ name = g_strdup (e_destination_get_name (dest));
+ addr = g_strdup (e_destination_get_email (dest));
+ free_name_addr = TRUE;
+ gtk_object_unref (GTK_OBJECT (dest));
+ }
+
+ } else { /* is just a plain old card */
+ if (card->name)
+ name = e_card_name_to_string (card->name);
+ addr = g_strdup ((char *) e_iterator_get (iterator));
+ free_name_addr = TRUE;
+ }
+ }
+
+ recipient->name = CORBA_string_dup (name ? name : "");
+ recipient->address = CORBA_string_dup (addr ? addr : "");
+
+ if (free_name_addr) {
+ g_free ((gchar *) name);
+ g_free ((gchar *) addr);
+ }
+
+ /* If this isn't a list, we quit after the first (i.e. the default) address. */
+ if (!is_list)
+ break;
+
+ }
+ gtk_object_unref (GTK_OBJECT (iterator));
+ }
+
+ cards = g_list_next (cards);
+ }
+
+ subject = CORBA_string_dup ("");
+
+ GNOME_Evolution_Composer_setHeaders (composer_server, "", to_list, cc_list, bcc_list, subject, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_printerr ("gui/e-meeting-edit.c: I couldn't set the composer headers via CORBA! Aagh.\n");
+ CORBA_exception_free (&ev);
+ return;
+ }
+
+ CORBA_free (to_list);
+ CORBA_free (cc_list);
+ CORBA_free (bcc_list);
+ CORBA_free (subject);
+ }
+
+ if (disposition == E_CARD_DISPOSITION_AS_ATTACHMENT) {
+ CORBA_char *content_type, *filename, *description;
+ GNOME_Evolution_Composer_AttachmentData *attach_data;
+ CORBA_boolean show_inline;
+ char *tempstr;
+
+ GNOME_Evolution_Composer_RecipientList *to_list, *cc_list, *bcc_list;
+ CORBA_char *subject;
+
+ content_type = CORBA_string_dup ("text/x-vcard");
+ filename = CORBA_string_dup ("");
+
+ if (cards->next) {
+ description = CORBA_string_dup (_("Multiple VCards"));
+ } else {
+ char *file_as;
+
+ gtk_object_get(GTK_OBJECT(cards->data),
+ "file_as", &file_as,
+ NULL);
+
+ tempstr = g_strdup_printf (_("VCard for %s"), file_as);
+ description = CORBA_string_dup (tempstr);
+ g_free (tempstr);
+ }
+
+ show_inline = FALSE;
+
+ tempstr = e_card_list_get_vcard (cards);
+ attach_data = GNOME_Evolution_Composer_AttachmentData__alloc();
+ attach_data->_maximum = attach_data->_length = strlen (tempstr);
+ attach_data->_buffer = CORBA_sequence_CORBA_char_allocbuf (attach_data->_length);
+ strcpy (attach_data->_buffer, tempstr);
+ g_free (tempstr);
+
+ GNOME_Evolution_Composer_attachData (composer_server,
+ content_type, filename, description,
+ show_inline, attach_data,
+ &ev);
+
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_printerr ("gui/e-meeting-edit.c: I couldn't attach data to the composer via CORBA! Aagh.\n");
+ CORBA_exception_free (&ev);
+ return;
+ }
+
+ CORBA_free (content_type);
+ CORBA_free (filename);
+ CORBA_free (description);
+ CORBA_free (attach_data);
+
+ to_list = GNOME_Evolution_Composer_RecipientList__alloc ();
+ to_list->_maximum = to_list->_length = 0;
+
+ cc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
+ cc_list->_maximum = cc_list->_length = 0;
+
+ bcc_list = GNOME_Evolution_Composer_RecipientList__alloc ();
+ bcc_list->_maximum = bcc_list->_length = 0;
+
+ if (!cards || cards->next) {
+ subject = CORBA_string_dup ("Contact information");
+ } else {
+ ECard *card = cards->data;
+ const gchar *tempstr2;
+
+ tempstr2 = NULL;
+ gtk_object_get(GTK_OBJECT(card),
+ "file_as", &tempstr2,
+ NULL);
+ if (!tempstr2 || !*tempstr2)
+ gtk_object_get(GTK_OBJECT(card),
+ "full_name", &tempstr2,
+ NULL);
+ if (!tempstr2 || !*tempstr2)
+ gtk_object_get(GTK_OBJECT(card),
+ "org", &tempstr2,
+ NULL);
+ if (!tempstr2 || !*tempstr2) {
+ EList *list;
+ EIterator *iterator;
+ gtk_object_get(GTK_OBJECT(card),
+ "email", &list,
+ NULL);
+ iterator = e_list_get_iterator (list);
+ if (e_iterator_is_valid (iterator)) {
+ tempstr2 = e_iterator_get (iterator);
+ }
+ gtk_object_unref (GTK_OBJECT (iterator));
+ }
+
+ if (!tempstr2 || !*tempstr2)
+ tempstr = g_strdup_printf ("Contact information");
+ else
+ tempstr = g_strdup_printf ("Contact information for %s", tempstr2);
+ subject = CORBA_string_dup (tempstr);
+ g_free (tempstr);
+ }
+
+ GNOME_Evolution_Composer_setHeaders (composer_server, "", to_list, cc_list, bcc_list, subject, &ev);
+
+ CORBA_free (to_list);
+ CORBA_free (cc_list);
+ CORBA_free (bcc_list);
+ CORBA_free (subject);
+ }
+
+ GNOME_Evolution_Composer_show (composer_server, &ev);
+
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_printerr ("gui/e-meeting-edit.c: I couldn't show the composer via CORBA! Aagh.\n");
+ CORBA_exception_free (&ev);
+ return;
+ }
+
+ CORBA_exception_free (&ev);
+}
+
+void
+e_card_send (ECard *card, ECardDisposition disposition)
+{
+ GList *list;
+ list = g_list_prepend (NULL, card);
+ e_card_list_send (list, disposition);
+ g_list_free (list);
+}
+
gboolean
e_card_evolution_list (ECard *card)
{
diff --git a/addressbook/backend/ebook/e-card.h b/addressbook/backend/ebook/e-card.h
index d82d5f4cb6..dbaa954ba7 100644
--- a/addressbook/backend/ebook/e-card.h
+++ b/addressbook/backend/ebook/e-card.h
@@ -13,17 +13,16 @@
#define __E_CARD_H__
#include <time.h>
-#include <glib-object.h>
+#include <gtk/gtkobject.h>
#include <stdio.h>
#include <ebook/e-card-types.h>
#include <e-util/e-list.h>
#define E_TYPE_CARD (e_card_get_type ())
-#define E_CARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CARD, ECard))
-#define E_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CARD, ECardClass))
-#define E_IS_CARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CARD))
-#define E_IS_CARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CARD))
-#define E_CARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_CARD, ECardClass))
+#define E_CARD(obj) (GTK_CHECK_CAST ((obj), E_TYPE_CARD, ECard))
+#define E_CARD_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_CARD, ECardClass))
+#define E_IS_CARD(obj) (GTK_CHECK_TYPE ((obj), E_TYPE_CARD))
+#define E_IS_CARD_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_CARD))
typedef struct _ECard ECard;
typedef struct _ECardClass ECardClass;
@@ -31,7 +30,7 @@ typedef struct _ECardClass ECardClass;
struct _EBook; /* Forward reference */
struct _ECard {
- GObject object;
+ GtkObject object;
char *id;
struct _EBook *book; /* The EBook this card is from. */
@@ -113,7 +112,7 @@ struct _ECard {
};
struct _ECardClass {
- GObjectClass parent_class;
+ GtkObjectClass parent_class;
GHashTable *attribute_jump_table;
};
@@ -196,6 +195,16 @@ GList *e_card_load_cards_from_string_with_default_charset (const
char *default_charset);
void e_card_free_empty_lists (ECard *card);
+enum _ECardDisposition {
+ E_CARD_DISPOSITION_AS_ATTACHMENT,
+ E_CARD_DISPOSITION_AS_TO,
+};
+typedef enum _ECardDisposition ECardDisposition;
+void e_card_send (ECard *card,
+ ECardDisposition disposition);
+void e_card_list_send (GList *cards,
+ ECardDisposition disposition);
+
/* Getting ECards via their URIs */
typedef void (*ECardCallback) (ECard *card, gpointer closure);
void e_card_load_uri (const gchar *book_uri,
@@ -204,6 +213,7 @@ void e_card_load_uri (const gchar
gpointer closure);
-GType e_card_get_type (void);
+/* Standard Gtk function */
+GtkType e_card_get_type (void);
#endif /* ! __E_CARD_H__ */
diff --git a/addressbook/backend/ebook/evolution-ldif-importer.c b/addressbook/backend/ebook/evolution-ldif-importer.c
index 7a204daa95..5602f3fb18 100644
--- a/addressbook/backend/ebook/evolution-ldif-importer.c
+++ b/addressbook/backend/ebook/evolution-ldif-importer.c
@@ -13,24 +13,22 @@
*/
#include <config.h>
+#include <bonobo.h>
+#include <gnome.h>
+#include <liboaf/liboaf.h>
#include <stdio.h>
#include <ctype.h>
-#include <string.h>
#include <e-book.h>
-#include <e-book-util.h>
#include <e-card-simple.h>
#include <e-destination.h>
-#include <libgnome/gnome-init.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-main.h>
-
#include <importer/evolution-importer.h>
#include <importer/GNOME_Evolution_Importer.h>
#define COMPONENT_FACTORY_IID "OAFIID:GNOME_Evolution_Addressbook_LDIF_ImporterFactory"
-#define COMPONENT_IID "OAFIID:GNOME_Evolution_Addressbook_LDIF_Importer"
+
+static BonoboGenericFactory *factory = NULL;
static GHashTable *dn_card_hash;
@@ -240,17 +238,17 @@ parseLine( ECardSimple *simple, ECardDeliveryAddress *address, char **buf )
field_handled = FALSE;
for (i = 0; i < num_ldif_fields; i ++) {
- if (!g_ascii_strcasecmp (ptr, ldif_fields[i].ldif_attribute)) {
+ if (!g_strcasecmp (ptr, ldif_fields[i].ldif_attribute)) {
if (ldif_fields[i].flags & FLAG_ADDRESS) {
- if (!g_ascii_strcasecmp (ptr, "locality"))
+ if (!g_strcasecmp (ptr, "locality"))
address->city = g_strdup (ldif_value->str);
- else if (!g_ascii_strcasecmp (ptr, "countryname"))
+ else if (!g_strcasecmp (ptr, "countryname"))
address->country = g_strdup (ldif_value->str);
- else if (!g_ascii_strcasecmp (ptr, "postalcode"))
+ else if (!g_strcasecmp (ptr, "postalcode"))
address->code = g_strdup (ldif_value->str);
- else if (!g_ascii_strcasecmp (ptr, "st"))
+ else if (!g_strcasecmp (ptr, "st"))
address->region = g_strdup (ldif_value->str);
- else if (!g_ascii_strcasecmp (ptr, "streetaddress"))
+ else if (!g_strcasecmp (ptr, "streetaddress"))
address->street = g_strdup (ldif_value->str);
}
else {
@@ -264,16 +262,16 @@ parseLine( ECardSimple *simple, ECardDeliveryAddress *address, char **buf )
/* handle objectclass/dn/member out here */
if (!field_handled) {
- if (!g_ascii_strcasecmp (ptr, "dn"))
+ if (!g_strcasecmp (ptr, "dn"))
g_hash_table_insert (dn_card_hash, g_strdup(ldif_value->str), simple->card);
- else if (!g_ascii_strcasecmp (ptr, "objectclass") && !g_ascii_strcasecmp (ldif_value->str, "groupofnames")) {
+ else if (!g_strcasecmp (ptr, "objectclass") && !g_strcasecmp (ldif_value->str, "groupofnames")) {
e_card_simple_set (simple, E_CARD_SIMPLE_FIELD_IS_LIST, "true");
}
- else if (!g_ascii_strcasecmp (ptr, "member")) {
+ else if (!g_strcasecmp (ptr, "member")) {
EList *email;
- g_object_get (simple->card,
- "email", &email,
- NULL);
+ gtk_object_get (GTK_OBJECT (simple->card),
+ "email", &email,
+ NULL);
e_list_append (email, ldif_value->str);
}
}
@@ -328,7 +326,7 @@ getNextLDIFEntry( FILE *f )
while (buf) {
if (!parseLine (simple, address, &buf)) {
/* parsing error */
- g_object_unref (simple);
+ gtk_object_unref (GTK_OBJECT (simple));
e_card_delivery_address_unref (address);
return NULL;
}
@@ -376,17 +374,17 @@ resolve_list_card (LDIFImporter *gci, ECard *card)
if (!e_card_evolution_list (card))
return;
- g_object_get (card,
- "email", &email,
- "full_name", &full_name,
- NULL);
+ gtk_object_get (GTK_OBJECT (card),
+ "email", &email,
+ "full_name", &full_name,
+ NULL);
/* set file_as to full_name so we don't later try and figure
out a first/last name for the list. */
if (full_name)
- g_object_set (card,
- "file_as", full_name,
- NULL);
+ gtk_object_set (GTK_OBJECT (card),
+ "file_as", full_name,
+ NULL);
email_iter = e_list_get_iterator (email);
while (e_iterator_is_valid (email_iter)) {
@@ -399,7 +397,7 @@ resolve_list_card (LDIFImporter *gci, ECard *card)
gchar *dest_xml;
e_destination_set_card (dest, dn_card, 0); /* Hard-wired for default e-mail, since netscape only exports 1 email address */
dest_xml = e_destination_export (dest);
- g_object_unref (dest);
+ gtk_object_unref (GTK_OBJECT (dest));
if (dest_xml) {
e_iterator_set (email_iter, dest_xml);
g_free (dest_xml);
@@ -450,18 +448,33 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure)
}
static void
-ebook_open (LDIFImporter *gci, const char *uri)
+ebook_create (LDIFImporter *gci)
{
+ gchar *path, *uri;
+
gci->book = e_book_new ();
if (!gci->book) {
printf ("%s: %s(): Couldn't create EBook, bailing.\n",
__FILE__,
- G_GNUC_FUNCTION);
+ __FUNCTION__);
return;
}
+#if 0
+ path = g_concat_dir_and_file (g_get_home_dir (),
+ "evolution/local/Contacts/addressbook.db");
+ uri = g_strdup_printf ("file://%s", path);
+ g_free (path);
+
+ if (! e_book_load_uri (gci->book, uri, book_open_cb, gci)) {
+ printf ("error calling load_uri!\n");
+ }
+ g_free(uri);
+#endif
- e_book_load_address_book_by_uri (gci->book, uri, book_open_cb, gci);
+ if (! e_book_load_default_book (gci->book, book_open_cb, gci)) {
+ g_warning ("Error calling load_default_book");
+ }
}
/* EvolutionImporter methods */
@@ -536,16 +549,16 @@ support_format_fn (EvolutionImporter *importer,
}
static void
-importer_destroy_cb (gpointer data,
- GObject *where_object_was)
+importer_destroy_cb (GtkObject *object,
+ LDIFImporter *gci)
{
- bonobo_main_quit ();
+ gtk_main_quit ();
}
static gboolean
load_file_fn (EvolutionImporter *importer,
const char *filename,
- const char *uri,
+ const char *folderpath,
void *closure)
{
LDIFImporter *gci;
@@ -555,33 +568,62 @@ load_file_fn (EvolutionImporter *importer,
gci->cardlist = NULL;
gci->iterator = NULL;
gci->ready = FALSE;
- ebook_open (gci, uri);
+ ebook_create (gci);
return TRUE;
}
static BonoboObject *
factory_fn (BonoboGenericFactory *_factory,
- const char *component_id,
void *closure)
{
EvolutionImporter *importer;
LDIFImporter *gci;
- if (!strcmp (component_id, COMPONENT_IID)) {
- gci = g_new (LDIFImporter, 1);
- importer = evolution_importer_new (support_format_fn, load_file_fn,
- process_item_fn, NULL, gci);
+ gci = g_new (LDIFImporter, 1);
+ importer = evolution_importer_new (support_format_fn, load_file_fn,
+ process_item_fn, NULL, gci);
- g_object_weak_ref (G_OBJECT (importer),
- importer_destroy_cb, gci);
+ gtk_signal_connect (GTK_OBJECT (importer), "destroy",
+ GTK_SIGNAL_FUNC (importer_destroy_cb), gci);
- return BONOBO_OBJECT (importer);
+ return BONOBO_OBJECT (importer);
+}
+
+static void
+importer_init (void)
+{
+ if (factory != NULL)
+ return;
+
+ factory = bonobo_generic_factory_new (COMPONENT_FACTORY_IID,
+ factory_fn, NULL);
+
+ if (factory == NULL) {
+ g_error ("Unable to create factory");
}
- else {
- g_warning (COMPONENT_FACTORY_IID ": Don't know what to do with %s", component_id);
- return NULL;
+
+ bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
+}
+
+int
+main (int argc,
+ char **argv)
+{
+ CORBA_ORB orb;
+
+ gnome_init_with_popt_table ("Evolution-LDIF-Importer",
+ "0.0", argc, argv, oaf_popt_options, 0,
+ NULL);
+ orb = oaf_init (argc, argv);
+ if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) {
+ g_error ("Could not initialize Bonobo.");
}
+
+ importer_init ();
+ bonobo_main ();
+
+ return 0;
}
-BONOBO_ACTIVATION_FACTORY (COMPONENT_FACTORY_IID, "Evolution LDIF Importer Factory", VERSION, factory_fn, NULL);
+
diff --git a/addressbook/backend/ebook/evolution-vcard-importer.c b/addressbook/backend/ebook/evolution-vcard-importer.c
index b5baebf2d1..f07192d72c 100644
--- a/addressbook/backend/ebook/evolution-vcard-importer.c
+++ b/addressbook/backend/ebook/evolution-vcard-importer.c
@@ -1,14 +1,13 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#include <config.h>
#include <stdio.h>
-#include <string.h>
+#include <liboaf/liboaf.h>
#include <bonobo/bonobo-context.h>
#include <bonobo/bonobo-generic-factory.h>
#include <bonobo/bonobo-main.h>
#include <e-book.h>
-#include <e-book-util.h>
#include <importer/evolution-importer.h>
#include <importer/GNOME_Evolution_Importer.h>
@@ -16,10 +15,12 @@
#include <e-util/e-path.h>
#define COMPONENT_FACTORY_IID "OAFIID:GNOME_Evolution_Addressbook_VCard_ImporterFactory"
-#define COMPONENT_IID "OAFIID:GNOME_Evolution_Addressbook_VCard_Importer"
+
+static BonoboGenericFactory *factory = NULL;
typedef struct {
char *filename;
+ char *folderpath;
GList *cardlist;
GList *iterator;
EBook *book;
@@ -30,7 +31,7 @@ static void
add_card_cb (EBook *book, EBookStatus status, const gchar *id, gpointer closure)
{
ECard *card = E_CARD(closure);
- g_object_unref(card);
+ gtk_object_unref(GTK_OBJECT(card));
}
static void
@@ -43,18 +44,39 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure)
}
static void
-ebook_open (VCardImporter *gci, const char *uri)
+ebook_create (VCardImporter *gci)
{
+ gchar *path, *uri;
+ gchar *epath;
+
gci->book = e_book_new ();
if (!gci->book) {
printf ("%s: %s(): Couldn't create EBook, bailing.\n",
__FILE__,
- G_GNUC_FUNCTION);
+ __FUNCTION__);
return;
}
- e_book_load_address_book_by_uri (gci->book, uri, book_open_cb, gci);
+#if 0
+ path = g_concat_dir_and_file (g_get_home_dir (), "evolution/local");
+ uri = g_strdup_printf ("file://%s", path);
+ g_free (path);
+
+ epath = e_path_to_physical (uri, gci->folderpath);
+ g_free (uri);
+ uri = g_strdup_printf ("%s/addressbook.db", epath);
+ g_free (epath);
+
+ if (! e_book_load_uri (gci->book, uri, book_open_cb, gci)) {
+ printf ("error calling load_uri!\n");
+ }
+ g_free(uri);
+#endif
+
+ if (! e_book_load_default_book (gci->book, book_open_cb, gci)) {
+ g_warning ("Error calling load_default_book");
+ }
}
/* EvolutionImporter methods */
@@ -128,7 +150,7 @@ check_file_is_vcard (const char *filename)
return FALSE;
}
- if (g_ascii_strncasecmp (line, "BEGIN:VCARD", 11) == 0) {
+ if (g_strncasecmp (line, "BEGIN:VCARD", 11) == 0) {
result = TRUE;
} else {
result = FALSE;
@@ -151,7 +173,7 @@ support_format_fn (EvolutionImporter *importer,
return check_file_is_vcard (filename);
}
for (i = 0; supported_extensions[i] != NULL; i++) {
- if (g_ascii_strcasecmp (supported_extensions[i], ext) == 0)
+ if (g_strcasecmp (supported_extensions[i], ext) == 0)
return check_file_is_vcard (filename);
}
@@ -159,16 +181,16 @@ support_format_fn (EvolutionImporter *importer,
}
static void
-importer_destroy_cb (gpointer data,
- GObject *where_object_was)
+importer_destroy_cb (GtkObject *object,
+ VCardImporter *gci)
{
- bonobo_main_quit ();
+ gtk_main_quit ();
}
static gboolean
load_file_fn (EvolutionImporter *importer,
const char *filename,
- const char *uri,
+ const char *folderpath,
void *closure)
{
VCardImporter *gci;
@@ -179,35 +201,66 @@ load_file_fn (EvolutionImporter *importer,
gci = (VCardImporter *) closure;
gci->filename = g_strdup (filename);
+ gci->folderpath = g_strdup (folderpath);
gci->cardlist = NULL;
gci->iterator = NULL;
gci->ready = FALSE;
- ebook_open (gci, uri);
+ ebook_create (gci);
return TRUE;
}
static BonoboObject *
factory_fn (BonoboGenericFactory *_factory,
- const char *component_id,
void *closure)
{
EvolutionImporter *importer;
VCardImporter *gci;
- if (!strcmp (component_id, COMPONENT_IID)) {
- gci = g_new (VCardImporter, 1);
- importer = evolution_importer_new (support_format_fn, load_file_fn,
- process_item_fn, NULL, gci);
+ gci = g_new (VCardImporter, 1);
+ importer = evolution_importer_new (support_format_fn, load_file_fn,
+ process_item_fn, NULL, gci);
+
+ gtk_signal_connect (GTK_OBJECT (importer), "destroy",
+ GTK_SIGNAL_FUNC (importer_destroy_cb), gci);
- g_object_weak_ref (G_OBJECT (importer),
- importer_destroy_cb, gci);
- return BONOBO_OBJECT (importer);
+ return BONOBO_OBJECT (importer);
+}
+
+static void
+importer_init (void)
+{
+ if (factory != NULL)
+ return;
+
+ factory = bonobo_generic_factory_new (COMPONENT_FACTORY_IID,
+ factory_fn, NULL);
+
+ if (factory == NULL) {
+ g_error ("Unable to create factory");
}
- else {
- g_warning (COMPONENT_FACTORY_IID ": Don't know what to do with %s", component_id);
- return NULL;
+
+ bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
+}
+
+int
+main (int argc,
+ char **argv)
+{
+ CORBA_ORB orb;
+
+ gnome_init_with_popt_table ("Evolution-VCard-Importer",
+ PACKAGE, argc, argv, oaf_popt_options, 0,
+ NULL);
+ orb = oaf_init (argc, argv);
+ if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE) {
+ g_error ("Could not initialize Bonobo.");
}
+
+ importer_init ();
+ bonobo_main ();
+
+ return 0;
}
-BONOBO_ACTIVATION_FACTORY (COMPONENT_FACTORY_IID, "Evolution VCard Importer Factory", VERSION, factory_fn, NULL);
+
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index 06eb84cc4e..ddef2a568b 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -10,13 +10,15 @@
#include "pas-backend-file.h"
#include <stdio.h>
-#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <time.h>
#include <db.h>
#include <sys/stat.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
+
#include <e-util/e-db3-utils.h>
#if DB_VERSION_MAJOR != 3 || \
@@ -25,14 +27,15 @@
#error Including wrong DB3. Need libdb 3.1.17.
#endif
+#include <gtk/gtksignal.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-util.h>
#include <gal/util/e-util.h>
#include <gal/widgets/e-unicode.h>
#include <ebook/e-card-simple.h>
#include <e-util/e-dbhash.h>
#include <e-util/e-db3-utils.h>
-#include <libgnome/gnome-i18n.h>
-
#include "pas-book.h"
#include "pas-card-cursor.h"
#include "pas-backend-card-sexp.h"
@@ -51,10 +54,13 @@ typedef struct _PASBackendFileSearchContext PASBackendFileSearchContext;
typedef struct _PasBackendFileChangeContext PASBackendFileChangeContext;
struct _PASBackendFilePrivate {
+ GList *clients;
+ gboolean loaded;
char *uri;
char *filename;
DB *file_db;
EList *book_views;
+ gboolean writable;
GHashTable *address_lists;
PASBackendSummary *summary;
};
@@ -208,7 +214,7 @@ pas_backend_file_book_view_copy(const PASBackendFileBookView *book_view, void *c
new_book_view->search = g_strdup(book_view->search);
new_book_view->card_sexp = book_view->card_sexp;
if (new_book_view->card_sexp)
- g_object_ref(new_book_view->card_sexp);
+ gtk_object_ref(GTK_OBJECT(new_book_view->card_sexp));
new_book_view->change_id = g_strdup(book_view->change_id);
if (book_view->change_context) {
@@ -230,7 +236,7 @@ pas_backend_file_book_view_free(PASBackendFileBookView *book_view, void *closure
{
g_free(book_view->search);
if (book_view->card_sexp)
- g_object_unref (book_view->card_sexp);
+ gtk_object_unref (GTK_OBJECT(book_view->card_sexp));
g_free(book_view->change_id);
if (book_view->change_context) {
@@ -268,7 +274,7 @@ get_nth(PASCardCursor *cursor, long n, gpointer data)
}
static void
-cursor_destroy(gpointer data, GObject *where_object_was)
+cursor_destroy(GtkObject *object, gpointer data)
{
CORBA_Environment ev;
GNOME_Evolution_Addressbook_Book corba_book;
@@ -294,7 +300,7 @@ cursor_destroy(gpointer data, GObject *where_object_was)
}
static void
-view_destroy(gpointer data, GObject *where_object_was)
+view_destroy(GtkObject *object, gpointer data)
{
PASBook *book = (PASBook *)data;
PASBackendFile *bf;
@@ -304,7 +310,7 @@ view_destroy(gpointer data, GObject *where_object_was)
bf = PAS_BACKEND_FILE(pas_book_get_backend(book));
for (iterator = e_list_get_iterator(bf->priv->book_views); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
const PASBackendFileBookView *view = e_iterator_get(iterator);
- if (view->book_view == (PASBookView*)where_object_was) {
+ if (view->book_view == PAS_BOOK_VIEW(object)) {
e_iterator_delete(iterator);
success = TRUE;
break;
@@ -312,7 +318,7 @@ view_destroy(gpointer data, GObject *where_object_was)
}
if (!success)
g_warning ("Failed to remove from book_views list");
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
bonobo_object_unref(BONOBO_OBJECT(book));
}
@@ -337,116 +343,6 @@ vcard_matches_search (const PASBackendFileBookView *view, char *vcard_string)
return pas_backend_card_sexp_match_vcard (view->card_sexp, vcard_string);
}
-static gboolean
-ecard_matches_search (const PASBackendFileBookView *view, ECard *card)
-{
- /* If this is not a search context view, it doesn't match be default */
- if (view->card_sexp == NULL)
- return FALSE;
-
- return pas_backend_card_sexp_match_ecard (view->card_sexp, card);
-}
-
-typedef struct {
- PASBackendFile *bf;
- PASBook *book;
- const PASBackendFileBookView *view;
- DBC *dbc;
-
- int card_count;
- int card_threshold;
- int card_threshold_max;
- GList *cards;
-
- gboolean done_first;
- gboolean search_needed;
-} FileBackendSearchClosure;
-
-static void
-free_search_closure (FileBackendSearchClosure *closure)
-{
- g_list_foreach (closure->cards, (GFunc)g_free, NULL);
- g_list_free (closure->cards);
- g_free (closure);
-}
-
-static gboolean
-pas_backend_file_search_timeout (gpointer data)
-{
- FileBackendSearchClosure *closure = data;
- int db_error = 0;
- DBT id_dbt, vcard_dbt;
- int file_version_name_len;
- DBC *dbc = closure->dbc;
-
- file_version_name_len = strlen (PAS_BACKEND_FILE_VERSION_NAME);
-
- memset (&id_dbt, 0, sizeof (id_dbt));
- memset (&vcard_dbt, 0, sizeof (vcard_dbt));
-
- if (closure->done_first) {
- db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
- }
- else {
- db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_FIRST);
- closure->done_first = TRUE;
- }
-
- while (db_error == 0) {
-
- /* don't include the version in the list of cards */
- if (id_dbt.size != file_version_name_len+1
- || strcmp (id_dbt.data, PAS_BACKEND_FILE_VERSION_NAME)) {
- char *vcard_string = vcard_dbt.data;
-
- /* check if the vcard matches the search sexp */
- if ((!closure->search_needed) || vcard_matches_search (closure->view, vcard_string)) {
- closure->cards = g_list_prepend (closure->cards, g_strdup (vcard_string));
- closure->card_count ++;
- }
-
- /* If we've accumulated a number of checks, pass them off to the client. */
- if (closure->card_count >= closure->card_threshold) {
- pas_book_view_notify_add (closure->view->book_view, closure->cards);
- /* Clean up the handed-off data. */
- g_list_foreach (closure->cards, (GFunc)g_free, NULL);
- g_list_free (closure->cards);
- closure->cards = NULL;
- closure->card_count = 0;
-
- /* Yeah, this scheme is overly complicated. But I like it. */
- if (closure->card_threshold < closure->card_threshold_max) {
- closure->card_threshold = MIN (2*closure->card_threshold, closure->card_threshold_max);
- }
-
- /* return here, we'll do the next lump in the next callback */
- g_timeout_add (200, pas_backend_file_search_timeout, closure);
-
- return FALSE;
- }
- }
-
- db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
- }
-
- dbc->c_close (dbc);
-
- if (db_error != DB_NOTFOUND) {
- g_warning ("pas_backend_file_search: error building list\n");
- free_search_closure (closure);
- }
-
- if (closure->card_count)
- pas_book_view_notify_add (closure->view->book_view, closure->cards);
-
- pas_book_view_notify_complete (closure->view->book_view, GNOME_Evolution_Addressbook_BookViewListener_Success);
-
- free_search_closure (closure);
-
- return FALSE;
-}
-
-
static void
pas_backend_file_search (PASBackendFile *bf,
PASBook *book,
@@ -456,6 +352,9 @@ pas_backend_file_search (PASBackendFile *bf,
PASBackendFileBookView *view = (PASBackendFileBookView *)cnstview;
gboolean search_needed;
+ if (!bf->priv->loaded)
+ return;
+
search_needed = TRUE;
if ( ! strcmp (view->search, "(contains \"x-evolution-any-field\" \"\")"))
@@ -467,7 +366,7 @@ pas_backend_file_search (PASBackendFile *bf,
pas_book_view_notify_status_message (view->book_view, _("Loading..."));
if (view->card_sexp) {
- g_object_unref (view->card_sexp);
+ gtk_object_unref (GTK_OBJECT(view->card_sexp));
view->card_sexp = NULL;
}
@@ -482,24 +381,74 @@ pas_backend_file_search (PASBackendFile *bf,
do_summary_query (bf, view, completion_search);
}
else {
- FileBackendSearchClosure *closure = g_new0 (FileBackendSearchClosure, 1);
- DB *db = bf->priv->file_db;
- int db_error;
+ gint card_count = 0, card_threshold = 20, card_threshold_max = 3000;
+ int db_error = 0;
+ GList *cards = NULL;
+ DB *db = bf->priv->file_db;
+ DBC *dbc;
+ DBT id_dbt, vcard_dbt;
+ int file_version_name_len;
+
+ file_version_name_len = strlen (PAS_BACKEND_FILE_VERSION_NAME);
- closure->card_threshold = 20;
- closure->card_threshold_max = 3000;
- closure->search_needed = search_needed;
- closure->view = view;
- closure->bf = bf;
- closure->book = book;
+ db_error = db->cursor (db, NULL, &dbc, 0);
- db_error = db->cursor (db, NULL, &closure->dbc, 0);
+ memset (&id_dbt, 0, sizeof (id_dbt));
+ memset (&vcard_dbt, 0, sizeof (vcard_dbt));
if (db_error != 0) {
g_warning ("pas_backend_file_search: error building list\n");
} else {
- g_idle_add (pas_backend_file_search_timeout, closure);
+ db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_FIRST);
+
+ while (db_error == 0) {
+
+ /* don't include the version in the list of cards */
+ if (id_dbt.size != file_version_name_len+1
+ || strcmp (id_dbt.data, PAS_BACKEND_FILE_VERSION_NAME)) {
+ char *vcard_string = vcard_dbt.data;
+
+ /* check if the vcard matches the search sexp */
+ if ((!search_needed) || vcard_matches_search (view, vcard_string)) {
+ cards = g_list_prepend (cards, g_strdup (vcard_string));
+ card_count ++;
+ }
+
+ /* If we've accumulated a number of checks, pass them off to the client. */
+ if (card_count >= card_threshold) {
+ pas_book_view_notify_add (view->book_view, cards);
+ /* Clean up the handed-off data. */
+ g_list_foreach (cards, (GFunc)g_free, NULL);
+ g_list_free (cards);
+ cards = NULL;
+ card_count = 0;
+
+ /* Yeah, this scheme is overly complicated. But I like it. */
+ if (card_threshold < card_threshold_max) {
+ card_threshold = MIN (2*card_threshold, card_threshold_max);
+ }
+ }
+ }
+
+ db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
+ }
+ dbc->c_close (dbc);
+
+ if (db_error != DB_NOTFOUND) {
+ g_warning ("pas_backend_file_search: error building list\n");
+ }
}
+
+ if (card_count)
+ pas_book_view_notify_add (view->book_view, cards);
+
+ pas_book_view_notify_complete (view->book_view, GNOME_Evolution_Addressbook_BookViewListener_Success);
+
+ /*
+ ** It's fine to do this now since the data has been handed off.
+ */
+ g_list_foreach (cards, (GFunc)g_free, NULL);
+ g_list_free (cards);
}
}
@@ -541,6 +490,9 @@ pas_backend_file_changes (PASBackendFile *bf,
memset (&id_dbt, 0, sizeof (id_dbt));
memset (&vcard_dbt, 0, sizeof (vcard_dbt));
+ if (!bf->priv->loaded)
+ return;
+
/* Find the changed ids */
dirname = g_strdup (bf->priv->filename);
slash = strrchr (dirname, '/');
@@ -572,9 +524,9 @@ pas_backend_file_changes (PASBackendFile *bf,
* card changing
*/
card = e_card_new (vcard_dbt.data);
- g_object_set (card, "last_use", NULL, "use_score", 0.0, NULL);
+ gtk_object_set (GTK_OBJECT (card), "last_use", NULL, "use_score", 0.0, NULL);
vcard_string = e_card_get_vcard_assume_utf8 (card);
- g_object_unref (card);
+ gtk_object_unref (GTK_OBJECT (card));
/* check what type of change has occurred, if any */
switch (e_dbhash_compare (ehash, id, vcard_string)) {
@@ -612,7 +564,7 @@ pas_backend_file_changes (PASBackendFile *bf,
for (v = ctx->del_ids; v != NULL; v = v->next){
char *id = v->data;
- pas_book_view_notify_remove_1 (view->book_view, id);
+ pas_book_view_notify_remove (view->book_view, id);
}
pas_book_view_notify_complete (view->book_view, GNOME_Evolution_Addressbook_BookViewListener_Success);
@@ -684,7 +636,7 @@ do_create(PASBackend *backend,
ret_val = NULL;
}
- g_object_unref(card);
+ gtk_object_unref(GTK_OBJECT(card));
card = NULL;
if (vcard_ptr && ret_val)
@@ -716,7 +668,7 @@ pas_backend_file_process_create_card (PASBackend *backend,
bonobo_object_unref (BONOBO_OBJECT (view->book_view));
}
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
pas_book_respond_create (
book,
@@ -739,76 +691,59 @@ pas_backend_file_process_create_card (PASBackend *backend,
}
static void
-pas_backend_file_process_remove_cards (PASBackend *backend,
- PASBook *book,
- PASRemoveCardsRequest *req)
+pas_backend_file_process_remove_card (PASBackend *backend,
+ PASBook *book,
+ PASRemoveCardRequest *req)
{
PASBackendFile *bf = PAS_BACKEND_FILE (backend);
DB *db = bf->priv->file_db;
DBT id_dbt, vcard_dbt;
int db_error;
EIterator *iterator;
+ char *vcard_string;
const char *id;
- GList *l;
- GList *removed_cards = NULL;
- GNOME_Evolution_Addressbook_BookListener_CallStatus rv = GNOME_Evolution_Addressbook_BookListener_Success;
-
- for (l = req->ids; l; l = l->next) {
- id = l->data;
- string_to_dbt (id, &id_dbt);
- memset (&vcard_dbt, 0, sizeof (vcard_dbt));
+ id = req->id;
+ string_to_dbt (id, &id_dbt);
+ memset (&vcard_dbt, 0, sizeof (vcard_dbt));
- db_error = db->get (db, NULL, &id_dbt, &vcard_dbt, 0);
- if (0 != db_error) {
- rv = GNOME_Evolution_Addressbook_BookListener_CardNotFound;
- continue;
- }
+ db_error = db->get (db, NULL, &id_dbt, &vcard_dbt, 0);
+ if (0 != db_error) {
+ pas_book_respond_remove (
+ book,
+ GNOME_Evolution_Addressbook_BookListener_CardNotFound);
+ return;
+ }
- db_error = db->del (db, NULL, &id_dbt, 0);
- if (0 != db_error) {
- rv = GNOME_Evolution_Addressbook_BookListener_CardNotFound;
- continue;
- }
-
- removed_cards = g_list_prepend (removed_cards, e_card_new (vcard_dbt.data));
+ db_error = db->del (db, NULL, &id_dbt, 0);
+ if (0 != db_error) {
+ pas_book_respond_remove (
+ book,
+ GNOME_Evolution_Addressbook_BookListener_CardNotFound);
+ return;
}
- /* if we actually removed some, try to sync */
- if (removed_cards) {
- db_error = db->sync (db, 0);
- if (db_error != 0)
- g_warning ("db->sync failed.\n");
- }
+ db_error = db->sync (db, 0);
+ if (db_error != 0)
+ g_warning ("db->sync failed.\n");
+
+ vcard_string = vcard_dbt.data;
for (iterator = e_list_get_iterator (bf->priv->book_views); e_iterator_is_valid(iterator); e_iterator_next(iterator)) {
const PASBackendFileBookView *view = e_iterator_get(iterator);
- GList *view_removed = NULL;
- for (l = removed_cards; l; l = l->next) {
- ECard *removed_card = l->data;
- if (ecard_matches_search (view, removed_card)) {
- view_removed = g_list_prepend (view_removed, (char*)e_card_get_id (removed_card));
- }
- }
- if (view_removed) {
+ if (vcard_matches_search (view, vcard_string)) {
bonobo_object_ref (BONOBO_OBJECT (view->book_view));
- pas_book_view_notify_remove (view->book_view, view_removed);
+ pas_book_view_notify_remove (view->book_view, req->id);
pas_book_view_notify_complete (view->book_view, GNOME_Evolution_Addressbook_BookViewListener_Success);
bonobo_object_unref (BONOBO_OBJECT (view->book_view));
- g_list_free (view_removed);
}
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
- pas_book_respond_remove (book, rv);
-
- for (l = removed_cards; l; l = l->next) {
- ECard *c = l->data;
- pas_backend_summary_remove_card (bf->priv->summary, e_card_get_id (c));
- g_object_unref (c);
- }
-
- g_list_free (removed_cards);
+ pas_book_respond_remove (
+ book,
+ GNOME_Evolution_Addressbook_BookListener_Success);
+ pas_backend_summary_remove_card (bf->priv->summary, id);
}
static void
@@ -878,7 +813,7 @@ pas_backend_file_process_modify_card (PASBackend *backend,
else if (new_match)
pas_book_view_notify_add_1 (view->book_view, req->vcard);
else /* if (old_match) */
- pas_book_view_notify_remove_1 (view->book_view, id);
+ pas_book_view_notify_remove (view->book_view, id);
pas_book_view_notify_complete (view->book_view, GNOME_Evolution_Addressbook_BookViewListener_Success);
@@ -887,7 +822,7 @@ pas_backend_file_process_modify_card (PASBackend *backend,
CORBA_exception_free (&ev);
}
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
pas_book_respond_modify (
book,
@@ -904,7 +839,7 @@ pas_backend_file_process_modify_card (PASBackend *backend,
g_free(old_vcard_string);
- g_object_unref(card);
+ gtk_object_unref(GTK_OBJECT(card));
}
static void
@@ -1038,8 +973,8 @@ pas_backend_file_process_get_cursor (PASBackend *backend,
get_nth,
cursor_data);
- g_object_weak_ref (G_OBJECT (cursor),
- cursor_destroy, cursor_data);
+ gtk_signal_connect(GTK_OBJECT(cursor), "destroy",
+ GTK_SIGNAL_FUNC(cursor_destroy), cursor_data);
pas_book_respond_get_cursor (
book,
@@ -1059,11 +994,14 @@ pas_backend_file_process_get_book_view (PASBackend *backend,
PASBackendFileBookView view;
EIterator *iterator;
+ g_return_if_fail (req->listener != NULL);
+
bonobo_object_ref(BONOBO_OBJECT(book));
book_view = pas_book_view_new (req->listener);
- g_object_weak_ref (G_OBJECT (book_view), view_destroy, book);
+ gtk_signal_connect(GTK_OBJECT(book_view), "destroy",
+ GTK_SIGNAL_FUNC(view_destroy), book);
view.book_view = book_view;
view.search = g_strdup (req->search);
@@ -1079,13 +1017,10 @@ pas_backend_file_process_get_book_view (PASBackend *backend,
: GNOME_Evolution_Addressbook_BookListener_CardNotFound /* XXX */),
book_view);
- if (!pas_backend_is_loaded (backend))
- return;
-
iterator = e_list_get_iterator(bf->priv->book_views);
e_iterator_last(iterator);
pas_backend_file_search (bf, book, e_iterator_get(iterator), FALSE);
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
}
static void
@@ -1098,11 +1033,14 @@ pas_backend_file_process_get_completion_view (PASBackend *backend,
PASBackendFileBookView view;
EIterator *iterator;
+ g_return_if_fail (req->listener != NULL);
+
bonobo_object_ref(BONOBO_OBJECT(book));
book_view = pas_book_view_new (req->listener);
- g_object_weak_ref (G_OBJECT (book_view), view_destroy, book);
+ gtk_signal_connect(GTK_OBJECT(book_view), "destroy",
+ GTK_SIGNAL_FUNC(view_destroy), book);
view.book_view = book_view;
view.search = g_strdup (req->search);
@@ -1118,13 +1056,10 @@ pas_backend_file_process_get_completion_view (PASBackend *backend,
: GNOME_Evolution_Addressbook_BookListener_CardNotFound /* XXX */),
book_view);
- if (!pas_backend_is_loaded (backend))
- return;
-
iterator = e_list_get_iterator(bf->priv->book_views);
e_iterator_last(iterator);
pas_backend_file_search (bf, book, e_iterator_get(iterator), TRUE);
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
}
static void
@@ -1138,11 +1073,14 @@ pas_backend_file_process_get_changes (PASBackend *backend,
PASBackendFileChangeContext ctx;
EIterator *iterator;
+ g_return_if_fail (req->listener != NULL);
+
bonobo_object_ref(BONOBO_OBJECT(book));
book_view = pas_book_view_new (req->listener);
- g_object_weak_ref (G_OBJECT (book_view), view_destroy, book);
+ gtk_signal_connect(GTK_OBJECT(book_view), "destroy",
+ GTK_SIGNAL_FUNC(view_destroy), book);
pas_book_respond_get_changes (book,
(book_view != NULL
@@ -1164,13 +1102,10 @@ pas_backend_file_process_get_changes (PASBackend *backend,
e_list_append(bf->priv->book_views, &view);
- if (!pas_backend_is_loaded (backend))
- return;
-
iterator = e_list_get_iterator(bf->priv->book_views);
e_iterator_last(iterator);
pas_backend_file_changes (bf, book, e_iterator_get(iterator));
- g_object_unref(iterator);
+ gtk_object_unref(GTK_OBJECT(iterator));
}
static void
@@ -1219,14 +1154,85 @@ pas_backend_file_process_get_supported_fields (PASBackend *backend,
for (i = 0; i < E_CARD_SIMPLE_FIELD_LAST; i ++)
e_list_append (fields, e_card_simple_get_ecard_field (simple, i));
- g_object_unref (card);
- g_object_unref (simple);
+ gtk_object_unref (GTK_OBJECT (card));
+ gtk_object_unref (GTK_OBJECT (simple));
pas_book_respond_get_supported_fields (book,
GNOME_Evolution_Addressbook_BookListener_Success,
fields);
}
+static void
+pas_backend_file_process_client_requests (PASBook *book)
+{
+ PASBackend *backend;
+ PASRequest *req;
+
+ backend = pas_book_get_backend (book);
+
+ req = pas_book_pop_request (book);
+ if (req == NULL)
+ return;
+
+ switch (req->op) {
+ case CreateCard:
+ pas_backend_file_process_create_card (backend, book, (PASCreateCardRequest*)req);
+ break;
+
+ case RemoveCard:
+ pas_backend_file_process_remove_card (backend, book, (PASRemoveCardRequest*)req);
+ break;
+
+ case ModifyCard:
+ pas_backend_file_process_modify_card (backend, book, (PASModifyCardRequest*)req);
+ break;
+
+ case CheckConnection:
+ pas_backend_file_process_check_connection (backend, book, (PASCheckConnectionRequest*)req);
+ break;
+
+ case GetVCard:
+ pas_backend_file_process_get_vcard (backend, book, (PASGetVCardRequest*)req);
+ break;
+
+ case GetCursor:
+ pas_backend_file_process_get_cursor (backend, book, (PASGetCursorRequest*)req);
+ break;
+
+ case GetBookView:
+ pas_backend_file_process_get_book_view (backend, book, (PASGetBookViewRequest*)req);
+ break;
+
+ case GetCompletionView:
+ pas_backend_file_process_get_completion_view (backend, book, (PASGetCompletionViewRequest*)req);
+ break;
+
+ case GetChanges:
+ pas_backend_file_process_get_changes (backend, book, (PASGetChangesRequest*)req);
+ break;
+
+ case AuthenticateUser:
+ pas_backend_file_process_authenticate_user (backend, book, (PASAuthenticateUserRequest*)req);
+ break;
+
+ case GetSupportedFields:
+ pas_backend_file_process_get_supported_fields (backend, book, (PASGetSupportedFieldsRequest*)req);
+ break;
+ }
+
+ pas_book_free_request (req);
+}
+
+static void
+pas_backend_file_book_destroy_cb (PASBook *book, gpointer data)
+{
+ PASBackendFile *backend;
+
+ backend = PAS_BACKEND_FILE (data);
+
+ pas_backend_remove_client (PAS_BACKEND (backend), book);
+}
+
/*
** versions:
**
@@ -1301,7 +1307,7 @@ pas_backend_file_upgrade_db (PASBackendFile *bf, char *old_version)
card_failed++;
}
- g_object_unref (card);
+ gtk_object_unref (GTK_OBJECT(card));
}
db_error = dbc->c_get(dbc, &id_dbt, &vcard_dbt, DB_NEXT);
@@ -1353,10 +1359,11 @@ pas_backend_file_maybe_upgrade_db (PASBackendFile *bf)
return ret_val;
}
+
#define INITIAL_VCARD "BEGIN:VCARD\n\
X-EVOLUTION-FILE-AS:Ximian, Inc.\n\
LABEL;WORK;QUOTED-PRINTABLE:401 Park Drive 3 West=0ABoston, MA 02215=0AUSA\n\
-TEL;WORK;VOICE:(617) 375-3800\n\
+TEL;WORK;VOICE:(617) 236-0442\n\
TEL;WORK;FAX:(617) 236-8630\n\
EMAIL;INTERNET:hello@ximian.com\n\
URL:www.ximian.com/\n\
@@ -1378,6 +1385,8 @@ pas_backend_file_load_uri (PASBackend *backend,
struct stat sb;
char *summary_filename;
+ g_assert (bf->priv->loaded == FALSE);
+
db_version (&major, &minor, &patch);
if (major != 3 ||
@@ -1422,10 +1431,10 @@ pas_backend_file_load_uri (PASBackend *backend,
char *create_initial_file;
char *dir;
- dir = g_path_get_dirname(filename);
- create_initial_file = g_build_filename (dir, "create-initial", NULL);
+ dir = g_dirname(filename);
+ create_initial_file = g_concat_dir_and_file(dir, "create-initial");
- if (g_file_test(create_initial_file, G_FILE_TEST_EXISTS)) {
+ if (g_file_exists(create_initial_file)) {
char *id;
id = do_create(backend, INITIAL_VCARD, NULL);
g_free (id);
@@ -1444,9 +1453,14 @@ pas_backend_file_load_uri (PASBackend *backend,
return GNOME_Evolution_Addressbook_BookListener_OtherError;
}
- if (!pas_backend_file_maybe_upgrade_db (bf)) {
+ bf->priv->writable = writable;
+
+ if (pas_backend_file_maybe_upgrade_db (bf))
+ bf->priv->loaded = TRUE;
+ else {
db->close (db, 0);
bf->priv->file_db = NULL;
+ bf->priv->writable = FALSE;
return GNOME_Evolution_Addressbook_BookListener_OtherError;
}
@@ -1459,6 +1473,7 @@ pas_backend_file_load_uri (PASBackend *backend,
if (stat (bf->priv->filename, &sb) == -1) {
db->close (db, 0);
bf->priv->file_db = NULL;
+ bf->priv->writable = FALSE;
return GNOME_Evolution_Addressbook_BookListener_OtherError;
}
db_mtime = sb.st_mtime;
@@ -1472,8 +1487,6 @@ pas_backend_file_load_uri (PASBackend *backend,
build_summary (bf->priv);
}
- pas_backend_set_is_loaded (backend, TRUE);
- pas_backend_set_is_writable (backend, writable);
return GNOME_Evolution_Addressbook_BookListener_Success;
}
@@ -1485,15 +1498,99 @@ pas_backend_file_get_uri (PASBackend *backend)
bf = PAS_BACKEND_FILE (backend);
+ g_return_val_if_fail (bf->priv->loaded, NULL);
g_assert (bf->priv->uri != NULL);
return bf->priv->uri;
}
+static gboolean
+pas_backend_file_add_client (PASBackend *backend,
+ GNOME_Evolution_Addressbook_BookListener listener)
+{
+ PASBackendFile *bf;
+ PASBook *book;
+
+ g_assert (backend != NULL);
+ g_assert (PAS_IS_BACKEND_FILE (backend));
+
+ bf = PAS_BACKEND_FILE (backend);
+
+ book = pas_book_new (backend, listener);
+
+ if (!book) {
+ if (!bf->priv->clients)
+ pas_backend_last_client_gone (backend);
+
+ return FALSE;
+ }
+
+ gtk_signal_connect (GTK_OBJECT (book), "destroy",
+ pas_backend_file_book_destroy_cb, backend);
+
+ gtk_signal_connect (GTK_OBJECT (book), "requests_queued",
+ pas_backend_file_process_client_requests, NULL);
+
+ bf->priv->clients = g_list_prepend (
+ bf->priv->clients, book);
+
+ if (bf->priv->loaded) {
+ pas_book_respond_open (
+ book, GNOME_Evolution_Addressbook_BookListener_Success);
+ if (bf->priv->writable)
+ pas_book_report_writable (book, bf->priv->writable);
+ } else {
+ pas_book_respond_open (
+ book, GNOME_Evolution_Addressbook_BookListener_OtherError);
+ }
+
+ bonobo_object_unref (BONOBO_OBJECT (book));
+
+ return TRUE;
+}
+
+static void
+pas_backend_file_remove_client (PASBackend *backend,
+ PASBook *book)
+{
+ PASBackendFile *bf;
+ GList *l;
+ PASBook *lbook;
+
+ g_return_if_fail (backend != NULL);
+ g_return_if_fail (PAS_IS_BACKEND_FILE (backend));
+ g_return_if_fail (book != NULL);
+ g_return_if_fail (PAS_IS_BOOK (book));
+
+ bf = PAS_BACKEND_FILE (backend);
+
+ /* Find the book in the list of clients */
+
+ for (l = bf->priv->clients; l; l = l->next) {
+ lbook = PAS_BOOK (l->data);
+
+ if (lbook == book)
+ break;
+ }
+
+ g_assert (l != NULL);
+
+ /* Disconnect */
+
+ bf->priv->clients = g_list_remove_link (bf->priv->clients, l);
+ g_list_free_1 (l);
+
+ /* When all clients go away, notify the parent factory about it so that
+ * it may decide whether to kill the backend or not.
+ */
+ if (!bf->priv->clients)
+ pas_backend_last_client_gone (backend);
+}
+
static char *
-pas_backend_file_get_static_capabilities (PASBackend *backend)
+pas_backend_file_get_static_capabilities (PASBackend *backend)
{
- return g_strdup("local,do-initial-query,bulk-removes");
+ return g_strdup("local,do-initial-query,cache-completions");
}
static gboolean
@@ -1516,10 +1613,10 @@ pas_backend_file_new (void)
{
PASBackendFile *backend;
- backend = g_object_new (PAS_TYPE_BACKEND_FILE, NULL);
+ backend = gtk_type_new (pas_backend_file_get_type ());
if (! pas_backend_file_construct (backend)) {
- g_object_unref (backend);
+ gtk_object_unref (GTK_OBJECT (backend));
return NULL;
}
@@ -1528,53 +1625,40 @@ pas_backend_file_new (void)
}
static void
-pas_backend_file_dispose (GObject *object)
+pas_backend_file_destroy (GtkObject *object)
{
PASBackendFile *bf;
bf = PAS_BACKEND_FILE (object);
- if (bf->priv) {
- g_object_unref(bf->priv->book_views);
- g_object_unref(bf->priv->summary);
- g_free (bf->priv->uri);
- g_free (bf->priv->filename);
+ gtk_object_unref(GTK_OBJECT(bf->priv->book_views));
+ gtk_object_unref(GTK_OBJECT(bf->priv->summary));
+ g_free (bf->priv->uri);
+ g_free (bf->priv->filename);
- g_free (bf->priv);
- bf->priv = NULL;
- }
+ g_free (bf->priv);
- G_OBJECT_CLASS (pas_backend_file_parent_class)->dispose (object);
+ GTK_OBJECT_CLASS (pas_backend_file_parent_class)->destroy (object);
}
static void
pas_backend_file_class_init (PASBackendFileClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkObjectClass *object_class = (GtkObjectClass *) klass;
PASBackendClass *parent_class;
- pas_backend_file_parent_class = g_type_class_peek_parent (klass);
+ pas_backend_file_parent_class = gtk_type_class (pas_backend_get_type ());
parent_class = PAS_BACKEND_CLASS (klass);
/* Set the virtual methods. */
parent_class->load_uri = pas_backend_file_load_uri;
parent_class->get_uri = pas_backend_file_get_uri;
+ parent_class->add_client = pas_backend_file_add_client;
+ parent_class->remove_client = pas_backend_file_remove_client;
parent_class->get_static_capabilities = pas_backend_file_get_static_capabilities;
- parent_class->create_card = pas_backend_file_process_create_card;
- parent_class->remove_cards = pas_backend_file_process_remove_cards;
- parent_class->modify_card = pas_backend_file_process_modify_card;
- parent_class->check_connection = pas_backend_file_process_check_connection;
- parent_class->get_vcard = pas_backend_file_process_get_vcard;
- parent_class->get_cursor = pas_backend_file_process_get_cursor;
- parent_class->get_book_view = pas_backend_file_process_get_book_view;
- parent_class->get_completion_view = pas_backend_file_process_get_completion_view;
- parent_class->get_changes = pas_backend_file_process_get_changes;
- parent_class->authenticate_user = pas_backend_file_process_authenticate_user;
- parent_class->get_supported_fields = pas_backend_file_process_get_supported_fields;
-
- object_class->dispose = pas_backend_file_dispose;
+ object_class->destroy = pas_backend_file_destroy;
}
static void
@@ -1583,8 +1667,11 @@ pas_backend_file_init (PASBackendFile *backend)
PASBackendFilePrivate *priv;
priv = g_new0 (PASBackendFilePrivate, 1);
+ priv->loaded = FALSE;
+ priv->clients = NULL;
priv->book_views = e_list_new((EListCopyFunc) pas_backend_file_book_view_copy, (EListFreeFunc) pas_backend_file_book_view_free, NULL);
priv->uri = NULL;
+ priv->writable = FALSE;
backend->priv = priv;
}
@@ -1592,25 +1679,24 @@ pas_backend_file_init (PASBackendFile *backend)
/**
* pas_backend_file_get_type:
*/
-GType
+GtkType
pas_backend_file_get_type (void)
{
- static GType type = 0;
+ static GtkType type = 0;
if (! type) {
- GTypeInfo info = {
- sizeof (PASBackendFileClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) pas_backend_file_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ GtkTypeInfo info = {
+ "PASBackendFile",
sizeof (PASBackendFile),
- 0, /* n_preallocs */
- (GInstanceInitFunc) pas_backend_file_init
+ sizeof (PASBackendFileClass),
+ (GtkClassInitFunc) pas_backend_file_class_init,
+ (GtkObjectInitFunc) pas_backend_file_init,
+ NULL, /* reserved 1 */
+ NULL, /* reserved 2 */
+ (GtkClassInitFunc) NULL
};
- type = g_type_register_static (PAS_TYPE_BACKEND, "PASBackendFile", &info, 0);
+ type = gtk_type_unique (pas_backend_get_type (), &info);
}
return type;
diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c
index 237bc8597c..866bad8148 100644
--- a/addressbook/backend/pas/pas-backend-ldap.c
+++ b/addressbook/backend/pas/pas-backend-ldap.c
@@ -10,7 +10,10 @@
#include "config.h"
#include <fcntl.h>
-#include <string.h>
+#include <gtk/gtksignal.h>
+
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
#ifdef DEBUG
#define LDAP_DEBUG
@@ -35,7 +38,6 @@
#include <e-util/e-sexp.h>
#include <ebook/e-card-simple.h>
-#include <libgnome/gnome-i18n.h>
#include "pas-backend-ldap.h"
#include "pas-backend-card-sexp.h"
@@ -44,9 +46,6 @@
#include <stdlib.h>
-/* this is broken currently, don't enable it */
-/*#define ENABLE_SASL_BINDS*/
-
typedef enum {
PAS_BACKEND_LDAP_TLS_NO,
PAS_BACKEND_LDAP_TLS_ALWAYS,
@@ -88,6 +87,7 @@ typedef struct LDAPOp LDAPOp;
struct _PASBackendLDAPPrivate {
char *uri;
gboolean connected;
+ GList *clients;
gchar *ldap_host; /* the hostname of the server */
int ldap_port; /* the port of the server */
@@ -112,7 +112,6 @@ struct _PASBackendLDAPPrivate {
LDAP *ldap;
EList *supported_fields;
- EList *supported_auth_methods;
/* whether or not there's support for the objectclass we need
to store all our additional fields */
@@ -120,6 +119,8 @@ struct _PASBackendLDAPPrivate {
gboolean calEntrySupported;
gboolean evolutionPersonChecked;
+ gboolean writable;
+
/* our operations */
GHashTable *id_to_op;
int active_ops;
@@ -293,7 +294,7 @@ remove_view (int msgid, LDAPOp *op, PASBookView *view)
}
static void
-view_destroy(gpointer data, GObject *where_object_was)
+view_destroy(GtkObject *object, gpointer data)
{
PASBook *book = (PASBook *)data;
PASBackendLDAP *bl;
@@ -306,7 +307,7 @@ view_destroy(gpointer data, GObject *where_object_was)
while (e_iterator_is_valid (iter)) {
PASBackendLDAPBookView *view = (PASBackendLDAPBookView*)e_iterator_get (iter);
- if (view->book_view == (PASBookView*)where_object_was) {
+ if (view->book_view == PAS_BOOK_VIEW(object)) {
GNOME_Evolution_Addressbook_Book corba_book;
CORBA_Environment ev;
@@ -321,7 +322,7 @@ view_destroy(gpointer data, GObject *where_object_was)
/* free up the view structure */
g_free (view->search);
- g_object_unref (view->card_sexp);
+ gtk_object_unref (GTK_OBJECT (view->card_sexp));
g_free (view);
/* and remove it from our list */
@@ -346,7 +347,7 @@ view_destroy(gpointer data, GObject *where_object_was)
e_iterator_next (iter);
}
- g_object_unref (iter);
+ gtk_object_unref (GTK_OBJECT (iter));
}
@@ -371,7 +372,7 @@ find_book_view (PASBackendLDAP *bl)
rv = v->book_view;
}
- g_object_unref (iter);
+ gtk_object_unref (GTK_OBJECT (iter));
return rv;
}
@@ -457,20 +458,20 @@ check_schema_support (PASBackendLDAP *bl)
continue;
for (j = 0; oc->oc_names[j]; j++)
- if (!g_ascii_strcasecmp (oc->oc_names[j], EVOLUTIONPERSON)) {
+ if (!g_strcasecmp (oc->oc_names[j], EVOLUTIONPERSON)) {
g_print ("support found on ldap server for objectclass evolutionPerson\n");
bl->priv->evolutionPersonSupported = TRUE;
add_oc_attributes_to_supported_fields (bl, oc);
}
- else if (!g_ascii_strcasecmp (oc->oc_names[j], CALENTRY)) {
+ else if (!g_strcasecmp (oc->oc_names[j], CALENTRY)) {
g_print ("support found on ldap server for objectclass calEntry\n");
bl->priv->calEntrySupported = TRUE;
add_oc_attributes_to_supported_fields (bl, oc);
}
- else if (!g_ascii_strcasecmp (oc->oc_names[j], INETORGPERSON)
- || !g_ascii_strcasecmp (oc->oc_names[j], ORGANIZATIONALPERSON)
- || !g_ascii_strcasecmp (oc->oc_names[j], PERSON)) {
+ else if (!g_strcasecmp (oc->oc_names[j], INETORGPERSON)
+ || !g_strcasecmp (oc->oc_names[j], ORGANIZATIONALPERSON)
+ || !g_strcasecmp (oc->oc_names[j], PERSON)) {
add_oc_attributes_to_supported_fields (bl, oc);
}
@@ -487,7 +488,7 @@ check_schema_support (PASBackendLDAP *bl)
of draconian acl's that keep subschema
reads from working until the user is
authed. */
- if (!pas_backend_is_writable (PAS_BACKEND (bl))) {
+ if (!bl->priv->writable) {
g_warning ("subschema read returned nothing before successful auth");
bl->priv->evolutionPersonChecked = FALSE;
}
@@ -590,25 +591,8 @@ query_ldap_root_dse (PASBackendLDAP *bl)
values = ldap_get_values (ldap, resp, "supportedSASLMechanisms");
if (values) {
- char *auth_method;
- if (bl->priv->supported_auth_methods)
- g_object_unref (bl->priv->supported_auth_methods);
- bl->priv->supported_auth_methods = e_list_new ((EListCopyFunc)g_strdup, (EListFreeFunc)g_free, NULL);
-
- auth_method = g_strdup_printf ("ldap/simple-binddn|%s", _("Using Distinguished Name (DN)"));
- e_list_append (bl->priv->supported_auth_methods, auth_method);
- g_free (auth_method);
-
- auth_method = g_strdup_printf ("ldap/simple-email|%s", _("Using Email Address"));
- e_list_append (bl->priv->supported_auth_methods, auth_method);
- g_free (auth_method);
-
- for (i = 0; values[i]; i++) {
- auth_method = g_strdup_printf ("sasl/%s|%s", values[i], values[i]);
- e_list_append (bl->priv->supported_auth_methods, auth_method);
- g_free (auth_method);
+ for (i = 0; values[i]; i++)
g_message ("supported SASL mechanism: %s", values[i]);
- }
ldap_value_free (values);
}
@@ -721,7 +705,6 @@ pas_backend_ldap_connect (PASBackendLDAP *bl)
if (!bl->priv->evolutionPersonChecked)
check_schema_support (bl);
- pas_backend_set_is_loaded (PAS_BACKEND (bl), TRUE);
return GNOME_Evolution_Addressbook_BookListener_Success;
}
else
@@ -1051,7 +1034,7 @@ static void
add_objectclass_mod (PASBackendLDAP *bl, GPtrArray *mod_array, GList *existing_objectclasses)
{
#define FIND_INSERT(oc) \
- if (!g_list_find_custom (existing_objectclasses, (oc), (GCompareFunc)g_ascii_strcasecmp)) \
+ if (!g_list_find_custom (existing_objectclasses, (oc), (GCompareFunc)g_strcasecmp)) \
g_ptr_array_add (objectclasses, g_strdup ((oc)))
#define INSERT(oc) \
g_ptr_array_add (objectclasses, g_strdup ((oc)))
@@ -1167,7 +1150,7 @@ create_card_handler (LDAPOp *op, LDAPMessage *res)
e_iterator_next (iter);
}
- g_object_unref (iter);
+ gtk_object_unref (GTK_OBJECT (iter));
}
else {
ldap_perror (ldap, "create_card");
@@ -1191,14 +1174,14 @@ create_card_dtor (LDAPOp *op)
LDAPCreateOp *create_op = (LDAPCreateOp*)op;
g_free (create_op->dn);
- g_object_unref (create_op->new_card);
+ gtk_object_unref (GTK_OBJECT (create_op->new_card));
g_free (create_op);
}
static void
pas_backend_ldap_process_create_card (PASBackend *backend,
PASBook *book,
- PASCreateCardRequest *req)
+ PASRequest *req)
{
LDAPCreateOp *create_op = g_new (LDAPCreateOp, 1);
PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
@@ -1213,9 +1196,9 @@ pas_backend_ldap_process_create_card (PASBackend *backend,
book_view = find_book_view (bl);
- printf ("vcard = %s\n", req->vcard);
+ printf ("vcard = %s\n", req->create.vcard);
- new_ecard = e_card_new (req->vcard);
+ new_ecard = e_card_new (req->create.vcard);
create_op->new_card = e_card_simple_new (new_ecard);
create_op->dn = create_dn_from_ecard (create_op->new_card, bl->priv->ldap_rootdn);
@@ -1235,7 +1218,7 @@ pas_backend_ldap_process_create_card (PASBackend *backend,
create_op->dn);
g_free (create_op->dn);
- g_object_unref (create_op->new_card);
+ gtk_object_unref (GTK_OBJECT(create_op->new_card));
g_free (create_op);
return;
}
@@ -1350,13 +1333,13 @@ remove_card_handler (LDAPOp *op, LDAPMessage *res)
bonobo_object_dup_ref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev);
- pas_book_view_notify_remove_1 (view->book_view, remove_op->id);
+ pas_book_view_notify_remove (view->book_view, remove_op->id);
bonobo_object_release_unref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev);
e_iterator_next (iter);
}
- g_object_unref (iter);
+ gtk_object_unref (GTK_OBJECT (iter));
}
else {
ldap_perror (bl->priv->ldap, "remove_card");
@@ -1379,9 +1362,9 @@ remove_card_dtor (LDAPOp *op)
}
static void
-pas_backend_ldap_process_remove_cards (PASBackend *backend,
- PASBook *book,
- PASRemoveCardsRequest *req)
+pas_backend_ldap_process_remove_card (PASBackend *backend,
+ PASBook *book,
+ PASRequest *req)
{
LDAPRemoveOp *remove_op = g_new (LDAPRemoveOp, 1);
PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
@@ -1391,12 +1374,7 @@ pas_backend_ldap_process_remove_cards (PASBackend *backend,
book_view = find_book_view (bl);
- /*
- ** since we didn't pass "bulk-removes" in our static
- ** capabilities, we should only get 1 length lists here, so
- ** the id we're deleting is the first and only id in the list.
- */
- remove_op->id = g_strdup (req->ids->data);
+ remove_op->id = g_strdup (req->remove.id);
do {
book_view_notify_status (book_view, _("Removing card from LDAP server..."));
@@ -1482,14 +1460,14 @@ modify_card_modify_handler (LDAPOp *op, LDAPMessage *res)
else if (new_match)
pas_book_view_notify_add_1 (view->book_view, modify_op->vcard);
else /* if (old_match) */
- pas_book_view_notify_remove_1 (view->book_view, e_card_simple_get_id (modify_op->card));
+ pas_book_view_notify_remove (view->book_view, e_card_simple_get_id (modify_op->card));
pas_book_view_notify_complete (view->book_view, GNOME_Evolution_Addressbook_BookViewListener_Success);
bonobo_object_release_unref(bonobo_object_corba_objref(BONOBO_OBJECT(view->book_view)), &ev);
e_iterator_next (iter);
}
- g_object_unref (iter);
+ gtk_object_unref (GTK_OBJECT (iter));
}
else {
ldap_perror (ldap, "ldap_modify_s");
@@ -1605,17 +1583,17 @@ modify_card_dtor (LDAPOp *op)
g_list_free (modify_op->existing_objectclasses);
g_free (modify_op->current_vcard);
if (modify_op->current_card)
- g_object_unref (modify_op->current_card);
+ gtk_object_unref (GTK_OBJECT (modify_op->current_card));
g_free (modify_op->vcard);
if (modify_op->card)
- g_object_unref (modify_op->card);
+ gtk_object_unref (GTK_OBJECT (modify_op->card));
g_free (modify_op);
}
static void
pas_backend_ldap_process_modify_card (PASBackend *backend,
PASBook *book,
- PASModifyCardRequest *req)
+ PASRequest *req)
{
LDAPModifyOp *modify_op = g_new0 (LDAPModifyOp, 1);
PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
@@ -1627,10 +1605,10 @@ pas_backend_ldap_process_modify_card (PASBackend *backend,
book_view = find_book_view (bl);
- modify_op->vcard = g_strdup (req->vcard);
+ modify_op->vcard = g_strdup (req->modify.vcard);
new_ecard = e_card_new (modify_op->vcard);
modify_op->card = e_card_simple_new (new_ecard);
- g_object_unref (new_ecard);
+ gtk_object_unref (GTK_OBJECT (new_ecard));
modify_op->id = e_card_simple_get_id(modify_op->card);
ldap = bl->priv->ldap;
@@ -1697,7 +1675,7 @@ get_vcard_handler (LDAPOp *op, LDAPMessage *res)
GNOME_Evolution_Addressbook_BookListener_Success,
vcard);
g_free (vcard);
- g_object_unref (simple);
+ gtk_object_unref (GTK_OBJECT (simple));
ldap_op_finished (op);
}
else if (msg_type == LDAP_RES_SEARCH_RESULT) {
@@ -1727,7 +1705,7 @@ get_vcard_dtor (LDAPOp *op)
static void
pas_backend_ldap_process_get_vcard (PASBackend *backend,
PASBook *book,
- PASGetVCardRequest *req)
+ PASRequest *req)
{
LDAPGetVCardOp *get_vcard_op = g_new0 (LDAPGetVCardOp, 1);
PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
@@ -1739,7 +1717,7 @@ pas_backend_ldap_process_get_vcard (PASBackend *backend,
book_view = find_book_view (bl);
do {
- ldap_error = ldap_search_ext (ldap, req->id,
+ ldap_error = ldap_search_ext (ldap, req->get_vcard.id,
LDAP_SCOPE_BASE,
"(objectclass=*)",
NULL, 0, NULL, NULL,
@@ -1786,7 +1764,7 @@ get_nth(PASCardCursor *cursor, long n, gpointer data)
}
static void
-cursor_destroy(gpointer data, GObject *where_object_was)
+cursor_destroy(GtkObject *object, gpointer data)
{
PASBackendLDAPCursorPrivate *cursor_data = (PASBackendLDAPCursorPrivate *) data;
@@ -1837,7 +1815,7 @@ get_cursor_handler (LDAPOp *op, LDAPMessage *res)
cursor_op->cursor_data->num_elements ++;
cursor_op->cursor_data->elements = g_list_prepend (cursor_op->cursor_data->elements,
vcard);
- g_object_unref (simple);
+ gtk_object_unref (GTK_OBJECT (simple));
}
}
}
@@ -1852,7 +1830,8 @@ get_cursor_handler (LDAPOp *op, LDAPMessage *res)
get_nth,
cursor_op->cursor_data);
- g_object_weak_ref (G_OBJECT (cursor), cursor_destroy, cursor_op->cursor_data);
+ gtk_signal_connect(GTK_OBJECT(cursor), "destroy",
+ GTK_SIGNAL_FUNC(cursor_destroy), cursor_op->cursor_data);
cursor_op->responded = TRUE;
}
@@ -1878,7 +1857,7 @@ get_cursor_dtor (LDAPOp *op)
LDAPGetCursorOp *cursor_op = (LDAPGetCursorOp*)op;
if (!cursor_op->responded) {
- cursor_destroy (cursor_op->cursor_data, NULL);
+ cursor_destroy (NULL, cursor_op->cursor_data);
}
g_free (op);
@@ -1887,7 +1866,7 @@ get_cursor_dtor (LDAPOp *op)
static void
pas_backend_ldap_process_get_cursor (PASBackend *backend,
PASBook *book,
- PASGetCursorRequest *req)
+ PASRequest *req)
{
PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
LDAP *ldap = bl->priv->ldap;
@@ -2154,9 +2133,9 @@ anniversary_populate (ECardSimple *card, char **values)
{
if (values[0]) {
ECardDate dt = e_card_date_from_string (values[0]);
- g_object_set (card->card,
- "anniversary", &dt,
- NULL);
+ gtk_object_set (GTK_OBJECT (card->card),
+ "anniversary", &dt,
+ NULL);
}
}
@@ -2166,9 +2145,9 @@ anniversary_ber (ECardSimple *card)
ECardDate *dt;
struct berval** result = NULL;
- g_object_get (card->card,
- "anniversary", &dt,
- NULL);
+ gtk_object_get (GTK_OBJECT (card->card),
+ "anniversary", &dt,
+ NULL);
if (dt) {
char *anniversary;
@@ -2193,15 +2172,15 @@ anniversary_compare (ECardSimple *ecard1, ECardSimple *ecard2)
char *date1 = NULL, *date2 = NULL;
gboolean equal;
- g_object_get (ecard1->card,
- "anniversary", &dt,
- NULL);
+ gtk_object_get (GTK_OBJECT (ecard1->card),
+ "anniversary", &dt,
+ NULL);
if (dt)
date1 = e_card_date_to_string (dt);
- g_object_get (ecard2->card,
- "anniversary", &dt,
- NULL);
+ gtk_object_get (GTK_OBJECT (ecard2->card),
+ "anniversary", &dt,
+ NULL);
if (dt)
date2 = e_card_date_to_string (dt);
@@ -2221,9 +2200,9 @@ birthday_populate (ECardSimple *card, char **values)
{
if (values[0]) {
ECardDate dt = e_card_date_from_string (values[0]);
- g_object_set (card->card,
- "birth_date", &dt,
- NULL);
+ gtk_object_set (GTK_OBJECT (card->card),
+ "birth_date", &dt,
+ NULL);
}
}
@@ -2233,9 +2212,9 @@ birthday_ber (ECardSimple *card)
ECardDate *dt;
struct berval** result = NULL;
- g_object_get (card->card,
- "birth_date", &dt,
- NULL);
+ gtk_object_get (GTK_OBJECT (card->card),
+ "birth_date", &dt,
+ NULL);
if (dt) {
char *birthday;
@@ -2260,15 +2239,15 @@ birthday_compare (ECardSimple *ecard1, ECardSimple *ecard2)
char *date1 = NULL, *date2 = NULL;
gboolean equal;
- g_object_get (ecard1->card,
- "birth_date", &dt,
- NULL);
+ gtk_object_get (GTK_OBJECT (ecard1->card),
+ "birth_date", &dt,
+ NULL);
if (dt)
date1 = e_card_date_to_string (dt);
- g_object_get (ecard2->card,
- "birth_date", &dt,
- NULL);
+ gtk_object_get (GTK_OBJECT (ecard2->card),
+ "birth_date", &dt,
+ NULL);
if (dt)
date2 = e_card_date_to_string (dt);
@@ -2290,9 +2269,9 @@ category_populate (ECardSimple *card, char **values)
ECard *ecard;
EList *categories;
- g_object_get (card,
- "card", &ecard,
- NULL);
+ gtk_object_get (GTK_OBJECT (card),
+ "card", &ecard,
+ NULL);
categories = e_list_new((EListCopyFunc) g_strdup,
(EListFreeFunc) g_free,
@@ -2301,11 +2280,11 @@ category_populate (ECardSimple *card, char **values)
for (i = 0; values[i]; i++)
e_list_append (categories, values[i]);
- g_object_set (ecard,
- "category_list", categories,
- NULL);
+ gtk_object_set (GTK_OBJECT (ecard),
+ "category_list", categories,
+ NULL);
- g_object_unref (categories);
+ gtk_object_unref (GTK_OBJECT (categories));
e_card_simple_sync_card (card);
}
@@ -2319,13 +2298,13 @@ category_ber (ECardSimple *card)
ECard *ecard;
int i;
- g_object_get (card,
- "card", &ecard,
- NULL);
+ gtk_object_get (GTK_OBJECT (card),
+ "card", &ecard,
+ NULL);
- g_object_get (ecard,
- "category_list", &categories,
- NULL);
+ gtk_object_get (GTK_OBJECT (ecard),
+ "category_list", &categories,
+ NULL);
if (e_list_length (categories) != 0) {
result = g_new0 (struct berval*, e_list_length (categories) + 1);
@@ -2339,7 +2318,7 @@ category_ber (ECardSimple *card)
result[i]->bv_len = strlen (category);
}
- g_object_unref (iterator);
+ gtk_object_unref (GTK_OBJECT (iterator));
}
return result;
@@ -2615,12 +2594,10 @@ func_beginswith(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *da
str, str));
}
else if (!strcmp (ldap_attr, "fileAs")) {
- if (ldap_data->bl->priv->evolutionPersonSupported)
- ldap_data->list = g_list_prepend(ldap_data->list,
- g_strdup_printf("(fileAs=%s*)", str));
- else
- ldap_data->list = g_list_prepend(ldap_data->list,
- g_strdup_printf("(sn=%s*)", str));
+ ldap_data->list = g_list_prepend(ldap_data->list,
+ g_strdup_printf(
+ "(|(fileAs=%s*)(&(!(fileAs=*))(sn=%s*)))",
+ str, str));
}
else {
ldap_data->list = g_list_prepend(ldap_data->list,
@@ -2781,7 +2758,7 @@ build_card_from_entry (LDAP *ldap, LDAPMessage *e, GList **existing_objectclasse
struct prop_info *info = NULL;
char **values;
- if (existing_objectclasses && !g_ascii_strcasecmp (attr, "objectclass")) {
+ if (existing_objectclasses && !strcasecmp (attr, "objectclass")) {
values = ldap_get_values (ldap, e, attr);
for (i = 0; values[i]; i ++)
*existing_objectclasses = g_list_append (*existing_objectclasses, g_strdup (values[i]));
@@ -2790,7 +2767,7 @@ build_card_from_entry (LDAP *ldap, LDAPMessage *e, GList **existing_objectclasse
}
else {
for (i = 0; i < num_prop_infos; i ++)
- if (!g_ascii_strcasecmp (attr, prop_info[i].ldap_attr)) {
+ if (!g_strcasecmp (attr, prop_info[i].ldap_attr)) {
info = &prop_info[i];
break;
}
@@ -2807,7 +2784,7 @@ build_card_from_entry (LDAP *ldap, LDAPMessage *e, GList **existing_objectclasse
}
else if (info->prop_type & PROP_TYPE_COMPLEX) {
/* if it's a list call the ecard-populate function,
- which calls g_object_set to set the property */
+ which calls gtk_object_set to set the property */
info->populate_ecard_func(card,
values);
}
@@ -2825,7 +2802,7 @@ build_card_from_entry (LDAP *ldap, LDAPMessage *e, GList **existing_objectclasse
e_card_simple_sync_card (card);
- g_object_unref (ecard);
+ gtk_object_unref (GTK_OBJECT (ecard));
return card;
}
@@ -2891,7 +2868,7 @@ poll_ldap (PASBackendLDAP *bl)
}
e_iterator_next (iter);
}
- g_object_unref (iter);
+ gtk_object_unref (GTK_OBJECT (iter));
return TRUE;
}
@@ -2902,7 +2879,6 @@ send_pending_adds (LDAPSearchOp *search_op)
search_op->num_sent_this_time += search_op->num_pending_adds;
pas_book_view_notify_add (search_op->op.view, search_op->pending_adds);
g_list_foreach (search_op->pending_adds, (GFunc)g_free, NULL);
- g_list_free (search_op->pending_adds);
search_op->pending_adds = NULL;
search_op->num_pending_adds = 0;
}
@@ -2968,7 +2944,7 @@ ldap_search_handler (LDAPOp *op, LDAPMessage *res)
e_card_simple_get_vcard_assume_utf8 (card));
search_op->num_pending_adds ++;
- g_object_unref (card);
+ gtk_object_unref (GTK_OBJECT(card));
e = ldap_next_entry(ldap, e);
}
@@ -3094,27 +3070,34 @@ pas_backend_ldap_search (PASBackendLDAP *bl,
}
static void
-ldap_get_view (PASBackend *backend,
- PASBook *book,
- const char *search,
- GNOME_Evolution_Addressbook_BookViewListener listener,
- int limit)
+pas_backend_ldap_process_get_book_view (PASBackend *backend,
+ PASBook *book,
+ PASRequest *req)
{
PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
PASBookView *book_view;
PASBackendLDAPBookView *view;
- book_view = pas_book_view_new (listener);
+ g_return_if_fail (req->get_book_view.listener != NULL);
+
+ book_view = pas_book_view_new (req->get_book_view.listener);
bonobo_object_ref(BONOBO_OBJECT(book));
- g_object_weak_ref (G_OBJECT (book_view), view_destroy, book);
+ gtk_signal_connect(GTK_OBJECT(book_view), "destroy",
+ GTK_SIGNAL_FUNC(view_destroy), book);
view = g_new0(PASBackendLDAPBookView, 1);
view->book_view = book_view;
- view->search = g_strdup(search);
+ view->search = g_strdup(req->get_book_view.search);
view->card_sexp = pas_backend_card_sexp_new (view->search);
view->blpriv = bl->priv;
- view->limit = limit;
+
+ if (req->op == GetCompletionView) {
+ view->limit = MIN (bl->priv->ldap_limit, 100);
+ }
+ else {
+ view->limit = bl->priv->ldap_limit;
+ }
e_list_append(bl->priv->book_views, view);
@@ -3130,155 +3113,92 @@ ldap_get_view (PASBackend *backend,
}
static void
-pas_backend_ldap_process_get_book_view (PASBackend *backend,
- PASBook *book,
- PASGetBookViewRequest *req)
-{
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
-
- ldap_get_view (backend, book, req->search, req->listener,
- bl->priv->ldap_limit);
-}
-
-static void
-pas_backend_ldap_process_get_completion_view (PASBackend *backend,
- PASBook *book,
- PASGetCompletionViewRequest *req)
-{
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
-
- ldap_get_view (backend, book, req->search, req->listener,
- MIN (bl->priv->ldap_limit, 100));
-}
-
-static void
-pas_backend_ldap_process_get_changes (PASBackend *backend,
- PASBook *book,
- PASGetChangesRequest *req)
-{
- /* FIXME: implement */
-}
-
-static void
pas_backend_ldap_process_check_connection (PASBackend *backend,
PASBook *book,
- PASCheckConnectionRequest *req)
+ PASRequest *req)
{
PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
pas_book_report_connection (book, bl->priv->connected);
}
-#define LDAP_SIMPLE_PREFIX "ldap/simple-"
-#define SASL_PREFIX "sasl/"
-
static void
pas_backend_ldap_process_authenticate_user (PASBackend *backend,
PASBook *book,
- PASAuthenticateUserRequest *req)
+ PASRequest *req)
{
PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
int ldap_error;
char *dn = NULL;
- if (!strncasecmp (req->auth_method, LDAP_SIMPLE_PREFIX, strlen (LDAP_SIMPLE_PREFIX))) {
-
- if (!strcmp (req->auth_method, "ldap/simple-email")) {
- LDAPMessage *res, *e;
- char *query = g_strdup_printf ("(mail=%s)", req->user);
+ if (!strcmp (req->auth_user.auth_method, "ldap/simple-email")) {
+ LDAPMessage *res, *e;
+ char *query = g_strdup_printf ("(mail=%s)", req->auth_user.user);
- ldap_error = ldap_search_s (bl->priv->ldap,
- bl->priv->ldap_rootdn,
- bl->priv->ldap_scope,
- query,
- NULL, 0, &res);
- g_free (query);
+ ldap_error = ldap_search_s (bl->priv->ldap,
+ bl->priv->ldap_rootdn,
+ bl->priv->ldap_scope,
+ query,
+ NULL, 0, &res);
+ g_free (query);
- if (ldap_error == LDAP_SUCCESS) {
- char *entry_dn;
+ if (ldap_error == LDAP_SUCCESS) {
+ char *entry_dn;
- e = ldap_first_entry (bl->priv->ldap, res);
+ e = ldap_first_entry (bl->priv->ldap, res);
- entry_dn = ldap_get_dn (bl->priv->ldap, e);
- dn = g_strdup(entry_dn);
+ entry_dn = ldap_get_dn (bl->priv->ldap, e);
+ dn = g_strdup(entry_dn);
- ldap_memfree (entry_dn);
- ldap_msgfree (res);
- }
- else {
- pas_book_respond_authenticate_user (book,
- GNOME_Evolution_Addressbook_BookListener_PermissionDenied);
- return;
- }
- }
- else if (!strcmp (req->auth_method, "ldap/simple-binddn")) {
- dn = g_strdup (req->user);
+ ldap_memfree (entry_dn);
+ ldap_msgfree (res);
}
-
- /* now authenticate against the DN we were either supplied or queried for */
- printf ("simple auth as %s\n", dn);
- ldap_error = ldap_simple_bind_s(bl->priv->ldap,
- dn,
- req->passwd);
-
- pas_book_respond_authenticate_user (book,
- ldap_error_to_response (ldap_error));
- }
-#ifdef ENABLE_SASL_BINDS
- else if (!strncasecmp (req->auth_method, SASL_PREFIX, strlen (SASL_PREFIX))) {
- g_print ("sasl bind (mech = %s) as %s", req->auth_method + strlen (SASL_PREFIX), req->user);
- ldap_error = ldap_sasl_bind_s (bl->priv->ldap,
- NULL,
- req->auth_method + strlen (SASL_PREFIX),
- req->passwd,
- NULL,
- NULL,
- NULL);
-
- if (ldap_error == LDAP_NOT_SUPPORTED)
- pas_book_respond_authenticate_user (book,
- GNOME_Evolution_Addressbook_BookListener_UnsupportedAuthenticationMethod);
- else
+ else {
pas_book_respond_authenticate_user (book,
- ldap_error_to_response (ldap_error));
+ GNOME_Evolution_Addressbook_BookListener_PermissionDenied);
+ return;
+ }
}
-#endif
- else {
- pas_book_respond_authenticate_user (book,
- GNOME_Evolution_Addressbook_BookListener_UnsupportedAuthenticationMethod);
- return;
+ else if (!strcmp (req->auth_user.auth_method, "ldap/simple-binddn")) {
+ dn = g_strdup (req->auth_user.user);
}
- if (ldap_error == LDAP_SUCCESS) {
- bl->priv->auth_dn = dn;
- bl->priv->auth_passwd = g_strdup (req->passwd);
+ /* now authenticate against the DN we were either supplied or queried for */
+ printf ("authenticating as %s\n", dn);
+ ldap_error = ldap_simple_bind_s(bl->priv->ldap,
+ dn,
+ req->auth_user.passwd);
- pas_backend_set_is_writable (backend, TRUE);
+ bl->priv->auth_dn = dn;
+ bl->priv->auth_passwd = g_strdup (req->auth_user.passwd);
- /* force a requery on the root dse since some ldap
- servers are set up such that they don't report
- anything (including the schema DN) until the user
- is authenticated */
- if (!bl->priv->evolutionPersonChecked) {
- ldap_error = query_ldap_root_dse (bl);
+ pas_book_respond_authenticate_user (book,
+ ldap_error_to_response (ldap_error));
- if (LDAP_SUCCESS == ldap_error) {
- if (!bl->priv->evolutionPersonChecked)
- check_schema_support (bl);
- }
- else
- g_warning ("Failed to perform root dse query after authenticating, (ldap_error 0x%02x)", ldap_error);
- }
+ bl->priv->writable = (ldap_error == LDAP_SUCCESS);
+
+ /* if the bind was successful we force a requery on the root
+ dse since some ldap servers are set up such that they don't
+ report anything (including the schema DN) until the user is
+ authenticated */
+ if (!bl->priv->evolutionPersonChecked && ldap_error == LDAP_SUCCESS) {
+ ldap_error = query_ldap_root_dse (bl);
- pas_book_report_writable (book, TRUE);
+ if (LDAP_SUCCESS == ldap_error) {
+ if (!bl->priv->evolutionPersonChecked)
+ check_schema_support (bl);
+ }
+ else
+ g_warning ("Failed to perform root dse query after authenticating, (ldap_error 0x%02x)", ldap_error);
}
+ pas_book_report_writable (book, bl->priv->writable);
}
static void
pas_backend_ldap_process_get_supported_fields (PASBackend *backend,
PASBook *book,
- PASGetSupportedFieldsRequest *req)
+ PASRequest *req)
{
PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
@@ -3289,16 +3209,75 @@ pas_backend_ldap_process_get_supported_fields (PASBackend *backend,
}
static void
-pas_backend_ldap_process_get_supported_auth_methods (PASBackend *backend,
- PASBook *book,
- PASGetSupportedAuthMethodsRequest *req)
+pas_backend_ldap_process_client_requests (PASBook *book)
+{
+ PASBackend *backend;
+ PASRequest *req;
+
+ backend = pas_book_get_backend (book);
+
+ req = pas_book_pop_request (book);
+ if (req == NULL)
+ return;
+
+ switch (req->op) {
+ case CreateCard:
+ pas_backend_ldap_process_create_card (backend, book, req);
+ break;
+
+ case RemoveCard:
+ pas_backend_ldap_process_remove_card (backend, book, req);
+ break;
+
+ case ModifyCard:
+ pas_backend_ldap_process_modify_card (backend, book, req);
+ break;
+
+ case CheckConnection:
+ pas_backend_ldap_process_check_connection (backend, book, req);
+ break;
+
+ case GetVCard:
+ pas_backend_ldap_process_get_vcard (backend, book, req);
+ break;
+
+ case GetCursor:
+ pas_backend_ldap_process_get_cursor (backend, book, req);
+ break;
+
+ case GetBookView:
+ pas_backend_ldap_process_get_book_view (backend, book, req);
+ break;
+
+ case GetCompletionView:
+ /* we don't support summaries so completion view requests are the same as book view requests */
+ pas_backend_ldap_process_get_book_view (backend, book, req);
+ break;
+
+ case GetChanges:
+ /* FIXME: Code this. */
+ break;
+
+ case AuthenticateUser:
+ pas_backend_ldap_process_authenticate_user (backend, book, req);
+ break;
+ case GetSupportedFields:
+ pas_backend_ldap_process_get_supported_fields (backend, book, req);
+ break;
+ }
+
+ pas_book_free_request (req);
+}
+
+static void
+pas_backend_ldap_book_destroy_cb (PASBook *book, gpointer data)
{
- PASBackendLDAP *bl = PAS_BACKEND_LDAP (backend);
+ PASBackendLDAP *backend;
- pas_book_respond_get_supported_auth_methods (book,
- GNOME_Evolution_Addressbook_BookListener_Success,
- bl->priv->supported_auth_methods);
+ backend = PAS_BACKEND_LDAP (data);
+
+ pas_backend_remove_client (PAS_BACKEND (backend), book);
}
static GNOME_Evolution_Addressbook_BookListener_CallStatus
@@ -3392,7 +3371,75 @@ pas_backend_ldap_get_uri (PASBackend *backend)
return bl->priv->uri;
}
-static char*
+static gboolean
+pas_backend_ldap_add_client (PASBackend *backend,
+ GNOME_Evolution_Addressbook_BookListener listener)
+{
+ PASBackendLDAP *bl;
+ PASBook *book;
+
+ g_assert (backend != NULL);
+ g_assert (PAS_IS_BACKEND_LDAP (backend));
+
+ bl = PAS_BACKEND_LDAP (backend);
+
+ book = pas_book_new (backend, listener);
+
+ if (!book) {
+ if (!bl->priv->clients)
+ pas_backend_last_client_gone (backend);
+
+ return FALSE;
+ }
+
+ gtk_signal_connect (GTK_OBJECT (book), "destroy",
+ pas_backend_ldap_book_destroy_cb, backend);
+
+ gtk_signal_connect (GTK_OBJECT (book), "requests_queued",
+ pas_backend_ldap_process_client_requests, NULL);
+
+ bl->priv->clients = g_list_prepend (
+ bl->priv->clients, book);
+
+ if (bl->priv->connected) {
+ pas_book_respond_open (
+ book, GNOME_Evolution_Addressbook_BookListener_Success);
+ } else {
+ pas_book_respond_open (
+ book, GNOME_Evolution_Addressbook_BookListener_OtherError);
+ }
+
+ pas_book_report_writable (book, bl->priv->writable);
+
+ bonobo_object_unref (BONOBO_OBJECT (book));
+
+ return TRUE;
+}
+
+static void
+pas_backend_ldap_remove_client (PASBackend *backend,
+ PASBook *book)
+{
+ PASBackendLDAP *bl;
+
+ g_return_if_fail (backend != NULL);
+ g_return_if_fail (PAS_IS_BACKEND_LDAP (backend));
+ g_return_if_fail (book != NULL);
+ g_return_if_fail (PAS_IS_BOOK (book));
+
+ bl = PAS_BACKEND_LDAP (backend);
+
+ /* Disconnect */
+ bl->priv->clients = g_list_remove (bl->priv->clients, book);
+
+ /* When all clients go away, notify the parent factory about it so that
+ * it may decide whether to kill the backend or not.
+ */
+ if (!bl->priv->clients)
+ pas_backend_last_client_gone (backend);
+}
+
+static char *
pas_backend_ldap_get_static_capabilities (PASBackend *backend)
{
return g_strdup("net");
@@ -3418,10 +3465,10 @@ pas_backend_ldap_new (void)
{
PASBackendLDAP *backend;
- backend = g_object_new (PAS_TYPE_BACKEND_LDAP, NULL);
+ backend = gtk_type_new (pas_backend_ldap_get_type ());
if (! pas_backend_ldap_construct (backend)) {
- g_object_unref (backend);
+ gtk_object_unref (GTK_OBJECT (backend));
return NULL;
}
@@ -3440,71 +3487,51 @@ call_dtor (int msgid, LDAPOp *op, gpointer data)
}
static void
-pas_backend_ldap_dispose (GObject *object)
+pas_backend_ldap_destroy (GtkObject *object)
{
PASBackendLDAP *bl;
bl = PAS_BACKEND_LDAP (object);
- if (bl->priv) {
- g_hash_table_foreach_remove (bl->priv->id_to_op, (GHRFunc)call_dtor, NULL);
- g_hash_table_destroy (bl->priv->id_to_op);
+ g_hash_table_foreach_remove (bl->priv->id_to_op, (GHRFunc)call_dtor, NULL);
+ g_hash_table_destroy (bl->priv->id_to_op);
- if (bl->priv->poll_timeout != -1) {
- printf ("removing timeout\n");
- g_source_remove (bl->priv->poll_timeout);
- }
-
- g_object_unref (bl->priv->book_views);
-
- if (bl->priv->supported_fields)
- g_object_unref (bl->priv->supported_fields);
+ if (bl->priv->poll_timeout != -1) {
+ printf ("removing timeout\n");
+ g_source_remove (bl->priv->poll_timeout);
+ }
- if (bl->priv->supported_auth_methods)
- g_object_unref (bl->priv->supported_auth_methods);
+ gtk_object_unref (GTK_OBJECT (bl->priv->book_views));
- g_free (bl->priv->uri);
+ if (bl->priv->supported_fields)
+ gtk_object_unref (GTK_OBJECT (bl->priv->supported_fields));
- g_free (bl->priv);
- bl->priv = NULL;
- }
+ g_free (bl->priv->uri);
- if (G_OBJECT_CLASS (pas_backend_ldap_parent_class)->dispose)
- G_OBJECT_CLASS (pas_backend_ldap_parent_class)->dispose (object);
+ GTK_OBJECT_CLASS (pas_backend_ldap_parent_class)->destroy (object);
}
static void
pas_backend_ldap_class_init (PASBackendLDAPClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkObjectClass *object_class = (GtkObjectClass *) klass;
PASBackendClass *parent_class;
/* get client side information (extensions present in the library) */
get_ldap_library_info ();
- pas_backend_ldap_parent_class = g_type_class_peek_parent (klass);
+ pas_backend_ldap_parent_class = gtk_type_class (pas_backend_get_type ());
parent_class = PAS_BACKEND_CLASS (klass);
/* Set the virtual methods. */
parent_class->load_uri = pas_backend_ldap_load_uri;
parent_class->get_uri = pas_backend_ldap_get_uri;
+ parent_class->add_client = pas_backend_ldap_add_client;
+ parent_class->remove_client = pas_backend_ldap_remove_client;
parent_class->get_static_capabilities = pas_backend_ldap_get_static_capabilities;
- parent_class->create_card = pas_backend_ldap_process_create_card;
- parent_class->remove_cards = pas_backend_ldap_process_remove_cards;
- parent_class->modify_card = pas_backend_ldap_process_modify_card;
- parent_class->check_connection = pas_backend_ldap_process_check_connection;
- parent_class->get_vcard = pas_backend_ldap_process_get_vcard;
- parent_class->get_cursor = pas_backend_ldap_process_get_cursor;
- parent_class->get_book_view = pas_backend_ldap_process_get_book_view;
- parent_class->get_completion_view = pas_backend_ldap_process_get_completion_view;
- parent_class->get_changes = pas_backend_ldap_process_get_changes;
- parent_class->authenticate_user = pas_backend_ldap_process_authenticate_user;
- parent_class->get_supported_fields = pas_backend_ldap_process_get_supported_fields;
- parent_class->get_supported_auth_methods = pas_backend_ldap_process_get_supported_auth_methods;
-
- object_class->dispose = pas_backend_ldap_dispose;
+ object_class->destroy = pas_backend_ldap_destroy;
}
static void
@@ -3526,25 +3553,24 @@ pas_backend_ldap_init (PASBackendLDAP *backend)
/**
* pas_backend_ldap_get_type:
*/
-GType
+GtkType
pas_backend_ldap_get_type (void)
{
- static GType type = 0;
+ static GtkType type = 0;
if (! type) {
- GTypeInfo info = {
- sizeof (PASBackendLDAPClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) pas_backend_ldap_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ GtkTypeInfo info = {
+ "PASBackendLDAP",
sizeof (PASBackendLDAP),
- 0, /* n_preallocs */
- (GInstanceInitFunc) pas_backend_ldap_init
+ sizeof (PASBackendLDAPClass),
+ (GtkClassInitFunc) pas_backend_ldap_class_init,
+ (GtkObjectInitFunc) pas_backend_ldap_init,
+ NULL, /* reserved 1 */
+ NULL, /* reserved 2 */
+ (GtkClassInitFunc) NULL
};
- type = g_type_register_static (PAS_TYPE_BACKEND, "PASBackendLDAP", &info, 0);
+ type = gtk_type_unique (pas_backend_get_type (), &info);
}
return type;
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index b1db690d2a..4fc4f54df7 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -33,11 +33,8 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
-#include <string.h>
-#include <unistd.h>
#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-main.h>
#include "evolution-shell-component.h"
#include "evolution-shell-component-dnd.h"
@@ -82,7 +79,7 @@ static const EvolutionShellComponentFolderType folder_types[] = {
{ NULL }
};
-#define IS_CONTACT_TYPE(x) (g_ascii_strcasecmp((x), "contacts") == 0 || g_ascii_strcasecmp ((x), "contacts/ldap") == 0 || g_ascii_strcasecmp((x), "contacts/public") == 0)
+#define IS_CONTACT_TYPE(x) (g_strcasecmp((x), "contacts") == 0 || g_strcasecmp ((x), "contacts/ldap") == 0 || g_strcasecmp((x), "contacts/public") == 0)
/* EvolutionShellComponent methods and signals. */
@@ -99,8 +96,8 @@ create_view (EvolutionShellComponent *shell_component,
if (!IS_CONTACT_TYPE (type))
return EVOLUTION_SHELL_COMPONENT_UNSUPPORTEDTYPE;
- control = addressbook_new_control ();
- bonobo_control_set_property (control, NULL, "folder_uri", TC_CORBA_string, physical_uri, NULL);
+ control = addressbook_factory_new_control ();
+ bonobo_control_set_property (control, "folder_uri", physical_uri, NULL);
*control_return = control;
@@ -135,9 +132,11 @@ remove_folder (EvolutionShellComponent *shell_component,
void *closure)
{
CORBA_Environment ev;
- char *db_path, *summary_path, *subdir_path;
+ char *addressbook_db_path, *addressbook_db_summary, *subdir_path;
struct stat sb;
int rv;
+ GnomeVFSURI *dir_uri, *data_uri, *summary_uri;
+ GnomeVFSResult data_result, summary_result;
CORBA_exception_init(&ev);
@@ -164,7 +163,7 @@ remove_folder (EvolutionShellComponent *shell_component,
return;
}
- subdir_path = g_build_filename (physical_uri + 7, "subfolders", NULL);
+ subdir_path = g_concat_dir_and_file (physical_uri + 7, "subfolders");
rv = stat (subdir_path, &sb);
g_free (subdir_path);
if (rv != -1) {
@@ -174,29 +173,43 @@ remove_folder (EvolutionShellComponent *shell_component,
CORBA_exception_free(&ev);
return;
}
+
+ addressbook_db_path = g_concat_dir_and_file (physical_uri + 7, "addressbook.db");
+ addressbook_db_summary = g_concat_dir_and_file (physical_uri + 7, "addressbook.db.summary");
+
+ data_uri = gnome_vfs_uri_new (addressbook_db_path);
+ summary_uri = gnome_vfs_uri_new (addressbook_db_summary);
- db_path = g_build_filename (physical_uri + 7, "addressbook.db", NULL);
- summary_path = g_build_filename (physical_uri + 7, "addressbook.db.summary", NULL);
- rv = unlink (db_path);
-
- if (rv == 0 || (rv == -1 && errno == ENOENT))
- rv = unlink (summary_path);
+ g_free (addressbook_db_path);
+ g_free (addressbook_db_summary);
- if (rv == 0 || (rv == -1 && errno == ENOENT)) {
+ if (!data_uri || !summary_uri) {
GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_OK,
- &ev);
+ GNOME_Evolution_ShellComponentListener_INVALID_URI,
+ &ev);
+ CORBA_exception_free (&ev);
+ return;
}
- else {
- GNOME_Evolution_ShellComponentListener_notifyResult (listener,
- GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
- &ev);
+
+ data_result = gnome_vfs_unlink_from_uri (data_uri);
+ summary_result = gnome_vfs_unlink_from_uri (summary_uri);
+ if ((data_result == GNOME_VFS_OK || data_result == GNOME_VFS_ERROR_NOT_FOUND) && (summary_result == GNOME_VFS_OK || summary_result == GNOME_VFS_ERROR_NOT_FOUND))
+ {
+ GNOME_Evolution_ShellComponentListener_notifyResult (listener,
+ GNOME_Evolution_ShellComponentListener_OK,
+ &ev);
+ } else {
+ GNOME_Evolution_ShellComponentListener_notifyResult (listener,
+ GNOME_Evolution_ShellComponentListener_PERMISSION_DENIED,
+ &ev);
}
-
- g_free (db_path);
- g_free (summary_path);
-
- CORBA_exception_free(&ev);
+
+ if (data_uri)
+ gnome_vfs_uri_unref (data_uri);
+ if (summary_uri)
+ gnome_vfs_uri_unref (summary_uri);
+
+ CORBA_exception_free (&ev);
}
/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** */
@@ -378,18 +391,27 @@ owner_set_cb (EvolutionShellComponent *shell_component,
if (global_shell_client == NULL)
global_shell_client = shell_client;
+ addressbook_config_register_factory (bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)));
+
addressbook_storage_setup (shell_component, evolution_homedir);
}
+static gboolean
+gtk_main_quit_cb (gpointer closure)
+{
+ gtk_main_quit ();
+ return TRUE;
+}
+
static void
owner_unset_cb (EvolutionShellComponent *shell_component,
GNOME_Evolution_Shell shell_interface,
gpointer user_data)
{
owner_count --;
-
- if (owner_count == 0)
- global_shell_client = NULL;
+ if (owner_count == 0) {
+ g_idle_add (gtk_main_quit_cb, NULL);
+ }
}
/* FIXME We should perhaps take the time to figure out if the book is editable. */
@@ -520,8 +542,8 @@ add_creatable_item (EvolutionShellComponent *shell_component,
icon_path = NULL;
icon = NULL;
} else {
- icon_path = g_build_filename (EVOLUTION_IMAGESDIR, icon_name, NULL);
- icon = gdk_pixbuf_new_from_file (icon_path, NULL);
+ icon_path = g_concat_dir_and_file (EVOLUTION_ICONSDIR, icon_name);
+ icon = gdk_pixbuf_new_from_file (icon_path);
}
evolution_shell_component_add_user_creatable_item (shell_component,
@@ -569,12 +591,12 @@ create_component (void)
_("Create a new contact list"), 'l',
"contact-list-16.png");
- g_signal_connect (shell_component, "owner_set",
- G_CALLBACK (owner_set_cb), NULL);
- g_signal_connect (shell_component, "owner_unset",
- G_CALLBACK (owner_unset_cb), NULL);
- g_signal_connect (shell_component, "user_create_new_item",
- G_CALLBACK (user_create_new_item_cb), NULL);
+ gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
+ GTK_SIGNAL_FUNC (owner_set_cb), NULL);
+ gtk_signal_connect (GTK_OBJECT (shell_component), "owner_unset",
+ GTK_SIGNAL_FUNC (owner_unset_cb), NULL);
+ gtk_signal_connect (GTK_OBJECT (shell_component), "user_create_new_item",
+ GTK_SIGNAL_FUNC (user_create_new_item_cb), NULL);
return BONOBO_OBJECT (shell_component);
}
@@ -584,12 +606,15 @@ ensure_completion_uris_exist()
{
/* Initialize the completion uris if they aren't set yet. The
default set is just the local Contacts folder. */
- EConfigListener *db;
+ Bonobo_ConfigDatabase db;
+ CORBA_Environment ev;
char *val;
- db = e_book_get_config_database ();
+ CORBA_exception_init (&ev);
+
+ db = addressbook_config_database (&ev);
- val = e_config_listener_get_string (db, "/apps/evolution/addressbook/completion/uris");
+ val = bonobo_config_get_string (db, "/Addressbook/Completion/uris", &ev);
if (!val) {
EFolderListItem f[2];
@@ -597,7 +622,7 @@ ensure_completion_uris_exist()
/* in the case where the user is running for the first
time, populate the list with the local contact
folder */
- dirname = g_build_filename (g_get_home_dir (), "evolution/local/Contacts", NULL);
+ dirname = gnome_util_prepend_user_home("evolution/local/Contacts");
uri = g_strdup_printf ("file://%s", dirname);
f[0].uri = "evolution:/local/Contacts";
@@ -610,17 +635,33 @@ ensure_completion_uris_exist()
g_free (dirname);
g_free (uri);
- e_config_listener_set_string (db, "/apps/evolution/addressbook/completion/uris", val);
+ bonobo_config_set_string (db, "/Addressbook/Completion/uris", val, &ev);
+
+ g_free (val);
}
- g_free (val);
+ CORBA_exception_free (&ev);
}
-/* FIXME this is wrong. */
-BonoboObject *
-addressbook_component_init (void)
+/* FIXME this should probably be renamed as we don't use factories anymore. */
+void
+addressbook_component_factory_init (void)
{
+ BonoboObject *object;
+ int result;
+
+ object = create_component ();
+
+ /* FIXME: Handle errors better? */
+
+ result = oaf_active_server_register (GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID,
+ bonobo_object_corba_objref (object));
+ if (result == OAF_REG_ERROR)
+ g_error ("Cannot register -- %s", GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID);
+
+ /* XXX this could probably go someplace else, but I'll leave
+ it here for now since it's a component init time
+ operation. */
ensure_completion_uris_exist ();
- return create_component ();
}
diff --git a/addressbook/gui/component/ldap-config.glade b/addressbook/gui/component/ldap-config.glade
index d561298d27..a7be68f785 100644
--- a/addressbook/gui/component/ldap-config.glade
+++ b/addressbook/gui/component/ldap-config.glade
@@ -1,2631 +1,5819 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkWindow" id="account-editor-window">
- <property name="title" translatable="yes">Edit LDAP Server</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox37">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
+<?xml version="1.0"?>
+<GTK-Interface>
+
+<project>
+ <name>addressbook-config-mockup</name>
+ <program_name>addressbook-config-mockup</program_name>
+ <directory></directory>
+ <source_directory>src</source_directory>
+ <pixmaps_directory>../../../art</pixmaps_directory>
+ <language>C</language>
+ <gnome_support>True</gnome_support>
+ <gettext_support>True</gettext_support>
+</project>
+
+<widget>
+ <class>GnomeDialog</class>
+ <name>Add/Edit Attribute Mappings--Simple Version</name>
+ <visible>False</visible>
+ <title>Add (or Edit) Attribute Mappings</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>True</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <auto_close>False</auto_close>
+ <hide_on_close>False</hide_on_close>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDialog:vbox</child_name>
+ <name>dialog-vbox4</name>
+ <homogeneous>False</homogeneous>
+ <spacing>8</spacing>
+ <child>
+ <padding>4</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <child_name>GnomeDialog:action_area</child_name>
+ <name>dialog-action_area4</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>8</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
<child>
- <widget class="GtkNotebook" id="account-editor-notebook">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">True</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="account-editor-general-vbox">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
- <child>
- <widget class="GtkHBox" id="hbox100">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="label431">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Display name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment45">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0.9</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkEntry" id="account-editor-display-name-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkButton</class>
+ <name>button37</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button39</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+ </widget>
+ </widget>
- <child>
- <widget class="GtkHSeparator" id="hseparator12">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label331">
- <property name="visible">True</property>
- <property name="label" translatable="yes">General</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox30</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox66</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap35</name>
+ <filename>ldap.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label283</name>
+ <label>Please select an Evolution attribute and an
+LDAP attribute to associate with it.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator8</name>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table18</name>
+ <border_width>3</border_width>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label284</name>
+ <label>_Evolution attribute:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>combo-entry2</default_focus_target>
<child>
- <widget class="GtkVBox" id="account-editor-connecting-vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label334">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Connecting</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label285</name>
+ <label>_LDAP attribute:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>combo-entry3</default_focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</child>
+ </widget>
+ <widget>
+ <class>GtkCombo</class>
+ <name>combo4</name>
+ <value_in_list>False</value_in_list>
+ <ok_if_empty>True</ok_if_empty>
+ <case_sensitive>False</case_sensitive>
+ <use_arrows>True</use_arrows>
+ <use_arrows_always>False</use_arrows_always>
+ <items></items>
<child>
- <widget class="GtkVBox" id="account-editor-searching-vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label344">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Searching</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GtkCombo:entry</child_name>
+ <name>combo-entry2</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkCombo</class>
+ <name>combo5</name>
+ <value_in_list>False</value_in_list>
+ <ok_if_empty>True</ok_if_empty>
+ <case_sensitive>False</case_sensitive>
+ <use_arrows>True</use_arrows>
+ <use_arrows_always>False</use_arrows_always>
+ <items></items>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GtkCombo:entry</child_name>
+ <name>combo-entry3</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+<widget>
+ <class>GnomeDialog</class>
+ <name>Add/Edit Attribute Mappings-- Multiple Selection Version</name>
+ <visible>False</visible>
+ <title>Add (or Edit) Attribute Mappings</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <default_width>393</default_width>
+ <default_height>324</default_height>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <auto_close>False</auto_close>
+ <hide_on_close>False</hide_on_close>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDialog:vbox</child_name>
+ <name>vbox31</name>
+ <homogeneous>False</homogeneous>
+ <spacing>8</spacing>
+ <child>
+ <padding>4</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <child_name>GnomeDialog:action_area</child_name>
+ <name>hbuttonbox9</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>8</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
<child>
- <widget class="GtkHSeparator" id="hseparator10">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
</child>
+ <widget>
+ <class>GtkButton</class>
+ <name>button40</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button41</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox32</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
<child>
- <widget class="GtkHBox" id="hbox120">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox67</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap36</name>
+ <filename>ldap.png</filename>
<child>
- <widget class="GtkHButtonBox" id="hbuttonbox20">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">0</property>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkButton" id="account-editor-ok-button">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label286</name>
+ <label>Please select an Evolution attribute and an
+LDAP attribute to associate with it.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator9</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table19</name>
+ <border_width>3</border_width>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label287</name>
+ <label>_Evolution attribute:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>entry32</default_focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkButton" id="account-editor-cancel-button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
+ <widget>
+ <class>GtkCombo</class>
+ <name>combo6</name>
+ <value_in_list>False</value_in_list>
+ <ok_if_empty>True</ok_if_empty>
+ <case_sensitive>False</case_sensitive>
+ <use_arrows>True</use_arrows>
+ <use_arrows_always>False</use_arrows_always>
+ <items></items>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GtkCombo:entry</child_name>
+ <name>entry32</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label288</name>
+ <label>_LDAP attributes:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>7.45058e-09</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow6</name>
+ <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkCList</class>
+ <name>clist4</name>
+ <can_focus>True</can_focus>
+ <columns>2</columns>
+ <column_widths>163,80</column_widths>
+ <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
+ <show_titles>True</show_titles>
+ <shadow_type>GTK_SHADOW_IN</shadow_type>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label289</name>
+ <label>Attribute</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label290</name>
+ <label>Select</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
</widget>
- </child>
+ </widget>
</widget>
-<widget class="GtkWindow" id="account-druid-window">
- <property name="title" translatable="yes">Add LDAP Server</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
+<widget>
+ <class>GtkWindow</class>
+ <name>account-editor-window</name>
+ <visible>False</visible>
+ <title>account-editor</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox37</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>account-editor-notebook</name>
+ <can_focus>True</can_focus>
+ <show_tabs>True</show_tabs>
+ <show_border>True</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <child>
- <widget class="GnomeDruid" id="account-druid">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="show_help">False</property>
+ <widget>
+ <class>GtkVBox</class>
+ <name>account-editor-general-vbox</name>
+ <border_width>6</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox100</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>4</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
- <child>
- <widget class="GnomeDruidPageEdge" id="druidpagestart1">
- <property name="visible">True</property>
- <property name="position">GNOME_EDGE_START</property>
- <property name="title" translatable="yes">LDAP Configuration Assistant</property>
- <property name="text" translatable="yes">This assistant will help you to access online directory services
-using LDAP (Lightweight Directory Access Protocol) servers.
+ <widget>
+ <class>GtkLabel</class>
+ <name>label431</name>
+ <label>_Display name:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment45</name>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0.9</xscale>
+ <yscale>1</yscale>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>account-editor-display-name-entry</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+ </widget>
+ </widget>
-Adding a new LDAP server requires some specialized information
-about the server. Please contact your system administrator if you
-need help finding this information.</property>
- <property name="title_color">#ffffffffffff</property>
- <property name="text_color">#000000000000</property>
- <property name="background_color">#000000000000</property>
- <property name="logo_background_color">#000000000000</property>
- <property name="textbox_color">#ffffffffffff</property>
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator12</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label331</name>
+ <label>General</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>account-editor-connecting-vbox</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label334</name>
+ <label>Connecting</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>account-editor-searching-vbox</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label344</name>
+ <label>Searching</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>account-editor-objectclasses-vbox</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>Placeholder</class>
</widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>account-editor-objectclasses-label</name>
+ <label>Objectclasses</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>account-editor-mappings-vbox</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>account-editor-mappings-label</name>
+ <label>Mappings</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>account-editor-dn-customization-vbox</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>account-editor-dn-customization-label</name>
+ <label>DN Customization</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator10</name>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox120</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
<child>
- <widget class="GnomeDruidPageStandard" id="add-server-druid-info-page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Step 1: Server Information</property>
- <property name="title_foreground">#e6e0bfffe498</property>
- <property name="background">#c5480812e498</property>
- <property name="logo_background">#a440081dc8cc</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid-vbox1">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
- <child>
- <widget class="GtkVBox" id="account-druid-general-vbox">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label158">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The first step in configuring an LDAP server is to provide its name, and your log in
-information. Please ask your system administrator if you are unsure of this information.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">3</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator2">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
+ <widget>
+ <class>GtkNotebook</class>
+ <name>account-editor-advanced-button-notebook</name>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <name>hbuttonbox21</name>
+ <layout_style>GTK_BUTTONBOX_START</layout_style>
+ <spacing>0</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>account-editor-fewer-options-button</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>&lt;&lt; Fewer Options</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label554</name>
+ <label>label554</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <name>hbuttonbox28</name>
+ <layout_style>GTK_BUTTONBOX_START</layout_style>
+ <spacing>0</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>account-editor-more-options-button</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>_More Options &gt;&gt;</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label555</name>
+ <label>label555</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <name>hbuttonbox20</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>0</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>account-editor-ok-button</name>
+ <sensitive>False</sensitive>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>account-editor-apply-button</name>
+ <sensitive>False</sensitive>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>account-editor-close-button</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>account-druid-window</name>
+ <visible>False</visible>
+ <title>account-druid</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GnomeDruid</class>
+ <name>account-druid</name>
+
+ <widget>
+ <class>GnomeDruidPageStart</class>
+ <name>druidpagestart1</name>
+ <title>LDAP Configuration Assistant</title>
+ <text>This assistant will help you to access online directory services
+using LDAP (Lightweight Directory Access Protocol) servers.
+
+Adding a new LDAP server requires some specialized information
+about the server. Please contact your system administrator if you
+need help finding this information.</text>
+ <title_color>255,255,255</title_color>
+ <text_color>0,0,0</text_color>
+ <background_color>0,0,0</background_color>
+ <logo_background_color>0,0,0</logo_background_color>
+ <textbox_color>255,255,255</textbox_color>
+ <logo_image>ldap.png</logo_image>
+ <watermark_image>xstdruidbg-3.png</watermark_image>
+ </widget>
+
+ <widget>
+ <class>GnomeDruidPageStandard</class>
+ <name>add-server-druid-info-page</name>
+ <title>Step 1: Server Information</title>
+ <title_color>255,255,255</title_color>
+ <background_color>0,0,0</background_color>
+ <logo_background_color>0,0,0</logo_background_color>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDruidPageStandard:vbox</child_name>
+ <name>druid-vbox1</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>account-druid-general-vbox</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label158</name>
+ <label>The first step in configuring an LDAP server is to provide its name, and your log in
+information. Please ask your system administrator if you are unsure of this information.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>3</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator2</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
</widget>
- </child>
+ </widget>
+ </widget>
- <child>
- <widget class="GnomeDruidPageStandard" id="add-server-druid-connecting-page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Step 2: Connecting to Server</property>
- <property name="title_foreground">#e6e0bfffe498</property>
- <property name="background">#c5480812e498</property>
- <property name="logo_background">#a440081dc8cc</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid-vbox2">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
+ <widget>
+ <class>GnomeDruidPageStandard</class>
+ <name>add-server-druid-connecting-page</name>
+ <title>Step 2: Connecting to Server</title>
+ <title_color>255,255,255</title_color>
+ <background_color>0,0,0</background_color>
+ <logo_background_color>0,0,0</logo_background_color>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDruidPageStandard:vbox</child_name>
+ <name>druid-vbox2</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>account-druid-connecting-vbox</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <child>
- <widget class="GtkVBox" id="account-druid-connecting-vbox">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label174">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Now, you must specify how you want to connect to the LDAP server. The SSL (Secure Sockets Layer)
+ <widget>
+ <class>GtkLabel</class>
+ <name>label174</name>
+ <label>Now, you must specify how you want to connect to the LDAP server. The SSL (Secure Sockets Layer)
and TLS (Transport Layer Security) protocols are used by some servers to cryptographically protect
-your connection. Ask your system administrator if your LDAP server uses these protocols.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">3</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator3">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
+your connection. Ask your system administrator if your LDAP server uses these protocols.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>3</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator3</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GnomeDruidPageStandard</class>
+ <name>add-server-druid-searching-page</name>
+ <title>Step 3: Searching the Directory</title>
+ <title_color>255,255,255</title_color>
+ <background_color>0,0,0</background_color>
+ <logo_background_color>0,0,0</logo_background_color>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDruidPageStandard:vbox</child_name>
+ <name>vbox23</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>account-druid-searching-vbox</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label254</name>
+ <label>The options on this page control how many entries should be included in your
+searches, and how long a search should take. Ask your system administrator if you
+need to change these options.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator7</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
</widget>
- </child>
+ </widget>
+ </widget>
- <child>
- <widget class="GnomeDruidPageStandard" id="add-server-druid-searching-page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Step 3: Searching the Directory</property>
- <property name="title_foreground">#e6e0bfffe498</property>
- <property name="background">#c5480812e498</property>
- <property name="logo_background">#a440081dc8cc</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vbox23">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
+ <widget>
+ <class>GnomeDruidPageStandard</class>
+ <name>add-server-druid-display-name-page</name>
+ <title>Step 4: Display Name</title>
+ <title_color>255,255,255</title_color>
+ <background_color>0,0,0</background_color>
+ <logo_background_color>0,0,0</logo_background_color>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDruidPageStandard:vbox</child_name>
+ <name>druid-vbox5</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox21</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label198</name>
+ <label>Specifying a display name is the last required step in configuring an LDAP server.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>3</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator5</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table15</name>
+ <border_width>3</border_width>
+ <rows>1</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>druid-display-name-entry</name>
+ <can_focus>True</can_focus>
+ <has_focus>True</has_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
<child>
- <widget class="GtkVBox" id="account-druid-searching-vbox">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label254">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The options on this page control how many entries should be included in your
-searches, and how long a search should take. Ask your system administrator if you
-need to change these options.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator7">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</child>
</widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="add-server-druid-display-name-page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Step 4: Display Name</property>
- <property name="title_foreground">#e6e0bfffe498</property>
- <property name="background">#c5480812e498</property>
- <property name="logo_background">#a440081dc8cc</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid-vbox5">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label199</name>
+ <label>_Display name:</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>druid-display-name-entry</default_focus_target>
<child>
- <widget class="GtkVBox" id="vbox21">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label198">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Specifying a display name is the last required step in configuring an LDAP server.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">3</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator5">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table15">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkEntry" id="druid-display-name-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label199">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Display name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">druid-display-name-entry</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="notebook15">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkLabel" id="label207">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the name for this server that will appear in your Evolution folder list.
-It is for display purposes only. </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label208">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label163</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label215">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selecting this option will let you change Evolution's default settings for LDAP
-searches, and for creating and editing contacts. </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label210">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label164</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</child>
</widget>
- </child>
+ </widget>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>notebook15</name>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox41</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap21</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label207</name>
+ <label>This is the name for this server that will appear in your Evolution folder list.
+It is for display purposes only. </label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label208</name>
+ <label>label163</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox42</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap22</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label215</name>
+ <label>Selecting this option will let you change Evolution's default settings for LDAP
+searches, and for creating and editing contacts. </label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label210</name>
+ <label>label164</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
</widget>
- </child>
+ </widget>
+ </widget>
- <child>
- <widget class="GnomeDruidPageEdge" id="add-server-druid-finish-page">
- <property name="visible">True</property>
- <property name="position">GNOME_EDGE_FINISH</property>
- <property name="title" translatable="yes">Finished</property>
- <property name="text" translatable="yes">Congratulations, you are finished setting up this LDAP server. You
+ <widget>
+ <class>GnomeDruidPageFinish</class>
+ <name>add-server-druid-finish-page</name>
+ <title>Finished</title>
+ <text>Congratulations, you are finished setting up this LDAP server. You
are now ready to access this directory.
-Please click the &quot;Finish&quot; button to save the settings you have entered here.</property>
- <property name="title_color">#ffffffffffff</property>
- <property name="text_color">#000000000000</property>
- <property name="background_color">#000000000000</property>
- <property name="logo_background_color">#000000000000</property>
- <property name="textbox_color">#ffffffffffff</property>
- </widget>
- </child>
+Please click the &quot;Finish&quot; button to save the settings you have entered here.</text>
+ <background_color>0,0,0</background_color>
+ <logo_background_color>0,0,0</logo_background_color>
+ <textbox_color>255,255,255</textbox_color>
+ <text_color>0,0,0</text_color>
+ <title_color>255,255,255</title_color>
+ <watermark_image>xstdruidbg-3.png</watermark_image>
</widget>
- </child>
+ </widget>
</widget>
-<widget class="GtkDialog" id="addressbook-sources-window">
- <property name="title" translatable="yes">Addressbook Sources</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">355</property>
- <property name="default_height">285</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="addressbook-sources-vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox27">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button104">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
+<widget>
+ <class>GtkWindow</class>
+ <name>edit_server_window_simple</name>
+ <visible>False</visible>
+ <title>edit_server_window_simple</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox67</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>notebook25</name>
+ <can_focus>True</can_focus>
+ <show_tabs>True</show_tabs>
+ <show_border>True</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox68</name>
+ <border_width>6</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox121</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>4</spacing>
<child>
- <widget class="GtkButton" id="button105">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
- <child>
- <widget class="GtkButton" id="button106">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label484</name>
+ <label>_Display name:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment52</name>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0.9</xscale>
+ <yscale>1</yscale>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry54</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
</widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator13</name>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="addressbook-sources">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="Custom" id="sourcesTable">
- <property name="visible">True</property>
- <property name="creation_function">addressbook_dialog_create_sources_table</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Thu, 11 Apr 2002 00:31:02 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
+ <widget>
+ <class>GtkTable</class>
+ <name>table32</name>
+ <border_width>3</border_width>
+ <rows>3</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label485</name>
+ <label>_Server name:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>entry55</default_focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label486</name>
+ <label>_Log in method:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label487</name>
+ <label>Distinguished _name:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>entry56</default_focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry55</name>
+ <can_focus>True</can_focus>
+ <has_focus>True</has_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment53</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>optionmenu18</name>
+ <can_focus>True</can_focus>
+ <items>Anonymously
+Using email address
+Using distinguished name (DN)
+</items>
+ <initial_choice>2</initial_choice>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry56</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>notebook26</name>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
<child>
- <widget class="GtkVBox" id="vbox73">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox122</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap66</name>
+ <filename>gnome-hint.png</filename>
<child>
- <widget class="GtkLabel" id="label529">
- <property name="visible">True</property>
- <property name="label" translatable="yes">
-</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label488</name>
+ <label>This is the full name of your ldap server. For example, &quot;ldap.mycompany.com&quot;.</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <widget class="GtkVButtonBox" id="vbuttonbox18">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="addSource">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Add</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="editSource">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Edit</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="deleteSource">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">De_lete</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="general-tab-window">
- <property name="title" translatable="yes">general-tab</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="general-tab">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkTable" id="table36">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label534">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Server name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">server-name-entry</property>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label489</name>
+ <label>label163</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox123</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap67</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
</widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label535">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Log in method:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label490</name>
+ <label>label168</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
</widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="server-name-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label491</name>
+ <label>label164</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox124</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap68</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
</widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment63">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label492</name>
+ <label>label169</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label493</name>
+ <label>label165</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>Placeholder</class>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label494</name>
+ <label>label214</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox125</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap69</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label495</name>
+ <label>This is the name for this server that will appear in your Evolution folder list.
+It is for display purposes only. </label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <widget class="GtkOptionMenu" id="auth-optionmenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget28">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget29">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Anonymously</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Using email address</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Using distinguished name (DN)</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
</widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label496</name>
+ <label>label452</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label497</name>
+ <label>General</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox69</name>
+ <border_width>6</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table33</name>
+ <border_width>3</border_width>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label498</name>
+ <label>_Port number:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment54</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox70</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>radiobutton9</name>
+ <can_focus>True</can_focus>
+ <label>_Always</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>radiobutton10</name>
+ <can_focus>True</can_focus>
+ <label>_If necessary </label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkRadioButton</class>
+ <name>radiobutton11</name>
+ <can_focus>True</can_focus>
+ <label>_Don't use SSL/TLS</label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment55</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>pixmap70</name>
+ <filename>gnome-hint.png</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment56</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkCombo</class>
+ <name>combo8</name>
+ <value_in_list>False</value_in_list>
+ <ok_if_empty>True</ok_if_empty>
+ <case_sensitive>False</case_sensitive>
+ <use_arrows>True</use_arrows>
+ <use_arrows_always>False</use_arrows_always>
+ <items>380
+666
+1234
+</items>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GtkCombo:entry</child_name>
+ <name>entry57</name>
+ <can_focus>True</can_focus>
+ <has_focus>True</has_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>380</text>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label499</name>
+ <label>U_se SSL/TLS:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>7.45058e-09</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>notebook27</name>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
<child>
- <widget class="GtkNotebook" id="auth-label-notebook">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox126</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap71</name>
+ <filename>gnome-hint.png</filename>
<child>
- <widget class="GtkLabel" id="label553">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Email Address:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label500</name>
+ <label>This is the port on the LDAP server that Evolution will try to connect to. A
+list of standard ports has been provided. Ask your system administrator
+what port you should specify.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <widget class="GtkLabel" id="label546">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label546</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
-
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label501</name>
+ <label>label163</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox127</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap72</name>
+ <filename>gnome-hint.png</filename>
<child>
- <widget class="GtkLabel" id="label536">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Distinguished _name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label502</name>
+ <label>Selecting this option means that Evolution will only connect to your LDAP server if
+your LDAP server supports SSL or TLS.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <widget class="GtkLabel" id="label547">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label547</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
</widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="auth-entry-notebook">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label503</name>
+ <label>label398</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox128</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap73</name>
+ <filename>gnome-hint.png</filename>
<child>
- <widget class="GtkEntry" id="email-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label504</name>
+ <label>Selecting this option means that Evolution will only try to use SSL/TLS if you are in a
+insecure environment. For example, if you and your LDAP server are behind a firewall
+at work, then Evolution doesn't need to use SSL/TLS because your connection is already
+secure.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label505</name>
+ <label>label396</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox129</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap74</name>
+ <filename>gnome-hint.png</filename>
<child>
- <widget class="GtkLabel" id="label549">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label549</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label506</name>
+ <label>Selecting this option means that your server does not support either SSL or TLS. This
+means that your connection will be insecure, and that you will be vulnerable to security
+exploits. </label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <widget class="GtkEntry" id="dn-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label507</name>
+ <label>label397</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label508</name>
+ <label>Connecting</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox71</name>
+ <border_width>6</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table34</name>
+ <border_width>3</border_width>
+ <rows>4</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label509</name>
+ <label>_Search base:</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label510</name>
+ <label>S_earch scope: </label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment57</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>7.45058e-09</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>optionmenu19</name>
+ <can_focus>True</can_focus>
+ <items>Sub
+One
+</items>
+ <initial_choice>0</initial_choice>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox130</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry58</name>
+ <can_focus>True</can_focus>
+ <has_focus>True</has_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
<child>
- <widget class="GtkLabel" id="label550">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label550</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
</widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkNotebook" id="general-tab-help">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkLabel" id="label537">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the full name of your ldap server. For example, &quot;ldap.mycompany.com&quot;.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <widget>
+ <class>GtkButton</class>
+ <name>button90</name>
+ <can_focus>True</can_focus>
+ <label> S_how Supported Bases </label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
</widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label538">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label163</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label511</name>
+ <label>_Timeout (minutes):</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>1</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment58</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>1</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox131</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label512</name>
+ <label>1:00</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkHScale</class>
+ <name>hscale5</name>
+ <can_focus>True</can_focus>
+ <draw_value>False</draw_value>
+ <value_pos>GTK_POS_LEFT</value_pos>
+ <digits>0</digits>
+ <policy>GTK_UPDATE_DELAYED</policy>
+ <value>3</value>
+ <lower>1</lower>
+ <upper>5</upper>
+ <step>0.5</step>
+ <page>1</page>
+ <page_size>0</page_size>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label513</name>
+ <label>5:00</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>3</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label514</name>
+ <label>Selected:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label515</name>
+ <label>2:30</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
</widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label539">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Evolution will use this email address to authenticate you with the server</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label516</name>
+ <label>_Download limit:</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment59</name>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox132</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkSpinButton</class>
+ <name>spinbutton5</name>
+ <can_focus>True</can_focus>
+ <climb_rate>1</climb_rate>
+ <digits>0</digits>
+ <numeric>False</numeric>
+ <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+ <snap>False</snap>
+ <wrap>False</wrap>
+ <value>100</value>
+ <lower>0</lower>
+ <upper>10000</upper>
+ <step>1</step>
+ <page>10</page>
+ <page_size>10</page_size>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label517</name>
+ <label>cards</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
</widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label540">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label164</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>notebook28</name>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox133</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap75</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label518</name>
+ <label>The search base is the distinguished name (DN) of the entry where your searches will
+begin. If you leave this blank, the search will begin at the root of the directory tree.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
</widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label541">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Evolution will use this DN to authenticate you with the server</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label519</name>
+ <label>label163</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox134</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap76</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
</widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label542">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label165</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label520</name>
+ <label>The search scope defines how deep you would like the search to extend down the
+directory tree. A search scope of &quot;sub&quot; will include all entries below your search base.
+A search scope of &quot;one&quot; will only include the entries one level beneath your base.
+</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
</widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label552">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the method evolution will use to authenticate you. Note that setting this to &quot;Email Address&quot; requires anonymous access to your ldap server.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label521</name>
+ <label>label164</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox135</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap77</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
</widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label551">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label551</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label522</name>
+ <label>This option controls how long a search will be run.</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
</widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label544">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the name for this server that will appear in your Evolution folder list.
-It is for display purposes only. </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label523</name>
+ <label>label165</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox136</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap78</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
</widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label545">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label452</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label524</name>
+ <label>This is the maximum number of entries to download. Setting this number to be
+too large will slow down your addressbook.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
</widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label525</name>
+ <label>label166</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label526</name>
+ <label>Searching</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator14</name>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
</widget>
- </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox142</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <name>hbuttonbox25</name>
+ <layout_style>GTK_BUTTONBOX_START</layout_style>
+ <spacing>0</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button100</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>_More Options &gt;&gt;</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <name>hbuttonbox26</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>0</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button101</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button102</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button103</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
</widget>
-<widget class="GtkWindow" id="connecting-tab-window">
- <property name="title" translatable="yes">connecting-tab</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
+<widget>
+ <class>GnomeDialog</class>
+ <name>addressbook-sources-window</name>
+ <visible>False</visible>
+ <title>Addressbook Sources</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <default_width>355</default_width>
+ <default_height>285</default_height>
+ <allow_shrink>True</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <auto_close>False</auto_close>
+ <hide_on_close>False</hide_on_close>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDialog:vbox</child_name>
+ <name>addressbook-sources-vbox</name>
+ <homogeneous>False</homogeneous>
+ <spacing>8</spacing>
+ <child>
+ <padding>4</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <child_name>GnomeDialog:action_area</child_name>
+ <name>hbuttonbox27</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>8</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
- <child>
- <widget class="GtkVBox" id="connecting-tab">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <widget>
+ <class>GtkButton</class>
+ <name>button104</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button105</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button106</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
+ </widget>
+ </widget>
+ <widget>
+ <class>GtkHBox</class>
+ <name>addressbook-sources</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
<child>
- <widget class="GtkTable" id="table14">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label175">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Port number:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>Custom</class>
+ <name>sourcesTable</name>
+ <creation_function>addressbook_dialog_create_sources_table</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Thu, 11 Apr 2002 00:31:02 GMT</last_modification_time>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox73</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label529</name>
+ <label>
+</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkVButtonBox</class>
+ <name>vbuttonbox18</name>
+ <layout_style>GTK_BUTTONBOX_START</layout_style>
+ <spacing>0</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
<child>
- <widget class="GtkAlignment" id="alignment21">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <child>
- <widget class="GtkCombo" id="port-combo">
- <property name="visible">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry27">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget32">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget33">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget34">
- <property name="visible">True</property>
- <property name="label" translatable="yes">389</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget35">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget36">
- <property name="visible">True</property>
- <property name="label" translatable="yes">636</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget37">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget38">
- <property name="visible">True</property>
- <property name="label" translatable="yes">3268</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget39">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget40">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label176">
- <property name="visible">True</property>
- <property name="label" translatable="yes">U_se SSL/TLS:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- </packing>
+ <widget>
+ <class>GtkButton</class>
+ <name>addSource</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>_Add</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>editSource</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>_Edit</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>deleteSource</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>De_lete</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>general-tab-window</name>
+ <visible>False</visible>
+ <title>general-tab</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>general-tab</name>
+ <border_width>6</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table36</name>
+ <border_width>3</border_width>
+ <rows>3</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label534</name>
+ <label>_Server name:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>server-name-entry</default_focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label535</name>
+ <label>_Log in method:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>server-name-entry</name>
+ <can_focus>True</can_focus>
+ <has_focus>True</has_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment63</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>auth-optionmenu</name>
+ <can_focus>True</can_focus>
+ <items>Anonymously
+Using email address
+Using distinguished name (DN)
+</items>
+ <initial_choice>0</initial_choice>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>auth-label-notebook</name>
+ <sensitive>False</sensitive>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label553</name>
+ <label>Email Address:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label546</name>
+ <label>label546</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label536</name>
+ <label>Distinguished _name:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label547</name>
+ <label>label547</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>auth-entry-notebook</name>
+ <sensitive>False</sensitive>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>email-entry</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label549</name>
+ <label>label549</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>dn-entry</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label550</name>
+ <label>label550</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>general-tab-help</name>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox145</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap79</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label537</name>
+ <label>This is the full name of your ldap server. For example, &quot;ldap.mycompany.com&quot;.</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label538</name>
+ <label>label163</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox146</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap80</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label539</name>
+ <label>Evolution will use this email address to authenticate you with the server</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label540</name>
+ <label>label164</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox147</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap81</name>
+ <filename>gnome-hint.png</filename>
<child>
- <widget class="GtkAlignment" id="alignment60">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkOptionMenu" id="ssl-optionmenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget41">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget42">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Always</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget43">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Whenever Possible</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget44">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Never</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label541</name>
+ <label>Evolution will use this DN to authenticate you with the server</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label542</name>
+ <label>label165</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label552</name>
+ <label>This is the method evolution will use to authenticate you. Note that setting this to &quot;Email Address&quot; requires anonymous access to your ldap server.</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>True</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label551</name>
+ <label>label551</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox148</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap82</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label544</name>
+ <label>This is the name for this server that will appear in your Evolution folder list.
+It is for display purposes only. </label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label545</name>
+ <label>label452</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>connecting-tab-window</name>
+ <visible>False</visible>
+ <title>connecting-tab</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>connecting-tab</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table14</name>
+ <border_width>3</border_width>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
</child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label175</name>
+ <label>_Port number:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment23</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkPixmap</class>
+ <name>pixmap11</name>
+ <filename>gnome-hint.png</filename>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <build_insensitive>True</build_insensitive>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment21</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkCombo</class>
+ <name>port-combo</name>
+ <value_in_list>False</value_in_list>
+ <ok_if_empty>True</ok_if_empty>
+ <case_sensitive>False</case_sensitive>
+ <use_arrows>True</use_arrows>
+ <use_arrows_always>False</use_arrows_always>
+ <items>389
+636
+3268
+</items>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GtkCombo:entry</child_name>
+ <name>entry27</name>
+ <can_focus>True</can_focus>
+ <has_focus>True</has_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text>389</text>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label176</name>
+ <label>U_se SSL/TLS:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment60</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>ssl-optionmenu</name>
+ <can_focus>True</can_focus>
+ <items>Always
+Whenever Possible
+Never
+</items>
+ <initial_choice>1</initial_choice>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>connecting-tab-help</name>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
<child>
- <widget class="GtkNotebook" id="connecting-tab-help">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkLabel" id="label178">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the port on the LDAP server that Evolution will try to connect to. A
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox30</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap7</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label178</name>
+ <label>This is the port on the LDAP server that Evolution will try to connect to. A
list of standard ports has been provided. Ask your system administrator
-what port you should specify.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label179">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label163</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label395">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selecting this option means that Evolution will only connect to your LDAP server if
-your LDAP server supports SSL or TLS.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label398">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label398</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+what port you should specify.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label179</name>
+ <label>label163</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox31</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap8</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label395</name>
+ <label>Selecting this option means that Evolution will only connect to your LDAP server if
+your LDAP server supports SSL or TLS.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <widget class="GtkLabel" id="label399">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selecting this option means that Evolution will only try to use SSL/TLS if you are in a
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label398</name>
+ <label>label398</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox91</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap43</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label399</name>
+ <label>Selecting this option means that Evolution will only try to use SSL/TLS if you are in a
insecure environment. For example, if you and your LDAP server are behind a firewall
at work, then Evolution doesn't need to use SSL/TLS because your connection is already
-secure.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label396">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label396</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+secure.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
-
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label396</name>
+ <label>label396</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox92</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap44</name>
+ <filename>gnome-hint.png</filename>
<child>
- <widget class="GtkLabel" id="label400">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selecting this option means that your server does not support either SSL or TLS. This
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label400</name>
+ <label>Selecting this option means that your server does not support either SSL or TLS. This
means that your connection will be insecure, and that you will be vulnerable to security
-exploits. </property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label397">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label397</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+exploits. </label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label397</name>
+ <label>label397</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
</widget>
- </child>
+ </widget>
</widget>
-<widget class="GtkWindow" id="searching-tab-window">
- <property name="title" translatable="yes">searching-tab</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
-
- <child>
- <widget class="GtkVBox" id="searching-tab">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
+<widget>
+ <class>GtkWindow</class>
+ <name>searching-tab-window</name>
+ <visible>False</visible>
+ <title>searching-tab</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>searching-tab</name>
+ <border_width>6</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table30</name>
+ <border_width>3</border_width>
+ <rows>4</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label455</name>
+ <label>_Search base:</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label456</name>
+ <label>S_earch scope: </label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment49</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>7.45058e-09</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>scope-optionmenu</name>
+ <can_focus>True</can_focus>
+ <items>One
+Sub
+</items>
+ <initial_choice>0</initial_choice>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox109</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>rootdn-entry</name>
+ <can_focus>True</can_focus>
+ <has_focus>True</has_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>rootdn-button</name>
+ <can_focus>True</can_focus>
+ <label> S_how Supported Bases </label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label457</name>
+ <label>_Timeout (minutes):</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>1</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment50</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>1</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox110</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label458</name>
+ <label>1:00</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkHScale</class>
+ <name>timeout-scale</name>
+ <can_focus>True</can_focus>
+ <draw_value>False</draw_value>
+ <value_pos>GTK_POS_LEFT</value_pos>
+ <digits>0</digits>
+ <policy>GTK_UPDATE_DELAYED</policy>
+ <value>3</value>
+ <lower>1</lower>
+ <upper>5</upper>
+ <step>0.5</step>
+ <page>1</page>
+ <page_size>0</page_size>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label459</name>
+ <label>5:00</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>3</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label460</name>
+ <label>Selected:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label461</name>
+ <label>2:30</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label462</name>
+ <label>_Download limit:</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment51</name>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox111</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkSpinButton</class>
+ <name>download-limit-spinbutton</name>
+ <can_focus>True</can_focus>
+ <climb_rate>1</climb_rate>
+ <digits>0</digits>
+ <numeric>False</numeric>
+ <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+ <snap>False</snap>
+ <wrap>False</wrap>
+ <value>100</value>
+ <lower>0</lower>
+ <upper>10000</upper>
+ <step>1</step>
+ <page>10</page>
+ <page_size>10</page_size>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label463</name>
+ <label>cards</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+ <widget>
+ <class>GtkNotebook</class>
+ <name>searching-tab-help</name>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
<child>
- <widget class="GtkTable" id="table30">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label455">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Search base:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label456">
- <property name="visible">True</property>
- <property name="label" translatable="yes">S_earch scope: </property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox112</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap60</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label464</name>
+ <label>The search base is the distinguished name (DN) of the entry where your searches will
+begin. If you leave this blank, the search will begin at the root of the directory tree.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <widget class="GtkAlignment" id="alignment49">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">7.45058e-09</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label465</name>
+ <label>label163</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox113</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap61</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkOptionMenu" id="scope-optionmenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget45">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget46">
- <property name="visible">True</property>
- <property name="label" translatable="yes">One</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget47">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Sub</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label466</name>
+ <label>The search scope defines how deep you would like the search to extend down the
+directory tree. A search scope of &quot;sub&quot; will include all entries below your search base.
+A search scope of &quot;one&quot; will only include the entries one level beneath your base.
+</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label467</name>
+ <label>label164</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox114</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap62</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label468</name>
+ <label>This option controls how long a search will be run.</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label469</name>
+ <label>label165</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox115</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap63</name>
+ <filename>gnome-hint.png</filename>
<child>
- <widget class="GtkHBox" id="hbox109">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkEntry" id="rootdn-entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label470</name>
+ <label>This is the maximum number of entries to download. Setting this number to be
+too large will slow down your addressbook.</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label471</name>
+ <label>label166</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+</widget>
- <child>
- <widget class="GtkButton" id="rootdn-button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes"> S_how Supported Bases </property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label457">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Timeout (minutes):</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">1</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
+<widget>
+ <class>GtkWindow</class>
+ <name>objectclasses-tab-window</name>
+ <visible>False</visible>
+ <title>objectclasses-tab</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>objectclasses-tab</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox93</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox51</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label405</name>
+ <label>Objectclasses Used on Server:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>Custom</class>
+ <name>objectclasses-server-table</name>
+ <creation_function>objectclasses_create_server_table</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Tue, 16 Apr 2002 17:09:21 GMT</last_modification_time>
<child>
- <widget class="GtkAlignment" id="alignment50">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox52</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label407</name>
+ <label>
+</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkHBox" id="hbox110">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label458">
- <property name="visible">True</property>
- <property name="label" translatable="yes">1:00</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHScale" id="timeout-scale">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_LEFT</property>
- <property name="digits">0</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">3 1 5 0.5 1 0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label459">
- <property name="visible">True</property>
- <property name="label" translatable="yes">5:00</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">3</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label460">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selected:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label461">
- <property name="visible">True</property>
- <property name="label" translatable="yes">2:30</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label462">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Download limit:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
+ <widget>
+ <class>GtkVButtonBox</class>
+ <name>vbuttonbox15</name>
+ <layout_style>GTK_BUTTONBOX_START</layout_style>
+ <spacing>1</spacing>
+ <child_min_width>47</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
+ <widget>
+ <class>GtkButton</class>
+ <name>objectclasses-add-button</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>_Add -&gt;</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>objectclasses-remove-button</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>&lt;- _Remove</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox53</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label408</name>
+ <label>Objectclasses Used in Evolution:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <widget class="GtkAlignment" id="alignment51">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkHBox" id="hbox111">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkSpinButton" id="download-limit-spinbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">100 0 10000 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label463">
- <property name="visible">True</property>
- <property name="label" translatable="yes">cards</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
+ <widget>
+ <class>Custom</class>
+ <name>objectclasses-evolution-table</name>
+ <creation_function>objectclasses_create_evolution_table</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Tue, 16 Apr 2002 17:09:43 GMT</last_modification_time>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <name>hbuttonbox16</name>
+ <border_width>6</border_width>
+ <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
+ <spacing>0</spacing>
+ <child_min_width>87</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ <pack>GTK_PACK_END</pack>
</child>
+ <widget>
+ <class>GtkButton</class>
+ <name>objectclasses-default-button</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>R_estore Defaults</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GtkWindow</class>
+ <name>mappings-tab-window</name>
+ <visible>False</visible>
+ <title>mappings-tab</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>mappings-tab</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox94</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
<child>
- <widget class="GtkNotebook" id="searching-tab-help">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkLabel" id="label464">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The search base is the distinguished name (DN) of the entry where your searches will
-begin. If you leave this blank, the search will begin at the root of the directory tree.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox55</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow21</name>
+ <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkCList</class>
+ <name>clist18</name>
+ <can_focus>True</can_focus>
+ <columns>2</columns>
+ <column_widths>146,80</column_widths>
+ <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
+ <show_titles>True</show_titles>
+ <shadow_type>GTK_SHADOW_IN</shadow_type>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label411</name>
+ <label>Evolution Attribute</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
</widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label465">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label163</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label412</name>
+ <label>Associated LDAP Attribute</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
</widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox56</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label413</name>
+ <label>
+</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkVButtonBox</class>
+ <name>vbuttonbox16</name>
+ <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
+ <spacing>0</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
<child>
- <widget class="GtkLabel" id="label466">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The search scope defines how deep you would like the search to extend down the
-directory tree. A search scope of &quot;sub&quot; will include all entries below your search base.
-A search scope of &quot;one&quot; will only include the entries one level beneath your base.
-</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label467">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label164</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label468">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This option controls how long a search will be run.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label469">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label165</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label470">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This is the maximum number of entries to download. Setting this number to be
-too large will slow down your addressbook.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label471">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label166</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button71</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>_Add Mapping</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button72</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>_Edit Mapping</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button73</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>_Delete Mapping</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <name>hbuttonbox17</name>
+ <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
+ <spacing>30</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ <pack>GTK_PACK_END</pack>
</child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button74</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>Re_store Defaults</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
</widget>
- </child>
+ </widget>
</widget>
-<widget class="GtkDialog" id="supported-bases-dialog">
- <property name="title" translatable="yes">Supported Search Bases</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">300</property>
- <property name="default_height">200</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area5">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button107">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</property>
- </widget>
+<widget>
+ <class>GtkWindow</class>
+ <name>dn-customization-tab-window</name>
+ <visible>False</visible>
+ <title>dn-customization-tab</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>dn-customization-tab</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>notebook24</name>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox116</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>2</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap64</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label473</name>
+ <label>To add an attribute to the DN, select it from the list and click the &quot;Add Attribute&quot; button.
+Any values that you add to the DN will become required values for any new contacts
+that you add to the directory on the LDAP server. </label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <widget class="GtkButton" id="button109">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label474</name>
+ <label>label163</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox117</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+
+ <widget>
+ <class>GnomePixmap</class>
+ <name>pixmap65</name>
+ <filename>gnome-hint.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label475</name>
+ <label>Selecting this option will let you change Evolution's default settings for LDAP
+searches, and for creating and editing contacts. </label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>Notebook:tab</child_name>
+ <name>label476</name>
+ <label>label164</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table31</name>
+ <border_width>3</border_width>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox64</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label477</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkVButtonBox</class>
+ <name>vbuttonbox17</name>
+ <layout_style>GTK_BUTTONBOX_START</layout_style>
+ <spacing>10</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button78</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>_Add to DN</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkScrolledWindow</class>
+ <name>scrolledwindow22</name>
+ <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
+ <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
+ <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
+ <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkCList</class>
+ <name>clist19</name>
+ <can_focus>True</can_focus>
+ <columns>2</columns>
+ <column_widths>152,80</column_widths>
+ <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
+ <show_titles>True</show_titles>
+ <shadow_type>GTK_SHADOW_IN</shadow_type>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label478</name>
+ <label>LDAP Attribute</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <child_name>CList:title</child_name>
+ <name>label479</name>
+ <label>Corresponding Evolution Attribute</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox118</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label480</name>
+ <label>_Distinguished Name (DN):</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>entry53</default_focus_target>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry53</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <name>hbuttonbox18</name>
+ <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
+ <spacing>0</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button79</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <label>_Restore Defaults</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
+ </widget>
+ </widget>
+ </widget>
+ </widget>
+</widget>
+
+<widget>
+ <class>GnomeDialog</class>
+ <name>supported-bases-dialog</name>
+ <visible>False</visible>
+ <title>Supported Search Bases</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <default_width>300</default_width>
+ <default_height>200</default_height>
+ <allow_shrink>True</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <auto_close>False</auto_close>
+ <hide_on_close>False</hide_on_close>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDialog:vbox</child_name>
+ <name>dialog-vbox5</name>
+ <homogeneous>False</homogeneous>
+ <spacing>8</spacing>
+ <child>
+ <padding>4</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <child_name>GnomeDialog:action_area</child_name>
+ <name>dialog-action_area5</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>8</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
</child>
+ <widget>
+ <class>GtkButton</class>
+ <name>button107</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button109</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>Custom</class>
+ <name>supported-bases-table</name>
+ <creation_function>supported_bases_create_table</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Fri, 12 Apr 2002 20:06:45 GMT</last_modification_time>
<child>
- <widget class="Custom" id="supported-bases-table">
- <property name="visible">True</property>
- <property name="creation_function">supported_bases_create_table</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Fri, 12 Apr 2002 20:06:45 GMT</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
</widget>
- </child>
+ </widget>
</widget>
-</glade-interface>
+</GTK-Interface>
diff --git a/addressbook/gui/component/select-names/e-select-names-bonobo.c b/addressbook/gui/component/select-names/e-select-names-bonobo.c
index 0f18614c1a..411aedf761 100644
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.c
+++ b/addressbook/gui/component/select-names/e-select-names-bonobo.c
@@ -27,18 +27,13 @@
#include "e-select-names-bonobo.h"
#include "e-simple-card-bonobo.h"
-#include <bonobo-activation/bonobo-activation-activate.h>
-
#include <bonobo/bonobo-property-bag.h>
#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-exception.h>
#include <bonobo/bonobo-event-source.h>
#include <gal/util/e-util.h>
#include <gal/e-text/e-entry.h>
-#include "evolution-shell-client.h"
-
#include "Evolution-Addressbook-SelectNames.h"
#include "e-select-names-manager.h"
@@ -48,7 +43,7 @@
-#define PARENT_TYPE BONOBO_TYPE_OBJECT
+#define PARENT_TYPE bonobo_object_get_type ()
static BonoboObjectClass *parent_class = NULL;
struct _ESelectNamesBonoboPrivate {
@@ -84,7 +79,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
case ENTRY_PROPERTY_ID_TEXT:
{
ETextModel *text_model;
- text_model = E_TEXT_MODEL (g_object_get_data (G_OBJECT (w), "select_names_text_model"));
+ text_model = E_TEXT_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_text_model"));
g_assert (text_model != NULL);
BONOBO_ARG_SET_STRING (arg, e_text_model_get_text (text_model));
@@ -96,7 +91,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
ESelectNamesModel *model;
char *text;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_OBJECT (w), "select_names_model"));
+ model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
g_assert (model != NULL);
text = e_select_names_model_get_address_text (model, ", ");
@@ -110,7 +105,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
ESelectNamesModel *model;
char *text;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_OBJECT (w), "select_names_model"));
+ model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
g_assert (model != NULL);
text = e_select_names_model_export_destinationv (model);
@@ -126,7 +121,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
int i;
GNOME_Evolution_Addressbook_SimpleCardList *card_list;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_OBJECT (w), "select_names_model"));
+ model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
g_assert (model != NULL);
count = e_select_names_model_count (model);
@@ -141,7 +136,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
const ECard *card = e_destination_get_card (destination);
ECardSimple *simple = e_card_simple_new ((ECard *) card);
ESimpleCardBonobo *simple_card = e_simple_card_bonobo_new (simple);
- g_object_unref (simple);
+ gtk_object_unref (GTK_OBJECT (simple));
card_list->_buffer[i] = bonobo_object_corba_objref (BONOBO_OBJECT (simple_card));
}
@@ -154,7 +149,7 @@ entry_get_property_fn (BonoboPropertyBag *bag,
case ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS:
{
ESelectNamesCompletion *comp;
- comp = E_SELECT_NAMES_COMPLETION (g_object_get_data (G_OBJECT (w), "completion_handler"));
+ comp = E_SELECT_NAMES_COMPLETION (gtk_object_get_data (GTK_OBJECT (w), "completion_handler"));
g_assert (comp != NULL);
BONOBO_ARG_SET_BOOLEAN (arg, e_select_names_completion_get_match_contact_lists (comp));
@@ -188,7 +183,7 @@ entry_set_property_fn (BonoboPropertyBag *bag,
case ENTRY_PROPERTY_ID_ADDRESSES:
{
ESelectNamesModel *model;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_OBJECT (w), "select_names_model"));
+ model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
g_assert (model != NULL);
e_entry_set_text (E_ENTRY (w), BONOBO_ARG_GET_STRING (arg));
@@ -199,7 +194,7 @@ entry_set_property_fn (BonoboPropertyBag *bag,
case ENTRY_PROPERTY_ID_DESTINATIONS:
{
ESelectNamesModel *model;
- model = E_SELECT_NAMES_MODEL (g_object_get_data (G_OBJECT (w), "select_names_model"));
+ model = E_SELECT_NAMES_MODEL (gtk_object_get_data (GTK_OBJECT (w), "select_names_model"));
g_assert (model != NULL);
e_select_names_model_import_destinationv (model, BONOBO_ARG_GET_STRING (arg));
@@ -210,7 +205,7 @@ entry_set_property_fn (BonoboPropertyBag *bag,
case ENTRY_PROPERTY_ID_ALLOW_CONTACT_LISTS:
{
ESelectNamesCompletion *comp;
- comp = E_SELECT_NAMES_COMPLETION (g_object_get_data (G_OBJECT (w), "completion_handler"));
+ comp = E_SELECT_NAMES_COMPLETION (gtk_object_get_data (GTK_OBJECT (w), "completion_handler"));
g_assert (comp != NULL);
e_select_names_completion_set_match_contact_lists (comp, BONOBO_ARG_GET_BOOLEAN (arg));
@@ -218,7 +213,7 @@ entry_set_property_fn (BonoboPropertyBag *bag,
}
case ENTRY_PROPERTY_ID_ENTRY_CHANGED:
- g_object_set_data (G_OBJECT (w), "entry_property_id_changed", GUINT_TO_POINTER (1));
+ gtk_object_set_data (GTK_OBJECT (w), "entry_property_id_changed", GUINT_TO_POINTER (1));
break;
default:
@@ -226,16 +221,46 @@ entry_set_property_fn (BonoboPropertyBag *bag,
}
}
+
+/* CORBA interface implementation. */
+
+static POA_GNOME_Evolution_Addressbook_SelectNames__vepv SelectNames_vepv;
+
+static POA_GNOME_Evolution_Addressbook_SelectNames *
+create_servant (void)
+{
+ POA_GNOME_Evolution_Addressbook_SelectNames *servant;
+ CORBA_Environment ev;
+
+ servant = (POA_GNOME_Evolution_Addressbook_SelectNames *) g_new0 (BonoboObjectServant, 1);
+ servant->vepv = &SelectNames_vepv;
+
+ CORBA_exception_init (&ev);
+
+ POA_GNOME_Evolution_Addressbook_SelectNames__init ((PortableServer_Servant) servant, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_free (servant);
+ CORBA_exception_free (&ev);
+ return NULL;
+ }
+
+ CORBA_exception_free (&ev);
+
+ return servant;
+}
+
static void
impl_SelectNames_add_section (PortableServer_Servant servant,
const CORBA_char *id,
const CORBA_char *title,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESelectNamesBonobo *select_names;
ESelectNamesBonoboPrivate *priv;
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ select_names = E_SELECT_NAMES_BONOBO (bonobo_object);
priv = select_names->priv;
e_select_names_manager_add_section (priv->manager, id, title);
@@ -248,10 +273,12 @@ impl_SelectNames_add_section_with_limit (PortableServer_Servant servant,
CORBA_short limit,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESelectNamesBonobo *select_names;
ESelectNamesBonoboPrivate *priv;
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ select_names = E_SELECT_NAMES_BONOBO (bonobo_object);
priv = select_names->priv;
e_select_names_manager_add_section_with_limit (priv->manager, id, title, limit);
@@ -260,10 +287,10 @@ impl_SelectNames_add_section_with_limit (PortableServer_Servant servant,
static void
entry_changed (GtkWidget *widget, BonoboControl *control)
{
- gboolean changed = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (widget), "entry_property_id_changed"));
+ gboolean changed = GPOINTER_TO_UINT (gtk_object_get_data (GTK_OBJECT (widget), "entry_property_id_changed"));
if (!changed)
- bonobo_control_set_property (control, NULL, "entry_changed", TC_CORBA_boolean, TRUE, NULL);
+ bonobo_control_set_property (control, "entry_changed", TRUE, NULL);
}
static void
@@ -307,13 +334,15 @@ impl_SelectNames_get_entry_for_section (PortableServer_Servant servant,
const CORBA_char *section_id,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESelectNamesBonobo *select_names;
ESelectNamesBonoboPrivate *priv;
GtkWidget *entry_widget;
BonoboControl *control;
BonoboPropertyBag *property_bag;
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ select_names = E_SELECT_NAMES_BONOBO (bonobo_object);
priv = select_names->priv;
entry_widget = e_select_names_manager_create_entry (priv->manager, section_id);
@@ -349,10 +378,9 @@ impl_SelectNames_get_entry_for_section (PortableServer_Servant servant,
BONOBO_ARG_BOOLEAN, NULL, NULL,
BONOBO_PROPERTY_WRITEABLE);
- bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (property_bag)), NULL);
- bonobo_object_unref (BONOBO_OBJECT (property_bag));
+ bonobo_control_set_properties (control, property_bag);
- g_signal_connect (entry_widget, "changed", G_CALLBACK (entry_changed), control);
+ gtk_signal_connect (GTK_OBJECT (entry_widget), "changed", GTK_SIGNAL_FUNC (entry_changed), control);
return CORBA_Object_duplicate (bonobo_object_corba_objref (BONOBO_OBJECT (control)), ev);
}
@@ -362,32 +390,22 @@ impl_SelectNames_activate_dialog (PortableServer_Servant servant,
const CORBA_char *section_id,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESelectNamesBonobo *select_names;
ESelectNamesBonoboPrivate *priv;
- EvolutionShellClient *shell_client;
- GNOME_Evolution_Shell shell;
- select_names = E_SELECT_NAMES_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ select_names = E_SELECT_NAMES_BONOBO (bonobo_object);
priv = select_names->priv;
- shell = bonobo_activation_activate_from_id (
- "OAFIID:GNOME_Evolution_Shell",
- Bonobo_ACTIVATION_FLAG_EXISTING_ONLY,
- NULL, ev);
- if (BONOBO_EX (ev))
- return;
-
- shell_client = evolution_shell_client_new (shell);
- e_select_names_manager_activate_dialog (priv->manager, shell_client,
- section_id);
- g_object_unref (shell_client);
+ e_select_names_manager_activate_dialog (priv->manager, section_id);
}
/* GtkObject methods. */
static void
-impl_dispose (GObject *object)
+impl_destroy (GtkObject *object)
{
ESelectNamesBonobo *select_names;
ESelectNamesBonoboPrivate *priv;
@@ -395,43 +413,55 @@ impl_dispose (GObject *object)
select_names = E_SELECT_NAMES_BONOBO (object);
priv = select_names->priv;
- if (priv) {
- if (priv->manager->names) {
- gtk_widget_destroy (GTK_WIDGET (priv->manager->names));
- priv->manager->names = NULL;
- }
-
- g_object_unref (priv->manager);
-
- g_free (priv);
- select_names->priv = NULL;
+ if (priv->manager->names) {
+ gtk_widget_destroy (GTK_WIDGET (priv->manager->names));
+ priv->manager->names = NULL;
}
- if (G_OBJECT_CLASS (parent_class)->dispose)
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ gtk_object_unref (GTK_OBJECT (priv->manager));
+
+ g_free (priv);
}
static void
-e_select_names_bonobo_class_init (ESelectNamesBonoboClass *klass)
+corba_class_init ()
{
- GObjectClass *object_class;
+ POA_GNOME_Evolution_Addressbook_SelectNames__vepv *vepv;
POA_GNOME_Evolution_Addressbook_SelectNames__epv *epv;
+ PortableServer_ServantBase__epv *base_epv;
- object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
+ base_epv = g_new0 (PortableServer_ServantBase__epv, 1);
+ base_epv->_private = NULL;
+ base_epv->finalize = NULL;
+ base_epv->default_POA = NULL;
- object_class->dispose = impl_dispose;
-
- epv = &klass->epv;
+ epv = g_new0 (POA_GNOME_Evolution_Addressbook_SelectNames__epv, 1);
epv->addSection = impl_SelectNames_add_section;
epv->addSectionWithLimit = impl_SelectNames_add_section_with_limit;
epv->getEntryBySection = impl_SelectNames_get_entry_for_section;
epv->activateDialog = impl_SelectNames_activate_dialog;
+
+ vepv = &SelectNames_vepv;
+ vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
+ vepv->GNOME_Evolution_Addressbook_SelectNames_epv = epv;
+}
+
+static void
+class_init (ESelectNamesBonoboClass *klass)
+{
+ GtkObjectClass *object_class;
+
+ object_class = GTK_OBJECT_CLASS (klass);
+ parent_class = gtk_type_class (bonobo_object_get_type ());
+
+ object_class->destroy = impl_destroy;
+
+ corba_class_init ();
}
static void
-e_select_names_bonobo_init (ESelectNamesBonobo *select_names)
+init (ESelectNamesBonobo *select_names)
{
ESelectNamesBonoboPrivate *priv;
@@ -440,26 +470,29 @@ e_select_names_bonobo_init (ESelectNamesBonobo *select_names)
priv->manager = e_select_names_manager_new ();
priv->event_source = NULL;
- g_signal_connect (priv->manager,
- "changed",
- G_CALLBACK (manager_changed_cb),
- select_names);
+ gtk_signal_connect (GTK_OBJECT (priv->manager),
+ "changed",
+ GTK_SIGNAL_FUNC (manager_changed_cb),
+ select_names);
+
+ gtk_signal_connect (GTK_OBJECT (priv->manager),
+ "ok",
+ GTK_SIGNAL_FUNC (manager_ok_cb),
+ select_names);
- g_signal_connect (priv->manager,
- "ok",
- G_CALLBACK (manager_ok_cb),
- select_names);
-
select_names->priv = priv;
}
-static void
-e_select_names_bonobo_construct (ESelectNamesBonobo *select_names)
+void
+e_select_names_bonobo_construct (ESelectNamesBonobo *select_names,
+ GNOME_Evolution_Addressbook_SelectNames corba_object)
{
g_return_if_fail (select_names != NULL);
g_return_if_fail (E_IS_SELECT_NAMES_BONOBO (select_names));
+ bonobo_object_construct (BONOBO_OBJECT (select_names), corba_object);
+
g_assert (select_names->priv->event_source == NULL);
select_names->priv->event_source = bonobo_event_source_new ();
bonobo_object_add_interface (BONOBO_OBJECT (select_names), BONOBO_OBJECT (select_names->priv->event_source));
@@ -468,18 +501,21 @@ e_select_names_bonobo_construct (ESelectNamesBonobo *select_names)
ESelectNamesBonobo *
e_select_names_bonobo_new (void)
{
+ POA_GNOME_Evolution_Addressbook_SelectNames *servant;
+ GNOME_Evolution_Addressbook_SelectNames corba_object;
ESelectNamesBonobo *select_names;
- select_names = g_object_new (E_TYPE_SELECT_NAMES_BONOBO, NULL);
+ servant = create_servant ();
+ if (servant == NULL)
+ return NULL;
+
+ select_names = gtk_type_new (e_select_names_bonobo_get_type ());
- e_select_names_bonobo_construct (select_names);
+ corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (select_names), servant);
+ e_select_names_bonobo_construct (select_names, corba_object);
return select_names;
}
-BONOBO_TYPE_FUNC_FULL (
- ESelectNamesBonobo,
- GNOME_Evolution_Addressbook_SelectNames,
- PARENT_TYPE,
- e_select_names_bonobo);
+E_MAKE_TYPE (e_select_names_bonobo, "ESelectNamesBonobo", ESelectNamesBonobo, class_init, init, PARENT_TYPE)
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c
index a189077c92..7ebd100d67 100644
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ b/addressbook/gui/component/select-names/e-select-names.c
@@ -19,10 +19,12 @@
*/
#include <config.h>
-#include <string.h>
#include <glib.h>
-#include <gtk/gtk.h>
+#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
+#include <libgnomeui/gnome-stock.h>
+#include <libgnomeui/gnome-dialog.h>
+#include <libgnomeui/gnome-dialog-util.h>
#include <gal/e-table/e-table-simple.h>
#include <gal/e-table/e-table-without.h>
@@ -42,21 +44,23 @@
#include "e-select-names.h"
#include <addressbook/backend/ebook/e-card-simple.h>
-#include "e-select-names-table-model.h"
+#include "e-select-names-text-model.h"
#include <gal/widgets/e-categories-master-list-option-menu.h>
+#include <gal/widgets/e-unicode.h>
#include <gal/e-text/e-entry.h>
#include <e-util/e-categories-master-list-wombat.h>
-#include "e-util/e-sexp.h"
-static void e_select_names_init (ESelectNames *names);
+static void e_select_names_init (ESelectNames *card);
static void e_select_names_class_init (ESelectNamesClass *klass);
-static void e_select_names_dispose (GObject *object);
+static void e_select_names_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
+static void e_select_names_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
+static void e_select_names_destroy (GtkObject *object);
static void update_query (GtkWidget *widget, ESelectNames *e_select_names);
-static void sync_table_and_models (ESelectNamesModel *triggering_model, ESelectNames *esl);
+extern EvolutionShellClient *global_shell_client;
-static GtkDialogClass *parent_class = NULL;
-#define PARENT_TYPE gtk_dialog_get_type()
+static GnomeDialogClass *parent_class = NULL;
+#define PARENT_TYPE gnome_dialog_get_type()
/* The arguments we take */
enum {
@@ -64,35 +68,33 @@ enum {
};
typedef struct {
- char *title;
- ESelectNamesModel *source;
- ESelectNamesTableModel *table_model;
- ESelectNames *names;
- GtkWidget *label;
- GtkWidget *button;
- GtkWidget *recipient_table;
- gulong changed_id;
+ char *title;
+ ESelectNamesModel *source;
+ ESelectNamesTextModel *text_model;
+ ESelectNames *names;
+ GtkWidget *label;
+ GtkWidget *button;
} ESelectNamesChild;
-GType
+GtkType
e_select_names_get_type (void)
{
- static GType type = 0;
+ static GtkType type = 0;
if (!type) {
- static const GTypeInfo info = {
- sizeof (ESelectNamesClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_select_names_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ static const GtkTypeInfo info =
+ {
+ "ESelectNames",
sizeof (ESelectNames),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_select_names_init,
+ sizeof (ESelectNamesClass),
+ (GtkClassInitFunc) e_select_names_class_init,
+ (GtkObjectInitFunc) e_select_names_init,
+ /* reserved_1 */ NULL,
+ /* reserved_2 */ NULL,
+ (GtkClassInitFunc) NULL,
};
- type = g_type_register_static (PARENT_TYPE, "ESelectNames", &info, 0);
+ type = gtk_type_unique (PARENT_TYPE, &info);
}
return type;
@@ -101,34 +103,30 @@ e_select_names_get_type (void)
static void
e_select_names_class_init (ESelectNamesClass *klass)
{
- GObjectClass *object_class;
+ GtkObjectClass *object_class;
- object_class = G_OBJECT_CLASS (klass);
+ object_class = (GtkObjectClass*) klass;
- parent_class = g_type_class_peek_parent (klass);
+ parent_class = gtk_type_class (PARENT_TYPE);
- object_class->dispose = e_select_names_dispose;
+ object_class->set_arg = e_select_names_set_arg;
+ object_class->get_arg = e_select_names_get_arg;
+ object_class->destroy = e_select_names_destroy;
}
GtkWidget *e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int num1, int num2);
GtkWidget *e_addressbook_create_folder_selector(char *name, char *string1, char *string2, int num1, int num2);
static void
-search_result (EAddressbookModel *model, EBookViewStatus status, ESelectNames *esn)
-{
- sync_table_and_models (NULL, esn);
-}
-
-static void
set_book(EBook *book, EBookStatus status, ESelectNames *esn)
{
- g_object_set(esn->model,
- "book", book,
- NULL);
+ gtk_object_set(GTK_OBJECT(esn->model),
+ "book", book,
+ NULL);
update_query (NULL, esn);
- g_object_unref(book);
- g_object_unref(esn->model);
- g_object_unref(esn);
+ gtk_object_unref(GTK_OBJECT(book));
+ gtk_object_unref(GTK_OBJECT(esn->model));
+ gtk_object_unref(GTK_OBJECT(esn));
}
static void
@@ -151,8 +149,8 @@ addressbook_model_set_uri(ESelectNames *e_select_names, EAddressbookModel *model
book = e_book_new();
- g_object_ref(e_select_names);
- g_object_ref(model);
+ gtk_object_ref(GTK_OBJECT(e_select_names));
+ gtk_object_ref(GTK_OBJECT(model));
addressbook_load_uri(book, book_uri, (EBookCallback) set_book, e_select_names);
g_free (book_uri);
@@ -221,7 +219,7 @@ real_add_address_cb (int model_row, gpointer closure)
e_select_names_model_append (child->source, dest);
e_select_names_model_clean (child->source, FALSE);
- g_object_unref(card);
+ gtk_object_unref(GTK_OBJECT(card));
}
}
@@ -270,7 +268,7 @@ esn_get_key_fn (ETableModel *source, int row, void *closure)
EAddressbookModel *model = E_ADDRESSBOOK_MODEL (closure);
ECard *card = e_addressbook_model_get_card (model, row);
void *key = card_key (card);
- g_object_unref (card);
+ gtk_object_unref (GTK_OBJECT (card));
return key;
}
@@ -300,13 +298,14 @@ e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int n
ETableModel *without;
EAddressbookModel *model;
GtkWidget *table;
+ char *spec;
model = e_addressbook_model_new ();
adapter = E_TABLE_MODEL (e_addressbook_table_adapter_new (model));
- g_object_set(model,
- "editable", FALSE,
- NULL);
+ gtk_object_set(GTK_OBJECT(model),
+ "editable", FALSE,
+ NULL);
without = e_table_without_new (adapter,
g_str_hash,
@@ -322,9 +321,9 @@ e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int n
EVOLUTION_ETSPECDIR "/e-select-names.etspec",
NULL);
- g_object_set_data(G_OBJECT(table), "adapter", adapter);
- g_object_set_data(G_OBJECT(table), "without", without);
- g_object_set_data(G_OBJECT(table), "model", model);
+ gtk_object_set_data(GTK_OBJECT(table), "adapter", adapter);
+ gtk_object_set_data(GTK_OBJECT(table), "without", without);
+ gtk_object_set_data(GTK_OBJECT(table), "model", model);
return table;
}
@@ -332,48 +331,45 @@ e_addressbook_create_ebook_table(char *name, char *string1, char *string2, int n
GtkWidget *
e_addressbook_create_folder_selector(char *name, char *string1, char *string2, int num1, int num2)
{
- return g_object_new (EVOLUTION_TYPE_FOLDER_SELECTOR_BUTTON, NULL);
+ return (GtkWidget *)gtk_type_new (EVOLUTION_TYPE_FOLDER_SELECTOR_BUTTON);
}
static void
folder_selected (EvolutionFolderSelectorButton *button, GNOME_Evolution_Folder *folder,
ESelectNames *e_select_names)
{
+ Bonobo_ConfigDatabase db;
+
addressbook_model_set_uri(e_select_names, e_select_names->model, folder->physicalUri);
- e_config_listener_set_string (e_book_get_config_database(),
- "/apps/evolution/addressbook/select_names/last_used_uri", folder->physicalUri);
+ db = addressbook_config_database (NULL);
+ bonobo_config_set_string (db, "/Addressbook/select_names_uri", folder->physicalUri, NULL);
}
static void
update_query (GtkWidget *widget, ESelectNames *e_select_names)
{
char *category = "";
- const char *search = "";
+ char *search = "";
char *query;
char *q_array[4];
int i;
- GString *s = g_string_new ("");
-
if (e_select_names->categories) {
category = e_categories_master_list_option_menu_get_category (E_CATEGORIES_MASTER_LIST_OPTION_MENU (e_select_names->categories));
}
if (e_select_names->select_entry) {
search = gtk_entry_get_text (GTK_ENTRY (e_select_names->select_entry));
}
-
- e_sexp_encode_string (s, search);
-
i = 0;
q_array[i++] = "(contains \"email\" \"\")";
if (category && *category)
q_array[i++] = g_strdup_printf ("(is \"category\" \"%s\")", category);
if (search && *search)
- q_array[i++] = g_strdup_printf ("(or (beginswith \"email\" %s) "
- " (beginswith \"full_name\" %s) "
- " (beginswith \"nickname\" %s)"
- " (beginswith \"file_as\" %s))",
- s->str, s->str, s->str, s->str);
+ q_array[i++] = g_strdup_printf ("(or (beginswith \"email\" \"%s\") "
+ " (beginswith \"full_name\" \"%s\") "
+ " (beginswith \"nickname\" \"%s\")"
+ " (beginswith \"file_as\" \"%s\"))",
+ search, search, search, search);
q_array[i++] = NULL;
if (i > 2) {
char *temp = g_strjoinv (" ", q_array);
@@ -382,27 +378,32 @@ update_query (GtkWidget *widget, ESelectNames *e_select_names)
} else {
query = g_strdup (q_array[0]);
}
- g_object_set (e_select_names->model,
- "query", query,
- NULL);
+ gtk_object_set (GTK_OBJECT (e_select_names->model),
+ "query", query,
+ NULL);
for (i = 1; q_array[i]; i++) {
g_free (q_array[i]);
}
g_free (query);
- g_string_free (s, TRUE);
}
static void
status_message (EAddressbookModel *model, const gchar *message, ESelectNames *e_select_names)
{
- if (message == NULL)
+ if (message == NULL) {
+ if (e_select_names->status_image)
+ gtk_widget_hide (e_select_names->status_image);
gtk_label_set_text (GTK_LABEL (e_select_names->status_message), "");
- else
+ }
+ else {
+ if (e_select_names->status_image)
+ gtk_widget_show (e_select_names->status_image);
gtk_label_set_text (GTK_LABEL (e_select_names->status_message), message);
+ }
}
static void
-categories_changed (GtkWidget *widget, ESelectNames *e_select_names)
+categories_changed (GtkWidget *widget, gint value, ESelectNames *e_select_names)
{
update_query (widget, e_select_names);
}
@@ -411,7 +412,7 @@ static void
select_entry_changed (GtkWidget *widget, ESelectNames *e_select_names)
{
if (e_select_names->select_entry) {
- const char *select_string = gtk_entry_get_text (GTK_ENTRY (e_select_names->select_entry));
+ char *select_string = gtk_entry_get_text (GTK_ENTRY (e_select_names->select_entry));
char *select_strcoll_string = g_utf8_collate_key (select_string, -1);
int count;
ETable *table;
@@ -428,7 +429,7 @@ select_entry_changed (GtkWidget *widget, ESelectNames *e_select_names)
E_CARD_SIMPLE_FIELD_NAME_OR_ORG,
model_row),
-1);
- if (g_utf8_collate (select_strcoll_string, row_strcoll_string) <= 0) {
+ if (strcmp (select_strcoll_string, row_strcoll_string) <= 0) {
g_free (row_strcoll_string);
break;
}
@@ -459,15 +460,15 @@ e_select_names_create_categories (gchar *name,
ecml = e_categories_master_list_wombat_new ();
option_menu = e_categories_master_list_option_menu_new (ecml);
- g_object_unref (ecml);
+ gtk_object_unref (GTK_OBJECT (ecml));
return option_menu;
}
static void
-clear_widget (gpointer data, GObject *where_object_was)
+clear_widget (GtkWidget *w, gpointer user_data)
{
- GtkWidget **widget_ref = data;
+ GtkWidget **widget_ref = user_data;
*widget_ref = NULL;
}
@@ -476,8 +477,14 @@ e_select_names_init (ESelectNames *e_select_names)
{
GladeXML *gui;
GtkWidget *widget, *button;
+ const char *selector_types[] = { "contacts/*", NULL };
+ char *filename;
+ char *contacts_uri;
+ Bonobo_ConfigDatabase db;
+
+ db = addressbook_config_database (NULL);
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/select-names.glade", NULL, NULL);
+ gui = glade_xml_new (EVOLUTION_GLADEDIR "/select-names.glade", NULL);
e_select_names->gui = gui;
e_select_names->children = g_hash_table_new(g_str_hash, g_str_equal);
@@ -489,172 +496,156 @@ e_select_names_init (ESelectNames *e_select_names)
return;
}
gtk_widget_ref(widget);
- gtk_container_remove(GTK_CONTAINER(widget->parent), widget);
- gtk_box_pack_start(GTK_BOX(GTK_DIALOG(e_select_names)->vbox), widget, TRUE, TRUE, 0);
+ gtk_widget_unparent(widget);
+ gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(e_select_names)->vbox), widget, TRUE, TRUE, 0);
gtk_widget_unref(widget);
- gtk_dialog_add_buttons (GTK_DIALOG (e_select_names),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- gtk_dialog_set_default_response (GTK_DIALOG (e_select_names),
- GTK_RESPONSE_OK);
-
- gtk_window_set_modal (GTK_WINDOW (e_select_names), TRUE);
+ gnome_dialog_append_buttons(GNOME_DIALOG(e_select_names),
+ GNOME_STOCK_BUTTON_OK,
+ GNOME_STOCK_BUTTON_CANCEL,
+ NULL);
+ gnome_dialog_set_default(GNOME_DIALOG(e_select_names), 0);
gtk_window_set_title(GTK_WINDOW(e_select_names), _("Select Contacts from Addressbook"));
- gtk_window_set_resizable(GTK_WINDOW(e_select_names), TRUE);
+ gtk_window_set_policy(GTK_WINDOW(e_select_names), FALSE, TRUE, FALSE);
e_select_names->table = E_TABLE_SCROLLED(glade_xml_get_widget(gui, "table-source"));
- e_select_names->model = g_object_get_data(G_OBJECT(e_select_names->table), "model");
- e_select_names->adapter = g_object_get_data(G_OBJECT(e_select_names->table), "adapter");
- e_select_names->without = g_object_get_data(G_OBJECT(e_select_names->table), "without");
- gtk_widget_show (GTK_WIDGET (e_select_names->table));
+ e_select_names->model = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "model");
+ e_select_names->adapter = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "adapter");
+ e_select_names->without = gtk_object_get_data(GTK_OBJECT(e_select_names->table), "without");
e_select_names->status_message = glade_xml_get_widget (gui, "status-message");
if (e_select_names->status_message && !GTK_IS_LABEL (e_select_names->status_message))
e_select_names->status_message = NULL;
if (e_select_names->status_message) {
- e_select_names->status_id = g_signal_connect (e_select_names->model, "status_message",
- G_CALLBACK (status_message), e_select_names);
- g_object_weak_ref (G_OBJECT (e_select_names->status_message), clear_widget, &e_select_names->status_message);
+ gtk_signal_connect (GTK_OBJECT (e_select_names->model), "status_message",
+ GTK_SIGNAL_FUNC (status_message), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->status_message), "destroy",
+ GTK_SIGNAL_FUNC(clear_widget), &e_select_names->status_message);
}
-
- e_select_names->search_id = g_signal_connect (e_select_names->model,
- "search_result", G_CALLBACK (search_result),
- e_select_names);
+ e_select_names->status_image = glade_xml_get_widget (gui, "status-image");
+ gtk_widget_hide (e_select_names->status_image);
e_select_names->categories = glade_xml_get_widget (gui, "custom-categories");
if (e_select_names->categories && !E_IS_CATEGORIES_MASTER_LIST_OPTION_MENU (e_select_names->categories))
e_select_names->categories = NULL;
if (e_select_names->categories) {
- g_signal_connect(e_select_names->categories, "changed",
- G_CALLBACK(categories_changed), e_select_names);
- g_object_weak_ref (G_OBJECT (e_select_names->categories), clear_widget, &e_select_names->categories);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->categories), "changed",
+ GTK_SIGNAL_FUNC(categories_changed), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->categories), "destroy",
+ GTK_SIGNAL_FUNC(clear_widget), &e_select_names->categories);
}
- gtk_widget_show (e_select_names->categories);
e_select_names->select_entry = glade_xml_get_widget (gui, "entry-select");
if (e_select_names->select_entry && !GTK_IS_ENTRY (e_select_names->select_entry))
e_select_names->select_entry = NULL;
if (e_select_names->select_entry) {
- g_signal_connect(e_select_names->select_entry, "changed",
- G_CALLBACK(select_entry_changed), e_select_names);
- g_signal_connect(e_select_names->select_entry, "activate",
- G_CALLBACK(update_query), e_select_names);
- g_object_weak_ref (G_OBJECT (e_select_names->select_entry), clear_widget, &e_select_names->select_entry);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->select_entry), "changed",
+ GTK_SIGNAL_FUNC(select_entry_changed), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->select_entry), "activate",
+ GTK_SIGNAL_FUNC(update_query), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(e_select_names->select_entry), "destroy",
+ GTK_SIGNAL_FUNC(clear_widget), &e_select_names->select_entry);
}
button = glade_xml_get_widget (gui, "button-find");
if (button && GTK_IS_BUTTON (button))
- g_signal_connect(button, "clicked",
- G_CALLBACK(update_query), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(button), "clicked",
+ GTK_SIGNAL_FUNC(update_query), e_select_names);
+
+ contacts_uri = bonobo_config_get_string_with_default (db, "/Addressbook/select_names_uri",
+ NULL, NULL);
+ if (!contacts_uri) {
+ contacts_uri = bonobo_config_get_string_with_default (db, "/DefaultFolders/contacts_uri",
+ NULL,
+ NULL);
+ }
+ if (!contacts_uri) {
+ filename = gnome_util_prepend_user_home("evolution/local/Contacts");
+ contacts_uri = g_strdup_printf("file://%s", filename);
+ g_free (filename);
+ }
button = glade_xml_get_widget (gui, "folder-selector");
+ evolution_folder_selector_button_construct (EVOLUTION_FOLDER_SELECTOR_BUTTON (button),
+ global_shell_client,
+ _("Find contact in"),
+ contacts_uri,
+ selector_types);
if (button && EVOLUTION_IS_FOLDER_SELECTOR_BUTTON (button))
- g_signal_connect(button, "selected",
- G_CALLBACK(folder_selected), e_select_names);
- gtk_widget_show (button);
-
- g_signal_connect (e_table_scrolled_get_table (e_select_names->table), "double_click",
- G_CALLBACK (add_address), e_select_names);
- g_signal_connect (e_table_scrolled_get_table (e_select_names->table), "selection_change",
- G_CALLBACK (selection_change), e_select_names);
+ gtk_signal_connect(GTK_OBJECT(button), "selected",
+ GTK_SIGNAL_FUNC(folder_selected), e_select_names);
+
+ gtk_signal_connect (GTK_OBJECT (e_table_scrolled_get_table (e_select_names->table)), "double_click",
+ GTK_SIGNAL_FUNC (add_address), e_select_names);
+ gtk_signal_connect (GTK_OBJECT (e_table_scrolled_get_table (e_select_names->table)), "selection_change",
+ GTK_SIGNAL_FUNC (selection_change), e_select_names);
selection_change (e_table_scrolled_get_table (e_select_names->table), e_select_names);
+
+ addressbook_model_set_uri(e_select_names, e_select_names->model, contacts_uri);
+
+ g_free (contacts_uri);
}
static void e_select_names_child_free(char *key, ESelectNamesChild *child, ESelectNames *e_select_names)
{
- g_signal_handler_disconnect(child->source, child->changed_id);
-
+ gtk_signal_disconnect_by_func (GTK_OBJECT (child->source), GTK_SIGNAL_FUNC (sync_table_and_models), e_select_names);
g_free(child->title);
- g_object_unref(child->table_model);
- g_object_unref(child->source);
+ gtk_object_unref(GTK_OBJECT(child->text_model));
+ gtk_object_unref(GTK_OBJECT(child->source));
g_free(key);
g_free(child);
}
static void
-e_select_names_dispose (GObject *object)
+e_select_names_destroy (GtkObject *object)
{
ESelectNames *e_select_names = E_SELECT_NAMES(object);
- printf("eselectnames dispose\n");
-
- if (e_select_names->status_id) {
- g_signal_handler_disconnect(e_select_names->model, e_select_names->status_id);
- e_select_names->status_id = 0;
- }
+ gtk_object_unref(GTK_OBJECT(e_select_names->gui));
+ g_hash_table_foreach(e_select_names->children, (GHFunc) e_select_names_child_free, e_select_names);
+ g_hash_table_destroy(e_select_names->children);
+ gtk_object_unref(GTK_OBJECT(e_select_names->without));
+ gtk_object_unref(GTK_OBJECT(e_select_names->adapter));
+ gtk_object_unref(GTK_OBJECT(e_select_names->model));
- if (e_select_names->search_id) {
- g_signal_handler_disconnect(e_select_names->model, e_select_names->search_id);
- e_select_names->search_id = 0;
- }
+ g_free(e_select_names->def);
- if (e_select_names->gui) {
- g_object_unref(e_select_names->gui);
- e_select_names->gui = NULL;
- }
+ (*(GTK_OBJECT_CLASS(parent_class))->destroy)(object);
+}
- if (e_select_names->children) {
- g_hash_table_foreach(e_select_names->children, (GHFunc) e_select_names_child_free, e_select_names);
- g_hash_table_destroy(e_select_names->children);
- e_select_names->children = NULL;
- }
+GtkWidget*
+e_select_names_new (void)
+{
+ GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_select_names_get_type ()));
+ return widget;
+}
- if (e_select_names->without) {
- g_object_unref(e_select_names->without);
- e_select_names->without = NULL;
- }
- if (e_select_names->adapter) {
- g_object_unref(e_select_names->adapter);
- e_select_names->adapter = NULL;
- }
- if (e_select_names->model) {
- g_object_unref(e_select_names->model);
- e_select_names->model = NULL;
- }
+static void
+e_select_names_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+{
+ ESelectNames *editor;
- if (e_select_names->def) {
- g_free(e_select_names->def);
- e_select_names->def = NULL;
+ editor = E_SELECT_NAMES (o);
+
+ switch (arg_id){
+ default:
+ return;
}
-
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose(object);
}
-GtkWidget*
-e_select_names_new (EvolutionShellClient *shell_client)
+static void
+e_select_names_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
ESelectNames *e_select_names;
- const char *selector_types[] = { "contacts/*", NULL };
- char *contacts_uri;
- GtkWidget *button;
- EConfigListener *db;
-
- e_select_names = g_object_new (E_TYPE_SELECT_NAMES, NULL);
-
- db = e_book_get_config_database ();
- contacts_uri = e_config_listener_get_string_with_default (
- db, "/apps/evolution/addressbook/select_names/last_used_uri",
- NULL, NULL);
- if (!contacts_uri)
- contacts_uri = g_strdup (e_book_get_default_book_uri ());
-
- button = glade_xml_get_widget (e_select_names->gui, "folder-selector");
- evolution_folder_selector_button_construct (EVOLUTION_FOLDER_SELECTOR_BUTTON (button),
- shell_client,
- _("Find contact in"),
- contacts_uri,
- selector_types);
- addressbook_model_set_uri(e_select_names, e_select_names->model, contacts_uri);
-
- g_free (contacts_uri);
+ e_select_names = E_SELECT_NAMES (object);
- return GTK_WIDGET (e_select_names);
+ switch (arg_id) {
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
}
static void
@@ -663,60 +654,85 @@ button_clicked(GtkWidget *button, ESelectNamesChild *child)
real_add_address(child->names, child);
}
+#if 0
static void
remove_address(ETable *table, int row, int col, GdkEvent *event, ESelectNamesChild *child)
{
e_select_names_model_delete (child->source, row);
}
+#endif
struct _RightClickData {
ESelectNamesChild *child;
- int row;
+ int index;
};
typedef struct _RightClickData RightClickData;
+#if 0
+static GSList *selected_rows = NULL;
+
+static void
+etable_selection_foreach_cb (int row, void *data)
+{
+ /* Build a list of rows in reverse order, then remove them,
+ necessary because otherwise it'll start trying to delete
+ rows out of index in ETableModel */
+ selected_rows = g_slist_prepend (selected_rows, GINT_TO_POINTER (row));
+}
+
+static void
+selected_rows_foreach_cb (void *row, void *data)
+{
+ ESelectNamesChild *child = data;
+
+ remove_address (NULL, GPOINTER_TO_INT (row), 0, NULL, child);
+}
+#endif
+
static void
remove_cb (GtkWidget *widget, void *data)
{
RightClickData *rcdata = (RightClickData *)data;
- e_select_names_model_delete (rcdata->child->source, rcdata->row);
+ e_select_names_model_delete (rcdata->child->source, rcdata->index);
/* Free everything we've created */
g_free (rcdata);
}
static void
-section_right_click_cb (ETable *et, int row, int col, GdkEvent *ev, ESelectNamesChild *child)
+section_right_click_cb (EText *text, GdkEventButton *ev, gint pos, ESelectNamesChild *child)
{
- static EPopupMenu right_click_menu[] = {
- E_POPUP_ITEM (N_("Remove"), G_CALLBACK (remove_cb), 0),
+ EPopupMenu right_click_menu[] = {
+ E_POPUP_ITEM (N_("Remove"), GTK_SIGNAL_FUNC (remove_cb), 0),
E_POPUP_TERMINATOR
};
- RightClickData *rcdata = g_new0 (RightClickData, 1);
+ gint index;
- rcdata->row = row;
- rcdata->child = child;
+ e_select_names_model_text_pos (child->source, child->text_model->seplen, pos, &index, NULL, NULL);
- e_popup_menu_run (right_click_menu, (GdkEvent *)ev, 0, 0, rcdata);
+ if (index != -1) {
+ RightClickData *rcdata = g_new0 (RightClickData, 1);
+ rcdata->index = index;
+ rcdata->child = child;
+
+ e_popup_menu_run (right_click_menu, (GdkEvent *)ev, 0, 0, rcdata);
+ }
}
void
-e_select_names_add_section (ESelectNames *e_select_names,
- const char *name, const char *id,
- ESelectNamesModel *source)
+e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, ESelectNamesModel *source)
{
ESelectNamesChild *child;
GtkWidget *button;
- GtkWidget *label;
GtkWidget *alignment;
+ GtkWidget *label;
GtkTable *table;
char *label_text;
ETable *etable;
- ETableExtras *extras;
- ECell *string_cell;
GtkWidget *sw;
+ GtkWidget *recipient_table;
if (g_hash_table_lookup(e_select_names->children, id)) {
return;
@@ -727,34 +743,45 @@ e_select_names_add_section (ESelectNames *e_select_names,
child = g_new(ESelectNamesChild, 1);
child->names = e_select_names;
- child->title = g_strdup (_(name));
+ child->title = e_utf8_from_locale_string(_(name));
- child->table_model = (ESelectNamesTableModel*)e_select_names_table_model_new (source);
+ child->text_model = (ESelectNamesTextModel *) e_select_names_text_model_new (source);
+ e_select_names_text_model_set_separator (child->text_model, "\n");
child->source = source;
- g_object_ref(child->source);
+ gtk_object_ref(GTK_OBJECT(child->source));
e_select_names->child_count++;
alignment = gtk_alignment_new(0, 0, 1, 0);
- label_text = g_strconcat (child->title, " ->", NULL);
-
- label = gtk_label_new ("");
+ button = gtk_button_new ();
- gtk_label_set_markup (GTK_LABEL(label), label_text);
+ label = e_entry_new ();
+ gtk_object_set(GTK_OBJECT(label),
+ "draw_background", FALSE,
+ "draw_borders", FALSE,
+ "draw_button", TRUE,
+ "editable", FALSE,
+ "text", "",
+ "use_ellipsis", FALSE,
+ "justification", GTK_JUSTIFY_CENTER,
+ NULL);
+ label_text = g_strconcat (child->title, " ->", NULL);
+ gtk_object_set (GTK_OBJECT (label),
+ "text", label_text,
+ "emulate_label_resize", TRUE,
+ NULL);
g_free (label_text);
-
- button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), label);
child->label = label;
child->button = button;
gtk_container_add(GTK_CONTAINER(alignment), button);
gtk_widget_show_all(alignment);
- g_signal_connect(button, "clicked",
- G_CALLBACK(button_clicked), child);
+ gtk_signal_connect(GTK_OBJECT(button), "clicked",
+ GTK_SIGNAL_FUNC(button_clicked), child);
gtk_table_attach(table, alignment,
0, 1,
e_select_names->child_count,
@@ -765,37 +792,33 @@ e_select_names_add_section (ESelectNames *e_select_names,
etable = e_table_scrolled_get_table (e_select_names->table);
gtk_widget_set_sensitive (button, e_table_selected_count (etable) > 0);
- extras = e_table_extras_new ();
- string_cell = e_table_extras_get_cell (extras, "string");
-
- g_object_set (string_cell,
- "underline_column", 2,
- NULL);
-
- sw = e_table_scrolled_new_from_spec_file (E_TABLE_MODEL (child->table_model),
- extras,
- EVOLUTION_ETSPECDIR "/e-select-names-section.etspec",
- NULL);
- g_object_unref (extras);
-
- child->recipient_table = GTK_WIDGET (e_table_scrolled_get_table (E_TABLE_SCROLLED (sw)));
-
- g_signal_connect (child->recipient_table,
- "right_click",
- G_CALLBACK (section_right_click_cb),
- child);
-
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
- g_signal_connect(child->recipient_table, "double_click",
- G_CALLBACK(remove_address), child);
-
- child->changed_id = g_signal_connect (child->source,
- "changed",
- G_CALLBACK (sync_table_and_models),
- e_select_names);
+ sw = gtk_scrolled_window_new (NULL, NULL);
+ recipient_table = e_entry_new ();
+ gtk_object_set (GTK_OBJECT (recipient_table),
+ "model", child->text_model,
+ "allow_newlines", TRUE,
+ NULL);
+
+ gtk_signal_connect (GTK_OBJECT (recipient_table),
+ "popup",
+ GTK_SIGNAL_FUNC (section_right_click_cb),
+ child);
+
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sw), recipient_table);
+
+#if 0
+ gtk_signal_connect(GTK_OBJECT(e_table_scrolled_get_table(E_TABLE_SCROLLED(etable))), "right_click",
+ GTK_SIGNAL_FUNC(section_right_click_cb), child);
+ gtk_signal_connect(GTK_OBJECT(e_table_scrolled_get_table(E_TABLE_SCROLLED(etable))), "double_click",
+ GTK_SIGNAL_FUNC(remove_address), child);
+#endif
+
+
+ gtk_signal_connect (GTK_OBJECT (child->source),
+ "changed",
+ GTK_SIGNAL_FUNC (sync_table_and_models),
+ e_select_names);
gtk_widget_show_all (sw);
@@ -811,6 +834,54 @@ e_select_names_add_section (ESelectNames *e_select_names,
sync_table_and_models (child->source, e_select_names);
}
+static void *
+card_copy(const void *value, void *closure)
+{
+ gtk_object_ref(GTK_OBJECT(value));
+ return (void *)value;
+}
+
+static void
+card_free(void *value, void *closure)
+{
+ gtk_object_unref(GTK_OBJECT(value));
+}
+
+EList *
+e_select_names_get_section(ESelectNames *e_select_names, char *id)
+{
+ ESelectNamesChild *child;
+ int i;
+ int rows;
+ EList *list;
+
+ child = g_hash_table_lookup(e_select_names->children, id);
+ if (!child)
+ return NULL;
+ rows = e_select_names_model_count (child->source);
+
+ list = e_list_new(card_copy, card_free, NULL);
+ for (i = 0; i < rows; i++) {
+ ECard *card = e_select_names_model_get_card (child->source, i);
+ e_list_append(list, card);
+ gtk_object_unref(GTK_OBJECT(card));
+ }
+ return list;
+}
+
+ESelectNamesModel *
+e_select_names_get_source(ESelectNames *e_select_names,
+ char *id)
+{
+ ESelectNamesChild *child = g_hash_table_lookup(e_select_names->children, id);
+ if (child) {
+ if (child->source)
+ gtk_object_ref(GTK_OBJECT(child->source));
+ return child->source;
+ } else
+ return NULL;
+}
+
void
e_select_names_set_default (ESelectNames *e_select_names,
const char *id)
@@ -819,12 +890,10 @@ e_select_names_set_default (ESelectNames *e_select_names,
if (e_select_names->def) {
child = g_hash_table_lookup(e_select_names->children, e_select_names->def);
- if (child) {
- GtkWidget *label = child->label;
-
- /* set the previous default to non-bold */
- gtk_label_set_markup (GTK_LABEL (label), child->title);
- }
+ if (child)
+ gtk_object_set (GTK_OBJECT (E_ENTRY (child->label)->item),
+ "bold", FALSE,
+ NULL);
}
g_free(e_select_names->def);
@@ -832,13 +901,9 @@ e_select_names_set_default (ESelectNames *e_select_names,
if (e_select_names->def) {
child = g_hash_table_lookup(e_select_names->children, e_select_names->def);
- if (child) {
- GtkWidget *label = child->label;
- char *markup = g_strconcat ("<b>", child->title, "</b>", NULL);
-
- /* set the new default to bold */
- gtk_label_set_markup (GTK_LABEL (label), markup);
- g_free (markup);
- }
+ if (child)
+ gtk_object_set (GTK_OBJECT (E_ENTRY (child->label)->item),
+ "bold", TRUE,
+ NULL);
}
}
diff --git a/addressbook/gui/component/select-names/e-select-names.h b/addressbook/gui/component/select-names/e-select-names.h
index 8e672da92a..b70655b932 100644
--- a/addressbook/gui/component/select-names/e-select-names.h
+++ b/addressbook/gui/component/select-names/e-select-names.h
@@ -22,15 +22,17 @@
#include <glib.h>
#include <gtk/gtkwidget.h>
-#include <gtk/gtkdialog.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-util.h>
+#include <libgnomeui/gnome-dialog.h>
#include <glade/glade.h>
#include <gal/e-table/e-table.h>
#include <gal/e-table/e-table-scrolled.h>
-#include "evolution-shell-client.h"
-#include "e-addressbook-model.h"
+#include <addressbook/gui/widgets/e-addressbook-model.h>
#include "e-select-names-model.h"
+#include "e-util/e-list.h"
#ifdef __cplusplus
extern "C" {
@@ -45,11 +47,11 @@ extern "C" {
* --------------------------------------------------------------------------------
*/
-#define E_TYPE_SELECT_NAMES (e_select_names_get_type ())
-#define E_SELECT_NAMES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SELECT_NAMES, ESelectNames))
-#define E_SELECT_NAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SELECT_NAMES, ESelectNamesClass))
-#define E_IS_SELECT_NAMES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SELECT_NAMES))
-#define E_IS_SELECT_NAMES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_SELECT_NAMES))
+#define E_SELECT_NAMES_TYPE (e_select_names_get_type ())
+#define E_SELECT_NAMES(obj) (GTK_CHECK_CAST ((obj), E_SELECT_NAMES_TYPE, ESelectNames))
+#define E_SELECT_NAMES_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SELECT_NAMES_TYPE, ESelectNamesClass))
+#define E_IS_SELECT_NAMES(obj) (GTK_CHECK_TYPE ((obj), E_SELECT_NAMES_TYPE))
+#define E_IS_SELECT_NAMES_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_SELECT_NAMES_TYPE))
typedef struct _ESelectNames ESelectNames;
typedef struct _ESelectNamesClass ESelectNamesClass;
@@ -57,7 +59,7 @@ typedef struct _ESelectNamesFolder ESelectNamesFolder;
struct _ESelectNames
{
- GtkDialog parent;
+ GnomeDialog parent;
/* item specific fields */
GladeXML *gui;
@@ -71,29 +73,31 @@ struct _ESelectNames
GtkWidget *categories;
GtkWidget *select_entry;
GtkWidget *status_message;
+ GtkWidget *status_image;
char *def;
ESelectNamesFolder *current_folder;
-
- /* signal handlers */
- gulong status_id;
- gulong search_id;
};
struct _ESelectNamesClass
{
- GtkDialogClass parent_class;
+ GnomeDialogClass parent_class;
};
-GtkWidget *e_select_names_new (EvolutionShellClient *shell_client);
-GType e_select_names_get_type (void);
-
-void e_select_names_add_section (ESelectNames *e_select_names,
- const char *name,
- const char *id,
- ESelectNamesModel *source);
-void e_select_names_set_default (ESelectNames *e_select_names,
- const char *id);
+GtkWidget *e_select_names_new (void);
+GtkType e_select_names_get_type (void);
+
+void e_select_names_add_section (ESelectNames *e_select_names,
+ char *name,
+ char *id,
+ ESelectNamesModel *source);
+ESelectNamesModel *e_select_names_get_source (ESelectNames *e_select_names,
+ char *id);
+void e_select_names_set_default (ESelectNames *e_select_names,
+ const char *id);
+/* Returns a ref counted list of addresses. */
+EList *e_select_names_get_section (ESelectNames *e_select_names,
+ char *id);
#ifdef __cplusplus
}
diff --git a/addressbook/gui/component/select-names/e-simple-card-bonobo.c b/addressbook/gui/component/select-names/e-simple-card-bonobo.c
index 07203618b3..35154b44a6 100644
--- a/addressbook/gui/component/select-names/e-simple-card-bonobo.c
+++ b/addressbook/gui/component/select-names/e-simple-card-bonobo.c
@@ -33,7 +33,7 @@
#include "Evolution-Addressbook-SelectNames.h"
-#define PARENT_TYPE BONOBO_TYPE_OBJECT
+#define PARENT_TYPE bonobo_object_get_type ()
static BonoboObjectClass *parent_class = NULL;
struct _ESimpleCardBonoboPrivate {
@@ -41,17 +41,45 @@ struct _ESimpleCardBonoboPrivate {
};
+/* CORBA interface implementation. */
+
+static POA_GNOME_Evolution_Addressbook_SimpleCard__vepv SimpleCard_vepv;
+
+static POA_GNOME_Evolution_Addressbook_SimpleCard *
+create_servant (void)
+{
+ POA_GNOME_Evolution_Addressbook_SimpleCard *servant;
+ CORBA_Environment ev;
+
+ servant = (POA_GNOME_Evolution_Addressbook_SimpleCard *) g_new0 (BonoboObjectServant, 1);
+ servant->vepv = &SimpleCard_vepv;
+
+ CORBA_exception_init (&ev);
+
+ POA_GNOME_Evolution_Addressbook_SimpleCard__init ((PortableServer_Servant) servant, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION) {
+ g_free (servant);
+ CORBA_exception_free (&ev);
+ return NULL;
+ }
+
+ CORBA_exception_free (&ev);
+
+ return servant;
+}
static GNOME_Evolution_Addressbook_SimpleCard_Arbitrary *
impl_SimpleCard_get_arbitrary (PortableServer_Servant servant,
const CORBA_char *key,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESimpleCardBonobo *simple_card;
ESimpleCardBonoboPrivate *priv;
GNOME_Evolution_Addressbook_SimpleCard_Arbitrary *ret_val = GNOME_Evolution_Addressbook_SimpleCard_Arbitrary__alloc ();
- simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object);
priv = simple_card->priv;
if (priv->card_simple) {
@@ -75,10 +103,12 @@ impl_SimpleCard_set_arbitrary (PortableServer_Servant servant,
const CORBA_char *value,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESimpleCardBonobo *simple_card;
ESimpleCardBonoboPrivate *priv;
- simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object);
priv = simple_card->priv;
if (priv->card_simple) {
@@ -91,10 +121,12 @@ impl_SimpleCard_get (PortableServer_Servant servant,
GNOME_Evolution_Addressbook_SimpleCard_Field field,
CORBA_Environment *ev)
{
+ BonoboObject *bonobo_object;
ESimpleCardBonobo *simple_card;
ESimpleCardBonoboPrivate *priv;
- simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object);
priv = simple_card->priv;
if (priv->card_simple) {
@@ -114,11 +146,12 @@ impl_SimpleCard_set (PortableServer_Servant servant,
const CORBA_char *value,
CORBA_Environment *ev)
{
-
+ BonoboObject *bonobo_object;
ESimpleCardBonobo *simple_card;
ESimpleCardBonoboPrivate *priv;
- simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object (servant));
+ bonobo_object = bonobo_object_from_servant (servant);
+ simple_card = E_SIMPLE_CARD_BONOBO (bonobo_object);
priv = simple_card->priv;
if (priv->card_simple) {
@@ -132,7 +165,7 @@ impl_SimpleCard_set (PortableServer_Servant servant,
/* GtkObject methods. */
static void
-impl_dispose (GObject *object)
+impl_destroy (GtkObject *object)
{
ESimpleCardBonobo *simple_card;
ESimpleCardBonoboPrivate *priv;
@@ -140,40 +173,54 @@ impl_dispose (GObject *object)
simple_card = E_SIMPLE_CARD_BONOBO (object);
priv = simple_card->priv;
- if (priv) {
- if (priv->card_simple) {
- g_object_unref (priv->card_simple);
- }
-
- g_free (priv);
- simple_card->priv = NULL;
+ if (priv->card_simple) {
+ gtk_object_unref (GTK_OBJECT (priv->card_simple));
}
- if (G_OBJECT_CLASS(parent_class)->dispose)
- G_OBJECT_CLASS(parent_class)->dispose(object);
+ g_free (priv);
+
+ simple_card->priv = NULL;
}
static void
-e_simple_card_bonobo_class_init (ESimpleCardBonoboClass *klass)
+corba_class_init ()
{
- GObjectClass *object_class;
+ POA_GNOME_Evolution_Addressbook_SimpleCard__vepv *vepv;
POA_GNOME_Evolution_Addressbook_SimpleCard__epv *epv;
+ PortableServer_ServantBase__epv *base_epv;
- object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_ref (BONOBO_TYPE_OBJECT);
-
- object_class->dispose = impl_dispose;
+ base_epv = g_new0 (PortableServer_ServantBase__epv, 1);
+ base_epv->_private = NULL;
+ base_epv->finalize = NULL;
+ base_epv->default_POA = NULL;
- epv = &klass->epv;
+ epv = g_new0 (POA_GNOME_Evolution_Addressbook_SimpleCard__epv, 1);
epv->getArbitrary = impl_SimpleCard_get_arbitrary;
epv->setArbitrary = impl_SimpleCard_set_arbitrary;
epv->get = impl_SimpleCard_get;
epv->set = impl_SimpleCard_set;
+
+ vepv = &SimpleCard_vepv;
+ vepv->Bonobo_Unknown_epv = bonobo_object_get_epv ();
+ vepv->GNOME_Evolution_Addressbook_SimpleCard_epv = epv;
+}
+
+static void
+class_init (ESimpleCardBonoboClass *klass)
+{
+ GtkObjectClass *object_class;
+
+ object_class = GTK_OBJECT_CLASS (klass);
+ parent_class = gtk_type_class (bonobo_object_get_type ());
+
+ object_class->destroy = impl_destroy;
+
+ corba_class_init ();
}
static void
-e_simple_card_bonobo_init (ESimpleCardBonobo *simple_card)
+init (ESimpleCardBonobo *simple_card)
{
ESimpleCardBonoboPrivate *priv;
@@ -187,30 +234,36 @@ e_simple_card_bonobo_init (ESimpleCardBonobo *simple_card)
void
e_simple_card_bonobo_construct (ESimpleCardBonobo *simple_card,
+ GNOME_Evolution_Addressbook_SimpleCard corba_object,
ECardSimple *card_simple)
{
g_return_if_fail (simple_card != NULL);
g_return_if_fail (E_IS_SIMPLE_CARD_BONOBO (simple_card));
+ bonobo_object_construct (BONOBO_OBJECT (simple_card), corba_object);
+
simple_card->priv->card_simple = card_simple;
- g_object_ref (card_simple);
+ gtk_object_ref (GTK_OBJECT (card_simple));
}
ESimpleCardBonobo *
e_simple_card_bonobo_new (ECardSimple *card_simple)
{
+ POA_GNOME_Evolution_Addressbook_SimpleCard *servant;
+ GNOME_Evolution_Addressbook_SimpleCard corba_object;
ESimpleCardBonobo *simple_card;
- simple_card = g_object_new (E_TYPE_SIMPLE_CARD_BONOBO, NULL);
+ servant = create_servant ();
+ if (servant == NULL)
+ return NULL;
+
+ simple_card = gtk_type_new (e_simple_card_bonobo_get_type ());
- e_simple_card_bonobo_construct (simple_card, card_simple);
+ corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (simple_card), servant);
+ e_simple_card_bonobo_construct (simple_card, corba_object, card_simple);
return simple_card;
}
-BONOBO_TYPE_FUNC_FULL (
- ESimpleCardBonobo,
- GNOME_Evolution_Addressbook_SimpleCard,
- PARENT_TYPE,
- e_simple_card_bonobo);
+E_MAKE_TYPE (e_simple_card_bonobo, "ESimpleCardBonobo", ESimpleCardBonobo, class_init, init, PARENT_TYPE)
diff --git a/addressbook/gui/component/select-names/select-names.glade b/addressbook/gui/component/select-names/select-names.glade
index 9a6b38f461..6485876fbf 100644
--- a/addressbook/gui/component/select-names/select-names.glade
+++ b/addressbook/gui/component/select-names/select-names.glade
@@ -1,451 +1,518 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+<?xml version="1.0"?>
+<GTK-Interface>
-<glade-interface>
+<project>
+ <name>Select-names</name>
+ <program_name>select-names</program_name>
+ <directory></directory>
+ <source_directory>src</source_directory>
+ <pixmaps_directory>../../../../art/</pixmaps_directory>
+ <language>C</language>
+ <gnome_support>True</gnome_support>
+ <gettext_support>True</gettext_support>
+ <output_main_file>False</output_main_file>
+ <output_support_files>False</output_support_files>
+ <output_build_files>False</output_build_files>
+</project>
-<widget class="GtkDialog" id="dialog-top">
- <property name="title" translatable="yes">Select Names</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">417</property>
- <property name="default_height">332</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
+<widget>
+ <class>GnomeDialog</class>
+ <name>dialog-top</name>
+ <visible>False</visible>
+ <title>Select Names</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>False</modal>
+ <default_width>417</default_width>
+ <default_height>332</default_height>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <auto_close>False</auto_close>
+ <hide_on_close>False</hide_on_close>
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDialog:vbox</child_name>
+ <name>dialog-vbox1</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>4</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
+ <widget>
+ <class>GtkHButtonBox</class>
+ <child_name>GnomeDialog:action_area</child_name>
+ <name>dialog-action_area1</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>8</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
- <child>
- <widget class="GtkButton" id="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
+ <widget>
+ <class>GtkButton</class>
+ <name>button4</name>
+ <can_default>True</can_default>
+ <has_default>True</has_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ </widget>
- <child>
- <widget class="GtkButton" id="button5">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkButton</class>
+ <name>button5</name>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+ </widget>
+ </widget>
+ <widget>
+ <class>GtkTable</class>
+ <name>table-top</name>
+ <rows>3</rows>
+ <columns>1</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
<child>
- <widget class="GtkTable" id="table-top">
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">1</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <child>
- <widget class="GtkHSeparator" id="hseparator1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <widget>
+ <class>GtkHSeparator</class>
+ <name>hseparator1</name>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>False</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+ <widget>
+ <class>GtkFrame</class>
+ <name>frame1</name>
+ <label>Show Contacts</label>
+ <label_xalign>0</label_xalign>
+ <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
- <child>
- <widget class="GtkTable" id="table5">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
+ <widget>
+ <class>GtkTable</class>
+ <name>table5</name>
+ <border_width>3</border_width>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
- <child>
- <widget class="GtkLabel" id="label30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Folder:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label30</name>
+ <label>_Folder:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Category:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label31</name>
+ <label>_Category:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment5</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>0</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
- <child>
- <widget class="Custom" id="custom-categories">
- <property name="visible">True</property>
- <property name="creation_function">e_select_names_create_categories</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 19 Feb 2002 23:06:24 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>Custom</class>
+ <name>custom-categories</name>
+ <creation_function>e_select_names_create_categories</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Tue, 19 Feb 2002 23:06:24 GMT</last_modification_time>
+ </widget>
+ </widget>
- <child>
- <widget class="Custom" id="folder-selector">
- <property name="visible">True</property>
- <property name="creation_function">e_addressbook_create_folder_selector</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Mon, 15 Jul 2002 02:21:32 GMT</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
+ <widget>
+ <class>Custom</class>
+ <name>folder-selector</name>
+ <creation_function>e_addressbook_create_folder_selector</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Mon, 15 Jul 2002 02:21:32 GMT</last_modification_time>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+ </widget>
+ </widget>
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox5</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table4</name>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label32</name>
+ <label>Type a name into the entry, or
+select one from the list below:</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkTable</class>
+ <name>table-recipients</name>
+ <rows>5</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label20</name>
+ <label>Selected Contacts:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>True</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Show Contacts</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
</child>
</widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ </widget>
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment4</name>
+ <xalign>7.45058e-09</xalign>
+ <yalign>0.5</yalign>
+ <xscale>1</xscale>
+ <yscale>1</yscale>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
- <child>
- <widget class="GtkTable" id="table4">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
+ <widget>
+ <class>GtkVBox</class>
+ <name>vbox6</name>
+ <border_width>3</border_width>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
- <child>
- <widget class="GtkLabel" id="label32">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Type a name into the entry, or
-select one from the list below:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox1</name>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry-select</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
<child>
- <widget class="GtkTable" id="table-recipients">
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Selected Contacts:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkButton</class>
+ <name>button-find</name>
+ <can_focus>True</can_focus>
+ <label>Find</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
<child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">7.45058e-09</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="border_width">3</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">3</property>
-
- <child>
- <widget class="GtkEntry" id="entry-select">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="button-find">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Find</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
+ <widget>
+ <class>GtkAlignment</class>
+ <name>alignment3</name>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xscale>1</xscale>
+ <yscale>1</yscale>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <child>
- <widget class="Custom" id="table-source">
- <property name="visible">True</property>
- <property name="creation_function">e_addressbook_create_ebook_table</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Sat, 10 Jun 2000 22:02:57 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
+ <widget>
+ <class>Custom</class>
+ <name>table-source</name>
+ <creation_function>e_addressbook_create_ebook_table</creation_function>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Sat, 10 Jun 2000 22:02:57 GMT</last_modification_time>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ </widget>
</widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- </packing>
+ </widget>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>status-hbox</name>
+ <homogeneous>False</homogeneous>
+ <spacing>3</spacing>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>True</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>Custom</class>
+ <name>status-image</name>
+ <visible>False</visible>
+ <creation_function>e_create_image_widget</creation_function>
+ <string1>evolution-contacts-mini.png</string1>
+ <int1>0</int1>
+ <int2>0</int2>
+ <last_modification_time>Thu, 28 Nov 2002 22:26:05 GMT</last_modification_time>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
</child>
+ </widget>
+ <widget>
+ <class>GtkLabel</class>
+ <name>status-message</name>
+ <label></label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>4.84288e-08</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>3</ypad>
<child>
- <widget class="GtkLabel" id="status-message">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">3</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
</child>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ </widget>
</widget>
- </child>
+ </widget>
</widget>
-</glade-interface>
+</GTK-Interface>
diff --git a/addressbook/gui/contact-editor/e-contact-editor-address.c b/addressbook/gui/contact-editor/e-contact-editor-address.c
index f6a75bbfe5..42cb190074 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-address.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-address.c
@@ -24,56 +24,57 @@
#include <e-contact-editor-address.h>
#include <glib.h>
+#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
+#include <libgnomeui/gnome-stock.h>
#include <libgnomeui/gnome-window-icon.h>
#include <libgnome/gnome-util.h>
+#include <gal/widgets/e-unicode.h>
#include <gal/widgets/e-gui-utils.h>
#include <gtk/gtkcombo.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtklabel.h>
#include <string.h>
#include <stdlib.h>
#include <locale.h>
static void e_contact_editor_address_init (EContactEditorAddress *card);
static void e_contact_editor_address_class_init (EContactEditorAddressClass *klass);
-static void e_contact_editor_address_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_contact_editor_address_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_contact_editor_address_dispose (GObject *object);
+static void e_contact_editor_address_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
+static void e_contact_editor_address_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
+static void e_contact_editor_address_destroy (GtkObject *object);
static void fill_in_info(EContactEditorAddress *editor);
static void extract_info(EContactEditorAddress *editor);
-static GtkDialogClass *parent_class = NULL;
+static GnomeDialogClass *parent_class = NULL;
/* The arguments we take */
enum {
- PROP_0,
- PROP_ADDRESS,
- PROP_EDITABLE
+ ARG_0,
+ ARG_ADDRESS,
+ ARG_EDITABLE
};
-GType
+GtkType
e_contact_editor_address_get_type (void)
{
- static GType contact_editor_address_type = 0;
-
- if (!contact_editor_address_type) {
- static const GTypeInfo contact_editor_address_info = {
- sizeof (EContactEditorAddressClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_contact_editor_address_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EContactEditorAddress),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_contact_editor_address_init,
- };
-
- contact_editor_address_type = g_type_register_static (GTK_TYPE_DIALOG, "EContactEditorAddress", &contact_editor_address_info, 0);
- }
+ static GtkType contact_editor_address_type = 0;
+
+ if (!contact_editor_address_type)
+ {
+ static const GtkTypeInfo contact_editor_address_info =
+ {
+ "EContactEditorAddress",
+ sizeof (EContactEditorAddress),
+ sizeof (EContactEditorAddressClass),
+ (GtkClassInitFunc) e_contact_editor_address_class_init,
+ (GtkObjectInitFunc) e_contact_editor_address_init,
+ /* reserved_1 */ NULL,
+ /* reserved_2 */ NULL,
+ (GtkClassInitFunc) NULL,
+ };
+
+ contact_editor_address_type = gtk_type_unique (gnome_dialog_get_type (), &contact_editor_address_info);
+ }
return contact_editor_address_type;
}
@@ -81,28 +82,22 @@ e_contact_editor_address_get_type (void)
static void
e_contact_editor_address_class_init (EContactEditorAddressClass *klass)
{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (GTK_TYPE_DIALOG);
-
- object_class->set_property = e_contact_editor_address_set_property;
- object_class->get_property = e_contact_editor_address_get_property;
- object_class->dispose = e_contact_editor_address_dispose;
-
- g_object_class_install_property (object_class, PROP_ADDRESS,
- g_param_spec_pointer ("address",
- _("Address"),
- /*_( */"XXX blurb" /*)*/,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
+ GtkObjectClass *object_class;
+ GnomeDialogClass *dialog_class;
+
+ object_class = (GtkObjectClass*) klass;
+ dialog_class = (GnomeDialogClass *) klass;
+
+ parent_class = gtk_type_class (gnome_dialog_get_type ());
+
+ gtk_object_add_arg_type ("EContactEditorAddress::address", GTK_TYPE_POINTER,
+ GTK_ARG_READWRITE, ARG_ADDRESS);
+ gtk_object_add_arg_type ("EContactEditorAddress::editable", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_EDITABLE);
+
+ object_class->set_arg = e_contact_editor_address_set_arg;
+ object_class->get_arg = e_contact_editor_address_get_arg;
+ object_class->destroy = e_contact_editor_address_destroy;
}
static GList *
@@ -413,16 +408,17 @@ e_contact_editor_address_init (EContactEditorAddress *e_contact_editor_address)
GtkWidget *widget;
char *icon_path;
- gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_address),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
+ gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_address),
+ GNOME_STOCK_BUTTON_OK);
+
+ gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_address),
+ GNOME_STOCK_BUTTON_CANCEL);
- gtk_window_set_resizable(GTK_WINDOW(e_contact_editor_address), TRUE);
+ gtk_window_set_policy(GTK_WINDOW(e_contact_editor_address), FALSE, TRUE, FALSE);
e_contact_editor_address->address = NULL;
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/fulladdr.glade", NULL, NULL);
+ gui = glade_xml_new (EVOLUTION_GLADEDIR "/fulladdr.glade", NULL);
e_contact_editor_address->gui = gui;
setup_tab_order (gui);
@@ -433,57 +429,50 @@ e_contact_editor_address_init (EContactEditorAddress *e_contact_editor_address)
GTK_WINDOW (widget)->title);
widget = glade_xml_get_widget(gui, "table-checkaddress");
- g_object_ref(widget);
+ gtk_widget_ref(widget);
gtk_container_remove(GTK_CONTAINER(widget->parent), widget);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_address)->vbox), widget, TRUE, TRUE, 0);
- g_object_unref(widget);
+ gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (e_contact_editor_address)->vbox), widget, TRUE, TRUE, 0);
+ gtk_widget_unref(widget);
- icon_path = g_concat_dir_and_file (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png");
+ icon_path = g_concat_dir_and_file (EVOLUTION_ICONSDIR, "evolution-contacts-mini.png");
gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor_address), icon_path);
g_free (icon_path);
}
void
-e_contact_editor_address_dispose (GObject *object)
+e_contact_editor_address_destroy (GtkObject *object)
{
EContactEditorAddress *e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS(object);
- if (e_contact_editor_address->gui) {
- g_object_unref(e_contact_editor_address->gui);
- e_contact_editor_address->gui = NULL;
- }
-
- if (e_contact_editor_address->address) {
- e_card_delivery_address_unref(e_contact_editor_address->address);
- e_contact_editor_address->address = NULL;
- }
+ if (e_contact_editor_address->gui)
+ gtk_object_unref(GTK_OBJECT(e_contact_editor_address->gui));
+ e_card_delivery_address_unref(e_contact_editor_address->address);
}
GtkWidget*
e_contact_editor_address_new (const ECardDeliveryAddress *address)
{
- GtkWidget *widget = g_object_new (E_TYPE_CONTACT_EDITOR_ADDRESS, NULL);
- g_object_set (widget,
- "address", address,
- NULL);
+ GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_editor_address_get_type ()));
+ gtk_object_set (GTK_OBJECT(widget),
+ "address", address,
+ NULL);
return widget;
}
static void
-e_contact_editor_address_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
+e_contact_editor_address_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
{
EContactEditorAddress *e_contact_editor_address;
- e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (object);
+ e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (o);
- switch (prop_id){
- case PROP_ADDRESS:
+ switch (arg_id){
+ case ARG_ADDRESS:
e_card_delivery_address_unref(e_contact_editor_address->address);
- e_contact_editor_address->address = e_card_delivery_address_copy(g_value_get_pointer (value));
+ e_contact_editor_address->address = e_card_delivery_address_copy(GTK_VALUE_POINTER (*arg));
fill_in_info(e_contact_editor_address);
break;
- case PROP_EDITABLE: {
+ case ARG_EDITABLE: {
int i;
char *widget_names[] = {
"entry-street",
@@ -502,16 +491,16 @@ e_contact_editor_address_set_property (GObject *object, guint prop_id,
"label-code",
NULL
};
- e_contact_editor_address->editable = g_value_get_boolean (value) ? TRUE : FALSE;
+ e_contact_editor_address->editable = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
for (i = 0; widget_names[i] != NULL; i ++) {
GtkWidget *w = glade_xml_get_widget(e_contact_editor_address->gui, widget_names[i]);
if (GTK_IS_ENTRY (w)) {
- gtk_editable_set_editable (GTK_EDITABLE (w),
- e_contact_editor_address->editable);
+ gtk_entry_set_editable (GTK_ENTRY (w),
+ e_contact_editor_address->editable);
}
else if (GTK_IS_COMBO (w)) {
- gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (w)->entry),
- e_contact_editor_address->editable);
+ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (w)->entry),
+ e_contact_editor_address->editable);
gtk_widget_set_sensitive (GTK_COMBO (w)->button, e_contact_editor_address->editable);
}
else if (GTK_IS_LABEL (w)) {
@@ -520,30 +509,26 @@ e_contact_editor_address_set_property (GObject *object, guint prop_id,
}
break;
}
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
}
}
static void
-e_contact_editor_address_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
+e_contact_editor_address_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
EContactEditorAddress *e_contact_editor_address;
e_contact_editor_address = E_CONTACT_EDITOR_ADDRESS (object);
- switch (prop_id) {
- case PROP_ADDRESS:
+ switch (arg_id) {
+ case ARG_ADDRESS:
extract_info(e_contact_editor_address);
- g_value_set_pointer (value, e_card_delivery_address_ref(e_contact_editor_address->address));
+ GTK_VALUE_POINTER (*arg) = e_card_delivery_address_ref(e_contact_editor_address->address);
break;
- case PROP_EDITABLE:
- g_value_set_boolean (value, e_contact_editor_address->editable ? TRUE : FALSE);
+ case ARG_EDITABLE:
+ GTK_VALUE_BOOL (*arg) = e_contact_editor_address->editable ? TRUE : FALSE;
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ arg->type = GTK_TYPE_INVALID;
break;
}
}
@@ -551,12 +536,9 @@ e_contact_editor_address_get_property (GObject *object, guint prop_id,
static void
fill_in_field(EContactEditorAddress *editor, char *field, char *string)
{
- GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field));
- if (entry) {
- if (string)
- gtk_entry_set_text(entry, string);
- else
- gtk_entry_set_text(entry, "");
+ GtkEditable *editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, field));
+ if (editable) {
+ e_utf8_gtk_editable_set_text(editable, string);
}
}
@@ -578,9 +560,9 @@ fill_in_info(EContactEditorAddress *editor)
static char *
extract_field(EContactEditorAddress *editor, char *field)
{
- GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field));
- if (entry)
- return g_strdup (gtk_entry_get_text(entry));
+ GtkEditable *editable = GTK_EDITABLE(glade_xml_get_widget(editor->gui, field));
+ if (editable)
+ return e_utf8_gtk_editable_get_text(editable);
else
return NULL;
}
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index 917a8fd075..faf382c729 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -20,53 +20,52 @@
*/
#include <config.h>
+#include <libgnomeui/gnome-stock.h>
+#include <gal/widgets/e-unicode.h>
#include "e-contact-editor-fullname.h"
#include <libgnomeui/gnome-window-icon.h>
#include <libgnome/gnome-util.h>
-#include <libgnome/gnome-i18n.h>
#include <gtk/gtkcombo.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
static void e_contact_editor_fullname_init (EContactEditorFullname *card);
static void e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass);
-static void e_contact_editor_fullname_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_contact_editor_fullname_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_contact_editor_fullname_dispose (GObject *object);
+static void e_contact_editor_fullname_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
+static void e_contact_editor_fullname_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
+static void e_contact_editor_fullname_destroy (GtkObject *object);
static void fill_in_info(EContactEditorFullname *editor);
static void extract_info(EContactEditorFullname *editor);
-static GtkDialogClass *parent_class = NULL;
+static GnomeDialogClass *parent_class = NULL;
/* The arguments we take */
enum {
- PROP_0,
- PROP_NAME,
- PROP_EDITABLE
+ ARG_0,
+ ARG_NAME,
+ ARG_EDITABLE
};
-GType
+GtkType
e_contact_editor_fullname_get_type (void)
{
- static GType contact_editor_fullname_type = 0;
-
- if (!contact_editor_fullname_type) {
- static const GTypeInfo contact_editor_fullname_info = {
- sizeof (EContactEditorFullnameClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_contact_editor_fullname_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EContactEditorFullname),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_contact_editor_fullname_init,
- };
-
- contact_editor_fullname_type = g_type_register_static (GTK_TYPE_DIALOG, "EContactEditorFullname", &contact_editor_fullname_info, 0);
- }
+ static GtkType contact_editor_fullname_type = 0;
+
+ if (!contact_editor_fullname_type)
+ {
+ static const GtkTypeInfo contact_editor_fullname_info =
+ {
+ "EContactEditorFullname",
+ sizeof (EContactEditorFullname),
+ sizeof (EContactEditorFullnameClass),
+ (GtkClassInitFunc) e_contact_editor_fullname_class_init,
+ (GtkObjectInitFunc) e_contact_editor_fullname_init,
+ /* reserved_1 */ NULL,
+ /* reserved_2 */ NULL,
+ (GtkClassInitFunc) NULL,
+ };
+
+ contact_editor_fullname_type = gtk_type_unique (gnome_dialog_get_type (), &contact_editor_fullname_info);
+ }
return contact_editor_fullname_type;
}
@@ -74,28 +73,23 @@ e_contact_editor_fullname_get_type (void)
static void
e_contact_editor_fullname_class_init (EContactEditorFullnameClass *klass)
{
- GObjectClass *object_class;
+ GtkObjectClass *object_class;
+ GnomeDialogClass *dialog_class;
- object_class = G_OBJECT_CLASS (klass);
+ object_class = (GtkObjectClass*) klass;
+ dialog_class = (GnomeDialogClass *) klass;
- parent_class = g_type_class_ref (GTK_TYPE_DIALOG);
+ parent_class = gtk_type_class (gnome_dialog_get_type ());
- object_class->set_property = e_contact_editor_fullname_set_property;
- object_class->get_property = e_contact_editor_fullname_get_property;
- object_class->dispose = e_contact_editor_fullname_dispose;
+ gtk_object_add_arg_type ("EContactEditorFullname::name", GTK_TYPE_POINTER,
+ GTK_ARG_READWRITE, ARG_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_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
+ gtk_object_add_arg_type ("EContactEditorFullname::editable", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_EDITABLE);
+
+ object_class->set_arg = e_contact_editor_fullname_set_arg;
+ object_class->get_arg = e_contact_editor_fullname_get_arg;
+ object_class->destroy = e_contact_editor_fullname_destroy;
}
static void
@@ -105,15 +99,16 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam
GtkWidget *widget;
char *icon_path;
- gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_fullname),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
+ gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_fullname),
+ GNOME_STOCK_BUTTON_OK);
+
+ gnome_dialog_append_button ( GNOME_DIALOG(e_contact_editor_fullname),
+ GNOME_STOCK_BUTTON_CANCEL);
- gtk_window_set_resizable(GTK_WINDOW(e_contact_editor_fullname), TRUE);
+ gtk_window_set_policy(GTK_WINDOW(e_contact_editor_fullname), TRUE, TRUE, FALSE);
e_contact_editor_fullname->name = NULL;
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/fullname.glade", NULL, NULL);
+ gui = glade_xml_new (EVOLUTION_GLADEDIR "/fullname.glade", NULL);
e_contact_editor_fullname->gui = gui;
widget = glade_xml_get_widget(gui, "dialog-checkfullname");
@@ -121,57 +116,50 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam
GTK_WINDOW (widget)->title);
widget = glade_xml_get_widget(gui, "table-checkfullname");
- g_object_ref(widget);
+ gtk_widget_ref(widget);
gtk_container_remove(GTK_CONTAINER(widget->parent), widget);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_fullname)->vbox), widget, TRUE, TRUE, 0);
- g_object_unref(widget);
+ gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (e_contact_editor_fullname)->vbox), widget, TRUE, TRUE, 0);
+ gtk_widget_unref(widget);
- icon_path = g_concat_dir_and_file (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png");
+ icon_path = g_concat_dir_and_file (EVOLUTION_ICONSDIR, "evolution-contacts-mini.png");
gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor_fullname), icon_path);
g_free (icon_path);
}
void
-e_contact_editor_fullname_dispose (GObject *object)
+e_contact_editor_fullname_destroy (GtkObject *object)
{
EContactEditorFullname *e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME(object);
- if (e_contact_editor_fullname->gui) {
- g_object_unref(e_contact_editor_fullname->gui);
- e_contact_editor_fullname->gui = NULL;
- }
-
- if (e_contact_editor_fullname->name) {
- e_card_name_unref(e_contact_editor_fullname->name);
- e_contact_editor_fullname->name = NULL;
- }
+ if (e_contact_editor_fullname->gui)
+ gtk_object_unref(GTK_OBJECT(e_contact_editor_fullname->gui));
+ e_card_name_unref(e_contact_editor_fullname->name);
}
GtkWidget*
e_contact_editor_fullname_new (const ECardName *name)
{
- GtkWidget *widget = g_object_new (E_TYPE_CONTACT_EDITOR_FULLNAME, NULL);
- g_object_set (widget,
+ GtkWidget *widget = GTK_WIDGET (gtk_type_new (e_contact_editor_fullname_get_type ()));
+ gtk_object_set (GTK_OBJECT(widget),
"name", name,
NULL);
return widget;
}
static void
-e_contact_editor_fullname_set_property (GObject *object, guint prop_id,
- const GValue *value, GParamSpec *pspec)
+e_contact_editor_fullname_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
{
EContactEditorFullname *e_contact_editor_fullname;
- e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object);
+ e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (o);
- switch (prop_id){
- case PROP_NAME:
+ switch (arg_id){
+ case ARG_NAME:
e_card_name_unref(e_contact_editor_fullname->name);
- e_contact_editor_fullname->name = e_card_name_copy(g_value_get_pointer (value));
+ e_contact_editor_fullname->name = e_card_name_copy(GTK_VALUE_POINTER (*arg));
fill_in_info(e_contact_editor_fullname);
break;
- case PROP_EDITABLE: {
+ case ARG_EDITABLE: {
int i;
char *widget_names[] = {
"combo-title",
@@ -186,16 +174,17 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id,
"label-last",
NULL
};
- e_contact_editor_fullname->editable = g_value_get_boolean (value) ? TRUE : FALSE;
+
+ e_contact_editor_fullname->editable = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
for (i = 0; widget_names[i] != NULL; i ++) {
GtkWidget *w = glade_xml_get_widget(e_contact_editor_fullname->gui, widget_names[i]);
if (GTK_IS_ENTRY (w)) {
- gtk_editable_set_editable (GTK_EDITABLE (w),
- e_contact_editor_fullname->editable);
+ gtk_entry_set_editable (GTK_ENTRY (w),
+ e_contact_editor_fullname->editable);
}
else if (GTK_IS_COMBO (w)) {
- gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (w)->entry),
- e_contact_editor_fullname->editable);
+ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (w)->entry),
+ e_contact_editor_fullname->editable);
gtk_widget_set_sensitive (GTK_COMBO (w)->button, e_contact_editor_fullname->editable);
}
else if (GTK_IS_LABEL (w)) {
@@ -204,30 +193,26 @@ e_contact_editor_fullname_set_property (GObject *object, guint prop_id,
}
break;
}
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
}
}
static void
-e_contact_editor_fullname_get_property (GObject *object, guint prop_id,
- GValue *value, GParamSpec *pspec)
+e_contact_editor_fullname_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
EContactEditorFullname *e_contact_editor_fullname;
e_contact_editor_fullname = E_CONTACT_EDITOR_FULLNAME (object);
- switch (prop_id) {
- case PROP_NAME:
+ switch (arg_id) {
+ case ARG_NAME:
extract_info(e_contact_editor_fullname);
- g_value_set_pointer (value, e_card_name_ref(e_contact_editor_fullname->name));
+ GTK_VALUE_POINTER (*arg) = e_card_name_ref(e_contact_editor_fullname->name);
break;
- case PROP_EDITABLE:
- g_value_set_boolean (value, e_contact_editor_fullname->editable ? TRUE : FALSE);
+ case ARG_EDITABLE:
+ GTK_VALUE_BOOL (*arg) = e_contact_editor_fullname->editable ? TRUE : FALSE;
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ arg->type = GTK_TYPE_INVALID;
break;
}
}
@@ -238,7 +223,7 @@ fill_in_field(EContactEditorFullname *editor, char *field, char *string)
GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field));
if (entry) {
if (string)
- gtk_entry_set_text(entry, string);
+ e_utf8_gtk_entry_set_text(entry, string);
else
gtk_entry_set_text(entry, "");
}
@@ -262,7 +247,7 @@ extract_field(EContactEditorFullname *editor, char *field)
{
GtkEntry *entry = GTK_ENTRY(glade_xml_get_widget(editor->gui, field));
if (entry)
- return g_strdup (gtk_entry_get_text(entry));
+ return e_utf8_gtk_entry_get_text(entry);
else
return NULL;
}
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 3450c307aa..8d6a5782d1 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -23,26 +23,24 @@
#include "e-contact-editor.h"
-#include <string.h>
#include <time.h>
#include <gtk/gtkcheckbutton.h>
#include <gtk/gtkcheckmenuitem.h>
#include <gtk/gtkcombo.h>
-#include <gtk/gtktextview.h>
-#include <gtk/gtkmessagedialog.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtklabel.h>
+#include <gtk/gtktext.h>
#include <libgnomeui/gnome-popup-menu.h>
+#include <libgnomeui/gnome-dialog-util.h>
#include <libgnomeui/gnome-window-icon.h>
+#include <libgnomeui/gnome-stock.h>
#include <libgnome/gnome-i18n.h>
#include <bonobo/bonobo-ui-container.h>
#include <bonobo/bonobo-ui-util.h>
-#include <bonobo/bonobo-window.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
#include <gal/widgets/e-categories.h>
#include <gal/widgets/e-gui-utils.h>
+#include <gal/widgets/e-unicode.h>
#include <gal/e-text/e-entry.h>
#include <e-util/e-categories-master-list-wombat.h>
@@ -52,14 +50,12 @@
#include "addressbook/gui/widgets/e-addressbook-util.h"
#include "e-util/e-gui-utils.h"
#include "widgets/misc/e-dateedit.h"
-#include "widgets/misc/e-url-entry.h"
#include "shell/evolution-shell-component-utils.h"
#include "e-card-merging.h"
#include "e-contact-editor-address.h"
#include "e-contact-editor-fullname.h"
-#include "e-contact-editor-marshal.h"
#include "e-contact-save-as.h"
/* Signal IDs */
@@ -73,10 +69,13 @@ enum {
static void e_contact_editor_init (EContactEditor *card);
static void e_contact_editor_class_init (EContactEditorClass *klass);
-static void e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_contact_editor_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_contact_editor_dispose (GObject *object);
+static void e_contact_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
+static void e_contact_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
+static void e_contact_editor_destroy (GtkObject *object);
+#if 0
+static GtkWidget *e_contact_editor_build_dialog(EContactEditor *editor, gchar *entry_id, gchar *label_id, gchar *title, GList **list, GnomeUIInfo **info);
+#endif
static void _email_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor);
static void _phone_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor);
static void _address_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor);
@@ -99,13 +98,13 @@ static guint contact_editor_signals[LAST_SIGNAL];
/* The arguments we take */
enum {
- PROP_0,
- PROP_BOOK,
- PROP_CARD,
- PROP_IS_NEW_CARD,
- PROP_EDITABLE,
- PROP_CHANGED,
- PROP_WRITABLE_FIELDS
+ ARG_0,
+ ARG_BOOK,
+ ARG_CARD,
+ ARG_IS_NEW_CARD,
+ ARG_EDITABLE,
+ ARG_CHANGED,
+ ARG_WRITABLE_FIELDS
};
enum {
@@ -116,152 +115,150 @@ enum {
static GSList *all_contact_editors = NULL;
-GType
+GtkType
e_contact_editor_get_type (void)
{
- static GType contact_editor_type = 0;
-
- if (!contact_editor_type) {
- static const GTypeInfo contact_editor_info = {
- sizeof (EContactEditorClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_contact_editor_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EContactEditor),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_contact_editor_init,
- };
+ static GtkType contact_editor_type = 0;
- contact_editor_type = g_type_register_static (GTK_TYPE_OBJECT, "EContactEditor", &contact_editor_info, 0);
- }
+ if (!contact_editor_type)
+ {
+ static const GtkTypeInfo contact_editor_info =
+ {
+ "EContactEditor",
+ sizeof (EContactEditor),
+ sizeof (EContactEditorClass),
+ (GtkClassInitFunc) e_contact_editor_class_init,
+ (GtkObjectInitFunc) e_contact_editor_init,
+ /* reserved_1 */ NULL,
+ /* reserved_2 */ NULL,
+ (GtkClassInitFunc) NULL,
+ };
+
+ contact_editor_type = gtk_type_unique (GTK_TYPE_OBJECT, &contact_editor_info);
+ }
+
+ return contact_editor_type;
+}
- return contact_editor_type;
+typedef void (*GtkSignal_NONE__INT_OBJECT) (GtkObject * object,
+ gint arg1,
+ GtkObject *arg2,
+ gpointer user_data);
+
+static void
+e_marshal_NONE__INT_OBJECT (GtkObject * object,
+ GtkSignalFunc func,
+ gpointer func_data, GtkArg * args)
+{
+ GtkSignal_NONE__INT_OBJECT rfunc;
+ rfunc = (GtkSignal_NONE__INT_OBJECT) func;
+ (*rfunc) (object,
+ GTK_VALUE_INT (args[0]),
+ GTK_VALUE_OBJECT (args[1]),
+ func_data);
}
static void
e_contact_editor_class_init (EContactEditorClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (GTK_TYPE_OBJECT);
-
- object_class->set_property = e_contact_editor_set_property;
- object_class->get_property = e_contact_editor_get_property;
- object_class->dispose = e_contact_editor_dispose;
-
- g_object_class_install_property (object_class, PROP_BOOK,
- g_param_spec_object ("book",
- _("Book"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_BOOK,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_CARD,
- g_param_spec_object ("card",
- _("Card"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_CARD,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_IS_NEW_CARD,
- g_param_spec_boolean ("is_new_card",
- _("Is New Card"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_WRITABLE_FIELDS,
- g_param_spec_object ("writable_fields",
- _("Writable Fields"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_LIST,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_CHANGED,
- g_param_spec_boolean ("changed",
- _("Changed"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
+ GtkObjectClass *object_class;
+
+ object_class = (GtkObjectClass*) klass;
+
+ parent_class = gtk_type_class (GTK_TYPE_OBJECT);
+
+ gtk_object_add_arg_type ("EContactEditor::book", GTK_TYPE_OBJECT,
+ GTK_ARG_READWRITE, ARG_BOOK);
+ gtk_object_add_arg_type ("EContactEditor::card", GTK_TYPE_OBJECT,
+ GTK_ARG_READWRITE, ARG_CARD);
+ gtk_object_add_arg_type ("EContactEditor::is_new_card", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_IS_NEW_CARD);
+ gtk_object_add_arg_type ("EContactEditor::writable_fields", GTK_TYPE_POINTER,
+ GTK_ARG_READWRITE, ARG_WRITABLE_FIELDS);
+ gtk_object_add_arg_type ("EContactEditor::editable", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_EDITABLE);
+ gtk_object_add_arg_type ("EContactEditor::changed", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_CHANGED);
contact_editor_signals[CARD_ADDED] =
- g_signal_new ("card_added",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactEditorClass, card_added),
- NULL, NULL,
- ece_marshal_NONE__INT_OBJECT,
- G_TYPE_NONE, 2,
- G_TYPE_INT, G_TYPE_OBJECT);
+ gtk_signal_new ("card_added",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EContactEditorClass, card_added),
+ e_marshal_NONE__INT_OBJECT,
+ GTK_TYPE_NONE, 2,
+ GTK_TYPE_INT, GTK_TYPE_OBJECT);
contact_editor_signals[CARD_MODIFIED] =
- g_signal_new ("card_modified",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactEditorClass, card_modified),
- NULL, NULL,
- ece_marshal_NONE__INT_OBJECT,
- G_TYPE_NONE, 2,
- G_TYPE_INT, G_TYPE_OBJECT);
+ gtk_signal_new ("card_modified",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EContactEditorClass, card_modified),
+ e_marshal_NONE__INT_OBJECT,
+ GTK_TYPE_NONE, 2,
+ GTK_TYPE_INT, GTK_TYPE_OBJECT);
contact_editor_signals[CARD_DELETED] =
- g_signal_new ("card_deleted",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactEditorClass, card_deleted),
- NULL, NULL,
- ece_marshal_NONE__INT_OBJECT,
- G_TYPE_NONE, 2,
- G_TYPE_INT, G_TYPE_OBJECT);
+ gtk_signal_new ("card_deleted",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EContactEditorClass, card_deleted),
+ e_marshal_NONE__INT_OBJECT,
+ GTK_TYPE_NONE, 2,
+ GTK_TYPE_INT, GTK_TYPE_OBJECT);
contact_editor_signals[EDITOR_CLOSED] =
- g_signal_new ("editor_closed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EContactEditorClass, editor_closed),
- NULL, NULL,
- ece_marshal_NONE__NONE,
- G_TYPE_NONE, 0);
+ gtk_signal_new ("editor_closed",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EContactEditorClass, editor_closed),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+
+ gtk_object_class_add_signals (object_class, contact_editor_signals, LAST_SIGNAL);
+
+ object_class->set_arg = e_contact_editor_set_arg;
+ object_class->get_arg = e_contact_editor_get_arg;
+ object_class->destroy = e_contact_editor_destroy;
}
static void
-connect_arrow_button_signal (EContactEditor *editor, gchar *button_xml, GCallback func)
+_replace_button(EContactEditor *editor, gchar *button_xml, gchar *image, GtkSignalFunc func)
{
GladeXML *gui = editor->gui;
GtkWidget *button = glade_xml_get_widget(gui, button_xml);
+ GtkWidget *pixmap;
+ gchar *image_temp;
if (button && GTK_IS_BUTTON(button)) {
- g_signal_connect(button, "button_press_event", func, editor);
+ image_temp = g_strdup_printf("%s/%s", EVOLUTIONDIR, image);
+ pixmap = e_create_image_widget(NULL, image_temp, NULL, 0, 0);
+ gtk_container_add(GTK_CONTAINER(button),
+ pixmap);
+ g_free(image_temp);
+ gtk_widget_show(pixmap);
+ gtk_signal_connect(GTK_OBJECT(button), "button_press_event", func, editor);
}
}
static void
-connect_arrow_button_signals (EContactEditor *editor)
+_replace_buttons(EContactEditor *editor)
{
- connect_arrow_button_signal(editor, "button-phone1", G_CALLBACK (_phone_arrow_pressed));
- connect_arrow_button_signal(editor, "button-phone2", G_CALLBACK (_phone_arrow_pressed));
- connect_arrow_button_signal(editor, "button-phone3", G_CALLBACK (_phone_arrow_pressed));
- connect_arrow_button_signal(editor, "button-phone4", G_CALLBACK (_phone_arrow_pressed));
- connect_arrow_button_signal(editor, "button-address", G_CALLBACK (_address_arrow_pressed));
- connect_arrow_button_signal(editor, "button-email1", G_CALLBACK (_email_arrow_pressed));
+ _replace_button(editor, "button-phone1", "arrow.png", _phone_arrow_pressed);
+ _replace_button(editor, "button-phone2", "arrow.png", _phone_arrow_pressed);
+ _replace_button(editor, "button-phone3", "arrow.png", _phone_arrow_pressed);
+ _replace_button(editor, "button-phone4", "arrow.png", _phone_arrow_pressed);
+ _replace_button(editor, "button-address", "arrow.png", _address_arrow_pressed);
+ _replace_button(editor, "button-email1", "arrow.png", _email_arrow_pressed);
}
static void
wants_html_changed (GtkWidget *widget, EContactEditor *editor)
{
gboolean wants_html;
- g_object_get (widget,
+ gtk_object_get(GTK_OBJECT(widget),
"active", &wants_html,
NULL);
- g_object_set (editor->card,
+ gtk_object_set(GTK_OBJECT(editor->card),
"wants_html", wants_html,
NULL);
@@ -286,7 +283,7 @@ phone_entry_changed (GtkWidget *widget, EContactEditor *editor)
} else
return;
phone = e_card_phone_new();
- phone->number = g_strdup (gtk_entry_get_text(entry));
+ phone->number = e_utf8_gtk_entry_get_text(entry);
e_card_simple_set_phone(editor->simple, editor->phone_choice[which - 1], phone);
e_card_phone_unref(phone);
set_fields(editor);
@@ -297,21 +294,23 @@ phone_entry_changed (GtkWidget *widget, EContactEditor *editor)
static void
email_entry_changed (GtkWidget *widget, EContactEditor *editor)
{
- const gchar *string;
+ gchar *string;
GtkEntry *entry = GTK_ENTRY(widget);
- string = gtk_entry_get_text(entry);
+ string = e_utf8_gtk_entry_get_text(entry);
e_card_simple_set_email(editor->simple, editor->email_choice, string);
+ g_free (string);
+
widget_changed (widget, editor);
}
static void
-address_text_changed (GtkTextBuffer *buffer, EContactEditor *editor)
+address_text_changed (GtkWidget *widget, EContactEditor *editor)
{
+ GtkEditable *editable = GTK_EDITABLE(widget);
ECardAddrLabel *address;
- GtkTextIter start_iter, end_iter;
if (editor->address_choice == -1)
return;
@@ -325,35 +324,26 @@ address_text_changed (GtkTextBuffer *buffer, EContactEditor *editor)
check = glade_xml_get_widget(editor->gui, "checkbutton-mailingaddress");
if (check && GTK_IS_CHECK_BUTTON (check)) {
- g_signal_handlers_block_matched (check,
- G_SIGNAL_MATCH_DATA,
- 0, 0,
- NULL, NULL, editor);
+ gtk_signal_handler_block_by_data (GTK_OBJECT (check), editor);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
- g_signal_handlers_unblock_matched (check,
- G_SIGNAL_MATCH_DATA,
- 0, 0,
- NULL, NULL, editor);
+ gtk_signal_handler_unblock_by_data (GTK_OBJECT (check), editor);
}
}
- gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (buffer), &start_iter);
- gtk_text_buffer_get_end_iter (GTK_TEXT_BUFFER (buffer), &end_iter);
-
- address->data = gtk_text_buffer_get_text (GTK_TEXT_BUFFER (buffer), &start_iter, &end_iter, FALSE);
+ address->data = e_utf8_gtk_editable_get_chars(editable, 0, -1);
e_card_simple_set_address(editor->simple, editor->address_choice, address);
e_card_address_label_unref(address);
- widget_changed (NULL, editor);
+ widget_changed (widget, editor);
}
static void
address_mailing_changed (GtkWidget *widget, EContactEditor *editor)
{
- const ECardDeliveryAddress *curr;
- ECardDeliveryAddress *address;
+ ECardAddrLabel *address;
+ GtkWidget *text;
gboolean mailing_address;
if (editor->address_choice == -1)
@@ -362,31 +352,32 @@ address_mailing_changed (GtkWidget *widget, EContactEditor *editor)
mailing_address = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
/* Mark the current address as the mailing address */
- curr = e_card_simple_get_delivery_address (editor->simple,
- editor->address_choice);
-
- address = e_card_delivery_address_copy (curr);
-
- if (mailing_address)
- address->flags |= E_CARD_ADDR_DEFAULT;
- else
- address->flags &= ~E_CARD_ADDR_DEFAULT;
+ text = glade_xml_get_widget(editor->gui, "text-address");
+ if (text && GTK_IS_TEXT(text)) {
- e_card_simple_set_delivery_address(editor->simple, editor->address_choice, address);
- e_card_delivery_address_unref (address);
+ address = e_card_address_label_new();
+
+ if (mailing_address)
+ address->flags |= E_CARD_ADDR_DEFAULT;
+ else
+ address->flags &= ~E_CARD_ADDR_DEFAULT;
+ address->data = e_utf8_gtk_editable_get_chars(GTK_EDITABLE (text), 0, -1);
+
+ e_card_simple_set_address(editor->simple, editor->address_choice, address);
+ e_card_address_label_unref(address);
+ }
/* Unset the previous mailing address flag */
if (mailing_address && editor->address_mailing != -1) {
- const ECardDeliveryAddress *curr;
+ const ECardAddrLabel *curr;
- curr = e_card_simple_get_delivery_address(editor->simple,
- editor->address_mailing);
- address = e_card_delivery_address_copy (curr);
+ curr = e_card_simple_get_address(editor->simple,
+ editor->address_mailing);
+ address = e_card_address_label_copy (curr);
address->flags &= ~E_CARD_ADDR_DEFAULT;
- e_card_simple_set_delivery_address(editor->simple,
- editor->address_mailing,
- address);
- e_card_delivery_address_unref (address);
+ e_card_simple_set_address(editor->simple,
+ editor->address_mailing,
+ address);
}
/* Remember the new mailing address */
@@ -493,7 +484,7 @@ file_as_get_style (EContactEditor *editor)
if (!(file_as && GTK_IS_ENTRY(file_as)))
return -1;
- filestring = g_strdup (gtk_entry_get_text(file_as));
+ filestring = e_utf8_gtk_entry_get_text(file_as);
style = -1;
for (i = 0; i < 5; i++) {
@@ -523,7 +514,7 @@ file_as_set_style(EContactEditor *editor, int style)
return;
if (style == -1) {
- string = g_strdup (gtk_entry_get_text(file_as));
+ string = e_utf8_gtk_entry_get_text(file_as);
strings = g_list_append(strings, string);
}
@@ -533,7 +524,9 @@ file_as_set_style(EContactEditor *editor, int style)
if (style_makes_sense(editor->name, editor->company, i)) {
char *u;
u = name_to_style(editor->name, editor->company, i);
- if (u) strings = g_list_append(strings, u);
+ string = e_utf8_to_gtk_string (widget, u);
+ g_free (u);
+ if (string) strings = g_list_append(strings, string);
}
}
@@ -546,7 +539,7 @@ file_as_set_style(EContactEditor *editor, int style)
if (style != -1) {
string = name_to_style(editor->name, editor->company, style);
- gtk_entry_set_text(file_as, string);
+ e_utf8_gtk_entry_set_text(file_as, string);
g_free(string);
}
}
@@ -555,14 +548,15 @@ static void
name_entry_changed (GtkWidget *widget, EContactEditor *editor)
{
int style = 0;
- const char *string;
+ char *string;
style = file_as_get_style(editor);
e_card_name_unref(editor->name);
- string = gtk_entry_get_text (GTK_ENTRY(widget));
+ string = e_utf8_gtk_entry_get_text (GTK_ENTRY(widget));
editor->name = e_card_name_from_string(string);
+ g_free (string);
file_as_set_style(editor, style);
@@ -578,7 +572,7 @@ company_entry_changed (GtkWidget *widget, EContactEditor *editor)
g_free(editor->company);
- editor->company = g_strdup (gtk_entry_get_text(GTK_ENTRY(widget)));
+ editor->company = e_utf8_gtk_entry_get_text(GTK_ENTRY(widget));
file_as_set_style(editor, style);
@@ -599,17 +593,8 @@ set_entry_changed_signal_phone(EContactEditor *editor, char *id)
{
GtkWidget *widget = glade_xml_get_widget(editor->gui, id);
if (widget && GTK_IS_ENTRY(widget))
- g_signal_connect(widget, "changed",
- G_CALLBACK (phone_entry_changed), editor);
-}
-
-static void
-set_entry_changed_signal_email(EContactEditor *editor, char *id)
-{
- GtkWidget *widget = glade_xml_get_widget(editor->gui, id);
- if (widget && GTK_IS_ENTRY(widget))
- g_signal_connect(widget, "changed",
- G_CALLBACK (email_entry_changed), editor);
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ phone_entry_changed, editor);
}
static void
@@ -631,19 +616,8 @@ set_entry_changed_signal_field(EContactEditor *editor, char *id)
{
GtkWidget *widget = glade_xml_get_widget(editor->gui, id);
if (widget && GTK_IS_ENTRY(widget))
- g_signal_connect(widget, "changed",
- G_CALLBACK (field_changed), editor);
-}
-
-static void
-set_urlentry_changed_signal_field (EContactEditor *editor, char *id)
-{
- GtkWidget *widget = glade_xml_get_widget(editor->gui, id);
- if (widget && E_IS_URL_ENTRY(widget)) {
- GtkWidget *entry = e_url_entry_get_entry (E_URL_ENTRY (widget));
- g_signal_connect (entry, "changed",
- G_CALLBACK (field_changed), editor);
- }
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ field_changed, editor);
}
static void
@@ -654,80 +628,122 @@ set_entry_changed_signals(EContactEditor *editor)
set_entry_changed_signal_phone(editor, "entry-phone2");
set_entry_changed_signal_phone(editor, "entry-phone3");
set_entry_changed_signal_phone(editor, "entry-phone4");
-
- set_entry_changed_signal_email(editor, "entry-email1");
-
+ widget = glade_xml_get_widget(editor->gui, "entry-email1");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ email_entry_changed, editor);
+ }
widget = glade_xml_get_widget(editor->gui, "text-address");
- if (widget && GTK_IS_TEXT_VIEW(widget)) {
- GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
- g_signal_connect(buffer, "changed",
- G_CALLBACK (address_text_changed), editor);
+ if (widget && GTK_IS_TEXT(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ address_text_changed, editor);
}
-
widget = glade_xml_get_widget(editor->gui, "entry-fullname");
if (widget && GTK_IS_ENTRY(widget)) {
- g_signal_connect (widget, "changed",
- G_CALLBACK (name_entry_changed), editor);
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ name_entry_changed, editor);
}
-
widget = glade_xml_get_widget(editor->gui, "entry-company");
if (widget && GTK_IS_ENTRY(widget)) {
- g_signal_connect (widget, "changed",
- G_CALLBACK (company_entry_changed), editor);
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ company_entry_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-web");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-categories");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-jobtitle");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-file-as");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-manager");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-assistant");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-office");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-department");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-profession");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-nickname");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-spouse");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
}
-
- set_urlentry_changed_signal_field (editor, "entry-web");
- set_urlentry_changed_signal_field (editor, "entry-caluri");
- set_urlentry_changed_signal_field (editor, "entry-fburl");
-
- set_entry_changed_signal_field(editor, "entry-categories");
- set_entry_changed_signal_field(editor, "entry-jobtitle");
- set_entry_changed_signal_field(editor, "entry-file-as");
- set_entry_changed_signal_field(editor, "entry-manager");
- set_entry_changed_signal_field(editor, "entry-assistant");
- set_entry_changed_signal_field(editor, "entry-office");
- set_entry_changed_signal_field(editor, "entry-department");
- set_entry_changed_signal_field(editor, "entry-profession");
- set_entry_changed_signal_field(editor, "entry-nickname");
- set_entry_changed_signal_field(editor, "entry-spouse");
-
widget = glade_xml_get_widget(editor->gui, "text-comments");
- if (widget && GTK_IS_TEXT_VIEW(widget)) {
- GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
- g_signal_connect (buffer, "changed",
- G_CALLBACK (widget_changed), editor);
+ if (widget && GTK_IS_TEXT(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
}
widget = glade_xml_get_widget(editor->gui, "dateedit-birthday");
if (widget && E_IS_DATE_EDIT(widget)) {
- g_signal_connect (widget, "changed",
- G_CALLBACK (widget_changed), editor);
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
}
widget = glade_xml_get_widget(editor->gui, "dateedit-anniversary");
if (widget && E_IS_DATE_EDIT(widget)) {
- g_signal_connect (widget, "changed",
- G_CALLBACK (widget_changed), editor);
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
+ }
+ widget = glade_xml_get_widget(editor->gui, "entry-web");
+ if (widget && GTK_IS_ENTRY(widget)) {
+ gtk_signal_connect(GTK_OBJECT(widget), "changed",
+ widget_changed, editor);
}
+
}
static void
full_name_clicked(GtkWidget *button, EContactEditor *editor)
{
- GtkDialog *dialog = GTK_DIALOG(e_contact_editor_fullname_new(editor->name));
+ GnomeDialog *dialog = GNOME_DIALOG(e_contact_editor_fullname_new(editor->name));
int result;
- g_object_set (dialog,
+ gtk_object_set (GTK_OBJECT (dialog),
"editable", editor->fullname_editable,
NULL);
gtk_widget_show(GTK_WIDGET(dialog));
- result = gtk_dialog_run (dialog);
- gtk_widget_hide (GTK_WIDGET (dialog));
+ result = gnome_dialog_run (dialog);
- if (editor->fullname_editable && result == GTK_RESPONSE_OK) {
+ if (editor->fullname_editable && result == 0) {
ECardName *name;
GtkWidget *fname_widget;
int style = 0;
- g_object_get (dialog,
+ gtk_object_get(GTK_OBJECT(dialog),
"name", &name,
NULL);
@@ -736,7 +752,7 @@ full_name_clicked(GtkWidget *button, EContactEditor *editor)
fname_widget = glade_xml_get_widget(editor->gui, "entry-fullname");
if (fname_widget && GTK_IS_ENTRY(fname_widget)) {
char *full_name = e_card_name_to_string(name);
- gtk_entry_set_text(GTK_ENTRY(fname_widget), full_name);
+ e_utf8_gtk_entry_set_text(GTK_ENTRY(fname_widget), full_name);
g_free(full_name);
}
@@ -745,116 +761,137 @@ full_name_clicked(GtkWidget *button, EContactEditor *editor)
file_as_set_style(editor, style);
}
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_object_unref(GTK_OBJECT(dialog));
}
static void
full_addr_clicked(GtkWidget *button, EContactEditor *editor)
{
- GtkDialog *dialog;
+ GnomeDialog *dialog;
int result;
const ECardDeliveryAddress *address;
address = e_card_simple_get_delivery_address(editor->simple, editor->address_choice);
- dialog = GTK_DIALOG(e_contact_editor_address_new(address));
- g_object_set (dialog,
- "editable", editor->address_editable[editor->address_choice],
- NULL);
+ dialog = GNOME_DIALOG(e_contact_editor_address_new(address));
+ gtk_object_set (GTK_OBJECT (dialog),
+ "editable", editor->address_editable[editor->address_choice],
+ NULL);
gtk_widget_show(GTK_WIDGET(dialog));
- result = gtk_dialog_run (dialog);
-
- gtk_widget_hide (GTK_WIDGET (dialog));
-
- if (editor->address_editable[editor->address_choice] && result == GTK_RESPONSE_OK) {
+ result = gnome_dialog_run (dialog);
+ if (editor->address_editable[editor->address_choice] && result == 0) {
ECardDeliveryAddress *new_address;
GtkWidget *address_widget;
- int saved_choice = editor->address_choice;
- editor->address_choice = -1;
-
- g_object_get (dialog,
+ gtk_object_get(GTK_OBJECT(dialog),
"address", &new_address,
NULL);
address_widget = glade_xml_get_widget(editor->gui, "text-address");
- if (address_widget && GTK_IS_TEXT_VIEW(address_widget)) {
- GtkTextBuffer *buffer;
- GtkTextIter start_iter, end_iter;
+ if (address_widget && GTK_IS_EDITABLE(address_widget)) {
char *string = e_card_delivery_address_to_string(new_address);
-
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (address_widget));
-
- gtk_text_buffer_get_start_iter (buffer, &start_iter);
- gtk_text_buffer_get_end_iter (buffer, &end_iter);
-
- gtk_text_buffer_delete (buffer, &start_iter, &end_iter);
-
- gtk_text_buffer_insert (buffer, &start_iter, string, strlen (string));
-
+ e_utf8_gtk_editable_set_text(GTK_EDITABLE(address_widget), string);
g_free(string);
+ } else {
+ ECardAddrLabel *address = e_card_delivery_address_to_label(new_address);
+ e_card_simple_set_address(editor->simple, editor->address_choice, address);
+ e_card_address_label_unref(address);
}
- editor->address_choice = saved_choice;
-
e_card_simple_set_delivery_address(editor->simple, editor->address_choice, new_address);
e_card_delivery_address_unref(new_address);
}
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_object_unref(GTK_OBJECT(dialog));
}
static void
categories_clicked(GtkWidget *button, EContactEditor *editor)
{
char *categories = NULL;
- GtkDialog *dialog;
+ GnomeDialog *dialog;
int result;
GtkWidget *entry = glade_xml_get_widget(editor->gui, "entry-categories");
ECategoriesMasterList *ecml;
if (entry && GTK_IS_ENTRY(entry))
- categories = g_strdup (gtk_entry_get_text(GTK_ENTRY(entry)));
+ categories = e_utf8_gtk_entry_get_text(GTK_ENTRY(entry));
else if (editor->card)
- g_object_get (editor->card,
+ gtk_object_get(GTK_OBJECT(editor->card),
"categories", &categories,
NULL);
- dialog = GTK_DIALOG(e_categories_new(categories));
+ dialog = GNOME_DIALOG(e_categories_new(categories));
if (dialog == NULL) {
- GtkWidget *uh_oh = gtk_message_dialog_new (NULL,
- 0, GTK_MESSAGE_ERROR,
- GTK_RESPONSE_OK,
- _("Category editor not available."));
- g_free (categories);
+ GtkWidget *uh_oh = gnome_error_dialog (_("Category editor not available."));
gtk_widget_show (uh_oh);
return;
}
ecml = e_categories_master_list_wombat_new ();
- g_object_set (dialog,
+ gtk_object_set(GTK_OBJECT(dialog),
"header", _("This contact belongs to these categories:"),
"ecml", ecml,
NULL);
- g_object_unref (ecml);
+ gtk_object_unref (GTK_OBJECT (ecml));
gtk_widget_show(GTK_WIDGET(dialog));
- result = gtk_dialog_run (dialog);
+ result = gnome_dialog_run (dialog);
g_free (categories);
- if (result == GTK_RESPONSE_OK) {
- g_object_get (dialog,
+ if (result == 0) {
+ gtk_object_get(GTK_OBJECT(dialog),
"categories", &categories,
NULL);
if (entry && GTK_IS_ENTRY(entry))
- gtk_entry_set_text(GTK_ENTRY(entry), categories);
+ e_utf8_gtk_entry_set_text(GTK_ENTRY(entry), categories);
else
- g_object_set (editor->card,
+ gtk_object_set(GTK_OBJECT(editor->card),
"categories", categories,
NULL);
g_free(categories);
}
- gtk_widget_destroy(GTK_WIDGET(dialog));
+ gtk_object_destroy(GTK_OBJECT(dialog));
+}
+
+static void
+ensure_select_names_contact (EContactEditor *editor)
+{
+ if (editor->select_names_contacts == NULL) {
+ editor->select_names_contacts = e_select_names_manager_new ();
+ e_select_names_manager_add_section (editor->select_names_contacts,
+ "contacts",
+ "Related Contacts");
+ }
+
+ set_entry_changed_signal_field(editor, "entry-caluri");
+ set_entry_changed_signal_field(editor, "entry-fburl");
}
+static void
+contacts_clicked (GtkWidget *button, EContactEditor *editor)
+{
+ ensure_select_names_contact (editor);
+ e_select_names_manager_activate_dialog (editor->select_names_contacts,
+ "contacts");
+}
+
+static void
+add_lists (EContactEditor *editor)
+{
+ GtkWidget *table = glade_xml_get_widget (editor->gui, "table-contacts");
+ if (table && GTK_IS_TABLE (table)) {
+ GtkWidget *entry;
+
+ ensure_select_names_contact (editor);
+ entry = e_select_names_manager_create_entry (editor->select_names_contacts,
+ "contacts");
+ gtk_signal_connect(GTK_OBJECT(entry), "changed",
+ widget_changed, editor);
+ gtk_table_attach_defaults (GTK_TABLE (table), entry, 0, 1, 0, 1);
+ gtk_widget_show (entry);
+ }
+}
+
+
typedef struct {
EContactEditor *ce;
gboolean should_close;
@@ -871,8 +908,8 @@ card_added_cb (EBook *book, EBookStatus status, const char *id, EditorCloseStruc
e_card_set_id (ce->card, id);
- g_signal_emit (ce, contact_editor_signals[CARD_ADDED], 0,
- status, ce->card);
+ gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[CARD_ADDED],
+ status, ce->card);
if (status == E_BOOK_STATUS_SUCCESS) {
ce->is_new_card = FALSE;
@@ -886,7 +923,7 @@ card_added_cb (EBook *book, EBookStatus status, const char *id, EditorCloseStruc
}
}
- g_object_unref (ce);
+ gtk_object_unref (GTK_OBJECT (ce));
g_free (ecs);
}
@@ -899,8 +936,8 @@ card_modified_cb (EBook *book, EBookStatus status, EditorCloseStruct *ecs)
gtk_widget_set_sensitive (ce->app, TRUE);
ce->in_async_call = FALSE;
- g_signal_emit (ce, contact_editor_signals[CARD_MODIFIED], 0,
- status, ce->card);
+ gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[CARD_MODIFIED],
+ status, ce->card);
if (status == E_BOOK_STATUS_SUCCESS) {
if (should_close) {
@@ -912,7 +949,7 @@ card_modified_cb (EBook *book, EBookStatus status, EditorCloseStruct *ecs)
}
}
- g_object_unref (ce);
+ gtk_object_unref (GTK_OBJECT (ce));
g_free (ecs);
}
@@ -927,7 +964,7 @@ save_card (EContactEditor *ce, gboolean should_close)
EditorCloseStruct *ecs = g_new(EditorCloseStruct, 1);
ecs->ce = ce;
- g_object_ref (ecs->ce);
+ gtk_object_ref (GTK_OBJECT (ecs->ce));
ecs->should_close = should_close;
@@ -935,9 +972,9 @@ save_card (EContactEditor *ce, gboolean should_close)
ce->in_async_call = TRUE;
if (ce->is_new_card)
- e_card_merging_book_add_card (ce->book, ce->card, (EBookIdCallback)card_added_cb, ecs);
+ e_card_merging_book_add_card (ce->book, ce->card, GTK_SIGNAL_FUNC(card_added_cb), ecs);
else
- e_card_merging_book_commit_card (ce->book, ce->card, (EBookCallback)card_modified_cb, ecs);
+ e_card_merging_book_commit_card (ce->book, ce->card, GTK_SIGNAL_FUNC(card_modified_cb), ecs);
}
}
@@ -948,7 +985,7 @@ close_dialog (EContactEditor *ce)
if (ce->app != NULL) {
gtk_widget_destroy (ce->app);
ce->app = NULL;
- g_signal_emit (ce, contact_editor_signals[EDITOR_CLOSED], 0);
+ gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[EDITOR_CLOSED]);
}
}
@@ -959,12 +996,12 @@ prompt_to_save_changes (EContactEditor *editor)
return TRUE;
switch (e_addressbook_prompt_save_dialog (GTK_WINDOW(editor->app))) {
- case GTK_RESPONSE_YES:
+ case 0: /* Save */
save_card (editor, FALSE);
return TRUE;
- case GTK_RESPONSE_NO:
+ case 1: /* Discard */
return TRUE;
- case GTK_RESPONSE_CANCEL:
+ case 2: /* Cancel */
default:
return FALSE;
}
@@ -1022,7 +1059,7 @@ file_send_as_cb (GtkWidget *widget, gpointer data)
e_card_simple_sync_card (ce->simple);
card = ce->card;
- e_addressbook_send_card(card, E_ADDRESSBOOK_DISPOSITION_AS_ATTACHMENT);
+ e_card_send(card, E_CARD_DISPOSITION_AS_ATTACHMENT);
}
static void
@@ -1037,38 +1074,27 @@ file_send_to_cb (GtkWidget *widget, gpointer data)
e_card_simple_sync_card (ce->simple);
card = ce->card;
- e_addressbook_send_card(card, E_ADDRESSBOOK_DISPOSITION_AS_TO);
+ e_card_send(card, E_CARD_DISPOSITION_AS_TO);
}
gboolean
-e_contact_editor_confirm_delete (GtkWindow *parent)
-{
- GtkWidget *dialog;
- gint result;
-
- dialog = gtk_message_dialog_new (parent,
- 0,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_NONE,
-#if notyet
- /* XXX we really need to handle the plural case here.. */
- (plural
- ? _("Are you sure you want\n"
- "to delete these contacts?"))
-#endif
- _("Are you sure you want\n"
- "to delete this contact?"));
+e_contact_editor_confirm_delete(GtkWindow *parent)
+{
+ GnomeDialog *dialog;
+ GladeXML *gui;
+ int result;
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- GTK_STOCK_DELETE, GTK_RESPONSE_ACCEPT,
- NULL);
+ gui = glade_xml_new (EVOLUTION_GLADEDIR "/e-contact-editor-confirm-delete.glade", NULL);
- result = gtk_dialog_run(GTK_DIALOG (dialog));
+ dialog = GNOME_DIALOG(glade_xml_get_widget(gui, "confirm-dialog"));
- gtk_widget_destroy (dialog);
+ gnome_dialog_set_parent(dialog, parent);
+
+ result = gnome_dialog_run_and_close(dialog);
+
+ gtk_object_unref(GTK_OBJECT(gui));
- return (result == GTK_RESPONSE_ACCEPT);
+ return !result;
}
static void
@@ -1077,8 +1103,8 @@ card_deleted_cb (EBook *book, EBookStatus status, EContactEditor *ce)
gtk_widget_set_sensitive (ce->app, TRUE);
ce->in_async_call = FALSE;
- g_signal_emit (ce, contact_editor_signals[CARD_DELETED], 0,
- status, ce->card);
+ gtk_signal_emit (GTK_OBJECT (ce), contact_editor_signals[CARD_DELETED],
+ status, ce->card);
/* always close the dialog after we successfully delete a card */
if (status == E_BOOK_STATUS_SUCCESS)
@@ -1092,8 +1118,8 @@ delete_cb (GtkWidget *widget, gpointer data)
ECard *card = ce->card;
ECardSimple *simple = ce->simple;
- g_object_ref(card);
- g_object_ref(simple);
+ gtk_object_ref(GTK_OBJECT(card));
+ gtk_object_ref(GTK_OBJECT(simple));
if (e_contact_editor_confirm_delete(GTK_WINDOW(ce->app))) {
@@ -1104,12 +1130,12 @@ delete_cb (GtkWidget *widget, gpointer data)
gtk_widget_set_sensitive (ce->app, FALSE);
ce->in_async_call = TRUE;
- e_book_remove_card (ce->book, card, (EBookCallback)card_deleted_cb, ce);
+ e_book_remove_card (ce->book, card, GTK_SIGNAL_FUNC(card_deleted_cb), ce);
}
}
- g_object_unref(card);
- g_object_unref(simple);
+ gtk_object_unref(GTK_OBJECT(card));
+ gtk_object_unref(GTK_OBJECT(simple));
}
/* Emits the signal to request printing a card */
@@ -1192,8 +1218,8 @@ create_ui (EContactEditor *ce)
bonobo_ui_component_add_verb_list_with_data (ce->uic, verbs, ce);
bonobo_ui_util_set_ui (ce->uic, EVOLUTION_DATADIR,
- EVOLUTION_UIDIR "/evolution-contact-editor.xml",
- "evolution-contact-editor", NULL);
+ "evolution-contact-editor.xml",
+ "evolution-contact-editor");
e_pixmaps_update (ce->uic, pixmaps);
}
@@ -1247,6 +1273,7 @@ setup_tab_order(GladeXML *gui)
list = add_to_tab_order(list, gui, "entry-web");
list = add_to_tab_order(list, gui, "button-fulladdr");
list = add_to_tab_order(list, gui, "text-address");
+ list = add_to_tab_order(list, gui, "alignment-contacts");
list = g_list_reverse(list);
e_container_change_tab_order(GTK_CONTAINER(container), list);
g_list_free(list);
@@ -1292,7 +1319,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
e_contact_editor->in_async_call = FALSE;
e_contact_editor->editable = TRUE;
- gui = glade_xml_new (EVOLUTION_GLADEDIR "/contact-editor.glade", NULL, NULL);
+ gui = glade_xml_new (EVOLUTION_GLADEDIR "/contact-editor.glade", NULL);
e_contact_editor->gui = gui;
setup_tab_order(gui);
@@ -1303,33 +1330,40 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
(GtkCallback) add_field_callback,
e_contact_editor);
- connect_arrow_button_signals(e_contact_editor);
+ _replace_buttons(e_contact_editor);
+ add_lists (e_contact_editor);
set_entry_changed_signals(e_contact_editor);
wants_html = glade_xml_get_widget(e_contact_editor->gui, "checkbutton-htmlmail");
if (wants_html && GTK_IS_TOGGLE_BUTTON(wants_html))
- g_signal_connect (wants_html, "toggled",
- G_CALLBACK (wants_html_changed), e_contact_editor);
+ gtk_signal_connect(GTK_OBJECT(wants_html), "toggled",
+ wants_html_changed, e_contact_editor);
widget = glade_xml_get_widget(e_contact_editor->gui, "checkbutton-mailingaddress");
if (widget && GTK_IS_TOGGLE_BUTTON(widget))
- g_signal_connect (widget, "toggled",
- G_CALLBACK (address_mailing_changed), e_contact_editor);
+ gtk_signal_connect(GTK_OBJECT(widget), "toggled",
+ address_mailing_changed, e_contact_editor);
widget = glade_xml_get_widget(e_contact_editor->gui, "button-fullname");
if (widget && GTK_IS_BUTTON(widget))
- g_signal_connect (widget, "clicked",
- G_CALLBACK (full_name_clicked), e_contact_editor);
+ gtk_signal_connect(GTK_OBJECT(widget), "clicked",
+ full_name_clicked, e_contact_editor);
widget = glade_xml_get_widget(e_contact_editor->gui, "button-fulladdr");
if (widget && GTK_IS_BUTTON(widget))
- g_signal_connect (widget, "clicked",
- G_CALLBACK (full_addr_clicked), e_contact_editor);
+ gtk_signal_connect(GTK_OBJECT(widget), "clicked",
+ full_addr_clicked, e_contact_editor);
widget = glade_xml_get_widget(e_contact_editor->gui, "button-categories");
if (widget && GTK_IS_BUTTON(widget))
- g_signal_connect (widget, "clicked",
- G_CALLBACK (categories_clicked), e_contact_editor);
+ gtk_signal_connect(GTK_OBJECT(widget), "clicked",
+ categories_clicked, e_contact_editor);
+
+ widget = glade_xml_get_widget(e_contact_editor->gui, "button-contacts");
+ if (widget && GTK_IS_BUTTON(widget))
+ gtk_signal_connect(GTK_OBJECT(widget), "clicked",
+ contacts_clicked, e_contact_editor);
+
/* Construct the app */
bonobo_win = bonobo_window_new ("contact-editor-dialog", _("Contact Editor"));
@@ -1338,13 +1372,13 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
{
GtkWidget *contents;
- contents = bonobo_dock_get_client_area (gnome_app_get_dock (GNOME_APP(e_contact_editor->app)));
-
+ contents = gnome_dock_get_client_area (
+ GNOME_DOCK (GNOME_APP (e_contact_editor->app)->dock));
if (!contents) {
g_message ("contact_editor_construct(): Could not get contents");
return;
}
- g_object_ref (contents);
+ gtk_widget_ref (contents);
gtk_container_remove (GTK_CONTAINER (contents->parent), contents);
bonobo_window_set_contents (BONOBO_WINDOW (bonobo_win), contents);
gtk_widget_destroy (e_contact_editor->app);
@@ -1352,7 +1386,9 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
}
/* Build the menu and toolbar */
- container = bonobo_window_get_ui_container (BONOBO_WINDOW (e_contact_editor->app));
+
+ container = bonobo_ui_container_new ();
+ bonobo_ui_container_set_win (container, BONOBO_WINDOW (e_contact_editor->app));
e_contact_editor->uic = bonobo_ui_component_new_default ();
if (!e_contact_editor->uic) {
@@ -1360,8 +1396,8 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
return;
}
bonobo_ui_component_set_container (e_contact_editor->uic,
- bonobo_object_corba_objref (BONOBO_OBJECT (container)),
- NULL);
+ bonobo_object_corba_objref (
+ BONOBO_OBJECT (container)));
create_ui (e_contact_editor);
@@ -1371,89 +1407,68 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
/* Connect to the deletion of the dialog */
- g_signal_connect (e_contact_editor->app, "delete_event",
+ gtk_signal_connect (GTK_OBJECT (e_contact_editor->app), "delete_event",
GTK_SIGNAL_FUNC (app_delete_event_cb), e_contact_editor);
/* set the icon */
- icon_path = g_build_filename (EVOLUTION_IMAGESDIR, "evolution-contacts-mini.png", NULL);
+ icon_path = g_concat_dir_and_file (EVOLUTION_ICONSDIR, "evolution-contacts-mini.png");
gnome_window_icon_set_from_file (GTK_WINDOW (e_contact_editor->app), icon_path);
g_free (icon_path);
}
void
-e_contact_editor_dispose (GObject *object) {
+e_contact_editor_destroy (GtkObject *object) {
EContactEditor *e_contact_editor = E_CONTACT_EDITOR(object);
if (e_contact_editor->writable_fields) {
- g_object_unref(e_contact_editor->writable_fields);
- e_contact_editor->writable_fields = NULL;
+ gtk_object_unref(GTK_OBJECT(e_contact_editor->writable_fields));
}
if (e_contact_editor->email_list) {
g_list_foreach(e_contact_editor->email_list, (GFunc) g_free, NULL);
g_list_free(e_contact_editor->email_list);
- e_contact_editor->email_list = NULL;
}
if (e_contact_editor->email_info) {
g_free(e_contact_editor->email_info);
- e_contact_editor->email_info = NULL;
}
if (e_contact_editor->email_popup) {
- g_object_unref(e_contact_editor->email_popup);
- e_contact_editor->email_popup = NULL;
+ gtk_widget_unref(e_contact_editor->email_popup);
}
if (e_contact_editor->phone_list) {
g_list_foreach(e_contact_editor->phone_list, (GFunc) g_free, NULL);
g_list_free(e_contact_editor->phone_list);
- e_contact_editor->phone_list = NULL;
}
if (e_contact_editor->phone_info) {
g_free(e_contact_editor->phone_info);
- e_contact_editor->phone_info = NULL;
}
if (e_contact_editor->phone_popup) {
- g_object_unref(e_contact_editor->phone_popup);
- e_contact_editor->phone_popup = NULL;
+ gtk_widget_unref(e_contact_editor->phone_popup);
}
if (e_contact_editor->address_list) {
g_list_foreach(e_contact_editor->address_list, (GFunc) g_free, NULL);
g_list_free(e_contact_editor->address_list);
- e_contact_editor->address_list = NULL;
}
if (e_contact_editor->address_info) {
g_free(e_contact_editor->address_info);
- e_contact_editor->address_info = NULL;
}
if (e_contact_editor->address_popup) {
- g_object_unref(e_contact_editor->address_popup);
- e_contact_editor->address_popup = NULL;
+ gtk_widget_unref(e_contact_editor->address_popup);
}
- if (e_contact_editor->simple) {
- g_object_unref(e_contact_editor->simple);
- e_contact_editor->simple = NULL;
- }
+ if (e_contact_editor->simple)
+ gtk_object_unref(GTK_OBJECT(e_contact_editor->simple));
- if (e_contact_editor->book) {
- g_object_unref(e_contact_editor->book);
- e_contact_editor->book = NULL;
- }
+ if (e_contact_editor->book)
+ gtk_object_unref(GTK_OBJECT(e_contact_editor->book));
- if (e_contact_editor->name) {
- e_card_name_unref(e_contact_editor->name);
- e_contact_editor->name = NULL;
- }
+ if (e_contact_editor->select_names_contacts)
+ gtk_object_unref(GTK_OBJECT(e_contact_editor->select_names_contacts));
- if (e_contact_editor->company) {
- g_free (e_contact_editor->company);
- e_contact_editor->company = NULL;
- }
+ e_card_name_unref(e_contact_editor->name);
+ g_free (e_contact_editor->company);
- if (e_contact_editor->gui) {
- g_object_unref(e_contact_editor->gui);
- e_contact_editor->gui = NULL;
- }
+ gtk_object_unref(GTK_OBJECT(e_contact_editor->gui));
}
static void
@@ -1482,7 +1497,7 @@ supported_fields_cb (EBook *book, EBookStatus status,
return;
}
- g_object_set (ce,
+ gtk_object_set (GTK_OBJECT (ce),
"writable_fields", fields,
NULL);
@@ -1492,8 +1507,7 @@ supported_fields_cb (EBook *book, EBookStatus status,
}
static void
-contact_editor_destroy_notify (void *data,
- GObject *where_the_object_was)
+contact_editor_destroy_notify (void *data)
{
EContactEditor *ce = E_CONTACT_EDITOR (data);
@@ -1511,20 +1525,17 @@ e_contact_editor_new (EBook *book,
g_return_val_if_fail (E_IS_BOOK (book), NULL);
g_return_val_if_fail (E_IS_CARD (card), NULL);
- ce = g_object_new (E_TYPE_CONTACT_EDITOR, NULL);
+ ce = E_CONTACT_EDITOR (gtk_type_new (E_CONTACT_EDITOR_TYPE));
all_contact_editors = g_slist_prepend (all_contact_editors, ce);
- g_object_weak_ref (G_OBJECT (ce), contact_editor_destroy_notify, ce);
-
- g_object_ref (ce);
- gtk_object_sink (GTK_OBJECT (ce));
+ gtk_object_weakref (GTK_OBJECT (ce), contact_editor_destroy_notify, ce);
- g_object_set (ce,
- "book", book,
- "card", card,
- "is_new_card", is_new_card,
- "editable", editable,
- NULL);
+ gtk_object_set (GTK_OBJECT (ce),
+ "book", book,
+ "card", card,
+ "is_new_card", is_new_card,
+ "editable", editable,
+ NULL);
if (book)
e_book_get_supported_fields (book, (EBookFieldsCallback)supported_fields_cb, ce);
@@ -1533,37 +1544,37 @@ e_contact_editor_new (EBook *book,
}
static void
-e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+e_contact_editor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
{
EContactEditor *editor;
- editor = E_CONTACT_EDITOR (object);
+ editor = E_CONTACT_EDITOR (o);
- switch (prop_id){
- case PROP_BOOK:
+ switch (arg_id){
+ case ARG_BOOK:
if (editor->book)
- g_object_unref(editor->book);
- editor->book = E_BOOK(g_value_get_object (value));
- g_object_ref (editor->book);
+ gtk_object_unref(GTK_OBJECT(editor->book));
+ editor->book = E_BOOK(GTK_VALUE_OBJECT (*arg));
+ gtk_object_ref (GTK_OBJECT (editor->book));
/* XXX more here about editable/etc. */
break;
- case PROP_CARD:
+ case ARG_CARD:
if (editor->card)
- g_object_unref(editor->card);
- editor->card = e_card_duplicate(E_CARD(g_value_get_object (value)));
- g_object_set(editor->simple,
- "card", editor->card,
- NULL);
+ gtk_object_unref(GTK_OBJECT(editor->card));
+ editor->card = e_card_duplicate(E_CARD(GTK_VALUE_OBJECT (*arg)));
+ gtk_object_set(GTK_OBJECT(editor->simple),
+ "card", editor->card,
+ NULL);
fill_in_info(editor);
editor->changed = FALSE;
break;
- case PROP_IS_NEW_CARD:
- editor->is_new_card = g_value_get_boolean (value) ? TRUE : FALSE;
+ case ARG_IS_NEW_CARD:
+ editor->is_new_card = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
break;
- case PROP_EDITABLE: {
- gboolean new_value = g_value_get_boolean (value) ? TRUE : FALSE;
+ case ARG_EDITABLE: {
+ gboolean new_value = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
gboolean changed = (editor->editable != new_value);
editor->editable = new_value;
@@ -1575,8 +1586,8 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
break;
}
- case PROP_CHANGED: {
- gboolean new_value = g_value_get_boolean (value) ? TRUE : FALSE;
+ case ARG_CHANGED: {
+ gboolean new_value = GTK_VALUE_BOOL (*arg) ? TRUE : FALSE;
gboolean changed = (editor->changed != new_value);
editor->changed = new_value;
@@ -1585,60 +1596,57 @@ e_contact_editor_set_property (GObject *object, guint prop_id, const GValue *val
command_state_changed (editor);
break;
}
- case PROP_WRITABLE_FIELDS:
+ case ARG_WRITABLE_FIELDS:
if (editor->writable_fields)
- g_object_unref(editor->writable_fields);
- editor->writable_fields = g_value_get_object (value);
+ gtk_object_unref(GTK_OBJECT(editor->writable_fields));
+ editor->writable_fields = GTK_VALUE_POINTER (*arg);
if (editor->writable_fields)
- g_object_ref (editor->writable_fields);
+ gtk_object_ref (GTK_OBJECT (editor->writable_fields));
else
editor->writable_fields = e_list_new(NULL, NULL, NULL);
enable_writable_fields (editor);
break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
}
}
static void
-e_contact_editor_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+e_contact_editor_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
EContactEditor *e_contact_editor;
e_contact_editor = E_CONTACT_EDITOR (object);
- switch (prop_id) {
- case PROP_BOOK:
- g_value_set_object (value, e_contact_editor->book);
+ switch (arg_id) {
+ case ARG_BOOK:
+ GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_contact_editor->book);
break;
- case PROP_CARD:
+ case ARG_CARD:
e_card_simple_sync_card(e_contact_editor->simple);
extract_info(e_contact_editor);
- g_value_set_object (value, e_contact_editor->card);
+ GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_contact_editor->card);
break;
- case PROP_IS_NEW_CARD:
- g_value_set_boolean (value, e_contact_editor->is_new_card ? TRUE : FALSE);
+ case ARG_IS_NEW_CARD:
+ GTK_VALUE_BOOL (*arg) = e_contact_editor->is_new_card ? TRUE : FALSE;
break;
- case PROP_EDITABLE:
- g_value_set_boolean (value, e_contact_editor->editable ? TRUE : FALSE);
+ case ARG_EDITABLE:
+ GTK_VALUE_BOOL (*arg) = e_contact_editor->editable ? TRUE : FALSE;
break;
- case PROP_CHANGED:
- g_value_set_boolean (value, e_contact_editor->changed ? TRUE : FALSE);
+ case ARG_CHANGED:
+ GTK_VALUE_BOOL (*arg) = e_contact_editor->changed ? TRUE : FALSE;
break;
- case PROP_WRITABLE_FIELDS:
+ case ARG_WRITABLE_FIELDS:
if (e_contact_editor->writable_fields)
- g_value_set_object (value, e_list_duplicate (e_contact_editor->writable_fields));
+ GTK_VALUE_POINTER (*arg) = e_list_duplicate (e_contact_editor->writable_fields);
else
- g_value_set_object (value, NULL);
+ GTK_VALUE_POINTER (*arg) = NULL;
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ arg->type = GTK_TYPE_INVALID;
break;
}
}
@@ -1647,15 +1655,14 @@ static void
_popup_position(GtkMenu *menu,
gint *x,
gint *y,
- gboolean *push_in,
gpointer data)
{
GtkWidget *button = GTK_WIDGET(data);
GtkRequisition request;
int mh, mw;
gdk_window_get_origin (button->window, x, y);
- *x += button->allocation.x;
- *y += button->allocation.y;
+ *x += button->allocation.width;
+ *y += button->allocation.height;
gtk_widget_size_request(GTK_WIDGET(menu), &request);
@@ -1674,26 +1681,30 @@ _popup_position(GtkMenu *menu,
if ((*y + mh) > gdk_screen_height ())
*y = gdk_screen_height () - mh;
-
- *push_in = FALSE;
}
static gint
-_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor, GtkWidget *popup, GList **list, GnomeUIInfo **info, gchar *label)
+_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor, GtkWidget *popup, GList **list, GnomeUIInfo **info, gchar *label, gchar *entry, gchar *dialog_title)
{
gint menu_item;
-
- g_signal_stop_emission_by_name (widget, "button_press_event");
-
+ gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "button_press_event");
gtk_widget_realize(popup);
- menu_item = gnome_popup_menu_do_popup_modal(popup, _popup_position, widget, button, editor, widget);
+ menu_item = gnome_popup_menu_do_popup_modal(popup, _popup_position, widget, button, editor);
if ( menu_item != -1 ) {
- GtkWidget *label_widget = glade_xml_get_widget(editor->gui, label);
- if (label_widget && GTK_IS_LABEL(label_widget)) {
- g_object_set (label_widget,
- "label", _(g_list_nth_data(*list, menu_item)),
- NULL);
+#if 0
+ if (menu_item == g_list_length (*list)) {
+ e_contact_editor_build_dialog(editor, entry, label, dialog_title, list, info);
+ } else {
+#endif
+ GtkWidget *label_widget = glade_xml_get_widget(editor->gui, label);
+ if (label_widget && GTK_IS_LABEL(label_widget)) {
+ gtk_object_set(GTK_OBJECT(label_widget),
+ "label", _(g_list_nth_data(*list, menu_item)),
+ NULL);
+ }
+#if 0
}
+#endif
}
return menu_item;
}
@@ -1759,11 +1770,9 @@ e_contact_editor_build_phone_ui (EContactEditor *editor)
e_contact_editor_build_ui_info(editor->phone_list, &editor->phone_info);
if ( editor->phone_popup )
- g_object_unref(editor->phone_popup);
+ gtk_widget_unref(editor->phone_popup);
editor->phone_popup = gnome_popup_menu_new(editor->phone_info);
- g_object_ref (editor->phone_popup);
- gtk_object_sink (GTK_OBJECT (editor->phone_popup));
}
}
@@ -1787,11 +1796,9 @@ e_contact_editor_build_email_ui (EContactEditor *editor)
e_contact_editor_build_ui_info(editor->email_list, &editor->email_info);
if ( editor->email_popup )
- g_object_unref(editor->email_popup);
+ gtk_widget_unref(editor->email_popup);
editor->email_popup = gnome_popup_menu_new(editor->email_info);
- g_object_ref (editor->email_popup);
- gtk_object_sink (GTK_OBJECT (editor->email_popup));
}
}
@@ -1815,13 +1822,96 @@ e_contact_editor_build_address_ui (EContactEditor *editor)
e_contact_editor_build_ui_info(editor->address_list, &editor->address_info);
if ( editor->address_popup )
- g_object_unref(editor->address_popup);
+ gtk_widget_unref(editor->address_popup);
editor->address_popup = gnome_popup_menu_new(editor->address_info);
- g_object_ref (editor->address_popup);
- gtk_object_sink (GTK_OBJECT (editor->address_popup));
}
}
+#if 0
+static void
+_dialog_clicked(GtkWidget *dialog, gint button, EContactEditor *editor)
+{
+ GtkWidget *label = gtk_object_get_data(GTK_OBJECT(dialog),
+ "e_contact_editor_label");
+
+ GtkWidget *dialog_entry = gtk_object_get_data(GTK_OBJECT(dialog),
+ "e_contact_editor_dialog_entry");
+
+ GList **list = gtk_object_get_data(GTK_OBJECT(dialog),
+ "e_contact_editor_list");
+ GList **info = gtk_object_get_data(GTK_OBJECT(dialog),
+ "e_contact_editor_info");
+ switch (button) {
+ case 0:
+ if (label && GTK_IS_LABEL(label)) {
+ gtk_object_set(GTK_OBJECT(label),
+ "label", gtk_entry_get_text(GTK_ENTRY(dialog_entry)),
+ NULL);
+ *list = g_list_append(*list, e_utf8_gtk_entry_get_text(GTK_ENTRY(dialog_entry)));
+ g_free(*info);
+ *info = NULL;
+ }
+ break;
+ }
+ gnome_dialog_close(GNOME_DIALOG(dialog));
+}
+
+static void
+_dialog_destroy(EContactEditor *editor, GtkWidget *dialog)
+{
+ gnome_dialog_close(GNOME_DIALOG(dialog));
+}
+
+static GtkWidget *
+e_contact_editor_build_dialog(EContactEditor *editor, gchar *entry_id, gchar *label_id, gchar *title, GList **list, GnomeUIInfo **info)
+{
+ GtkWidget *dialog_entry = gtk_entry_new();
+ GtkWidget *entry = glade_xml_get_widget(editor->gui, entry_id);
+ GtkWidget *label = glade_xml_get_widget(editor->gui, label_id);
+
+ GtkWidget *dialog = gnome_dialog_new(title,
+ NULL);
+
+ gtk_container_add(GTK_CONTAINER(GNOME_DIALOG(dialog)->vbox),
+ gtk_widget_new (gtk_frame_get_type(),
+ "border_width", 4,
+ "label", title,
+ "child", gtk_widget_new(gtk_alignment_get_type(),
+ "child", dialog_entry,
+ "xalign", .5,
+ "yalign", .5,
+ "xscale", 1.0,
+ "yscale", 1.0,
+ "border_width", 9,
+ NULL),
+ NULL));
+
+ gnome_dialog_append_button_with_pixmap(GNOME_DIALOG(dialog),
+ "Add",
+ GNOME_STOCK_PIXMAP_ADD);
+ gnome_dialog_append_button(GNOME_DIALOG(dialog), GNOME_STOCK_BUTTON_CANCEL);
+ gnome_dialog_set_default(GNOME_DIALOG(dialog), 0);
+
+ gtk_signal_connect(GTK_OBJECT(dialog), "clicked",
+ _dialog_clicked, editor);
+ gtk_signal_connect_while_alive(GTK_OBJECT(editor), "destroy",
+ _dialog_destroy, GTK_OBJECT(dialog), GTK_OBJECT(dialog));
+
+ gtk_object_set_data(GTK_OBJECT(dialog),
+ "e_contact_editor_entry", entry);
+ gtk_object_set_data(GTK_OBJECT(dialog),
+ "e_contact_editor_label", label);
+ gtk_object_set_data(GTK_OBJECT(dialog),
+ "e_contact_editor_dialog_entry", dialog_entry);
+ gtk_object_set_data(GTK_OBJECT(dialog),
+ "e_contact_editor_list", list);
+ gtk_object_set_data(GTK_OBJECT(dialog),
+ "e_contact_editor_info", info);
+
+ gtk_widget_show_all(dialog);
+ return dialog;
+}
+#endif
static void
_phone_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor *editor)
@@ -1853,9 +1943,11 @@ _phone_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor
checked = phone && phone->number && *phone->number;
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->phone_info[i].widget),
checked);
+ gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->phone_info[i].widget),
+ TRUE);
}
- result = _arrow_pressed (widget, button, editor, editor->phone_popup, &editor->phone_list, &editor->phone_info, label);
+ result = _arrow_pressed (widget, button, editor, editor->phone_popup, &editor->phone_list, &editor->phone_info, label, entry, "Add new phone number type");
if (result != -1) {
editor->phone_choice[which - 1] = result;
@@ -1882,9 +1974,11 @@ _email_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEditor
checked = string && *string;
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->email_info[i].widget),
checked);
+ gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->email_info[i].widget),
+ TRUE);
}
- result = _arrow_pressed (widget, button, editor, editor->email_popup, &editor->email_list, &editor->email_info, "label-email1");
+ result = _arrow_pressed (widget, button, editor, editor->email_popup, &editor->email_list, &editor->email_info, "label-email1", "entry-email1", "Add new Email type");
if (result != -1) {
editor->email_choice = result;
@@ -1911,9 +2005,11 @@ _address_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEdito
checked = address && address->data && *address->data;
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(editor->address_info[i].widget),
checked);
+ gtk_check_menu_item_set_show_toggle(GTK_CHECK_MENU_ITEM(editor->address_info[i].widget),
+ TRUE);
}
- result = _arrow_pressed (widget, button, editor, editor->address_popup, &editor->address_list, &editor->address_info, "label-address");
+ result = _arrow_pressed (widget, button, editor, editor->address_popup, &editor->address_list, &editor->address_info, "label-address", "text-address", "Add new Address type");
if (result != -1) {
set_address_field(editor, result);
@@ -1928,48 +2024,42 @@ _address_arrow_pressed (GtkWidget *widget, GdkEventButton *button, EContactEdito
static void
find_address_mailing (EContactEditor *editor)
{
- const ECardDeliveryAddress *address;
+ const ECardAddrLabel *address;
int i;
editor->address_mailing = -1;
for (i = 0; i < E_CARD_SIMPLE_ADDRESS_ID_LAST; i++) {
- address = e_card_simple_get_delivery_address(editor->simple, i);
+ address = e_card_simple_get_address(editor->simple, i);
if (address && (address->flags & E_CARD_ADDR_DEFAULT)) {
if (editor->address_mailing == -1) {
editor->address_mailing = i;
} else {
- ECardDeliveryAddress *new;
+ ECardAddrLabel *new;
- new = e_card_delivery_address_copy (address);
+ new = e_card_address_label_copy (address);
new->flags &= ~E_CARD_ADDR_DEFAULT;
- e_card_simple_set_delivery_address(editor->simple, i, new);
- e_card_delivery_address_unref (new);
+ e_card_simple_set_address(editor->simple, i, new);
+ e_card_address_label_unref (new);
}
}
}
}
static void
-set_field(EContactEditor *editor, GtkEntry *entry, const char *string)
+set_field(GtkEntry *entry, const char *string)
{
- const char *oldstring = gtk_entry_get_text(entry);
+ char *oldstring = e_utf8_gtk_entry_get_text(entry);
if (!string)
string = "";
- if (strcmp(string, oldstring)) {
- g_signal_handlers_block_matched (entry,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, editor);
- gtk_entry_set_text(entry, string);
- g_signal_handlers_unblock_matched (entry,
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, editor);
- }
+ if (strcmp(string, oldstring))
+ e_utf8_gtk_entry_set_text(entry, string);
+ g_free (oldstring);
}
static void
-set_phone_field(EContactEditor *editor, GtkWidget *entry, const ECardPhone *phone)
+set_phone_field(GtkWidget *entry, const ECardPhone *phone)
{
- set_field(editor, GTK_ENTRY(entry), phone ? phone->number : "");
+ set_field(GTK_ENTRY(entry), phone ? phone->number : "");
}
static void
@@ -1981,23 +2071,23 @@ set_fields(EContactEditor *editor)
entry = glade_xml_get_widget(editor->gui, "entry-phone1");
if (entry && GTK_IS_ENTRY(entry))
- set_phone_field(editor, entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[0]));
+ set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[0]));
entry = glade_xml_get_widget(editor->gui, "entry-phone2");
if (entry && GTK_IS_ENTRY(entry))
- set_phone_field(editor, entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[1]));
+ set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[1]));
entry = glade_xml_get_widget(editor->gui, "entry-phone3");
if (entry && GTK_IS_ENTRY(entry))
- set_phone_field(editor, entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[2]));
+ set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[2]));
entry = glade_xml_get_widget(editor->gui, "entry-phone4");
if (entry && GTK_IS_ENTRY(entry))
- set_phone_field(editor, entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[3]));
+ set_phone_field(entry, e_card_simple_get_phone(editor->simple, editor->phone_choice[3]));
entry = glade_xml_get_widget(editor->gui, "entry-email1");
if (entry && GTK_IS_ENTRY(entry))
- set_field(editor, GTK_ENTRY(entry), e_card_simple_get_email(editor->simple, editor->email_choice));
+ set_field(GTK_ENTRY(entry), e_card_simple_get_email(editor->simple, editor->email_choice));
@@ -2014,7 +2104,7 @@ set_fields(EContactEditor *editor)
label_widget = glade_xml_get_widget(editor->gui, "label-address");
if (label_widget && GTK_IS_LABEL(label_widget)) {
- g_object_set (label_widget,
+ gtk_object_set(GTK_OBJECT(label_widget),
"label", _(g_list_nth_data(editor->address_list, i)),
NULL);
}
@@ -2029,25 +2119,25 @@ set_address_field(EContactEditor *editor, int result)
text = glade_xml_get_widget(editor->gui, "text-address");
- if (text && GTK_IS_TEXT_VIEW(text)) {
- GtkTextBuffer *buffer;
- GtkTextIter start_iter, end_iter;
+ if (text && GTK_IS_TEXT(text)) {
+ int position;
+ GtkEditable *editable;
const ECardAddrLabel *address;
if (result == -1)
result = editor->address_choice;
editor->address_choice = -1;
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
-
- gtk_text_buffer_get_start_iter (buffer, &start_iter);
- gtk_text_buffer_get_end_iter (buffer, &end_iter);
-
- gtk_text_buffer_delete (buffer, &start_iter, &end_iter);
+ position = 0;
+ editable = GTK_EDITABLE(text);
+ gtk_editable_delete_text(editable, 0, -1);
address = e_card_simple_get_address(editor->simple, result);
- if (address && address->data)
- gtk_text_buffer_insert (buffer, &start_iter, address->data, strlen (address->data));
+ if (address && address->data) {
+ gchar *u = e_utf8_to_gtk_string ((GtkWidget *) editable, address->data);
+ gtk_editable_insert_text(editable, u, strlen(u), &position);
+ g_free (u);
+ }
check = glade_xml_get_widget(editor->gui, "checkbutton-mailingaddress");
if (check && GTK_IS_CHECK_BUTTON (check)) {
@@ -2081,6 +2171,7 @@ add_field_callback(GtkWidget *widget, EContactEditor *editor)
"entry-spouse",
"text-comments",
"entry-categories",
+ "entry-contacts",
"entry-file-as",
"dateedit-anniversary",
"dateedit-birthday",
@@ -2102,7 +2193,7 @@ add_field_callback(GtkWidget *widget, EContactEditor *editor)
if (!strcmp(name, builtins[i]))
return;
}
- if (GTK_IS_ENTRY(widget) || GTK_IS_TEXT_VIEW(widget)) {
+ if (GTK_IS_ENTRY(widget) || GTK_IS_TEXT(widget)) {
editor->arbitrary_fields = g_list_prepend(editor->arbitrary_fields, g_strdup(name));
}
}
@@ -2133,16 +2224,15 @@ static void
fill_in_field(EContactEditor *editor, char *id, char *value)
{
GtkWidget *widget = glade_xml_get_widget(editor->gui, id);
-
- if (widget && E_IS_URL_ENTRY (widget))
- widget = e_url_entry_get_entry (E_URL_ENTRY (widget));
-
if (widget && GTK_IS_EDITABLE(widget)) {
int position = 0;
GtkEditable *editable = GTK_EDITABLE(widget);
gtk_editable_delete_text(editable, 0, -1);
- if (value)
- gtk_editable_insert_text(editable, value, strlen(value), &position);
+ if (value) {
+ gchar *u = e_utf8_to_gtk_string ((GtkWidget *) editable, value);
+ gtk_editable_insert_text(editable, u, strlen(u), &position);
+ g_free (u);
+ }
}
}
@@ -2150,7 +2240,7 @@ static void
fill_in_card_field(EContactEditor *editor, ECard *card, char *id, char *key)
{
char *string;
- g_object_get (card,
+ gtk_object_get(GTK_OBJECT(card),
key, &string,
NULL);
fill_in_field(editor, id, string);
@@ -2169,8 +2259,11 @@ fill_in_single_field(EContactEditor *editor, char *name)
gtk_editable_delete_text(editable, 0, -1);
arbitrary = e_card_simple_get_arbitrary(simple,
name);
- if (arbitrary && arbitrary->value)
- gtk_editable_insert_text(editable, arbitrary->value, strlen(arbitrary->value), &position);
+ if (arbitrary && arbitrary->value) {
+ gchar *u = e_utf8_to_gtk_string ((GtkWidget *) editable, arbitrary->value);
+ gtk_editable_insert_text(editable, u, strlen(u), &position);
+ g_free (u);
+ }
}
}
@@ -2379,8 +2472,8 @@ enable_writable_fields(EContactEditor *editor)
g_hash_table_destroy (dropdown_hash);
g_hash_table_destroy (supported_hash);
- g_object_unref (simple);
- g_object_unref (card);
+ gtk_object_unref (GTK_OBJECT(simple));
+ gtk_object_unref (GTK_OBJECT(card));
}
static void
@@ -2434,7 +2527,7 @@ fill_in_info(EContactEditor *editor)
GList *list;
gboolean wants_html, wants_html_set;
- g_object_get (card,
+ gtk_object_get(GTK_OBJECT(card),
"file_as", &file_as,
"related_contacts", &related_contacts,
"name", &name,
@@ -2457,7 +2550,7 @@ fill_in_info(EContactEditor *editor)
if (wants_html_set) {
GtkWidget *widget = glade_xml_get_widget(editor->gui, "checkbutton-htmlmail");
if (widget && GTK_IS_CHECK_BUTTON(widget)) {
- g_object_set (widget,
+ gtk_object_set(GTK_OBJECT(widget),
"active", wants_html,
NULL);
}
@@ -2495,6 +2588,12 @@ fill_in_info(EContactEditor *editor)
e_date_edit_set_time (dateedit, -1);
}
+ if (editor->select_names_contacts && related_contacts && *related_contacts) {
+ ESelectNamesModel *model = e_select_names_manager_get_source (editor->select_names_contacts,
+ "contacts");
+ e_select_names_model_import_destinationv (model, related_contacts);
+ }
+
set_fields(editor);
}
}
@@ -2503,22 +2602,18 @@ static void
extract_field(EContactEditor *editor, ECard *card, char *editable_id, char *key)
{
GtkWidget *widget = glade_xml_get_widget(editor->gui, editable_id);
-
- if (widget && E_IS_URL_ENTRY (widget))
- widget = e_url_entry_get_entry (E_URL_ENTRY (widget));
-
- if (widget && GTK_IS_EDITABLE (widget)) {
+ if (widget && GTK_IS_EDITABLE(widget)) {
GtkEditable *editable = GTK_EDITABLE(widget);
- char *string = gtk_editable_get_chars(editable, 0, -1);
+ char *string = e_utf8_gtk_editable_get_chars(editable, 0, -1);
if (string && *string)
- g_object_set (card,
- key, string,
- NULL);
+ gtk_object_set(GTK_OBJECT(card),
+ key, string,
+ NULL);
else
- g_object_set (card,
- key, NULL,
- NULL);
+ gtk_object_set(GTK_OBJECT(card),
+ key, NULL,
+ NULL);
if (string) g_free(string);
}
@@ -2531,7 +2626,7 @@ extract_single_field(EContactEditor *editor, char *name)
ECardSimple *simple = editor->simple;
if (widget && GTK_IS_EDITABLE(widget)) {
GtkEditable *editable = GTK_EDITABLE(widget);
- char *string = gtk_editable_get_chars(editable, 0, -1);
+ char *string = e_utf8_gtk_editable_get_chars(editable, 0, -1);
if (string && *string)
e_card_simple_set_arbitrary(simple,
@@ -2561,10 +2656,10 @@ extract_info(EContactEditor *editor)
widget = glade_xml_get_widget(editor->gui, "entry-file-as");
if (widget && GTK_IS_EDITABLE(widget)) {
GtkEditable *editable = GTK_EDITABLE(widget);
- char *string = gtk_editable_get_chars(editable, 0, -1);
+ char *string = e_utf8_gtk_editable_get_chars(editable, 0, -1);
if (string && *string)
- g_object_set (card,
+ gtk_object_set(GTK_OBJECT(card),
"file_as", string,
NULL);
@@ -2579,8 +2674,23 @@ extract_info(EContactEditor *editor)
extract_single_field(editor, list->data);
}
+ if (editor->select_names_contacts) {
+ ESelectNamesModel *model = e_select_names_manager_get_source (editor->select_names_contacts,
+ "contacts");
+ char *string = e_select_names_model_export_destinationv (model);
+ if (string && *string)
+ gtk_object_set (GTK_OBJECT (card),
+ "related_contacts", string,
+ NULL);
+ else
+ gtk_object_set (GTK_OBJECT (card),
+ "related_contacts", NULL,
+ NULL);
+ g_free (string);
+ }
+
if (editor->name)
- g_object_set (card,
+ gtk_object_set(GTK_OBJECT(card),
"name", editor->name,
NULL);
@@ -2591,11 +2701,11 @@ extract_info(EContactEditor *editor)
&anniversary.month,
&anniversary.day)) {
/* g_print ("%d %d %d\n", anniversary.year, anniversary.month, anniversary.day); */
- g_object_set (card,
+ gtk_object_set(GTK_OBJECT(card),
"anniversary", &anniversary,
NULL);
} else
- g_object_set (card,
+ gtk_object_set(GTK_OBJECT(card),
"anniversary", NULL,
NULL);
}
@@ -2607,11 +2717,11 @@ extract_info(EContactEditor *editor)
&bday.month,
&bday.day)) {
/* g_print ("%d %d %d\n", bday.year, bday.month, bday.day); */
- g_object_set (card,
+ gtk_object_set(GTK_OBJECT(card),
"birth_date", &bday,
NULL);
} else
- g_object_set (card,
+ gtk_object_set(GTK_OBJECT(card),
"birth_date", NULL,
NULL);
}
@@ -2659,22 +2769,6 @@ e_contact_editor_create_date(gchar *name,
TRUE);
e_date_edit_set_show_time (E_DATE_EDIT (widget), FALSE);
e_date_edit_set_time (E_DATE_EDIT (widget), -1);
- gtk_widget_show (widget);
- return widget;
-}
-
-GtkWidget *
-e_contact_editor_create_web(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2);
-
-GtkWidget *
-e_contact_editor_create_web(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2)
-{
- GtkWidget *widget = e_url_entry_new ();
- gtk_widget_show (widget);
return widget;
}
@@ -2682,20 +2776,16 @@ static void
enable_widget (GtkWidget *widget, gboolean enabled)
{
if (GTK_IS_ENTRY (widget)) {
- gtk_editable_set_editable (GTK_EDITABLE (widget), enabled);
+ gtk_entry_set_editable (GTK_ENTRY (widget), enabled);
}
- else if (GTK_IS_TEXT_VIEW (widget)) {
- gtk_text_view_set_editable (GTK_TEXT_VIEW (widget), enabled);
+ else if (GTK_IS_TEXT (widget)) {
+ gtk_text_set_editable (GTK_TEXT (widget), enabled);
}
else if (GTK_IS_COMBO (widget)) {
- gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (widget)->entry),
- enabled);
+ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (widget)->entry),
+ enabled);
gtk_widget_set_sensitive (GTK_COMBO (widget)->button, enabled);
}
- else if (E_IS_URL_ENTRY (widget)) {
- GtkWidget *e = e_url_entry_get_entry (E_URL_ENTRY (widget));
- gtk_editable_set_editable (GTK_EDITABLE (e), enabled);
- }
else if (E_IS_DATE_EDIT (widget)) {
e_date_edit_set_editable (E_DATE_EDIT (widget), enabled);
}
diff --git a/addressbook/gui/contact-editor/e-contact-editor.h b/addressbook/gui/contact-editor/e-contact-editor.h
index 8642aecac1..a7619bd55c 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.h
+++ b/addressbook/gui/contact-editor/e-contact-editor.h
@@ -25,11 +25,15 @@
#include <bonobo/bonobo-ui-component.h>
#include <glade/glade.h>
+#include "addressbook/gui/component/select-names/e-select-names-manager.h"
#include "addressbook/backend/ebook/e-book.h"
#include "addressbook/backend/ebook/e-card.h"
#include "addressbook/backend/ebook/e-card-simple.h"
-G_BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus */
/* EContactEditor - A dialog displaying information about a contact.
*
@@ -40,11 +44,11 @@ G_BEGIN_DECLS
* card ECard * RW The card currently being edited
*/
-#define E_TYPE_CONTACT_EDITOR (e_contact_editor_get_type ())
-#define E_CONTACT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CONTACT_EDITOR, EContactEditor))
-#define E_CONTACT_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_CONTACT_EDITOR, EContactEditorClass))
-#define E_IS_CONTACT_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CONTACT_EDITOR))
-#define E_IS_CONTACT_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_CONTACT_EDITOR))
+#define E_CONTACT_EDITOR_TYPE (e_contact_editor_get_type ())
+#define E_CONTACT_EDITOR(obj) (GTK_CHECK_CAST ((obj), E_CONTACT_EDITOR_TYPE, EContactEditor))
+#define E_CONTACT_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_CONTACT_EDITOR_TYPE, EContactEditorClass))
+#define E_IS_CONTACT_EDITOR(obj) (GTK_CHECK_TYPE ((obj), E_CONTACT_EDITOR_TYPE))
+#define E_IS_CONTACT_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), E_CONTACT_EDITOR_TYPE))
typedef struct _EContactEditor EContactEditor;
@@ -74,6 +78,8 @@ struct _EContactEditor
GList *phone_list;
GList *address_list;
+ ESelectNamesManager *select_names_contacts;
+
ECardName *name;
char *company;
@@ -121,7 +127,7 @@ EContactEditor *e_contact_editor_new (EBook *book,
ECard *card,
gboolean is_new_card,
gboolean editable);
-GType e_contact_editor_get_type (void);
+GtkType e_contact_editor_get_type (void);
void e_contact_editor_show (EContactEditor *editor);
void e_contact_editor_close (EContactEditor *editor);
@@ -131,6 +137,9 @@ gboolean e_contact_editor_confirm_delete (GtkWindow *parent);
gboolean e_contact_editor_request_close_all (void);
-G_END_DECLS
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
#endif /* __E_CONTACT_EDITOR_H__ */
diff --git a/addressbook/gui/contact-editor/e-contact-save-as.c b/addressbook/gui/contact-editor/e-contact-save-as.c
index 2478eadeb1..10d2fcfdf3 100644
--- a/addressbook/gui/contact-editor/e-contact-save-as.c
+++ b/addressbook/gui/contact-editor/e-contact-save-as.c
@@ -26,14 +26,17 @@
#include <fcntl.h>
#include <gtk/gtkfilesel.h>
#include <gtk/gtksignal.h>
-#include <gtk/gtkmessagedialog.h>
+#include <gtk/gtk.h>
+#include <libgnomeui/gnome-dialog.h>
#include <gal/util/e-util.h>
+#include <gal/widgets/e-unicode.h>
#include <libgnome/gnome-i18n.h>
#include <errno.h>
#include <string.h>
#include <libgnomeui/gnome-messagebox.h>
+#include <libgnomeui/gnome-stock.h>
-static gint file_exists(GtkFileSelection *filesel, const char *filename);
+static int file_exists(GtkFileSelection *filesel, const char *filename);
typedef struct {
GtkFileSelection *filesel;
@@ -53,24 +56,22 @@ save_it(GtkWidget *widget, SaveAsInfo *info)
if (error == EEXIST) {
response = file_exists(info->filesel, filename);
switch (response) {
- case GTK_RESPONSE_ACCEPT : /* Overwrite */
+ case 0 : /* Overwrite */
e_write_file(filename, info->vcard, O_WRONLY | O_CREAT | O_TRUNC);
break;
- case GTK_RESPONSE_REJECT : /* cancel */
+ case 1 : /* cancel */
return;
}
} else if (error != 0) {
GtkWidget *dialog;
char *str;
- str = g_strdup_printf (_("Error saving %s: %s"), filename, strerror(errno));
- dialog = gtk_message_dialog_new (GTK_WINDOW (info->filesel),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- str);
+ str = g_strdup_printf ("Error saving %s: %s", filename, strerror(errno));
+ dialog = gnome_message_box_new (str, GNOME_MESSAGE_BOX_ERROR, GNOME_STOCK_BUTTON_OK, NULL);
g_free (str);
+ gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (info->filesel));
+
gtk_widget_show (dialog);
return;
@@ -86,9 +87,8 @@ close_it(GtkWidget *widget, SaveAsInfo *info)
}
static void
-destroy_it(void *data, GObject *where_the_object_was)
+destroy_it(GtkWidget *widget, SaveAsInfo *info)
{
- SaveAsInfo *info = data;
g_free (info->vcard);
g_free (info);
}
@@ -122,25 +122,29 @@ e_contact_save_as(char *title, ECard *card, GtkWindow *parent_window)
GtkFileSelection *filesel;
char *file;
char *name;
+ char *locale_name;
SaveAsInfo *info = g_new(SaveAsInfo, 1);
filesel = GTK_FILE_SELECTION(gtk_file_selection_new(title));
- g_object_get (card,
- "file_as", &name,
- NULL);
- file = make_safe_filename (g_get_home_dir(), name);
+ gtk_object_get (GTK_OBJECT (card),
+ "file_as", &name,
+ NULL);
+ locale_name = e_utf8_to_locale_string (name);
+ file = make_safe_filename (g_get_home_dir(), locale_name);
gtk_file_selection_set_filename (filesel, file);
g_free (file);
+ g_free (locale_name);
info->filesel = filesel;
info->vcard = e_card_get_vcard(card);
- g_signal_connect(filesel->ok_button, "clicked",
- G_CALLBACK (save_it), info);
- g_signal_connect(filesel->cancel_button, "clicked",
- G_CALLBACK (close_it), info);
- g_object_weak_ref (G_OBJECT (filesel), destroy_it, info);
+ gtk_signal_connect(GTK_OBJECT(filesel->ok_button), "clicked",
+ save_it, info);
+ gtk_signal_connect(GTK_OBJECT(filesel->cancel_button), "clicked",
+ close_it, info);
+ gtk_signal_connect(GTK_OBJECT(filesel), "destroy",
+ destroy_it, info);
if (parent_window) {
gtk_window_set_transient_for (GTK_WINDOW (filesel),
@@ -161,13 +165,15 @@ e_contact_list_save_as(char *title, GList *list, GtkWindow *parent_window)
/* This is a filename. Translators take note. */
if (list && list->data && list->next == NULL) {
- char *name, *file;
- g_object_get (list->data,
- "file_as", &name,
- NULL);
- file = make_safe_filename (g_get_home_dir(), name);
+ char *name, *locale_name, *file;
+ gtk_object_get (GTK_OBJECT (list->data),
+ "file_as", &name,
+ NULL);
+ locale_name = e_utf8_to_locale_string (name);
+ file = make_safe_filename (g_get_home_dir(), locale_name);
gtk_file_selection_set_filename (filesel, file);
g_free (file);
+ g_free (locale_name);
} else {
char *file;
file = make_safe_filename (g_get_home_dir(), _("list"));
@@ -178,11 +184,12 @@ e_contact_list_save_as(char *title, GList *list, GtkWindow *parent_window)
info->filesel = filesel;
info->vcard = e_card_list_get_vcard (list);
- g_signal_connect(filesel->ok_button, "clicked",
- G_CALLBACK (save_it), info);
- g_signal_connect(filesel->cancel_button, "clicked",
- G_CALLBACK (close_it), info);
- g_object_weak_ref (G_OBJECT (filesel), destroy_it, info);
+ gtk_signal_connect(GTK_OBJECT(filesel->ok_button), "clicked",
+ save_it, info);
+ gtk_signal_connect(GTK_OBJECT(filesel->cancel_button), "clicked",
+ close_it, info);
+ gtk_signal_connect(GTK_OBJECT(filesel), "destroy",
+ destroy_it, info);
if (parent_window) {
gtk_window_set_transient_for (GTK_WINDOW (filesel),
@@ -193,24 +200,31 @@ e_contact_list_save_as(char *title, GList *list, GtkWindow *parent_window)
gtk_widget_show(GTK_WIDGET(filesel));
}
-static gint
+static int
file_exists(GtkFileSelection *filesel, const char *filename)
{
- GtkWidget *dialog;
- gint response;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (filesel),
- 0,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_NONE,
- _("%s already exists\nDo you want to overwrite it?"), filename);
-
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- _("Overwrite"), GTK_RESPONSE_ACCEPT,
- NULL);
+ GnomeDialog *dialog = NULL;
+ GtkWidget *label;
+ GladeXML *gui = NULL;
+ int result = 0;
+ char *string;
+
+ gui = glade_xml_new (EVOLUTION_GLADEDIR "/file-exists.glade", NULL);
+ dialog = GNOME_DIALOG(glade_xml_get_widget(gui, "dialog-exists"));
+
+ label = glade_xml_get_widget (gui, "label-exists");
+ if (GTK_IS_LABEL (label)) {
+ string = g_strdup_printf (_("%s already exists\nDo you want to overwrite it?"), filename);
+ gtk_label_set_text (GTK_LABEL (label), string);
+ g_free (string);
+ }
+
+ gnome_dialog_set_parent(dialog, GTK_WINDOW(filesel));
+
+ gtk_widget_show (GTK_WIDGET (dialog));
+ result = gnome_dialog_run_and_close(dialog);
+
+ g_free(gui);
- response = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- return response;
+ return result;
}
diff --git a/addressbook/gui/contact-editor/fulladdr.glade b/addressbook/gui/contact-editor/fulladdr.glade
index 023c0b57be..fc767c1c89 100644
--- a/addressbook/gui/contact-editor/fulladdr.glade
+++ b/addressbook/gui/contact-editor/fulladdr.glade
@@ -1,446 +1,473 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+<?xml version="1.0"?>
+<GTK-Interface>
-<glade-interface>
+<project>
+ <name>fulladdr</name>
+ <program_name>fulladdr</program_name>
+ <directory></directory>
+ <source_directory>src</source_directory>
+ <pixmaps_directory>pixmaps</pixmaps_directory>
+ <language>C</language>
+ <gnome_support>True</gnome_support>
+ <gettext_support>True</gettext_support>
+ <use_widget_names>True</use_widget_names>
+ <output_main_file>False</output_main_file>
+ <output_support_files>False</output_support_files>
+ <output_build_files>False</output_build_files>
+</project>
-<widget class="GtkDialog" id="dialog-checkaddress">
- <property name="title" translatable="yes">Check Address</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
+<widget>
+ <class>GnomeDialog</class>
+ <name>dialog-checkaddress</name>
+ <visible>False</visible>
+ <title>Check Address</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>True</modal>
+ <allow_shrink>False</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <auto_close>False</auto_close>
+ <hide_on_close>False</hide_on_close>
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vbox-container">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button2">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDialog:vbox</child_name>
+ <name>vbox-container</name>
+ <homogeneous>False</homogeneous>
+ <spacing>8</spacing>
+ <child>
+ <padding>4</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ <widget>
+ <class>GtkHButtonBox</class>
+ <child_name>GnomeDialog:action_area</child_name>
+ <name>hbuttonbox1</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>8</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
<child>
- <widget class="GtkTable" id="table-checkaddress">
- <property name="border_width">8</property>
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
- <child>
- <widget class="GtkLabel" id="label-street">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Address:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-street</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkButton</class>
+ <name>button1</name>
+ <can_default>True</can_default>
+ <has_default>True</has_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ </widget>
- <child>
- <widget class="GtkLabel" id="label-city">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_City:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-city</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkButton</class>
+ <name>button2</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+ </widget>
+ </widget>
- <child>
- <widget class="GtkEntry" id="entry-city">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkTable</class>
+ <name>table-checkaddress</name>
+ <border_width>8</border_width>
+ <rows>4</rows>
+ <columns>4</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>6</row_spacing>
+ <column_spacing>6</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <child>
- <widget class="GtkEntry" id="entry-ext">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-street</name>
+ <label>_Address:</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-street</focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkLabel" id="label-po">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_PO Box:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-po</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-city</name>
+ <label>_City:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-city</focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkLabel" id="label-ext">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Address _2:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-ext</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry-city</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkEntry" id="entry-po">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry-ext</name>
+ <width>100</width>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkEntry" id="entry-street">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-po</name>
+ <label>_PO Box:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-po</focus_target>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkLabel" id="label-region">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_State/Province:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-region</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-ext</name>
+ <label>Address _2:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-ext</focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkEntry" id="entry-region">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry-po</name>
+ <width>100</width>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkCombo" id="combo-country">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry-street</name>
+ <can_focus>True</can_focus>
+ <has_focus>True</has_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry-country">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-region</name>
+ <label>_State/Province:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-region</focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget1">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry-region</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkListItem" id="convertwidget2">
- <property name="visible">True</property>
+ <widget>
+ <class>GtkCombo</class>
+ <name>combo-country</name>
+ <width>100</width>
+ <can_focus>True</can_focus>
+ <value_in_list>False</value_in_list>
+ <ok_if_empty>True</ok_if_empty>
+ <case_sensitive>False</case_sensitive>
+ <use_arrows>True</use_arrows>
+ <use_arrows_always>False</use_arrows_always>
+ <items></items>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
- <child>
- <widget class="GtkLabel" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GtkCombo:entry</child_name>
+ <name>entry-country</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+ </widget>
- <child>
- <widget class="GtkEntry" id="entry-code">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry-code</name>
+ <width>100</width>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>3</left_attach>
+ <right_attach>4</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkLabel" id="label-code">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_ZIP Code:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-code</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-code</name>
+ <label>_ZIP Code:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-code</focus_target>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
- <child>
- <widget class="GtkLabel" id="label-country">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Countr_y:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-country</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-country</name>
+ <label>Countr_y:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>1</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-country</focus_target>
+ <child>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
</widget>
- </child>
+ </widget>
</widget>
-</glade-interface>
+</GTK-Interface>
diff --git a/addressbook/gui/contact-editor/fullname.glade b/addressbook/gui/contact-editor/fullname.glade
index f890d2cb88..fad1642d89 100644
--- a/addressbook/gui/contact-editor/fullname.glade
+++ b/addressbook/gui/contact-editor/fullname.glade
@@ -1,674 +1,389 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="dialog-checkfullname">
- <property name="title" translatable="yes">Check Full Name</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vbox-container">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button2">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
+<?xml version="1.0"?>
+<GTK-Interface>
+
+<project>
+ <name>fullname</name>
+ <program_name>fullname</program_name>
+ <directory></directory>
+ <source_directory>src</source_directory>
+ <pixmaps_directory>pixmaps</pixmaps_directory>
+ <language>C</language>
+ <gnome_support>True</gnome_support>
+ <gettext_support>True</gettext_support>
+ <use_widget_names>True</use_widget_names>
+ <output_main_file>False</output_main_file>
+ <output_support_files>False</output_support_files>
+ <output_build_files>False</output_build_files>
+</project>
+
+<widget>
+ <class>GnomeDialog</class>
+ <name>dialog-checkfullname</name>
+ <visible>False</visible>
+ <title>Check Full Name</title>
+ <type>GTK_WINDOW_TOPLEVEL</type>
+ <position>GTK_WIN_POS_NONE</position>
+ <modal>True</modal>
+ <allow_shrink>True</allow_shrink>
+ <allow_grow>True</allow_grow>
+ <auto_shrink>False</auto_shrink>
+ <auto_close>False</auto_close>
+ <hide_on_close>False</hide_on_close>
+
+ <widget>
+ <class>GtkVBox</class>
+ <child_name>GnomeDialog:vbox</child_name>
+ <name>vbox-container</name>
+ <homogeneous>False</homogeneous>
+ <spacing>8</spacing>
+ <child>
+ <padding>4</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+
+ <widget>
+ <class>GtkHButtonBox</class>
+ <child_name>GnomeDialog:action_area</child_name>
+ <name>hbuttonbox1</name>
+ <layout_style>GTK_BUTTONBOX_END</layout_style>
+ <spacing>8</spacing>
+ <child_min_width>85</child_min_width>
+ <child_min_height>27</child_min_height>
+ <child_ipad_x>7</child_ipad_x>
+ <child_ipad_y>0</child_ipad_y>
<child>
- <widget class="GtkTable" id="table-checkfullname">
- <property name="border_width">8</property>
- <property name="visible">True</property>
- <property name="n_rows">5</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">21</property>
-
- <child>
- <widget class="GtkCombo" id="combo-title">
- <property name="visible">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry-title">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget1">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget2">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget4">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Mr.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget6">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Mrs.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget8">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Ms.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget10">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Miss</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget12">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget13">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Dr.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget14">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget15">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="combo-suffix">
- <property name="visible">True</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry-suffix">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget16">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget17">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget18">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget19">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Sr.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget21">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget22">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Jr.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget23">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget24">
- <property name="visible">True</property>
- <property name="label" translatable="yes">I</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget25">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget26">
- <property name="visible">True</property>
- <property name="label" translatable="yes">II</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget27">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget28">
- <property name="visible">True</property>
- <property name="label" translatable="yes">III</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget29">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Esq.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkListItem" id="convertwidget31">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget32">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-first">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-middle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="entry-last">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-first">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_First:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-first</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-title">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Title:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-title</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
- <child>
- <widget class="GtkLabel" id="label-middle">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Middle:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-middle</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkButton</class>
+ <name>button1</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
+ </widget>
+
+ <widget>
+ <class>GtkButton</class>
+ <name>button2</name>
+ <can_default>True</can_default>
+ <can_focus>True</can_focus>
+ <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
+ </widget>
+ </widget>
- <child>
- <widget class="GtkLabel" id="label-last">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Last:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-last</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkTable</class>
+ <name>table-checkfullname</name>
+ <border_width>8</border_width>
+ <rows>5</rows>
+ <columns>3</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>6</row_spacing>
+ <column_spacing>21</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <child>
- <widget class="GtkLabel" id="label-suffix">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Suffix:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">entry-suffix</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
+ <widget>
+ <class>GtkCombo</class>
+ <name>combo-title</name>
+ <value_in_list>False</value_in_list>
+ <ok_if_empty>True</ok_if_empty>
+ <case_sensitive>False</case_sensitive>
+ <use_arrows>True</use_arrows>
+ <use_arrows_always>False</use_arrows_always>
+ <items>
+Mr.
+Mrs.
+Ms.
+Miss
+Dr.
+</items>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GtkCombo:entry</child_name>
+ <name>entry-title</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
</widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ </widget>
+
+ <widget>
+ <class>GtkCombo</class>
+ <name>combo-suffix</name>
+ <value_in_list>False</value_in_list>
+ <ok_if_empty>True</ok_if_empty>
+ <case_sensitive>False</case_sensitive>
+ <use_arrows>True</use_arrows>
+ <use_arrows_always>False</use_arrows_always>
+ <items>
+Sr.
+Jr.
+I
+II
+III
+Esq.
+</items>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+
+ <widget>
+ <class>GtkEntry</class>
+ <child_name>GtkCombo:entry</child_name>
+ <name>entry-suffix</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry-first</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry-middle</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry-last</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-first</name>
+ <label>_First:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-first</focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-title</name>
+ <label>_Title:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-title</focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-middle</name>
+ <label>_Middle:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-middle</focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-last</name>
+ <label>_Last:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-last</focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label-suffix</name>
+ <label>_Suffix:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <focus_target>entry-suffix</focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+ </widget>
</widget>
- </child>
+ </widget>
</widget>
-</glade-interface>
+</GTK-Interface>
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index 7f99062144..cd306d1627 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -2,18 +2,20 @@
#include <config.h>
-#include <string.h>
-#include <libgnome/gnome-i18n.h>
-#include "e-addressbook-marshal.h"
#include "e-addressbook-reflow-adapter.h"
#include "e-addressbook-model.h"
#include "e-addressbook-view.h"
#include "e-addressbook-util.h"
+#include <gal/util/e-i18n.h>
+
#include "e-minicard.h"
+#include <gal/widgets/e-unicode.h>
+#include <gal/widgets/e-font.h>
#include <gal/widgets/e-popup-menu.h>
#include <gal/widgets/e-gui-utils.h>
+#include <gal/unicode/gunicode.h>
#include "e-contact-save-as.h"
#include "addressbook/printing/e-contact-print.h"
#include "addressbook/printing/e-contact-print-envelope.h"
@@ -21,24 +23,21 @@
struct _EAddressbookReflowAdapterPrivate {
EAddressbookModel *model;
-
- gboolean loading;
-
+
int create_card_id, remove_card_id, modify_card_id, model_changed_id;
- int search_started_id, search_result_id;
};
#define PARENT_TYPE e_reflow_model_get_type()
-static EReflowModel *parent_class;
+EReflowModel *parent_class;
#define d(x)
enum {
- PROP_0,
- PROP_BOOK,
- PROP_QUERY,
- PROP_EDITABLE,
- PROP_MODEL,
+ ARG_0,
+ ARG_BOOK,
+ ARG_QUERY,
+ ARG_EDITABLE,
+ ARG_MODEL,
};
enum {
@@ -53,53 +52,53 @@ unlink_model(EAddressbookReflowAdapter *adapter)
{
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- if (priv->model && priv->create_card_id)
- g_signal_handler_disconnect (priv->model,
- priv->create_card_id);
- if (priv->model && priv->remove_card_id)
- g_signal_handler_disconnect (priv->model,
- priv->remove_card_id);
- if (priv->model && priv->modify_card_id)
- g_signal_handler_disconnect (priv->model,
- priv->modify_card_id);
- if (priv->model && priv->model_changed_id)
- g_signal_handler_disconnect (priv->model,
- priv->model_changed_id);
- if (priv->model && priv->search_started_id)
- g_signal_handler_disconnect (priv->model,
- priv->search_started_id);
- if (priv->model && priv->search_result_id)
- g_signal_handler_disconnect (priv->model,
- priv->search_result_id);
+ gtk_signal_disconnect(GTK_OBJECT (priv->model),
+ priv->create_card_id);
+ gtk_signal_disconnect(GTK_OBJECT (priv->model),
+ priv->remove_card_id);
+ gtk_signal_disconnect(GTK_OBJECT (priv->model),
+ priv->modify_card_id);
+ gtk_signal_disconnect(GTK_OBJECT (priv->model),
+ priv->model_changed_id);
priv->create_card_id = 0;
priv->remove_card_id = 0;
priv->modify_card_id = 0;
priv->model_changed_id = 0;
- priv->search_started_id = 0;
- priv->search_result_id = 0;
- if (priv->model)
- g_object_unref (priv->model);
+ gtk_object_unref(GTK_OBJECT(priv->model));
priv->model = NULL;
}
static int
-text_height (PangoLayout *layout, const gchar *text)
+count_lines (const gchar *text)
{
- int height;
+ int num_lines = 1;
+ gunichar unival;
- pango_layout_set_text (layout, text, -1);
+ for (text = e_unicode_get_utf8 (text, &unival); (unival && text); text = e_unicode_get_utf8 (text, &unival)) {
+ if (unival == '\n') {
+ num_lines ++;
+ }
+ }
- pango_layout_get_pixel_size (layout, NULL, &height);
+ return num_lines;
+}
+
+static int
+text_height (GnomeCanvas *canvas, const gchar *text)
+{
+ EFont *font = e_font_from_gdk_font (((GtkWidget *) canvas)->style->font);
+ gint height = e_font_height (font) * count_lines (text) / canvas->pixels_per_unit;
+ e_font_unref (font);
return height;
}
static void
-addressbook_dispose(GObject *object)
+addressbook_finalize(GtkObject *object)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
@@ -121,21 +120,21 @@ addressbook_count (EReflowModel *erm)
return e_addressbook_model_card_count (priv->model);
}
-/* This function returns the height of the minicard in question */
+/* This function returns the number of items in our EReflowModel. */
static int
addressbook_height (EReflowModel *erm, int i, GnomeCanvasGroup *parent)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
+ /* FIXME */
ECardSimpleField field;
int count = 0;
+ int height;
char *string;
ECardSimple *simple = e_card_simple_new (e_addressbook_model_card_at (priv->model, i));
- PangoLayout *layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (parent)->canvas), "");
- int height;
string = e_card_simple_get(simple, E_CARD_SIMPLE_FIELD_FILE_AS);
- height = text_height (layout, string ? string : "") + 10.0;
+ height = text_height (GNOME_CANVAS_ITEM (parent)->canvas, string ? string : "") + 10.0;
g_free(string);
for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST_SIMPLE_STRING && count < 5; field++) {
@@ -148,9 +147,9 @@ addressbook_height (EReflowModel *erm, int i, GnomeCanvasGroup *parent)
int this_height;
int field_text_height;
- this_height = text_height (layout, e_card_simple_get_name(simple, field));
+ this_height = text_height (GNOME_CANVAS_ITEM (parent)->canvas, e_card_simple_get_name(simple, field));
- field_text_height = text_height (layout, string);
+ field_text_height = text_height (GNOME_CANVAS_ITEM (parent)->canvas, string);
if (this_height < field_text_height)
this_height = field_text_height;
@@ -163,8 +162,7 @@ addressbook_height (EReflowModel *erm, int i, GnomeCanvasGroup *parent)
}
height += 2;
- g_object_unref (simple);
- g_object_unref (layout);
+ gtk_object_unref (GTK_OBJECT (simple));
return height;
}
@@ -175,32 +173,27 @@ addressbook_compare (EReflowModel *erm, int n1, int n2)
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(erm);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
ECard *card1, *card2;
-
- if (priv->loading) {
- return n1-n2;
- }
- else {
- card1 = e_addressbook_model_card_at (priv->model, n1);
- card2 = e_addressbook_model_card_at (priv->model, n2);
-
- if (card1 && card2) {
- char *file_as1, *file_as2;
- file_as1 = card1->file_as;
- file_as2 = card2->file_as;
- if (file_as1 && file_as2)
- return g_utf8_collate(file_as1, file_as2);
- if (file_as1)
- return -1;
- if (file_as2)
- return 1;
- return strcmp(e_card_get_id(card1), e_card_get_id(card2));
- }
- if (card1)
+
+ card1 = e_addressbook_model_card_at (priv->model, n1);
+ card2 = e_addressbook_model_card_at (priv->model, n2);
+
+ if (card1 && card2) {
+ char *file_as1, *file_as2;
+ file_as1 = card1->file_as;
+ file_as2 = card2->file_as;
+ if (file_as1 && file_as2)
+ return g_utf8_collate(file_as1, file_as2);
+ if (file_as1)
return -1;
- if (card2)
+ if (file_as2)
return 1;
- return 0;
+ return strcmp(e_card_get_id(card1), e_card_get_id(card2));
}
+ if (card1)
+ return -1;
+ if (card2)
+ return 1;
+ return 0;
}
static int
@@ -208,9 +201,9 @@ adapter_drag_begin (EMinicard *card, GdkEvent *event, EAddressbookReflowAdapter
{
gint ret_val = 0;
- g_signal_emit (adapter,
- e_addressbook_reflow_adapter_signals[DRAG_BEGIN], 0,
- event, &ret_val);
+ gtk_signal_emit (GTK_OBJECT(adapter),
+ e_addressbook_reflow_adapter_signals[DRAG_BEGIN],
+ event, &ret_val);
return ret_val;
}
@@ -229,13 +222,13 @@ addressbook_incarnate (EReflowModel *erm, int i, GnomeCanvasGroup *parent)
NULL);
#if 0
- g_signal_connect (item, "selected",
- G_CALLBACK(card_selected), 0, emvm);
+ gtk_signal_connect (GTK_OBJECT (item), "selected",
+ GTK_SIGNAL_FUNC(card_selected), emvm);
#endif
- g_signal_connect (item, "drag_begin",
- G_CALLBACK(adapter_drag_begin), adapter);
-
+ gtk_signal_connect (GTK_OBJECT (item), "drag_begin",
+ GTK_SIGNAL_FUNC(adapter_drag_begin), adapter);
+
return item;
}
@@ -250,10 +243,12 @@ addressbook_reincarnate (EReflowModel *erm, int i, GnomeCanvasItem *item)
NULL);
}
+
+
static void
-create_card (EAddressbookModel *model,
- gint index, gint count,
- EAddressbookReflowAdapter *adapter)
+create_card(EAddressbookModel *model,
+ gint index, gint count,
+ EAddressbookReflowAdapter *adapter)
{
e_reflow_model_items_inserted (E_REFLOW_MODEL (adapter),
index,
@@ -261,155 +256,129 @@ create_card (EAddressbookModel *model,
}
static void
-remove_card (EAddressbookModel *model,
- gint index,
- EAddressbookReflowAdapter *adapter)
+remove_card(EAddressbookModel *model,
+ gint index,
+ EAddressbookReflowAdapter *adapter)
{
- e_reflow_model_item_removed (E_REFLOW_MODEL (adapter), index);
+ e_reflow_model_changed (E_REFLOW_MODEL (adapter));
}
static void
-modify_card (EAddressbookModel *model,
- gint index,
- EAddressbookReflowAdapter *adapter)
+modify_card(EAddressbookModel *model,
+ gint index,
+ EAddressbookReflowAdapter *adapter)
{
e_reflow_model_item_changed (E_REFLOW_MODEL (adapter), index);
}
static void
-model_changed (EAddressbookModel *model,
- EAddressbookReflowAdapter *adapter)
+model_changed(EAddressbookModel *model,
+ EAddressbookReflowAdapter *adapter)
{
e_reflow_model_changed (E_REFLOW_MODEL (adapter));
}
static void
-search_started (EAddressbookModel *model,
- EAddressbookReflowAdapter *adapter)
+addressbook_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
{
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(o);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- priv->loading = TRUE;
-}
-
-static void
-search_result (EAddressbookModel *model,
- EBookViewStatus status,
- EAddressbookReflowAdapter *adapter)
-{
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- priv->loading = FALSE;
-
- e_reflow_model_comparison_changed (E_REFLOW_MODEL (adapter));
-}
-
-static void
-addressbook_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
- EAddressbookReflowAdapterPrivate *priv = adapter->priv;
-
- switch (prop_id) {
- case PROP_BOOK:
- g_object_set (priv->model,
- "book", g_value_get_object (value),
- NULL);
+ switch (arg_id){
+ case ARG_BOOK:
+ gtk_object_set (GTK_OBJECT (priv->model),
+ "book", GTK_VALUE_OBJECT (*arg),
+ NULL);
break;
- case PROP_QUERY:
- g_object_set (priv->model,
- "query", g_value_get_string (value),
- NULL);
+ case ARG_QUERY:
+ gtk_object_set (GTK_OBJECT (priv->model),
+ "query", GTK_VALUE_STRING (*arg),
+ NULL);
break;
- case PROP_EDITABLE:
- g_object_set (priv->model,
- "editable", g_value_get_boolean (value),
- NULL);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ case ARG_EDITABLE:
+ gtk_object_set (GTK_OBJECT (priv->model),
+ "editable", GTK_VALUE_BOOL (*arg),
+ NULL);
break;
}
}
static void
-addressbook_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+addressbook_get_arg (GtkObject *o, GtkArg *arg, guint arg_id)
{
- EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(object);
+ EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER(o);
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
- switch (prop_id) {
- case PROP_BOOK: {
- g_object_get_property (G_OBJECT (priv->model),
- "book", value);
+ switch (arg_id) {
+ case ARG_BOOK: {
+ EBook *book;
+ gtk_object_get (GTK_OBJECT (priv->model),
+ "book", &book,
+ NULL);
+ if (book)
+ GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(book);
+ else
+ GTK_VALUE_OBJECT (*arg) = NULL;
break;
}
- case PROP_QUERY: {
- g_object_get_property (G_OBJECT (priv->model),
- "query", value);
+ case ARG_QUERY: {
+ char *query;
+ gtk_object_get (GTK_OBJECT (priv->model),
+ "query", &query,
+ NULL);
+ GTK_VALUE_STRING (*arg) = query;
break;
}
- case PROP_EDITABLE: {
- g_object_get_property (G_OBJECT (priv->model),
- "editable", value);
+ case ARG_EDITABLE: {
+ gboolean editable;
+ gtk_object_get (GTK_OBJECT (priv->model),
+ "editable", &editable,
+ NULL);
+ GTK_VALUE_BOOL (*arg) = editable;
break;
}
- case PROP_MODEL:
- g_value_set_object (value, priv->model);
+ case ARG_MODEL:
+ if (priv->model)
+ GTK_VALUE_OBJECT (*arg) = GTK_OBJECT (priv->model);
+ else
+ GTK_VALUE_OBJECT (*arg) = NULL;
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ arg->type = GTK_TYPE_INVALID;
break;
}
}
static void
-e_addressbook_reflow_adapter_class_init (GObjectClass *object_class)
+e_addressbook_reflow_adapter_class_init (GtkObjectClass *object_class)
{
EReflowModelClass *model_class = (EReflowModelClass *) object_class;
- parent_class = g_type_class_peek_parent (object_class);
-
- object_class->set_property = addressbook_set_property;
- object_class->get_property = addressbook_get_property;
- object_class->dispose = addressbook_dispose;
-
- g_object_class_install_property (object_class, PROP_BOOK,
- g_param_spec_object ("book",
- _("Book"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_BOOK,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_QUERY,
- g_param_spec_string ("query",
- _("Query"),
- /*_( */"XXX blurb" /*)*/,
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_MODEL,
- g_param_spec_object ("model",
- _("Model"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_ADDRESSBOOK_MODEL,
- G_PARAM_READABLE));
+ parent_class = gtk_type_class (PARENT_TYPE);
+
+ object_class->set_arg = addressbook_set_arg;
+ object_class->get_arg = addressbook_get_arg;
+ object_class->finalize = addressbook_finalize;
+
+ gtk_object_add_arg_type ("EAddressbookReflowAdapter::book", GTK_TYPE_OBJECT,
+ GTK_ARG_READWRITE, ARG_BOOK);
+ gtk_object_add_arg_type ("EAddressbookReflowAdapter::query", GTK_TYPE_STRING,
+ GTK_ARG_READWRITE, ARG_QUERY);
+ gtk_object_add_arg_type ("EAddressbookReflowAdapter::editable", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_EDITABLE);
+ gtk_object_add_arg_type ("EAddressbookReflowAdapter::model", E_ADDRESSBOOK_MODEL_TYPE,
+ GTK_ARG_READABLE, ARG_MODEL);
e_addressbook_reflow_adapter_signals [DRAG_BEGIN] =
- g_signal_new ("drag_begin",
- G_OBJECT_CLASS_TYPE(object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EAddressbookReflowAdapterClass, drag_begin),
- NULL, NULL,
- e_addressbook_marshal_INT__POINTER,
- G_TYPE_INT, 1, G_TYPE_POINTER);
+ gtk_signal_new ("drag_begin",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EAddressbookReflowAdapterClass, drag_begin),
+ gtk_marshal_INT__POINTER,
+ GTK_TYPE_INT, 1, GTK_TYPE_POINTER);
+
+
+ gtk_object_class_add_signals (object_class, e_addressbook_reflow_adapter_signals, LAST_SIGNAL);
model_class->set_width = addressbook_set_width;
model_class->count = addressbook_count;
@@ -427,34 +396,30 @@ e_addressbook_reflow_adapter_init (GtkObject *object)
priv = adapter->priv = g_new0 (EAddressbookReflowAdapterPrivate, 1);
- priv->loading = FALSE;
priv->create_card_id = 0;
priv->remove_card_id = 0;
priv->modify_card_id = 0;
priv->model_changed_id = 0;
- priv->search_started_id = 0;
- priv->search_result_id = 0;
}
-GType
+GtkType
e_addressbook_reflow_adapter_get_type (void)
{
- static GType type = 0;
+ static GtkType type = 0;
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EAddressbookReflowAdapterClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_addressbook_reflow_adapter_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ if (!type){
+ GtkTypeInfo info = {
+ "EAddressbookReflowAdapter",
sizeof (EAddressbookReflowAdapter),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_addressbook_reflow_adapter_init,
+ sizeof (EAddressbookReflowAdapterClass),
+ (GtkClassInitFunc) e_addressbook_reflow_adapter_class_init,
+ (GtkObjectInitFunc) e_addressbook_reflow_adapter_init,
+ NULL, /* reserved 1 */
+ NULL, /* reserved 2 */
+ (GtkClassInitFunc) NULL
};
- type = g_type_register_static (PARENT_TYPE, "EAddressbookReflowAdapter", &info, 0);
+ type = gtk_type_unique (PARENT_TYPE, &info);
}
return type;
@@ -467,32 +432,24 @@ e_addressbook_reflow_adapter_construct (EAddressbookReflowAdapter *adapter,
EAddressbookReflowAdapterPrivate *priv = adapter->priv;
priv->model = model;
- g_object_ref (priv->model);
-
- priv->create_card_id = g_signal_connect(priv->model,
- "card_added",
- G_CALLBACK(create_card),
- adapter);
- priv->remove_card_id = g_signal_connect(priv->model,
- "card_removed",
- G_CALLBACK(remove_card),
- adapter);
- priv->modify_card_id = g_signal_connect(priv->model,
- "card_changed",
- G_CALLBACK(modify_card),
- adapter);
- priv->model_changed_id = g_signal_connect(priv->model,
- "model_changed",
- G_CALLBACK(model_changed),
+ gtk_object_ref (GTK_OBJECT (priv->model));
+
+ priv->create_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
+ "card_added",
+ GTK_SIGNAL_FUNC(create_card),
+ adapter);
+ priv->remove_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
+ "card_removed",
+ GTK_SIGNAL_FUNC(remove_card),
adapter);
- priv->search_started_id = g_signal_connect(priv->model,
- "search_started",
- G_CALLBACK(search_started),
- adapter);
- priv->search_result_id = g_signal_connect(priv->model,
- "search_result",
- G_CALLBACK(search_result),
+ priv->modify_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
+ "card_changed",
+ GTK_SIGNAL_FUNC(modify_card),
adapter);
+ priv->model_changed_id = gtk_signal_connect(GTK_OBJECT(priv->model),
+ "model_changed",
+ GTK_SIGNAL_FUNC(model_changed),
+ adapter);
}
EReflowModel *
@@ -500,7 +457,7 @@ e_addressbook_reflow_adapter_new (EAddressbookModel *model)
{
EAddressbookReflowAdapter *et;
- et = g_object_new (E_TYPE_ADDRESSBOOK_REFLOW_ADAPTER, NULL);
+ et = gtk_type_new (e_addressbook_reflow_adapter_get_type ());
e_addressbook_reflow_adapter_construct (et, model);
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c
index 3680af259c..55d20af199 100644
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c
@@ -5,10 +5,9 @@
#include "e-addressbook-table-adapter.h"
#include "e-card-merging.h"
#include "e-addressbook-util.h"
-#include "ebook/e-destination.h"
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-#include <libxml/xmlmemory.h>
+#include <gnome-xml/tree.h>
+#include <gnome-xml/parser.h>
+#include <gnome-xml/xmlmemory.h>
#include <gnome.h>
struct _EAddressbookTableAdapterPrivate {
@@ -21,7 +20,7 @@ struct _EAddressbookTableAdapterPrivate {
};
#define PARENT_TYPE e_table_model_get_type()
-static ETableModelClass *parent_class;
+ETableModelClass *parent_class;
#define COLS (E_CARD_SIMPLE_FIELD_LAST)
@@ -31,14 +30,14 @@ unlink_model(EAddressbookTableAdapter *adapter)
EAddressbookTableAdapterPrivate *priv = adapter->priv;
int i;
- g_signal_handler_disconnect (priv->model,
- priv->create_card_id);
- g_signal_handler_disconnect (priv->model,
- priv->remove_card_id);
- g_signal_handler_disconnect (priv->model,
- priv->modify_card_id);
- g_signal_handler_disconnect (priv->model,
- priv->model_changed_id);
+ gtk_signal_disconnect(GTK_OBJECT (priv->model),
+ priv->create_card_id);
+ gtk_signal_disconnect(GTK_OBJECT (priv->model),
+ priv->remove_card_id);
+ gtk_signal_disconnect(GTK_OBJECT (priv->model),
+ priv->modify_card_id);
+ gtk_signal_disconnect(GTK_OBJECT (priv->model),
+ priv->model_changed_id);
priv->create_card_id = 0;
priv->remove_card_id = 0;
@@ -48,12 +47,12 @@ unlink_model(EAddressbookTableAdapter *adapter)
/* free up the existing mapping if there is one */
if (priv->simples) {
for (i = 0; i < priv->count; i ++)
- g_object_unref (priv->simples[i]);
+ gtk_object_unref (GTK_OBJECT (priv->simples[i]));
g_free (priv->simples);
priv->simples = NULL;
}
- g_object_unref (priv->model);
+ gtk_object_unref(GTK_OBJECT(priv->model));
priv->model = NULL;
}
@@ -67,7 +66,7 @@ build_simple_mapping(EAddressbookTableAdapter *adapter)
/* free up the existing mapping if there is one */
if (priv->simples) {
for (i = 0; i < priv->count; i ++)
- g_object_unref (priv->simples[i]);
+ gtk_object_unref (GTK_OBJECT (priv->simples[i]));
g_free (priv->simples);
}
@@ -76,7 +75,7 @@ build_simple_mapping(EAddressbookTableAdapter *adapter)
priv->simples = g_new (ECardSimple*, priv->count);
for (i = 0; i < priv->count; i ++) {
priv->simples[i] = e_card_simple_new (e_addressbook_model_card_at (priv->model, i));
- g_object_ref (priv->simples[i]);
+ gtk_object_ref (GTK_OBJECT (priv->simples[i]));
}
}
@@ -124,8 +123,8 @@ addressbook_value_at (ETableModel *etc, int col, int row)
EDestination *dest = e_destination_import (value);
if (dest) {
/* XXX blech, we leak this */
- value = g_strdup (e_destination_get_textrep (dest, TRUE));
- g_object_unref (dest);
+ value = g_strdup (e_destination_get_address (dest));
+ gtk_object_unref (GTK_OBJECT (dest));
}
}
@@ -138,6 +137,7 @@ static void
card_modified_cb (EBook* book, EBookStatus status,
gpointer user_data)
{
+ /* g_print ("%s: %s(): a card was modified\n", __FILE__, __FUNCTION__); */
if (status != E_BOOK_STATUS_SUCCESS)
e_addressbook_error_dialog (_("Error modifying card"), status);
}
@@ -157,9 +157,9 @@ addressbook_set_value_at (ETableModel *etc, int col, int row, const void *val)
e_card_simple_set(priv->simples[row],
col,
val);
- g_object_get(priv->simples[row],
- "card", &card,
- NULL);
+ gtk_object_get(GTK_OBJECT(priv->simples[row]),
+ "card", &card,
+ NULL);
e_card_merging_book_commit_card(e_addressbook_model_get_ebook(priv->model),
card, card_modified_cb, NULL);
@@ -210,8 +210,8 @@ addressbook_append_row (ETableModel *etm, ETableModel *source, gint row)
}
e_card_simple_sync_card(simple);
e_card_merging_book_add_card (e_addressbook_model_get_ebook (priv->model), card, NULL, NULL);
- g_object_unref (simple);
- g_object_unref (card);
+ gtk_object_unref(GTK_OBJECT(simple));
+ gtk_object_unref(GTK_OBJECT(card));
}
/* This function duplicates the value passed to it. */
@@ -251,7 +251,7 @@ e_addressbook_table_adapter_class_init (GtkObjectClass *object_class)
{
ETableModelClass *model_class = (ETableModelClass *) object_class;
- parent_class = g_type_class_peek_parent (object_class);
+ parent_class = gtk_type_class (PARENT_TYPE);
object_class->destroy = addressbook_destroy;
@@ -313,7 +313,7 @@ remove_card (EAddressbookModel *model,
e_table_model_pre_change (E_TABLE_MODEL (adapter));
- g_object_unref (priv->simples[index]);
+ gtk_object_unref (GTK_OBJECT (priv->simples[index]));
memmove (priv->simples + index, priv->simples + index + 1, (priv->count - index - 1) * sizeof (ECardSimple *));
priv->count --;
e_table_model_rows_deleted (E_TABLE_MODEL (adapter), index, 1);
@@ -328,9 +328,9 @@ modify_card (EAddressbookModel *model,
e_table_model_pre_change (E_TABLE_MODEL (adapter));
- g_object_unref (priv->simples[index]);
+ gtk_object_unref (GTK_OBJECT (priv->simples[index]));
priv->simples[index] = e_card_simple_new (e_addressbook_model_card_at (priv->model, index));
- g_object_ref (priv->simples[index]);
+ gtk_object_ref (GTK_OBJECT (priv->simples[index]));
e_table_model_row_changed (E_TABLE_MODEL (adapter), index);
}
@@ -343,25 +343,24 @@ model_changed (EAddressbookModel *model,
e_table_model_changed (E_TABLE_MODEL (adapter));
}
-GType
+GtkType
e_addressbook_table_adapter_get_type (void)
{
- static GType type = 0;
+ static GtkType type = 0;
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EAddressbookTableAdapterClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_addressbook_table_adapter_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
+ if (!type){
+ GtkTypeInfo info = {
+ "EAddressbookTableAdapter",
sizeof (EAddressbookTableAdapter),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_addressbook_table_adapter_init,
+ sizeof (EAddressbookTableAdapterClass),
+ (GtkClassInitFunc) e_addressbook_table_adapter_class_init,
+ (GtkObjectInitFunc) e_addressbook_table_adapter_init,
+ NULL, /* reserved 1 */
+ NULL, /* reserved 2 */
+ (GtkClassInitFunc) NULL
};
- type = g_type_register_static (PARENT_TYPE, "EAddressbookTableAdapter", &info, 0);
+ type = gtk_type_unique (PARENT_TYPE, &info);
}
return type;
@@ -374,24 +373,24 @@ e_addressbook_table_adapter_construct (EAddressbookTableAdapter *adapter,
EAddressbookTableAdapterPrivate *priv = adapter->priv;
priv->model = model;
- g_object_ref (priv->model);
-
- priv->create_card_id = g_signal_connect(priv->model,
- "card_added",
- G_CALLBACK(create_card),
- adapter);
- priv->remove_card_id = g_signal_connect(priv->model,
- "card_removed",
- G_CALLBACK(remove_card),
- adapter);
- priv->modify_card_id = g_signal_connect(priv->model,
- "card_changed",
- G_CALLBACK(modify_card),
- adapter);
- priv->model_changed_id = g_signal_connect(priv->model,
- "model_changed",
- G_CALLBACK(model_changed),
+ gtk_object_ref (GTK_OBJECT (priv->model));
+
+ priv->create_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
+ "card_added",
+ GTK_SIGNAL_FUNC(create_card),
+ adapter);
+ priv->remove_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
+ "card_removed",
+ GTK_SIGNAL_FUNC(remove_card),
+ adapter);
+ priv->modify_card_id = gtk_signal_connect(GTK_OBJECT(priv->model),
+ "card_changed",
+ GTK_SIGNAL_FUNC(modify_card),
adapter);
+ priv->model_changed_id = gtk_signal_connect(GTK_OBJECT(priv->model),
+ "model_changed",
+ GTK_SIGNAL_FUNC(model_changed),
+ adapter);
build_simple_mapping (adapter);
}
@@ -401,7 +400,7 @@ e_addressbook_table_adapter_new (EAddressbookModel *model)
{
EAddressbookTableAdapter *et;
- et = g_object_new(E_TYPE_ADDRESSBOOK_TABLE_ADAPTER, NULL);
+ et = gtk_type_new (e_addressbook_table_adapter_get_type ());
e_addressbook_table_adapter_construct (et, model);
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 8bebb4cdb0..98fe4c4e05 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -20,34 +20,32 @@
*/
#include <config.h>
-#include <string.h>
#include <glib.h>
#include <gtk/gtkdnd.h>
-#include <gtk/gtkmain.h>
#include <gdk/gdkkeysyms.h>
+#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
-#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
-#include <libgnomecanvas/gnome-canvas-pixbuf.h>
+#include <libgnomeui/gnome-canvas-rect-ellipse.h>
+#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
#include <gal/e-text/e-text.h>
#include <gal/util/e-util.h>
#include <gal/widgets/e-canvas-utils.h>
#include <gal/widgets/e-canvas.h>
+#include <gal/unicode/gunicode.h>
#include "addressbook/backend/ebook/e-book.h"
-#include "e-addressbook-marshal.h"
#include "e-addressbook-util.h"
#include "e-minicard.h"
#include "e-minicard-label.h"
#include "e-minicard-view.h"
#include "e-contact-editor.h"
#include "e-card-merging.h"
-#include "ebook/e-destination.h"
static void e_minicard_init (EMinicard *card);
static void e_minicard_class_init (EMinicardClass *klass);
-static void e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_minicard_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-static void e_minicard_dispose (GObject *object);
-static void e_minicard_finalize (GObject *object);
+static void e_minicard_set_arg (GtkObject *o, GtkArg *arg, guint arg_id);
+static void e_minicard_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);
+static void e_minicard_destroy (GtkObject *object);
+static void e_minicard_finalize (GtkObject *object);
static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event);
static void e_minicard_realize (GnomeCanvasItem *item);
static void e_minicard_unrealize (GnomeCanvasItem *item);
@@ -82,14 +80,14 @@ e_minicard_field_destroy(EMinicardField *field)
/* The arguments we take */
enum {
- PROP_0,
- PROP_WIDTH,
- PROP_HEIGHT,
- PROP_HAS_FOCUS,
- PROP_SELECTED,
- PROP_HAS_CURSOR,
- PROP_EDITABLE,
- PROP_CARD
+ ARG_0,
+ ARG_WIDTH,
+ ARG_HEIGHT,
+ ARG_HAS_FOCUS,
+ ARG_SELECTED,
+ ARG_HAS_CURSOR,
+ ARG_EDITABLE,
+ ARG_CARD
};
enum {
@@ -100,112 +98,80 @@ enum {
static guint e_minicard_signals [LAST_SIGNAL] = {0, };
-GType
+GtkType
e_minicard_get_type (void)
{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (EMinicardClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_minicard_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EMinicard),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_minicard_init,
- };
-
- type = g_type_register_static (gnome_canvas_group_get_type (), "EMinicard", &info, 0);
- }
+ static GtkType minicard_type = 0;
+
+ if (!minicard_type)
+ {
+ static const GtkTypeInfo minicard_info =
+ {
+ "EMinicard",
+ sizeof (EMinicard),
+ sizeof (EMinicardClass),
+ (GtkClassInitFunc) e_minicard_class_init,
+ (GtkObjectInitFunc) e_minicard_init,
+ /* reserved_1 */ NULL,
+ /* reserved_2 */ NULL,
+ (GtkClassInitFunc) NULL,
+ };
+
+ minicard_type = gtk_type_unique (gnome_canvas_group_get_type (), &minicard_info);
+ }
- return type;
+ return minicard_type;
}
static void
e_minicard_class_init (EMinicardClass *klass)
{
- GObjectClass *object_class = (GObjectClass*) klass;
- GnomeCanvasItemClass *item_class = (GnomeCanvasItemClass *) klass;
+ GtkObjectClass *object_class;
+ GnomeCanvasItemClass *item_class;
- object_class->set_property = e_minicard_set_property;
- object_class->get_property = e_minicard_get_property;
- object_class->dispose = e_minicard_dispose;
- object_class->finalize = e_minicard_finalize;
+ object_class = (GtkObjectClass*) klass;
+ item_class = (GnomeCanvasItemClass *) klass;
parent_class = gtk_type_class (gnome_canvas_group_get_type ());
-
- g_object_class_install_property (object_class, PROP_WIDTH,
- g_param_spec_double ("width",
- _("Width"),
- /*_( */"XXX blurb" /*)*/,
- 0.0, G_MAXDOUBLE, 10.0,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_HEIGHT,
- g_param_spec_double ("height",
- _("Height"),
- /*_( */"XXX blurb" /*)*/,
- 0.0, G_MAXDOUBLE, 10.0,
- G_PARAM_READABLE));
-
- g_object_class_install_property (object_class, PROP_HAS_FOCUS,
- /* XXX should be _enum */
- g_param_spec_int ("has_focus",
- _("Has Focus"),
- /*_( */"XXX blurb" /*)*/,
- E_MINICARD_FOCUS_TYPE_START, E_MINICARD_FOCUS_TYPE_END,
- E_MINICARD_FOCUS_TYPE_START,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_SELECTED,
- g_param_spec_boolean ("selected",
- _("Selected"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_HAS_CURSOR,
- g_param_spec_boolean ("has_cursor",
- _("Has Cursor"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_EDITABLE,
- g_param_spec_boolean ("editable",
- _("Editable"),
- /*_( */"XXX blurb" /*)*/,
- FALSE,
- G_PARAM_READWRITE));
-
- g_object_class_install_property (object_class, PROP_CARD,
- g_param_spec_object ("card",
- _("Card"),
- /*_( */"XXX blurb" /*)*/,
- E_TYPE_CARD,
- G_PARAM_READWRITE));
+ gtk_object_add_arg_type ("EMinicard::width", GTK_TYPE_DOUBLE,
+ GTK_ARG_READWRITE, ARG_WIDTH);
+ gtk_object_add_arg_type ("EMinicard::height", GTK_TYPE_DOUBLE,
+ GTK_ARG_READABLE, ARG_HEIGHT);
+ gtk_object_add_arg_type ("EMinicard::has_focus", GTK_TYPE_ENUM,
+ GTK_ARG_READWRITE, ARG_HAS_FOCUS);
+ gtk_object_add_arg_type ("EMinicard::selected", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_SELECTED);
+ gtk_object_add_arg_type ("EMinicard::has_cursor", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_HAS_CURSOR);
+ gtk_object_add_arg_type ("EMinicard::editable", GTK_TYPE_BOOL,
+ GTK_ARG_READWRITE, ARG_EDITABLE);
+ gtk_object_add_arg_type ("EMinicard::card", GTK_TYPE_OBJECT,
+ GTK_ARG_READWRITE, ARG_CARD);
+
e_minicard_signals [SELECTED] =
- g_signal_new ("selected",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMinicardClass, selected),
- NULL, NULL,
- e_addressbook_marshal_INT__POINTER,
- G_TYPE_INT, 1, G_TYPE_POINTER);
+ gtk_signal_new ("selected",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EMinicardClass, selected),
+ gtk_marshal_INT__POINTER,
+ GTK_TYPE_INT, 1, GTK_TYPE_POINTER);
e_minicard_signals [DRAG_BEGIN] =
- g_signal_new ("drag_begin",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EMinicardClass, drag_begin),
- NULL, NULL,
- e_addressbook_marshal_INT__POINTER,
- G_TYPE_INT, 1, G_TYPE_POINTER);
-
+ gtk_signal_new ("drag_begin",
+ GTK_RUN_LAST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EMinicardClass, drag_begin),
+ gtk_marshal_INT__POINTER,
+ GTK_TYPE_INT, 1, GTK_TYPE_POINTER);
+
+ gtk_object_class_add_signals (object_class, e_minicard_signals, LAST_SIGNAL);
+
+ object_class->set_arg = e_minicard_set_arg;
+ object_class->get_arg = e_minicard_get_arg;
+ object_class->destroy = e_minicard_destroy;
+ object_class->finalize = e_minicard_finalize;
+
/* GnomeCanvasItem method overrides */
item_class->realize = e_minicard_realize;
item_class->unrealize = e_minicard_unrealize;
@@ -230,7 +196,7 @@ e_minicard_init (EMinicard *minicard)
minicard->card = NULL;
minicard->simple = e_card_simple_new(NULL);
- minicard->list_icon_pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" LIST_ICON_FILENAME, NULL);
+ minicard->list_icon_pixbuf = gdk_pixbuf_new_from_file (EVOLUTION_IMAGESDIR "/" LIST_ICON_FILENAME);
minicard->list_icon_size = gdk_pixbuf_get_height (minicard->list_icon_pixbuf);
minicard->editor = NULL;
@@ -278,34 +244,34 @@ set_has_cursor (EMinicard *minicard, gboolean has_cursor)
static void
-e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+e_minicard_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
{
GnomeCanvasItem *item;
EMinicard *e_minicard;
GList *l;
- item = GNOME_CANVAS_ITEM (object);
- e_minicard = E_MINICARD (object);
+ item = GNOME_CANVAS_ITEM (o);
+ e_minicard = E_MINICARD (o);
- switch (prop_id){
- case PROP_WIDTH:
- if (e_minicard->width != g_value_get_double (value)) {
- e_minicard->width = g_value_get_double (value);
+ switch (arg_id){
+ case ARG_WIDTH:
+ if (e_minicard->width != GTK_VALUE_DOUBLE (*arg)) {
+ e_minicard->width = GTK_VALUE_DOUBLE (*arg);
e_minicard_resize_children(e_minicard);
if ( GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED )
e_canvas_item_request_reflow(item);
}
break;
- case PROP_HAS_FOCUS:
+ case ARG_HAS_FOCUS:
if (e_minicard->fields) {
- if ( g_value_get_int(value) == E_FOCUS_START ||
- g_value_get_int(value) == E_FOCUS_CURRENT) {
+ if ( GTK_VALUE_ENUM(*arg) == E_FOCUS_START ||
+ GTK_VALUE_ENUM(*arg) == E_FOCUS_CURRENT) {
gnome_canvas_item_set(E_MINICARD_FIELD(e_minicard->fields->data)->label,
- "has_focus", g_value_get_int (value),
+ "has_focus", GTK_VALUE_ENUM(*arg),
NULL);
- } else if ( g_value_get_int (value) == E_FOCUS_END ) {
+ } else if ( GTK_VALUE_ENUM(*arg) == E_FOCUS_END ) {
gnome_canvas_item_set(E_MINICARD_FIELD(g_list_last(e_minicard->fields)->data)->label,
- "has_focus", g_value_get_int (value),
+ "has_focus", GTK_VALUE_ENUM(*arg),
NULL);
}
}
@@ -314,79 +280,76 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G
e_canvas_item_grab_focus(item, FALSE);
}
break;
- case PROP_SELECTED:
- if (e_minicard->selected != g_value_get_boolean (value))
- set_selected (e_minicard, g_value_get_boolean (value));
+ case ARG_SELECTED:
+ if (e_minicard->selected != GTK_VALUE_BOOL(*arg))
+ set_selected (e_minicard, GTK_VALUE_BOOL(*arg));
break;
- case PROP_EDITABLE:
- e_minicard->editable = g_value_get_boolean (value);
+ case ARG_EDITABLE:
+ e_minicard->editable = GTK_VALUE_BOOL(*arg);
for (l = e_minicard->fields; l; l = l->next)
- g_object_set (E_MINICARD_FIELD (l->data)->label,
- "editable", e_minicard->editable,
- NULL);
+ gtk_object_set (GTK_OBJECT (E_MINICARD_FIELD (l->data)->label),
+ "editable", e_minicard->editable,
+ NULL);
break;
- case PROP_HAS_CURSOR:
- d(g_print("%s: PROP_HAS_CURSOR\n", G_GNUC_FUNCTION));
- if (e_minicard->has_cursor != g_value_get_boolean (value))
- set_has_cursor (e_minicard, g_value_get_boolean (value));
+ case ARG_HAS_CURSOR:
+ d(g_print("%s: ARG_HAS_CURSOR\n", __FUNCTION__));
+ if (e_minicard->has_cursor != GTK_VALUE_BOOL(*arg))
+ set_has_cursor (e_minicard, GTK_VALUE_BOOL(*arg));
break;
- case PROP_CARD:
+ case ARG_CARD:
if (e_minicard->card)
- g_object_unref (e_minicard->card);
- e_minicard->card = E_CARD(g_value_get_object (value));
+ gtk_object_unref (GTK_OBJECT(e_minicard->card));
+ e_minicard->card = E_CARD(GTK_VALUE_OBJECT (*arg));
if (e_minicard->card)
- g_object_ref (e_minicard->card);
- g_object_set(e_minicard->simple,
- "card", e_minicard->card,
- NULL);
+ gtk_object_ref (GTK_OBJECT(e_minicard->card));
+ gtk_object_set(GTK_OBJECT(e_minicard->simple),
+ "card", e_minicard->card,
+ NULL);
remodel(e_minicard);
e_canvas_item_request_reflow(item);
e_minicard->changed = FALSE;
break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
}
}
static void
-e_minicard_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+e_minicard_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
{
EMinicard *e_minicard;
e_minicard = E_MINICARD (object);
- switch (prop_id) {
- case PROP_WIDTH:
- g_value_set_double (value, e_minicard->width);
- break;
- case PROP_HEIGHT:
- g_value_set_double (value, e_minicard->height);
- break;
- case PROP_HAS_FOCUS:
- g_value_set_int (value, e_minicard->has_focus ? E_FOCUS_CURRENT : E_FOCUS_NONE);
+ switch (arg_id) {
+ case ARG_WIDTH:
+ GTK_VALUE_DOUBLE (*arg) = e_minicard->width;
+ break;
+ case ARG_HEIGHT:
+ GTK_VALUE_DOUBLE (*arg) = e_minicard->height;
+ break;
+ case ARG_HAS_FOCUS:
+ GTK_VALUE_ENUM (*arg) = e_minicard->has_focus ? E_FOCUS_CURRENT : E_FOCUS_NONE;
break;
- case PROP_SELECTED:
- g_value_set_boolean (value, e_minicard->selected);
+ case ARG_SELECTED:
+ GTK_VALUE_BOOL (*arg) = e_minicard->selected;
break;
- case PROP_HAS_CURSOR:
- g_value_set_boolean (value, e_minicard->has_cursor);
+ case ARG_HAS_CURSOR:
+ GTK_VALUE_BOOL (*arg) = e_minicard->has_cursor;
break;
- case PROP_EDITABLE:
- g_value_set_boolean (value, e_minicard->editable);
+ case ARG_EDITABLE:
+ GTK_VALUE_BOOL (*arg) = e_minicard->editable;
break;
- case PROP_CARD:
+ case ARG_CARD:
e_card_simple_sync_card(e_minicard->simple);
- g_value_set_object (value, e_minicard->card);
+ GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(e_minicard->card);
break;
default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
+ arg->type = GTK_TYPE_INVALID;
+ break;
}
}
static void
-e_minicard_dispose (GObject *object)
+e_minicard_destroy (GtkObject *object)
{
EMinicard *e_minicard;
@@ -395,25 +358,19 @@ e_minicard_dispose (GObject *object)
e_minicard = E_MINICARD (object);
- if (e_minicard->fields) {
- g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL);
- g_list_free(e_minicard->fields);
- e_minicard->fields = NULL;
- }
+ g_list_foreach(e_minicard->fields, (GFunc) e_minicard_field_destroy, NULL);
+ g_list_free(e_minicard->fields);
- if (e_minicard->list_icon_pixbuf) {
- gdk_pixbuf_unref (e_minicard->list_icon_pixbuf);
- e_minicard->list_icon_pixbuf = NULL;
- }
+ gdk_pixbuf_unref (e_minicard->list_icon_pixbuf);
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+ if (GTK_OBJECT_CLASS (parent_class)->destroy)
+ (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
static void
-e_minicard_finalize (GObject *object)
+e_minicard_finalize (GtkObject *object)
{
EMinicard *e_minicard;
@@ -423,12 +380,12 @@ e_minicard_finalize (GObject *object)
e_minicard = E_MINICARD (object);
if (e_minicard->card)
- g_object_unref (e_minicard->card);
+ gtk_object_unref (GTK_OBJECT(e_minicard->card));
if (e_minicard->simple)
- g_object_unref (e_minicard->simple);
+ gtk_object_unref (GTK_OBJECT(e_minicard->simple));
- if (G_OBJECT_CLASS (parent_class)->finalize)
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
+ if (GTK_OBJECT_CLASS (parent_class)->finalize)
+ (* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
}
static void
@@ -450,8 +407,8 @@ e_minicard_realize (GnomeCanvasItem *item)
gnome_canvas_rect_get_type(),
"x1", (double) 0,
"y1", (double) 0,
- "x2", (double) MAX (e_minicard->width - 1, 0),
- "y2", (double) MAX (e_minicard->height - 1, 0),
+ "x2", (double) e_minicard->width - 1,
+ "y2", (double) e_minicard->height - 1,
"outline_color", NULL,
NULL );
@@ -460,8 +417,8 @@ e_minicard_realize (GnomeCanvasItem *item)
gnome_canvas_rect_get_type(),
"x1", (double) 2,
"y1", (double) 2,
- "x2", (double) MAX (e_minicard->width - 3, 0),
- "y2", (double) MAX (e_minicard->height - 3, 0),
+ "x2", (double) e_minicard->width - 3,
+ "y2", (double) e_minicard->height - 3,
"fill_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL],
NULL );
@@ -469,9 +426,12 @@ e_minicard_realize (GnomeCanvasItem *item)
gnome_canvas_item_new( group,
e_text_get_type(),
"anchor", GTK_ANCHOR_NW,
- "width", (double) MAX( e_minicard->width - 12, 0 ),
+ "width", (double) ( e_minicard->width - 12 ),
"clip", TRUE,
"use_ellipsis", TRUE,
+#if 0
+ "font", "fixed-bold-10",
+#endif
"fill_color_gdk", &canvas->style->fg[GTK_STATE_NORMAL],
"text", "",
"draw_background", FALSE,
@@ -510,7 +470,7 @@ e_minicard_unrealize (GnomeCanvasItem *item)
static void
card_modified_cb (EBook* book, EBookStatus status, gpointer user_data)
{
- d(g_print ("%s: %s(): a card was modified\n", __FILE__, G_GNUC_FUNCTION));
+ d(g_print ("%s: %s(): a card was modified\n", __FILE__, __FUNCTION__));
if (status != E_BOOK_STATUS_SUCCESS)
e_addressbook_error_dialog (_("Error modifying card"), status);
}
@@ -520,7 +480,7 @@ static void
editor_closed_cb (GtkObject *editor, gpointer data)
{
EMinicard *minicard = data;
- g_object_unref (editor);
+ gtk_object_unref (GTK_OBJECT (editor));
minicard->editor = NULL;
}
@@ -532,12 +492,12 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
e_minicard = E_MINICARD (item);
canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (item)->canvas);
-
+
switch( event->type ) {
case GDK_FOCUS_CHANGE:
{
GdkEventFocus *focus_event = (GdkEventFocus *) event;
- d(g_print("%s: GDK_FOCUS_CHANGE: %s\n", G_GNUC_FUNCTION, focus_event->in?"in":"out"));
+ d(g_print("%s: GDK_FOCUS_CHANGE: %s\n", __FUNCTION__, focus_event->in?"in":"out"));
if (focus_event->in) {
/* Chris: When EMinicard gets the cursor, if it doesn't have the focus, it should take it. */
e_minicard->has_focus = TRUE;
@@ -553,9 +513,9 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
if (E_IS_MINICARD_VIEW(GNOME_CANVAS_ITEM(e_minicard)->parent)) {
- g_object_get(GNOME_CANVAS_ITEM(e_minicard)->parent,
- "book", &book,
- NULL);
+ gtk_object_get(GTK_OBJECT(GNOME_CANVAS_ITEM(e_minicard)->parent),
+ "book", &book,
+ NULL);
}
@@ -641,26 +601,26 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
} else {
EBook *book = NULL;
if (E_IS_MINICARD_VIEW(item->parent)) {
- g_object_get(item->parent,
- "book", &book,
- NULL);
+ gtk_object_get(GTK_OBJECT(item->parent),
+ "book", &book,
+ NULL);
}
if (book != NULL) {
if (e_card_evolution_list (e_minicard->card)) {
EContactListEditor *editor = e_addressbook_show_contact_list_editor (book, e_minicard->card,
FALSE, e_minicard->editable);
- e_minicard->editor = G_OBJECT (editor);
+ e_minicard->editor = GTK_OBJECT (editor);
}
else {
EContactEditor *editor = e_addressbook_show_contact_editor (book, e_minicard->card,
FALSE, e_minicard->editable);
- e_minicard->editor = G_OBJECT (editor);
+ e_minicard->editor = GTK_OBJECT (editor);
}
- g_object_ref (e_minicard->editor);
+ gtk_object_ref (e_minicard->editor);
- g_signal_connect (e_minicard->editor, "editor_closed",
- G_CALLBACK (editor_closed_cb), e_minicard);
+ gtk_signal_connect (e_minicard->editor, "editor_closed",
+ GTK_SIGNAL_FUNC (editor_closed_cb), e_minicard);
}
}
@@ -676,9 +636,9 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
EMinicardField *field = E_MINICARD_FIELD(list->data);
GnomeCanvasItem *item = field->label;
EFocus has_focus;
- g_object_get(item,
- "has_focus", &has_focus,
- NULL);
+ gtk_object_get(GTK_OBJECT(item),
+ "has_focus", &has_focus,
+ NULL);
if (has_focus != E_FOCUS_NONE) {
if (event->key.state & GDK_SHIFT_MASK)
list = list->prev;
@@ -739,11 +699,11 @@ field_changed (EText *text, EMinicard *e_minicard)
gboolean is_list = FALSE;
type = GPOINTER_TO_INT
- (g_object_get_data(G_OBJECT(text),
- "EMinicard:field"));
- g_object_get(text,
- "text", &string,
- NULL);
+ (gtk_object_get_data(GTK_OBJECT(text),
+ "EMinicard:field"));
+ gtk_object_get(GTK_OBJECT(text),
+ "text", &string,
+ NULL);
/*
* If the card is coresponding with a contact list and the field be
@@ -764,7 +724,7 @@ field_changed (EText *text, EMinicard *e_minicard)
new_string = e_destination_export(dest);
g_free(string);
string=new_string;
- g_object_unref (dest);
+ gtk_object_unref (GTK_OBJECT (dest));
}
}
}
@@ -803,10 +763,10 @@ add_field (EMinicard *e_minicard, ECardSimpleField field, gdouble left_width)
if (!strncmp (string, "<?xml", 5)) {
EDestination *dest = e_destination_import (string);
if (dest != NULL) {
- gchar *new_string = g_strdup (e_destination_get_textrep (dest, TRUE));
+ gchar *new_string = g_strdup (e_destination_get_address (dest));
g_free (string);
string = new_string;
- g_object_unref (dest);
+ gtk_object_unref (GTK_OBJECT (dest));
}
}
@@ -818,16 +778,16 @@ add_field (EMinicard *e_minicard, ECardSimpleField field, gdouble left_width)
"max_field_name_length", left_width,
"editable", e_minicard->editable,
NULL );
- g_signal_connect(E_MINICARD_LABEL(new_item)->field,
- "changed", G_CALLBACK (field_changed), e_minicard);
- g_signal_connect(E_MINICARD_LABEL(new_item)->field,
- "activate", G_CALLBACK (field_activated), e_minicard);
- g_object_set(E_MINICARD_LABEL(new_item)->field,
- "allow_newlines", e_card_simple_get_allow_newlines (e_minicard->simple, field),
- NULL);
- g_object_set_data(G_OBJECT (E_MINICARD_LABEL(new_item)->field),
- "EMinicard:field",
- GINT_TO_POINTER(field));
+ gtk_signal_connect(GTK_OBJECT(E_MINICARD_LABEL(new_item)->field),
+ "changed", GTK_SIGNAL_FUNC(field_changed), e_minicard);
+ gtk_signal_connect(GTK_OBJECT(E_MINICARD_LABEL(new_item)->field),
+ "activate", GTK_SIGNAL_FUNC(field_activated), e_minicard);
+ gtk_object_set(GTK_OBJECT(E_MINICARD_LABEL(new_item)->field),
+ "allow_newlines", e_card_simple_get_allow_newlines (e_minicard->simple, field),
+ NULL);
+ gtk_object_set_data(GTK_OBJECT(E_MINICARD_LABEL(new_item)->field),
+ "EMinicard:field",
+ GINT_TO_POINTER(field));
minicard_field = g_new(EMinicardField, 1);
minicard_field->field = field;
@@ -839,25 +799,24 @@ add_field (EMinicard *e_minicard, ECardSimpleField field, gdouble left_width)
g_free(string);
}
-static int
+static gdouble
get_left_width(EMinicard *e_minicard)
{
gchar *name;
ECardSimpleField field;
- int width = -1;
- PangoLayout *layout;
+ gdouble width = -1;
+ GdkFont *font;
+
+ font = ((GtkWidget *) ((GnomeCanvasItem *) e_minicard)->canvas)->style->font;
- layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (e_minicard)->canvas), "");
for(field = E_CARD_SIMPLE_FIELD_FULL_NAME; field != E_CARD_SIMPLE_FIELD_LAST; field++) {
- int this_width;
+ gdouble this_width;
name = g_strdup_printf("%s:", e_card_simple_get_name(e_minicard->simple, field));
- pango_layout_set_text (layout, name, -1);
- pango_layout_get_pixel_size (layout, &this_width, NULL);
+ this_width = gdk_text_width(font, name, strlen(name));
if (width < this_width)
width = this_width;
g_free(name);
}
- g_object_unref (layout);
return width;
}
@@ -871,7 +830,7 @@ remodel( EMinicard *e_minicard )
ECardSimpleField field;
GList *list;
char *file_as;
- int left_width = -1;
+ gdouble left_width = -1;
if (e_minicard->header_text) {
file_as = e_card_simple_get(e_minicard->simple, E_CARD_SIMPLE_FIELD_FILE_AS);
@@ -906,17 +865,17 @@ remodel( EMinicard *e_minicard )
if (!strncmp (string, "<?xml", 4)) {
EDestination *dest = e_destination_import (string);
if (dest != NULL) {
- gchar *new_string = g_strdup (e_destination_get_textrep (dest, TRUE));
+ gchar *new_string = g_strdup (e_destination_get_address (dest));
g_free (string);
string = new_string;
- g_object_unref (dest);
+ gtk_object_unref (GTK_OBJECT (dest));
}
}
e_minicard->fields = g_list_append(e_minicard->fields, minicard_field);
- g_object_set(minicard_field->label,
- "field", string,
- NULL);
+ gtk_object_set(GTK_OBJECT(minicard_field->label),
+ "field", string,
+ NULL);
count ++;
} else {
e_minicard_field_destroy(minicard_field);
@@ -955,9 +914,9 @@ e_minicard_reflow( GnomeCanvasItem *item, int flags )
old_height = e_minicard->height;
- g_object_get( e_minicard->header_text,
- "text_height", &text_height,
- NULL );
+ gtk_object_get( GTK_OBJECT( e_minicard->header_text ),
+ "text_height", &text_height,
+ NULL );
e_minicard->height = text_height + 10.0;
@@ -968,15 +927,19 @@ e_minicard_reflow( GnomeCanvasItem *item, int flags )
for(list = e_minicard->fields; list; list = g_list_next(list)) {
EMinicardField *field = E_MINICARD_FIELD(list->data);
GnomeCanvasItem *item = field->label;
- g_object_get (item,
- "height", &text_height,
- NULL);
+ gtk_object_get (GTK_OBJECT(item),
+ "height", &text_height,
+ NULL);
e_canvas_item_move_absolute(item, 2, e_minicard->height);
e_minicard->height += text_height;
}
e_minicard->height += 2;
gnome_canvas_item_set( e_minicard->rect,
+ "y2", (double) e_minicard->height - 1,
+ NULL );
+
+ gnome_canvas_item_set( e_minicard->rect,
"x2", (double) e_minicard->width - 1.0,
"y2", (double) e_minicard->height - 1.0,
NULL );
@@ -1012,12 +975,12 @@ e_minicard_compare (EMinicard *minicard1, EMinicard *minicard2)
if (minicard1->card && minicard2->card) {
char *file_as1, *file_as2;
- g_object_get(minicard1->card,
- "file_as", &file_as1,
- NULL);
- g_object_get(minicard2->card,
- "file_as", &file_as2,
- NULL);
+ gtk_object_get(GTK_OBJECT(minicard1->card),
+ "file_as", &file_as1,
+ NULL);
+ gtk_object_get(GTK_OBJECT(minicard2->card),
+ "file_as", &file_as2,
+ NULL);
if (file_as1 && file_as2)
return g_utf8_collate(file_as1, file_as2);
if (file_as1)
@@ -1036,15 +999,15 @@ e_minicard_selected (EMinicard *minicard, GdkEvent *event)
gint ret_val = 0;
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (minicard);
if (item->parent) {
- guint signal_id = g_signal_lookup ("selection_event", G_OBJECT_TYPE (item->parent));
+ guint signal_id = gtk_signal_lookup ("selection_event", GTK_OBJECT_TYPE (item->parent));
/* We should probably check the signature here, but I
* don't think it's worth the time required to code
* it.
*/
if (signal_id != 0) {
- g_signal_emit(item->parent,
- signal_id, 0,
- item, event, &ret_val);
+ gtk_signal_emit(GTK_OBJECT(item->parent),
+ signal_id,
+ item, event, &ret_val);
}
}
return ret_val;
@@ -1055,9 +1018,9 @@ e_minicard_drag_begin (EMinicard *minicard, GdkEvent *event)
{
gint ret_val = 0;
GnomeCanvasItem *parent;
- g_signal_emit (minicard,
- e_minicard_signals[DRAG_BEGIN], 0,
- event, &ret_val);
+ gtk_signal_emit (GTK_OBJECT(minicard),
+ e_minicard_signals[DRAG_BEGIN],
+ event, &ret_val);
parent = GNOME_CANVAS_ITEM (minicard)->parent;
if (parent && E_IS_REFLOW (parent)) {