summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-18 10:55:47 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-18 10:55:47 +0000
commit96db2b4c9e32dd427b5df6dfa9f79d536643d493 (patch)
treed95dd8f5f9bbb5111a6e4f44878b3e9056baf1f2 /src/gui
parent794326298c08cfa70d719523d7369ceb5a492c5c (diff)
downloadfpGUI-96db2b4c9e32dd427b5df6dfa9f79d536643d493.tar.xz
* Applied a patch from Vladimir which imploves the file system encoding and seems to fix the error received in the File dialog.
* I implemented three new functions to retrieve the DPI value of the screen.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui_dialogs.pas15
-rw-r--r--src/gui/gui_grid.pas2
2 files changed, 14 insertions, 3 deletions
diff --git a/src/gui/gui_dialogs.pas b/src/gui/gui_dialogs.pas
index 9d8836cc..46c8acd9 100644
--- a/src/gui/gui_dialogs.pas
+++ b/src/gui/gui_dialogs.pas
@@ -1044,8 +1044,11 @@ begin
ActiveWidget := grid;
FileName := '';
- Filter := rsAllFiles + ' (*)|*';
+ SetFilter(rsAllFiles + ' (*)|*');
+ // we don't want chlFilter to call FilterChange
+ chlFilter.OnChange := nil;
chlFilter.FocusItem := 1;
+ chlFilter.OnChange := @FilterChange; // restore event handler
end;
procedure TfpgFileDialog.HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean);
@@ -1202,9 +1205,12 @@ begin
end;
grid.FileList.Sort(soFileName);
-
+
+ // we don't want chlDir to call DirChange while populating items
+ chlDir.OnChange := nil;
chlDir.Items.Assign(grid.FileList.SpecialDirs);
chlDir.FocusItem := grid.FileList.CurrentSpecialDir + 1;
+ chlDir.OnChange := @DirChange; // restore event handler
if fsel <> '' then
SelectFile(fsel)
@@ -1238,10 +1244,11 @@ var
fs: string;
fm: string;
begin
+ // we don't want chlFilter to call FilterChange while populating items
+ chlFilter.OnChange := nil;
s := FFilter;
FFilterList.Clear;
chlFilter.Items.Clear;
-
repeat
fs := '';
fm := '';
@@ -1269,6 +1276,8 @@ begin
FFilterList.Add(fm);
end;
until (fs = '') or (fm = ''); { repeat/until }
+ // restore event handler
+ chlFilter.OnChange := @FilterChange;
end;
function TfpgFileDialog.GetFileFilter: string;
diff --git a/src/gui/gui_grid.pas b/src/gui/gui_grid.pas
index 326789e3..90d8d04b 100644
--- a/src/gui/gui_grid.pas
+++ b/src/gui/gui_grid.pas
@@ -67,6 +67,8 @@ type
end;
}
+ { TfpgFileGrid }
+
TfpgFileGrid = class(TfpgCustomGrid)
private
FFileList: TfpgFileList;