Commit Graph

790 Commits

Author SHA1 Message Date
211470db51 add getters for the additional name fields. (field_data): move FAMILY_NAME
2001-09-22  Chris Toshok  <toshok@ximian.com>

	* backend/ebook/e-card-simple.c
	(e_card_simple_get): add getters for the additional name fields.
	(field_data): move FAMILY_NAME to the end of the list, and add
	GIVEN_NAME, ADDITIONAL_NAME (middle name), and NAME_SUFFIX.

	* backend/ebook/e-card-simple.h: same.

svn path=/trunk/; revision=13082
2001-09-22 21:13:28 +00:00
84adebbb96 Hooked up print preview button.
2001-09-21  Christopher James Lahey  <clahey@ximian.com>

	* gui/component/addressbook.c (print_preview_cb): Hooked up print
	preview button.

	* gui/widgets/e-addressbook-view.c,
	gui/widgets/e-addressbook-view.h
	(e_addressbook_view_print_preview): Added this function.

	* printing/e-contact-print.c, printing/e-contact-print.h
	(e_contact_print_preview): Added this function.

svn path=/trunk/; revision=13071
2001-09-21 22:08:13 +00:00
9ae341104a Use the default e-mail address if we have nothing else to go on.
2001-09-19  Jon Trowbridge  <trow@ximian.com>

	* backend/ebook/e-destination.c (name_and_email_simple_query_cb):
	Use the default e-mail address if we have nothing else to go on.
	Previously we just failed, which basically meant that name-only
	searches would never work properly.
	(nickname_simple_query_cb): The logic was a bit tangled here; if
	our query status isn't SUCCESS, always give up but don't leak the
	destination.  And if our nickname query fails and we try the
	name-and-email query, use the textrep for a name-only search.  The
	only reason we are doing a nickname query in the first place is if
	we have an obviously invalid e-mail.
	(launch_cardify_query): Use e_destination_is_valid to determine
	if we should try a nickname query first.
	These changes basically fix bug 7728, and generally make the
	auto-cardification of addresses a lot more clever and robust.

	* backend/ebook/e-book-util.c (name_and_email_cb): Use
	e_card_compare_name_to_string instead of e_card_name_match_string.
	(e_book_name_and_email_query): The arguments to g_strsplit were
	in the wrong order.  Doh!

	* backend/ebook/e-card-compare.c (e_card_compare_name_to_string):
	Added.  Replaces e_card_name_match_string, and actually works.

	* backend/ebook/e-card.c: Removed e_card_name_match_string
	function, which didn't work particularly well.

svn path=/trunk/; revision=13003
2001-09-20 02:23:41 +00:00
808bbced26 don't add to the complete list of cards if the card is a list
2001-09-19  JP Rosevear  <jpr@ximian.com>

	* conduit/address-conduit.c (cursor_cb): don't add to the complete
	list of cards if the card is a list
	(card_added): don't add to the list of changes if the card is a
	list
	(card_changed): ditto
	(card_removed): ditto

svn path=/trunk/; revision=13002
2001-09-20 01:22:38 +00:00
0236392122 Change the "this should never happen" message into a request for people to
2001-09-19  Jon Trowbridge  <trow@ximian.com>

	* gui/component/select-names/e-select-names.c
	(e_select_names_hookup_shell_listeners): Change the "this should
	never happen" message into a request for people to e-mail me
	directly with info if they encounter that error.

