diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-02-17 04:05:49 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-02-17 07:57:11 +0800 |
commit | 70e28753ec762a22e0a60a3d5122b30381fd2bb9 (patch) | |
tree | 7b90dc7a77813397b57e37adf0d7c33f73d733b1 | |
parent | a67574e9e1d2bcf1608c16d332f68665ef0198fd (diff) | |
download | gsoc2013-evolution-70e28753ec762a22e0a60a3d5122b30381fd2bb9.tar gsoc2013-evolution-70e28753ec762a22e0a60a3d5122b30381fd2bb9.tar.gz gsoc2013-evolution-70e28753ec762a22e0a60a3d5122b30381fd2bb9.tar.bz2 gsoc2013-evolution-70e28753ec762a22e0a60a3d5122b30381fd2bb9.tar.lz gsoc2013-evolution-70e28753ec762a22e0a60a3d5122b30381fd2bb9.tar.xz gsoc2013-evolution-70e28753ec762a22e0a60a3d5122b30381fd2bb9.tar.zst gsoc2013-evolution-70e28753ec762a22e0a60a3d5122b30381fd2bb9.zip |
EMemoShellSidebar: Use EClientCache to determine refresh support.
In memo_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().
-rw-r--r-- | modules/calendar/e-memo-shell-sidebar.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c index d8764eea2c..bc09d90972 100644 --- a/modules/calendar/e-memo-shell-sidebar.c +++ b/modules/calendar/e-memo-shell-sidebar.c @@ -601,7 +601,7 @@ memo_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 @@ memo_shell_sidebar_check_state (EShellSidebar *shell_sidebar) g_object_unref (collection); } - uid = e_source_get_uid (source); - client = g_hash_table_lookup ( - memo_shell_sidebar->priv->client_table, uid); - refresh_supported = - client != NULL && - e_client_check_refresh_supported (client); + client_cache = memo_shell_sidebar_ref_client_cache ( + E_MEMO_SHELL_SIDEBAR (shell_sidebar)); + client = e_client_cache_ref_cached_client ( + client_cache, source, E_SOURCE_EXTENSION_MEMO_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); } |