aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'modules/addressbook')
-rw-r--r--modules/addressbook/e-book-shell-view-private.c38
1 files changed, 9 insertions, 29 deletions
diff --git a/modules/addressbook/e-book-shell-view-private.c b/modules/addressbook/e-book-shell-view-private.c
index 8bb90fe758..70fb2c32b0 100644
--- a/modules/addressbook/e-book-shell-view-private.c
+++ b/modules/addressbook/e-book-shell-view-private.c
@@ -214,8 +214,8 @@ book_shell_view_client_connect_cb (GObject *source_object,
EAddressbookModel *model;
GError *error = NULL;
- client = e_client_cache_get_client_finish (
- E_CLIENT_CACHE (source_object), result, &error);
+ client = e_client_selector_get_client_finish (
+ E_CLIENT_SELECTOR (source_object), result, &error);
/* Sanity check. */
g_return_if_fail (
@@ -256,13 +256,10 @@ static void
book_shell_view_activate_selected_source (EBookShellView *book_shell_view,
ESourceSelector *selector)
{
- EShell *shell;
EShellView *shell_view;
- EShellBackend *shell_backend;
EBookShellContent *book_shell_content;
EAddressbookView *view;
EAddressbookModel *model;
- EClientCache *client_cache;
ESource *source;
GalViewInstance *view_instance;
GHashTable *hash_table;
@@ -271,9 +268,6 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view,
gchar *view_id;
shell_view = E_SHELL_VIEW (book_shell_view);
- shell_backend = e_shell_view_get_shell_backend (shell_view);
- shell = e_shell_backend_get_shell (shell_backend);
- client_cache = e_shell_get_client_cache (shell);
book_shell_content = book_shell_view->priv->book_shell_content;
source = e_source_selector_ref_primary_selection (selector);
@@ -286,21 +280,8 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view,
widget = g_hash_table_lookup (hash_table, uid);
if (widget != NULL) {
- /* There is a view for this UID. Make sure the view
- * actually contains an EBook. The absence of an EBook
- * suggests a previous load failed, so try again. */
view = E_ADDRESSBOOK_VIEW (widget);
model = e_addressbook_view_get_model (view);
- source = e_addressbook_view_get_source (view);
-
- if (e_addressbook_model_get_client (model) == NULL)
- /* XXX No way to cancel this? */
- e_client_cache_get_client (
- client_cache, source,
- E_SOURCE_EXTENSION_ADDRESS_BOOK,
- NULL,
- book_shell_view_client_connect_cb,
- g_object_ref (view));
} else {
/* Create a view for this UID. */
@@ -342,14 +323,6 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view,
view = E_ADDRESSBOOK_VIEW (widget);
model = e_addressbook_view_get_model (view);
- /* XXX No way to cancel this? */
- e_client_cache_get_client (
- client_cache, source,
- E_SOURCE_EXTENSION_ADDRESS_BOOK,
- NULL,
- book_shell_view_client_connect_cb,
- g_object_ref (view));
-
g_signal_connect_object (
model, "contact-changed",
G_CALLBACK (contact_changed),
@@ -366,6 +339,13 @@ book_shell_view_activate_selected_source (EBookShellView *book_shell_view,
book_shell_view, G_CONNECT_SWAPPED);
}
+ /* XXX No way to cancel this? */
+ e_client_selector_get_client (
+ E_CLIENT_SELECTOR (selector),
+ source, NULL,
+ book_shell_view_client_connect_cb,
+ g_object_ref (view));
+
e_book_shell_content_set_current_view (
book_shell_content, E_ADDRESSBOOK_VIEW (widget));