diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-02-02 23:01:20 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-02-02 23:01:20 -0600 |
commit | 2934ddcc6b2c56d12eda6fcf12d8264f43bc0a12 (patch) | |
tree | d41119f33f3228e8e0115a0f0a814195104c73af /src | |
parent | fcc1ab27cbc36983be51589800d269b055356b2b (diff) | |
download | ayatana-indicator-datetime-2934ddcc6b2c56d12eda6fcf12d8264f43bc0a12.tar.gz ayatana-indicator-datetime-2934ddcc6b2c56d12eda6fcf12d8264f43bc0a12.tar.bz2 ayatana-indicator-datetime-2934ddcc6b2c56d12eda6fcf12d8264f43bc0a12.zip |
when connecting to an ECalClient, use the proper source types for events/tasks
Diffstat (limited to 'src')
-rw-r--r-- | src/planner-eds.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/planner-eds.cpp b/src/planner-eds.cpp index 79b340a..06b29d3 100644 --- a/src/planner-eds.cpp +++ b/src/planner-eds.cpp @@ -121,10 +121,18 @@ private: static void on_source_enabled(ESourceRegistry* /*registry*/, ESource* source, gpointer gself) { auto self = static_cast<Impl*>(gself); + ECalClientSourceType source_type; + + if (e_source_has_extension(source, E_SOURCE_EXTENSION_CALENDAR)) + source_type = E_CAL_CLIENT_SOURCE_TYPE_EVENTS; + else if (e_source_has_extension(source, E_SOURCE_EXTENSION_TASK_LIST)) + source_type = E_CAL_CLIENT_SOURCE_TYPE_TASKS; + else + g_assert_not_reached(); g_debug("connecting a client to source %s", e_source_get_uid(source)); e_cal_client_connect(source, - E_CAL_CLIENT_SOURCE_TYPE_EVENTS, + source_type, self->m_cancellable, on_client_connected, gself); |