[sugar] Sugar Clock

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Tue Oct 14 13:40:06 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eben Eliason wrote:
| On Mon, Oct 13, 2008 at 6:53 AM, Carlo Falciola <cfalciola at yahoo.it> wrote:
|> Carlo : nowhere in the default GUI there is a clock, even if, in the
control panel there is a panel to configure it. I think that personal
watches are maybe not so easily owned by kids around the word, so a
standard clock could be a little, but welcomed feature. (not talking about
the clock activity that it is more a "learn to read a clock" thing than an
everyday tool). any feedback and suggestion regarding how and where to
put/show it are welcomed.
|
| I personally would like to see this built.  I've always thought that a
| "clock device" would fit perfectly into the bottom edge of the Frame.
| I'd really like to see us rework the devices a bit so that they are
| more naturally "pluggable" (at most, the user would only have to add
| one directory at some location in the system to add a new device). In
| the future perhaps we can extend this to a user-facing management of
| installed devices.
|
| Apart from the trickiness (and potential CPU hit) of dynamically
| updating the clock icon (I envision an analog clock here, with digital
| display and date and/or calendar in the palette, so granularity would
| be on the order of a minute or so).

There are a few issues here:

1. The current Sugar icon system is problematic in general, and especially
in this case.  The Frame Device code does not allow arbitrary widgets.
Instead, each device must specify a discrete group of SVG icons.  The
device may then select one of these icons to display.  I tried to build a
frame device clock, but gave up when I realized it would require
generating hundreds of different icons.  (The same problem affects the
"signal strength meter" icons representing each network, which are
naturally continuous, but are drawn by selecting one of about 10 different
fixed icon shapes.)

Fix: change the frame device system to allow arbitrary widgets, or at
least arbitrary pixmaps.

2. The current power management system on XO provides no timed wakeups.
Timed wakeups require significant work in both the kernel and EC.  As far
as I am aware, no one is actively working on this.  Without timed wakeups,
the system could easily suspend with the clock displayed, freezing the
time and misleading users as to what time it is.  Until we have timed (or
periodic) wakeups, a clock cannot be part of the default view, because an
incorrect clock is worse than none at all.

Fix: Relegate the clock to an Activity, which can inhibit suspend when
visible, to ensure that the clock updates appropriately.  Work on EC-based
timed wakeups.  A good intermediate target might be to have the EC wake up
the system every 60 seconds without hooking into the scheduler at all, so
that any wakeups scheduled in the previous minute (e.g. from the presence
service) can fire.

3. Analog clocks are deprecated.  Outside of the West, clocks vary widely,
and 12-hour mechanical circular dial clocks are by no means the norm.  In
Europe, 24-hour digital clocks are the most common type.  Even in the US,
children often have difficulty reading small analog clocks until late in
middle school, because virtually all such clocks have been replaced by
digital displays.  The small XO screen will make an analog clock icon even
less legible.

Fix: Draw a digital clock to 1-minute precision using a simple GTK text
display.  Format the time according to strftime's %X or %c.  (See
http://docs.python.org/library/datetime.html#strftime-behavior)

- --Ben

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkj02XYACgkQUJT6e6HFtqTaCQCgmdA0T0MQ851hTh/UkSwidthj
3X0AoI8hbXoACleQ9pUglXTFEZvhHC8N
=dJni
-----END PGP SIGNATURE-----


More information about the Sugar mailing list