I'm not sure how to introduce this as there are easy workarounds.
I think it is best to simply tell you what I'm doing.
This is an @lxp evaluator button that I have found very useful.
It temporarily minimizes one of the two file displays when in Dual View.
So press the button and you have a single pane lister with more column room and an easy way back to the dual view. I know that a few other people here use this.
@toggle:if Set Dual=off
@if:Set DUAL=on
@set lst:sourceWasRight={=IsChecked("Set SOURCE=right")=}
//=Output(Val("$lst:sourceWasRight"))
Set Dual=toggle,remember
@if:else
=return Val("$lst:sourceWasRight") ? "Set DUAL=toggle,remember,Source" : "Set DUAL=toggle,remember,Dest"
The simple idea is to use this to go to a single pane lister and then press the button again.
Is there a paired folder ???
Well, Yes the paired folder is then returned to a dual display, but minus the remembered tabs.
Alternative answers:
Yes, one can easily close the tabs first and get them back through the script Tab Rescue .
One could use the Dynamic Tab Groups script or just normal Dopus Tab Groups.
One could drag the tabs to the other file display.
One could move the tabs to another lister.
Thanks @jinsight .
I guess my post lost something in translation.
The idea was to open both the paired folder and the remembered tabs in one click.
But thanks and yes, I have a button Set Pairedfolders=Toggle.
@lxp
Thankyou !
I didn't know there was a modifier pair for {sourcepath} that could specify {sourcepath|pair} .
Your idea does work, but the button code is very picky about where the new line is.
The new line has to be after =return Val("$lst:sourceWasRight") ? "Set DUAL=toggle,remember,Source" : "Set DUAL=toggle,remember,Dest"
@jinsight
Thanks again !
We now need to use Set PAIREDFOLDERS=off to get this all to work or we end up with two tabs of the paired folder. I made Set PAIREDFOLDERS=off the first line of the button.
@lxp , @jinsight
We now have a working button, but the paired folder is always the second tab.
But we can tweak this by adding TABPOS=first .
We now have modified the button to work with paired folders and if there is no paired folder, the button modifications have no effect other than Set PAIREDFOLDERS=off .
Set PAIREDFOLDERS=off
@toggle:if Set Dual=off
@if:Set DUAL=on
@set lst:sourceWasRight={=IsChecked("Set SOURCE=right")=}
//=Output(Val("$lst:sourceWasRight"))
Set Dual=toggle,remember
@if:else
=return Val("$lst:sourceWasRight") ? "Set DUAL=toggle,remember,Source" : "Set DUAL=toggle,remember,Dest"
Go PATH={sourcepath|pair} NEWTAB=findexisting TABPOS=first OPENINDUAL
@lxp
Ahh, Yes it appears that you are correct.
The code then simplifies to this which seems to be working starting from either file display.
Set PAIREDFOLDERS=off
@toggle:if Set Dual=off
@if:Set DUAL=on
Set Dual=toggle,remember
@if:else
Set Dual=toggle,remember
Go PATH={sourcepath|pair} NEWTAB=findexisting TABPOS=first OPENINDUAL
Edit Note: NEWTAB=findexisting doesn't seem to be able to find an existing folder pair tab .
That doesn't really matter very much to me as if it already exists I probably wouldn't use the button anyway.
Set DUAL=toggle,remember
@if:Set DUAL=off
Go PATH={sourcepath|pair} OPENINDUAL NEWTAB=findexisting TABPOS=first
@toggle:if Set DUAL=off
That doesn't solve NEWTAB=findexisting not working, though. I can't think of a solution that doesn't use a script; it'd be the easiest if Set DUAL=toggle,remember updated the button's internal list of open tabs.
We still need Set PAIREDFOLDERS=off or we get two tabs of the paired folder if paired folders are turned on.
We can also add a key modifier to stop the paired folder from opening.
Set PAIREDFOLDERS=Off
Set DUAL=toggle,remember
@toggle:if Set DUAL=off
@keydown:none
@if:Set DUAL=off
Go PATH={sourcepath|pair} OPENINDUAL NEWTAB=findexisting TABPOS=first
@keydown:shift
Well, one little thing, focus.
With our solution to this focus upon restoring the remembered file display is always to the left file display regardless of whether the source was left or right when the lister was toggled to a remembered single file display.
I really think that our solution is the better one.
It really doesn't matter enough to justify more code intervention.
In fact, with an attitude adjustment, one can easily compensate by simply swapping file displays beforehand .
Is it that bad to think Left Side ?
Well, I'd need a new Driver's License.
The original button kept focus.
I have found that this can still be done by changing Go PATH={sourcepath|pair} NEWTAB=findexisting TABPOS=first OPENINDUAL
to Go PATH={sourcepath|pair} NEWTAB=findexisting TABPOS=first OPENINDEST
The resultant button is then this:
Set PAIREDFOLDERS=off
@toggle:if Set Dual=off
@if:Set DUAL=on
@set lst:sourceWasRight={=IsChecked("Set SOURCE=right")=}
Set Dual=toggle,remember
@if:else
=return Val("$lst:sourceWasRight") ? "Set DUAL=toggle,remember,Source" : "Set DUAL=toggle,remember,Dest"
Go PATH={sourcepath|pair} NEWTAB=findexisting TABPOS=first OPENINDEST
I really think our solution is better.
I added a TabLink command.
Set PAIREDFOLDERS=off
Set Dual=toggle,remember
@toggle:if Set Dual=off
@keydown:none
@if:Set DUAL=off
Go PATH={sourcepath|pair} OPENINDUAL NEWTAB=findexisting TABPOS=first
Go TABLINK=on
@keydown:shift