diff options
author | Chris Toshok <toshok@ximian.com> | 2001-06-20 08:34:24 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2001-06-20 08:34:24 +0800 |
commit | 68a1984433b5b8597ea7cf99fc2417a30dc2d89d (patch) | |
tree | 664e7ed4c630bd1ea7a0324e6fdd4a864c65dd23 /addressbook/backend | |
parent | 454aa19e8b0a6a5ffa7eef70dcbbf122760dcdb3 (diff) | |
download | gsoc2013-evolution-68a1984433b5b8597ea7cf99fc2417a30dc2d89d.tar gsoc2013-evolution-68a1984433b5b8597ea7cf99fc2417a30dc2d89d.tar.gz gsoc2013-evolution-68a1984433b5b8597ea7cf99fc2417a30dc2d89d.tar.bz2 gsoc2013-evolution-68a1984433b5b8597ea7cf99fc2417a30dc2d89d.tar.lz gsoc2013-evolution-68a1984433b5b8597ea7cf99fc2417a30dc2d89d.tar.xz gsoc2013-evolution-68a1984433b5b8597ea7cf99fc2417a30dc2d89d.tar.zst gsoc2013-evolution-68a1984433b5b8597ea7cf99fc2417a30dc2d89d.zip |
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
Diffstat (limited to 'addressbook/backend')
-rw-r--r-- | addressbook/backend/ebook/e-book-listener.c | 2 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-book-types.h | 1 | ||||
-rw-r--r-- | addressbook/backend/idl/addressbook.idl | 1 | ||||
-rw-r--r-- | addressbook/backend/pas/pas-backend-ldap.c | 8 |
4 files changed, 6 insertions, 6 deletions
diff --git a/addressbook/backend/ebook/e-book-listener.c b/addressbook/backend/ebook/e-book-listener.c index f9d4f67f97..b483d10d87 100644 --- a/addressbook/backend/ebook/e-book-listener.c +++ b/addressbook/backend/ebook/e-book-listener.c @@ -480,6 +480,8 @@ e_book_listener_convert_status (const GNOME_Evolution_Addressbook_BookListener_C return E_BOOK_STATUS_PERMISSION_DENIED; case GNOME_Evolution_Addressbook_BookListener_CardNotFound: return E_BOOK_STATUS_CARD_NOT_FOUND; + case GNOME_Evolution_Addressbook_BookListener_CardIdAlreadyExists: + return E_BOOK_STATUS_CARD_ID_ALREADY_EXISTS; case GNOME_Evolution_Addressbook_BookListener_ProtocolNotSupported: return E_BOOK_STATUS_PROTOCOL_NOT_SUPPORTED; case GNOME_Evolution_Addressbook_BookListener_OtherError: diff --git a/addressbook/backend/ebook/e-book-types.h b/addressbook/backend/ebook/e-book-types.h index d7eee35ede..d6d69b4b20 100644 --- a/addressbook/backend/ebook/e-book-types.h +++ b/addressbook/backend/ebook/e-book-types.h @@ -22,6 +22,7 @@ typedef enum { E_BOOK_STATUS_REPOSITORY_OFFLINE, E_BOOK_STATUS_PERMISSION_DENIED, E_BOOK_STATUS_CARD_NOT_FOUND, + E_BOOK_STATUS_CARD_ID_ALREADY_EXISTS, E_BOOK_STATUS_PROTOCOL_NOT_SUPPORTED, E_BOOK_STATUS_CANCELLED, E_BOOK_STATUS_OTHER_ERROR diff --git a/addressbook/backend/idl/addressbook.idl b/addressbook/backend/idl/addressbook.idl index 877813e5d3..583824bba2 100644 --- a/addressbook/backend/idl/addressbook.idl +++ b/addressbook/backend/idl/addressbook.idl @@ -105,6 +105,7 @@ module Addressbook { RepositoryOffline, PermissionDenied, CardNotFound, + CardIdAlreadyExists, ProtocolNotSupported, AuthenticationFailed, AuthenticationRequired, diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c index ae683594c5..9562441181 100644 --- a/addressbook/backend/pas/pas-backend-ldap.c +++ b/addressbook/backend/pas/pas-backend-ldap.c @@ -29,12 +29,6 @@ #define OPENLDAP1 #endif -#if 0 -#ifdef OPENLDAP1 -#define LDAP_NAME_ERROR(x) NAME_ERROR(x) -#endif -#endif - #ifdef OPENLDAP2 #include "ldap_schema.h" #endif @@ -530,6 +524,8 @@ ldap_error_to_response (int ldap_error) return GNOME_Evolution_Addressbook_BookListener_PermissionDenied; else if (ldap_error == LDAP_SERVER_DOWN) return GNOME_Evolution_Addressbook_BookListener_RepositoryOffline; + else if (ldap_error == LDAP_ALREADY_EXISTS) + return GNOME_Evolution_Addressbook_BookListener_CardIdAlreadyExists; else return GNOME_Evolution_Addressbook_BookListener_OtherError; } |