svn path=/trunk/; revision=13000
2001-09-20 00:02:12 +00:00
80b18f730d Freeing name[i] instead of namev[i] is a bad idea. (bug #10270)
2001-09-19  Jon Trowbridge  <trow@ximian.com>

	* backend/ebook/e-book-util.c (e_book_name_and_email_query):
	Freeing name[i] instead of namev[i] is a bad idea. (bug #10270)

svn path=/trunk/; revision=12980
2001-09-19 17:27:51 +00:00
19648dad9c Properly handle our GnomeUIInfo labels so that they won't be leaked if
2001-09-19  Jon Trowbridge  <trow@ximian.com>

        * gui/component/select-names/e-select-names-popup.c
        (popup_menu_card): Properly handle our GnomeUIInfo labels so that
        they won't be leaked if they are dynamic strings, so that they
        will be i18n-correct, and so that underscores won't be interpreted
        as key accelerators.  What a PITA.  Also, don't leak our
        iterators.  (Bug #10200.)
        (popup_menu_list): The same GnomeUIInfo tweaking as in
        popup_menu_card.
        (popup_menu_nocard): Ditto.

svn path=/trunk/; revision=12975
2001-09-19 08:36:35 +00:00
3835a0d437 add caluri field data
2001-09-18  JP Rosevear  <jpr@ximian.com>

 	* backend/ebook/e-card-simple.c (field_data): add caluri field data

 	* backend/ebook/e-card.c (e_card_get_vobject): add the caluri
 	property when appropriate
 	(parse_caluri): handle read caluri
 	(e_card_class_init): add caluri arg
 	(e_card_destroy): free the caluri
 	(e_card_get_arg): return caluri arg
 	(e_card_set_arg): set caluri from arg
 	(e_card_init): init caluri to null

 	* backend/ebook/e-card-simple.h: new simple field

 	* backend/ebook/e-card.h: new member

 	* gui/contact-editor/e-contact-editor.c (field_changed): util
 	callback to change the command state
 	(set_entry_changed_signal_field): hook up a change signal to above
 	(set_entry_changed_signals): use above function

 	* gui/contact-editor/e-contact-editor.glade: Add collaboration
 	page and fields

svn path=/trunk/; revision=12945
2001-09-18 19:20:21 +00:00
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
643ea02eee remove conflict droppings
--Larry

svn path=/trunk/; revision=12938
2001-09-18 05:29:16 +00:00
61f7037ff4 unref the destination regardless of whether we get an email addresss.
2001-09-18  Larry Ewing  <lewing@ximian.com>

	* gui/component/select-names/e-select-names-completion.c
	(book_query_process_card_list): unref the destination regardless
	of whether we get an email addresss.

svn path=/trunk/; revision=12937
2001-09-18 05:26:00 +00:00
f774ea81e5 use g_strfreev. (match_name): s/g_free/g_strfreev. (match_file_as):
2001-09-17  Larry Ewing  <lewing@ximian.com>

	* gui/component/select-names/e-select-names-completion.c
	(name_style_query): use g_strfreev.
	(match_name): s/g_free/g_strfreev.
	(match_file_as): s/g_free/g_strfreev.

	* backend/ebook/e-book-util.c (e_book_name_and_email_query): fix
	the memory handling here.  All there members of the vector need to
	be freed all the time.

	* backend/ebook/load-pine-addressbook.c (parse_line): free the
	string outside of the test that makes sure there are three
	entries.

svn path=/trunk/; revision=12936
2001-09-18 05:11:31 +00:00
1e710cd9ea don't malloc a match we will never use.
2001-09-17  Larry Ewing  <lewing@ximian.com>

	* gui/component/select-names/e-select-names-completion.c
	(match_nickname): don't malloc a match we will never use.

svn path=/trunk/; revision=12935
2001-09-18 04:07:04 +00:00
7c6775102c free the dup'd capabilities.
2001-09-17  Larry Ewing  <lewing@ximian.com>

	* gui/widgets/e-addressbook-model.c (get_view): free the dup'd
	capabilities.

svn path=/trunk/; revision=12933
2001-09-18 03:25:33 +00:00
d448b80bd6 We want to assume that a destination that comes from a card is
2001-09-17  Jon Trowbridge  <trow@ximian.com>

	* backend/ebook/e-destination.c (e_destination_is_valid): We want
	to assume that a destination that comes from a card is
	automatically valid, but the right way to check that is by calling
	e_destination_from_card, not by checking if dest->priv->card !=
	NULL.  (Fixed bug #10017)

svn path=/trunk/; revision=12930
2001-09-18 02:31:05 +00:00
2275c90121 Fixed a stupid bug was causing completion to fail for contacts who have
2001-09-17  Jon Trowbridge  <trow@ximian.com>

	* gui/component/select-names/e-select-names-completion.c
	(match_name): Fixed a stupid bug was causing completion to fail
	for contacts who have only one name.  (The classic example we all
	know and love is 'George <jirka@5z.com>')  (bug #8353)

svn path=/trunk/; revision=12928
2001-09-18 02:17:51 +00:00
f346981c0c Do the right thing if the card we are trying to send to has no valid
2001-09-17  Jon Trowbridge  <trow@ximian.com>

	* backend/ebook/e-card.c (e_card_list_send): Do the right thing if
	the card we are trying to send to has no valid e-mail addresses.
	(bug #10137)

svn path=/trunk/; revision=12927
2001-09-18 02:03:46 +00:00
d4bf3e01bc Code implicitly assumed that event->button.button is 1, 2, or 3, causing
2001-09-17  Jon Trowbridge  <trow@ximian.com>

	* gui/widgets/e-minicard.c (e_minicard_event): Code implicitly
	assumed that event->button.button is 1, 2, or 3, causing disaster
	when using a wheel-mouse.  Fixed. (bug #9400)

svn path=/trunk/; revision=12926
2001-09-18 01:40:20 +00:00
e38cff691a use enable_widget instead of gtk_widget_set_sensitive.
2001-09-16  Chris Toshok  <toshok@ximian.com>

	* gui/contact-editor/e-contact-editor.c (_phone_arrow_pressed):
	use enable_widget instead of gtk_widget_set_sensitive.
	(_email_arrow_pressed): same.
	(_address_arrow_pressed): same.
	(disable_widget_foreach): same.
	(enable_writable_fields): same.
	(set_editable): same.
	(enable_widget): new function, using both gtk_widget_set_sensitive
	and *_set_editable to allow the user to select text in GtkEntry's
	and GtkText's.

	* gui/contact-editor/e-contact-editor-fullname.c
	(e_contact_editor_fullname_set_arg): use set_editable as well as
	set_sensitive, to allow the user to select text in GtkEntry's.

	* gui/contact-editor/e-contact-editor-address.c
	(e_contact_editor_address_set_arg): same.

svn path=/trunk/; revision=12868
2001-09-17 03:04:33 +00:00
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
842aaaaa8c reorder the LDAP scopes so that they match the order of the option menus
2001-09-16  Chris Toshok  <toshok@ximian.com>

	* gui/component/addressbook-storage.h: reorder the LDAP scopes so
	that they match the order of the option menus in the glade file.

	* gui/component/addressbook-config.c (auth_checkbutton_changed):
	new function, mostly there to house some #ifdef'ed out code.
	(option_menuitem_activated): new function, to keep track of
	changes to the ldap scope optionmenu.
	(addressbook_source_dialog_set_source): set the menu history as
	well as the dialog's copy of the scope.
	(addressbook_source_dialog_get_source): fill in the source's scope
	from the dialog's copy, and add more #if the_ui_gods_smile_on_me
	code.
	(add_activate_cb): new function, add an activate callback for the
	optionmenu's items.
	(addressbook_source_dialog): more #if the_ui_gods_smile_on_me
	code, always start the dialog on page 0, and hook up the
	scope optionmenu's items.

svn path=/trunk/; revision=12865
2001-09-17 00:03:45 +00:00
63a62abfad No loose name matches on family names. (#8802)
2001-09-15  Jon Trowbridge  <trow@ximian.com>

	* backend/ebook/e-card-compare.c (e_card_compare_name): No
	loose name matches on family names. (#8802)

svn path=/trunk/; revision=12857
2001-09-15 08:58:02 +00:00
576a04e67d We can't use NULL as the first arg for e_addressbook_show_contact_editor
2001-09-15  Jon Trowbridge  <trow@ximian.com>

	* gui/component/select-names/e-select-names-text-model.c
	(e_select_names_text_model_activate_obj): We can't use NULL as the
	first arg for e_addressbook_show_contact_editor anymore.  Damn.
	(#8535)

svn path=/trunk/; revision=12853
2001-09-15 07:18:16 +00:00
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
8911460699 Set CLEANFILES directly instead of using `+='.
* gui/component/select-names/Makefile.am: Set CLEANFILES directly
instead of using `+='.

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

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

svn path=/trunk/; revision=12840
2001-09-14 23:23:33 +00:00
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
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
d4adafd589 Fix vcard importing
svn path=/trunk/; revision=12784
2001-09-12 21:43:29 +00:00
c8eb36beb8 free the values that are being leaked here.
2001-09-12  Larry Ewing  <lewing@ximian.com>

	* backend/ebook/e-destination.c: free the values that are being
	leaked here.

svn path=/trunk/; revision=12783
2001-09-12 21:20:37 +00:00
0577bd1a60 printf arguments were reversed by mistake. Fixed bug #9693.
2001-09-12  Jon Trowbridge  <trow@ximian.com>

	       * gui/component/select-names/e-select-names-completion.c (match_email):
	printf arguments were reversed by mistake.  Fixed bug #9693.

svn path=/trunk/; revision=12779
2001-09-12 20:29:37 +00:00
adc1b15126 Added. Treat right-clicks on a contact list as a special case.
2001-09-09  Jon Trowbridge  <trow@ximian.com>

	* gui/component/select-names/e-select-names-popup.c
	(popup_menu_list): Added.  Treat right-clicks on a contact list as
	a special case.
	(e_select_names_popup): Check if we are dealing with a contact
	list.  (Bug #9322)

svn path=/trunk/; revision=12716
2001-09-09 22:01:42 +00:00
2e3a7b37fe See e_book_listener_check_queue below.
2001-09-08  Jon Trowbridge  <trow@ximian.com>

	* backend/ebook/e-book-view-listener.c
	(e_book_view_listener_check_queue): See
	e_book_listener_check_queue below.
	(e_book_view_listener_queue_response): See
	e_book_listener_queue_response below.

	* backend/ebook/e-book-listener.c (e_book_listener_check_queue):
	Explicitly prohibit reentrancy.  Use gtk-unref rather than
	bobobo-unref.
	(e_book_listener_queue_response): Hold a gtk-ref to the listener
	while the idle function runs, not a bonobo-ref.  As far as I can
	tell, it is impossible to avoid a race condition here when we have
	to worry about bonobo reentrancy.

	* gui/component/select-names/e-select-names-text-model.c
	(e_select_names_text_model_insert_length): Alter a copy of the
	original EDestination, rather than just using a new one.  We need
	to do this to preserve prior-card information for possible
	reversion later.
	(e_select_names_text_model_delete): Ditto.

	* backend/ebook/e-destination.c (e_destination_clear_card): When
	clearing a destination where ->card != NULL, store it for possible
	reversion later.
	(e_destination_revert): If we have an old card stored, go back to
	using it for the destination.
	(e_destination_is_valid): Tries to detect obviously broken
	addresses.
	(e_destination_cardify): If our destination is invalid, first try
	to cardify simply by reverting to an older card.
	(e_destination_destroy): Unref any cached old card.
	(e_destination_copy): Copy the old card information.

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

	* gui/component/select-names/e-select-names.c
	(sync_table_and_models): Show all rows in the table, and then
	remove the rows that correspond to entries in the
	ESelectNamesModels in the children.
	(real_add_address): Freeze/thaw our ESelectNamesModel, so that we
	don't change our table while we are in the middle of iterating
	over the selection.
	(remove_address): Just delete the address from the
	ESelectNamesModel, the signal handler will do the rest.
	(selected_rows_foreach_cb): Call remove_address to do our dirty
	work.
	(e_select_names_add_section): Connect to the 'changed' signal from
	the ESelectNamesModel, and call sync_table_and_models explicitly to
	get our initial state correct.

	* gui/component/select-names/e-select-names-table-model.c
	(fill_in_info): Deal with EDestinations in our table that don't
	come from cards.

	* gui/component/select-names/e-select-names-manager.c: Added
	another ESelectNamesModel* to the ESelectNamesManagerSection
	struct.  Called 'original_model', this contains a copy of the
	model as it is when we begin using the SelectNames dialog.
	(section_copy): Copy the original model.
	(section_free): Free the original model.
	(e_select_names_manager_add_section_with_limit): Initialize the
	original model.
	(e_select_names_clicked): I've changed the semantics of this
	dialog quite a bit... no UI freeze can stop me!  If OK is clicked,
	we do nothing.  If Cancel is clicked, we revert to the
	'original_model' copy of our address entry state before we started
	editting.  Finally, we close the dialog before any of thing. Doing
	it last caused problems, because signals were being triggered
	which had dangling pointers as their closures.
	(e_select_names_manager_activate_dialog): Copy our current state
	to the original model, and share the same ESelectNamesModel
	between the dialog and the address entry in the composer..
	(e_select_names_manager_get_cards): Removed.  It had been
	#if 0/#endif-ed out for a while.

	* gui/component/select-names/e-select-names-model.c
	(e_select_names_model_freeze): Added.
	(e_select_names_model_thaw): Added.
	(e_select_names_model_uncardify): Added.  If possible,
	"uncardifies" a specific model entry.
	(e_select_names_model_changed): Changed to pay attention
	to the freeze count.

	* gui/component/select-names/e-select-names-completion.c
	(clean_query_text): Strip leading/trailing whitespace from
	queries.

	* backend/ebook/e-destination.c (e_destination_uncardify): Added.
	Converts a card-associated destination into a text-associated
	destination w/ the e-mail address.
	(e_destination_list_to_vector): Added.  A convenience routine.
	(e_destination_freev): Added.  A convenience routine.
	(e_destination_touchv): Added.  I'm lazy.

svn path=/trunk/; revision=12709
2001-09-09 03:45:55 +00:00
ba8ba2de6e See e_book_listener_check_queue below.
2001-09-08  Jon Trowbridge  <trow@ximian.com>

	* backend/ebook/e-book-view-listener.c
	(e_book_view_listener_check_queue): See
	e_book_listener_check_queue below.
	(e_book_view_listener_queue_response): See
	e_book_listener_queue_response below.

	* backend/ebook/e-book-listener.c (e_book_listener_check_queue):
	Explicitly prohibit reentrancy.  Use gtk-unref rather than
	bobobo-unref.
	(e_book_listener_queue_response): Hold a gtk-ref to the listener
	while the idle function runs, not a bonobo-ref.  As far as I can
	tell, it is impossible to avoid a race condition here when we have
	to worry about bonobo reentrancy.

	* gui/component/select-names/e-select-names-text-model.c
	(e_select_names_text_model_insert_length): Alter a copy of the
	original EDestination, rather than just using a new one.  We need
	to do this to preserve prior-card information for possible
	reversion later.
	(e_select_names_text_model_delete): Ditto.

	* backend/ebook/e-destination.c (e_destination_clear_card): When
	clearing a destination where ->card != NULL, store it for possible
	reversion later.
	(e_destination_revert): If we have an old card stored, go back to
	using it for the destination.
	(e_destination_is_valid): Tries to detect obviously broken
	addresses.
	(e_destination_cardify): If our destination is invalid, first try
	to cardify simply by reverting to an older card.
	(e_destination_destroy): Unref any cached old card.
	(e_destination_copy): Copy the old card information.

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

	* gui/component/select-names/e-select-names.c
	(sync_table_and_models): Show all rows in the table, and then
	remove the rows that correspond to entries in the
	ESelectNamesModels in the children.
	(real_add_address): Freeze/thaw our ESelectNamesModel, so that we
	don't change our table while we are in the middle of iterating
	over the selection.
	(remove_address): Just delete the address from the
	ESelectNamesModel, the signal handler will do the rest.
	(selected_rows_foreach_cb): Call remove_address to do our dirty
	work.
	(e_select_names_add_section): Connect to the 'changed' signal from
	the ESelectNamesModel, and call sync_table_and_models explicitly to
	get our initial state correct.

	* gui/component/select-names/e-select-names-table-model.c
	(fill_in_info): Deal with EDestinations in our table that don't
	come from cards.

	* gui/component/select-names/e-select-names-manager.c: Added
	another ESelectNamesModel* to the ESelectNamesManagerSection
	struct.  Called 'original_model', this contains a copy of the
	model as it is when we begin using the SelectNames dialog.
	(section_copy): Copy the original model.
	(section_free): Free the original model.
	(e_select_names_manager_add_section_with_limit): Initialize the
	original model.
	(e_select_names_clicked): I've changed the semantics of this
	dialog quite a bit... no UI freeze can stop me!  If OK is clicked,
	we do nothing.  If Cancel is clicked, we revert to the
	'original_model' copy of our address entry state before we started
	editting.  Finally, we close the dialog before any of thing. Doing
	it last caused problems, because signals were being triggered
	which had dangling pointers as their closures.
	(e_select_names_manager_activate_dialog): Copy our current state
	to the original model, and share the same ESelectNamesModel
	between the dialog and the address entry in the composer..
	(e_select_names_manager_get_cards): Removed.  It had been
	#if 0/#endif-ed out for a while.

	* gui/component/select-names/e-select-names-model.c
	(e_select_names_model_freeze): Added.
	(e_select_names_model_thaw): Added.
	(e_select_names_model_uncardify): Added.  If possible,
	"uncardifies" a specific model entry.
	(e_select_names_model_changed): Changed to pay attention
	to the freeze count.

	* gui/component/select-names/e-select-names-completion.c
	(clean_query_text): Strip leading/trailing whitespace from
	queries.

	* backend/ebook/e-destination.c (e_destination_uncardify): Added.
	Converts a card-associated destination into a text-associated
	destination w/ the e-mail address.
	(e_destination_list_to_vector): Added.  A convenience routine.
	(e_destination_freev): Added.  A convenience routine.
	(e_destination_touchv): Added.  I'm lazy.

svn path=/trunk/; revision=12708
2001-09-09 03:38:01 +00:00
bdbd430bce (make_contact_editor_cb): show the right contact editor (the list editor
2001-09-08  Chris Toshok  <toshok@ximian.com>

	(make_contact_editor_cb): show the right contact editor (the list
	editor for list cards).

svn path=/trunk/; revision=12707
2001-09-08 21:06:49 +00:00
0faa76f9b2 do the EDestination xml magic on email addresses we put in the popup.
2001-09-08  Chris Toshok  <toshok@ximian.com>

	* gui/component/select-names/e-select-names-popup.c
	(popup_menu_card): do the EDestination xml magic on email
	addresses we put in the popup.

svn path=/trunk/; revision=12706
2001-09-08 20:51:50 +00:00
ad3b49203a For every category: - set .translate to FALSE
* gui/component/addressbook.c (addressbook_factory_new_control):
For every category:
- set .translate to FALSE (e_categories_master_list_nth returns
translated category name)
- convert category name in UTF-8 to locale's encoding

svn path=/trunk/; revision=12696
2001-09-07 23:43:36 +00:00
c0fa4148f3 Fixed two bugs: - missing coversion of contact name to GTK+ locale, -
* gui/component/select-names/e-select-names-popup.c
(popup_menu_card): Fixed two bugs:
- missing coversion of contact name to GTK+ locale,
- passing dynamically created string (contact name) inside uiinfo struct
to gnome-app-helper functions.
Remember: these functions may change strings, trying to translate them!
(popup_menu_nocard): Ditto

svn path=/trunk/; revision=12694
2001-09-07 23:42:30 +00:00
3e65ef81be Removed unused factory variable.
2001-09-07  Christopher James Lahey  <clahey@ximian.com>

	* gui/component/addressbook-component.c: Removed unused factory
	variable.

svn path=/trunk/; revision=12687
2001-09-07 21:18:18 +00:00
88ab051728 new function, notify the bonobo listener. (remove_ldap_folder): track
2001-09-06  Chris Toshok  <toshok@ximian.com>

	* gui/component/addressbook-storage.c (notify_listener): new
	function, notify the bonobo listener.
	(remove_ldap_folder): track change to EvolutionStorage signal.
	(create_ldap_folder): same, and make sure the type is
	"ldap-contacts".
	(load_source_data): folders that we create should have
	"ldap-contacts" as their type.
	(addressbook_storage_add_source): same.

	* gui/component/addressbook-component.c: (folder_types): add
	"ldap-contacts", for display of ldap servers (they get their own
	icon, and their own name in the Create New Folder dialog.
	(create_view): use IS_CONTACT_TYPE since we support two folder
	types now.
	(create_folder): same.
	(remove_folder): same.
	(xfer_folder): same.

svn path=/trunk/; revision=12668
2001-09-07 02:02:06 +00:00
0256665bc7 change /Toolbar/ContactEditorSave to /Toolbar/ContactEditorSaveClose.
2001-09-06  Chris Toshok  <toshok@ximian.com>

	* gui/contact-editor/e-contact-editor.c: (pixmaps): change
	/Toolbar/ContactEditorSave to /Toolbar/ContactEditorSaveClose.

svn path=/trunk/; revision=12665
2001-09-07 01:07:41 +00:00
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
d6dd049331 [Fix #958, ShellComponents should not be created by factories, for
the addressbook.]

* gui/component/addressbook-component.c
(GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_FACTORY_ID): Removed.
(GNOME_EVOLUTION_ADDRESSBOOK_COMPONENT_ID): New.
(create_component): Renamed from `factory_fn'.  Just register the
thing on OAF.
(addressbook_component_factory_init): Just call it.

* gui/component/GNOME_Evolution_Addressbook.oaf.in: Remove the
ShellComponentFactory.

svn path=/trunk/; revision=12642
2001-09-05 23:10:07 +00:00
bd7a7a7bb9 Check if the file is a VCard before importing
svn path=/trunk/; revision=12610
2001-09-04 23:11:00 +00:00
93b7d21156 I18n fixes (mainly making buttons on the right side less Anglocentric :-)
* backend/ebook/e-card-simple.c
(field_data): Marked "name" and "short_name" fields for translation.
(e_card_simple_get_name, e_card_simple_get_short_name): Return
localized version of the name (using U_() macro).

* gui/contact-editor/e-contact-editor.c (set_entry_changed_signals):
Connect "changed" signal from "entry-web" entry to widget_changed.
(changing this field wasn't making "Save and Close" button sensitive)

* gui/widgets/Makefile.am (glade_DATA): Removed alphabet.glade.

* gui/widgets/e-addressbook-view.c
(button_labels, button_letters): New strings containing a list of
labels and "values" of all buttons placed on the right side of the
addressbook view (intended for localization).
(struct LetterClosure): Changed the type of letter field to gunichar.
(e_utf8_split): New function, similar to g_strsplit, but operates on
UTF-8 strings.
(jump_to_letter): Don't hardcode letters, build queries dynamically
using UTF-8 and localized letters stored in button_letters.
(connect_button): Removed.
(create_alphabet): Don't use glade file, build buttons manually using
(localized) labels from button_labels. Use (localized) values from
button_letters when creating LetterClosure.

* gui/widgets/e-minicard-view-widget.[ch]
(e_minicard_view_widget_jump_to_letter): Changed the type of the
second argument from char to gunichar.

* gui/widgets/e-minicard-view.c
(compare_to_utf_str): Renamed from compare_to_letter, now operates on
UTF-8 string.
(e_minicard_view_jump_to_letter): Changed the type of the second
argument from char to gunichar + conversion to UTF-8 string.

* gui/widgets/e-minicard-view.h
(e_minicard_view_jump_to_letter): Changed the type of the second
argument from char to gunichar.

svn path=/trunk/; revision=12563
2001-09-02 20:09:16 +00:00
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
ac5c6bb283 s/_/U_/
* gui/component/addressbook-storage.c
(addressbook_get_other_contact_storage): s/_/U_/

* gui/widgets/e-addressbook-reflow-adapter.c (addressbook_compare):
Use g_utf8_collate.

* gui/widgets/e-minicard.c (e_minicard_compare):
Ditto.

* printing/e-contact-print.c (card_compare):
Ditto.

svn path=/trunk/; revision=12542
2001-08-31 21:42:21 +00:00
19ec5dbb3b Use e_select_names_model_merge to combine the selected names with any
2001-08-29  Jon Trowbridge  <trow@ximian.com>

	* gui/component/select-names/e-select-names-manager.c
	(e_select_names_clicked): Use e_select_names_model_merge to
	combine the selected names with any existing ones.  This causes
	you to not lose addresses typed directly into the entry while the
	SelectNames dialog is up. (Bug #8058)

	* gui/component/select-names/e-select-names-model.c
	(e_select_names_model_merge): Merge the contents of one
	ESelectNamesModel into another, avoiding duplicates.

	* backend/ebook/e-destination.c (e_destination_equal): Added.
	Determines if two destinations appear to refer to the same
	recipient.

	* backend/ebook/e-card.c (e_card_list_send): Added cast to
	g_free args to silence compiler warnings.

svn path=/trunk/; revision=12526
2001-08-30 04:57:18 +00:00
206e67a5a6 Paranoia. Check that name != qa->name. (quick_add_set_email): Check that
2001-08-29  Jon Trowbridge  <trow@ximian.com>

	* gui/contact-editor/e-contact-quick-add.c (quick_add_set_name):
	Paranoia.  Check that name != qa->name.
	(quick_add_set_email): Check that email != qa->email.
	(ce_have_book): Store the QuickAdd data structure in object data,
	so that we can be extra-careful and avoid having a dangling
	pointer floating around out somewhere as the closure for a signal.
	Fixes bug #8155, I think.
	(card_added_cb): Clear object data to ensure single unref.
	(editor_closed_cb): Clear object data to ensure single unref.

svn path=/trunk/; revision=12525
2001-08-30 04:14:17 +00:00
1cae0f1a15 Make sure that comp->priv->query_text isn't NULL. (Fixes bug #8195)
2001-08-29  Jon Trowbridge  <trow@ximian.com>

	* gui/component/select-names/e-select-names-completion.c
	(book_query_score): Make sure that comp->priv->query_text isn't
	NULL.  (Fixes bug #8195)

svn path=/trunk/; revision=12524
2001-08-30 03:39:57 +00:00
e4c70cd2f5 This function can be re-entrant during the signal emission; Added extra
2001-08-29  Jon Trowbridge  <trow@ximian.com>

	* backend/ebook/e-book-listener.c (e_book_listener_check_queue):
	This function can be re-entrant during the signal emission; Added
	extra ref/unrefs and checks to avoid problems if this happens.
	This is similar to my recent changes to
	e_book_view_listener_check_queue.  (Fixes bug #7400)

svn path=/trunk/; revision=12523
2001-08-30 03:28:56 +00:00