[BUG?]HELP_BREAK malfunction when followed by commands

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
KevinMo
Member
Member
Posts: 104
Joined: 2005-03-27, 01:37 UTC

[BUG?]HELP_BREAK malfunction when followed by commands

Post by *KevinMo »

In main menu config, if the first item after HELP_BREAK is command, all the following would not be right aligned. For example:
...

STARTMENU

POPUP "C&onfiguration"
MENUITEM "&Options...", cm_Config
...
MENUITEM "Sa&ve Settings", cm_ConfigSaveSettings
END_POPUP

HELP_BREAK

MENUITEM "Normal", cm_SrcCustomView1

MENUITEM "Show Path", cm_SrcCustomView2

POPUP "&Help"
MENUITEM "&Index\tF1", cm_HelpIndex
...
MENUITEM "&About Total Commander...", cm_About
END_POPUP
Comments:
1. All black fonts are default menus
2. I exchanged 'STARTMENU' and 'Configuration' menu just to make sure it's not a startmenu issue. The default order doesn't work either.
3. As long as it's a menu following HELP_BREAK, even it's empty, the HELP_BREAK behaves as it should. This would be considered as a work-around :D
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3300
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

Help_Break only works for the POPUP...END_POPUP Combination as it is only intended to be used for the Help-Menu only - not to align something at the right side :)
Hoecker sie sind raus!
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

At first: I would not consider this a bug since the HELP_BREAK is not intended to be used this way.

Still, I was wondering why your menu does not work as I use similar menus for several years (with menuitem instead of POPUP ) after HELP_BREAK and they are displayed properly. After a little investigation I found out how you make it work:

Simply insert another menuitem before the help_break and it will work fine. You may just use a 'Dummy' entry e.g.:

in wincmd.ini

Code: Select all

[user]
...
menu99=NoAction
cmd99=
path99=
param99=
then you may use the command number 799. If you click on this entry it would simply happen nothing.
MENUITEM "Sa&ve Settings", cm_ConfigSaveSettings
END_POPUP

MENUITEM "",799
HELP_BREAK

MENUITEM "Normal", cm_SrcCustomView1

MENUITEM "Show Path", cm_SrcCustomView2

POPUP "&Help"
MENUITEM "&Index\tF1", cm_HelpIndex
...
MENUITEM "&About Total Commander...", cm_About
END_POPUP
If you use the command number you won't have to insert cm_usercommand99 in totalcmd.inc.

If you leave the caption empty ("") it will still be displayed a little entry as soon as you hover over this position. But one could use those "Dummy" entries to adjust the spaces between several entries.

Here you can see my own menu with 2 rows. If you are interested you can
can download this menu with to lines here.
It's designed for resolution 1024x768 and a width of TC from 985 above

Code: Select all

[1024x768 (8x16)] 
dx=985
Hope this is of any help for you

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
KevinMo
Member
Member
Posts: 104
Joined: 2005-03-27, 01:37 UTC

Post by *KevinMo »

Thanks for the replies!

2Sir_SiLvA
Sir_SiLvA wrote:Help_Break only works for the POPUP...END_POPUP Combination as it is only intended to be used for the Help-Menu only - not to align something at the right side :)
I think right align is what HELP_BREAK supposed to do :wink: Since there isn't any difference between the help-menu and others in principle, I think.

2Sheepdog
Please forgive my ignorance :oops: I cannot find a HELP_BREAK in your menu config. It seems it's only use those dummy entries to adjust the postion, and hence the menu would be totally messed up when restore the TC window.

PS: Allow me to intro a little tip :wink: Basically, there is a double-width space CJK system.
" "<-This is a double-width space, which ANSI code is HEX A1A1, utf-8 code is HEX 3000
" "<-This is an ASCII space
So, instead of using lots of MENUITEM " ", 711, you can put multiple double-width space between the two quotes, and TC won't treat them as space.
Here is the screenshot. The big blue part is only one menu entry MENUITEM "                    ", 711
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

KevinMo wrote:2Sheepdog
Please forgive my ignorance :oops: I cannot find a HELP_BREAK in your menu config. It seems it's only use those dummy entries to adjust the postion, and hence the menu would be totally messed up when restore the TC window.

Oh I'm terribly sorry. Since I use and tested with my german version - there has left the HELP_BREAK - I assumed it would be in the english version of my menu, too. But of course it isn't. And you are right again, HELP_BREAK does not do anything in my 2-rows menu.

Neverthless the insertion of the MENUITEM before the HELP_BREAK will make your menu work. (That'S what I've tested here ;) )

