diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-01-31 11:46:08 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-01-31 11:46:08 +0000 |
commit | 089df7ae2d97966b789231e112709183483c64eb (patch) | |
tree | 0d8f4a2a9e99f61c5d7946653e7dd9eb3aac66d0 /README | |
parent | cbb15a8fefaf70b03434b055cf41185c4009fb10 (diff) | |
parent | 271b0fbf8b14a4f7a8f47de0e3a8751bd50676c3 (diff) | |
download | ayatana-indicator-datetime-089df7ae2d97966b789231e112709183483c64eb.tar.gz ayatana-indicator-datetime-089df7ae2d97966b789231e112709183483c64eb.tar.bz2 ayatana-indicator-datetime-089df7ae2d97966b789231e112709183483c64eb.zip |
Finally land this. Other, still open bugs will be fixed in subsequent commits. Fixes: 793450, 1271484, 1274046
Diffstat (limited to 'README')
-rw-r--r-- | README | 53 |
1 files changed, 53 insertions, 0 deletions
@@ -68,3 +68,56 @@ CUSTOM MENUITEMS - x-canonical-time-format s strftime format string + +CODE +==== + +Model + + The app's model is represented by the "State" class, and "Menu" objects + are the corresponding views. "State" is a simple container for various + properties, and menus connect to those properties' changed() signals to + know when the view needs to be refreshed. + + As one can see in main.c, the app's very simple flow is to instantiate + a state and its properties, build menus that correspond to the state, + and export the menus on DBus. + + Because State is a simple aggregate of its components (such as a "Clock" + or "Planner" object to get the current time and upcoming appointments, + respectively), one can plug in live components for production and mock + components for unit tests. The entire backend can be mix-and-matched by + adding the desired test-or-production components. + + Start with: + include/datetime/state.h + include/datetime/clock.h + include/datetime/locations.h + include/datetime/planner.h + include/datetime/settings.h + include/datetime/timezones.h + + Implementations: + include/datetime/settings-live.h + include/datetime/locations-settings.h + include/datetime/planner-eds.h + include/datetime/timezones-live.h + +View + + Menu is a mostly-opaque class to wrap GMenu code. Its subclasses contain + the per-profile logic of which sections/menuitems to show and which to hide. + Menus are instantiated via the MenuFactory, which takes a state and profile. + + Actions is a mostly-opaque class to wrap our GActionGroup. Its subclasses + contain the code that actually executed when an action is triggered (ie, + LiveActions for production and MockActions for testing). + + Exporter exports the Actions and Menus onto the DBus, and also emits a + signal if/when the busname is lost so indicator-datetime-service knows + when to exit. + + include/datetime/menu.h + include/datetime/actions.h + include/datetime/exporter.h + |