View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000748 | Double Commander | Graphical user interface | public | 2013-10-25 03:32 | 2019-06-08 15:28 |
Reporter | randomize46 | Assigned To | Alexx2000 | ||
Priority | low | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Projection | none | ETA | none | ||
Platform | Windows 8, 64bit | ||||
Product Version | 0.5.7 | Product Build | 5310M | ||
Target Version | 0.6.0 | Fixed in Version | 0.6.0 | ||
Summary | 0000748: Files in panels have wrong coloring | ||||
Description | I tried to setup simple color scheme for different file types and got wrong result. First of all directories are displayed in wrong random color from my palete, constant between launches, but changing while I reorder palette or add/remove items, sometimes it even doesn't match pattern (For exmpl. "*.html" color was chosen). And definitely buggy example is shown in this screen(actually directories there are still wrong colored, but it is less obvious) where some mp3 files are colored correct and some - wrong. I doublechecked my wildcards. http://storage6.static.itmages.ru/i/13/1025/h_1382655781_9307945_3f4592e5e1.png PS. Another thing I noticed, it will be good(though not necessary) to have colors updating on "Apply" button hit. | ||||
Steps To Reproduce | 1) Setup color scheme 2) Check colors If you tell me where color schemes are stored I can attach exactly my case for better reproduction. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 5721 | ||||
Operating system | Windows | ||||
Widgetset | |||||
Architecture | 64-bit | ||||
|
The color schemes are stored in doublecmd.xml in <FileFilters> section. |
|
Today I checked with latest trunk, bug is still there. I tried some debuggin in Lazarus 1.0.12 and found that function function MatchesMaskList(const FileName, Mask: String; Separator: Char): Boolean; from unit uMasks.pas:100 is called with arguments: FileNAme = 'my_file(www.site.com).mp3' Mask = '*.exe*;*.com*;*.pif*;*.bat*;*.scr*;*.lnk*;*.cmd*;*.dll*' Separator = ';' And obviously returns True because *.com* matches, the function itself works fine. The problem is why does mask look like this? In xml settings and in UI it is defined and displayed as: '*.exe;*.com;*.pif;*.bat;*.scr;*.lnk;*.cmd;*.dll' Those additional '*' sumbols lead to wrong match. mp3 files I showed in screenshot are colored red because they contain ".com" in name, but it is not expected behavior I guess. It is happening here at ufindfiles.pas:134 iMask:= Length(sMask); ... if sMask[iMask] <> '*' then sMask:= sMask + '*'; Finally the directory bug here is ufindfiles.pas:307 function CheckDirectoryName(const FileChecks: TFindFileChecks; const DirectoryName: String): Boolean; begin with FileChecks do begin Result := not MatchesMaskList(DirectoryName, ExcludeDirectories); end; end; So basically any directory don't even check for match with filename pattern, just matches anyway by default? Only if blackisted with ExcludeDirectories the function will return False. So if I have '>Archives' search filter colored red as first file type category, all directories will result red. I had not dare to change the code, better leave it to author, actually I am not an experienced Pascal programmer and don't know project structure well. So finally steps to reproduce with default settings: 1) Go to Configuration->Options->File types 2) Create new Category, define color A for search template '>A' (ex: '*.com') 3) Create new Category define color B for search template '>B' (ex: '*.jpg') 4) create a file 'file(www.site.com).jpg' Bug1 expected: file has color B got: file has color A Bug2 expected: directories have default color got: directories have color A I guess my settings file is not required anymore. |
|
>It is happening here at ufindfiles.pas:134 > iMask:= Length(sMask); >... > if sMask[iMask] <> '*' then sMask:= sMask + '*'; It is because IsPartialNameSearch option is active. Uncheck "Search for part of filename" when save search template if you don't want such behavior. See also my comment in this issue: http://doublecmd.sourceforge.net/mantisbt/view.php?id=670 |
|
Got it, thank you! Fixed my issue by manually editing of config. Anyway, that global setting "Search for part of filename" by default affects all new search templates implicitly, maybe it is reasonable to have bPartialNameSearch checkbox in template definition window (actually little stripped version on fFindDialog as I see) visible and indicating that behavior? Is there any particular reason making that checkbox invisible I missed? (It hides by fFindDlg.pas:501) |
|
Done |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-10-25 03:32 | randomize46 | New Issue | |
2013-10-25 08:14 | Alexx2000 | Note Added: 0001159 | |
2013-10-25 08:14 | Alexx2000 | Status | new => feedback |
2013-10-25 14:40 | randomize46 | Note Added: 0001160 | |
2013-10-25 14:40 | randomize46 | Status | feedback => new |
2013-10-29 09:07 | Alexx2000 | Note Added: 0001161 | |
2013-10-29 09:07 | Alexx2000 | Status | new => feedback |
2013-10-29 18:43 | randomize46 | Note Added: 0001162 | |
2013-10-29 18:43 | randomize46 | Status | feedback => new |
2015-01-02 16:47 | Alexx2000 | Relationship added | related to 0000977 |
2015-01-02 16:48 | Alexx2000 | Fixed in Revision | => 5721 |
2015-01-02 16:48 | Alexx2000 | Note Added: 0001356 | |
2015-01-02 16:48 | Alexx2000 | Assigned To | => Alexx2000 |
2015-01-02 16:48 | Alexx2000 | Status | new => resolved |
2015-01-02 16:48 | Alexx2000 | Resolution | open => fixed |
2015-01-02 16:48 | Alexx2000 | Fixed in Version | => 0.6.0 |
2015-01-02 16:48 | Alexx2000 | Target Version | => 0.6.0 |
2019-06-08 15:28 | Alexx2000 | Status | resolved => closed |