diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-07 20:25:38 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-07 20:25:38 +0000 |
commit | 920aa970afa086a3a143b39005747210b94f237b (patch) | |
tree | 10e5bdc77f6a533772e4509e4a56ba3f7dc46722 /plugins/Alarms | |
parent | 097c52ad9a2928422084bf76cebee58958341574 (diff) |
Trigger plugin's support removed, cause this plugin is dead
git-svn-id: http://svn.miranda-ng.org/main/trunk@4374 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Alarms')
-rw-r--r-- | plugins/Alarms/alarms_10.vcxproj | 2 | ||||
-rw-r--r-- | plugins/Alarms/alarms_10.vcxproj.filters | 6 | ||||
-rw-r--r-- | plugins/Alarms/alarms_11.vcxproj | 2 | ||||
-rw-r--r-- | plugins/Alarms/alarms_11.vcxproj.filters | 6 | ||||
-rw-r--r-- | plugins/Alarms/src/alarmlist.cpp | 36 | ||||
-rw-r--r-- | plugins/Alarms/src/alarms.cpp | 4 | ||||
-rw-r--r-- | plugins/Alarms/src/alarms.h | 2 | ||||
-rw-r--r-- | plugins/Alarms/src/common.h | 2 | ||||
-rw-r--r-- | plugins/Alarms/src/trigger.cpp | 106 | ||||
-rw-r--r-- | plugins/Alarms/src/trigger.h | 11 |
10 files changed, 1 insertions, 176 deletions
diff --git a/plugins/Alarms/alarms_10.vcxproj b/plugins/Alarms/alarms_10.vcxproj index ca3ec877c7..bbf2b9e395 100644 --- a/plugins/Alarms/alarms_10.vcxproj +++ b/plugins/Alarms/alarms_10.vcxproj @@ -192,7 +192,6 @@ <ClCompile Include="src\icons.cpp" />
<ClCompile Include="src\options.cpp" />
<ClCompile Include="src\time_utils.cpp" />
- <ClCompile Include="src\trigger.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\alarm_win.h" />
@@ -204,7 +203,6 @@ <ClInclude Include="src\options.h" />
<ClInclude Include="src\resource.h" />
<ClInclude Include="src\time_utils.h" />
- <ClInclude Include="src\trigger.h" />
<ClInclude Include="src\Version.h" />
</ItemGroup>
<ItemGroup>
diff --git a/plugins/Alarms/alarms_10.vcxproj.filters b/plugins/Alarms/alarms_10.vcxproj.filters index eaa1d16080..103a59191d 100644 --- a/plugins/Alarms/alarms_10.vcxproj.filters +++ b/plugins/Alarms/alarms_10.vcxproj.filters @@ -36,9 +36,6 @@ <ClCompile Include="src\time_utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="src\trigger.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="src\stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -71,9 +68,6 @@ <ClInclude Include="src\time_utils.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="src\trigger.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="src\Version.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/plugins/Alarms/alarms_11.vcxproj b/plugins/Alarms/alarms_11.vcxproj index 988030635a..78b46ef6a1 100644 --- a/plugins/Alarms/alarms_11.vcxproj +++ b/plugins/Alarms/alarms_11.vcxproj @@ -197,7 +197,6 @@ <ClCompile Include="src\icons.cpp" />
<ClCompile Include="src\options.cpp" />
<ClCompile Include="src\time_utils.cpp" />
- <ClCompile Include="src\trigger.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\alarm_win.h" />
@@ -209,7 +208,6 @@ <ClInclude Include="src\options.h" />
<ClInclude Include="src\resource.h" />
<ClInclude Include="src\time_utils.h" />
- <ClInclude Include="src\trigger.h" />
<ClInclude Include="src\Version.h" />
</ItemGroup>
<ItemGroup>
diff --git a/plugins/Alarms/alarms_11.vcxproj.filters b/plugins/Alarms/alarms_11.vcxproj.filters index eaa1d16080..103a59191d 100644 --- a/plugins/Alarms/alarms_11.vcxproj.filters +++ b/plugins/Alarms/alarms_11.vcxproj.filters @@ -36,9 +36,6 @@ <ClCompile Include="src\time_utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="src\trigger.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="src\stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -71,9 +68,6 @@ <ClInclude Include="src\time_utils.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="src\trigger.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="src\Version.h">
<Filter>Header Files</Filter>
</ClInclude>
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp index 15956ca62d..05a3e73d67 100644 --- a/plugins/Alarms/src/alarmlist.cpp +++ b/plugins/Alarms/src/alarmlist.cpp @@ -32,7 +32,6 @@ void copy_alarm_data(ALARM *dest, ALARM *src) { dest->snoozer = src->snoozer;
dest->sound_num = src->sound_num;
dest->time = src->time;
- dest->trigger_id = src->trigger_id;
free_alarm_data(dest);
dest->szTitle = mir_tstrdup(src->szTitle);
@@ -241,9 +240,6 @@ void LoadAlarms() { break;
}
- sprintf(buff, "TriggerID%d", i);
- alarm.trigger_id = db_get_dw(0, MODULE, buff, 0);
-
if (UpdateAlarm(alarm.time, alarm.occurrence)) {
sprintf(buff, "ActionFlags%d", i);
alarm.action = (unsigned short)db_get_dw(0, MODULE, buff, AAF_POPUP | AAF_SOUND);
@@ -280,15 +276,6 @@ void LoadAlarms() { alarm.id = next_alarm_id++;
alarms.push_back(&alarm);
-
- } else { // else ignore it - it's an expired one-off alarm (but clean up triggers)
- if (alarm.trigger_id != 0 && ServiceExists(MS_TRIGGER_REPORTEVENT)) {
- REPORTINFO ri = {0};
- ri.cbSize = sizeof(ri);
- ri.triggerID = alarm.trigger_id;
- ri.flags = TRG_CLEANUP;
- CallService(MS_TRIGGER_REPORTEVENT, 0, (LPARAM)&ri);
- }
}
free_alarm_data(&alarm);
}
@@ -359,9 +346,6 @@ void SaveAlarms() { sprintf(buff, "Flags%d", index);
db_set_dw(0, MODULE, buff, i->flags);
-
- sprintf(buff, "TriggerID%d", index);
- db_set_dw(0, MODULE, buff, i->trigger_id);
}
db_set_w(0, MODULE, "Count", index);
@@ -440,13 +424,6 @@ void remove(unsigned short alarm_id) { ALARM *i;
for(alarms.reset(); i = alarms.current(); alarms.next()) {
if (i->id == alarm_id) {
- if (i->trigger_id != 0 && ServiceExists(MS_TRIGGER_REPORTEVENT)) {
- REPORTINFO ri = {0};
- ri.cbSize = sizeof(ri);
- ri.triggerID = i->trigger_id;
- ri.flags = TRG_CLEANUP;
- CallService(MS_TRIGGER_REPORTEVENT, 0, (LPARAM)&ri);
- }
alarms.erase();
break;
}
@@ -589,19 +566,8 @@ void DoAlarm(ALARM *alarm) }
}
- if (alarm->trigger_id != 0 && ServiceExists(MS_TRIGGER_REPORTEVENT)) {
- REPORTINFO ri = {0};
- ri.cbSize = sizeof(ri);
- ri.triggerID = alarm->trigger_id;
- ri.flags = TRG_PERFORM;
- if (alarm->occurrence == OC_ONCE)
- ri.flags |= TRG_CLEANUP;
- CallService(MS_TRIGGER_REPORTEVENT, 0, (LPARAM)&ri);
- }
-
- if (alarm->action & AAF_COMMAND) {
+ if (alarm->action & AAF_COMMAND)
ShellExecute(0, 0, alarm->szCommand, alarm->szCommandParams, 0, SW_NORMAL);
- }
if (alarm->action & AAF_SYSTRAY)
{
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp index e0c57e81a8..6fe54250fe 100644 --- a/plugins/Alarms/src/alarms.cpp +++ b/plugins/Alarms/src/alarms.cpp @@ -179,10 +179,6 @@ static int MainInit(WPARAM wparam,LPARAM lparam) HookEvent(ME_TTB_MODULELOADED, InitTopToolbarButton);
InitFrames();
-
- // TriggerPlugin support
- LoadTriggerSupport();
-
return 0;
}
diff --git a/plugins/Alarms/src/alarms.h b/plugins/Alarms/src/alarms.h index 94b171d867..1f480e4bc0 100644 --- a/plugins/Alarms/src/alarms.h +++ b/plugins/Alarms/src/alarms.h @@ -5,7 +5,5 @@ #include "alarmlist.h"
#include "options.h"
#include "frame.h"
-#include "trigger.h"
-
#endif
diff --git a/plugins/Alarms/src/common.h b/plugins/Alarms/src/common.h index 7b95360343..c2116c679b 100644 --- a/plugins/Alarms/src/common.h +++ b/plugins/Alarms/src/common.h @@ -27,7 +27,6 @@ #include <win2k.h>
#include <m_toptoolbar.h>
-#include <m_trigger.h>
#include <m_alarms.h>
#include "resource.h"
@@ -51,7 +50,6 @@ typedef struct ALARM_tag { TCHAR *szCommandParams;
BYTE sound_num;
int flags;
- DWORD trigger_id;
} ALARM;
#endif
diff --git a/plugins/Alarms/src/trigger.cpp b/plugins/Alarms/src/trigger.cpp deleted file mode 100644 index 532b98920c..0000000000 --- a/plugins/Alarms/src/trigger.cpp +++ /dev/null @@ -1,106 +0,0 @@ -#include "common.h"
-#include "trigger.h"
-
-AlarmList alist;
-//SPECIFICTRIGGERINFO sti;
-TRIGGERDATA td;
-
-unsigned short last_selected_id = 0;
-
-static INT_PTR CALLBACK DlgProcTriggerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch(msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- copy_list(alist);
- ALARM *i;
- for(alist.reset(); i = alist.current(); alist.next()) {
- int pos = SendDlgItemMessage(hwndDlg, IDC_LST_TRIGLIST, LB_ADDSTRING, (WPARAM)-1, (LPARAM)i->szTitle);
- SendDlgItemMessage(hwndDlg, IDC_LST_TRIGLIST, LB_SETITEMDATA, (WPARAM)pos, (LPARAM)i->id);
- if (i->trigger_id == (unsigned int)lParam)
- SendDlgItemMessage(hwndDlg, IDC_LST_TRIGLIST, LB_SETCURSEL, (WPARAM)pos, 0);
- }
- }
- return FALSE;
-
- case WM_COMMAND:
- if (HIWORD( wParam ) == LBN_SELCHANGE) {
- int pos = SendDlgItemMessage(hwndDlg, IDC_LST_TRIGLIST, LB_GETCURSEL, 0, 0);
- if (pos != LB_ERR) {
- last_selected_id = (unsigned short)SendDlgItemMessage(hwndDlg, IDC_LST_TRIGLIST, LB_GETITEMDATA, pos, 0);
- }
- return TRUE;
- }
- break;
- case TM_GETTRIGGERINFO:
- {
- //memset(&sti, sizeof(sti), 0);
- memset(&td, sizeof(td), 0);
-
- ALARM *i;
- for(alist.reset(); i = alist.current(); alist.next()) {
- if (i->trigger_id == wParam) {
- //sti.cbSize = sizeof(sti);
- //sti.triggerID = wParam;
- //sti.pszSummary = i->szTitle;
- //sti.td = &td;
-
- td.cbSize = sizeof(td);
- td.dFlags = DF_TEXT;
- td.tszText = i->szDesc;
- //*(SPECIFICTRIGGERINFO **)lParam = &sti;
- break;
- }
- }
- }
- return TRUE;
- case TM_ADDTRIGGER:
- {
- ALARM *i;
- for(alist.reset(); i = alist.current(); alist.next()) {
- if (i->id == last_selected_id) {
- i->trigger_id = wParam;
- alter_alarm_list(i);
- break;
- }
- }
- }
- return TRUE;
- case TM_DELTRIGGER:
- {
- ALARM *i;
- for(alist.reset(); i = alist.current(); alist.next()) {
- if (i->trigger_id == wParam) {
- i->trigger_id = 0;
- alter_alarm_list(i);
- break;
- }
- }
- }
- return TRUE;
-
- case WM_DESTROY:
- // it seems this is called before the TM_ADDTRIGGER messsage is passed to us....tsk,tsk :P
- //alist.clear();
- break;
-
- }
- return FALSE;
-}
-
-int LoadTriggerSupport() {
- if (ServiceExists(MS_TRIGGER_REGISTERTRIGGER)) {
- TRIGGERREGISTER treg = {0};
-
- treg.cbSize = sizeof(treg);
- treg.pszName = Translate("Alarms");
- treg.hInstance = hInst;
- treg.pfnDlgProc = DlgProcTriggerOptions;
- treg.pszTemplate = MAKEINTRESOURCEA(IDD_OPTTRIGGER);
-
- CallService(MS_TRIGGER_REGISTERTRIGGER, 0, (LPARAM)&treg);
- }
-
- return 0;
-}
diff --git a/plugins/Alarms/src/trigger.h b/plugins/Alarms/src/trigger.h deleted file mode 100644 index 3b326e78a4..0000000000 --- a/plugins/Alarms/src/trigger.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _TRIGGER_INC
-#define _TRIGGER_INC
-
-#include "alarmlist.h"
-
-
-int LoadTriggerSupport();
-
-
-#endif
-
|