Interpret buttonbar as menu

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Interpret buttonbar as menu

Post by *VadiMGP »

A long time ago I suggested the following improvement to TC buttonbar: instead of switching to subbar assigned to button just display it as menu. I don't like to switch to subbar (may be 2-3 times) just for one click and swicthing back to main buttonbar.

So, if somebody think same,help me, please to persuade Christian to implement this feature in TC. :D

Meanwhile i wrote small program. It accept name of buttonbar file in parameters, display menu and, after selecting the item, execute corresponding command.

Program can be downloaded here. ftp://mgppublic:public@mgpsoft.com/wcmenu.zip
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

Thanks for the tool VadiMGP. Can we have though some more examples of how to make it work? I couldn’t make it work based on the readme file. Any help would be welcome. Thanks in advance.

Kind regards,
Panos
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

pdavit wrote:Thanks for the tool VadiMGP. Can we have though some more examples of how to make it work? I couldn’t make it work based on the readme file. Any help would be welcome. Thanks in advance.

Kind regards,
Panos
pdavit, what exactly problem? Menu doesn't displayed?

Ok, let's go step by step. Using without passing parameters is very simple

For example you create buttonbur AddTools.bar, contained button for DllExplorer, Taskman, HeapWalker and MSDN.

1. Create a new button for wcmenu.exe
2. Put in the parameters field full filename(p.e. C:\Wincmd\addtools.bar).

Now, when you click this button a menu displayed. This menu will contain items corresponding to buttons in buttonbar file. If you'll define tooltips in AddTools.bar, those tooltips will be used as menu items text.

About passing parameters i'll rewrite readme. Ok?
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Very good idea! The Addon works fine for me. One suggestions: The menu should be as broad as the broadest menu entry.
User avatar
piranha
Junior Member
Junior Member
Posts: 70
Joined: 2003-02-07, 19:55 UTC
Location: Miami, Fl
Contact:

Post by *piranha »

As much I'd like to try this tool, it's not available for download anymore.
Anyone that can put it somewhere public?

rgds
After all, computers crash, people die, relationships fall apart. The best we can do is breath and reboot.
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

download still works fine
User avatar
piranha
Junior Member
Junior Member
Posts: 70
Joined: 2003-02-07, 19:55 UTC
Location: Miami, Fl
Contact:

Post by *piranha »

Wow. TC still can surprise me. With it download went fine. Using other (trustworthy imho) product I was getting:

550 /wcmenu.zip: The system cannot find the file specified.

but tc downloaded it at first try.
After all, computers crash, people die, relationships fall apart. The best we can do is breath and reboot.
User avatar
Pradera
Junior Member
Junior Member
Posts: 25
Joined: 2003-04-10, 12:12 UTC
Contact:

Re: Interpret buttonbar as menu

Post by *Pradera »

VadiMGP wrote:A long time ago I suggested the following improvement to TC buttonbar: instead of switching to subbar assigned to button just display it as menu. I don't like to switch to subbar (may be 2-3 times) just for one click and swicthing back to main buttonbar.

So, if somebody think same,help me, please to persuade Christian to implement this feature in TC. :D

Meanwhile i wrote small program. It accept name of buttonbar file in parameters, display menu and, after selecting the item, execute corresponding command.

Program can be downloaded here. ftp://mgppublic:public@mgpsoft.com/wcmenu.zip
Amazing :) I've switched most of my subbars to this already. Too bad the functionality is limited - editing bars and easier adding new items would be nice. But I understand this is just an example of what fully functional pull-down bars should look like if (when) Christian adds them officialy. I do hope so, it's a great idea.
User avatar
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Re: Interpret buttonbar as menu

Post by *Valentino »

VadiMGP wrote:A long time ago I suggested the following improvement to TC buttonbar: instead of switching to subbar assigned to button just display it as menu.
Not bad idea but IMHO it would be better to show this menu in context menu (that pops up when right-clicking on a button).
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

VadiMGP wrote:pdavit, what exactly problem? Menu doesn't displayed?
I’ve located the type of error. It seams that the tool cannot read button bar file names in directories named with spaces (at least on Windows NT 4.0) so that’s why I couldn’t make it work. I’m getting the following error message: “Cannot open ‘c:\Program’” while the true folder name is Program Files where TC is located.

I did some testing by placing my button bar in the root directory or on a directory without spaces and it worked fine. I then created a folder outside the Program Files directory in the root of my C drive with spaces and I got the same error message displaying of course the new folder name this time up to the point where the space was located. I don’t know if this problem occurs only on Windows NT (I’m using the latest version of TC).

What’s strange is that if I drag my button bar file (which is located in a folder named with spaces) and then drop it on the created button for wcmenu it works! But if I specify it in the button’s configurations it doesn’t! Weird isn’t it!
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

I also use winNT and... you are right.
But there is a simple solution:
instead of eg. "C:\Program Files\totalcmd\my.bar"
use: "C:\Progra~1\totalcmd\my.bar"
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Instead of using using short file names you could try using quotation marks:

C:\Programme\Total Commander\Toolbars\Toolbar.bar

"C:\Programme\Total Commander\Toolbars\Toolbar.bar"

Works fine on XP.
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

Thanks guys that did the trick!

The quotation marks work on WinNT too! Cool!

And one question if I may: Is it possible to change the size of the appearing icons/menu? You see it’s quite big for my taste! Thanks
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Nice tool! I would also prefer 16x16 icons. Maybe this could be set via a parameter? TC uses ExtractIconEx() to extract 16x16 icons for the button bar.
Author of Total Commander
https://www.ghisler.com
VadiMGP
Power Member
Power Member
Posts: 672
Joined: 2003-04-05, 12:11 UTC
Location: Israel

Post by *VadiMGP »

Thanks, to all!
There a new version. If somebody use passing parameters, please tell me if my explanation is clear enough.
ftp://mgppublic:public@mgpsoft.com/wcmenu1.zip

2pdavit. Of course, if filename contains spaces it should be enclosed in quotation marks.
The menu should be as broad as the broadest menu entry.
Done. Up to 256 characters. :D
Not bad idea but IMHO it would be better to show this menu in context menu (that pops up when right-clicking on a button).
Sorry, right click handled by TC itself. :(
I would also prefer 16x16 icons. Maybe this could be set via a parameter?
Done. Via -$ parameter.
Too bad the functionality is limited - editing bars and easier adding new items would be nice. But I understand this is just an example of what fully functional pull-down bars should look like if (when) Christian adds them officialy. I do hope so, it's a great idea.
Because i used standard TC button bar you can use TC's configuration dialog. I don't see reason to implement the same functionality again. But you absolutely right, i wrote it as example for this feature. And I'm sure it should be builtin in TC. Alternative solution can be something like "toolbar plugin" support in TC.

Anyway, program was written, released and i'll support it, so any suggestions are welcome!

PS. Can somebody explain me why ftp link not allowed in URL tag?
Post Reply