Group of color code

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

TKC285
Member
Member
Posts: 29
Joined: 2010 May 21, 22:31

Group of color code

Post by TKC285 »

Hi,
I like the color code function of X2. But I think it is better if I can set color groups.
For examples, first color group high light all of the program files: *.CPP, *.for, and rest file remain normally. The second color group high light all of the documents: *.ppt, *.doc, etc.
It is fine to either set a bottom to circle through the groups, or set function keys for each group.

If it is not possible now, please add it on feature list.

Thanks,

TKC
Kilmatead
Platinum Member
Platinum Member
Posts: 4580
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Group of color code

Post by Kilmatead »

Keep in mind that this is merely my own opinion, but I highly doubt you would find many users to support this idea.

If you want things "Grouped", that's what Customise -> Custom Groups is for (refer to page 71 of the PDF manual for more information about how to set up Custom Groups). Once a custom group is defined, its name may be subsequently used in other highlighting methods/filters, such as <Alt+G> (Mark -> Matching a Rule), where it is easily selected from the dropdown.

As the idea behind colour-coding is to set a different colour for each collection of matching files anyway, they already are grouped visually - for example, I keep an average of 14 rules defined, and since I know what all the colours mean it's impossible for me to confuse Executables with Documents at a single glance, and nor can I imagine a condition where I wouldn't want to see all colouring rules applied at the same time, as that's its raison d'être and primary strength. :shrug:

Also note that colour-coding rules don't have to be based solely on distinct file-types, they may also be based on more abstract things (all hidden files, all files "later than" a certain date, etc).

To use colour-coding as a substitute for grouping doesn't make sense, when it can work in conjunction with it just as easily.
TKC285
Member
Member
Posts: 29
Joined: 2010 May 21, 22:31

Re: Group of color code

Post by TKC285 »

