mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-26 13:48:12 +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;
|
fCompStyle := csFileDialog;
|
||||||
FFiles := TStringList.Create;
|
FFiles := TStringList.Create;
|
||||||
FHistoryList:=TStringList.Create;
|
FHistoryList:=TStringList.Create;
|
||||||
|
FFilterIndex := 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
|
@ -2201,7 +2201,7 @@ var
|
|||||||
begin
|
begin
|
||||||
PopulateFileAndDirectoryLists(PGtkFileSelection(theDialog.Handle),
|
PopulateFileAndDirectoryLists(PGtkFileSelection(theDialog.Handle),
|
||||||
AFilterEntry^.Mask);
|
AFilterEntry^.Mask);
|
||||||
TFileDialog(TheDialog).IntfFileTypeChanged(AFilterEntry^.FilterIndex);
|
TFileDialog(TheDialog).IntfFileTypeChanged(AFilterEntry^.FilterIndex + 1);
|
||||||
UpdateDetailView(TOpenDialog(theDialog));
|
UpdateDetailView(TOpenDialog(theDialog));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -141,7 +141,7 @@ begin
|
|||||||
GtkFilter := gtk_file_chooser_get_filter(dialog);
|
GtkFilter := gtk_file_chooser_get_filter(dialog);
|
||||||
GtkFilterList := gtk_file_chooser_list_filters(dialog);
|
GtkFilterList := gtk_file_chooser_list_filters(dialog);
|
||||||
NewFilterIndex := g_slist_index(GtkFilterList, GtkFilter);
|
NewFilterIndex := g_slist_index(GtkFilterList, GtkFilter);
|
||||||
theDialog.IntfFileTypeChanged(NewFilterIndex);
|
theDialog.IntfFileTypeChanged(NewFilterIndex + 1);
|
||||||
g_slist_free(GtkFilterList);
|
g_slist_free(GtkFilterList);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user