Yet another question about "toolbar positioning"

Hi there,

What I have is this layout, where the toolbar is between 2 horizontal lister panes. What I'm trying to accomplish is to open this layout in a new window via the context-menu of a selected folder.

In a nutshell, I can open the new window, but the toolbar is moved to the far right, which I don't like. So after reading this and this, I've not found the right answer yet.

I thought it boils down to be able to selectively show/hide toolbars in the new window. I've tried the following in a command:

Go FROMSEL Layout=Cu_Simple Toolbar Local NAME=ListerMenu STATE=bottom
but it activates the "ListerMenu" toolbar on the parent lister, not the new one. Also, I fear that this is not the right path at all, because hiding the toolbars in the new window would also hide them in the parent I guess.

Any ideas about this?

If a lister has a Global toolbar open then there is no way to close that toolbar for another lister: if you remove a Global toolbar from one lister you will remove it from all of them ... If you want to have a minimal lister with no toolbars then you would have to turn off all the Global toolbars, which would turn them off for all your other listers as well. You could then turn back on some Local toolbars in a particular window, presumably via a button or hotkey. But you'd have to push that button / hotkey every time you re-opened that window ...

That would be perfectly fine by me, in fact it's almost what I wanted in my OP only the other way around.

So, how can I open a new window and activate a toolbar locally on that window, but not the parent? It shouldn't be that hard... but my mind is just blank.

You can use a command like Toolbar TOGGLE LOCAL NAME="toolbar_name" to turn on a local toolbar... but as Christiaan points out, for this to be all that useful you're looking at probably needing to switch over to using the "minimal" toolbar lister as your 'default', and then toggle on local toolbars as needed. Maybe that's acceptable to you ~...

You might also consider submitting an official feature request to GPSoft asking for toolbar control flexibility to be added to the Layouts and/or Styles system. It's come up often enough before that I have to imagine "somebody" has asked for it already - but it can only help to weigh in with your opinion in any event.

Exactly, but how can I do this automatically from a command, i.e. open a new lister and toggle on some toolbars?

Add something like this to a button...

TOOLBAR "MyBar" STATE=bottom LINE=0 TOGGLE

In this example I always want it to show at the bottom of the lister.

Regards, AB

@cyilmaz:

So... aussieboykie is giving just another 'example' of a command - but didn't include the LOCAL argument I think you want to use.

But either way - I'm not sure I understand your question... "how can I do this automatically from a command". As Christiaan was saying, you'd basically make your 'default' config use no toolbars at all (...or the absolute 'minimum' toolbars you don't otherwise want to toggle OFF in your 'other' layout), and open listers as you normally do now - but THEN use a button with a command like those just shown to you to turn on the toolbars you want 'locally' for just that lister.

If you want a way to do it all without necessarily 'first' opening a "minimalist" lister layout, and 'then' having to hit a button to open the toolbars you want - then it may involve changing the typical way you launch Opus, and may be a bit kludgey. For instance, you could change any Dopus program shortcut to run an Opus User Command via dopusrt.exe instead of the normal dopus.exe command like so:

From: "C:\Program Files\GPSoftware\Directory Opus\dopus.exe" /autolister To (something like): "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /cmd gotest
And then define the Opus User Command gotest (or whatever) to run something like the following:

Go NEW Toolbar LOCAL NAME="ListerMenu" Toolbar LOCAL NAME="Toolbar" Toolbar LOCAL NAME="Pathbar"
Otherwise, you just create a button(s) or hotkey(s) to run just the Toolbar LOCAL commands you need to open the toolbars you want to turn on...

What I meant is: When I open a new lister from a shortcut, keyboard macro, etc. I do not want to press a button or extra keys to show/hide some toolbars. They should be automatically toggled.

Then I've discovered the abused rename scripts and I've put the following code in a user command directly. This is what I've come up so far:

[code]@nodeselect
RENAME TYPE=dirs FROM="{filepath$}" TO="{filepath$}"

@script vbscript
option explicit

Dim Shell
Set Shell = CreateObject("WScript.Shell")
' fugly, quick, dirty hack
Function Rename_GetNewName ( strFileName, strFullPath, fIsFolder, strOldName, ByRef strNewName )
strNewName = ""
Dim lDopusRTBin
' change this path and the layout
lDopusRTBin = "C:\Tool\Shell\DirOpus\DOpusRT.exe"
Shell.Run """" & lDopusRTBin & """ /CMD Go """ & strFullPath & "" & strFileName & """ LAYOUT=Cu_Simple"
' wait some
Shell.Run "ping -n 1 -w 100 10.11.12.13", 0, True
' the window title must show the full path, for this to work
Shell.AppActivate """" & strFullPath & "" & strFileName & """"
Shell.Run """" & lDopusRTBin & """ /CMD Toolbar LOCAL NAME=Tabbar STATE=bottom"
End Function
[/code]
So far it works exactly the way I want: a new lister gets opened and the toolbar is shown on the newly opened window, not parent. I want to tweak it a bit more though.

It works from an external shortcut, but it does not work from within Dopus when I bind this command in the Context Menu of folders. It shows toolbars on the parent. However, I'll use this in my default launcher, that was my next hurdle.

Thanks for the ideas thumbs up.

gotta sleep now...