From abd477730033805f713ae13f0cabab1040b43367 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Sat, 11 Sep 2010 20:54:31 +0000 Subject: Removed unneeded dependencies Cleaned-up headers git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@531 4f64403b-2f21-0410-a795-97e2b3489a10 --- tipper/common.h | 14 +++++--------- tipper/message_pump.cpp | 4 ++-- tipper/message_pump.h | 2 -- tipper/options.cpp | 3 --- tipper/subst.cpp | 1 - tipper/tipper_9.sln | 34 +++++++++++++++++----------------- tipper/tipper_9.vcproj | 11 +++++++++-- tipper/translations.cpp | 12 ++++-------- 8 files changed, 37 insertions(+), 44 deletions(-) diff --git a/tipper/common.h b/tipper/common.h index 5d8be21..7bdb607 100644 --- a/tipper/common.h +++ b/tipper/common.h @@ -30,10 +30,11 @@ #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: #include -#include #include +#include + #include -#include +#include #include #include @@ -58,19 +59,14 @@ #include #include #include +#include +#include #include "m_updater.h" #include "m_variables.h" - #include "m_notify.h" - -#include "m_smr.h" - #include "m_metacontacts.h" -#include -#include - #define MODULE "Tipper" extern HMODULE hInst; diff --git a/tipper/message_pump.cpp b/tipper/message_pump.cpp index ace9229..310a137 100644 --- a/tipper/message_pump.cpp +++ b/tipper/message_pump.cpp @@ -8,8 +8,8 @@ HMODULE hUserDll; BOOL (WINAPI *MySetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD) = 0; BOOL (WINAPI *MyAnimateWindow)(HWND hWnd,DWORD dwTime,DWORD dwFlags) = 0; -//DWORD message_pump_thread_id = 0; unsigned int message_pump_thread_id = 0; + HANDLE hMPEvent; //DWORD CALLBACK MessagePumpThread(LPVOID param) { @@ -98,7 +98,7 @@ void InitMessagePump() { } hMPEvent = CreateEvent(0, TRUE, 0, 0); - CloseHandle((HANDLE)_beginthreadex(0, 0, MessagePumpThread, hMPEvent, 0, &message_pump_thread_id)); + CloseHandle(mir_forkthreadex(MessagePumpThread, hMPEvent, 0, &message_pump_thread_id)); WaitForSingleObject(hMPEvent, INFINITE); CloseHandle(hMPEvent); } diff --git a/tipper/message_pump.h b/tipper/message_pump.h index 309b5e7..f72d5bc 100644 --- a/tipper/message_pump.h +++ b/tipper/message_pump.h @@ -1,8 +1,6 @@ #ifndef _MESSAGE_PUMP_INC #define _MESSAGE_PUMP_INC -//extern DWORD message_pump_thread_id; -extern unsigned int message_pump_thread_id; void PostMPMessage(UINT msg, WPARAM, LPARAM); #define MUM_CREATEPOPUP (WM_USER + 0x011) diff --git a/tipper/options.cpp b/tipper/options.cpp index f4ad1af..21bc6d6 100644 --- a/tipper/options.cpp +++ b/tipper/options.cpp @@ -2,11 +2,8 @@ #include "options.h" #include "resource.h" #include "popwin.h" -#include #include "str_utils.h" -#include - Options options; #define WMU_ENABLE_LIST_BUTTONS (WM_USER + 0x030) diff --git a/tipper/subst.cpp b/tipper/subst.cpp index 439c0f7..2980c5c 100644 --- a/tipper/subst.cpp +++ b/tipper/subst.cpp @@ -1,6 +1,5 @@ #include "common.h" #include "subst.h" -#include #include "str_utils.h" void StripBBCodesInPlace(TCHAR *text) { diff --git a/tipper/tipper_9.sln b/tipper/tipper_9.sln index 6a4b68c..df3470a 100644 --- a/tipper/tipper_9.sln +++ b/tipper/tipper_9.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tipper", "tipper_9.vcproj", "{2C818919-A38F-44FF-BD91-A6A204AC592A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tipper", "tipper_9.vcproj", "{2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,22 +15,22 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug Unicode|x64.Build.0 = Debug Unicode|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.ActiveCfg = Debug|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|Win32.Build.0 = Debug|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.ActiveCfg = Debug|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Debug|x64.Build.0 = Debug|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release Unicode|x64.ActiveCfg = Release Unicode|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release Unicode|x64.Build.0 = Release Unicode|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.ActiveCfg = Release|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|Win32.Build.0 = Release|Win32 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.ActiveCfg = Release|x64 - {2C818919-A38F-44FF-BD91-A6A204AC592A}.Release|x64.Build.0 = Release|x64 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug Unicode|x64.Build.0 = Debug Unicode|x64 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug|Win32.ActiveCfg = Debug|Win32 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug|Win32.Build.0 = Debug|Win32 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug|x64.ActiveCfg = Debug|x64 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Debug|x64.Build.0 = Debug|x64 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release Unicode|Win32.Build.0 = Release Unicode|Win32 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release Unicode|x64.ActiveCfg = Release Unicode|x64 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release Unicode|x64.Build.0 = Release Unicode|x64 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release|Win32.ActiveCfg = Release|Win32 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release|Win32.Build.0 = Release|Win32 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release|x64.ActiveCfg = Release|x64 + {2CFFE6E3-FD83-4E6E-9D7A-8DAA59CC9B18}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/tipper/tipper_9.vcproj b/tipper/tipper_9.vcproj index 54b8ae5..0dc9048 100644 --- a/tipper/tipper_9.vcproj +++ b/tipper/tipper_9.vcproj @@ -1,7 +1,7 @@ -#include #include "str_utils.h" int num_tfuncs = 0; @@ -272,12 +270,10 @@ TCHAR *word_to_country(HANDLE hContact, const char *module_name, const char *set } TCHAR *dword_to_ip(HANDLE hContact, const char *module_name, const char *setting_name, TCHAR *buff, int bufflen) { - DWORD ip = DBGetContactSettingDword(hContact, module_name, setting_name, (WORD)0); - if(ip) { - in_addr in; - in.S_un.S_addr = htonl(ip); - a2t(inet_ntoa(in), buff, bufflen); - buff[bufflen - 1] = 0; + DWORD ip = DBGetContactSettingDword(hContact, module_name, setting_name, 0); + if (ip) { + unsigned char *ipc = (unsigned char*)&ip; + mir_sntprintf(buff, bufflen, _T("%u.%u.%u.%u"), ipc[3], ipc[2], ipc[1], ipc[0]); return buff; } return 0; -- cgit v1.2.3