Clock activity: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (remove Category:Sugar and Category:Software as Category:Activities is their subcategory)
(Version 4)
Line 1: Line 1:
{{Olpcboxtop|toptext=[[{{PAGENAME}}|Clock Activity]]}}
{{Olpcboxtop|toptext=[[{{PAGENAME}}|Clock Activity]]}}
{{ OBX activity |[[Image:Activity-clock.svg|75px]]|extra<!--|{{{text}}}--> }}
{{ OBX activity |[[Image:Activity-clock.svg|75px]]|extra<!--|{{{text}}}--> }}
{{ OBX xobundle|http://wiki.laptop.org/images/b/bd/Clock-3.xo|Clock}}
{{ OBX xobundle|http://wiki.laptop.org/images/1/15/Clock-4.xo|Clock}}
{{ OBX test }}
{{ OBX test |[[Tests/Activity/Clock]]|2008-10-07}}
<!-- {{ OBX devtickets |clock-activity}} -->
<!-- {{ OBX devtickets |clock-activity}} -->
{{ OBX pot
{{ OBX pot
Line 8: Line 8:
}}
}}
<!-- {{ OBX source dev|projects/clock}} -->
<!-- {{ OBX source dev|projects/clock}} -->
<!-- {{ OBX test |[[Tests/Clock|Clock]]|2008-02-02 }} -->
<!-- {{ OBX devtickets |clock-activity}} -->
<!-- {{ OBX devtickets |clock-activity}} -->
<!-- {{ OBX pootle|1=http://dev.laptop.org/git?p=projects/clock;a=blob_plain;f=po/Clock.pot;hb=HEAD|2=extra}} -->
<!-- {{ OBX pootle|1=http://dev.laptop.org/git?p=projects/clock;a=blob_plain;f=po/Clock.pot;hb=HEAD|2=extra}} -->
Line 68: Line 67:


As a Python application, the full source is included in the package for you to enjoy.
As a Python application, the full source is included in the package for you to enjoy.

* Version 4 [[:Image:Clock-4.xo|Clock-4.xo package]]
* Be a better Sugar citizen: do not draw the clock when the activity does not have the focus, to save resources for other running activities.


* Version 3 [[:Image:Clock-3.xo|Clock-3.xo package]]
* Version 3 [[:Image:Clock-3.xo|Clock-3.xo package]]
Line 140: Line 142:
|language=English, French, Spanish
|language=English, French, Spanish
|language codes=en, es, fr
|language codes=en, es, fr
|bundle URL=http://wiki.laptop.org/images/1/15/Clock-4.xo
|activity version=4
|releases=7.1.0 (650), 7.1.1 (653), 7.1.2 (656), 8.1.0 (703), Candidate
|devel status=5. Production-stable
}}
{{Activity bundle
|bundle URL=http://wiki.laptop.org/images/b/bd/Clock-3.xo
|bundle URL=http://wiki.laptop.org/images/b/bd/Clock-3.xo
|activity version=3
|activity version=3
|releases=7.1.0 (650), 7.1.1 (653), 7.1.2 (656), 8.1.0 (703), Candidate
|releases=7.1.0 (650), 7.1.1 (653), 7.1.2 (656), 8.1.0 (703)
|devel status=5. Production-stable
|devel status=5. Production-stable
}}
}}

Revision as of 00:44, 8 October 2008

Activity-clock.svg
.xo BundleClock.xo
TST Tests/Activity/Clock
Need re-test: 2008-10-07
Translate-icon-55px.svg Localization
.POT file NEEDED

see more templates or propose new


  For the general public

Description & Goals

What time is it?

Summary

The Clock activity aims at two simple goals:

  • As a teaching tool to help children learn how to read time.
  • To give the children a way to know the time it is, with their XO, even they don't own a watch.

The presentation on screen has been kept simple enough to reach these two objectives.

Current Use & Goals

Click on right button to change display mode.

  • Simpler display
  • With hours numbers
  • Date and day
  • Nice clock face
  • Digital clock view

A consistent color code is used through the activity so that hours are always displayed in blue (resp. minutes and seconds), either the figures in the digital clock or the short hand in the analog clocks, or the time scale. The child will understand that these are different representations of the same concept.


Other uses

Learn how to find geographical North (or South, depending in which hemisphere you are located) using the clock hands: Findind True North Without a Compass. And from there, build a solar clock!


Screenshots

The basic clock face (v1)
The nice clock face (v1)
The basic clock face showing hours marks (Roman digits used by the French localization) (v1)
The nice clock face displaying the date with French localization (v1)

Setting the time on your XO

You can set the date and time of your XO with the Sugar Control Panel.

Packages and History

As a Python application, the full source is included in the package for you to enjoy.

* Be a better Sugar citizen: do not draw the clock when the activity does not have the focus, to save resources for other running activities.
* Added the license information needed by 8.2 activity bundles.
* Added Digital Clock.
* Better localization support.
* Color code.
* Analog clocks: simple and nice.
* Initial version.


Development

This code is released in Public Domain, so you can do whatever you want with it. This is simple enough that Python learners can try to add or change features. The whole clock code, with many detailed comments, is a 500 lines Python source.

Point of interests:

  • PyGTK events programming, when one clicks on right button.
  • Cairo drawing and Pango layout.
  • Localization. Though a clock face should look quite similar in all cultures, you can adapt the way it displays hours numbers and date. Use of Pango markup allows to adapt the views to cultural representations of date and time.
  • SVG rendering. The nice clock background is the SVG file clock.svg (drawn with Inkscape). You can change it to your liking.

Look at the README file for notes and ideas.


Localization

The Clock activity has been written with localization in mind, though a clock should look similar in all cultures. The POT file contains strftime patterns and Pango markup, so that translators can localize the application with more freedom. For instance, they can change the way date or time are displayed, the fonts to use or the size of characters.

I've provided 3 localizations for French, English and Spanish, but others are welcome!


Functional Test

  • Open the clock activity.
  • Check that it display the current time of the XO.
  • Click on right button to change clock face display. Display mode loops (simple + hours + day and date + nice clock + digital).
  • Close the activity; ensure that it closes properly.

Enhancements

  • Make the program more efficient, so it uses very little CPU time. Version 3 uses half the XO CPU power, so it slows down all other running activities.
  • Add continuous display; current display stops after a few minutes requiring a click.
  • Context menu to set the date, time, timezone, etc.
  • Add a Big Ben chime.
  • Talking clock: read aloud the time every minute.


Activity Summary

Icon: Sugar icon::Image:Activity-clock.svg
Genre: Activity genre::General Search and Discovery
Activity group: ,|x|Activity group::x}}
Short description: [[Short description::The Clock activity aims at two simple goals:
   * As a teaching tool to help children learn how to read time.
   * To give the children a way to know the time it is, with their XO, even they don't own a watch.]]
Description: [[Description::Current Use & Goals

Click on right button to change display mode.

   * Simpler display
   * With hours numbers
   * Date and day
   * Nice clock face
   * Digital clock view 

A consistent color code is used through the activity so that hours are always displayed in blue (resp. minutes and seconds), either the figures in the digital clock or the short hand in the analog clocks, or the time scale. The child will understand that these are different representations of the same concept.]]

Maintainers: ,|x|Contact person::x}}
Repository URL:
Available languages: ,|x|Available languages::x}}
Available languages (codes): ,|x|Language code::x}}
Pootle URL:
Related projects: Related projects,|x|Related projects::x}}
Contributors: ,|x|Team member::x}}
URL from which to download the latest .xo bundle Activity bundle::http://wiki.laptop.org/images/1/15/Clock-4.xo
Last tested version number: Activity version::4
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status: Devel status::5. Production-stable
Ready for testing (development has progressed to the point where testers should try it out): ,|x|Ready for testing::x}}
smoke tested :
test plan available :
test plan executed :
developer response to testing :


URL from which to download the last .xo bundle that works with old releases Activity bundle::http://wiki.laptop.org/images/b/bd/Clock-3.xo
Activity version number: Activity version::3
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status: Devel status::5. Production-stable


URL from which to download the last .xo bundle that works with old releases Activity bundle::http://wiki.laptop.org/images/5/5a/Clock-2.xo
Activity version number: Activity version::2
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status: Devel status::5. Production-stable


URL from which to download the last .xo bundle that works with old releases Activity bundle::http://wiki.laptop.org/images/d/db/Clock-1.xo
Activity version number: Activity version::1
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status: Devel status::4. Beta