summaryrefslogtreecommitdiff
path: root/plugins/Non-IM Contact/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-08-16 23:08:55 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-08-16 23:08:55 +0000
commit0c060267ccea726d5c2c2fd1e45d1f16965fb01e (patch)
treeef15e5533dbda23f63e423056b9d746e5d643ae3 /plugins/Non-IM Contact/src/main.cpp
parentaf58213e6005cbf4b9ce8be2ad66eb6eae3df4a9 (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14975 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Non-IM Contact/src/main.cpp')
-rw-r--r--plugins/Non-IM Contact/src/main.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp
index 7c431bb8e3..15c251fb5b 100644
--- a/plugins/Non-IM Contact/src/main.cpp
+++ b/plugins/Non-IM Contact/src/main.cpp
@@ -7,7 +7,7 @@
#include "Version.h"
CLIST_INTERFACE *pcli;
-HINSTANCE hInst;
+HINSTANCE g_hInst;
int hLangpack;
PLUGININFOEX pluginInfoEx = {
@@ -27,7 +27,7 @@ PLUGININFOEX pluginInfoEx = {
INT_PTR doubleClick(WPARAM wParam, LPARAM)
{
char program[MAX_PATH], params[MAX_PATH];
- int shellEXEerror = 0;
+ INT_PTR shellEXEerror = 0;
char* proto = GetContactProto(wParam);
if (proto && !mir_strcmp(proto, MODNAME)) {
if (GetKeyState(VK_CONTROL) & 0x8000) // ctrl is pressed
@@ -37,7 +37,8 @@ INT_PTR doubleClick(WPARAM wParam, LPARAM)
mir_strcpy(params, "");
if (strstr(program, "http://") || strstr(program, "https://"))
Utils_OpenUrl(program);
- else shellEXEerror = (int)ShellExecuteA(NULL, NULL, program, params, NULL, SW_SHOW); //ignore the warning, its M$'s backwards compatabilty screwup :)
+ else
+ shellEXEerror = (INT_PTR)ShellExecuteA(NULL, NULL, program, params, NULL, SW_SHOW); //ignore the warning, its M$'s backwards compatabilty screwup :)
if (shellEXEerror == ERROR_FILE_NOT_FOUND || shellEXEerror == ERROR_PATH_NOT_FOUND)
Utils_OpenUrl(program);
}
@@ -62,7 +63,7 @@ int LCStatus = ID_STATUS_OFFLINE;
int NimcOptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
- odp.hInstance = hInst;
+ odp.hInstance = g_hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
odp.pszGroup = LPGEN("Plugins");
odp.pszTitle = LPGEN("Non-IM Contacts");
@@ -91,7 +92,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD, LPVOID)
{
- hInst = hinst;
+ g_hInst = hinst;
return TRUE;
}
@@ -118,7 +119,7 @@ extern "C" __declspec(dllexport) int Load()
mir_getLP(&pluginInfoEx);
mir_getCLI();
- Icon_Register(hInst, LPGEN("Non-IM Contact"), icoList, _countof(icoList));
+ Icon_Register(g_hInst, LPGEN("Non-IM Contact"), icoList, _countof(icoList));
HookEvent(ME_CLIST_DOUBLECLICKED, (MIRANDAHOOK)doubleClick);
HookEvent(ME_OPT_INITIALISE, NimcOptInit);