summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui_dialogs.pas15
-rw-r--r--src/gui/gui_tree.pas8
2 files changed, 13 insertions, 10 deletions
diff --git a/src/gui/gui_dialogs.pas b/src/gui/gui_dialogs.pas
index b8d2b648..94a388af 100644
--- a/src/gui/gui_dialogs.pas
+++ b/src/gui/gui_dialogs.pas
@@ -21,9 +21,9 @@ unit gui_dialogs;
{
TODO:
- * Try and abstract the code to remove all IFDEF's
+ * Try and refactor the code to remove all IFDEF's
* Implement MessageDlg with icons and buttons [Work-In-Progress]
- * Select Directory dialog
+ * Select Directory dialog (treeview style)
}
{.$Define DEBUG}
@@ -748,10 +748,13 @@ var
e: TFileEntry;
begin
e := grid.CurrentEntry;
- if (e <> nil) and (e.EntryType = etDir) then
- begin
- SetCurrentDirectory(e.Name);
- end;
+ if (e = nil) then
+ Exit; //==>
+
+ if (e.EntryType = etDir) then
+ SetCurrentDirectory(e.Name)
+ else if (e.EntryType = etFile) then
+ btnOKClick(Sender);
end;
procedure TfpgFileDialog.SetFilter(const Value: string);
diff --git a/src/gui/gui_tree.pas b/src/gui/gui_tree.pas
index 5bd5e686..aef8507d 100644
--- a/src/gui/gui_tree.pas
+++ b/src/gui/gui_tree.pas
@@ -192,13 +192,13 @@ type
property RootNode: TfpgTreeNode read GetRootNode;
property Selection: TfpgTreeNode read FSelection write SetSelection;
published
- property DefaultColumnWidth: word read FDefaultColumnWidth write SetDefaultColumnWidth;
+ property DefaultColumnWidth: word read FDefaultColumnWidth write SetDefaultColumnWidth default 15;
property FontDesc: string read GetFontDesc write SetFontDesc;
- property ScrollWheelDelta: integer read FScrollWheelDelta write FScrollWheelDelta;
+ property ScrollWheelDelta: integer read FScrollWheelDelta write FScrollWheelDelta default 15;
property ShowColumns: boolean read FShowColumns write SetShowColumns default False;
property ShowImages: boolean read FShowImages write SetShowImages default False;
- property TreeLineColor: TfpgColor read FTreeLineColor write SetTreeLineColor;
- property TreeLineStyle: TfpgLineStyle read FTreeLineStyle write SetTreeLineStyle;
+ property TreeLineColor: TfpgColor read FTreeLineColor write SetTreeLineColor default clShadow1;
+ property TreeLineStyle: TfpgLineStyle read FTreeLineStyle write SetTreeLineStyle default lsDot;
property OnChange: TNotifyEvent read FOnChange write FOnChange;
property OnExpand: TfpgTreeExpandEvent read FOnExpand write FOnExpand;
end;