diff options
author | Chris Toshok <toshok@ximian.com> | 2002-05-24 18:32:16 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-05-24 18:32:16 +0800 |
commit | 5009d8d479665301efdec3beb784e252fa29527d (patch) | |
tree | e10ee876f17a16a92910bea10bfd4cc0c694cad7 /addressbook/gui/component/addressbook.c | |
parent | f836bed24997c679b99762ac81c8475110d29251 (diff) | |
download | gsoc2013-evolution-5009d8d479665301efdec3beb784e252fa29527d.tar.gz gsoc2013-evolution-5009d8d479665301efdec3beb784e252fa29527d.tar.zst gsoc2013-evolution-5009d8d479665301efdec3beb784e252fa29527d.zip |
[ #24189 ] ifdef out the body of this because it only works with a single
2002-05-24 Chris Toshok <toshok@ximian.com>
[ #24189 ]
* gui/component/select-names/e-select-names-manager.c
(focus_out_cb): ifdef out the body of this because it only works
with a single completion book. not sure what to do here, but it
doesn't impact most usage scenarios.
(completion_popup_cb): same.
(e_select_names_manager_entry_new): add the books that have been
loaded successfully by the time this entry is created.
(open_book_cb): add the opened book to the entries that have
already been created, and store it in our list so that entries
that are created in the future can catch up.
(read_completion_books_from_db): slurp in the folder list from the
config db and load all the uris.
(uris_listener): listener function - when there's a change it
calls _clear_books on all the created entries, and clears our
list. It then re-reads the books from the db.
(e_select_names_manager_new): create our bonobo listener and call
read_completion_books_from_db.
(e_select_names_manager_init): init completion_books.
(e_select_names_manager_destroy): free our list of
completion_books.
* gui/component/select-names/e-select-names-manager.h: switch from
a single EBook to a GList of completion_books here.
* gui/component/select-names/e-select-names-completion.c
(e_select_names_completion_add_book): deal with the case where
there's an active query (by effectively restarting it.) This is
quite a contrived edge case.
(e_select_names_completion_clear_books): stop the current query
and clear our list of books.
(e_select_names_completion_new): track change to prototype, and
axe the majority of this method since an EBook* isn't passed
anymore.
(e_select_names_completion_clear_book_data): split this code out
from the destroy method so it can be called from _clear_books.
* gui/component/select-names/e-select-names-completion.h: the
constructor no longer takes an EBook -- pass in as many as you
want using _add_book. Also, add prototype for _clear_books.
* gui/component/addressbook.c (load_uri_cb): when
storing/retrieving passwords, use the cleaned (without params)
version of the uri, so changing things like download limit don't
cause the user to be prompted for a password again.
* gui/component/addressbook-component.c
(ensure_completion_uris_exist): new function - probably doesn't
belong in this file. Make sure the basic local Contacts folder
exists in the completion uris.
(addressbook_component_factory_init): call
ensure_completion_uris_exist.
* backend/ebook/e-book-util.h: add prototype for
e_book_get_default_book_uri.
* backend/ebook/e-book-util.c (e_book_get_default_book_uri): new
function, just return the default contacts uri.
(e_book_load_default_book): change
to use e_book_get_default_book_uri.
svn path=/trunk/; revision=16999
Diffstat (limited to 'addressbook/gui/component/addressbook.c')
-rw-r--r-- | addressbook/gui/component/addressbook.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index b74b946098..8c585917d4 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -632,8 +632,13 @@ load_uri_cb (EBook *book, EBookStatus status, gpointer closure) source->auth != ADDRESSBOOK_LDAP_AUTH_NONE) { const char *password; char *pass_dup = NULL; + char *uri = g_strdup (e_book_get_uri (book)); + char *semicolon = strchr (uri, ';'); - password = e_passwords_get_password (e_book_get_uri (book)); + if (semicolon) + *semicolon = '\0'; + + password = e_passwords_get_password (uri); if (!password) { char *prompt; @@ -647,7 +652,7 @@ load_uri_cb (EBook *book, EBookStatus status, gpointer closure) source->name, source->email_addr); remember = source->remember_passwd; pass_dup = e_passwords_ask_password ( - prompt, e_book_get_uri (book), prompt, TRUE, + prompt, uri, prompt, TRUE, E_PASSWORDS_REMEMBER_FOREVER, &remember, NULL); if (remember != source->remember_passwd) { @@ -657,6 +662,8 @@ load_uri_cb (EBook *book, EBookStatus status, gpointer closure) g_free (prompt); } + g_free (uri); + if (password || pass_dup) { char *user; |