This script adds the ability to show DOpus panels for specific folders.
It does this by using DOpus's built in Styles feature. As you navigate in and out of the target folder the styles will be applied, enabling and disabling the desired features.
Setup
We need to create at least two Styles. One StyleSetterDefault used when leaving the target folder. One other with the setting you would like to enable used when entering the desired folder. We then need to create a file in the target folder called folder.xml. This will contain the name of the style to show for that folder. Finally there is a button to enable the StyleSetter as you prob don't want it on all the time.
StyleSetterDefault This is the style that will be set when you leave the target folder. Note how all this style does is turn off the desired feature.
ShowViewer The target style, this that will be set when you enter the target folder folder. Note how all this style does is turn on the desired feature.
folder.xml for target folder. To be created in the target folder.
Inverted the logic for the Enable/Disable toolbar button, the variable that is set now used to disable the functionality not enabled it. This makes it a little easier to install. As it will run by default and adding the button allows you to disable it from the tool bar.
If you installed and earlier version you will need to delete the button and copy the new one when upgrading to 0.4.
Updated to version 0.5:
Changes
rolled back changes for 0.4. Added Config flag RequireEnabledVariable to turn off the need for the button. By default RequireEnabledVariable is set to false and the script will always run. If RequireEnabledVariable is set to true you will need to add the button and click it to enable the script.
Hello again. I'm back after a bit of sleep, ready to try again. You had said in the other thread
Firstly, thanks for updating your OP, regarding hiding the folder.xml file. Easy enough to follow and understand, so consider issue #1 as resolved.
Now, about issue #2, I would agree that your script should open the viewer pane to the same size as when Leo's script passes the command of 'Set VIEWPANE=on', however it is not working that way, as I described in the other thread.
I dug around in my Prefs, and cannot see any way to specify how to open the viewer pane to an exact size. Have you any idea how to resolve this?
You are right, it does the same for me. I assumed applying the style that enables the viewer would use the current default width, the same as if you turned it on or off. But that appears not to be the case.
Hopefully @leo or @jon will see this and can comment.
Aside, I created a new version. v0.6 I wont post it at the top yet, as I was in a hurry.
Changed the DOpus version restriction to 11.9
Added support for configuring the folder styles via the script config. If you don't want to create the folder.xml files.
If it has issues just use 0.5 I will come back to it
Many thanks, I'll give this version a try and report back with the results.
UPDATE: I installed the v0.6 script, and in the Prefs I configured the FoldersConfig section so that it pointed to my test folder. I then removed the folders.xml file from my test folder, and gave the new script a try.
It did not turn on the viewer when I entered my test folder. I double checked to make sure that I had the 'ShowViewer' style still active, and it is.
To further test it, I went back and configured the FoldersConfig again, and removed the path to my test folder, so that it was just blank. I put back the folders.xml and tried again, and this time the viewer did open, just as in the past, but still at the small size.
So, there perhaps might be a small issue with that section???
Also, I ran across this thread while searching for solutions. Maybe it will help?
I see no place to enter the value for width in the Edit Lister Style box. Only the option to choose Off, Horizontal, or Vertical.
So my next try was to delete the style, then open the Viewer Pane to the size I wanted. With the pane still opened, I made another style for the viewer. I then tried the script again, but it still only opened a small viewer on the right side of the screen...
Well, as I said in post #9, I did that, but it did not 'take'. Again, I had the viewer opened, to the size I wanted, then saved the style. But the next time the script opened the viewer, it was not the size I saved it as in the style...
You might need to update the default lister as well in that case. Settings > Set As Default Lister.
In Opus 12 you can do that with the viewer pane closed and it will remember the size it was last open. In earlier versions, it would only remember the viewer pane size if it was open when you saved it (and you could save it again with the viewer closed if you waned the viewer off by default). I'm not sure which way around Opus 11 worked, off the top of my head.
I deleted the style, opened the viewer to the size I want, saved the style again. Then closed the viewer, and saved default lister.
Tried the script again, but same result as always, small viewer on the right side of the screen..
I'd love to run Opus 12, but I'm an old, disabled Vet, living on a very very small budget, and I just cannot afford to purchase version 12. That's why I have to make due with what I have. Hope you understand?
Even tho 4wd polished up Leo's script, and I was able to see my mistakes, I would still rather use your script. Reason is that it provides a faster, more flexible way of using the viewer pane. Rather than add folders to the script to expand usage (using Leo's modded script), I could simply add the folder.xml file to whatever folders I want, and things would be good to go.
If only the issue of viewer pane size can be resolved, then it would be golden and I would adopt it for daily use.
Nicely done!!! Works very well now using the larger sized viewer pane. I tested it on several folders, and it works without a hitch. I thank you for your effort on this script, and after plodding my way thru some very minor coding yesterday, I have a newfound respect for you (and anyone) who does coding like this.