diff options
author | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-26 15:41:10 +0000 |
---|---|---|
committer | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-26 15:41:10 +0000 |
commit | f04d64869f3b1de54fb343f28f955584780001b8 (patch) | |
tree | 5453dc10de3d980de79ffe019fa0b5fcb692a27d /UseActions | |
parent | 7aff1e4cb053394db57c2814d5fe1e6493e0cc75 (diff) |
Project folders rename part 3
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@215 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'UseActions')
-rw-r--r-- | UseActions/Changelog.txt | 15 | ||||
-rw-r--r-- | UseActions/UseActions.c | 1407 | ||||
-rw-r--r-- | UseActions/UseActions.h | 55 | ||||
-rw-r--r-- | UseActions/UseActions_10.sln | 26 | ||||
-rw-r--r-- | UseActions/UseActions_10.vcxproj | 197 | ||||
-rw-r--r-- | UseActions/UseActions_10.vcxproj.filters | 53 | ||||
-rw-r--r-- | UseActions/UseActions_6.dsp | 230 | ||||
-rw-r--r-- | UseActions/UseActions_6.dsw | 29 | ||||
-rw-r--r-- | UseActions/UseActions_8.sln | 26 | ||||
-rw-r--r-- | UseActions/UseActions_8.vcproj | 443 | ||||
-rw-r--r-- | UseActions/UseActions_9.sln | 26 | ||||
-rw-r--r-- | UseActions/UseActions_9.vcproj | 418 | ||||
-rw-r--r-- | UseActions/common.h | 66 | ||||
-rw-r--r-- | UseActions/res/UseActions.rc | 160 | ||||
-rw-r--r-- | UseActions/res/action.ico | bin | 0 -> 2550 bytes | |||
-rw-r--r-- | UseActions/res/resource.h | 53 | ||||
-rw-r--r-- | UseActions/res/resource.rc | 2 | ||||
-rw-r--r-- | UseActions/res/version.h | 62 | ||||
-rw-r--r-- | UseActions/res/version.rc | 39 |
19 files changed, 3307 insertions, 0 deletions
diff --git a/UseActions/Changelog.txt b/UseActions/Changelog.txt new file mode 100644 index 0000000..349f104 --- /dev/null +++ b/UseActions/Changelog.txt @@ -0,0 +1,15 @@ +UseActions Plugin, version 0.0.0.3
+ * enlarged variables string length from 512 to 1024
+ * update of m_actman.h from Awkward's trunk
+ ! removed minor memleak when freeing action request results (thx Merlin)
+
+UseActions Plugin, version 0.0.0.2
+ + added calling of action named "#Autostart" at start of Miranda
+ * fix for TTB detection
+ + Updater support
+ + added possibility to insert separators before contactmenuitems and mainmenuitems
+ * delete "Flags" from DB if =0
+ + attempt to deregister all possible controls and erase all owned DB settings for an Action before removing it.
+ * adaptation to new ActMan structures (v0.6+)
+ + new Version resource
+
diff --git a/UseActions/UseActions.c b/UseActions/UseActions.c new file mode 100644 index 0000000..85de062 --- /dev/null +++ b/UseActions/UseActions.c @@ -0,0 +1,1407 @@ +#pragma warning( disable : 4100 )
+
+#include "common.h"
+#include "res\version.h"
+#include "res\resource.h"
+#include "UseActions.h"
+
+#define TABTOOLBAR_INITPOS 350
+
+struct LIST_INTERFACE li = { 0 };
+struct MM_INTERFACE mmi;
+int hLangpack;
+
+SortedList ActionItemsList = {0};
+TCHAR tszMyPath[MAX_PATH];
+
+HANDLE hEventOptInit;
+
+HANDLE hModulesLoaded;
+HANDLE hPreBuildMMenu;
+HANDLE hPreBuildCMenu;
+HANDLE hActionsChanged;
+HANDLE hMTBHook;
+HANDLE hTTBHook;
+HANDLE hTabBBLoadHook;
+HANDLE hTabBBPressHook;
+HANDLE hServiceWithLParam;
+
+BOOL bActionsDefined;
+BOOL bTTBPresents;
+BOOL bTabBBPresents;
+BOOL bMTBPresents;
+BOOL bCoreHotkeyPresents;
+BOOL bVariablePresents;
+BOOL bTrayMenuPresents;
+
+DWORD MMenuSeparator, CMenuSeparator;
+
+int ModulesLoaded(WPARAM wParam, LPARAM lParam);
+
+int ReadSetting(MyActionItem* ActionItem);
+void WriteSetting(MyActionItem* ActionItem);
+void SetAllActionUsers(MyActionItem* ActionItem);
+static int CompareActions(MyActionItem* c1, MyActionItem* c2 );
+
+HANDLE AddMainMenuItem(MyActionItem* ActionItem);
+void DeleteMainMenuItem(MyActionItem* ActionItem);
+int PreBuildMainMenu(WPARAM wParam,LPARAM lParam);
+HANDLE AddContactMenuItem(MyActionItem* ActionItem);
+void DeleteContactMenuItem(MyActionItem* ActionItem);
+int PreBuildContactMenu(WPARAM wParam,LPARAM lParam);
+HANDLE AddTrayMenuItem(MyActionItem* ActionItem);
+void DeleteTrayMenuItem(MyActionItem* ActionItem);
+
+HANDLE AddRootMenuIcon(TCHAR* tszCMenuPopup);
+
+HANDLE AddMTBButton(MyActionItem* ActionItem);
+void DeleteMTBButton(MyActionItem* ActionItem);
+int OnMTBLoaded(WPARAM wParam, LPARAM lParam);
+HANDLE AddTTBButton(MyActionItem* ActionItem);
+void DeleteTTBButton(MyActionItem* ActionItem);
+int OnTTBLoaded(WPARAM wParam, LPARAM lParam);
+BOOL AddTabBBButton(MyActionItem* ActionItem);
+void DeleteTabBBButton(MyActionItem* ActionItem);
+int OnTabBBLoaded(WPARAM wParam, LPARAM lParam);
+int OnTabButtonPressed(WPARAM wParam,LPARAM lParam);
+HANDLE AddIcolibIcon (MyActionItem* ActionItem);
+void DeleteIcolibIcon(MyActionItem* ActionItem);
+int AddCoreHotkey(MyActionItem* ActionItem);
+void DeleteCoreHotkey(MyActionItem* ActionItem);
+
+INT_PTR ServiceCallWithLParam (WPARAM wParam, LPARAM lParam);
+INT_PTR ServiceCallWithFParam (WPARAM wParam, LPARAM lParam, LPARAM fParam);
+int ActionsChanged(WPARAM wParam, LPARAM lParam);
+void AddActionItem(TChain NewAction, int Index);
+void SetActionDesc(MyActionItem* ActionItem, TChain NewAction);
+void DeleteActionItem(MyActionItem* ActionItem, int ActionIndex);
+
+int OptInit(WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+void FillListViewWithActions();
+int OptActiveItem;
+HWND hListView;
+HIMAGELIST hImageListView;
+HWND hDialogWIndow;
+BOOL bRefreshing;
+
+///////////////////////////////////////////////
+// Common Plugin Stuff
+///////////////////////////////////////////////
+HINSTANCE hInst;
+PLUGINLINK *pluginLink;
+
+PLUGININFOEX pluginInfo={
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESC,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE,
+ 0,
+ MIID_USEACTIONS
+};
+
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) {
+ hInst=hinstDLL;
+ return TRUE;
+}
+
+__declspec (dllexport) int Load(PLUGINLINK *link) {
+ pluginLink = link;
+ mir_getLP(&pluginInfo);
+ mir_getLI(&li);
+ mir_getMMI( &mmi );
+ ActionItemsList = *(li.List_Create( 0, 1));
+ ActionItemsList.sortFunc = CompareActions;
+
+ hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
+
+ GetModuleFileName(hInst, tszMyPath, MAX_PATH);
+
+ return 0;
+}
+
+__declspec (dllexport) int Unload(void) {
+ int i;
+ UnhookEvent(hModulesLoaded);
+ UnhookEvent(hActionsChanged);
+ UnhookEvent(hPreBuildMMenu);
+ UnhookEvent(hPreBuildCMenu);
+ UnhookEvent(hMTBHook);
+ UnhookEvent(hTabBBLoadHook);
+ UnhookEvent(hTTBHook);
+ UnhookEvent(hEventOptInit);
+ UnhookEvent(hTabBBPressHook);
+ DestroyServiceFunction(hServiceWithLParam);
+ for (i=ActionItemsList.realCount-1; i>=0;i--) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ DestroyServiceFunction(ActItem->hMenuService);
+ mir_free(ActItem);
+ }
+ li.List_Destroy(&ActionItemsList);
+ return 0;
+}
+
+__declspec (dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) {
+ return &pluginInfo;
+}
+
+/*
+// uncomment this for pre 0.7 compatibility
+extern "C" __declspec (dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion) {
+ pluginInfo.cbSize = sizeof(PLUGININFO);
+ return (PLUGININFO*)&pluginInfo;
+}
+*/
+
+static const MUUID interfaces[] = {MIID_USEACTIONS, MIID_LAST};
+__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void){
+ return interfaces;
+}
+
+static int CompareActions(MyActionItem* c1, MyActionItem* c2 ){
+ return c1->dwActID - c2->dwActID;
+}
+
+void AddActionItem(TChain NewAction, int Index) {
+ MyActionItem *ActItem = mir_calloc(sizeof(MyActionItem));
+ ActItem->dwActID = NewAction.ID;
+ ActItem->wSortIndex = Index;
+ //li.List_Insert(&ActionItemsList, ActItem, ActionItemsList.realCount);
+ li.List_InsertPtr(&ActionItemsList, ActItem);
+
+ SetActionDesc(ActItem, NewAction);
+ mir_snprintf(ActItem->szNameID,32,"%s/Action_%u", MODULE,NewAction.ID);
+
+ // register all for test
+ /*ActItem->wFlags = 0xFFFF;
+ _tcsncpy(ActItem->tszMMenuPopup, _T("TestMMenuPopup"), MAX_ACT_DESC_LEN);
+ _tcsncpy(ActItem->tszCMenuPopup, _T("TestCMenuPopup"), MAX_ACT_DESC_LEN);
+ _tcsncpy(ActItem->tszCMenuVarStr, _T("?if(?strcmp(?dbsetting(%subject%,CList,MyHandle),TestNick),1,0)"), MAX_ACT_DESC_LEN);
+ */
+ ReadSetting(ActItem);
+ SetAllActionUsers(ActItem);
+}
+
+void DeleteActionItem(MyActionItem* ActionItem, int ActionIndex) {
+ /*ActionItem->wFlags = UAF_NONE;
+ SetAllActionUsers(ActionItem);
+ DeleteIcolibIcon(ActionItem);*/
+ char text[200], *szDest;
+ mir_snprintf(text, 32, "Act%u_", ActionItem->dwActID);
+ szDest = text + strlen(text);
+
+ strcpy(szDest, "Flags");
+ DBDeleteContactSetting(NULL, MODULE, text);
+
+ // delete icon for action to icolib
+ DeleteIcolibIcon(ActionItem);
+
+ // core hotkeys
+ if (ActionItem->wFlags & UAF_REGHOTKEY) {
+ DeleteCoreHotkey(ActionItem);
+ }
+
+ // CList_Modern toolbar buttons
+ if (ActionItem->wFlags & UAF_REGMTBB) {
+ DeleteMTBButton(ActionItem);
+ }
+
+ // TopToolBar buttons
+ if (ActionItem->wFlags & UAF_REGTTBB) {
+ DeleteTTBButton(ActionItem);
+ }
+
+ // TabButtonBar buttons
+ if (ActionItem->wFlags & UAF_REGTABB) {
+ DeleteTabBBButton(ActionItem);
+ }
+
+ // MainMenu items
+ if (ActionItem->wFlags & UAF_REGMMENU) {
+ DeleteMainMenuItem(ActionItem);
+ strcpy(szDest, "MMenuPopup");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ strcpy(szDest, "MMenuName");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ strcpy(szDest, "MMenuVarStr");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ }
+
+ // ContactMenu items
+ if (ActionItem->wFlags & UAF_REGCMENU) {
+ DeleteContactMenuItem(ActionItem);
+ strcpy(szDest, "CMenuPopup");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ strcpy(szDest, "CMenuName");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ strcpy(szDest, "CMenuVarStr");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ }
+ // TrayMenu items
+ if (ActionItem->wFlags & UAF_REGTMENU) {
+ DeleteTrayMenuItem(ActionItem);
+ strcpy(szDest, "TMenuPopup");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ }
+
+ if (!(ActionItem->wFlags & (UAF_REGMMENU | UAF_REGCMENU | UAF_REGTMENU)) && (ActionItem->hMenuService != NULL)) {
+ DestroyServiceFunction(ActionItem->hMenuService);
+ ActionItem->hMenuService = NULL;
+ }
+
+ // FirstRun
+ strcpy(szDest, "FirstRun");
+ DBDeleteContactSetting(NULL, MODULE, text);
+
+ li.List_Remove(&ActionItemsList, ActionIndex);
+}
+
+int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
+ int ActionsCount;
+ DWORD* pActionStructLen = {0};
+ PChain pActionsList = {0};
+ //ACTION* pActionsList2 = {0};
+ bActionsDefined = FALSE;
+ if (ServiceExists(MS_ACT_GETLIST)) {
+ hEventOptInit = HookEvent(ME_OPT_INITIALISE, OptInit);
+ hPreBuildMMenu = HookEvent(ME_CLIST_PREBUILDMAINMENU, PreBuildMainMenu);
+ hPreBuildCMenu = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PreBuildContactMenu);
+
+ hActionsChanged = HookEvent(ME_ACT_CHANGED, ActionsChanged);
+ hMTBHook = HookEvent(ME_TB_MODULELOADED, OnMTBLoaded);
+ hTTBHook = HookEvent(ME_TTB_MODULELOADED, OnTTBLoaded);
+ hTabBBLoadHook = HookEvent(ME_MSG_TOOLBARLOADED, OnTabBBLoaded);
+
+ if (ServiceExists(MS_TB_ADDBUTTON))
+ OnMTBLoaded(0,0);
+ if (ServiceExists(MS_BB_ADDBUTTON))
+ OnTabBBLoaded(0,0);
+// ActionsCount = CallService(MS_ACT_GETLIST, (WPARAM)0, (LPARAM)&pActionsList);
+ ActionsCount = CallService(MS_ACT_GETLIST, (WPARAM)0, (LPARAM)&pActionStructLen);
+ if (ActionsCount > 0) {
+ int i;
+ DWORD dwActionStructLen = *pActionStructLen;
+ pActionsList = (PChain)(pActionStructLen + 1);
+ bActionsDefined = TRUE;
+// pActionsList2 = pActionsList;
+
+ //bMTBPresents = ServiceExists(MS_TB_ADDBUTTON) && bActionsDefined;
+ bTTBPresents = ServiceExists(MS_TTB_ADDBUTTON) && bActionsDefined;
+ bCoreHotkeyPresents = ServiceExists(MS_HOTKEY_REGISTER);
+ bVariablePresents = ServiceExists(MS_VARS_FORMATSTRING);
+ bTrayMenuPresents = ServiceExists(MS_CLIST_ADDTRAYMENUITEM);
+
+ hServiceWithLParam = CreateServiceFunction(SERVICE_WITH_LPARAM_NAME, &ServiceCallWithLParam);
+ for (i=0;i<ActionsCount;i++) {
+ AddActionItem(*pActionsList, i);
+ pActionsList = (PChain)((BYTE*)pActionsList + dwActionStructLen);
+ }
+// CallService(MS_ACT_FREELIST, (WPARAM)0, (LPARAM)pActionsList2);
+ CallService(MS_ACT_FREELIST, (WPARAM)0, (LPARAM)pActionStructLen);
+ }
+
+
+ if(ServiceExists(MS_UPDATE_REGISTER)) {
+ // register with updater
+ Update update = {0};
+ char szVersion[16];
+ update.cbSize = sizeof(Update);
+ update.szComponentName = pluginInfo.shortName;
+ update.pbVersion = (BYTE *)CreateVersionString(pluginInfo.version, szVersion);
+ update.cpbVersion = (int)strlen((char *)update.pbVersion);
+ update.szBetaUpdateURL = "http://vasilich.org/mim/Updater/UseActions/UseActions.zip";
+ update.szBetaChangelogURL = "http://vasilich.org/mim/Updater/UseActions/Changelog.txt";
+ update.szBetaVersionURL = "http://vasilich.org/mim/Updater/UseActions/Changelog.txt";
+ update.pbBetaVersionPrefix = (BYTE *)"UseActions Plugin, version ";
+ update.cpbBetaVersionPrefix = (int)strlen((char *)update.pbBetaVersionPrefix);
+ CallService(MS_UPDATE_REGISTER, 0, (LPARAM)&update);
+ }
+ CallService(MS_ACT_RUNBYNAME, (WPARAM)_T("#Autostart"), 0);
+ }
+ else {
+ UnhookEvent(hEventOptInit);
+ MessageBox(NULL,
+ TranslateT("No actions manager (ActMan) plugin found.\n\rYou can't use UseActions plugin without ActMan.\n\rUseActions will not be loaded."),
+ TranslateT("Error loading actions"),
+ MB_OK + MB_ICONERROR);
+ }
+ return 0;
+}
+
+void SetAllActionUsers(MyActionItem* ActionItem) {
+ // add icon for action to icolib
+ ActionItem->hIcolibIcon = AddIcolibIcon(ActionItem);
+ // core hotkeys
+ if (ActionItem->wFlags & UAF_REGHOTKEY) {
+ ActionItem->bReggedHotkey = AddCoreHotkey(ActionItem);
+ }
+ else {
+ DeleteCoreHotkey(ActionItem);
+ }
+ // CList_Modern toolbar buttons
+ if (ActionItem->wFlags & UAF_REGMTBB) {
+ ActionItem->hMTBButton = AddMTBButton(ActionItem);
+ }
+ else {
+ DeleteMTBButton(ActionItem);
+ }
+ // TopToolBar buttons
+ if (ActionItem->wFlags & UAF_REGTTBB) {
+ ActionItem->hTTBButton = AddTTBButton(ActionItem);
+ }
+ else {
+ DeleteTTBButton(ActionItem);
+ }
+ // MainMenu items
+ if (ActionItem->wFlags & UAF_REGMMENU) {
+ ActionItem->hMainMenuItem = AddMainMenuItem(ActionItem);
+ }
+ else {
+ DeleteMainMenuItem(ActionItem);
+ }
+ // ContactMenu items
+ if (ActionItem->wFlags & UAF_REGCMENU) {
+ ActionItem->hContactMenuItem = AddContactMenuItem(ActionItem);
+ }
+ else {
+ DeleteContactMenuItem(ActionItem);
+ }
+ // TrayMenu items
+ if (ActionItem->wFlags & UAF_REGTMENU) {
+ ActionItem->hTrayMenuItem = AddTrayMenuItem(ActionItem);
+ }
+ else {
+ DeleteTrayMenuItem(ActionItem);
+ }
+
+ if (!(ActionItem->wFlags & (UAF_REGMMENU | UAF_REGCMENU | UAF_REGTMENU)) && (ActionItem->hMenuService != NULL)) {
+ DestroyServiceFunction(ActionItem->hMenuService);
+ ActionItem->hMenuService = NULL;
+ }
+
+ // TabButtonBar buttons
+ if (ActionItem->wFlags & UAF_REGTABB) {
+ ActionItem->wReggedTabButton = AddTabBBButton(ActionItem);
+ }
+ else {
+ DeleteTabBBButton(ActionItem);
+ }
+
+ {// FirstRun
+ char szFirstRunName[32];
+ mir_snprintf(szFirstRunName, 32, "Act%u_FirstRun", ActionItem->dwActID);
+ if (DBGetContactSettingByte(0, MODULE, szFirstRunName, 0)) {
+ CallService(SERVICE_WITH_LPARAM_NAME, 0, ActionItem->dwActID);
+ DBDeleteContactSetting(0, MODULE, szFirstRunName);
+ }
+ }
+}
+
+INT_PTR ServiceCallWithLParam (WPARAM wParam, LPARAM lParam){
+ CallService(MS_ACT_RUNBYID, lParam, 0);
+ return 0;
+}
+
+INT_PTR ServiceCallWithFParam (WPARAM wParam, LPARAM lParam, LPARAM fParam){
+ CallService(MS_ACT_RUNBYID, fParam, wParam);
+ return 0;
+}
+
+int ActionsChanged(WPARAM wParam, LPARAM lParam) {
+ DWORD* pActionStructLen = {0};
+ PChain pActionsList = {0};
+ PChain pActionsList2 = {0};
+ DWORD dwActionStructLen;
+// int ActionsCount = CallService(MS_ACT_GETLIST, (WPARAM)0, (LPARAM)&pActionsList);
+ int ActionsCount = CallService(MS_ACT_GETLIST, (WPARAM)0, (LPARAM)&pActionStructLen);
+ if (ActionsCount > 0) {
+ int i;
+ dwActionStructLen = *pActionStructLen;
+ pActionsList = (PChain)(pActionStructLen + 1);
+ bActionsDefined = TRUE;
+ pActionsList2 = pActionsList;
+ //bMTBPresents = ServiceExists(MS_TB_ADDBUTTON) && bActionsDefined;
+ bTTBPresents = ServiceExists(MS_TTB_ADDBUTTON) && bActionsDefined;
+ bCoreHotkeyPresents = ServiceExists(MS_HOTKEY_REGISTER);
+ bVariablePresents = ServiceExists(MS_VARS_FORMATSTRING);
+ bTrayMenuPresents = ServiceExists(MS_CLIST_ADDTRAYMENUITEM);
+
+ if(hServiceWithLParam == NULL)
+ hServiceWithLParam = CreateServiceFunction(SERVICE_WITH_LPARAM_NAME, &ServiceCallWithLParam);
+ for (i=0;i<ActionsCount;i++) {
+ if(wParam & (ACTM_NEW | ACTM_RENAME | ACTM_SORT | ACTM_DELETE)) {
+ MyActionItem *pFoundListItem = NULL;
+ MyActionItem pTestingItem;
+ pTestingItem.dwActID = pActionsList->ID;
+ pTestingItem.wSortIndex = i;
+ pFoundListItem = li.List_Find(&ActionItemsList, &pTestingItem);
+ // if we have no item in list for this action - then add new one
+ if (pFoundListItem == NULL) {
+ AddActionItem(*pActionsList, i);
+ }
+ else {
+ if(wParam & ACTM_RENAME) {
+ if (pActionsList->Descr == NULL)
+ pActionsList->Descr = _T("");
+ SetActionDesc(pFoundListItem, *pActionsList);
+ }
+ if (wParam & (ACTM_SORT | ACTM_DELETE | ACTM_NEW)) {
+ pFoundListItem->wSortIndex = i;
+ }
+ }
+ }
+// pActionsList++;
+ pActionsList = (PChain)((BYTE*)pActionsList + dwActionStructLen);
+
+ }
+ }
+ if(wParam & ACTM_DELETE) {
+ int i,j;
+ for (j=ActionItemsList.realCount-1; j>=0;j--) {
+ BOOL bFound = FALSE;
+ PChain pActionsList3 = pActionsList2;
+ MyActionItem* ActItem = ActionItemsList.items[j];
+ for (i=0;i<ActionsCount;i++) {
+ if(pActionsList3->ID == ActItem->dwActID) {
+ bFound = TRUE;
+ break;
+ }
+ pActionsList3++;
+ }
+ if(!bFound) {
+ DeleteActionItem(ActionItemsList.items[j], j);
+ }
+ }
+ }
+ if (pActionStructLen != NULL)
+ CallService(MS_ACT_FREELIST, (WPARAM)0, (LPARAM)pActionStructLen);
+
+ ListView_DeleteAllItems(hListView);
+ ListView_DeleteColumn(hListView, 0);
+ ImageList_RemoveAll(hImageListView);
+ FillListViewWithActions();
+ return 0;
+}
+
+void SetActionDesc( MyActionItem* ActionItem, TChain NewAction ) {
+ WideCharToMultiByte(CallService(MS_LANGPACK_GETCODEPAGE,0,0), 0, NewAction.Descr, -1, ActionItem->szActDescr, MAX_ACT_DESC_LEN, NULL, NULL);
+#ifdef UNICODE
+ _tcsncpy(ActionItem->tszActDescr, NewAction.Descr, MAX_ACT_DESC_LEN);
+#else
+ strncpy(ActionItem->tszActDescr, ActionItem->szActDescr, MAX_ACT_DESC_LEN);
+#endif
+}
+int ReadSetting(MyActionItem* ActionItem){
+ DBVARIANT dbv, dbv2;
+ int result = 1;
+ char text[200], *szDest;
+ mir_snprintf(text, 32, "Act%u_", ActionItem->dwActID);
+ szDest = text + strlen(text);
+
+ strcpy(szDest, "Flags");
+ ActionItem->wFlags = DBGetContactSettingWord(NULL, MODULE, text,0);
+
+ strcpy(szDest, "MMenuPopup");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv)) {
+ _tcscpy(ActionItem->tszMMenuPopup, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ result++;
+ }
+ strcpy(szDest, "MMenuName");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv)) {
+ _tcscpy(ActionItem->tszMMenuNameVars, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ result++;
+ }
+ strcpy(szDest, "MMenuVarStr");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv2)) {
+ _tcscpy(ActionItem->tszMMenuShowWhenVars, dbv2.ptszVal);
+ DBFreeVariant(&dbv2);
+ result++;
+ }
+ strcpy(szDest, "CMenuName");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv)) {
+ _tcscpy(ActionItem->tszCMenuNameVars, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ result++;
+ }
+ strcpy(szDest, "CMenuPopup");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv)) {
+ _tcscpy(ActionItem->tszCMenuPopup, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ result++;
+ }
+ strcpy(szDest, "CMenuVarStr");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv2)) {
+ _tcscpy(ActionItem->tszCMenuShowWhenVars, dbv2.ptszVal);
+ DBFreeVariant(&dbv2);
+ result++;
+ }
+ strcpy(szDest, "TMenuPopup");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv)) {
+ _tcscpy(ActionItem->tszTMenuPopup, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ result++;
+ }
+ return result;
+}
+
+void WriteSetting(MyActionItem* ActionItem){
+ char text[200], *szDest;
+ mir_snprintf(text, 32, "Act%u_", ActionItem->dwActID);
+ szDest = text + strlen(text);
+
+ strcpy(szDest, "Flags");
+ if(ActionItem->wFlags == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingWord(NULL, MODULE, text, ActionItem->wFlags);
+ strcpy(szDest, "MMenuPopup");
+ if(ActionItem->tszMMenuPopup[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszMMenuPopup);
+ strcpy(szDest, "MMenuName");
+ if(ActionItem->tszMMenuNameVars[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszMMenuNameVars);
+ strcpy(szDest, "MMenuVarStr");
+ if(ActionItem->tszMMenuShowWhenVars[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszMMenuShowWhenVars);
+ strcpy(szDest, "CMenuName");
+ if(ActionItem->tszCMenuNameVars[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszCMenuNameVars);
+ strcpy(szDest, "CMenuPopup");
+ if(ActionItem->tszCMenuPopup[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszCMenuPopup);
+ strcpy(szDest, "CMenuVarStr");
+ if(ActionItem->tszCMenuShowWhenVars[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszCMenuShowWhenVars);
+ strcpy(szDest, "TMenuPopup");
+ if(ActionItem->tszTMenuPopup[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszTMenuPopup);
+}
+
+//================= Menu items =============================
+//----------------- MainMenu -------------------------------
+HANDLE AddMainMenuItem(MyActionItem* ActionItem){
+ if (!ActionItem->hMainMenuItem) {
+ //register MainMenu items
+ CLISTMENUITEM clmi = {0};
+ clmi.cbSize=sizeof(clmi);
+ clmi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB;
+ if (ActionItem->tszMMenuPopup[0] != 0) {
+ // first search if we have already created root popup with same name
+ int i;
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ // try to find root popup with same name (if we already created one)
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if ( (ActItem->tszMMenuPopup[0] != 0) &&
+ ( (!_tcscmp(ActItem->tszMMenuPopup, ActionItem->tszMMenuPopup) ) && (ActItem != ActionItem) ) ) {
+ clmi.ptszPopupName = (TCHAR*)ActItem->hMMenuRoot;
+ clmi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP;
+ //mi.position = -1999901010;
+ ActionItem->hMMenuRoot = ActItem->hMMenuRoot;
+ break;
+ }
+ }
+ if (clmi.ptszPopupName == NULL) {
+ //haven't found - then make one!
+ clmi.icolibItem = AddRootMenuIcon(ActionItem->tszMMenuPopup);
+ //then register root popup itself
+ clmi.ptszName = ActionItem->tszMMenuPopup;
+ clmi.flags |= CMIF_ROOTPOPUP;
+ clmi.pszPopupName = (char *)-1;
+ ActionItem->hMMenuRoot = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&clmi);
+ clmi.ptszPopupName = (TCHAR*)ActionItem->hMMenuRoot;
+ clmi.flags &= ~CMIF_ROOTPOPUP;
+ }
+ clmi.flags |= CMIF_CHILDPOPUP;
+ }
+ clmi.pszService = ActionItem->szNameID;
+ if (!ActionItem->hMenuService)
+ ActionItem->hMenuService = (HANDLE)CreateServiceFunctionParam(clmi.pszService, ServiceCallWithFParam, ActionItem->dwActID);
+ clmi.ptszName = ActionItem->tszActDescr;
+ //clmi.ptszPopupName = ActionItem->tszMMenuPopup[0] == 0 ? NULL : ActionItem->tszMMenuPopup;
+ clmi.icolibItem = ActionItem->hIcolibIcon;
+ if (ActionItem->wFlags & UAF_MMENUSEP) {
+ MMenuSeparator += 100000;
+ }
+ clmi.position = MMenuSeparator;
+ return (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&clmi);
+ }
+ else {
+ return ActionItem->hMainMenuItem;
+ }
+}
+
+void DeleteMainMenuItem(MyActionItem* ActionItem) {
+ if(ActionItem->hMainMenuItem) {
+ CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)ActionItem->hMainMenuItem, 0);
+ ActionItem->hMainMenuItem = NULL;
+ }
+}
+
+int PreBuildMainMenu(WPARAM wParam,LPARAM lParam){
+ int i;
+ TCHAR* tszVarResult;
+ TCHAR tszVarResultCopy[MAX_ACT_DESC_LEN];
+ // HANDLE hContact = (HANDLE) wParam;
+ // char* szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if(ActItem->hMainMenuItem) {
+ CLISTMENUITEM clmi = {0};
+ clmi.cbSize = sizeof(clmi);
+ clmi.flags = CMIM_FLAGS | CMIF_HIDDEN;
+ if ( bVariablePresents &&
+ (ActItem->wFlags & UAF_REGMMENU) &&
+ (ActItem->wFlags & UAF_MMENU_VARS) &&
+ (ActItem->tszMMenuShowWhenVars[0] != 0) ) {
+ tszVarResult = variables_parse(ActItem->tszMMenuShowWhenVars, (TCHAR *)NULL, (HANDLE) wParam);
+ if (_tcscmp(tszVarResult, _T("1")) == 0) {
+ //show menuitem
+ clmi.flags = CMIM_FLAGS;
+ }
+ variables_free(tszVarResult);
+ }
+ else if( (ActItem->wFlags & UAF_REGMMENU) && !(ActItem->wFlags & UAF_MMENU_VARS) ) {
+ //show menuitem
+ clmi.flags = CMIM_FLAGS;
+ }
+
+ // Name through Vars
+ if ( bVariablePresents &&
+ (ActItem->wFlags & UAF_REGMMENU) &&
+ (ActItem->tszMMenuNameVars[0] != 0) ) {
+ tszVarResult = variables_parse(ActItem->tszMMenuNameVars, (TCHAR *)NULL, (HANDLE) wParam);
+ if (tszVarResult[0] != 0) {
+ _tcsncpy(tszVarResultCopy, tszVarResult, MAX_ACT_DESC_LEN);
+ clmi.ptszName = tszVarResultCopy;
+ }
+ else
+ clmi.ptszName = ActItem->tszActDescr;
+ clmi.flags |= CMIM_NAME | CMIF_TCHAR;
+ variables_free(tszVarResult);
+ }
+ if (!_tcscmp(ActItem->tszMMenuNameVars, _T("-----"))) {
+ //clmi.flags |= CMIF_HIDDEN;
+ }
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) ActItem->hMainMenuItem, (LPARAM)&clmi);
+ }
+ }
+ return 0;
+}
+
+
+//----------------- ContactMenu ----------------------------
+HANDLE AddContactMenuItem(MyActionItem* ActionItem){
+ if(!ActionItem->hContactMenuItem) {
+ //register ContactMenu items
+ CLISTMENUITEM clmi = {0};
+ clmi.cbSize=sizeof(clmi);
+ clmi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB;
+
+ //note: this code works only with patched modules/clist/clistmenus.c lines 308-312
+ //mi.ptszPopupName = ActionItem->tszCMenuPopup;
+
+ if (ActionItem->tszCMenuPopup[0] != 0) {
+ // first search if we have already created root popup with same name
+ int i;
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ // try to find root popup with same name (if we already created one)
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if ( (ActItem->tszCMenuPopup[0] != 0) &&
+ ( (!_tcscmp(ActItem->tszCMenuPopup, ActionItem->tszCMenuPopup) ) && (ActItem != ActionItem) ) ) {
+ clmi.ptszPopupName = (TCHAR*)ActItem->hCMenuRoot;
+// mi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP;
+ //mi.position = -1999901010;
+ ActionItem->hCMenuRoot = ActItem->hCMenuRoot;
+ break;
+ }
+ }
+ if (clmi.ptszPopupName == NULL) {
+ //haven't found - then make one!
+ clmi.icolibItem = AddRootMenuIcon(ActionItem->tszCMenuPopup);
+ //then register root popup itself
+ clmi.ptszName = ActionItem->tszCMenuPopup;
+ clmi.flags |= CMIF_ROOTPOPUP;
+ clmi.pszPopupName = (char *)-1;
+ ActionItem->hCMenuRoot = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&clmi);
+ clmi.ptszPopupName = (TCHAR*)ActionItem->hCMenuRoot;
+ clmi.flags &= ~CMIF_ROOTPOPUP;
+ //mi.position = -1999901010;
+ }
+ clmi.flags |= CMIF_CHILDPOPUP;
+ }
+ clmi.pszService = ActionItem->szNameID;
+ if (!ActionItem->hMenuService)
+ ActionItem->hMenuService = (HANDLE)CreateServiceFunctionParam(clmi.pszService, ServiceCallWithFParam, ActionItem->dwActID);
+ clmi.ptszName = ActionItem->tszActDescr;
+ clmi.icolibItem = ActionItem->hIcolibIcon;
+ /*if (!_tcscmp(ActionItem->tszCMenuName, _T("-----"))) {
+ //mi.position += 100000;
+ }*/
+ if (ActionItem->wFlags & UAF_CMENUSEP) {
+ CMenuSeparator += 100000;
+ }
+ clmi.position = CMenuSeparator;
+
+ return (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&clmi);
+ }
+ else
+ return ActionItem->hContactMenuItem;
+}
+
+void DeleteContactMenuItem(MyActionItem* ActionItem) {
+ if(ActionItem->hContactMenuItem) {
+ CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)ActionItem->hContactMenuItem, 0);
+ ActionItem->hContactMenuItem = NULL;
+ }
+}
+
+int PreBuildContactMenu(WPARAM wParam,LPARAM lParam){
+ int i;
+ TCHAR* tszVarResult;
+ TCHAR tszVarResultCopy[MAX_ACT_DESC_LEN];
+ // HANDLE hContact = (HANDLE) wParam;
+ // char* szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if(ActItem->hContactMenuItem) {
+ CLISTMENUITEM clmi = {0};
+ clmi.cbSize = sizeof(clmi);
+ clmi.flags = CMIM_FLAGS | CMIF_HIDDEN;
+ if ( bVariablePresents &&
+ (ActItem->wFlags & UAF_REGCMENU) &&
+ (ActItem->wFlags & UAF_CMENU_VARS) &&
+ (ActItem->tszCMenuShowWhenVars[0] != 0) ) {
+ tszVarResult = variables_parse(ActItem->tszCMenuShowWhenVars, (TCHAR *)NULL, (HANDLE) wParam);
+ if (_tcscmp(tszVarResult, _T("1")) == 0) {
+ //show menuitem
+ clmi.flags = CMIM_FLAGS;
+ }
+ variables_free(tszVarResult);
+ }
+ else if( (ActItem->wFlags & UAF_REGCMENU) && !(ActItem->wFlags & UAF_CMENU_VARS) ) {
+ //show menuitem
+ clmi.flags = CMIM_FLAGS;
+ }
+ // Name through Vars
+ if ( bVariablePresents &&
+ (ActItem->wFlags & UAF_REGCMENU) &&
+ (ActItem->tszCMenuNameVars[0] != 0) ) {
+ tszVarResult = variables_parse(ActItem->tszCMenuNameVars, (TCHAR *)NULL, (HANDLE) wParam);
+ if (tszVarResult[0] != 0) {
+ _tcsncpy(tszVarResultCopy, tszVarResult, MAX_ACT_DESC_LEN);
+ clmi.ptszName = tszVarResultCopy;
+ }
+ else
+ clmi.ptszName = ActItem->tszActDescr;
+ clmi.flags |= CMIM_NAME | CMIF_TCHAR;
+ variables_free(tszVarResult);
+ }
+ if (!_tcscmp(ActItem->tszCMenuNameVars, _T("-----"))) {
+ //clmi.flags |= CMIF_HIDDEN;
+ }
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) ActItem->hContactMenuItem, (LPARAM)&clmi);
+ }
+ }
+ return 0;
+}
+
+//----------------- TrayMenu -------------------------------
+HANDLE AddTrayMenuItem(MyActionItem* ActionItem){
+ if(bTrayMenuPresents) {
+ if (!ActionItem->hTrayMenuItem) {
+ CLISTMENUITEM clmi = {0};
+ clmi.cbSize=sizeof(clmi);
+ clmi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB;
+ //register TrayMenu items
+ if (ActionItem->tszTMenuPopup[0] != 0) {
+ // first search if we have already created root popup with same name
+ int i;
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ // try to find root popup with same name (if we already created one)
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if ( (ActItem->tszTMenuPopup[0] != 0) &&
+ ( (!_tcscmp(ActItem->tszTMenuPopup, ActionItem->tszTMenuPopup) ) && (ActItem != ActionItem) ) ) {
+ clmi.ptszPopupName = (TCHAR*)ActItem->hTMenuRoot;
+ //mi.position = -1999901010;
+ ActionItem->hTMenuRoot = ActItem->hTMenuRoot;
+ break;
+ }
+ }
+ if (clmi.ptszPopupName == NULL) {
+ //haven't found - then make one!
+ clmi.icolibItem = AddRootMenuIcon(ActionItem->tszTMenuPopup);
+ //then register root popup itself
+ clmi.ptszName = ActionItem->tszTMenuPopup;
+ clmi.flags |= CMIF_ROOTPOPUP;
+ clmi.pszPopupName = (char *)-1;
+ ActionItem->hTMenuRoot = (HANDLE)CallService(MS_CLIST_ADDTRAYMENUITEM,0,(LPARAM)&clmi);
+ clmi.ptszPopupName = (TCHAR*)ActionItem->hTMenuRoot;
+ clmi.flags &= ~CMIF_ROOTPOPUP;
+ //mi.position = -1999901010;
+ }
+ clmi.flags |= CMIF_CHILDPOPUP;
+ }
+ clmi.pszService = ActionItem->szNameID;
+ if (!ActionItem->hMenuService)
+ ActionItem->hMenuService = (HANDLE)CreateServiceFunctionParam(clmi.pszService, ServiceCallWithFParam, ActionItem->dwActID);
+ clmi.ptszName = ActionItem->tszActDescr;
+ clmi.icolibItem = ActionItem->hIcolibIcon;
+ //if (!_tcscmp(ActionItem->tszCMenuName, _T("-----"))) {
+ //mi.position += 100000;
+ return (HANDLE)CallService(MS_CLIST_ADDTRAYMENUITEM,0,(LPARAM)&clmi);
+ }
+ else {
+ //show menuitem
+ //clmi.flags = CMIM_FLAGS;
+ //CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) ActionItem->hTrayMenuItem, (LPARAM)&clmi);
+ return ActionItem->hTrayMenuItem;
+ }
+ }
+ return NULL;
+}
+
+void DeleteTrayMenuItem(MyActionItem* ActionItem) {
+ if(ActionItem->hTrayMenuItem) {
+ CallService(MS_CLIST_REMOVETRAYMENUITEM, (WPARAM)ActionItem->hTrayMenuItem, 0);
+ ActionItem->hTrayMenuItem = NULL;
+ }
+}
+
+HANDLE AddRootMenuIcon(TCHAR* tszPopupName){
+ //first - register icon for root popup
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(sid);
+ sid.ptszSection = _T(ICOLIB_MNUSECTION);
+ sid.flags = SIDF_ALL_TCHAR;
+ sid.cx= sid.cy = 16;
+ sid.ptszDescription = tszPopupName;
+ sid.pszName = mir_t2a(tszPopupName);
+ sid.ptszDefaultFile = tszMyPath;
+ sid.iDefaultIndex = -IDI_ACTION;
+ return (HANDLE)CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+}
+
+//============== Toolbar Buttons ===========================
+//-------------- CList_Modern Toolbar ----------------------
+HANDLE AddMTBButton(MyActionItem* ActionItem){
+ //register CList_Modern toolbar buttons
+ if (bMTBPresents) {
+ if(!ActionItem->hMTBButton) {
+ TBButton mtButton = {0};
+ mtButton.cbSize = sizeof(mtButton);
+ mtButton.defPos = 1000;
+ mtButton.tbbFlags = TBBF_SHOWTOOLTIP|TBBF_VISIBLE;
+ mtButton.pszButtonID = ActionItem->szNameID;
+ mtButton.pszServiceName = SERVICE_WITH_LPARAM_NAME;
+ mtButton.lParam = ActionItem->dwActID;
+ mtButton.pszButtonName = mtButton.pszTooltipUp = mtButton.pszTooltipUp = ActionItem->szActDescr;
+ mtButton.hSecondaryIconHandle = mtButton.hPrimaryIconHandle = ActionItem->hIcolibIcon;
+ return (HANDLE)CallService(MS_TB_ADDBUTTON, 0, (LPARAM)&mtButton);
+ }
+ else {
+ return ActionItem->hMTBButton;
+ }
+ }
+ else
+ return NULL;
+}
+
+void DeleteMTBButton(MyActionItem* ActionItem){
+ //register CList_Modern toolbar buttons
+ if (bMTBPresents && ActionItem->hMTBButton) {
+ CallService(MS_TB_REMOVEBUTTON, (WPARAM)ActionItem->hMTBButton, 0);
+ ActionItem->hMTBButton = NULL;
+ // ask FYR to fix his CList_Modern - right now (22.03.2008) it does nothing when calling service for remove toolbar button!
+ }
+}
+
+int OnMTBLoaded(WPARAM wParam, LPARAM lParam){
+ int i;
+ bMTBPresents = TRUE;//bActionsDefined;
+// for (i=0; i<ActionItemsList.realCount;i++) {
+ for (i=ActionItemsList.realCount-1;i>=0;i--) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if (ActItem->wFlags & UAF_REGMTBB)
+ ActItem->hMTBButton = AddMTBButton(ActItem);
+ }
+ return 0;
+}
+
+//----------------- TopToolbar -----------------------------
+HANDLE AddTTBButton(MyActionItem* ActionItem){
+ if (bTTBPresents) {
+ if(!ActionItem->hTTBButton) {
+ // register TopToolBar button
+ TTBButtonV2 ttbb = {0};
+ HANDLE hTTBButt;
+ ttbb.cbSize = sizeof(ttbb);
+ ttbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
+ ttbb.pszServiceDown = ttbb.pszServiceUp = SERVICE_WITH_LPARAM_NAME;
+ ttbb.lParamDown = ttbb.lParamUp = ActionItem->dwActID;
+ ttbb.name = Translate(ActionItem->szActDescr);
+ ttbb.hIconDn = ttbb.hIconUp = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE,0, (LPARAM)ActionItem->hIcolibIcon);
+ ttbb.tooltipDn = ttbb.tooltipUp = Translate(ActionItem->szActDescr);
+ hTTBButt = (HANDLE)CallService(MS_TTB_ADDBUTTON, (WPARAM)&ttbb, 0);
+ if (hTTBButt)
+ CallService(MS_TTB_SETBUTTONOPTIONS, MAKEWPARAM(TTBO_TIPNAME, hTTBButt), (LPARAM)(Translate(ActionItem->szActDescr)));
+ return hTTBButt;
+ }
+ else
+ return ActionItem->hTTBButton;
+ }
+ else
+ return NULL;
+}
+
+void DeleteTTBButton(MyActionItem* ActionItem){
+ if(bTTBPresents && ActionItem->hTTBButton) {
+ // delete TopToolBar button
+ CallService(MS_TTB_REMOVEBUTTON, (WPARAM)ActionItem->hTTBButton, 0);
+ ActionItem->hTTBButton = NULL;
+ }
+}
+
+int OnTTBLoaded(WPARAM wParam, LPARAM lParam){
+ int i;
+ bTTBPresents = TRUE;//bActionsDefined;
+// for (i=0; i<ActionItemsList.realCount;i++) {
+ for (i=ActionItemsList.realCount-1;i>=0;i--) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if (ActItem->wFlags & UAF_REGTTBB)
+ ActItem->hTTBButton = AddTTBButton(ActItem);
+ }
+ return 0;
+}
+
+//----------------- TabSRMM ButtonBar ----------------------
+BOOL AddTabBBButton(MyActionItem* ActionItem){
+ if (bTabBBPresents) {
+ if(!(ActionItem->wReggedTabButton & 0x8000) ) {
+ // register Tab ButtonBar button
+ BBButton tabb = {0};
+ tabb.cbSize = sizeof(tabb);
+ tabb.dwButtonID = ActionItem->dwActID;
+ tabb.pszModuleName = MODULE;
+ tabb.ptszTooltip = TranslateTS(ActionItem->tszActDescr);
+ tabb.dwDefPos = (TABTOOLBAR_INITPOS + ActionItem->wSortIndex*10) & 0x7FFF;
+ tabb.iButtonWidth = 0;
+ tabb.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISCHATBUTTON;
+ tabb.hIcon = ActionItem->hIcolibIcon;
+
+ CallService(MS_BB_ADDBUTTON, 0, (LPARAM)&tabb);
+ return tabb.dwDefPos | 0x8000;
+ }
+ else
+ return ActionItem->wReggedTabButton;
+ }
+ else
+ return FALSE;
+}
+
+void DeleteTabBBButton(MyActionItem* ActionItem){
+ if(bTabBBPresents && (ActionItem->wReggedTabButton & 0x8000)) {
+ // delete Tab ButtonBar button
+ BBButton tabb = {0};
+ tabb.dwButtonID = ActionItem->dwActID;
+ tabb.pszModuleName = MODULE;
+ CallService(MS_BB_REMOVEBUTTON, 0, (LPARAM)&tabb);
+ ActionItem->wReggedTabButton = ActionItem->wReggedTabButton & 0x7FFF;
+ }
+}
+
+int OnTabBBLoaded(WPARAM wParam, LPARAM lParam){
+ int i;
+ bTabBBPresents = TRUE;//bActionsDefined;
+// for (i=0; i<ActionItemsList.realCount;i++) {
+ for (i=ActionItemsList.realCount-1;i>=0;i--) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if (ActItem->wFlags & UAF_REGTABB)
+ ActItem->wReggedTabButton = AddTabBBButton(ActItem);
+ }
+ hTabBBPressHook = HookEvent(ME_MSG_BUTTONPRESSED, OnTabButtonPressed);
+ return 0;
+}
+
+int OnTabButtonPressed(WPARAM wParam,LPARAM lParam) {
+ CustomButtonClickData *cbcd=(CustomButtonClickData *)lParam;
+ if(strcmp(cbcd->pszModule, MODULE)) return 0;
+ ServiceCallWithFParam((WPARAM)cbcd->hContact, 0, cbcd->dwButtonId);
+ return 1;
+}
+
+
+//=============== Other ====================================
+HANDLE AddIcolibIcon (MyActionItem* ActionItem){
+ if(!ActionItem->hIcolibIcon) {
+ // add icon for action to icolib
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(sid);
+ sid.ptszSection = _T(ICOLIB_ACTSECTION);
+ sid.flags = SIDF_ALL_TCHAR;
+ sid.cx= sid.cy = 16;
+ sid.ptszDescription = ActionItem->tszActDescr;
+ sid.pszName = ActionItem->szNameID;
+ sid.ptszDefaultFile = tszMyPath;
+ sid.iDefaultIndex = -IDI_ACTION;
+ return (HANDLE)CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ }
+ else
+ return ActionItem->hIcolibIcon;
+}
+void DeleteIcolibIcon(MyActionItem* ActionItem) {
+ //will work only in MIM0.8.0.13+ (Rev7555+) - otherwise it will crash !
+ DWORD dwMirVer = CallService(MS_SYSTEM_GETVERSION, 0, 0);
+ if (dwMirVer >= 0x0008000D)
+ CallService(MS_SKIN2_REMOVEICON, 0, (LPARAM)ActionItem->szNameID);
+}
+
+int AddCoreHotkey(MyActionItem* ActionItem){
+//register core hotkeys
+if (bCoreHotkeyPresents) {
+ if (!ActionItem->bReggedHotkey) {
+ HOTKEYDESC hkd = {0};
+ hkd.cbSize = sizeof(hkd);
+ hkd.pszName = ActionItem->szNameID;
+ hkd.pszDescription = ActionItem->szActDescr;
+ hkd.pszService = SERVICE_WITH_LPARAM_NAME;
+ hkd.pszSection = MODULE;
+ hkd.lParam = ActionItem->dwActID;
+ return (CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd) != 0) ? TRUE : FALSE;
+ }
+ return TRUE;
+}
+else
+ return FALSE;
+}
+
+void DeleteCoreHotkey(MyActionItem* ActionItem){
+ //delete core hotkeys
+ //will work only from 0.8.0.15+ (Rev.7786+)
+ // and bug with crash when hotkey synonims were used is fixed in 0.8.0.27 (Rev.8831)
+ if (bCoreHotkeyPresents && ServiceExists(MS_HOTKEY_UNREGISTER) && ActionItem->bReggedHotkey) {
+ CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)ActionItem->szNameID);
+ ActionItem->bReggedHotkey = FALSE;
+ }
+}
+
+//================== GUI ===================================
+int OptInit(WPARAM wParam, LPARAM lParam) {
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ // odp.position = -790000000;
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.ptszTitle = _T("Actions");
+ odp.ptszGroup = _T("Services");
+ odp.ptszTab = _T(MODULE);
+ odp.nIDBottomSimpleControl = 0;
+ odp.pfnDlgProc = DlgProcOpts;
+ CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+
+ return 0;
+}
+
+INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+ LOGFONT lf;
+ HFONT hf;
+ switch ( msg ) {
+ case WM_INITDIALOG: {
+ hDialogWIndow = hwndDlg;
+ hListView = GetDlgItem(hwndDlg, IDC_ACTIONSLIST);
+ hImageListView = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),(IsWinVerXPPlus()?ILC_COLOR32:ILC_COLOR16)|ILC_MASK,3,3);
+ FillListViewWithActions();
+
+ // variables help button
+ if (bVariablePresents) {
+ HICON hIcon=(HICON)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPICON);
+ char *szTipInfo = (char *)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPTIPTEXT);
+ if (hIcon != NULL) {
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTMMNVARSHELP), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTMMSVARSHELP), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMNVARSHELP), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMSVARSHELP), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
+ }
+ else {
+ SetDlgItemText(hwndDlg, IDC_BTMMNVARSHELP, _T("V"));
+ SetDlgItemText(hwndDlg, IDC_BTMMSVARSHELP, _T("V"));
+ SetDlgItemText(hwndDlg, IDC_BTCMNVARSHELP, _T("V"));
+ SetDlgItemText(hwndDlg, IDC_BTCMSVARSHELP, _T("V"));
+ }
+ if (szTipInfo == NULL) {
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTMMNVARSHELP), BUTTONADDTOOLTIP, (WPARAM)Translate("Open string formatting help for MainMenuitem name"), 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTMMSVARSHELP), BUTTONADDTOOLTIP, (WPARAM)Translate("Open string formatting help for MainMenuitem showing"), 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMNVARSHELP), BUTTONADDTOOLTIP, (WPARAM)Translate("Open string formatting help for ContactMenuitem name"), 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMSVARSHELP), BUTTONADDTOOLTIP, (WPARAM)Translate("Open string formatting help for ContactMenuitem showing"), 0);
+ }
+ else {
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTMMNVARSHELP), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTMMSVARSHELP), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMNVARSHELP), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMSVARSHELP), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
+ }
+ SendDlgItemMessage(hwndDlg, IDC_BTMMNVARSHELP, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BTMMSVARSHELP, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BTCMNVARSHELP, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BTCMSVARSHELP, BUTTONSETASFLATBTN, 0, 0);
+ }
+
+ GetObject((HFONT)SendMessage(GetDlgItem(hwndDlg, IDC_STTOOLBAR), WM_GETFONT, 0, 0), sizeof(lf), &lf);
+ lf.lfWeight = FW_BOLD;
+ hf = CreateFontIndirect(&lf);
+ SendMessage(GetDlgItem(hwndDlg, IDC_STTOOLBAR), WM_SETFONT, (WPARAM)hf, TRUE);
+ SendMessage(GetDlgItem(hwndDlg, IDC_STMMI), WM_SETFONT, (WPARAM)hf, TRUE);
+ SendMessage(GetDlgItem(hwndDlg, IDC_STCMI), WM_SETFONT, (WPARAM)hf, TRUE);
+ SendMessage(GetDlgItem(hwndDlg, IDC_STTMI), WM_SETFONT, (WPARAM)hf, TRUE);
+ SendMessage(GetDlgItem(hwndDlg, IDC_STOTHER), WM_SETFONT, (WPARAM)hf, TRUE);
+ //DeleteObject(hf);
+
+ TranslateDialogDefault( hwndDlg );
+ return FALSE;
+ }
+ case WM_COMMAND: {
+ MyActionItem* ActItem = ActionItemsList.items[OptActiveItem];
+ switch (LOWORD(wParam)) {
+ case IDC_CHBHOTKEY:
+ ActItem->wFlags ^= UAF_REGHOTKEY;
+ break;
+ case IDC_CHBMTBB:
+ ActItem->wFlags ^= UAF_REGMTBB;
+ break;
+ case IDC_CHBTABBB:
+ ActItem->wFlags ^= UAF_REGTABB;
+ break;
+ case IDC_CHBMMENUITEM:
+ ActItem->wFlags ^= UAF_REGMMENU;
+ break;
+ case IDC_CHBMMENUSEP:
+ ActItem->wFlags ^= UAF_MMENUSEP;
+ break;
+ case IDC_CHBCMENUSEP:
+ ActItem->wFlags ^= UAF_CMENUSEP;
+ break;
+ case IDC_EDMMENUPN:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDMMENUPN, ActItem->tszMMenuPopup, MAX_ACT_DESC_LEN);
+ break;
+ case IDC_EDMMENUN:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDMMENUN, ActItem->tszMMenuNameVars, MAX_VARSCRIPT_LEN);
+ break;
+ case IDC_EDCMENUN:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDCMENUN, ActItem->tszCMenuNameVars, MAX_VARSCRIPT_LEN);
+ break;
+ case IDC_CHBCMENUITEM:
+ ActItem->wFlags ^= UAF_REGCMENU;
+ break;
+ case IDC_EDCMENUPN:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDCMENUPN, ActItem->tszCMenuPopup, MAX_ACT_DESC_LEN);
+ break;
+ case IDC_CHBMMVARS:
+ ActItem->wFlags ^= UAF_MMENU_VARS;
+ break;
+ case IDC_CHBCMVARS:
+ ActItem->wFlags ^= UAF_CMENU_VARS;
+ break;
+ case IDC_EDMMENUVARSTR:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDMMENUVARSTR, ActItem->tszMMenuShowWhenVars, MAX_VARSCRIPT_LEN);
+ break;
+ case IDC_EDCMENUVARSTR:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDCMENUVARSTR, ActItem->tszCMenuShowWhenVars, MAX_VARSCRIPT_LEN);
+ break;
+ case IDC_CHBTMENUITEM:
+ ActItem->wFlags ^= UAF_REGTMENU;
+ break;
+ case IDC_EDTMENUPN:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDTMENUPN, ActItem->tszTMenuPopup, MAX_ACT_DESC_LEN);
+ break;
+ case IDC_CHBTTBB:
+ ActItem->wFlags ^= UAF_REGTTBB;
+ break;
+ case IDC_BTMMNVARSHELP:
+ variables_showhelp(hwndDlg, IDC_EDMMENUN, VHF_FULLDLG|VHF_SETLASTSUBJECT, NULL, NULL);
+ break;
+ case IDC_BTMMSVARSHELP:
+ variables_showhelp(hwndDlg, IDC_EDMMENUVARSTR, VHF_FULLDLG|VHF_SETLASTSUBJECT, NULL, NULL);
+ break;
+ case IDC_BTCMNVARSHELP:
+ variables_showhelp(hwndDlg, IDC_EDCMENUN, VHF_FULLDLG|VHF_SETLASTSUBJECT, NULL, NULL);
+ break;
+ case IDC_BTCMSVARSHELP:
+ variables_showhelp(hwndDlg, IDC_EDCMENUVARSTR, VHF_FULLDLG|VHF_SETLASTSUBJECT, NULL, NULL);
+ break;
+ }
+ // enable the 'apply' button
+ if(!bRefreshing)
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ }
+ case WM_NOTIFY:
+ if(ActionItemsList.realCount == 0) break;
+ else {
+ //MyActionItem* ActItem = ActionItemsList.items[OptActiveItem];
+ if ((LPNMHDR)lParam == NULL) return TRUE;
+ switch(((LPNMHDR)lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_APPLY: {
+ int i;
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ WriteSetting(ActionItemsList.items[i]);
+ SetAllActionUsers(ActionItemsList.items[i]);
+ }
+ break;
+ }
+ }
+ break;
+ }
+ switch (LOWORD(wParam)) {
+ case IDC_ACTIONSLIST: {
+ switch (((LPNMHDR)lParam)->code) {
+ case LVN_ITEMCHANGED:{
+ NMITEMACTIVATE* LVItemAct = (LPNMITEMACTIVATE)lParam;
+ if ((LVItemAct->iItem >= 0) && (LVItemAct->uChanged == LVIF_STATE)) {
+ if (LVItemAct->uNewState == (LVIS_SELECTED | LVIS_FOCUSED)) {
+ MyActionItem* ActItem = ActionItemsList.items[LVItemAct->lParam/*iItem*/];
+ OptActiveItem = LVItemAct->lParam;//iItem;
+ bRefreshing = TRUE;
+ CheckDlgButton(hwndDlg, IDC_CHBHOTKEY, (ActItem->wFlags & UAF_REGHOTKEY) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHBMTBB, (ActItem->wFlags & UAF_REGMTBB) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_CHBMMENUITEM, (ActItem->wFlags & UAF_REGMMENU) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHBMMENUSEP, (ActItem->wFlags & UAF_MMENUSEP) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHBCMENUSEP, (ActItem->wFlags & UAF_CMENUSEP) ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemText(hwndDlg, IDC_EDMMENUPN, ActItem->tszMMenuPopup);
+ SetDlgItemText(hwndDlg, IDC_EDMMENUN, ActItem->tszMMenuNameVars);
+
+ CheckDlgButton(hwndDlg, IDC_CHBCMENUITEM, (ActItem->wFlags & UAF_REGCMENU) ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemText(hwndDlg, IDC_EDCMENUN, ActItem->tszCMenuNameVars);
+ SetDlgItemText(hwndDlg, IDC_EDCMENUPN, ActItem->tszCMenuPopup);
+ CheckDlgButton(hwndDlg, IDC_CHBMMVARS, (ActItem->wFlags & UAF_MMENU_VARS) ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemText(hwndDlg, IDC_EDMMENUVARSTR, ActItem->tszMMenuShowWhenVars);
+ CheckDlgButton(hwndDlg, IDC_CHBCMVARS, (ActItem->wFlags & UAF_CMENU_VARS) ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemText(hwndDlg, IDC_EDCMENUVARSTR, ActItem->tszCMenuShowWhenVars);
+
+ CheckDlgButton(hwndDlg, IDC_CHBTMENUITEM, (ActItem->wFlags & UAF_REGTMENU) ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemText(hwndDlg, IDC_EDTMENUPN, ActItem->tszTMenuPopup);
+
+ CheckDlgButton(hwndDlg, IDC_CHBTTBB, (ActItem->wFlags & UAF_REGTTBB) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHBTABBB, (ActItem->wFlags & UAF_REGTABB) ? BST_CHECKED : BST_UNCHECKED);
+ bRefreshing = FALSE;
+ }
+ }
+ return TRUE;
+ } //LVN_ITEMCHANGED
+ } //switch (((LPNMHDR)lParam)->code)
+ } //IDC_ACTIONSLIST
+ } //switch (LOWORD(wParam))
+ break;
+ } // case WM_NOTIFY
+ default:
+ break;
+ } //switch ( msg )
+ return 0;
+}
+
+void FillListViewWithActions() {
+ LVCOLUMN lvc = { 0 };
+ RECT aRect = { 0 };
+ int iCurrentSortIndex = 0;
+ int iCurrentArrayIndex = 0;
+ int i, j;
+ MyActionItem* ActItemTmp;
+
+ ListView_SetImageList(hListView, hImageListView, LVSIL_SMALL);
+ lvc.mask = LVCF_TEXT;
+ ListView_SetExtendedListViewStyleEx(hListView, LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP, LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP);
+ lvc.pszText = TranslateT("Actions");
+ ListView_InsertColumn(hListView, 0, &lvc);
+
+ iCurrentSortIndex = -1;
+ iCurrentArrayIndex = 0;
+
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ LVITEM lvi = { 0 };
+
+ for (j=0; j<ActionItemsList.realCount;j++) {
+ MyActionItem* ActItemTmp2 = ActionItemsList.items[j];
+ if (ActItemTmp2->wSortIndex == iCurrentSortIndex + 1) {
+ iCurrentArrayIndex = j;
+ iCurrentSortIndex = ActItemTmp2->wSortIndex;
+ break;
+ }
+ }
+ ActItemTmp = ActionItemsList.items[iCurrentArrayIndex];
+
+ lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
+ lvi.iImage = lvi.iItem = i;
+ lvi.iSubItem = 0;
+ lvi.lParam = iCurrentArrayIndex;
+ lvi.pszText = ActItemTmp->tszActDescr;
+ lvi.iItem = ListView_InsertItem(hListView, &lvi);
+ ImageList_AddIcon(hImageListView, (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)ActItemTmp->hIcolibIcon));
+ if (i == 0)
+ OptActiveItem = iCurrentArrayIndex;
+ }
+ if (ActionItemsList.realCount > 0) {
+ ListView_SetItemState(hListView, 0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
+ //OptActiveItem = 0;
+ }
+ else {
+ //EnableWindow(GetDlgItem(hwndDlg, IDC_GB), FALSE);
+ }
+ GetClientRect(hListView, &aRect);
+ ListView_SetColumnWidth(hListView, 0, aRect.right - aRect.left);
+
+ ShowWindow(GetDlgItem(hDialogWIndow, IDC_BTMMNVARSHELP), ((ActionItemsList.realCount>0) && bVariablePresents)? SW_SHOW : SW_HIDE);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_BTCMNVARSHELP), (ActionItemsList.realCount>0) && bVariablePresents);
+ ShowWindow(GetDlgItem(hDialogWIndow, IDC_BTMMSVARSHELP), (ActionItemsList.realCount>0) && bVariablePresents);
+ ShowWindow(GetDlgItem(hDialogWIndow, IDC_BTCMSVARSHELP), (ActionItemsList.realCount>0) && bVariablePresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDMMENUN), (ActionItemsList.realCount>0) && bVariablePresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDCMENUN), (ActionItemsList.realCount>0) && bVariablePresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDMMENUVARSTR), (ActionItemsList.realCount>0) && bVariablePresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDCMENUVARSTR), (ActionItemsList.realCount>0) && bVariablePresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBMMVARS), (ActionItemsList.realCount>0) && bVariablePresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBCMVARS), (ActionItemsList.realCount>0) && bVariablePresents);
+
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBTTBB), (ActionItemsList.realCount>0) && bTTBPresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBMTBB), (ActionItemsList.realCount>0) && bMTBPresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBTABBB),(ActionItemsList.realCount>0) && bTabBBPresents);
+
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBMMENUITEM), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBMMENUSEP), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBCMENUITEM), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBCMENUSEP), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBTMENUITEM), (ActionItemsList.realCount>0) && bTrayMenuPresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDMMENUPN), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDCMENUPN), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDTMENUPN), (ActionItemsList.realCount>0) && bTrayMenuPresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBHOTKEY), (ActionItemsList.realCount>0) && bCoreHotkeyPresents);
+}
diff --git a/UseActions/UseActions.h b/UseActions/UseActions.h new file mode 100644 index 0000000..f67f184 --- /dev/null +++ b/UseActions/UseActions.h @@ -0,0 +1,55 @@ +#define MODULE "UseActions"
+#define ICOLIB_ACTSECTION "Actions/Registered actions"
+#define ICOLIB_MNUSECTION "Actions/Menu icons"
+#define SERVICE_WITH_LPARAM_NAME MODULE"/CallAction"
+
+#define MAX_ACT_DESC_LEN 512
+#define MAX_VARSCRIPT_LEN 1024
+
+typedef struct tagMyActionItem{
+ DWORD dwActID;
+ WORD wSortIndex;
+ char szNameID[32];
+ TCHAR tszActDescr[MAX_ACT_DESC_LEN];
+ char szActDescr[MAX_ACT_DESC_LEN];
+ HANDLE hIcolibIcon;
+ BOOL bReggedHotkey;
+ HANDLE hMTBButton;
+ HANDLE hMenuService;
+ HANDLE hMainMenuItem;
+ TCHAR tszMMenuPopup[MAX_ACT_DESC_LEN];
+ TCHAR tszMMenuNameVars[MAX_VARSCRIPT_LEN];
+ HANDLE hMMenuRoot;
+ TCHAR tszMMenuShowWhenVars[MAX_VARSCRIPT_LEN];
+ HANDLE hContactMenuItem;
+ TCHAR tszCMenuNameVars[MAX_VARSCRIPT_LEN];
+ TCHAR tszCMenuPopup[MAX_ACT_DESC_LEN];
+ HANDLE hCMenuRoot;
+ TCHAR tszCMenuShowWhenVars[MAX_VARSCRIPT_LEN];
+ HANDLE hTrayMenuItem;
+ TCHAR tszTMenuPopup[MAX_ACT_DESC_LEN];
+ HANDLE hTMenuRoot;
+ HANDLE hTTBButton;
+ WORD wReggedTabButton;
+ WORD wFlags;
+ } MyActionItem;
+
+#define UAF_NONE 0
+#define UAF_REGHOTKEY (1<<0)
+#define UAF_REGMTBB (1<<1)
+#define UAF_REGMMENU (1<<2)
+#define UAF_REGCMENU (1<<3)
+#define UAF_REGTTBB (1<<4)
+#define UAF_REGTABB (1<<5)
+// #define UAF_CMENU_CNTCT (1<<6)
+// #define UAF_CMENU_CHAT (1<<7)
+
+#define UAF_MMENU_VARS (1<<7)
+
+#define UAF_CMENU_VARS (1<<8)
+
+#define UAF_REGTMENU (1<<9)
+#define UAF_MMENUSEP (1<<10)
+#define UAF_CMENUSEP (1<<11)
+
+//#define UAF_MMENU_VARS (1<<12)
diff --git a/UseActions/UseActions_10.sln b/UseActions/UseActions_10.sln new file mode 100644 index 0000000..7afe3b2 --- /dev/null +++ b/UseActions/UseActions_10.sln @@ -0,0 +1,26 @@ +
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UseActions", "UseActions_10.vcxproj", "{395CCE23-22B6-492C-8535-61C49A23D8E8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug (Unicode)|Win32 = Debug (Unicode)|Win32
+ Debug|Win32 = Debug|Win32
+ Release (Unicode)|Win32 = Release (Unicode)|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.ActiveCfg = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.Build.0 = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.Build.0 = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.ActiveCfg = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.Build.0 = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.ActiveCfg = Release|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/UseActions/UseActions_10.vcxproj b/UseActions/UseActions_10.vcxproj new file mode 100644 index 0000000..4c24766 --- /dev/null +++ b/UseActions/UseActions_10.vcxproj @@ -0,0 +1,197 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug (Unicode)|Win32">
+ <Configuration>Debug (Unicode)</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release (Unicode)|Win32">
+ <Configuration>Release (Unicode)</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>UseActions</ProjectName>
+ <ProjectGuid>{395CCE23-22B6-492C-8535-61C49A23D8E8}</ProjectGuid>
+ <RootNamespace>TestActions</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj\$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EmbedManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj\$(ProjectName)\</IntDir>
+ <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</EmbedManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">$(SolutionDir)$(Configuration)/Obj\$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">true</LinkIncremental>
+ <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">false</EmbedManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">$(SolutionDir)$(Configuration)/Obj\$(ProjectName)\</IntDir>
+ <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">false</EmbedManifest>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USERDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USERDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ProfileGuidedDatabase>
+ </ProfileGuidedDatabase>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Windows</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="UseActions.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="common.h" />
+ <ClInclude Include="res\resource.h" />
+ <ClInclude Include="UseActions.h" />
+ <ClInclude Include="res\version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\action.ico" />
+ <None Include="Changelog.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\resource.rc" />
+ <ResourceCompile Include="res\UseActions.rc">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">true</ExcludedFromBuild>
+ </ResourceCompile>
+ <ResourceCompile Include="res\version.rc">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">true</ExcludedFromBuild>
+ </ResourceCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/UseActions/UseActions_10.vcxproj.filters b/UseActions/UseActions_10.vcxproj.filters new file mode 100644 index 0000000..9d2b286 --- /dev/null +++ b/UseActions/UseActions_10.vcxproj.filters @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="UseActions.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="common.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="res\resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="UseActions.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="res\version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\action.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="Changelog.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="res\UseActions.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="res\version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/UseActions/UseActions_6.dsp b/UseActions/UseActions_6.dsp new file mode 100644 index 0000000..6041ed6 --- /dev/null +++ b/UseActions/UseActions_6.dsp @@ -0,0 +1,230 @@ +# Microsoft Developer Studio Project File - Name="UseActions" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=UseActions - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "UseActions_6.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "UseActions_6.mak" CFG="UseActions - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "UseActions - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "UseActions - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "UseActions - Win32 Debug (Unicode)" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "UseActions - Win32 Release (Unicode)" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "UseActions - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\Debug\Plugins"
+# PROP BASE Intermediate_Dir ".\Debug\Obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\Debug\Plugins"
+# PROP Intermediate_Dir ".\Debug\Obj"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /GX /Zi /Od /I "../../include;../ExternalAPI" /D "_DEBUG" /D "_WINDOWS" /D "_USERDLL" /Yc"common.h" /GZ /c
+# ADD CPP /nologo /MTd /W3 /GX /Zi /Od /I "../../include;../ExternalAPI" /D "_DEBUG" /D "_WINDOWS" /D "_USERDLL" /Yc"common.h" /GZ /c
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /pdb:"$(ConfigurationName)\$(TargetName).pdb" /debug /machine:IX86 /pdbtype:sept
+# SUBTRACT BASE LINK32 /pdb:none
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /pdb:"$(ConfigurationName)\$(TargetName).pdb" /debug /machine:IX86 /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "UseActions - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\Release\Plugins"
+# PROP BASE Intermediate_Dir ".\Release\Obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\Release\Plugins"
+# PROP Intermediate_Dir ".\Release\Obj"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /GX /I "../../include;../ExternalAPI" /D "NDEBUG" /D "_WINDOWS" /D "_USERDLL" /Yc"common.h" /c
+# ADD CPP /nologo /MT /GX /I "../../include;../ExternalAPI" /D "NDEBUG" /D "_WINDOWS" /D "_USERDLL" /Yc"common.h" /c
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /machine:IX86 /pdbtype:sept
+# SUBTRACT BASE LINK32 /pdb:none
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /machine:IX86 /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "UseActions - Win32 Debug (Unicode)"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\testmir\Plugins\"
+# PROP BASE Intermediate_Dir ".\Debug (Unicode)\Obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\testmir\Plugins\"
+# PROP Intermediate_Dir ".\Debug_(Unicode)\Obj"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /GX /ZI /Od /I "../../include;../ExternalAPI" /D "_DEBUG" /D "_WINDOWS" /D "_USERDLL" /D "UNICODE" /D "_UNICODE" /FR /Yc"common.h" /GZ /c
+# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "../../include;../ExternalAPI" /D "_DEBUG" /D "_WINDOWS" /D "_USERDLL" /D "UNICODE" /D "_UNICODE" /FR /Yc"common.h" /GZ /c
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x0 /d "_DEBUG" /d "UNICODE" /d "_UNICODE"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /pdb:"..\..\..\testmir\Plugins\$(TargetName).pdb" /debug /machine:IX86 /out:"..\..\..\testmir\Plugins\$(ProjectName).dll" /implib:"$(intDir)\$(TargetName).lib" /pdbtype:sept
+# SUBTRACT BASE LINK32 /pdb:none
+# ADD LINK32 comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:IX86 /out:"..\..\..\testmir\Plugins\UseActions.dll" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "UseActions - Win32 Release (Unicode)"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\Release (Unicode)\Plugins"
+# PROP BASE Intermediate_Dir ".\Release (Unicode)\Obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\Release_(Unicode)\Plugins"
+# PROP Intermediate_Dir ".\Release_(Unicode)\Obj"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /GX /Ox /Os /I "../../include;../ExternalAPI" /D "NDEBUG" /D "_WINDOWS" /D "_USERDLL" /D "UNICODE" /D "_UNICODE" /Yc"common.h" /c
+# ADD CPP /nologo /MD /W3 /Ox /Og /Os /Gf /I "../../include;../ExternalAPI" /D "NDEBUG" /D "_WINDOWS" /D "_USERDLL" /D "UNICODE" /D "_UNICODE" /Fr /YX"common.h" /c
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x0 /d "UNICODE" /d "_UNICODE"
+# SUBTRACT RSC /x
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo /o".\Release_(Unicode)\obj/UseActions.bsc"
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /machine:IX86 /pdbtype:sept
+# ADD LINK32 comctl32.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib shell32.lib uuid.lib /nologo /subsystem:windows /dll /machine:IX86 /out:".\Release_(Unicode)\Plugins/UseActions.dll"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "UseActions - Win32 Debug"
+# Name "UseActions - Win32 Release"
+# Name "UseActions - Win32 Debug (Unicode)"
+# Name "UseActions - Win32 Release (Unicode)"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+# Begin Source File
+
+SOURCE=.\UseActions.c
+DEP_CPP_USEAC=\
+ "..\..\include\m_button.h"\
+ "..\..\include\m_clist.h"\
+ "..\..\include\m_database.h"\
+ "..\..\include\m_genmenu.h"\
+ "..\..\include\m_hotkeys.h"\
+ "..\..\include\m_icolib.h"\
+ "..\..\include\m_langpack.h"\
+ "..\..\include\m_options.h"\
+ "..\..\include\m_plugins.h"\
+ "..\..\include\m_protocols.h"\
+ "..\..\include\m_skin.h"\
+ "..\..\include\m_system.h"\
+ "..\..\include\m_utils.h"\
+ "..\..\include\newpluginapi.h"\
+ "..\..\include\statusmodes.h"\
+ "..\..\include\win2k.h"\
+ ".\common.h"\
+ "..\ExternalAPI\m_actman.h"\
+ "..\ExternalAPI\m_msg_buttonsbar.h"\
+ "..\ExternalAPI\m_toolbar.h"\
+ "..\ExternalAPI\m_toptoolbar.h"\
+ "..\ExternalAPI\m_updater.h"\
+ "..\ExternalAPI\m_variables.h"\
+ ".\res\version.h"\
+ ".\UseActions.h"\
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;inc;xsd"
+# Begin Source File
+
+SOURCE=.\common.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\resource.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\UseActions.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\version.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+# Begin Source File
+
+SOURCE=.\res\action.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\resource.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\UseActions.rc
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\version.rc
+# PROP Exclude_From_Build 1
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/UseActions/UseActions_6.dsw b/UseActions/UseActions_6.dsw new file mode 100644 index 0000000..d6b1044 --- /dev/null +++ b/UseActions/UseActions_6.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "UseActions"=UseActions_6.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/UseActions/UseActions_8.sln b/UseActions/UseActions_8.sln new file mode 100644 index 0000000..5aacbb9 --- /dev/null +++ b/UseActions/UseActions_8.sln @@ -0,0 +1,26 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UseActions", "UseActions_8.vcproj", "{395CCE23-22B6-492C-8535-61C49A23D8E8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug (Unicode)|Win32 = Debug (Unicode)|Win32
+ Debug|Win32 = Debug|Win32
+ Release (Unicode)|Win32 = Release (Unicode)|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.ActiveCfg = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.Build.0 = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.Build.0 = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.ActiveCfg = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.Build.0 = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.ActiveCfg = Release|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/UseActions/UseActions_8.vcproj b/UseActions/UseActions_8.vcproj new file mode 100644 index 0000000..9e4b1ba --- /dev/null +++ b/UseActions/UseActions_8.vcproj @@ -0,0 +1,443 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="UseActions"
+ ProjectGUID="{395CCE23-22B6-492C-8535-61C49A23D8E8}"
+ RootNamespace="TestActions"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USERDLL"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USERDLL"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ SubSystem="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug (Unicode)|Win32"
+ OutputDirectory="..\..\..\testmir\Plugins\"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ BrowseInformation="1"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ ProfileGuidedDatabase=""
+ ImportLibrary="$(intDir)\$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release (Unicode)|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ SubSystem="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\UseActions.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\common.h"
+ >
+ </File>
+ <File
+ RelativePath=".\res\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\UseActions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\res\version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath=".\res\action.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\resource.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\res\UseActions.rc"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\res\version.rc"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\readme.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/UseActions/UseActions_9.sln b/UseActions/UseActions_9.sln new file mode 100644 index 0000000..0d5611d --- /dev/null +++ b/UseActions/UseActions_9.sln @@ -0,0 +1,26 @@ +
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UseActions", "UseActions_9.vcproj", "{395CCE23-22B6-492C-8535-61C49A23D8E8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug (Unicode)|Win32 = Debug (Unicode)|Win32
+ Debug|Win32 = Debug|Win32
+ Release (Unicode)|Win32 = Release (Unicode)|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.ActiveCfg = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.Build.0 = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.Build.0 = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.ActiveCfg = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.Build.0 = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.ActiveCfg = Release|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/UseActions/UseActions_9.vcproj b/UseActions/UseActions_9.vcproj new file mode 100644 index 0000000..ad10317 --- /dev/null +++ b/UseActions/UseActions_9.vcproj @@ -0,0 +1,418 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="UseActions"
+ ProjectGUID="{395CCE23-22B6-492C-8535-61C49A23D8E8}"
+ RootNamespace="TestActions"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USERDLL"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USERDLL"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug (Unicode)|Win32"
+ OutputDirectory="..\..\..\..\testmir\Plugins\"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ BrowseInformation="1"
+ WarningLevel="4"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ ProfileGuidedDatabase=""
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(intDir)\$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release (Unicode)|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ SubSystem="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\UseActions.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\common.h"
+ >
+ </File>
+ <File
+ RelativePath=".\res\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\UseActions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\res\version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath=".\res\action.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\resource.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\res\UseActions.rc"
+ >
+ <FileConfiguration
+ Name="Debug (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\res\version.rc"
+ >
+ <FileConfiguration
+ Name="Debug (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\Changelog.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/UseActions/common.h b/UseActions/common.h new file mode 100644 index 0000000..6b5da27 --- /dev/null +++ b/UseActions/common.h @@ -0,0 +1,66 @@ +#ifndef _COMMON_INC
+#define _COMMON_INC
+
+// Modify the following defines if you have to target a platform prior to the ones specified below.
+// Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER // Allow use of features specific to Windows XP or later.
+#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
+#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
+#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
+#endif
+
+#define _CRT_SECURE_NO_DEPRECATE
+
+#if defined( UNICODE ) && !defined( _UNICODE )
+#define _UNICODE
+#endif
+
+#define MIRANDA_VER 0x0900
+#define MIRANDA_CUSTOM_LP
+
+#include <tchar.h>
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+
+#include <windows.h>
+#include <commctrl.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <win2k.h>
+#include <newpluginapi.h>
+#include <m_system.h>
+#include <m_database.h>
+#include <m_langpack.h>
+#include <m_options.h>
+#include <m_hotkeys.h>
+#include <m_utils.h>
+#include <m_skin.h>
+#include <m_genmenu.h>
+#include <m_icolib.h>
+#include <m_protocols.h>
+#include "m_actman.h"
+#include "m_msg_buttonsbar.h"
+#include "m_toolbar.h"
+#include "m_toptoolbar.h"
+#include "m_variables.h"
+#include "m_updater.h"
+
+extern HINSTANCE hInst;
+extern PLUGINLINK *pluginLink;
+
+#ifndef MIID_USEACTIONS
+#define MIID_USEACTIONS { 0xA63473F7, 0xF8BF, 0x46E7, { 0x9D, 0xF0, 0x4, 0x2D, 0xBE, 0x4C, 0xF5, 0x79 } }
+#endif
+
+#endif
diff --git a/UseActions/res/UseActions.rc b/UseActions/res/UseActions.rc new file mode 100644 index 0000000..fd2de9e --- /dev/null +++ b/UseActions/res/UseActions.rc @@ -0,0 +1,160 @@ +// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Neutral resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#pragma code_page(1251)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_OPTIONS DIALOGEX 0, 0, 308, 233
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ GROUPBOX "The way actions could be called",IDC_GB,6,2,297,226
+ CONTROL "",IDC_ACTIONSLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,12,12,118,210
+ CONTROL "CList_Modern",IDC_CHBMTBB,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,19,76,8
+ CONTROL "Core Hotkey",IDC_CHBHOTKEY,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,214,146,8
+ CONTROL "Enable",IDC_CHBMMENUITEM,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,49,65,8
+ CONTROL "Enable",IDC_CHBCMENUITEM,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,118,65,8
+ CONTROL "TopToolBar",IDC_CHBTTBB,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,28,68,8
+ EDITTEXT IDC_EDMMENUPN,218,56,78,12,ES_AUTOHSCROLL | WS_GROUP
+ EDITTEXT IDC_EDCMENUPN,218,125,78,12,ES_AUTOHSCROLL | WS_GROUP
+ RTEXT "Root popup:",IDC_STMMIROOTPOPN,132,58,83,8
+ RTEXT "Root popup:",IDC_STCMIROOTPOPN,132,127,83,8
+ CONTROL "show only if variables return 1",IDC_CHBCMVARS,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_GROUP | WS_TABSTOP,162,152,134,8
+ EDITTEXT IDC_EDCMENUVARSTR,162,161,120,12,ES_AUTOHSCROLL | WS_GROUP
+ CONTROL "",IDC_BTCMSVARSHELP,"MButtonClass",WS_TABSTOP,282,161,14,12
+ LTEXT "Toolbar buttons",IDC_STTOOLBAR,140,10,145,8
+ LTEXT "Main menu item",IDC_STMMI,140,39,156,8
+ LTEXT "Contact menu item",IDC_STCMI,140,107,156,8
+ LTEXT "Other",IDC_STOTHER,140,204,156,8
+ LTEXT "Tray menu item",IDC_STTMI,140,176,156,8
+ EDITTEXT IDC_EDTMENUPN,220,194,76,12,ES_AUTOHSCROLL | WS_GROUP
+ CONTROL "Enable",IDC_CHBTMENUITEM,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,186,65,8
+ RTEXT "Root popup:",IDC_STTMIROOTPOPN,150,195,65,8
+ EDITTEXT IDC_EDMMENUN,218,69,64,12,ES_AUTOHSCROLL | WS_GROUP
+ RTEXT "Name through vars:",IDC_STMMIVARNAME,132,72,83,8
+ CONTROL "",IDC_BTMMNVARSHELP,"MButtonClass",WS_TABSTOP,282,69,14,12
+ EDITTEXT IDC_EDCMENUN,218,138,64,12,ES_AUTOHSCROLL | WS_GROUP
+ RTEXT "Name through vars:",IDC_STCMIVARNAME,132,139,83,8
+ CONTROL "",IDC_BTCMNVARSHELP,"MButtonClass",WS_TABSTOP,282,138,14,12
+ CONTROL "TabButtonBar",IDC_CHBTABBB,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,228,19,68,8
+ CONTROL "separated",IDC_CHBMMENUSEP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,218,46,77,10
+ CONTROL "separated",IDC_CHBCMENUSEP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,218,115,77,10
+ CONTROL "show only if variables return 1",IDC_CHBMMVARS,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_GROUP | WS_TABSTOP,162,83,134,8
+ EDITTEXT IDC_EDMMENUVARSTR,162,92,120,12,ES_AUTOHSCROLL | WS_GROUP
+ CONTROL "",IDC_BTMMSVARSHELP,"MButtonClass",WS_TABSTOP,282,92,14,12
+END
+
+IDD_ELEMOPTS DIALOGEX 0, 0, 316, 182
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_TOOLWINDOW
+CAPTION "Dialog"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,205,161,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,259,161,50,14
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ACTION ICON ".\\action.ico"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_OPTIONS, DIALOG
+ BEGIN
+ VERTGUIDE, 140
+ VERTGUIDE, 150
+ VERTGUIDE, 162
+ VERTGUIDE, 200
+ VERTGUIDE, 215
+ VERTGUIDE, 228
+ VERTGUIDE, 268
+ VERTGUIDE, 296
+ VERTGUIDE, 304
+ HORZGUIDE, 27
+ END
+
+ IDD_ELEMOPTS, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 309
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 175
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // Neutral resources
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/UseActions/res/action.ico b/UseActions/res/action.ico Binary files differnew file mode 100644 index 0000000..9e4c60d --- /dev/null +++ b/UseActions/res/action.ico diff --git a/UseActions/res/resource.h b/UseActions/res/resource.h new file mode 100644 index 0000000..063634b --- /dev/null +++ b/UseActions/res/resource.h @@ -0,0 +1,53 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by UseActions.rc
+//
+#define IDI_ACTION 101
+#define IDD_OPTIONS 102
+#define IDD_ELEMOPTS 104
+#define IDC_ACTIONSLIST 1001
+#define IDC_CHBMTBB 1002
+#define IDC_CHBHOTKEY 1003
+#define IDC_CHBMMENUITEM 1004
+#define IDC_CHBCMENUITEM 1005
+#define IDC_CHBTTBB 1006
+#define IDC_EDMMENUPN 1007
+#define IDC_EDCMENUPN 1008
+#define IDC_EDTMENUPN 1009
+#define IDC_CHBTABBB 1010
+#define IDC_CHBTMENUITEM 1012
+#define IDC_EDMMENUN 1013
+#define IDC_EDCMENUN 1014
+#define IDC_CHBCMVARS 1015
+#define IDC_EDCMENUVARSTR 1016
+#define IDC_BTCMSVARSHELP 1017
+#define IDC_STTOOLBAR 1018
+#define IDC_GB 1019
+#define IDC_STMMI 1020
+#define IDC_STCMI 1021
+#define IDC_STTMI 1022
+#define IDC_STOTHER 1023
+#define IDC_STMMIROOTPOPN 1024
+#define IDC_STCMIROOTPOPN 1025
+#define IDC_STTMIROOTPOPN 1026
+#define IDC_STMMIVARNAME 1027
+#define IDC_BTMMNVARSHELP 1028
+#define IDC_STCMIVARNAME 1029
+#define IDC_BTCMNVARSHELP 1030
+#define IDC_CHBMMENUSEP 1031
+#define IDC_CHBCMENUSEP 1032
+#define IDC_CHBMMVARS 1033
+#define IDC_EDMMENUVARSTR 1034
+#define IDC_BTMMSVARSHELP 1035
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 105
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1032
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/UseActions/res/resource.rc b/UseActions/res/resource.rc new file mode 100644 index 0000000..16c9fa2 --- /dev/null +++ b/UseActions/res/resource.rc @@ -0,0 +1,2 @@ +#include "UseActions.rc"
+#include "version.rc"
\ No newline at end of file diff --git a/UseActions/res/version.h b/UseActions/res/version.h new file mode 100644 index 0000000..c4698c8 --- /dev/null +++ b/UseActions/res/version.h @@ -0,0 +1,62 @@ +// Set the version number here - it will affect the version resource and the version field of the pluginInfo structure
+// (Be careful that you don't have the resource file open when you change this and rebuild, otherwise the changes may not
+// take effect within the version resource)
+// Do not forget to define symbol "_DEBUG" for resource compiler if you use debug configuration (in VisualStudio you can
+// find it under Project properties - Configuration properties - Resource - General - Preprocessor definitions)
+
+// plugin version part
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 0
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 4
+// plugin SVN Revision number
+//#define __REV_NUM 5678
+
+// minimal MirandaIM version number, with which this plugin supposed to work
+#define __PROD_MAJOR_VERSION 0
+#define __PROD_MINOR_VERSION 7
+#define __PROD_RELEASE_NUM 13
+#define __PROD_BUILD_NUM 0
+// if your plugin works only with Miranda core beginning from specific revision, you can include this information in Product Version resource
+//#define __PROD_REV_NUM 1234
+
+// stuff that will be used in PluginInfo section and in Version resource
+#if defined (_UNICODE)
+#define __PLUGIN_NAME "UseActions (Unicode)"
+#else
+#define __PLUGIN_NAME "UseActions"
+#endif
+#define __FILENAME "UseActions.dll"
+#define __DESC "This plugin makes use of actions, serviced by Actions Manager plugin (ActMan by Awkward)."
+#define __AUTHOR "Igor Abakumov"
+#define __AUTHOREMAIL "abakumoff@mail.ru"
+#define __AUTHORWEB "http://vasilich.org/blog"
+#define __COPYRIGHT "© 2010 Igor Abakumov"
+
+// other stuff for Version resource
+#define __STRINGIFY_IMPL(x) #x
+#define __STRINGIFY(x) __STRINGIFY_IMPL(x)
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
+#ifdef _UNICODE
+#ifdef __REV_NUM
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS rev. __REV_NUM Unicode)
+#else
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS Unicode)
+#endif
+#else
+#ifdef __REV_NUM
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS rev. __REV_NUM)
+#else
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS)
+#endif
+#endif
+
+#define __PRODVERSION_STRING __PROD_MAJOR_VERSION,__PROD_MINOR_VERSION,__PROD_RELEASE_NUM,__PROD_BUILD_NUM
+#define __PRODVERSION_STRING_DOTS __PROD_MAJOR_VERSION.__PROD_MINOR_VERSION.__PROD_RELEASE_NUM.__PROD_BUILD_NUM
+#ifdef __PROD_REV_NUM
+#define __PROD_VERSION_STRING __STRINGIFY(__PRODVERSION_STRING_DOTS rev. __PROD_REV_NUM)
+#else
+#define __PROD_VERSION_STRING __STRINGIFY(__PRODVERSION_STRING_DOTS+)
+#endif
diff --git a/UseActions/res/version.rc b/UseActions/res/version.rc new file mode 100644 index 0000000..ae94064 --- /dev/null +++ b/UseActions/res/version.rc @@ -0,0 +1,39 @@ +#include "version.h"
+
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#endif //_WIN32
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __PRODVERSION_STRING
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+//#else
+// FILEFLAGS 0x0L
+#endif
+
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0" // LOCALE_NEUTRAL<<16 + 1200 (ANSI - Unicode)
+ BEGIN
+ VALUE "Author", __AUTHOR
+ VALUE "FileDescription", __DESC
+ VALUE "InternalName", __PLUGIN_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "FileVersion", __VERSION_STRING
+ VALUE "ProductName", "Miranda IM"
+ VALUE "ProductVersion", __PROD_VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", /*LOCALE_NEUTRAL from WinNT.h */ 0x0, 1200
+ END
+END
|