On 5 Mar, Rob Kendrick wrote in message
    <20150305150242.gt31...@platypus.pepperfish.net>:

> On Thu, Mar 05, 2015 at 02:55:49PM -0000, WPB wrote:
> > I wondered if that might be the case. Fair enough, then. Perhaps the
> > duplicate messages option is cleanest without a large development
> > overhead. Bit of a headache for internationalizing, but I think the
> > FatMessages file uses a dot-separated hierarchical structure for key
> > names, doesn't it? So you could have en.ro.AppHelp and
> > en.ro.AppHelp.NoFunc, for example, to keep it clean, perhaps?
> 
> Sure, after the first two dots it's just a string up to : that is used to
> key it, IIRC.

Yes, but the RISC OS front-end's menu code uses . as a token separator in
the menu definition. I suspect (although having just spent a few minutes
looking at the remaining content of menus.c, I'm remembering why I left it
alone last time) that "AppHelp.NoFunc" could be treated as a menu and
submenu, where the parent entry/submenu title is from the "AppHelp" token
and the submeny entry is from "NoFunc".

As a hint to anyone else familiar with the RISC OS Wimp who's trying to
follow the code in menus.c/h, it looks as if what NetSurf calls a "menu"
(struct menu_definition) is the whole thing, submenus and all. The wimp
tends to refer to that as a "menu tree": a struct menu_definition could well
refer to many wimp_menu blocks. Once one realises that, it starts to make a
bit more sense; I think some of the comments could be a bit 'historic',
though.

> But again, please not "NoFunc".

There's no need for AppHelp, anyway.

The only thing to use AppHelp is the iconbar menu, so this token can be
changed directly to remove the F1. The main menu (defined in window.c as it
belongs to the browser window) uses the following definitions and so doesn't
clash:

  { "Help", HELP_OPEN_CONTENTS, 0 },
  { "Help.HelpContent", HELP_OPEN_CONTENTS, 0 },
  { "Help.HelpGuide", HELP_OPEN_GUIDE, 0 },
  { "_Help.HelpInfo", HELP_OPEN_INFORMATION, 0 },
  { "Help.HelpCredits", HELP_OPEN_CREDITS, 0 },
  { "_Help.HelpLicence", HELP_OPEN_LICENCE, 0 },
  { "Help.HelpInter", HELP_LAUNCH_INTERACTIVE, 0 },

The problem are the other two entries: Global History and Hotlist, as the
same tokens are used in both iconbar and main menus. The following are the
corresponding entries from the main menu definition:

  { "Utilities.Hotlist.HotlistShow", HOTLIST_SHOW, 0 },
  { "Utilities.History.HistGlobal", HISTORY_SHOW_GLOBAL, 0 },

For consistency, I /think/ my preference would be to create two new tokens

  xx.ro.AppHotlistShow:Show hotlist...
  xx.ro.AppHistGlobal:Show global history...

and update the iconbar menu to use these. That's consistent with AppHelp,
and indicates the Application (ie. iconbar) Menu.

-- 
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/

Reply via email to