summaryrefslogtreecommitdiff
path: root/plugins/TooltipNotify/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-03-10 12:42:08 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-03-10 12:42:08 +0000
commit102a413497df49bd2af8ee0a1770718fa0ecfcc2 (patch)
treef89a458502fb1679be3eeccc0bd0a8fbb3914a08 /plugins/TooltipNotify/src
parentcf72bb04a7650ae5e1b7011d17ce572bb06896b0 (diff)
added precompiled header
added version info git-svn-id: http://svn.miranda-ng.org/main/trunk@3956 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TooltipNotify/src')
-rw-r--r--plugins/TooltipNotify/src/DbHelpers.cpp1
-rw-r--r--plugins/TooltipNotify/src/DbHelpers.h2
-rw-r--r--plugins/TooltipNotify/src/Settings.h2
-rw-r--r--plugins/TooltipNotify/src/Tooltip.cpp3
-rw-r--r--plugins/TooltipNotify/src/Tooltip.h2
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.cpp20
-rw-r--r--plugins/TooltipNotify/src/TooltipNotify.h2
-rw-r--r--plugins/TooltipNotify/src/Utils.cpp1
-rw-r--r--plugins/TooltipNotify/src/Utils.h2
-rw-r--r--plugins/TooltipNotify/src/main.cpp42
-rw-r--r--plugins/TooltipNotify/src/stdafx.h18
-rw-r--r--plugins/TooltipNotify/src/version.h21
12 files changed, 35 insertions, 81 deletions
diff --git a/plugins/TooltipNotify/src/DbHelpers.cpp b/plugins/TooltipNotify/src/DbHelpers.cpp
index 930206486d..4a4fad9c1f 100644
--- a/plugins/TooltipNotify/src/DbHelpers.cpp
+++ b/plugins/TooltipNotify/src/DbHelpers.cpp
@@ -3,7 +3,6 @@
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
-#include "DbHelpers.h"
typedef std::vector<const char*> SettingsList;
diff --git a/plugins/TooltipNotify/src/DbHelpers.h b/plugins/TooltipNotify/src/DbHelpers.h
index aea3c9a9b2..374df04c05 100644
--- a/plugins/TooltipNotify/src/DbHelpers.h
+++ b/plugins/TooltipNotify/src/DbHelpers.h
@@ -2,8 +2,6 @@
//
//////////////////////////////////////////////////////////////////////
-#pragma once
-
bool ModuleSettingsExists(HANDLE hContact, const char* pszModuleName);
void DeleteModuleSettings(HANDLE hContact, const char* pszModuleName);
void RenameModule(HANDLE hContact, const char* pszOldName, const char* pszNewName);
diff --git a/plugins/TooltipNotify/src/Settings.h b/plugins/TooltipNotify/src/Settings.h
index ce705ef514..e248c8e245 100644
--- a/plugins/TooltipNotify/src/Settings.h
+++ b/plugins/TooltipNotify/src/Settings.h
@@ -2,8 +2,6 @@
// Settings.h
//
-#pragma once
-
// Settings related
#define DEF_LOGPIXELSY 96
#define PROTO_TT_ON_INT_BIT 0x01
diff --git a/plugins/TooltipNotify/src/Tooltip.cpp b/plugins/TooltipNotify/src/Tooltip.cpp
index 42022fa692..e9804ea8b9 100644
--- a/plugins/TooltipNotify/src/Tooltip.cpp
+++ b/plugins/TooltipNotify/src/Tooltip.cpp
@@ -3,9 +3,6 @@
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
-#include "Tooltip.h"
-#include "Settings.h"
-#include "TooltipNotify.h"
/*static*/ const TCHAR *CTooltip::s_szTooltipClass = _T("MimTooltipNotify");
diff --git a/plugins/TooltipNotify/src/Tooltip.h b/plugins/TooltipNotify/src/Tooltip.h
index fc97348370..ed79eefcd0 100644
--- a/plugins/TooltipNotify/src/Tooltip.h
+++ b/plugins/TooltipNotify/src/Tooltip.h
@@ -2,8 +2,6 @@
//
//////////////////////////////////////////////////////////////////////
-#pragma once
-
class CTooltipNotify;
class CTooltip
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp
index 7e4a09b11d..c24034ad00 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.cpp
+++ b/plugins/TooltipNotify/src/TooltipNotify.cpp
@@ -3,12 +3,6 @@
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
-#include "resource.h"
-#include "TooltipNotify.h"
-#include "Tooltip.h"
-#include "Settings.h"
-#include "DbHelpers.h"
-#include "Utils.h"
#define ReadSettingByte(c, d) DBGetContactSettingByte(NULL, s_szModuleName, c, d)
#define ReadSettingWord(c, d) DBGetContactSettingWord(NULL, s_szModuleName, c, d)
@@ -111,7 +105,7 @@ void CTooltipNotify::RegisterFonts()
colorId.defcolour = DEF_SETTING_BGCOLOR;
colorId.order = 0;
- for (int i=0; i<ARRAY_SIZE(s_fontTable); i++)
+ for (int i=0; i<SIZEOF(s_fontTable); i++)
{
_tcscpy(fontId.name, s_fontTable[i].name);
strcpy(fontId.prefix, s_fontTable[i].fontPrefix);
@@ -127,7 +121,7 @@ void CTooltipNotify::RegisterFonts()
void CTooltipNotify::GetFont(int iStatus, LOGFONT* lf, COLORREF* text, COLORREF* bg)
{
TCHAR* fontName = 0;
- for(int i=0; i<ARRAY_SIZE(s_fontTable); i++)
+ for(int i=0; i<SIZEOF(s_fontTable); i++)
{
if (s_fontTable[i].status == iStatus)
{
@@ -136,7 +130,7 @@ void CTooltipNotify::GetFont(int iStatus, LOGFONT* lf, COLORREF* text, COLORREF*
}
if (fontName == 0)
{
- fontName = s_fontTable[ARRAY_SIZE(s_fontTable)-1].name;
+ fontName = s_fontTable[SIZEOF(s_fontTable)-1].name;
}
// name and group only
@@ -724,7 +718,7 @@ BOOL CTooltipNotify::ProtosDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
WCHAR wszProto[128];
long lLen = MultiByteToWideChar(CP_ACP, 0, ppProtos[i]->szModuleName,
- (int)strlen(ppProtos[i]->szModuleName), wszProto, ARRAY_SIZE(wszProto));
+ (int)strlen(ppProtos[i]->szModuleName), wszProto, SIZEOF(wszProto));
wszProto[lLen] = L'\0';
lvi.pszText = wszProto;
@@ -750,7 +744,7 @@ BOOL CTooltipNotify::ProtosDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
{
TCHAR szProto[64];
- ListView_GetItemText(GetDlgItem(hDlg,IDC_PROTOS), i, 0, szProto, ARRAY_SIZE(szProto));
+ ListView_GetItemText(GetDlgItem(hDlg,IDC_PROTOS), i, 0, szProto, SIZEOF(szProto));
char szMultiByteProto[128];
long lLen = WideCharToMultiByte(CP_ACP, 0, szProto, lstrlen(szProto),
@@ -979,7 +973,7 @@ TCHAR *CTooltipNotify::StatusToString(int iStatus, TCHAR *szStatus, int iBufSize
TCHAR *CTooltipNotify::MakeTooltipString(HANDLE hContact, int iStatus, TCHAR *szString, int iBufSize)
{
TCHAR szStatus[32];
- StatusToString(iStatus, szStatus, ARRAY_SIZE(szStatus));
+ StatusToString(iStatus, szStatus, SIZEOF(szStatus));
// "proro: user is online"
const TCHAR *szFormatString = m_sOptions.bPrefixProto ? _T("%s%s%s") : _T("%.0s%.0s%s");
@@ -994,7 +988,7 @@ TCHAR *CTooltipNotify::MakeTooltipString(HANDLE hContact, int iStatus, TCHAR *sz
WCHAR wszProto[32];
- long lLen = MultiByteToWideChar(CP_ACP, 0, szProto, (int)strlen(szProto), wszProto, ARRAY_SIZE(wszProto));
+ long lLen = MultiByteToWideChar(CP_ACP, 0, szProto, (int)strlen(szProto), wszProto, SIZEOF(wszProto));
wszProto[lLen] = _T('\0');
_sntprintf(szString, iBufSize-1, szFormatString, wszProto, _T(": "), szContactName);
diff --git a/plugins/TooltipNotify/src/TooltipNotify.h b/plugins/TooltipNotify/src/TooltipNotify.h
index 00ed0bb932..9e31c5e383 100644
--- a/plugins/TooltipNotify/src/TooltipNotify.h
+++ b/plugins/TooltipNotify/src/TooltipNotify.h
@@ -2,8 +2,6 @@
//
//////////////////////////////////////////////////////////////////////
-#pragma once
-
class CTooltip;
class CTooltipNotify
diff --git a/plugins/TooltipNotify/src/Utils.cpp b/plugins/TooltipNotify/src/Utils.cpp
index 67b9b670b6..7b777b73db 100644
--- a/plugins/TooltipNotify/src/Utils.cpp
+++ b/plugins/TooltipNotify/src/Utils.cpp
@@ -3,7 +3,6 @@
//
#include "stdafx.h"
-#include "Utils.h"
BOOL IsNt50()
{
diff --git a/plugins/TooltipNotify/src/Utils.h b/plugins/TooltipNotify/src/Utils.h
index 7264e4c27c..b0baf7c0da 100644
--- a/plugins/TooltipNotify/src/Utils.h
+++ b/plugins/TooltipNotify/src/Utils.h
@@ -2,7 +2,5 @@
// Utils.h
//
-#pragma once
-
BOOL IsNt50();
void TruncateWithDots(TCHAR* szString, size_t iNewLen); \ No newline at end of file
diff --git a/plugins/TooltipNotify/src/main.cpp b/plugins/TooltipNotify/src/main.cpp
index 8819529e1c..d3112e752e 100644
--- a/plugins/TooltipNotify/src/main.cpp
+++ b/plugins/TooltipNotify/src/main.cpp
@@ -3,8 +3,6 @@
*//////////////////////////////////////////////
#include "stdafx.h"
-#include "version.h"
-#include "TooltipNotify.h"
static int InitializeOptions(WPARAM wParam,LPARAM lParam);
static int ModulesLoaded(WPARAM wParam,LPARAM lParam);
@@ -18,7 +16,6 @@ static HANDLE g_hModulesLoaded = 0;
static HANDLE g_hProtoAck = 0;
static HANDLE g_hProtoContactIsTyping = 0;
static HINSTANCE g_hInstDLL = 0;
-static bool g_bRightModule = false; // i.e. ansi for win9x, and unicode for winnt
// Main global object
static CTooltipNotify *g_pTooltipNotify = 0;
@@ -31,41 +28,20 @@ int hLangpack;
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
- switch(fdwReason)
- {
- case DLL_PROCESS_ATTACH:
- {
- DisableThreadLibraryCalls(hInstDLL);
- g_hInstDLL = hInstDLL;
-
- OSVERSIONINFO OsVersionInfo;
- OsVersionInfo.dwOSVersionInfoSize = sizeof(OsVersionInfo);
- GetVersionEx(&OsVersionInfo);
-
-
- g_bRightModule = (OsVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
-
-
- break;
- }
-
- case DLL_PROCESS_DETACH:
- break;
- }
-
+ g_hInstDLL = hInstDLL;
return TRUE;
}
static PLUGININFOEX sPluginInfo =
{
sizeof(PLUGININFOEX),
- "Tooltip Notify",
- PLUGIN_MAKE_VERSION(MAJOR,MINOR,BUILD,REVISION), // major, minor, revision, build
- "Shows a small tooltip above system tray area when a contact status is changed.",
- "perf",
- "perf@mail333.com",
- "© 2004-2008 Gneedah software",
- "http://miranda-ng.org/",
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
UNICODE_AWARE,
// {5906A545-F31A-4726-B48F-03A09F060318}
{0x5906a545, 0xf31a, 0x4726, {0xb4, 0x8f, 0x3, 0xa0, 0x9f, 0x6, 0x3, 0x18}}
@@ -78,8 +54,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" int __declspec(dllexport) Load(void)
{
- if (!g_bRightModule) return 0;
-
mir_getLP(&sPluginInfo);
g_pTooltipNotify = new CTooltipNotify(g_hInstDLL);
diff --git a/plugins/TooltipNotify/src/stdafx.h b/plugins/TooltipNotify/src/stdafx.h
index d00b996556..72c8c13416 100644
--- a/plugins/TooltipNotify/src/stdafx.h
+++ b/plugins/TooltipNotify/src/stdafx.h
@@ -3,35 +3,33 @@
// are changed infrequently
//
-#pragma once
-
#define _CRT_SECURE_NO_WARNINGS
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define _WIN32_WINNT 0x0500
-// Windows header files
#include <windows.h>
#include <commctrl.h>
-#include <commdlg.h>
-
-// C/C++ header files
#include <cassert>
#include <algorithm>
#include <vector>
-// Miranda IM header files
#include <newpluginapi.h>
#include <m_clist.h>
#include <m_skin.h>
-#include <m_system.h>
#include <m_database.h>
#include <m_clui.h>
#include <m_ignore.h>
#include <m_options.h>
#include <m_protosvc.h>
#include <m_langpack.h>
-#include <m_utils.h>
#include <m_clc.h>
#include <m_fontservice.h>
+#include <win2k.h>
-#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0])) \ No newline at end of file
+#include "version.h"
+#include "TooltipNotify.h"
+#include "DbHelpers.h"
+#include "Tooltip.h"
+#include "Settings.h"
+#include "resource.h"
+#include "Utils.h"
diff --git a/plugins/TooltipNotify/src/version.h b/plugins/TooltipNotify/src/version.h
index 9de12d2cee..6a60505c7c 100644
--- a/plugins/TooltipNotify/src/version.h
+++ b/plugins/TooltipNotify/src/version.h
@@ -1,11 +1,14 @@
-/*********************************************************************/
-//
-// Tooltip Notify version file
-//
-/*********************************************************************/
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 6
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 47
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
-#define MAJOR 0
-#define MINOR 6
-#define BUILD 0
-#define REVISION 47
+#define __PLUGIN_NAME "Tooltip notify"
+#define __FILENAME "TooltipNotify.dll"
+#define __DESCRIPTION "Shows a small tooltip above system tray area when a contact status is changed."
+#define __AUTHOR "perf"
+#define __AUTHOREMAIL "perf@mail333.com"
+#define __AUTHORWEB "http://miranda-ng.org/"
+#define __COPYRIGHT "© 2004-2008 Gneedah software"