View Issue Details

IDProjectCategoryView StatusLast Update
0029255LazarusLCLpublic2015-12-27 01:22
ReporterruewaAssigned ToBart Broersma 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSLinuxOS VersionDebian Wheezy
Product Version1.5 (SVN)Product Build51035 
Target Version1.6Fixed in Version1.6 
Summary0029255: TShellListView cannot be masked case-insensitive on Linux
DescriptionOn Linux there seems to be no way for TShellListView to mask files in a case-insensitive way: You cant't get *.jpg and *.JPG files at the same time (different cameras name picture files in different ways).

This is a side result of the solution of issue 0017761: duplicates were rejected (via TStringList.IndexOf in ShellCtrls.pas line 675) case-insensitive, but populating the ShellListView is done case-sensitive via FindFirst/FindNext - at least on Linux.

My patch goes half way back from the 0017761-solution, but it works on Linux and will not do any harm on Windows. Nevertheless it's more a workaround which makes it possible to work with a mask like '*.jpg;*.JPG'. This will reject a *.jPg file anyway, so a real case-insensitive solution would be way better. But I guess that would require a big hack in SysUtils...
Steps To ReproduceSee the test program, which includes 4 small picture files. All of them should be shown in the ShellListView when the mask is set to '*.jpg;*.JPG;*.PNG;*.png'.
Additional InformationRelated to 0017761
TagsNo tags attached.
Fixed in Revisionr51037
LazTarget1.6
WidgetsetGTK 2
Attached Files
  • ShellListView_Test.zip (98,634 bytes)
  • shellctrls.diff (429 bytes)
    Index: lcl/shellctrls.pas
    ===================================================================
    --- lcl/shellctrls.pas	(Revision 51035)
    +++ lcl/shellctrls.pas	(Arbeitskopie)
    @@ -662,6 +662,9 @@
       try
         MaskStrings.Delimiter := ';';
         MaskStrings.DelimitedText := MaskStr;
    +    {$ifdef UNIX}
    +    MaskStrings.CaseSensitive := true;
    +    {$endif}
     
         if AFileSortType=fstNone then Files:=nil
         else Files:=TList.Create;
    
    shellctrls.diff (429 bytes)

Activities

ruewa

2015-12-26 05:29

reporter  

ShellListView_Test.zip (98,634 bytes)

ruewa

2015-12-26 05:29

reporter  

shellctrls.diff (429 bytes)
Index: lcl/shellctrls.pas
===================================================================
--- lcl/shellctrls.pas	(Revision 51035)
+++ lcl/shellctrls.pas	(Arbeitskopie)
@@ -662,6 +662,9 @@
   try
     MaskStrings.Delimiter := ';';
     MaskStrings.DelimitedText := MaskStr;
+    {$ifdef UNIX}
+    MaskStrings.CaseSensitive := true;
+    {$endif}
 
     if AFileSortType=fstNone then Files:=nil
     else Files:=TList.Create;
shellctrls.diff (429 bytes)

ruewa

2015-12-26 05:50

reporter   ~0088256

Last edited: 2015-12-26 05:50

View 2 revisions

Additional remark: I don't know how this behaves on Windows. As a Linux purist I can't test it. So the IFDEF part of the patch might be useless.

Bart Broersma

2015-12-26 13:33

developer   ~0088265

Applied with modifications.
Thanks for reporting and the patch.
Please test and close of OK.

ruewa

2015-12-27 01:22

reporter   ~0088291

Okay, thanks!

Issue History

Date Modified Username Field Change
2015-12-26 05:29 ruewa New Issue
2015-12-26 05:29 ruewa File Added: ShellListView_Test.zip
2015-12-26 05:29 ruewa File Added: shellctrls.diff
2015-12-26 05:50 ruewa Note Added: 0088256
2015-12-26 05:50 ruewa Note Edited: 0088256 View Revisions
2015-12-26 13:33 Bart Broersma Fixed in Revision => r51037
2015-12-26 13:33 Bart Broersma LazTarget => 1.6
2015-12-26 13:33 Bart Broersma Note Added: 0088265
2015-12-26 13:33 Bart Broersma Status new => resolved
2015-12-26 13:33 Bart Broersma Fixed in Version => 1.6
2015-12-26 13:33 Bart Broersma Resolution open => fixed
2015-12-26 13:33 Bart Broersma Assigned To => Bart Broersma
2015-12-26 13:33 Bart Broersma Target Version => 1.6
2015-12-27 01:22 ruewa Note Added: 0088291
2015-12-27 01:22 ruewa Status resolved => closed