Merge lp://staging/~charlesk/indicator-datetime/lp-1354400-add-snooze into lp://staging/indicator-datetime/13.10

Proposed by Charles Kerr
Status: Merged
Approved by: Charles Kerr
Approved revision: 377
Merged at revision: 370
Proposed branch: lp://staging/~charlesk/indicator-datetime/lp-1354400-add-snooze
Merge into: lp://staging/indicator-datetime/13.10
Diff against target: 849 lines (+476/-39)
21 files modified
data/com.canonical.indicator.datetime.AlarmProperties.xml (+8/-0)
data/com.canonical.indicator.datetime.gschema.xml.in (+8/-0)
include/datetime/planner-aggregate.h (+52/-0)
include/datetime/planner-snooze.h (+56/-0)
include/datetime/planner.h (+3/-2)
include/datetime/settings-live.h (+1/-0)
include/datetime/settings-shared.h (+1/-0)
include/datetime/settings.h (+1/-0)
include/datetime/snap.h (+2/-2)
src/CMakeLists.txt (+3/-0)
src/exporter.cpp (+1/-0)
src/main.cpp (+16/-16)
src/planner-aggregate.cpp (+106/-0)
src/planner-snooze.cpp (+115/-0)
src/planner.cpp (+54/-0)
src/settings-live.cpp (+12/-0)
src/snap.cpp (+11/-13)
tests/manual (+10/-0)
tests/manual-test-snap.cpp (+5/-5)
tests/test-exporter.cpp (+10/-1)
tests/test-settings.cpp (+1/-0)
To merge this branch: bzr merge lp://staging/~charlesk/indicator-datetime/lp-1354400-add-snooze
Reviewer Review Type Date Requested Status
Jussi Pakkanen (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+233154@code.staging.launchpad.net

Commit message

Add the snooze feature

Description of the change

Add the snooze feature.

There are two parts to this, adding a 'snooze-duration' property to be exported to the bus, and then the snooze implementation itself.

Both of these are pretty straightforward. snooze-duration in added to the gschema and exported to the bus as a DBus property, same as, for example, the alarm duration setting.

The snooze feature is implemented with the introduction of two new planner types: (1) SnoozePlanner, which is a planner to hold short-term, non-EDS copies of EDS appointments, but shifted into the future by snooze-duration minutes, and (2) AggregatePlanner, which aggregates multiple planners so that the alarm queue can process both the existing planner and the new snooze planner.

As an aside, I'm tempted to get rid of most of the Planner classes by making a better-defined base class (e.g., by adding a bounded time range to it). I've omitted that refactoring here to keep this MP simpler.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

Apart from the cppcheck issue this looks good.

review: Approve
Revision history for this message
Charles Kerr (charlesk) wrote :

Top-approving from Jussi's approve.

The cppcheck issue is not new to to this MP and is a false positive -- I'll take a look at it for the flint++-fixes branch.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches