diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2014-12-19 20:02:47 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2014-12-19 20:02:47 +0000 |
commit | f2cce78db24a0f0a53b8ca41ff112968a5f2d86b (patch) | |
tree | 5dce24a102dc4117ab993e201811948927842e47 /plugins/Actman/tasks | |
parent | a1ff366b1634ed741bdc764489f9e715f90900f5 (diff) |
Actman 2.0 is moved to deprecated, Actman 3.0 is a new default Actman (with database settings converter from older version)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11533 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Actman/tasks')
-rw-r--r-- | plugins/Actman/tasks/i_opt_dlg.inc | 11 | ||||
-rw-r--r-- | plugins/Actman/tasks/i_options.inc | 1 | ||||
-rw-r--r-- | plugins/Actman/tasks/scheduler.pas | 24 |
3 files changed, 13 insertions, 23 deletions
diff --git a/plugins/Actman/tasks/i_opt_dlg.inc b/plugins/Actman/tasks/i_opt_dlg.inc index c8025c278d..bf8d45f63c 100644 --- a/plugins/Actman/tasks/i_opt_dlg.inc +++ b/plugins/Actman/tasks/i_opt_dlg.inc @@ -275,13 +275,14 @@ function DeleteTask(Dialog:HWND):integer; var
li:LV_ITEM;
wnd:HWND;
- i:integer;
+ i,j:integer;
begin
result:=0;
wnd:=GetDlgItem(Dialog,IDC_TASK_NAME);
- for i:=ListView_GetItemCount(wnd)-1 downto 0 do
+ j:=SendMessage(wnd,LVM_GETITEMCOUNT,0,0);
+ for i:=j-1 downto 0 do
begin
- if ListView_GetItemState(wnd,i,LVIS_SELECTED)<>0 then
+ if SendMessage(wnd,LVM_GETITEMSTATE,i,LVIS_SELECTED)<>0 then
begin
li.iItem :=i;
li.mask :=LVIF_PARAM;
@@ -299,7 +300,7 @@ begin CheckTaskList(Dialog,false);
end;
-function NewHKTableProc(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function NewHKTableProc(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
i:integer;
begin
@@ -403,7 +404,7 @@ begin SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,LPARAM(@ti));
end;
-function DlgProcOpt(Dialog:HWnd;hMessage:UINT;wParam:WPARAM;lParam:LPARAM):lresult; stdcall;
+function DlgProcOpt(Dialog:HWND;hMessage:uint;wParam:WPARAM;lParam:LPARAM):LRESULT; stdcall;
var
wnd:HWND;
lv:LV_COLUMNW;
diff --git a/plugins/Actman/tasks/i_options.inc b/plugins/Actman/tasks/i_options.inc index 527e8d0c88..da5cce0c40 100644 --- a/plugins/Actman/tasks/i_options.inc +++ b/plugins/Actman/tasks/i_options.inc @@ -83,6 +83,7 @@ begin StrCopy(p,opt_name ); name :=DBReadUnicode(0,DBBranch,section);
StrCopy(p,opt_action); action :=DBReadDWord (0,DBBranch,section);
StrCopy(p,opt_days ); dayoffset:=DBReadByte (0,DBBranch,section);
+ //!! smallint?
StrCopy(p,opt_repeat); count :=Shortint(DBReadWord(0,DBBranch,section));
StrCopy(p,opt_time_lo ); starttime.dwLowDateTime :=DBReadDWord(0,DBBranch,section);
diff --git a/plugins/Actman/tasks/scheduler.pas b/plugins/Actman/tasks/scheduler.pas index 05e9cb6a58..1ec1202f26 100644 --- a/plugins/Actman/tasks/scheduler.pas +++ b/plugins/Actman/tasks/scheduler.pas @@ -2,21 +2,15 @@ unit scheduler; interface
-procedure Init;
-procedure DeInit;
-function AddOptionPage(var tmpl:pAnsiChar;var proc:pointer;var name:PAnsiChar):integer;
-
implementation
uses
windows, commctrl, messages,
- mirutils, common, dbsettings, io, m_api, wrapper,
+ mirutils, common, dbsettings, m_api, wrapper,
global;
{$R tasks.res}
-{$include m_actman.inc}
-
var
hevent: THANDLE;
@@ -28,11 +22,6 @@ var // ------------ base interface functions -------------
-var
- hendis,
- hcount,
- hdel: THANDLE;
-
procedure Init;
begin
@@ -45,19 +34,18 @@ begin else
SetAllTasks;
- hcount:=CreateServiceFunction(MS_ACT_TASKCOUNT ,@TaskCount);
- hendis:=CreateServiceFunction(MS_ACT_TASKENABLE,@TaskEnable);
- hdel :=CreateServiceFunction(MS_ACT_TASKDELETE,@TaskDelete);
+ CreateServiceFunction(MS_ACT_TASKCOUNT ,@TaskCount);
+ CreateServiceFunction(MS_ACT_TASKENABLE,@TaskEnable);
+ CreateServiceFunction(MS_ACT_TASKDELETE,@TaskDelete);
+
hevent:=CreateHookableEvent(ME_ACT_BELL);
end;
procedure DeInit;
begin
+ DestroyHookableEvent(hevent);
StopAllTasks;
- DestroyServiceFunction(hendis);
- DestroyServiceFunction(hdel);
- DestroyServiceFunction(hcount);
ClearTasks;
end;
|