From 32e5c1c6b1a151e1dc36ee40e72a3376759578dc Mon Sep 17 00:00:00 2001 From: Alexey Kulakov Date: Thu, 11 Dec 2014 09:24:33 +0000 Subject: Actman 30: setting convertation messages fix git-svn-id: http://svn.miranda-ng.org/main/trunk@11321 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Actman30/i_options.inc | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/plugins/Actman30/i_options.inc b/plugins/Actman30/i_options.inc index 089724401c..488d8a903c 100644 --- a/plugins/Actman30/i_options.inc +++ b/plugins/Actman30/i_options.inc @@ -46,6 +46,7 @@ var p,p1:PAnsiChar; begin // even if crap in settings, skip on read + DBWriteByte(0,DBBranch,'version' ,3); DBDeleteGroup(0,DBBranch,opt_group); //!! @@ -401,23 +402,26 @@ var NumMacros:cardinal; v2:bool; begin - //!! Check if old actman version used -// v2:=DBReadWord(0,DBBranch,opt_numacts,$FFFF)<>$FFFF; - // V2 counts actions from 1, not 0 - v2:=DBReadDWord(0,DBBranch,'Group0/Action0/flags',$FFFFFFFF)=$FFFFFFFF; + NumMacros:=DBReadWord(0,DBBranch,opt_nummacro,0); - if v2 then + // Check if old actman version used + if NumMacros>0 then begin - if MessageBoxW(0,TranslateW(OldVersion),'Actman',MB_OKCANCEL or MB_ICONWARNING)<>IDOK then + // V2 counts actions from 1, not 0 + v2:=DBReadDWord(0,DBBranch,'Group0/Action0/flags',$FFFFFFFF)=$FFFFFFFF; + + if v2 then begin - NumMacros:=0; - MacroList:=tMacroList.Create(0); - exit; + if MessageBoxW(0,TranslateW(OldVersion),'Actman',MB_OKCANCEL or MB_ICONWARNING)<>IDOK then + begin + NumMacros:=0; + MacroList:=tMacroList.Create(0); + exit; + end; end; end; // Allocate macro list - NumMacros:=DBReadWord(0,DBBranch,opt_nummacro,0); MacroList:=tMacroList.Create(NumMacros); // read macro list settings @@ -451,14 +455,13 @@ begin inc(Macro); 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); + if v2 then + begin + DBDeleteSetting(0,DBBranch,opt_numacts); + SaveMacros; + MessageBoxW(0,TranslateW(Notes),TranslateW(ConvResult),MB_ICONINFORMATION); + end; end; end; -- cgit v1.2.3