fixed gtk2 interface from setting the current dir to '' if Dialog.Initial dir = ''

git-svn-id: trunk@11451 -
This commit is contained in:
andrew 2007-07-09 15:45:33 +00:00
parent c4eda87b12
commit bada39fac6

View File

@ -740,15 +740,16 @@ begin
ofOverwritePrompt in TOpenDialog(theDialog).Options);
end;
*)
gtk_file_chooser_set_current_folder (SelWidget, pgChar( FileDialog.InitialDir) );
if FileDialog.InitialDir <> '' then
gtk_file_chooser_set_current_folder (SelWidget, pgChar( FileDialog.InitialDir) );
gtk_file_chooser_set_current_name (SelWidget, pgChar( FileDialog.FileName) );
if FileDialog is TOpenDialog then
InitializeOpenDialog(TOpenDialog(FileDialog), SelWidget);
if FileDialog.InheritsFrom(TSaveDialog) then begin
gtk_file_chooser_set_current_folder (SelWidget, PChar(FileDialog.InitialDir));
if FileDialog.InitialDir <> '' then
gtk_file_chooser_set_current_folder (SelWidget, PChar(FileDialog.InitialDir));
gtk_file_chooser_set_current_name (SelWidget, PChar(FileDialog.FileName));
end;