Commit Graph

192 Commits

Author SHA1 Message Date
JP Rosevear 5a5022fd46 create a sexp and check if the cards match before adding them to the list
2001-09-18  JP Rosevear  <jpr@ximian.com>

	* backend/pas/pas-backend-file.c
	(pas_backend_file_build_cards_list): create a sexp and check if
	the cards match before adding them to the list
	(pas_backend_file_process_get_cursor): send extra param

svn path=/trunk/; revision=12940
2001-09-18 18:19:26 +00:00
Chris Toshok 04b1bded1c fix syntax errors (which are broken, imo...)
2001-09-16  Chris Toshok  <toshok@ximian.com>

	* backend/pas/evolutionperson.schema: fix syntax errors (which are
	broken, imo...)

svn path=/trunk/; revision=12866
2001-09-17 00:45:36 +00:00
Jon Trowbridge 25d7fddd4e Make "stop" do nothing but set the stopped flag, as in
2001-09-15  Jon Trowbridge  <trow@ximian.com>

	* backend/ebook/e-book-listener.c (e_book_listener_stop): Make
	"stop" do nothing but set the stopped flag, as in
	e-book-view-listener.c.
	(e_book_listener_destroy): Clean up our queue here, rather than in
	e_book_listener_stop.
	(response_free): Added.  Move the rather lengthy bit of code
	needed to free a EBookListenerResponse into one place.
	(e_book_listener_check_queue): Properly deal with the stopped
	flag.
	(e_book_listener_queue_response): If the stopped flag is set, just
	drop the incoming response.

	* backend/ebook/e-book-view-listener.c
	(e_book_view_listener_stop): Make "stop" do nothing but set the
	stopped flag.
	(e_book_view_listener_destroy): Move all of the clean-up that used
	to be in e_book_view_listener_stop here.  This considerably simplifies
	the logic required to avoid various race conditions.
	(e_book_view_listener_check_queue): Properly deal with the stopped flag.
	(e_book_view_listener_queue_response): Drop all incoming responses if
	we are stopped.

2001-09-14  Jon Trowbridge  <trow@ximian.com>

	* backend/pas/pas-book.c (pas_book_queue_request): Hold a
	reference to the book on behalf of our idle function.
	(pas_book_check_queue): When we are finished, drop the reference
	we've been holding on behalf of the idle function.

	* backend/pas/pas-backend-file.c
	(pas_backend_file_process_create_card): Hold a reference to the
	book_view while sending our notifications.
	(pas_backend_file_process_remove_card): Hold a reference to the
	book_view while sending our notifications.

	* gui/contact-editor/e-contact-quick-add.c (quick_add_unref): Remove
	debugging spew.

	* backend/ebook/e-book-util.c: Remove a lot of unused code that
	worked around bugs that have long since been fixed.
	(simple_query_disconnect): Added.  Breaks out the part of
	simple_query_free that disconnect signals.
	(simple_query_free): Replace code w/ a call to
	simple_query_disconnect.
	(simple_query_sequence_complete_cb): Call simple_query_disconnect
	before executing the callback, so that our callbacks don't get
	triggered by any book changes that might occur during that
	callback.

	* backend/ebook/e-book-view-listener.c
	(e_book_view_listener_check_queue): Changed to be consistent with
	e_book_listener_check_queue.
	(e_book_view_listener_queue_response): Also changed to use a
	high-frequency timeout.

	* backend/ebook/e-book-listener.c (e_book_listener_check_queue):
	OK, I've agonized over this stupid little function, and it should
	now be race-free.
	(e_book_listener_queue_response): We process our response queue in
	a high-frequency timeout rather than an idle.  Using an idle
	function leads to some tricky race conditions and bad interactions
	with bonobo's semi-broken attempts to take over event processing.
	(e_book_view_listener_stop): Manually disable our timeout and
	clean up.

