1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-08-13 16:53:59 -04:00

Changed rev-number + added two more 'default' dirs.

This commit is contained in:
Raymond 2010-04-16 16:09:01 +02:00
parent 172b09bd82
commit 57b4087bb6

View File

@ -46,7 +46,7 @@ uses
CastaliaSimplePasPar, v_AutoCompleteForm, PSDump; CastaliaSimplePasPar, v_AutoCompleteForm, PSDump;
const const
SimbaVersion = 626; SimbaVersion = 630;
type type
@ -348,6 +348,7 @@ type
procedure HandleOpenFileData; procedure HandleOpenFileData;
procedure HandleWriteFileData; procedure HandleWriteFileData;
procedure HandleScriptStartData; procedure HandleScriptStartData;
function GetScriptPath : string;
function GetExtPath: string; function GetExtPath: string;
function GetFontPath: String; function GetFontPath: String;
function GetHighlighter: TSynCustomHighlighter; function GetHighlighter: TSynCustomHighlighter;
@ -360,6 +361,7 @@ type
procedure SetFontPath(const AValue: String); procedure SetFontPath(const AValue: String);
procedure SetIncludePath(const AValue: String); procedure SetIncludePath(const AValue: String);
procedure SetPluginPath(const AValue: string); procedure SetPluginPath(const AValue: string);
procedure SetScriptPath(const AValue: string);
procedure SetShowHintAuto(const AValue: boolean); procedure SetShowHintAuto(const AValue: boolean);
procedure SetScriptState(const State: TScriptState); procedure SetScriptState(const State: TScriptState);
function LoadSettingDef(const Key, Def : string) : string; function LoadSettingDef(const Key, Def : string) : string;
@ -420,6 +422,7 @@ type
property FontPath : String read GetFontPath write SetFontPath; property FontPath : String read GetFontPath write SetFontPath;
property PluginPath : string read GetPluginPath write SetPluginPath; property PluginPath : string read GetPluginPath write SetPluginPath;
property ExtPath : string read GetExtPath write SetExtPath; property ExtPath : string read GetExtPath write SetExtPath;
property ScriptDir : string read GetScriptPath write SetScriptPath;
property CurrHighlighter : TSynCustomHighlighter read GetHighlighter; property CurrHighlighter : TSynCustomHighlighter read GetHighlighter;
end; end;
@ -541,6 +544,11 @@ begin
end; end;
end; end;
function TForm1.GetScriptPath: string;
begin
result :=IncludeTrailingPathDelimiter(LoadSettingDef('Settings/Scripts/Path', ExpandFileName(MainDir+DS+'Scripts' + DS)));
end;
procedure TForm1.HandleOpenFileData; procedure TForm1.HandleOpenFileData;
var var
Args : TVariantArray; Args : TVariantArray;
@ -1140,6 +1148,10 @@ begin
CreateDir(PluginsPath); CreateDir(PluginsPath);
if not DirectoryExists(extensionsPath) then if not DirectoryExists(extensionsPath) then
CreateDir(extensionsPath); CreateDir(extensionsPath);
if not DirectoryExists(ExtPath) then
CreateDir(ExtPath);
if not DirectoryExists(ScriptDir) then
CreateDir(ScriptDir);
SettingsForm.SettingsTreeView.Items.GetFirstNode.Expand(false); SettingsForm.SettingsTreeView.Items.GetFirstNode.Expand(false);
SettingsForm.SaveCurrent; SettingsForm.SaveCurrent;
LoadFormSettings; LoadFormSettings;
@ -2553,6 +2565,11 @@ begin
SetSetting('Settings/Plugins/Path',AValue,true); SetSetting('Settings/Plugins/Path',AValue,true);
end; end;
procedure TForm1.SetScriptPath(const AValue: string);
begin
SetSetting('Settings/Scripts/Path',AValue,True);
end;
procedure TForm1.SetScriptState(const State: TScriptState); procedure TForm1.SetScriptState(const State: TScriptState);
begin begin
CurrScript.FScriptState:= State; CurrScript.FScriptState:= State;