Scripting cmd for "purpose" locking w/ tab & bkgd colors

Features wanted...
aliteralmind
Posts: 255
Joined: 02 Dec 2014 16:49

Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by aliteralmind » 20 Feb 2015 15:31

I find myself using the two panes as I do in FTP applications: The left pane is the source, the right is the destination, where things need to be copied (never moved). An example is a song I'm mixing. The final rendered mp3 is created in a directory under

M:\audio\reaper\...

and is always duplicated to something in

C:\data\aliteralmind_com\aliteralmind_com\docs\singing\...

(which is the local-copy of my website...and is ultimately ftp-d). The files are always duplicated from external directories. I never work in my website local-copy directly.

It would be helpful to have a scripting command that declares a tab may only be used for the purpose of, for example, "copying into", and that this would be associated with a specific background color (behind the listed files) and a tab color (above the breadcrumbs). So if I accidentally try to copy from the destination to the source--try to copy anything *out* of this tab--it would prevent it and flag me.

Ideally, a folder could be "purposed" in this way. So I would manually call my "copy-only-to-aliteralmind-ON" script (via a button or catalog item), and from then on, any tab containing an aliteralmind_com subdirectory would be colored and purposed for "copy-into-only". It would remain that way until I call the "copy-only-to-aliterlamind-OFF" script.
Windows 8.1, 64-bit

SammaySarkar
Posts: 4220
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by SammaySarkar » 20 Feb 2015 18:27

Custom Location Actions, Don?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

aliteralmind
Posts: 255
Joined: 02 Dec 2014 16:49

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by aliteralmind » 20 Feb 2015 19:12

Actually Sammy, you're reminding me of another example: I develop my Java libraries in a "me-only" sandbox (directory), and it's ALLLL duplicated to a "public" sandobox, and then *that* is built to the "build" directory. (And then the build directory is duplicated to my website local-copy...which is then ftp-d. Phew. How do I keep up with this anyway?)

Ninety percent of the time I'm working in my private-sandbox. I rarely, if ever, want to touch the build-directory (which is automatically created and destroyed), and only sometimes need to change stuff in the public-sandbox. (Basically, there's two complete build processes, one only for me, and one as seen by/used by users of my library.)

It would be nice, primarily, to just have the tabs containing these folders to be colored deep red (build, local-website) or pink (public-sandbox). Perhaps that would be enough.

Actually, I think that's it: Location aware tab-coloring. Both the tabs themselves, and the background behind the files in them. I don't think I need "automated prevention or alerts" at all, as I stated in the top of this thread. The color would be plenty to show me what's going on.

MANY projects I develop, both professionally and personally (coding, mixing audio, even personal files) would benefit from this.

(Okay, Don, wipe the harder-to-implement "purpose" stuff from your mind. Just coloring! :ugeek: )
Windows 8.1, 64-bit

TheQwerty
Posts: 4353
Joined: 03 Aug 2007 22:30

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by TheQwerty » 20 Feb 2015 19:17

Boxing a folder works great for this as it can change the list background color for an entire branch.

Your scenario is precisely what I've used this for in the past.

That said it only changes the background color in the list and tree but does not affect the tab's color.

aliteralmind
Posts: 255
Joined: 02 Dec 2014 16:49

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by aliteralmind » 20 Feb 2015 19:22

Not sure what boxing is. This is something in XY?

It's important to me that the tab-proper is colored. The tab-proper being red is like the "initial warning". The background being red is the "critical did you NOT see the red tab? warning".

This is cool.
Windows 8.1, 64-bit

TheQwerty
Posts: 4353
Joined: 03 Aug 2007 22:30

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by TheQwerty » 21 Feb 2015 04:59

Sorry for the delay in details - I wasn't in front of a computer then, but am now. ;)

Browse to a folder and select Favorites | Set Box Color..., which will allow you to set the color for that folder and all of its children. You can also set different colors for any of the descendent folders if you want. This works best if you disable Tools | Configuration > Tabs and Panes | Dual Pane | Shade Inactive Pane so that the inactive pane shows the boxed color instead of the inactive pane color.
screenshot-xy-boxing.png
screenshot-xy-boxing.png (169.03 KiB) Viewed 963 times
As I said previously this will not change the tab color so I'd recommend mixing this with some similarly colored icons to give you that additional initial warning in the tab.

aliteralmind
Posts: 255
Joined: 02 Dec 2014 16:49

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by aliteralmind » 21 Feb 2015 05:35

Wow. How could I miss such a huge feature like that?

I obviously want the tab-proper colored so I can see what's going on when it's behind another tab, but it's certainly a big step in the right direction.

Very cool feature. Thank you for pointing me to it.