PS: Allow me to intro a little tip :wink:....

Thanks for that tip. But when I created this menu first time I used a lot of spaces in one Item MENUITEM" ",711. It was not convenient because I insert sometimes a new command in the menu and it's easier for to adjust the position if there are lots of small empty menuitems.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
KevinMo
Member
Member
Posts: 104
Joined: 2005-03-27, 01:37 UTC

Post by *KevinMo »

You mean this? This doesn't work for me either :shock:
Just tested with clean wincmd.ini...
PS: TC version is 6.54
...
STARTMENU
MENUITEM "",799
HELP_BREAK
MENUITEM "Normal", cm_SrcCustomView1
...
User avatar
petermad
Power Member
Power Member
Posts: 14824
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

it is only intended to be used for the Help-Menu
The HELP_BREAK was introduced in WC v. 1.30 (1.24beta) along with the configurable .mnu files - before that the menu was hardcoded into the program and had "Left" and "Right" menu items in stead of the "Show" item.

So AFAIK, the HELP_BREAK was not really intended to right align the "Help" menu item, as much as it was intended to right align a "Right" menu item. like in this menu.

Just for the nostalgia - here is the oldstyle.mnu that was shipped with WC 1.30e:

Code: Select all

POPUP "&Left"
  MENUITEM "&Brief", cm_leftshort
  MENUITEM "&Full", cm_leftlong
  MENUITEM "&Tree", cm_LeftTree
  MENUITEM SEPARATOR
  MENUITEM "&All Files", cm_leftallfiles
  MENUITEM "&Programs", cm_leftexecs
  MENUITEM "*.*", cm_leftuserspec
  MENUITEM "&Custom...", cm_leftuserdef
  MENUITEM SEPARATOR
  MENUITEM "&Name\tCTRL+F3", cm_leftbyname
  MENUITEM "E&xtension\tCTRL+F4", cm_leftbyext
  MENUITEM "Ti&me\tCTRL+F5", cm_leftbydatetime
  MENUITEM "&Size\tCTRL+F6", cm_leftbysize
  MENUITEM "&Unsorted\tCTRL+F7", cm_leftunsorted
  MENUITEM SEPARATOR
  MENUITEM "&Reversed order", cm_leftnegorder
END_POPUP

POPUP "&Files"
  MENUITEM "&Change attributes...", cm_SetAttrib
  MENUITEM "&Pack...\tALT+F5", cm_PackFiles
  MENUITEM "&Unpack all files...\tALT+F6", cm_UnpackFiles
  MENUITEM "&Associate with...", cm_associate
  MENUITEM "Calculate &occupied space...", cm_GetFileSpace
  MENUITEM "Prin&t\tCTRL+F9", cm_PrintFile
  MENUITEM SEPARATOR
  MENUITEM "Select &group...\tGray +", cm_spreadselection
  MENUITEM "Unselect group...\tGray -", cm_shrinkselection
  MENUITEM "Select all\tCTRL Gray +", cm_selectall
  MENUITEM "Unselect all\tCTRL Gray -", cm_Clearall
  MENUITEM "&Invert Selection\tGray *", cm_ExchangeSelection
  MENUITEM SEPARATOR
  MENUITEM "&Quit\tALT+F4", 24340
END_POPUP

POPUP "&Commands"
  MENUITEM "CD &tree...\tALT+F10", cm_CDtree
  MENUITEM "&Search...\tALT+F7", cm_searchfor
  MENUITEM "&Volume label...", cm_VolumeId
  MENUITEM "System &information...", cm_sysinfo
  MENUITEM SEPARATOR
  MENUITEM "Run &DOS", cm_ExecuteDOS
  MENUITEM SEPARATOR
  MENUITEM "Source&<->Target\tCTRL+U", cm_exchange
  MENUITEM "Target&=Source", cm_matchsrc
  MENUITEM "&Compare directories", cm_CompareDirs
  MENUITEM "&Mark newer, hide same files", cm_DirMatch
  MENUITEM "R&eread source\tCTRL+R", cm_rereadsource
  MENUITEM SEPARATOR
  POPUP "Con&figuration"
    MENUITEM "&General settings...", cm_config
    MENUITEM "&Viewer/Editor...", cm_Editconfig
    MENUITEM "&Packer...", cm_PackerConfig
    MENUITEM "Change b&utton bar...", cm_ButtonConfig
    MENUITEM "&Font...", cm_FontConfig
    MENUITEM "&Colors...", cm_ColorConfig
    MENUITEM "&Tabstops in file window...", cm_ConfTabChange
    MENUITEM "C&onfirmation...", cm_Confirmation
    MENUITEM "&Save position", cm_configSavepos
  END_POPUP
