aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-09-16 15:14:39 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-09-16 15:14:39 -0500
commit6863994ff1cb0aa2df940d94e88dbf324ece8132 (patch)
tree067e1b280d6a9b962d383f553aa71f73ef2f4ca8
parent13fd249f0f4ff0aece96ae5925be76c8d7ca089e (diff)
downloadayatana-indicator-datetime-6863994ff1cb0aa2df940d94e88dbf324ece8132.tar.gz
ayatana-indicator-datetime-6863994ff1cb0aa2df940d94e88dbf324ece8132.tar.bz2
ayatana-indicator-datetime-6863994ff1cb0aa2df940d94e88dbf324ece8132.zip
in SimpleRangePlanner, re-query the engine for appointments when the local timezone changes.
-rw-r--r--src/planner-range.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/planner-range.cpp b/src/planner-range.cpp
index 41b0f56..c223665 100644
--- a/src/planner-range.cpp
+++ b/src/planner-range.cpp
@@ -28,7 +28,7 @@ namespace datetime {
***/
SimpleRangePlanner::SimpleRangePlanner(const std::shared_ptr<Engine>& engine,
- const std::shared_ptr<Timezone>& timezone):
+ const std::shared_ptr<Timezone>& timezone):
m_engine(engine),
m_timezone(timezone),
m_range(std::pair<DateTime,DateTime>(DateTime::NowLocal(), DateTime::NowLocal()))
@@ -38,6 +38,11 @@ SimpleRangePlanner::SimpleRangePlanner(const std::shared_ptr<Engine>& engine,
rebuild_soon();
});
+ m_timezone->timezone.changed().connect([this](const std::string& s){
+ g_debug("RangePlanner %p rebuilding soon because the timezone changed to '%s'", this, s.c_str());
+ rebuild_soon();
+ });
+
range().changed().connect([this](const std::pair<DateTime,DateTime>&){
g_debug("rebuilding because the date range changed");
rebuild_soon();