Jump to navigation Jump to search

US Tray Menu 2

31 bytes added, 17:39, 30 June 2010
Punctuation and grammatical changes; some clarification.
{{Nav US Tray Menu 2}}
'''''US Tray Menu 2'''''
== Introduction ==
[[US Tray Menu: Introduction | The previous tutorial]] concluded with a new UniTray. Other than UTF-8 support, it offered no new features. It mimics the original menu, hence so menu items are static and the control files are command line based. When running the menu on a dark background, a noticeable ghosting effect is produced.
This tutorial covers adding new features, and making our menu more user-friendly. It also addresses that undesirable ghosting effect.
Due to a lack of interest for a plugin, there is an interesting final twist!
== User feedback ==
To start and stop either of the individual servers or both, currently our menu uses individual buttons. This applies to running as a standard program or as a service. Other than looking pretty, the icon to the left of each button provides no real additional information.
There is no real reason why an icon should not indicate current server status (e.g., green running and red not running). Also, why use two buttons when a single toggle button will do? Unlike with a third party menu program, we have no constraints . This allows us to change anything we like.
=== Configuration file ===
icon[] = "7" ; icon id number
Each menu item consists of five lines. Depending on the action (command) selected , a line can have alternative functionality. Expanding this concept is key to adding our new features.
Actions run and runh are executed, as is , however sub and separator are intercepted and manipulated according to their functionality. Applying the later latter to our new features gives the following generic command:
item[] = "Optional text" ; display menu item (Text 1 or Text2
icon[] = "" ; Empty string
'''''Note'':''' A side effect is that some array names no longer perform what’s implied to . To avoid confusion these should be changed.
'''''[[#top | Top]]'''''
men5[] = "Optional Id" ; Optional icon id number
Advantage, Another advantage is that we can apply new functionality as we wish so long as it’s explained to an end user in the final release.
'''''Note'':''' men1[] Is is a special case it . It is set to whichever text (Text1 or Text2) is the longest. This text is used for calculating the width of main or sub-menu. Duplication applies only to commands xxxx.
=== Define commands ===
To serve as a reference its here, it's worth defining commands we intend to use.
|cmd_php_info ||- Display PHP information in default browser
'''''Note'':''' Above The above list reflects current menu options . This may change depending on final requirements this may change.
== Summary ==
The above introduced This introduces the concept of dynamic menu items and hinted hints at how these can be implemented. Menu The menu structure now includes additional predefined commands and a generic naming convention.
Next page takes one of these commands and details [[US Tray Menu 2: Implementation | '''how to integrate''']] it into our tray menu.

Navigation menu