svn path=/trunk/; revision=12851
2001-09-15 06:05:29 +00:00
Ettore Perazzoli b289057485 [Automake 1.5 fixes pointed out by Richard Boulton
<richard@tartarus.org>, as per #9258.]

* backend/pas/Makefile.am: Rename `LDAP_BACKEND_SOURCES' to
`LDAP_BACKEND_FILES'.

* backend/ebook/Makefile.am: Set CLEANFILES directly instead of
using `+='.

svn path=/trunk/; revision=12839
2001-09-14 23:22:58 +00:00
Chris Toshok 1ec654cc56 use ldap_init. ldap_open is deprecated in openldap 2.x.
2001-09-13  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): use
	ldap_init.  ldap_open is deprecated in openldap 2.x.

svn path=/trunk/; revision=12820
2001-09-14 01:46:05 +00:00
Chris Toshok 79d3756857 add -DEVOLUTION_IMAGESDIR.
2001-09-06  Chris Toshok  <toshok@ximian.com>

	* gui/component/Makefile.am (INCLUDES): add -DEVOLUTION_IMAGESDIR.

	* gui/widgets/e-addressbook-view.c (card_deleted_cb): remove
	status messages from here.
	(e_addressbook_view_delete_selection): same.

	* gui/widgets/e-addressbook-model.c (sequence_complete): emit a
	NULL status message along with the stop_state_changed.  The null
	status message will clear the status bar for this view.

	* gui/component/addressbook.c (set_status_message): use the
	EvolutionActivityClient stuff.

	* backend/pas/pas-backend-ldap.c (view_destroy): remove status
	message for abandoning a search.
	(ldap_op_process_current): wrap status messages in _().
	(ldap_op_process): same.
	(create_card_handler): same, and remove the notify_status for ""
	and add a notify_complete call after the card is added.
	(remove_card_handler): same.
	(modify_card_handler): same.
	(poll_ldap): wrap status messages with _(), and remove the "Search
	Complete" message.
	(ldap_search_handler): wrap status message.

	* backend/pas/pas-backend-file.c (pas_backend_file_search): use
	_() on status messages, and make sure the last notify_* called is
	notify_complete.

svn path=/trunk/; revision=12663
2001-09-07 00:33:57 +00:00
Christopher James Lahey 0fbeb97f39 Use e_card_get_vcard_assume_utf8 instead of e_card_get_vcard here since
2001-09-02  Christopher James Lahey  <clahey@ximian.com>

	* backend/ebook/e-book.c (e_book_add_card, e_book_commit_card),
	backend/pas/pas-backend-file.c (do_create),
	backend/pas/pas-backend-ldap.c
	(create_card_handler, remove_card_handler, modify_card_handler,
	pas_backend_ldap_process_get_vcard, poll_ldap): Use
	e_card_get_vcard_assume_utf8 instead of e_card_get_vcard here
	since all internal communications and database storage are assumed
	to be utf8.

	* backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h
	(e_card_simple_duplicate): Simplified this function considerably.
	(e_card_simple_get_vcard_assume_utf8): Added this function.

	* backend/ebook/e-card.c, backend/ebook/e-card.h (e_card_new,
	e_card_load_cards_from_file, e_card_load_cards_from_string): Made
	these functions pay attention to charset attributes.
	(e_card_new_with_default_charset,
	e_card_load_cards_from_file_with_default_charset,
	e_card_load_cards_from_string_with_default_charset): New functions
	that let you change the default charset from UTF-8.
	(e_card_get_vcard): Made this write out charset attributes when
	necessary.
	(e_card_get_vcard_assume_utf8): New function that writes out a
	card without writing out charset attributes.

	* backend/ebook/evolution-vcard-importer.c (book_open_cb),
	backend/ebook/load-gnomecard-addressbook.c (book_open_cb),
	backend/ebook/test-card.c (main),
	gui/component/addressbook-component.c
	(destination_folder_handle_drop), gui/contact-editor/test-editor.c
	(main), gui/contact-list-editor/e-contact-list-editor.c
	(table_drag_data_received_cb), gui/widgets/e-addressbook-view.c
	(selection_received), gui/widgets/e-minicard-control.c
	(pstream_load): Changed the default charset to be used here to
	ISO-8859-1.

	* backend/ebook/load-gnomecard-addressbook.c (add_card_cb),
	backend/ebook/load-pine-addressbook.c (add_card_cb),
	backend/ebook/test-client-list.c (get_cursor_cb),
	backend/ebook/test-client.c (get_cursor_cb, get_card_cb): Use
	e_card_get_vcard_assume_utf8 to print out testing strings.

	* gui/component/select-names/e-select-names-model.c,
	gui/component/select-names/e-select-names-model.h
	(e_select_names_model_contains): Changed this to be const
	EDestination *dest to fix a warning.

	* gui/contact-editor/e-contact-editor.c (e_contact_editor_init):
	Translate window title here.

svn path=/trunk/; revision=12558
2001-09-02 06:27:53 +00:00
JP Rosevear 0aa3fe4cac use DB_NOTFOUND const
2001-08-20  JP Rosevear  <jpr@ximian.com>

	* backend/pas/pas-backend-file.c
	(pas_backend_file_changes_foreach_key): use DB_NOTFOUND const

svn path=/trunk/; revision=12311
2001-08-20 16:25:12 +00:00
JP Rosevear 6a6f3d83e9 null out card_sexp so that we don't crash when copying
2001-08-20  JP Rosevear  <jpr@ximian.com>

	* backend/pas/pas-backend-file.c
	(pas_backend_file_process_get_changes): null out card_sexp so that
	we don't crash when copying

svn path=/trunk/; revision=12290
2001-08-20 15:22:26 +00:00
Chris Toshok 2727815f22 unref our card_sexp. (create_card_handler): make sure to set the id of the
2001-08-17  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-ldap.c (view_destroy): unref our
	card_sexp.
	(create_card_handler): make sure to set the id of the vcard so it
	gets properly transmitted back to the BookView, and notify all
	matching BookViews to add the created card.
	(remove_card_handler): notify all matching BookViews to remove the
	card.
	(modify_card_handler): notify all matching BookViews to modify the
	card.
	(pas_backend_ldap_process_get_book_view): init card_sexp based on
	the view's search.

svn path=/trunk/; revision=12151
2001-08-17 10:02:37 +00:00
Chris Toshok 93833a8c01 use card_sexp. (pas_backend_file_book_view_free): same.
2001-08-17  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-file.c
	(pas_backend_file_book_view_copy): use card_sexp.
	(pas_backend_file_book_view_free): same.
	(vcard_matches_search): use the new pas_backend_card_sexp_match_vcard call.
	(pas_backend_file_search): use card_sexp.
	(pas_backend_file_process_get_book_view): same.

	* backend/pas/Makefile.am (libpas_a_SOURCES): add
	pas-backend-card-sexp.[ch].

svn path=/trunk/; revision=12150
2001-08-17 09:28:49 +00:00
Jeffrey Stedfast 4cab2ff499 Added a closing paren.
2001-08-16  Jeffrey Stedfast  <fejj@ximian.com>

	* backend/pas/evolutionperson.schema: Added a closing paren.

svn path=/trunk/; revision=12142
2001-08-17 03:04:22 +00:00
Chris Toshok d5b8c3deb5 implement using search_for_dn.
2001-08-14  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-ldap.c
	(pas_backend_ldap_process_get_vcard): implement using
	search_for_dn.

svn path=/trunk/; revision=12043
2001-08-15 05:10:37 +00:00
Dan Winship d8a0beac1b Fix up to match the pas_book_new/get_vcard changes.
* backend/pas/pas-backend-ldap.c: Fix up to match the
	pas_book_new/get_vcard changes.

svn path=/trunk/; revision=12009
2001-08-14 14:32:23 +00:00
Christopher James Lahey 46c6db5382 Oops, forgot to write this function.
2001-08-14  Christopher James Lahey  <clahey@ximian.com>

	* backend/pas/pas-book.c (pas_book_respond_get_vcard): Oops,
	forgot to write this function.

svn path=/trunk/; revision=11999
2001-08-14 08:48:28 +00:00
Chris Toshok 7d17af894b don't g_strdup the stuff we're passing into e_list_append, since it does
2001-08-13  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-ldap.c (add_to_supported_fields): don't
	g_strdup the stuff we're passing into e_list_append, since it does
	the copy for us.
	(check_schema_support): don't initialize supported_fields list
	here, since there's a gross case where the programmer/user can
	bring up the contact editor before the connection stuff is
	finished, and we don't want to crash.
	(pas_backend_ldap_init): move it here to we can guarantee it's
	there. (bug #6546).

svn path=/trunk/; revision=11989
2001-08-14 04:16:13 +00:00
Christopher James Lahey 476458f355 Changed get_card to be asyncronous.
2001-08-13  Christopher James Lahey  <clahey@ximian.com>

	* backend/ebook/e-book-listener.c,
	backend/ebook/e-book-listener.h, backend/ebook/e-book.c,
	backend/ebook/e-book.h, backend/idl/addressbook.idl,
	backend/pas/pas-backend-file.c, backend/pas/pas-book.c,
	backend/pas/pas-book.h: Changed get_card to be asyncronous.

	* backend/ebook/e-card.c, backend/ebook/test-client.c: Changed
	these to deal with the new get_card functionality.

svn path=/trunk/; revision=11984
2001-08-14 02:17:04 +00:00
Chris Toshok 30876e0d14 [ Fixes ximian bugs #5080, #6021, #6704, #6705 ]
2001-08-09  Chris Toshok  <toshok@ximian.com>

	[ Fixes ximian bugs #5080, #6021, #6704, #6705 ]

	* gui/component/addressbook.c (book_open_cb): create our own
	dialog that prompts for both the email address and the password.
	the email address is stored in the source and filled in for the
	user after the first time they enter one and press OK.

	* gui/component/addressbook-storage.c (create_ldap_folder): has a
	return value, not a int* parameter.
	(create_ldap_folder): new function, we can create ldap servers
	from the File->New->Folder menu item now.
	(register_storage): hook up the "create_folder" signal.
	(addressbook_storage_init_source_uri): remove the file case, we
	only build ldap uris here.
	(load_source_data): remove the file source stuff, and handle
	"emailaddr".
	(save_source_data): call ldap_source_foreach directly.
	(addressbook_source_free): remove file source stuff.
	(addressbook_source_copy): same.

	* gui/component/addressbook-storage.h: get rid of all the file
	source stuff from AddressbookSource, since this is only being used
	for ldap servers.

	* backend/pas/pas-backend-ldap.c
	(pas_backend_ldap_process_authenticate_user): look up the ldap
	entry based on the provided email address and use the resulting
	DN/passwd to authenticate.

	* gui/component/addressbook-config.c: pretty much gutted to make
	it work with the new UI.

	* gui/component/addressbook-config.glade: new version from anna.

svn path=/trunk/; revision=11834
2001-08-09 17:21:46 +00:00
Chris Toshok 3e06116621 escape *, \, (, and ), as per rfc2254. (func_contains): escape the string.
2001-08-08  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-ldap.c (rfc2254_escape): escape *, \, (,
	and ), as per rfc2254.
	(func_contains): escape the string.
	(func_is): same.
	(func_beginswith): same.
	(func_endswith): same.

svn path=/trunk/; revision=11789
2001-08-08 15:17:39 +00:00
Chris Toshok 9a165d27df use g_strcasecmp since ldap attribute names are not case sensitive.
2001-08-07  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-ldap.c (build_card_from_entry): use
	g_strcasecmp since ldap attribute names are not case sensitive.

svn path=/trunk/; revision=11734
2001-08-07 18:22:01 +00:00
Chris Toshok 2061924fd0 change the way x-evolution-any-field is converted to an ldap query. it
2001-07-25  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-ldap.c (func_contains): change the way
	x-evolution-any-field is converted to an ldap query.  it used to
	be we'd nest queries like: (|(|(|(foo=*x*))(bar=*x*))(baz=*x*)).
	now we build it like: (|(foo=*x*)(bar=*x*)(baz=*x*)).  much more
	efficient (both in the building, and on the server side no doubt).

svn path=/trunk/; revision=11407
2001-07-25 18:58:47 +00:00
Chris Toshok a72b3b2245 [ Fixes bugs #4611 - crash searching in the name field at Bigfoot for "\"
2001-07-17  Chris Toshok  <toshok@ximian.com>

	[ Fixes bugs #4611 - crash searching in the name field at Bigfoot for "\"
	        and  #4554 - general ldap search crash ]

	* backend/pas/pas-backend-ldap.c (func_contains): the length of
	the big query string needs to take into account the length of the
	footer as well as the header - fix random memory corruption here.

	* backend/pas/pas-backend-ldap.c (pas_backend_ldap_build_query):
	list can be NULL, specifically if there's a parsing error in the
	sexp, so deal with it.

svn path=/trunk/; revision=11192
2001-07-18 02:11:23 +00:00
JP Rosevear b3a9531d20 add ldap cflags
2001-07-12  JP Rosevear  <jpr@ximian.com>

	* backend/pas/Makefile.am: add ldap cflags

svn path=/trunk/; revision=11076
2001-07-13 01:17:20 +00:00
Chris Toshok ec8f46b3b5 assign OID's to the schema entries, and add schema support for contact
2001-07-10  Chris Toshok  <toshok@ximian.com>

	* backend/pas/evolutionperson.schema: assign OID's to the schema
	entries, and add schema support for contact lists.

svn path=/trunk/; revision=10979
2001-07-11 00:47:08 +00:00
Christopher James Lahey 6db3f48281 Set bf->priv->file_db before calling do_create.
2001-07-10  Christopher James Lahey  <clahey@ximian.com>

	* backend/pas/pas-backend-file.c (pas_backend_file_load_uri): Set
	bf->priv->file_db before calling do_create.

2001-07-06  Christopher James Lahey  <clahey@ximian.com>

	* gui/component/addressbook-component.c (factory_fn): Fixed order
	of arguments to evolution_shell_component_new.

svn path=/trunk/; revision=10949
2001-07-10 04:49:49 +00:00
Christopher James Lahey 4495c61899 Fix a memory leak here.
2001-07-05  Christopher James Lahey  <clahey@ximian.com>

	* backend/pas/pas-backend-file.c (compare_category): Fix a memory
	leak here.

svn path=/trunk/; revision=10803
2001-07-05 14:26:04 +00:00
Christopher James Lahey 7728e7dbd2 Added category searching to the file backend.
2001-06-26  Christopher James Lahey  <clahey@ximian.com>

	* backend/pas/pas-backend-file.c (compare_category): Added
	category searching to the file backend.

	* gui/component/addressbook.c (addressbook_query_changed): Added
	category searching to the search bar.

svn path=/trunk/; revision=10520
2001-06-27 00:22:02 +00:00
Ettore Perazzoli 91cc026904 Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

svn path=/trunk/; revision=10440
2001-06-23 08:52:02 +00:00
Chris Toshok 536c03eb04 fix a refcounting memleak.
2001-06-20  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-file.c
	(pas_backend_file_process_get_supported_fields): fix a refcounting
	memleak.

svn path=/trunk/; revision=10351
2001-06-21 06:39:28 +00:00
Chris Toshok 68a1984433 rename ce_book_found_fields to this, remove the fetching of fields (the
2001-06-19  Chris Toshok  <toshok@ximian.com>

	* contact-editor/e-contact-quick-add.c (ce_have_book): rename
	ce_book_found_fields to this, remove the fetching of fields (the
	contact editor code handles that now.), and change the add_card
	signal to card_added.
	(card_added_cb): copied somewhat from merge_cb above.  we don't
	need to do the merge here, just call the callback.

	* contact-editor/e-contact-editor.c (e_contact_editor_class_init):
	track signal change.  add book arg, and is_read_only -> editable.
	(wants_html_changed): if the card isn't already changed, flag it
	as such (and update the commands.)
	(phone_entry_changed): same.
	(email_entry_changed): same.
	(address_text_changed): same.
	(name_entry_changed): same.
	(company_entry_changed): same.
	(full_name_clicked): is_read_only -> editable.
	(full_addr_clicked): same.
	(card_added_cb): new function, emit our card_added signal, and
	close the dialog if we're supposed to.  properly deal with error
	status here.
	(card_modified_cb): same, modulo card_added -> card_modified.
	(save_card): actually call e_card_merging_book_{add/commit}_card
	instead of using a signal.  Also, add a gboolean arg to tell
	whether or not to close the dialog after saving the card.
	(card_deleted_cb): new function, just emit our "card_deleted"
	signal.
	(delete_cb): actually call e_book_remove_card here, instead of
	using a signal.
	(tb_save_and_close_cb): call save_card with TRUE for should_close.
	(e_contact_editor_init): init changed = FALSE;
	(e_contact_editor_destroy): unref our book if we have one.
	(e_contact_editor_new): new signature, set the "book" arg, and
	call e_book_get_supported_fields here.
	(supported_fields_cb): new function, show the contact editor.
	(e_contact_editor_set_arg): initialize changed to FALSE when
	setting the card (but *after*, since the changed callbacks will
	set it to TRUE.)  also, call command_state_changed if editable
	changes.  also handle setting "book".  oh, and is_read_only ->
	editable.
	(command_state_changed): new function - set the state of the
	commands we care about.
	(e_contact_editor_get_arg): add "book" handling, and is_read_only
	-> editable.
	(_phone_arrow_pressed): is_read_only -> editable.
	(_email_arrow_pressed): same.
	(_address_arrow_pressed): same.
	(enable_writable_fields): same.
	(set_editable): rename set_read_only to this, and is_read_only ->
	editable.

	* contact-editor/e-contact-editor.h (struct _EContactEditor):
	is_read_only -> editable, add a "changed" flag so we can sensitize
	commands correctly, and add an EBook* arg to e_contact_editor_new
	and to the EContactEditor struct.  Also, change all the signals to
	past tense, and send the EBookStatus in them.

	* contact-editor/e-contact-editor-address.c
	(e_contact_editor_address_class_init): is_read_only -> editable.
	(e_contact_editor_address_set_arg): same.
	(e_contact_editor_address_get_arg): same.

	* contact-editor/e-contact-editor-address.h (struct
	_EContactEditorAddress): same.

	* contact-editor/e-contact-editor-fullname.c
	(e_contact_editor_fullname_class_init): same.
	(e_contact_editor_fullname_set_arg): same.
	(e_contact_editor_fullname_get_arg): same.

	* contact-editor/e-contact-editor-fullname.h (struct
	_EContactEditorFullname): same.

	* contact-editor/Makefile.am: don't build contact-editor-test now,
	until contact-editor gets moved to gui/ and we can more easily
	depend on the e_card_merging_* calls.

	* backend/pas/pas-backend-ldap.c (ldap_error_to_response): return
	CardIdAlreadyExists for LDAP_ALREADY_EXISTS.

	* backend/idl/addressbook.idl: Add CardIdAlreadyExists to the
	BookListener status enum.

	* backend/ebook/e-book-types.h: add
	E_BOOK_STATUS_CARD_ID_ALREADY_EXISTS.

	* backend/ebook/e-book-listener.c
	(e_book_listener_convert_status): add support for
	CardIdAlreadyExists.

svn path=/trunk/; revision=10317
2001-06-20 00:34:24 +00:00
Chris Toshok bba6af69b9 implement this properly, using base and (objectclass=*).
2001-06-15  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-ldap.c (search_for_dn): implement this
	properly, using base and (objectclass=*).

svn path=/trunk/; revision=10249
2001-06-15 07:25:56 +00:00
Christopher James Lahey 538e971cd8 Made this handle the "id" property in searches.
2001-06-11  Christopher James Lahey  <clahey@ximian.com>

	* backend/pas/pas-backend-file.c (entry_compare): Made this handle
	the "id" property in searches.
	(pas_backend_file_process_modify_card): Made id variable const
	here.

	* backend/pas/pas-backend-ldap.c (modify_card_handler): Made id
	variable const here.

svn path=/trunk/; revision=10182
2001-06-11 09:21:43 +00:00
Christopher James Lahey f699f9902b Copy dates as they come in.
2001-06-05  Christopher James Lahey  <clahey@ximian.com>

	* backend/ebook/e-card.c (e_card_set_arg): Copy dates as they come
	in.

	* backend/pas/pas-backend-file.c
	(pas_backend_file_changes_foreach_key, pas_backend_file_changes,
	pas_backend_file_process_remove_card,
	pas_backend_file_process_modify_card,
	pas_backend_file_build_all_cards_list, pas_backend_file_get_vcard,
	pas_backend_file_maybe_upgrade_db): memset DBTs to 0 before using
	them.
	(pas_backend_file_build_all_cards_list): Reindented.

	* contact-editor/contact-editor.glade: Replaced GnomeDateEdits
	with a custom widget that creates an EDateEdit.

	* contact-editor/e-contact-editor.c: Use an EDateEdit here instead
	of a GnomeDateEdit.

svn path=/trunk/; revision=10125
2001-06-05 23:49:59 +00:00
Christopher James Lahey 8f183d269e Included information about db3.
2001-05-31  Christopher James Lahey  <clahey@ximian.com>

	* README: Included information about db3.

	* acconfig.h: Added HAVE_DB_H and HAVE_DB3_DB_H.

	* configure.in: Added various checks for db3 libraries and
	includes.  Of note are the new configure options
	--with-db3-includes=PREFIX and --with-db3-libs=PREFIX to specify
	the location for your db3 library.

From addressbook/ChangeLog:

2001-05-31  Christopher James Lahey  <clahey@ximian.com>

	* backend/pas/Makefile.am (INCLUDES): Added db3 cflags.

	* backend/pas/pas-backend-file.c: Updated this to use db3.

From e-util/ChangeLog:

2001-05-31  Christopher James Lahey  <clahey@ximian.com>

	* Makefile.am (INCLUDES): Added db3 cflags.

	* e-dbhash.c: Made this use db3.

	* e-db3-utils.c, e-db3-utils.h: New files with some helper
	functions.

From wombat/ChangeLog:

2001-05-31  Christopher James Lahey  <clahey@ximian.com>

	* Makefile.am (wombat_LDADD): Added db3 libs.

svn path=/trunk/; revision=10077
2001-06-01 01:02:12 +00:00
Chris Toshok de887cef10 fix strings such that ones that happening at the beginning or during an
2001-05-23  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-ldap.c (view_destroy): fix strings such
	that ones that happening at the beginning or during an operation
	are followed by "..." and those that stop the operation are
	followed by "."
	(create_card_handler): same.
	(ldap_op_process_current): same, and also call _notify_complete if
	we can't connect to ldap server.
	(poll_ldap): same, and change "Polling for LDAP search result" to
	"Receiving LDAP search results"

	* backend/pas/pas-backend-file.c (pas_backend_file_search): call
	notify_status_message at the beginning of this function, and
	whenever we call _notify_complete.

svn path=/trunk/; revision=9941
2001-05-23 09:32:49 +00:00
Christopher James Lahey a8b6f2be95 Reordered the includes here. (string_to_dbt): The sleepycat libdb
2001-05-11  Christopher James Lahey  <clahey@ximian.com>

	* backend/pas/pas-backend-file.c: Reordered the includes here.
	(string_to_dbt): The sleepycat libdb documentation suggests
	memseting the DBT to 0 so we do that here.

	* gui/widgets/e-minicard-view-model.c (addressbook_height): Skip
	the E_CARD_SIMPLE_FIELD_FAMILY_NAME field.

	* gui/widgets/e-minicard.c (remodel): Skip the
	E_CARD_SIMPLE_FIELD_FAMILY_NAME field.

svn path=/trunk/; revision=9764
2001-05-11 19:20:27 +00:00
Chris Toshok 34b0dc6544 only check schema support if we've connected.
2001-05-11  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): only
	check schema support if we've connected.

svn path=/trunk/; revision=9763
2001-05-11 18:53:11 +00:00
JP Rosevear e03b58e2df init change_id to NULL
2001-05-04  JP Rosevear  <jpr@ximian.com>

	* backend/pas/pas-backend-file.c
	(pas_backend_file_process_get_book_view): init change_id to NULL

svn path=/trunk/; revision=9672
2001-05-04 15:59:06 +00:00
JP Rosevear 80e3acea85 unref the book if the view is being destroyed
2001-05-02  JP Rosevear  <jpr@ximian.com>

	* gui/component/addressbook.c (addressbook_view_free): unref the
	book if the view is being destroyed

	* backend/pas/pas-backend-file.c
	(pas_backend_file_process_get_book_view): unref the book_view when
	we are finished, it is only interesting if someone else has reffed
	it now (weak reference)
	(pas_backend_file_add_client): unref the book for the same reason
	as above

svn path=/trunk/; revision=9647
2001-05-02 19:09:47 +00:00
JP Rosevear c757cacd08 if the view does not contain a search context, the result is by default
2001-04-30  JP Rosevear  <jpr@ximian.com>

	* backend/pas/pas-backend-file.c (vcard_matches_search): if the
	view does not contain a search context, the result is by default
	false fixes #2470

svn path=/trunk/; revision=9634
2001-05-01 03:14:40 +00:00
Christopher James Lahey 1d4c16a76a Added the function e_book_view_listener_stop to tell the book view
2001-04-14  Christopher James Lahey  <clahey@ximian.com>

	* backend/ebook/e-book-view-listener.c,
	backend/ebook/e-book-view-listener.h: Added the function
	e_book_view_listener_stop to tell the book view listener to stop
	sending signals.

	* backend/ebook/e-book-view.c (e_book_view_destroy): Tell the
	EBookViewListener to stop when we're destroyed.

	* backend/pas/pas-backend-file.c (view_destroy,
	pas_backend_file_process_get_book_view,
	pas_backend_file_process_get_changes): Cleaned these up a bit
	using bonobo_object_ref and bonobo_object_unref.
	(pas_backend_file_process_get_book_view,
	pas_backend_file_process_get_changes): bonobo_object_release_unref
	the EBookListener here.

	* backend/pas/pas-backend-ldap.c
	(pas_backend_ldap_process_get_book_view): Cleaned this up a bit
	using bonobo_object_ref.  Make sure to unref the listener when
	we're done with it.  Put the new book_view in the list before
	telling the book_listener that it's ready.

	* backend/pas/pas-book-view.c (pas_book_view_construct): Cleaned
	this up a bit using bonobo_object_dup_ref.
	(pas_book_view_destroy): Cleaned this up a bit using
	bonobo_object_release_unref.

	* backend/pas/pas-book.c (pas_book_queue_get_book_view,
	pas_book_queue_get_changes): bonobo_object_dup_ref here instead of
	just duplicating.

svn path=/trunk/; revision=9313
2001-04-14 20:26:40 +00:00
Michael Meeks 04fac44de1 Do this everywhere, also fixup CLEANFILES
Do this everywhere, also fixup CLEANFILES

2001-04-14  Michael Meeks  <michael@ximian.com>

	* Makefile.am (dist-hook): remove built sources from dist.

svn path=/trunk/; revision=9309
2001-04-14 08:02:59 +00:00
Jason Leach 275c3b3deb Update the Voice and Fax phone numbers too, finishing off bug #1667.
2001-04-12  Jason Leach  <jasonleach@usa.net>

	* backend/pas/pas-backend-file.c (INITIAL_VCARD): Update the Voice
	and Fax phone numbers too, finishing off bug #1667.

svn path=/trunk/; revision=9296
2001-04-13 02:14:35 +00:00
Christopher James Lahey 3bf472d9ca Update the built in VCard.
2001-04-11  Christopher James Lahey  <clahey@ximian.com>

	* backend/pas/pas-backend-file.c (INITIAL_VCARD): Update the built
	in VCard.

svn path=/trunk/; revision=9293
2001-04-13 01:00:54 +00:00
Chris Toshok f01f5f7c42 make sure to notify new clients to the writable status of an already open
2001-04-08  Chris Toshok  <toshok@ximian.com>

	* backend/pas/pas-backend-ldap.c (pas_backend_ldap_add_client):
	make sure to notify new clients to the writable status of an
	already open (and authenticated) book.

svn path=/trunk/; revision=9206
2001-04-08 23:51:49 +00:00
Christopher James Lahey c5c0c7fe76 Tell new clients that are added whether they're writable.
2001-03-30  Christopher James Lahey  <clahey@ximian.com>

	* backend/pas/pas-backend-file.c (pas_backend_file_add_client):
	Tell new clients that are added whether they're writable.

svn path=/trunk/; revision=9043
2001-03-30 10:38:27 +00:00
Kjartan Maraas cf658dcba6 Clean up #includes. Replace <gnome.h>, <bonobo.h> and <gtk/gtk.h> with
2001-03-29  Kjartan Maraas  <kmaraas@gnome.org>

	* *.*: Clean up #includes. Replace <gnome.h>, <bonobo.h> and
	<gtk/gtk.h> with more finegrained headers where needed.

svn path=/trunk/; revision=9026
2001-03-29 20:55:01 +00:00
Jon Trowbridge e54ed57996 Start feeding query matches back to the caller before the entire search is
2001-03-17  Jon Trowbridge  <trow@ximian.com>

        * backend/pas/pas-backend-file.c (pas_backend_file_search):
        Start feeding query matches back to the caller before the
        entire search is complete; this gives us some "instant feedback"
        rather than causing evolution to totally lock up...

svn path=/trunk/; revision=8792
2001-03-18 03:26:03 +00:00
Chris Toshok b16a04e98d new function. (impl_BookListener_report_writable): new function.
2001-03-17  Chris Toshok  <toshok@ximian.com>

	* backend/ebook/e-book-listener.c
	(e_book_listener_queue_writable_status): new function.
	(impl_BookListener_report_writable): new function.
	(e_book_listener_get_epv): fill in epv->notifyWritable.

	* backend/ebook/e-book-listener.h: add writable status entries.

	* backend/ebook/e-book.c (e_book_do_writable_event): new function.
	(e_book_check_listener_queue): add WritableStatusEvent to the
	switch.
	(e_book_class_init): register writable_status signal.

	* backend/ebook/e-book.h: add writable_status signal.

	* backend/idl/addressbook.idl: add notifyWritable method to
	BookListener.

	* gui/widgets/e-minicard.c (e_minicard_class_init): add "editable"
	arg.
	(e_minicard_init): init editable.
	(e_minicard_set_arg): loop over the minicard fields setting their
	"editable".
	(e_minicard_get_arg): add editable.
	(supported_fields_cb): use editable when creating the
	contact_editor.
	(add_field): set "editable" when creatin the e_minicard.

	* gui/widgets/e-minicard.h (struct _EMinicard): add "editable".

	* gui/widgets/e-minicard-view.c (e_minicard_view_class_init): add
	editable arg.
	(e_minicard_view_init): init editable.
	(create_card): pass editable to e_minicard canvas item.
	(e_minicard_view_set_arg): bit of a hack - loop over all the
	canvas items setting their "editable."
	(e_minicard_view_get_arg): add editable.
	(supported_fields_cb): use editable when creating the contact
	editor.

	* gui/widgets/e-minicard-view.h (struct _EMinicardView): add
	"editable."

	* gui/widgets/e-minicard-view-widget.c
	(e_minicard_view_widget_class_init): add "editable" field.
	(e_minicard_view_widget_init): init editable to FALSE.
	(e_minicard_view_widget_set_arg): save editable, and pass it along
	the e-minicard-view.
	(e_minicard_view_widget_realize): same.
	(e_minicard_view_widget_get_arg): add editable.

	* gui/widgets/e-minicard-view-widget.h (struct
	_EMinicardViewWidget): add "editable" field.

	* gui/widgets/e-minicard-label.h (struct _EMinicardLabel): add
	"editable" field.

	* gui/widgets/e-minicard-label.c (e_minicard_label_class_init):
	add "editable" arg.
	(e_minicard_label_set_arg): editable, set it on the e_text too.
	(e_minicard_label_get_arg): editable.
	(e_minicard_label_construct): set the "editable" field when we
	create the e_text cavas item

	* gui/widgets/e-addressbook-view.c (e_addressbook_view_init):
	default editable to FALSE.
	(book_writable_cb): new function, set our editable field and
	gtk_object_set it on the active view.
	(e_addressbook_view_set_arg): set the active view's editable when
	we set the view's book, and connect the "writable_status" signal
	to book_writable_cb.
	(change_view_type): same.
	(supported_fields_cb): use our "editable" when creating the
	contact editor.

	* gui/widgets/e-addressbook-view.h (struct _EAddressbookView): add
	editable field.

	* gui/widgets/e-addressbook-model.c (e_addressbook_model_init):
	change the default of editable to FALSE.

	* backend/pas/pas-book.c (pas_book_report_writable): new function.

	* backend/pas/pas-book.h: prototype for pas_book_report_writable.

	* backend/pas/pas-backend-file.c (pas_backend_file_load_uri): if
	we open the file O_RDWR (or create it) report it as writable.  if
	we can't open it as O_RDWR, try opening it read-only before we
	attempt to create it.

	* backend/pas/pas-backend-ldap.c
	(pas_backend_ldap_process_authenticate_user): if we authenticate
	successfully, grant write permissions (this is lacking but there's
	really nothing we can do to determine the extent of the access
	afforded a user.)

svn path=/trunk/; revision=8787
2001-03-17 22:30:06 +00:00
Jon Trowbridge 57de6972c8 Added addressbook querying and "cardification" functions, which are turned
2001-03-15  Jon Trowbridge  <trow@ximian.com>

        * gui/component/e-address-widget.c: Added addressbook querying and
        "cardification" functions, which are turned off by default for now
        because of addressbook bugs.  Added a popup menu option to turn
        queries on, so that others can enjoy the thrill of massive flaming
        death.

        * gui/component/addressbook-factory.c (main): Made warnings always
        be fatal.

        * backend/pas/pas-book-view.c: Added some debugging spew.

        * backend/pas/pas-backend-file.c (pas_backend_file_search): Added
        a little experimental code to try to make file searches scale
        better.  #if 0/#endif-ed out for now.

        * contact-editor/e-contact-quick-add.c: #included e-book-util.h.

        * backend/ebook/e-card.c (e_card_name_match_string): Added.
        Looser name-matching function.
        (e_card_email_match_string): Added.  Loose e-mail matching.

        * backend/ebook/e-book-view-listener.c
        (e_book_view_listener_check_queue): Added code to cause us to
        abort rather than get trapped in a 100%-CPU-consuming loop in
        certain situations.  Now we just need to figure out how to avoid
        these situations altogether.

        * backend/ebook/e-book-util.c: Added.  Now contains the simple
        query stuff and the open local addressbook functions.

        * backend/ebook/e-book.c: Moved simple query stuff and open local
        addressbook functions into e-book-util.c.

2001-03-15  Jon Trowbridge  <trow@ximian.com>

        * wombat.c (main): If we can't initialize a service on startup,
        tell us which one before terminating.

svn path=/trunk/; revision=8754
2001-03-16 08:16:29 +00:00