[evolution] ETaskShellSidebar: Use EClientCache to determine refresh support.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] ETaskShellSidebar: Use EClientCache to determine refresh support.
- Date: Sun, 17 Feb 2013 00:03:31 +0000 (UTC)
commit 07ba01818c349ddee71cb8c4e3b45402f57f310e
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Feb 16 15:08:37 2013 -0500
ETaskShellSidebar: Use EClientCache to determine refresh support.
In task_shell_sidebar_check_state(), determine whether the selected
source supports refresh by way of e_client_cache_ref_cached_client()
and e_client_check_refresh_supported().
modules/calendar/e-task-shell-sidebar.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c
index 533231a..a7008c6 100644
--- a/modules/calendar/e-task-shell-sidebar.c
+++ b/modules/calendar/e-task-shell-sidebar.c
@@ -601,7 +601,7 @@ task_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
if (source != NULL) {
EClient *client;
ESource *collection;
- const gchar *uid;
+ EClientCache *client_cache;
has_primary_source = TRUE;
is_writable = e_source_get_writable (source);
@@ -616,12 +616,17 @@ task_shell_sidebar_check_state (EShellSidebar *shell_sidebar)
g_object_unref (collection);
}
- uid = e_source_get_uid (source);
- client = g_hash_table_lookup (
- task_shell_sidebar->priv->client_table, uid);
- refresh_supported =
- client != NULL &&
- e_client_check_refresh_supported (client);
+ client_cache = task_shell_sidebar_ref_client_cache (
+ E_TASK_SHELL_SIDEBAR (shell_sidebar));
+ client = e_client_cache_ref_cached_client (
+ client_cache, source, E_SOURCE_EXTENSION_TASK_LIST);
+ g_object_unref (client_cache);
+
+ if (client != NULL) {
+ refresh_supported =
+ e_client_check_refresh_supported (client);
+ g_object_unref (client);
+ }
g_object_unref (source);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]