Author Topic: File coloring rules  (Read 23434 times)

jcmn

  • Newbie
  • *
  • Posts: 5
    • View Profile
File coloring rules
« on: January 30, 2014, 12:33:21 »
Hi

Since this last version File coloring rules are not applied correctly. I have coloring rules according to date and only those files that have applied the first rule appear colored.

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 537
  • Old Skull
    • View Profile
Re: File coloring rules
« Reply #1 on: January 30, 2014, 13:07:08 »
What are you rules? May you list tem?
I've tested a Profile with 2 rules:
1) Date :: Before :: 29.01.2014 15:52:20
2) Date :: After :: 29.01.2014 15:52:20

Both rules are applied.

===

Mathias,

There're 2 bugs in Coloring Rules Editor.

1. Value for Date field doesn't respect time zone when you choose Match Before or After.
2. When you press [.] button in the right top corner of the dialog and then press it again (change/restore dialog colors), spin buttons in the e.g. date edit controls are not updated and look like gray rectangles.
« Last Edit: January 30, 2014, 13:24:43 by Jungle »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: File coloring rules
« Reply #2 on: January 30, 2014, 13:23:54 »
Hi

Since this last version File coloring rules are not applied correctly. I have coloring rules according to date and only those files that have applied the first rule appear colored.

Rules are match from top to bottom in the list.  The first matching rule will receive the color of that rule.
You can move rules up / down the list by the up/down arrow above the list if you want some rules to have higher priority

jcmn

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: File coloring rules
« Reply #3 on: January 30, 2014, 14:50:54 »
My rules are from top to bottom:

date less then 1 h
date less then 6 h
date less then 1 day
date less then 1 week
date less then 1 month
date more then 1 month

Only the files that meet the first possible rule are colored

for example: my youngest file has 3h. Only this file is colored with rule nÂș 2

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 537
  • Old Skull
    • View Profile
Re: File coloring rules
« Reply #4 on: January 30, 2014, 17:35:29 »
I've created the same profile and some files with date matching its rules. All i see is that rules work within 1 day. I.e. files for the first 3 rules are colored while others are not. You can see it if disable/enable rules one by one.

P.S. I've also tried rules like 1h < date < 6h, 6h < date < 1d. By the way, Mathias, how <= rule can bes set (less or equal, gretaer or equal)?
« Last Edit: January 30, 2014, 17:38:36 by Jungle »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: File coloring rules
« Reply #5 on: January 30, 2014, 18:36:09 »
If you want to match a range then do

date > 1 h
date < 2 h

Then it match if the file is more then 1h old and less then 2h.

However. I get 1h rules to work, However if you change date of the files when testing.  It can look that it does not work because file coloring is something that can be very slow and very CPU intensive. so what rule to use is cached and are only flushed if it have been over 1min ago since last time.


jcmm can you do export the rules and paste it here. (export is the last button with a green down arrow in the rules dialog)

jcmn

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: File coloring rules
« Reply #6 on: January 31, 2014, 10:38:11 »
Here it is:

<?xml version="1.0" encoding="UTF-8"?>
<rules name="nunes">
  <rule name="h1" field="Date" matchtype="LessThan" value="1h"/>
  <rule name="h6" field="Date" matchtype="LessThan" value="6h" text="#9b2e9b" background="-1"/>
  <rule name="d1" field="Date" matchtype="LessThan" value="1d" text="#329999" background="-1"/>
  <rule name="w1" field="Date" matchtype="LessThan" value="1w" text="#23822a" background="-1"/>
  <rule name="m1" field="Date" matchtype="LessThan" value="1m" text="#574928" background="-1"/>
  <rule name="m2" field="Date" matchtype="MoreThan" value="1m" text="#373737" background="-1"/>
</rules>

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: File coloring rules
« Reply #7 on: February 03, 2014, 08:44:48 »
It should work a lot better in v4.1 (1620)

jcmn

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: File coloring rules
« Reply #8 on: February 03, 2014, 12:37:30 »
Yes it works better but still one glitch: Some mix of colors with files colored with wrong color.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: File coloring rules
« Reply #9 on: February 03, 2014, 12:43:42 »
The rules you listed above works for me..

You got some other combination that does not work ?

jcmn

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: File coloring rules
« Reply #10 on: February 03, 2014, 13:20:11 »
Made no changes in the rules. Initially they were correct but after some file changes there was one file with a wrong color, but after some time all were correct again. Perhaps when the file age took it to another color.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: File coloring rules
« Reply #11 on: February 03, 2014, 13:35:07 »
As mention above. Rules with date/time is only revalidated if it been more then 1 minute ago since last time. This is because validating rules are slow and it need to be cached. Most of the time this only affect you if you tweak the date/time of the files.

However if you select "Refresh file coloring for files and folders" from the colorwheel popup it will force a refresh.. (It is possible to assign that command to hotkey)