Moblin Applets: Date & Time

Snapshot

The main dialog

Clicking the Timezone button pops up this dialog

Overview

The date and time applet is forked from the gnome-system-tools time-admin source and is compiled as moblin-time. It's been trimmed down by removing the NTP support options and synchronization. But its most advanced addition is that it has exported all its low level system calls to moblin-system-daemon. The daemon supplies four functions: get_time, set_time, get_timezone, and set_timezone. These four functions are exposed to the moblin-time applet via DBUS so that it can carry out its work without requiring a root logon.

Files Needed

  • /usr/lib/moblin-applets/libhcpcommon.so
    • all control panel applets need this
  • /usr/lib/hildon-control-panel/time.so
    • The applet library
  • /usr/share/applications/hildon-control-panel/time.desktop
  • /usr/bin/moblin-time
    • The executable where all the code is
  • /usr/share/moblin-applets/pixmaps/world_map-960.png
    • The mercator projection displayed while choosing a time zone
  • /usr/share/moblin-applets/glade/time.glade
    • Glade XML data for the time dialog
  • /usr/share/moblin-applets/glade/common.glade
    • Glade XML common data for the time dialog

Applet Design

Code Reuse

This applet is based on Gnome System Tools' Date & Time applet