aboutsummaryrefslogtreecommitdiff
path: root/include/datetime/clock-mock.h
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-09-15 21:02:48 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-09-15 21:02:48 +0000
commit851e7e1493ad8268ccef813cb1cc0f7597ee3560 (patch)
tree47c0598e5ac78fd037fe12f010f56948c984a1f3 /include/datetime/clock-mock.h
parentf337a0fd3b8040d83b2433a8076f70fea345edad (diff)
parentc0055ef9118a7a284b26d164617985236a2d432a (diff)
downloadayatana-indicator-datetime-851e7e1493ad8268ccef813cb1cc0f7597ee3560.tar.gz
ayatana-indicator-datetime-851e7e1493ad8268ccef813cb1cc0f7597ee3560.tar.bz2
ayatana-indicator-datetime-851e7e1493ad8268ccef813cb1cc0f7597ee3560.zip
Update the time strings when a powerd Wakeup signal is detected. Fixes: 1359802
Approved by: Ted Gould, PS Jenkins bot
Diffstat (limited to 'include/datetime/clock-mock.h')
-rw-r--r--include/datetime/clock-mock.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/datetime/clock-mock.h b/include/datetime/clock-mock.h
index fb9b52f..0e24377 100644
--- a/include/datetime/clock-mock.h
+++ b/include/datetime/clock-mock.h
@@ -41,15 +41,23 @@ public:
DateTime localtime() const { return m_localtime; }
- void set_localtime(const DateTime& dt) {
+ void set_localtime(const DateTime& dt)
+ {
const auto old = m_localtime;
- m_localtime = dt;
+
+ set_localtime_quietly(dt);
+
if (!DateTime::is_same_minute(old, m_localtime))
minute_changed();
if (!DateTime::is_same_day(old, m_localtime))
date_changed();
}
+ void set_localtime_quietly(const DateTime& dt)
+ {
+ m_localtime = dt;
+ }
+
private:
DateTime m_localtime;
};