Merge lp://staging/~charlesk/indicator-datetime/fix-833337 into lp://staging/indicator-datetime/0.4
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Ted Gould | ||||||||
Approved revision: | 169 | ||||||||
Merged at revision: | 156 | ||||||||
Proposed branch: | lp://staging/~charlesk/indicator-datetime/fix-833337 | ||||||||
Merge into: | lp://staging/indicator-datetime/0.4 | ||||||||
Prerequisite: | lp://staging/~charlesk/indicator-datetime/fix-leaks | ||||||||
Diff against target: |
406 lines (+141/-188) 1 file modified
src/datetime-service.c (+141/-188) |
||||||||
To merge this branch: | bzr merge lp://staging/~charlesk/indicator-datetime/fix-833337 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ted Gould (community) | Approve | ||
Review via email: mp+95719@code.staging.launchpad.net |
This proposal supersedes a proposal from 2012-03-02.
Description of the change
This addresses Bug #833337 (Duplicate locations) and Bug #833325 (locations not in time order).
We have three sources that we draw location candidates from:
- our geographic location, drawn from geoclue
- our current location, drawn from /etc/timezone
- the user-specified locations in g-c-c -> Time & Date -> Clock -> Time in other locations + Choose Locations
This patch builds a list from these three sources, and omits duplicates by testing for entries that have the same 'name' property *and* the same timezone offset from UTC. So if there were entries for Amsterdam NY and Amsterdam Netherlands, both would be used. But if there were two entries for Amsterdam NY, one would be omitted.
The list is then sorted in timezone order for Bug #833325, and DbusmenuMeuitems are created for each item in the list.
This code is branched from lp:~charlesk/indicator-datetime/fix-leaks, which does what it says on the tin.
Resubmitted to make the fix-leaks branch a prereq branch