mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 04:52:38 +02:00
- TFileDialog.FilterIndex returned value starts from 0 under gtk1 and gtk2 (patch from Valdas Janknas report 0008788)
git-svn-id: trunk@11168 -
This commit is contained in:
parent
1c8450192c
commit
b2a7ad27e4
@ -27,6 +27,7 @@ begin
|
||||
fCompStyle := csFileDialog;
|
||||
FFiles := TStringList.Create;
|
||||
FHistoryList:=TStringList.Create;
|
||||
FFilterIndex := 1;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
|
@ -2201,7 +2201,7 @@ var
|
||||
begin
|
||||
PopulateFileAndDirectoryLists(PGtkFileSelection(theDialog.Handle),
|
||||
AFilterEntry^.Mask);
|
||||
TFileDialog(TheDialog).IntfFileTypeChanged(AFilterEntry^.FilterIndex);
|
||||
TFileDialog(TheDialog).IntfFileTypeChanged(AFilterEntry^.FilterIndex + 1);
|
||||
UpdateDetailView(TOpenDialog(theDialog));
|
||||
end;
|
||||
end;
|
||||
|
@ -141,7 +141,7 @@ begin
|
||||
GtkFilter := gtk_file_chooser_get_filter(dialog);
|
||||
GtkFilterList := gtk_file_chooser_list_filters(dialog);
|
||||
NewFilterIndex := g_slist_index(GtkFilterList, GtkFilter);
|
||||
theDialog.IntfFileTypeChanged(NewFilterIndex);
|
||||
theDialog.IntfFileTypeChanged(NewFilterIndex + 1);
|
||||
g_slist_free(GtkFilterList);
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user