summaryrefslogtreecommitdiff
path: root/plugins/KeyboardNotify
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-07 20:25:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-07 20:25:38 +0000
commit920aa970afa086a3a143b39005747210b94f237b (patch)
tree10e5bdc77f6a533772e4509e4a56ba3f7dc46722 /plugins/KeyboardNotify
parent097c52ad9a2928422084bf76cebee58958341574 (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/KeyboardNotify')
-rw-r--r--plugins/KeyboardNotify/KeyboardNotify_10.vcxproj2
-rw-r--r--plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters6
-rw-r--r--plugins/KeyboardNotify/KeyboardNotify_11.vcxproj2
-rw-r--r--plugins/KeyboardNotify/KeyboardNotify_11.vcxproj.filters6
-rw-r--r--plugins/KeyboardNotify/src/Common.h2
-rw-r--r--plugins/KeyboardNotify/src/main.cpp7
-rw-r--r--plugins/KeyboardNotify/src/trigger.cpp165
-rw-r--r--plugins/KeyboardNotify/src/trigger.h20
8 files changed, 0 insertions, 210 deletions
diff --git a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj
index 298d20895e..97ddab7986 100644
--- a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj
+++ b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj
@@ -184,7 +184,6 @@
<ClInclude Include="src\keypresses.h" />
<ClInclude Include="src\protolist.h" />
<ClInclude Include="src\resource.h" />
- <ClInclude Include="src\trigger.h" />
<ClInclude Include="src\utils.h" />
<ClInclude Include="src\Version.h" />
</ItemGroup>
@@ -199,7 +198,6 @@
</ClCompile>
<ClCompile Include="src\options.cpp" />
<ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\trigger.cpp" />
<ClCompile Include="src\utils.cpp" />
</ItemGroup>
<ItemGroup>
diff --git a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters
index f6a0fb7af4..b30f7b3ad3 100644
--- a/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters
+++ b/plugins/KeyboardNotify/KeyboardNotify_10.vcxproj.filters
@@ -30,9 +30,6 @@
<ClInclude Include="src\resource.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="src\trigger.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="src\utils.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -68,9 +65,6 @@
<ClCompile Include="src\options.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>
diff --git a/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj b/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj
index 6ad64c9857..28a9d4f82f 100644
--- a/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj
+++ b/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj
@@ -189,7 +189,6 @@
<ClInclude Include="src\keypresses.h" />
<ClInclude Include="src\protolist.h" />
<ClInclude Include="src\resource.h" />
- <ClInclude Include="src\trigger.h" />
<ClInclude Include="src\utils.h" />
<ClInclude Include="src\Version.h" />
</ItemGroup>
@@ -204,7 +203,6 @@
</ClCompile>
<ClCompile Include="src\options.cpp" />
<ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\trigger.cpp" />
<ClCompile Include="src\utils.cpp" />
</ItemGroup>
<ItemGroup>
diff --git a/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj.filters b/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj.filters
index f6a0fb7af4..b30f7b3ad3 100644
--- a/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj.filters
+++ b/plugins/KeyboardNotify/KeyboardNotify_11.vcxproj.filters
@@ -30,9 +30,6 @@
<ClInclude Include="src\resource.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="src\trigger.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="src\utils.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -68,9 +65,6 @@
<ClCompile Include="src\options.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>
diff --git a/plugins/KeyboardNotify/src/Common.h b/plugins/KeyboardNotify/src/Common.h
index d8cef2f67c..00705df8b6 100644
--- a/plugins/KeyboardNotify/src/Common.h
+++ b/plugins/KeyboardNotify/src/Common.h
@@ -43,12 +43,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_kbdnotify.h>
#include <m_metacontacts.h>
-#include <m_trigger.h>
#include "flash.h"
#include "ignore.h"
#include "keyboard.h"
-#include "trigger.h"
#include "constants.h"
#include "protolist.h"
#include "EnumProc.h"
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index 5383bc5acd..b44e1de20d 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -901,7 +901,6 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam)
hFlashingEventService = CreateServiceFunction(MS_KBDNOTIFY_FLASHINGACTIVE, IsFlashingActiveService);
hNormalizeSequenceService = CreateServiceFunction(MS_KBDNOTIFY_NORMALSEQUENCE, NormalizeSequenceService);
- RegisterAction();
if (ServiceExists("DBEditorpp/RegisterSingleModule"))
CallService("DBEditorpp/RegisterSingleModule", (WPARAM)KEYBDMODULE, 0);
@@ -912,11 +911,8 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam)
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
-
hInst = hinstDLL;
-
return TRUE;
-
}
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
@@ -926,7 +922,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" __declspec(dllexport) int Load(void)
{
-
mir_getLP(&pluginInfo);
GetWindowsVersion();
@@ -955,9 +950,7 @@ void destroyProtocolList(void)
extern "C" __declspec(dllexport) int Unload(void)
{
-
UnhookWindowsHooks();
- DeInitAction();
if (hModulesLoaded)
UnhookEvent(hModulesLoaded);
if (hMsgEventHook)
diff --git a/plugins/KeyboardNotify/src/trigger.cpp b/plugins/KeyboardNotify/src/trigger.cpp
deleted file mode 100644
index 147744b96d..0000000000
--- a/plugins/KeyboardNotify/src/trigger.cpp
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-#include "Common.h"
-
-extern HINSTANCE hInst;
-
-void StartBlinkAction(char *, WORD);
-
-
-int getCustomNro(DWORD actionID, HWND hwndDlg, int nItems)
-{
- int i;
- DBVARIANT dbv;
- char theme[MAX_PATH+1];
-
- if (DBGetTriggerSetting(actionID, NULL, KEYBDMODULE, "custom", &dbv))
- return DEF_SETTING_CUSTOMTHEME;
-
- for (i=0; i < nItems; i++) {
- SendDlgItemMessage(hwndDlg, IDC_CUSTOMTHEME, CB_GETLBTEXT, (WPARAM)i, (LPARAM)theme);
- if (!strcmp(dbv.pszVal, theme)) {
- db_free(&dbv);
- return i;
- }
- }
-
- db_free(&dbv);
- return DEF_SETTING_CUSTOMTHEME;
-}
-
-static INT_PTR CALLBACK DlgProcOptsActionKbdNotify(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- DBVARIANT dbv;
- DWORD actionID;
- int i, nItems;
- char theme[MAX_PATH+1];
-
- switch (msg) {
- case WM_INITDIALOG:
- actionID = (DWORD)lParam;
- TranslateDialogDefault(hwndDlg);
-
- for (i=0; !db_get(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i), &dbv); i++) {
- int index = SendDlgItemMessage(hwndDlg, IDC_CUSTOMTHEME, CB_INSERTSTRING, (WPARAM)-1, (LPARAM)dbv.pszVal);
- db_free(&dbv);
- if (index != CB_ERR && index != CB_ERRSPACE)
- SendDlgItemMessage(hwndDlg, IDC_CUSTOMTHEME, CB_SETITEMDATA, (WPARAM)index, (LPARAM)i);
- }
-
- nItems = SendDlgItemMessage(hwndDlg, IDC_CUSTOMTHEME, CB_GETCOUNT, 0, 0);
-
- CheckDlgButton(hwndDlg, IDC_USECUSTOM, nItems && DBGetTriggerSettingByte(actionID, NULL, KEYBDMODULE, "usecustom", 0) ? BST_CHECKED:BST_UNCHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_USECUSTOM), nItems);
-
- SendDlgItemMessage(hwndDlg, IDC_CUSTOMTHEME, CB_SETCURSEL, (WPARAM)getCustomNro(actionID, hwndDlg, nItems), 0);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMTHEME), IsDlgButtonChecked(hwndDlg, IDC_USECUSTOM) == BST_CHECKED);
-
- SendDlgItemMessage(hwndDlg, IDC_FORCEOPEN, UDM_SETBUDDY, (WPARAM)GetDlgItem(hwndDlg, IDC_SFORCEOPEN), 0);
- SendDlgItemMessage(hwndDlg, IDC_FORCEOPEN, UDM_SETRANGE32, 1, MAKELONG(UD_MAXVAL, 0));
- SendDlgItemMessage(hwndDlg, IDC_FORCEOPEN, UDM_SETPOS, 0, MAKELONG(DBGetTriggerSettingWord(actionID, NULL, KEYBDMODULE, "forceopen", DEF_SETTING_NBLINKS), 0));
-
- break;
-
- case TM_ADDACTION: // save the settings
- actionID = (DWORD)wParam;
- DBWriteTriggerSettingByte(actionID, NULL, KEYBDMODULE, "usecustom", (BYTE)(IsDlgButtonChecked(hwndDlg, IDC_USECUSTOM) == BST_CHECKED ? 1:0));
- SendDlgItemMessage(hwndDlg, IDC_CUSTOMTHEME, CB_GETLBTEXT, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_CUSTOMTHEME, CB_GETCURSEL, 0, 0), (LPARAM)theme);
- DBWriteTriggerSettingString(actionID, NULL, KEYBDMODULE, "custom", theme);
- DBWriteTriggerSettingWord(actionID, NULL, KEYBDMODULE, "forceopen", (WORD)SendDlgItemMessage(hwndDlg, IDC_FORCEOPEN, UDM_GETPOS, 0, 0));
- break;
-
- case WM_COMMAND:
- if (LOWORD(wParam) == IDC_USECUSTOM)
- EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMTHEME), IsDlgButtonChecked(hwndDlg, IDC_USECUSTOM) == BST_CHECKED);
- break;
-
- case WM_DESTROY:
- break;
- }
-
- return FALSE;
-}
-
-char *getCustomString(DWORD actionID)
-{
- int i;
- DBVARIANT dbv, dbv2;
- static char customString[MAX_PATH+1];
-
- if (DBGetTriggerSetting(actionID, NULL, KEYBDMODULE, "custom", &dbv))
- return NULL;
-
- for (i=0; !db_get(NULL, KEYBDMODULE, fmtDBSettingName("theme%d", i), &dbv2); i++) {
- if (!strcmp(dbv.pszVal, dbv2.pszVal)) {
- db_free(&dbv);
- db_free(&dbv2);
- if(db_get(NULL, KEYBDMODULE, fmtDBSettingName("custom%d", i), &dbv2))
- return NULL;
- strcpy(customString, dbv2.pszVal);
- db_free(&dbv2);
- return customString;
- }
- db_free(&dbv2);
- }
-
- db_free(&dbv);
- return NULL;
-}
-
-static int TriggerStartBlinkFunction(DWORD actionID, REPORTINFO *ri)
-{
- if (ri->flags&ACT_PERFORM) {
- char *customStr;
-
- if (!DBGetTriggerSettingByte(actionID, NULL, KEYBDMODULE, "usecustom", 0))
- customStr = NULL;
- else
- customStr = getCustomString(actionID);
- StartBlinkAction(customStr, DBGetTriggerSettingWord(actionID, NULL, KEYBDMODULE, "forceopen", DEF_SETTING_NBLINKS));
- }
- if (ri->flags&ACT_CLEANUP) { // request to delete all associated settings
- RemoveAllActionSettings(actionID, KEYBDMODULE);
- }
-
- return 0; // all ok
-}
-
-int RegisterAction()
-{
- ACTIONREGISTER ar;
-
- if (!ServiceExists(MS_TRIGGER_REGISTERACTION))
- return -1;
-
- ZeroMemory(&ar, sizeof(ar));
- ar.cbSize = sizeof(ar);
- ar.pszName = "Keyboard Flash: Start Blinking";
- ar.actionFunction = TriggerStartBlinkFunction;
- ar.hInstance = hInst;
- ar.pfnDlgProc = DlgProcOptsActionKbdNotify;
- ar.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_KN_ACTION);
- ar.flags = ARF_FUNCTION;
- return CallService(MS_TRIGGER_REGISTERACTION, 0, (LPARAM)&ar);
-}
-
-int DeInitAction()
-{
- return 0;
-}
diff --git a/plugins/KeyboardNotify/src/trigger.h b/plugins/KeyboardNotify/src/trigger.h
deleted file mode 100644
index 41d830938c..0000000000
--- a/plugins/KeyboardNotify/src/trigger.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-int RegisterAction();
-int DeInitAction();