AOS 4.1 FE bug - custom ContextMenus strings ignored

A forum for AmigaOne XE and MicroA1-C specific issues.

AOS 4.1 FE bug - custom ContextMenus strings ignored

Postby saimo » Sun Jan 18, 2015 12:12 am

I have noticed a few minor defects in AOS 4.1 FE that I haven't seen mentioned elsewhere, so I have decided to report them. Eventually I went for separate threads to avoid confusion.
If the problem described below is already discussed elsewhere, please feel free to just point me to the right place. Thanks.

My system:
* A1 XE G4
* 512 MB RAM
* Radeon 9000 with 64 MB RAM
* SoundBlaster Live!
* IDE HD on a1ide.device (normally turned off at the beginning of the startup-sequence)
* SATA SDD on Sil5312ide.device
* all partitions formatted with SFS/00

ContextMenus replaces the user-defined labels with the internal ones for CM_INVOKEWB entries. F.ex., I have defined these entries:

Code: Select all
,Directory,Create drawer,CM_INVOKEWB,WINDOW.NEWDRAWER
,Directory,Clean up,CM_INVOKEWB,WINDOW.CLEANUPBY.NAME
,Directory,Show only icons,CM_INVOKEWB,WINDOW.SHOW.ONLYICONS
,Directory,Show all files,CM_INVOKEWB,WINDOW.SHOW.ALLFILES
,Directory,View by icon,CM_INVOKEWB,WINDOW.VIEWBY.ICON
,Directory,View by name,CM_INVOKEWB,WINDOW.VIEWBY.NAME
,Directory,Resize to fit,CM_INVOKEWB,WINDOW.RESIZETOFIT
,Directory,Snapshot,CM_INVOKEWB,WINDOW.SNAPSHOT.ALL
,Directory,Search,WB,SYS:System/Find


The result is this:

Image

"Create drawer" has become "New drawer...", and all the other ones but "Resize to fit" (which happens to be exactly the same) look totally odd because ContextMenu's strings are defined for submenus ("Clean up by", "Show", "View by" and "Snapshot").

The previous version of ContextMenus, instead, behaved properly:

Image

Because of this reason, I keep on using the old version (after all it does all I need: the only thing I like more in the new version is the menu titles).
User avatar
saimo
 
Posts: 94
Joined: Sat Oct 29, 2011 11:37 pm

Re: AOS 4.1 FE bug - custom ContextMenus strings ignored

Postby nbache » Sun Jan 18, 2015 1:33 am

ContextMenus uses the strings from workbench.catalog (or the equivalent ones built into WB if you use the default English and have no overriding workbench.catalog for English). This gives the great advantage for all other languages that it is not necessary to create separate translations for all those strings, and for everybody it gives the advantage that the strings for the same function are the same, whether that function is invoked via ContextMenus (which in turn simply executes the corresponding WB menu item) or directly in the WB Intuition menu.

If you really really must have different wordings for the exact same thing, you might want to open the file SYS:Documentation/Commodities/ContextMenus.guide and read the section about translation. It should be possible to use this technique also for English, so you provide your own "translation" with that.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1210
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: AOS 4.1 FE bug - custom ContextMenus strings ignored

Postby saimo » Sun Jan 18, 2015 2:29 am

@nbache

I appreciate your effort, but still there is a bug that needs to be fixed ;)

ContextMenus allows defining the entries and the related strings in the configuration file ENVARC:ContextMenus.cfg. This new version ignores the strings defined therein.
This about an official (and main) feature documented in the very same guide you mentioned:

Code: Select all
                         Defining the menus

*SNIP*

The menus are stored in the text file ENV:ContextMenus.cfg with each line
following this rule:

<fileclass>,<item name>,<execution mode>,<command>

Since version 54.1 a new configuration parameter has been introduced. Each
line now follows this rule:

<icon/image>,<fileclass>,<item name>,<execution mode>,<command>

*SNIP*

<item name> is the name of the menu item as you want it to be displayed.


This feature used to work, and now it doesn't anymore.
User avatar
saimo
 
Posts: 94
Joined: Sat Oct 29, 2011 11:37 pm

Re: AOS 4.1 FE bug - custom ContextMenus strings ignored

Postby nbache » Sun Jan 18, 2015 10:00 pm

Well, I suppose you could say that, but the bug is in the documentation, specifically for not mentioning that all entries which simply invoke a workbench menu function will always use the localized (or original) text from that menu item.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1210
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: AOS 4.1 FE bug - custom ContextMenus strings ignored

Postby saimo » Sun Jan 18, 2015 10:56 pm

I bet that's not the case for these reasons:
* it would be a major change in the menu items definitions, so it would be hard to forget about it;
* the new item definition format has been documented ("Since version 54.1 a new configuration parameter has been introduced. Each
line now follows this rule: <icon/image>,<fileclass>,<item name>,<execution mode>,<command>"
), so it would be really difficult to forget about the major change regarding precisely such definition;
* such a change would introduce an exception/oddity, and since the author has redefined the syntax of the definitions by adding the icon specification, probably, if the change was really intended, he would have moved the user-definable string to the bottom of the definition, so that the first parameters would be valid for all the entries and the last one would be reserved only to the non-WB ones.

But, why guessing - let's ask the author(s) ;) Since I have no idea of who to contact, could you do it, please?
User avatar
saimo
 
Posts: 94
Joined: Sat Oct 29, 2011 11:37 pm

Re: AOS 4.1 FE bug - custom ContextMenus strings ignored

Postby nbache » Mon Jan 19, 2015 12:17 am

I don't have to, I was there when the feature (automatic usage of the WB strings) was released to beta, and you can take my word for it.

In other words, this is a feature, not a bug :-D.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1210
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: AOS 4.1 FE bug - custom ContextMenus strings ignored

Postby saimo » Mon Jan 19, 2015 12:24 am

It could just be that when the feature was introduced the author did not think about this bad side effect.
Could you ask, please? It doesn't take much...
User avatar
saimo
 
Posts: 94
Joined: Sat Oct 29, 2011 11:37 pm


Return to Platform: AmigaOne XE and MicroA1-C

Who is online

Users browsing this forum: No registered users and 1 guest