aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-03-01 23:46:19 +0800
committerMilan Crha <mcrha@redhat.com>2013-03-01 23:47:37 +0800
commit662ed02cc773a4fd2d90edea3b6dd9f4b80d2ba8 (patch)
tree4d2f94bb68c98f53d9125b631564a8fce89c7e9d /e-util
parent656c1fbba6f245e3cbe2522b1de38ee98cde991f (diff)
downloadgsoc2013-evolution-662ed02cc773a4fd2d90edea3b6dd9f4b80d2ba8.tar
gsoc2013-evolution-662ed02cc773a4fd2d90edea3b6dd9f4b80d2ba8.tar.gz
gsoc2013-evolution-662ed02cc773a4fd2d90edea3b6dd9f4b80d2ba8.tar.bz2
gsoc2013-evolution-662ed02cc773a4fd2d90edea3b6dd9f4b80d2ba8.tar.lz
gsoc2013-evolution-662ed02cc773a4fd2d90edea3b6dd9f4b80d2ba8.tar.xz
gsoc2013-evolution-662ed02cc773a4fd2d90edea3b6dd9f4b80d2ba8.tar.zst
gsoc2013-evolution-662ed02cc773a4fd2d90edea3b6dd9f4b80d2ba8.zip
Never ever pre-fetch anything in EClientSelector
That's the worst idea for many reasons, couple examples: - password prompts after evolution's run for disabled (in selector) sources - too much unnecessary network I/O (most remote backends runs sync on open) - doesn't do what user told it to do (Unselected means unselected. Dot.) - unable to debug anything in factories when it misbehaves this way Next time ask peers, users and usability experts for their opinion, before doing such decision.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-client-selector.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/e-util/e-client-selector.c b/e-util/e-client-selector.c
index 1c3a71e916..802310fc47 100644
--- a/e-util/e-client-selector.c
+++ b/e-util/e-client-selector.c
@@ -132,21 +132,6 @@ client_selector_client_created_cb (EClientCache *client_cache,
}
static void
-client_selector_prefetch_cb (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
-{
- EClient *client;
-
- /* We don't care about errors here. This is just to try and
- * get the EClient instances we'll need cached ahead of time. */
- client = e_client_selector_get_client_finish (
- E_CLIENT_SELECTOR (source_object), result, NULL);
-
- g_clear_object (&client);
-}
-
-static void
client_selector_client_notify_cb (EClientCache *client_cache,
EClient *client,
GParamSpec *pspec,
@@ -239,12 +224,9 @@ client_selector_constructed (GObject *object)
{
EClientSelector *selector;
EClientCache *client_cache;
- ESourceRegistry *registry;
GtkTreeView *tree_view;
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
- const gchar *extension_name;
- GList *list, *link;
gulong handler_id;
selector = E_CLIENT_SELECTOR (object);
@@ -288,24 +270,6 @@ client_selector_constructed (GObject *object)
selector->priv->client_notify_online_handler_id = handler_id;
g_object_unref (client_cache);
-
- /* Pre-fetch EClient instances for all relevant ESources.
- * This is just to try and make sure they get cached ahead
- * of time, so we need not worry about reporting errors. */
-
- registry = e_source_selector_get_registry (
- E_SOURCE_SELECTOR (selector));
- extension_name = e_source_selector_get_extension_name (
- E_SOURCE_SELECTOR (selector));
-
- list = e_source_registry_list_sources (registry, extension_name);
-
- for (link = list; link != NULL; link = g_list_next (link))
- e_client_selector_get_client (
- selector, E_SOURCE (link->data), NULL,
- client_selector_prefetch_cb, NULL);
-
- g_list_free_full (list, (GDestroyNotify) g_object_unref);
}
static void