1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-02-16 07:10:10 -05:00

Extension: Updater.sei update #2.

This commit is contained in:
John P (Dgby714) 2011-01-03 04:08:17 -05:00
parent a48c4e6ec8
commit dc0f563db9

View File

@ -46,9 +46,6 @@ var
begin begin
with UpdaterArr[I] do with UpdaterArr[I] do
begin begin
if ((Settings.GetKeyValueDef(Name + '_DontUpdate', 'false') = 'true') and (not (Sender = UpdateMenuItem))) then
Exit;
if (Locked) then if (Locked) then
Exit; Exit;
@ -104,10 +101,7 @@ begin
begin begin
case Sender of case Sender of
UpdaterArr[I].Timer: Name := 'Timer'; UpdaterArr[I].Timer: Name := 'Timer';
UpdaterArr[I].CheckMenuItem: begin UpdaterArr[I].CheckMenuItem: Name := 'Check';
Name := 'Check';
Settings.SetKeyValue(UpdaterArr[I].Name + '_DontUpdate', 'false');
end;
end; end;
if (not (Name = '')) then if (not (Name = '')) then
Break; Break;
@ -168,7 +162,7 @@ begin
if ((IntToStr(StrToIntDef(Value, -1)) = Value) and InRange(StrToIntDef(Value, -1), 1, 100000)) then if ((IntToStr(StrToIntDef(Value, -1)) = Value) and InRange(StrToIntDef(Value, -1), 1, 100000)) then
begin begin
Timer.Interval := StrToIntDef(Value, (Timer.Interval / 1000)) * 1000; Timer.Interval := StrToIntDef(Value, (Timer.Interval / 1000)) * 1000;
TimerMenuItem.Caption := 'Timer Interval: ' + IntToStr(Timer.Interval); TimerMenuItem.Caption := 'Timer Interval: ' + IntToStr(Timer.Interval / 1000);
Settings.SetKeyValue(Name + '_TimerInterval', IntToStr(Timer.Interval)); Settings.SetKeyValue(Name + '_TimerInterval', IntToStr(Timer.Interval));
end; end;
end; end;
@ -245,7 +239,6 @@ begin
Folder := ExFolder; Folder := ExFolder;
CreateMenu := ShowMenu; CreateMenu := ShowMenu;
NoMenuTimer := TimerIfNoMenu; NoMenuTimer := TimerIfNoMenu;
Settings.SetKeyValue(Name + '_DontUpdate', 'false');
if (CreateMenu) then if (CreateMenu) then
begin begin
@ -306,7 +299,7 @@ begin
MainMenu.Add(SettingsMenu); MainMenu.Add(SettingsMenu);
TimerMenuItem := TMenuItem.Create(SettingsMenu); TimerMenuItem := TMenuItem.Create(SettingsMenu);
TimerMenuItem.Caption := 'Timer Interval: ' + ExtractFromStr(Settings.GetKeyValueDef(Name + '_TimerInterval', '3600000'), Numbers); TimerMenuItem.Caption := 'Timer Interval: ' + IntToStr(StrToIntDef(ExtractFromStr(Settings.GetKeyValueDef(Name + '_TimerInterval', '3600000'), Numbers), 3600000) / 1000);
TimerMenuItem.OnClick := @Click; TimerMenuItem.OnClick := @Click;
SettingsMenu.Add(TimerMenuItem); SettingsMenu.Add(TimerMenuItem);