END_POPUP



STARTMENU

HELP_BREAK

POPUP "&Help"
  MENUITEM "&Index\tF1", cm_HelpIndex
  MENUITEM "&Keyboard", cm_keyboard
  MENUITEM SEPARATOR
  MENUITEM "&About Windows Commander...", cm_About
END_POPUP

POPUP "&Right"
  MENUITEM "&Brief", cm_rightshort
  MENUITEM "&Full", cm_rightlong
  MENUITEM "&Tree", cm_RightTree
  MENUITEM SEPARATOR
  MENUITEM "&All files", cm_rightallfiles
  MENUITEM "&Programs", cm_rightexecs
  MENUITEM "*.*", cm_rightuserspec
  MENUITEM "&Custom...", cm_rightuserdef
  MENUITEM SEPARATOR
  MENUITEM "&Name\tCTRL+F3", cm_rightbyname
  MENUITEM "E&xtension\tCTRL+F4", cm_rightbyext
  MENUITEM "Ti&me\tCTRL+F5", cm_rightbydatetime
  MENUITEM "&Size\tCTRL+F6", cm_rightbysize
  MENUITEM "&Unsorted\tCTRL+F7", cm_rightunsorted
  MENUITEM SEPARATOR
  MENUITEM "&Reversed order", cm_rightnegorder
END_POPUP
This old menu from 1994 still works showing how backward compatible TC is :!:
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

KevinMo wrote:You mean this? This doesn't work for me either :shock:
Just tested with clean wincmd.ini...
PS: TC version is 6.54
...
STARTMENU
MENUITEM "",799
HELP_BREAK
MENUITEM "Normal", cm_SrcCustomView1
...
Don't know what happened here, in the mornig it worked here fine but now it doesn't. ;)

But you may use this instead:
...
STARTMENU
HELP_BREAK
POPUP ""
END_POPUP
MENUITEM "Normal", cm_SrcCustomView1
MENUITEM "Show Path", cm_SrcCustomView2
POPUP "&Hilfe"
MENUITEM "&Index\tF1", 610
MENUITEM "&Tastatur", 620
MENUITEM "&Registrier-Info", 630
MENUITEM "&Homepage von Totalcmd besuchen", 640
MENUITEM SEPARATOR
MENUITEM "&Über Total Commander...", 690
END_POPUP
Sorry for the wrong information. Seems that I puzzled myself with my selfmade menu, don't know what happened exactly.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
KevinMo
Member
Member
Posts: 104
Joined: 2005-03-27, 01:37 UTC

Post by *KevinMo »

Exactly!
That's what I said in comment-3 at the very beginning of this thread. So I guess you got to admit it is a bug then :wink:
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

KevinMo wrote: So I guess you got to admit it is a bug then :wink:
Sorry, I still do not consider it a bug.

Since the menu-parsing is a proprietary system is @ghisler the one to decide how it should work. So it's either not well documented and does not behave as you would like but it's not a bug, in my eyes.

IMHO you could consider to make it a feature request although I think with this workaround you mentioned at point 3 ( and I failed to notice, sorry) in your first post, there are lots of things to be done rather.

friendly

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
KevinMo
Member
Member
Posts: 104
Joined: 2005-03-27, 01:37 UTC

Post by *KevinMo »

Sheepdog wrote:there are lots of things to be done rather
Yes, I agree~ This is just a trivial issue. Mr. Ghisler has lots to be done :wink:
User avatar
Stance
Power Member
Power Member
Posts: 1079
Joined: 2005-03-29, 06:26 UTC

Post by *Stance »

Hi, KevinMo!

Hmm, let's say it is some kind of inconsistent behaviour :)
When you try to move the whole menu to the right side with HELP_BREAK in the first line, it don't work either.

This is a little bit offtopic, but I want to mention it: You could put the command
POPUP "&Help"
MENUITEM "&Index\tF1", cm_HelpIndex
...
MENUITEM "&About Total Commander...", cm_About
END_POPUP

MENUITEM "&Custom colums", cm_SrcCustomViewMenu
at the very end of your menufile.
This will create a nice menu for all of your custom colums behind the "Help" item on the right side.

Kind regards
Stance
KevinMo
Member
Member
Posts: 104
Joined: 2005-03-27, 01:37 UTC

Post by *KevinMo »

2Stance
I only have a few custom columns, and I want to change it in one click :wink:
However, that's one great tip :D I haven't even try this kind of command on menu before. Thank you very much!
Post Reply