[lazarus] TFileDialog - Filter.

Bob Wingard bwingard at gt.rr.com
Sun Jul 20 21:31:20 EDT 2003


Bob Wingard wrote:

> Mattias,
>    Greetings. This will fix the problem with the filter not working 
> properly in the TFileOpen dialog.
>
> diff against gtkobject.inc
> 4649c4649
> <     CurDescEnd:=CurDescStart;
> ---
> >     CurDescEnd:=CurDescStart + 1;  4652c4652
> <     CurDesc:=copy(Filter,CurDescStart,CurDescEnd-CurDescStart);
> ---
> >     CurDesc:=copy(Filter,CurDescStart + 1,CurDescEnd-(CurDescStart + 
> 1));
> 4663c4663
> <     CurDescStart:=CurMultiMaskEnd+1;
> ---
> >     CurDescStart:=CurMultiMaskEnd;
>
> The filter and the filter description were not being properly parsed.
>
> I am not sure if the behavior of the file open dialog is standard for 
> a gtk widget. The filter is applied to both the directory list and the 
> file list. Is this normal? The filter is not applied when the current 
> directory changes, but is applied if the filter is re-selected from 
> the drop down list. This is good for now as the only way to see 
> directories with the filter applied is to change the directory.
>
> Bob Wingard
> Orange, Texas  USA
>
> _________________________________________________________________
>     To unsubscribe: mail lazarus-request at miraclec.com with
>                "unsubscribe" as the Subject
>   archives at http://www.lazarus.freepascal.org/mailarchives
>
Did some checking on the GTK site, best I can tell the bahavior is a bug 
in GTK, documentation says that the filter is applied to the filelist 
when gtk_file_selection_complete is called. The documentation does not 
state what if anything happens to the Directory list.

Bob







More information about the Lazarus mailing list