Login | Register
My pages Projects Community openCollabNet

scplugin
Wiki: MenuPickDefinition

On Friday, May 18, the normal maintenance window (17:00 Pacific time) will be extended for data center maintenance until 23:00 Pacific. No extended down-time is planned, but brief delays and interruptions are possible throughout the period.

Edit this page | Links to this page | Page information | Attachments | Refresh page

 

The menus that allow people to request your action are defined in several places:

  • SCPluginUIDaemon/SCUIDaemonController.m
  • SCToolbarButton/main.m

This part is very consistently patterned, and pretty easy to cut-and-paste.

The only nonobvious bit is probably the use of the menuitems.strings file. This solves two problems:

  • The strings can be translated into another language simply by copying this file to the appropriate language-specific directory and translating; no code changes needed.
  • Menu commands for things that require a preliminary dialog (for instance, the Checkout operation can't actually begin until you tell it where the repository is). The Apple UI Guide requires that these have menu pick names that end in the ellipsis character -- "Checkout…", not "Checkout...". But the ObjC source code can't contain this, but the strings file can

MenuPickDefinition (last edited 2009-10-02 23:02:00 -0700 by jackrepenning)