aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-02-25 16:58:34 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-02-25 16:58:34 +0000
commit0bb962f688ea74f1af711ba322ee60f12067c8e5 (patch)
tree3ef34f9d4adefa12e3f3a03b2116faf85f8243ef /src
parent653c7072de11219f4f6081a6bee71158602d01ab (diff)
parent7c9e1197d27170a3cb43e61b523a3b01a0c1f4bd (diff)
downloadayatana-indicator-datetime-0bb962f688ea74f1af711ba322ee60f12067c8e5.tar.gz
ayatana-indicator-datetime-0bb962f688ea74f1af711ba322ee60f12067c8e5.tar.bz2
ayatana-indicator-datetime-0bb962f688ea74f1af711ba322ee60f12067c8e5.zip
Fix g_assert_if_reached() in EdsPlanner::on_source_enabled(). Fixes: 1283610
Diffstat (limited to 'src')
-rw-r--r--src/planner-eds.cpp29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/planner-eds.cpp b/src/planner-eds.cpp
index c4d2932..da406eb 100644
--- a/src/planner-eds.cpp
+++ b/src/planner-eds.cpp
@@ -128,20 +128,33 @@ private:
{
auto self = static_cast<Impl*>(gself);
ECalClientSourceType source_type;
+ bool client_wanted = false;
if (e_source_has_extension(source, E_SOURCE_EXTENSION_CALENDAR))
+ {
source_type = E_CAL_CLIENT_SOURCE_TYPE_EVENTS;
+ client_wanted = true;
+ }
else if (e_source_has_extension(source, E_SOURCE_EXTENSION_TASK_LIST))
+ {
source_type = E_CAL_CLIENT_SOURCE_TYPE_TASKS;
+ client_wanted = true;
+ }
+
+ const auto source_uid = e_source_get_uid(source);
+ if (client_wanted)
+ {
+ g_debug("%s connecting a client to source %s", G_STRFUNC, source_uid);
+ e_cal_client_connect(source,
+ source_type,
+ self->m_cancellable,
+ on_client_connected,
+ gself);
+ }
else
- g_assert_not_reached();
-
- g_debug("connecting a client to source %s", e_source_get_uid(source));
- e_cal_client_connect(source,
- source_type,
- self->m_cancellable,
- on_client_connected,
- gself);
+ {
+ g_debug("%s not using source %s -- no tasks/calendar", G_STRFUNC, source_uid);
+ }
}
static void on_client_connected(GObject* /*source*/, GAsyncResult * res, gpointer gself)