Page 5 of 5
Re: issue-#135 adding hierarchical menus
Posted: Tue Oct 25, 2016 8:05 am
by Josef Templ
Ivan Denisov wrote:One problem detected. It is not mapping the menu items... So they can not be translated well.
I knew that there was an additional limitation of CpcDropDown but couldn't remember what it was.
Thanks for the hint. I will look at it.
- Josef
Re: issue-#135 adding hierarchical menus
Posted: Tue Oct 25, 2016 8:18 am
by Josef Templ
DGDanforth wrote:Not only that But I just tried
Code: Select all
MENU "$Search"
"Files" ...
"File" ...
END
MENU "Test"
"Search" "" "$Search" ""
END
and $Search showed up on the top level menu bar!
I thought that was not supposed to happen.
I am using build #716
Doug, you are using the wrong build.
build #716 belongs to issue-#138.
- Josef
Re: issue-#135 adding hierarchical menus
Posted: Tue Oct 25, 2016 9:19 am
by Josef Templ
The label of a submenu reference is now preserved in InitSubmenus.
This preserves both the mapping with Dialog.MapString and the hotkey setting.
@Ivan: I had to do it differently from your proposal because your version
ignores the hotkeys (the underlined key in case you operate the menu with the keyboard).
- Josef
Re: issue-#135 adding hierarchical menus
Posted: Tue Oct 25, 2016 9:50 am
by Robert
Josef Templ wrote:Doug, you are using the wrong build.
build #716 belongs to issue-#138.
You have told both Doug & myself that build 716 is wrong for Issue 135 - this does not surprise me, which is why I asked!
Will someone please tell me which build is right - the Voting topic included Diffs, but not a reference to a test build, as far as I could see.
I know I am too slow for the vote, but I want to test it anyway.
Re: issue-#135 adding hierarchical menus
Posted: Tue Oct 25, 2016 9:52 am
by Ivan Denisov
Now translations works fine.
Doug, I think, that new voting required.
Re: issue-#135 adding hierarchical menus
Posted: Tue Oct 25, 2016 9:53 am
by Ivan Denisov
Robert wrote:I know I am too slow for the vote, but I want to test it anyway.
Just find appropriate issue number = 135
here:
http://blackboxframework.org/unstable/
and download last version in the directory = 719.
Re: issue-#135 adding hierarchical menus
Posted: Tue Oct 25, 2016 9:59 am
by Robert
Ivan Denisov wrote:Robert wrote:I know I am too slow ...
Just find appropriate issue number = 135
here:
http://blackboxframework.org/unstable/
and download last version in the directory = 719.
Apologies - I was just about to delete my last post, but you have answered already anyway - thanks.
Josef explained what to do, I read that, but for no good reason initially misunderstood his comment!
Re: issue-#135 adding hierarchical menus
Posted: Tue Oct 25, 2016 10:03 am
by DGDanforth
Ivan Denisov wrote:Now translations works fine.
Doug, I think, that new voting required.
New vote because ... bug was fixed?
I need a diffs file for that.
Re: issue-#135 adding hierarchical menus
Posted: Tue Oct 25, 2016 10:06 am
by Ivan Denisov
DGDanforth wrote:Ivan Denisov wrote:Now translations works fine.
Doug, I think, that new voting required.
New vote because ... bug was fixed?
I need a diffs file for that.
http://redmine.blackboxframework.org/pr ... b7dfe816ed
Josef also did some cosmetic renaming, so there are long diff. However the only important part is inside the
InitSubmenus procedure.
Re: issue-#135 adding hierarchical menus
Posted: Tue Oct 25, 2016 2:00 pm
by Josef Templ
The important change is the addition of
res := WinApi.GetMenuStringW(menu.menuH, item(Item).id, label, LEN(label), {});
in InitSubmenus.
Since "submenu" seems to be a single word in english, I have changed the capitalization
of "subMenu" to "submenu" wherever it appeared.
- Josef