My instinct says the idea of tab/background colors should not be hard-coded to actual folders, but instead some intermediary, tag-like concept (not sure if the fact that tags can be associated to files complicates that...as I said, I haven't used tags yet).

It would also be really nice to have a scripting command to control this, too...

Don't have my head around it yet...
Windows 8.1, 64-bit

TheQwerty
Posts: 4353
Joined: 03 Aug 2007 22:30

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by TheQwerty » 21 Feb 2015 05:55

aliteralmind wrote:My instinct says the idea of tab/background colors should not be hard-coded to actual folders, but instead some intermediary, tag-like concept (not sure if the fact that tags can be associated to files complicates that...as I said, I haven't used tags yet).
My thought was asking Don to add a "Use box colors for tab background" tweak/option is likely a path of less resistance. Though that's your own battle, since I'm not interested in it. :P
aliteralmind wrote:It would also be really nice to have a scripting command to control this, too...
Well there's a SC box for setting/removing the box colors.


Regarding your original wish of controlling which file ops are possible for a specific folder...
Personally, I think this might make more sense as properties of the tab.
At which point if they also become part of FVS it would be possible to tie the permissions to specific folders.

The other thought is to tie this to the permissions that can be controlled in Admin.ini - which I think has been requested before - as this already provides a means to restrict which file-ops are possible and would only need a way to define those permissions differently per folder pattern. Technically, if you used multiple instances of XY instead of dual panes, your original wish is already, or nearly, possible with this approach.

aliteralmind
Posts: 255
Joined: 02 Dec 2014 16:49

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by aliteralmind » 21 Feb 2015 06:14

If the tab-proper can be added to the boxing feature, I'm totally good. Tab coloring is almost all of what I need. :appl:

Good to know about the SC. Should have looked...although not sure if I would have seen it :)

Thanks again for showing me the box feature.
Windows 8.1, 64-bit

SammaySarkar
Posts: 4220
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by SammaySarkar » 21 Feb 2015 09:09

You can get by: hijack tab icons for this task.
tabFlags.png
tabFlags.png (2.13 KiB) Viewed 942 times
[/size]
Example PFI definitions:

Code: Select all

+E:\WIP\;E:\WIP\*\>cfi\green-sq.ico
+E:\build\;E:\build\*\>cfi\red-sq.ico
+E:\res\;E:\res\*\>cfi\pink-sq.ico
cfi.zip
(980 Bytes) Downloaded 34 times
[/size]
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

klownboy
Posts: 2813
Joined: 28 Feb 2012 19:27

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by klownboy » 21 Feb 2015 15:15

I think that's a neat trick Sammay, but it's important to point out that if the user has a tab icon assigned in "Rename tab..." dialog box (right click of tab) that the tab icons take precedence over the PFI assignments. For the trick to work properly the user has to remove any icon assignment in for the tab like "Photos|D:\Graphics\Icons\photo_camera_03.ico".

aliteralmind
Posts: 255
Joined: 02 Dec 2014 16:49

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by aliteralmind » 21 Feb 2015 19:50

How do you create ico files? Can't figure it out in paint, gimp, or PhotoFiltre. I see IcoFX which costs 30 bucks.

...

Okay, I found Greenfish Icon Editor Pro, created

XYplorer\Icons\solid_color\red_32x32.ico

and tried

right-click-on-tab > Rename tab... > "tabname|solid_colors\red_32x32.ico"

Didn't work. "tabname" shows, but not the icon.

Tried

Tools > Customize File Icons... > New

And added this item:

Code: Select all

C:\path\to\my\folder\;C:\path\to\my\folder\*\>solid_colors\red_32x32.ico
Still not showing.

I'm not sure what I'm doing wrong.
Windows 8.1, 64-bit

SammaySarkar
Posts: 4220
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by SammaySarkar » 22 Feb 2015 07:06

aliteralmind wrote:How do you create ico files? Can't figure it out in paint, gimp, or PhotoFiltre. I see IcoFX which costs 30 bucks.
RealWorld Icon Editor is good.
right-click-on-tab > Rename tab... > "tabname|solid_colors\red_32x32.ico"
There shouldn't be quotes.
And maybe something wrong with the icon?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

klownboy
Posts: 2813
Joined: 28 Feb 2012 19:27

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by klownboy » 22 Feb 2015 14:00

Is the icon displayed on the left side of the PFI listing for each entry there? It should be. Type the following in the Address Bar:

Code: Select all

::echo <xyicons>;
The result should tell you where XY checks and expects to see your icons if/when the entire path is not given. Are your icons there? Only the name of the PFI (if given) is quoted.

Code: Select all

"Download folders" \down*\>D:\Graphics\Icons\download(04).ico"
"Agent" G:\Agent*\>D:\Graphics\Icons\agent.ico
My point above was if you specify the icon via a PFI for that folder(s) to get the result Sammay is talking about, you shouldn't also have an icon specified in the Tab Rename block. The tab icon specification will override the PFI specification...well of course they could be the same. Also look at the help file for PFI.
Good luck,
Ken

aliteralmind
Posts: 255
Joined: 02 Dec 2014 16:49

Re: Scripting cmd for "purpose" locking w/ tab & bkgd colors

Post by aliteralmind » 27 Feb 2015 19:34

Haven't had the time to try your icon suggestions.

I did notice something important related to this suggestion (but unrelated to icons): When the pane is not focused, the tab's background reverts to white. The background "boxing" color is ignored...which sort of defeats the whole purpose of what I'm trying to achieve with this tab coloring idea.
Windows 8.1, 64-bit

Post Reply