Kilmatead, Thanks for the replay,
First, " Custom Groups" option is not what I need. I like to keep the file shows in the order of "Name sort" or "time sort".
Second, I have about 24 color code rules. Sometime I need to turn off most of them and keep only one or two on. Instead make 20+ clicks to turn on/off the rules, group them together and click once is better option. (I don't like the idea to save a reg file for each color rule combination).
Is there another possibility for this task (such as set a layout)?

Thanks,

TKC
User avatar
nikos
Site Admin
Site Admin
Posts: 15807
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Group of color code

Post by nikos »

in the color coding dialog, right click and you can quickly (un)select all rules
Kilmatead
Platinum Member
Platinum Member
Posts: 4580
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Group of color code

Post by Kilmatead »

Well hell, that option could certainly be made a little more obvious!

(And it could be easily expanded to include at least a facsimile of your man's request - since the menu is already there, making better use of it would not be time wasted. :wink: Though why it's not a button in the dialog itself is a bit mysterious, considering it's no more than a toggle at the end of the day.)
TKC285
Member
Member
Posts: 29
Joined: 2010 May 21, 22:31

Re: Group of color code

Post by TKC285 »

Thanks, Nikos and Kilmatead,
Glade to know the clear/tick all function. Although it is not one click method, it is definitely better than 20 clicks.

Is it possible in next release to covert the menu to a regular dialog (re-sizable, using mouse to select multiple rules with using shift and ctrl key)? It is will be much more easy to edit it if all of the rules are shown.

Thanks,
TKC
Kilmatead
Platinum Member
Platinum Member
Posts: 4580
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Group of color code

Post by Kilmatead »

TKC285 wrote:Is it possible [...] to covert the menu to a regular dialog [...] re-sizable...
Amusingly, I got fed up with that nonsense years ago, so you'll find as one of the "Example Resources" a pre-resized Colour-Coding window (Dialog 117) that you can try yourself.

I switched my font to Segoe UI size 9 which is a heck of a lot easier to read for me, but the main thing is the length. Unfortunately it cannot be made to re-size "on demand" by dragging window edges (not even by adding WS_THICKFRAME) because the control-resizing attributes can't be adjusted from within the resource itself, but you can adjust the default opening size to be as large as you want. The example defaults to allow about 25 entries to be initially visible.

(The thread makes it appear to be a complicated thing, but it's not - one-click will do it. Really.)

I get bored sometimes. :shrug: :wink:

Image

(Or, if you find all that stuff kind of scary, I can just send you a pre-rendered x2t_English.dll - this is is exactly the same as the language DLL's included in the x2 release package - Nikos will vouch for that - and you won't have to do anything at all. PM me, if you like.)
TKC285
Member
Member
Posts: 29
Joined: 2010 May 21, 22:31

Re: Group of color code

Post by TKC285 »

Wow, Kilmatead,
It is real impress about what you can do. and thank you very much for kindly offer to create a dll file for me.
This will be my weekend project. I like to try it myself.

Thanks again,

TKC
User avatar
kunkel321
Gold Member
Gold Member
Posts: 534
Joined: 2008 Jan 05, 18:58

Re: Group of color code

Post by kunkel321 »

Maybe I am understanding the original question wrong, but if rules are separated by commas, (see below) then that is a "group" of rules that the color will apply to.... Yes?
Image
TKC285
Member
Member
Posts: 29
Joined: 2010 May 21, 22:31

Re: Group of color code

Post by TKC285 »

Thanks, kunkel,
I understand a rule can including several conditions (different file extension, attributes, time, etc.) The problem is how to trigger on/off a group that including several rules by a single click (or shortcut key, user command).
for example:
group 1: photos (red), videos(green), music(pink) <== several rules
Group2: PPt, doc, xls, <== other rules for different colors

It may be better to able to set the color rule difference for the left/right panes.

any ideas?

tKC
User avatar
kunkel321
Gold Member
Gold Member
Posts: 534
Joined: 2008 Jan 05, 18:58

Re: Group of color code

Post by kunkel321 »

I see what you mean...

I agree that it would be good if sets of color rules could be assigned to Layouts.
Kilmatead
Platinum Member
Platinum Member
Posts: 4580
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Group of color code

Post by Kilmatead »

Way back when I was a student (and only our rivers ran free), I had a reputation amongst the faculty for being a rather difficult person. At the start of every term, I'd always ask the philosophy lecturers why they were qualified to pontificate about their subject matter - for instance, were we (as mere pupils) supposed to just arbitrarily "respect" their own education and accept that as justification for their expectant grin of welcoming superiority?

Naturally (as human nature goes) there were a few who took umbrage at my crassness, but at least I had the wherewithal to walk out on them if their answers were unsatisfactory. After all, professors are nothing more than public servants in private sector jobs - and (strangely enough) tenure tends to make them soft, and I always looked for the tell-tale sign of mirth in their eyes when I stood up to tell them so (in exactly those words). If the glint was there, I'd grin, stay my peace, and hang out for the rest of the term to see what other amusement was thrown my way.

Oftentimes (me being me) they would quickly get fed up with my "contrary nature" (there is a less polite term for it), as I never did homework, never took assignments seriously, and would ask questions which were so deeply mired in conspiracy as to be just shy of "taking the piss", as the Irish so colloquially put it. I found it rather enjoyable to poke at them with sharpened sticks, as you do. :D

One day one of the prof's attempted to "dress me down" in front of the other kids by stating that my "only redeeming feature" as an inquiring mind was that I wasn't afraid of arguing all sides of the story just to see where it would lead - to which I agreed, saying I couldn't let something so silly and vain as my own personal opinion get in the way of the search for truth, so the more I disagree with an idea, the more I'll bring it to the limelight.

And the same is true now - I still can't rationalise a use, a purpose, a need for the OP's requested function - but, just for the hell of it, I decided to take a stab at implementing it myself (since there's not likely a Peaceful Night's Sleep in Ragnarök of it actually getting implemented). :shrug:

But, let not that deter us! "If there's no place in the world for you young man, then young man createth thine own world!"

To this end, we now have GroupingTheColour, a utility that does exactly what it says on the tin. :wink:

Essentially it's all run from a simple toolbar button, from a simple user-command,

> "{Path...}\GroupingTheColour_x64.exe"

It doesn't require any parameters as it loads and saves what data it needs from x2, and keeps it in a local INI file. The only important thing is that the user must use the appropriate bitwise version for whatever version of x2 they are using - x64 for x64, and vice-versa. Both EXE's are supplied, but you must use only the correct one - if you don't then the end of the world won't involve grand battles with spirits and the four-horsemen of the apocalypse sallying forth bravely against the boring old meagre forces of good - instead the world will end with a soft silent whimper. And where's the fun in that?

Anyway, clicking the toolbar button then presents the user with a self-explanatory popup menu:

Image

Obviously, the idea is that those entries are pre-defined patterns of colour-coding rules which are grouped together whichever way the user wants (with the unincluded rules being logically disabled, accordingly).

So how do you define a group, I hear you ask... well, you select "Configure" and enter into the worst-conceived GUI known to humanity (as well as a few space-faring insect races which have seen a few scary things in their day). At the time I produced this more as a "proof of concept", so I just wanted something quick and dirty. And, well, it is quick and dirty - and as inelegantly shameful as that sort of affair always is, it, indeed, is here too: :wink:

Image

But, hey, it works. :shrug: The utility will automatically enumerate a list of your defined colour-coding rules from x2, and then you just tick the checkboxes to include them in whichever "group" you care to define (groups are organised in vertical lines, obviously). When done, you can then assign a custom name for that group on the right.

Basically, when you next click the toolbar button that group will appear in the list. (Only groups with ticked-boxes will appear in the list - unticking all the boxes of a group effectively deletes it.) And, obviously, as the OP requested, clicking that group from the popup will assign those rules (and only those rules) as the current colour-scheme.

You may define up to 9 groups initially, but that may be increased if necessary by editing the INI directly. Why anyone would want more than 9 groups is beyond me, but it's allowed if the user is of a such a suitable mental disposition and has obviously gone off their 'meds. :D

There must be at least one group defined for the popup to appear, otherwise it just jumps directly into the configuration window. If the user wishes to have dedicated individual user-commands (and thus toolbar buttons) for specific actions or groups, they may include command-line options to salt-and-pepper to taste:

Image

For example, a button to cycle through all the rules one by one, as the OP also requested, or whatever. Hey, I just build this nonsense, I don't tell people what to do with it. :D

And, in closing, in case there's anyone uncultured enough to think that I've lost my sense of grammar entirely when it comes to naming things, it's an onomatopoetic-pun on this. (Which also will explain why the entries in the INI, for those who cared to look, would appear a bit odd at first glance. This is just how my cookie crumbles. :D)

Anyway, that's my contribution to the original (nonsensical) feature request. :shrug: I may not believe in it, but then it's always the thing you least suspect that finally crushes you beneath the jackboot of history. I'm just buttering my bread on both sides, just in case. :wink: Enjoy. (Or throw stones... I'm amenable to either.)
Brig
Silver Member
Silver Member
Posts: 223
Joined: 2002 Aug 05, 16:01
Location: Michigan

Re: Group of color code

Post by Brig »

Hey that's pretty cool K. I wish I had a reason to use this marvelous tool.:bigsmile: But my single set is all I need.

I'm wondering, however, for those who will use it, does this thing take into account rule order? My set has to be arranged just so or it doesn't work--for example, the rule for PDFs modified in the last three days (bold red) must come before the rule for all other PDFs (non-bold red).

Anyway, cool tool.
Kilmatead
Platinum Member
Platinum Member
Posts: 4580
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Group of color code

Post by Kilmatead »

Short Answer: "Yes!"

Painfully Looooooong Answer: The rules are enumerated relationally by x2's positioning. If one changes a rule's position via the x2 colour-coding dialog, it will be reflected properly by GTC at next runtime when applying or editing the rulesets - said rulesets are actually read from the colour-coding dialog itself (not the registry), so it's always "up to date". Just for safety, the rules are actually verified "by name" and not merely by index before being applied or disabled - so if the user changes the name of a rule (in x2) GTC will simply ignore it until the user re-<Configures> such groups inclusively.

Yeah, I swallowed the technical manual - so just run with the short answer. :D (This is yet another example of why I was barred from contributing to x2's PDF manual - I'm way too wordy for prime-time. But I love it. :wink:)
Brig
Silver Member
Silver Member
Posts: 223
Joined: 2002 Aug 05, 16:01
Location: Michigan

Re: Group of color code

Post by Brig »

Fabulous. That'll be good to know if I ever go insane with color coding.

Just imagine: Kilmatead writing the x2 manual . . . the result would make "Infinite Jest" look like a pamphlet.
Post Reply