diff options
Diffstat (limited to 'plugins/Actman30/i_options.inc')
-rw-r--r-- | plugins/Actman30/i_options.inc | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/plugins/Actman30/i_options.inc b/plugins/Actman30/i_options.inc index 7cbfe6716d..089724401c 100644 --- a/plugins/Actman30/i_options.inc +++ b/plugins/Actman30/i_options.inc @@ -46,7 +46,9 @@ var p,p1:PAnsiChar;
begin
// even if crap in settings, skip on read
-// DBDeleteGroup(0,DBBranch,opt_group);
+
+ DBDeleteGroup(0,DBBranch,opt_group); //!!
+
Macro:=MacroList[0];
i:=MacroList.Count;
NumMacro:=0;
@@ -101,6 +103,15 @@ const ACF_OLD_FWRITE = $00000020; // read/write file
ACF_OLD_FAPPEND = $00000040; // append file
+const
+ OldVersion = 'Your Actman settings is for old version. If you ready to upgrade settings, ' +
+ 'press OK. Else press Cancel and change manually Actman plugin back to old version ' +
+ 'or make settings backup. To keep previously expoted macros please import them back ' +
+ 'before conversion';
+ Notes = 'Please, don''t use macro test for non-saved macros. If you had ''Advanced'' or file ' +
+ 'writing actions previously, check it - their logic was changed.';
+ ConvResult = 'Actman settings converted to new version';
+
procedure CheckActionList(Macro:pMacroRecord;num:integer);
var
tmplist:pActionList;
@@ -395,8 +406,18 @@ begin // V2 counts actions from 1, not 0
v2:=DBReadDWord(0,DBBranch,'Group0/Action0/flags',$FFFFFFFF)=$FFFFFFFF;
+ if v2 then
+ begin
+ if MessageBoxW(0,TranslateW(OldVersion),'Actman',MB_OKCANCEL or MB_ICONWARNING)<>IDOK then
+ begin
+ NumMacros:=0;
+ MacroList:=tMacroList.Create(0);
+ exit;
+ end;
+ end;
+
// Allocate macro list
- NumMacros :=DBReadWord(0,DBBranch,opt_nummacro,0);
+ NumMacros:=DBReadWord(0,DBBranch,opt_nummacro,0);
MacroList:=tMacroList.Create(NumMacros);
// read macro list settings
@@ -431,4 +452,13 @@ begin inc(i);
end;
end;
+
+ if v2 then
+ begin
+ DBDeleteSetting(0,DBBranch,opt_numacts);
+ DBWriteByte(0,DBBranch,'version' ,3);
+ SaveMacros;
+ MessageBoxW(0,TranslateW(Notes),TranslateW(ConvResult),MB_ICONINFORMATION);
+ end;
+
end;
|