summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2014-12-11 09:24:33 +0000
committerAlexey Kulakov <panda75@bk.ru>2014-12-11 09:24:33 +0000
commit32e5c1c6b1a151e1dc36ee40e72a3376759578dc (patch)
treeac900c119bee6cef0585a6b7b72ac40920034254
parent16bcfe9d2e4fed9d178c0e4f424ce7916707aa72 (diff)
Actman 30: setting convertation messages fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@11321 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Actman30/i_options.inc37
1 files 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;