Moblin Applets: Buttons

Snapshot

Overview

The buttons applet is designed to allow the user to create keyboard shortcuts for frequently used MID applications and settings controls. The user simply clicks the setting they wish to change and types in a new key combination or button.

Files Needed

  • /usr/lib/moblin-applets/libhcpcommon.so
    • all control panel applets need this
  • /usr/lib/hildon-control-panel/keybindings.so
    • The applet library
  • /usr/share/applications/hildon-control-panel/keybinding-properties.desktop
  • /usr/share/moblin-applets/glade/keybinding-properties.glade
    • Glade XML file describing the dialog
  • /usr/lib/moblin-applets/libvolumecontrol.so
  • /usr/bin/moblin-settings-daemon
    • The applet just sets the bindings, moblin-settings-daemon is what carries out all the actions associated with the bindings
  • /usr/share/moblin-applets/glade/acme.glade
    • Glade XML file which defines the little volume display that appears when using the volume keybindings

Applet Design



Shortcut Functions

The following are a list of functions that can currently be mapped to buttons or key combinations. They break down into two groups: applications to launch and controls. The applications all have gconf keys which determine the exact command to be executed to launch the app and their current values are shown in parentheses. The ones without parentheses currently have no application mapping and are there as placeholders for future use.

Applications to LaunchControls
Home Folder
Search
Help Browser
E-mail (claws-mail)
Web Browser (midbrowser)
Calculator (galculator)
Terminal (uxterm)
Chat (empathy)
Memopad (mousepad)
Dictionary (stardict)
My Tasks (tasks)
Media Player (moblin-media)
Contacts (contacts)
Increase Screen Brightness
Decrease Screen Brightness
Toggle Max/Min Brightness
Volume Mute
Volume Down
Volume Up
Play
Pause
Stop
Skip to Previous Track
Skip to Next Track

Gconf Settings

Each keybinding has its value stored in a gconf key in the following gconf dir:

/apps/moblin_settings_daemon/keybindings/

Control ShortcutKeybinding GKey
Increase Screen Brightnessbrightness_up
Decrease Screen Brightnessbrightness_down
Toggle Max/Min Brightnessbrightness_maxmin
Volume Mutevolume_mute
Volume Downvolume_down
Volume Upvolume_up
Playplay
Pausepause
Stopstop
Skip to Previous Trackprevious
Skip to Next Tracknext

Application ShortcutKeybinding GKeyCommand GKey
Home Folderhomehome_cmd
Searchsearchsearch_cmd
Help Browserhelphelp_cmd
E-mailemailemail_cmd
Web Browser wwwwww_cmd
Calculator calccalc_cmd
Terminal termterm_cmd
Chatchatchat_cmd
Memopad memomemo_cmd
Dictionary dictdict_cmd
My Tasks taskstasks_cmd
Media Player mediamedia_cmd
Contactscontactscontacts_cmd

The values for the command string keys as well as some of the default button mapping keys are set in the moblin-applets schema file: apps_moblin_settings_daemon_keybindings.schemas.

Code Reuse

This applet is based on gnome-control-center's keybindings applet.