GNOME Developer

Panel

The Panel is a generic term describing one particular control interface between the user and the desktop environment. A standard scenario is to have a bar at the bottow of the screen, with a menu from which users can launch applications (the GNOME Menu), a button bar with buttons representing more launch targets, as well as running apps. Panel applets can also be written which dock on the panel, like a clock or an email notification program. There is a region where regular GNOME apps can dock miniviews of themselves, like a small volume slider, which when clicked on brings up the full blown mixer app.

Multiple panels are possible, so that the user can have a full-size panel across the bottom of the screen, and a smaller panel running down the right side of the screen. Panels can have Drawers which are icons in which you can drop other icons. When you click on the drawer icon it slides out like a drawer, exposing all the icons it contains. Panels can also be set to auto-hide, or can be manually slid in and out of view with a button on each end.

The panel communicates with the Session Manager to indicate when the user is logging out and shutting down GNOME. The Session Manager will then notify all session managed applications to shut down.

The panel needs to react dynamically to changes. For example, if the user has changed the GNOME Menu with a menu editor, the panel needs to be notified and properly re-construct its GNOME Menu on-the-fly. You should not have to completely restart the panel to get the changes in the GNOME Menu, like you do with almost all window managers.

The GNOME Menu will be represented as a hierarchical series of directories on the filesystem. Each component of the menu is either another directory (leading to a subfolder), or a text file (which should end with a '.desktop' extension) of the structure:

      [Desktop Entry]
      Encoding=UTF-8
      Name=GNOME Mines
      Comment=Mines game
      Exec=gnomine
      Icon=gnome-gnomine.png
      Terminal=false
      Type=Application
      Categories=GNOME;Application;Game;PuzzleGame;
      X-GNOME-Bugzilla-Bugzilla=GNOME
      X-GNOME-Bugzilla-Product=gnome-games
      X-GNOME-Bugzilla-Component=gnomine
      StartupNotify=true

This structure is defined by the freedesktop.org Desktop Entry Specification. These files are stored in $(prefix)/share/applications . Every user has the possibility to add or override entries in the system-wide configuration. The easiest way to edit a menu entry is right-clicking it in the GNOME Menu and selecting Properties from the popup menu. The changes will be stored under ~/.gnome2/vfolders.

Links

Home | News | What's New | Architecture | Documentation | Tools | Getting Involved | External Resources | Projects | Sitemap

Last modified 2003/04/24 15:01:43

webmaster@gnome.org

Website hosted by Red Hat, Inc.