mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-07 20:19:07 +02:00
implemented URL directory property editor
git-svn-id: trunk@6428 -
This commit is contained in:
parent
c5e34297ad
commit
96d90202b9
@ -453,7 +453,7 @@ begin
|
|||||||
|
|
||||||
// register property editors for URL handling
|
// register property editors for URL handling
|
||||||
RegisterPropertyEditor(TypeInfo(AnsiString),
|
RegisterPropertyEditor(TypeInfo(AnsiString),
|
||||||
THTMLHelpDatabase,'BaseURL',TURLPropertyEditor);
|
THTMLHelpDatabase,'BaseURL',TURLDirectoryPropertyEditor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor THelpManager.Destroy;
|
destructor THelpManager.Destroy;
|
||||||
|
@ -738,6 +738,17 @@ type
|
|||||||
function GetDialogTitle: string; virtual;
|
function GetDialogTitle: string; virtual;
|
||||||
function GetInitialDirectory: string; virtual;
|
function GetInitialDirectory: string; virtual;
|
||||||
procedure SetFilename(const Filename: string); virtual;
|
procedure SetFilename(const Filename: string); virtual;
|
||||||
|
function CreateFileDialog: TOpenDialog; virtual;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TDirectoryPropertyEditor
|
||||||
|
PropertyEditor editor for directory properties.
|
||||||
|
Show an TSelectDirectoryDialog on Edit. }
|
||||||
|
|
||||||
|
TDirectoryPropertyEditor = class(TFileNamePropertyEditor)
|
||||||
|
public
|
||||||
|
function CreateFileDialog: TOpenDialog; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -751,6 +762,16 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TURLDirectoryPropertyEditor
|
||||||
|
PropertyEditor editor for URL properties.
|
||||||
|
Show an TOpenDialog on Edit. }
|
||||||
|
|
||||||
|
TURLDirectoryPropertyEditor = class(TURLPropertyEditor)
|
||||||
|
public
|
||||||
|
function CreateFileDialog: TOpenDialog; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TSessionPropertiesPropertyEditor
|
{ TSessionPropertiesPropertyEditor
|
||||||
PropertyEditor editor for TControl.SessionProperties properties.
|
PropertyEditor editor for TControl.SessionProperties properties.
|
||||||
Show a dialog on Edit. }
|
Show a dialog on Edit. }
|
||||||
@ -4805,7 +4826,7 @@ end;
|
|||||||
|
|
||||||
procedure TFileNamePropertyEditor.Edit;
|
procedure TFileNamePropertyEditor.Edit;
|
||||||
begin
|
begin
|
||||||
With TOpenDialog.Create(nil) do
|
With CreateFileDialog do
|
||||||
Try
|
Try
|
||||||
Filter:=GetFilter;
|
Filter:=GetFilter;
|
||||||
Options:=GetDialogOptions;
|
Options:=GetDialogOptions;
|
||||||
@ -4844,6 +4865,19 @@ begin
|
|||||||
SetStrValue(Filename);
|
SetStrValue(Filename);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TFileNamePropertyEditor.CreateFileDialog: TOpenDialog;
|
||||||
|
begin
|
||||||
|
Result:=TOpenDialog.Create(nil);
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TDirectoryPropertyEditor }
|
||||||
|
|
||||||
|
function TDirectoryPropertyEditor.CreateFileDialog: TOpenDialog;
|
||||||
|
begin
|
||||||
|
Result:=TSelectDirectoryDialog.Create(nil);
|
||||||
|
Result.Options:=Result.Options+[ofFileMustExist];
|
||||||
|
end;
|
||||||
|
|
||||||
{ TURLPropertyEditor }
|
{ TURLPropertyEditor }
|
||||||
|
|
||||||
procedure TURLPropertyEditor.SetFilename(const Filename: string);
|
procedure TURLPropertyEditor.SetFilename(const Filename: string);
|
||||||
@ -4865,6 +4899,14 @@ begin
|
|||||||
inherited SetFilename(FilenameToURL(Filename));
|
inherited SetFilename(FilenameToURL(Filename));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TURLDirectoryPropertyEditor }
|
||||||
|
|
||||||
|
function TURLDirectoryPropertyEditor.CreateFileDialog: TOpenDialog;
|
||||||
|
begin
|
||||||
|
Result:=TSelectDirectoryDialog.Create(nil);
|
||||||
|
Result.Options:=Result.Options+[ofFileMustExist];
|
||||||
|
end;
|
||||||
|
|
||||||
{ TSessionPropertiesPropertyEditor }
|
{ TSessionPropertiesPropertyEditor }
|
||||||
|
|
||||||
function TSessionPropertiesPropertyEditor.GetAttributes: TPropertyAttributes;
|
function TSessionPropertiesPropertyEditor.GetAttributes: TPropertyAttributes;
|
||||||
|
@ -278,6 +278,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.21 2004/12/27 17:52:42 mattias
|
||||||
|
implemented URL directory property editor
|
||||||
|
|
||||||
Revision 1.20 2004/04/10 17:58:57 mattias
|
Revision 1.20 2004/04/10 17:58:57 mattias
|
||||||
implemented mainunit hints for include files
|
implemented mainunit hints for include files
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user