diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-26 23:41:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-26 23:41:55 +0000 |
commit | 25221b7d2afb70f82eb3805330fd39a6f6708049 (patch) | |
tree | 6fdd3eb5c5642788e1f8286385b15535f9a7ec16 /plugins/TipperYM | |
parent | ef81e9edc10e2478f514e1fbfb0828ad1e7d8e49 (diff) |
mk: removed all LIST_INTERFACE, MI_INTERFACE & UTF8_INTERFACE instances.
all related functions moved to mir_core.
git-svn-id: http://svn.miranda-ng.org/main/trunk@644 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r-- | plugins/TipperYM/common.h | 8 | ||||
-rw-r--r-- | plugins/TipperYM/tipper.cpp | 40 |
2 files changed, 19 insertions, 29 deletions
diff --git a/plugins/TipperYM/common.h b/plugins/TipperYM/common.h index 201f8740c5..317796ed7f 100644 --- a/plugins/TipperYM/common.h +++ b/plugins/TipperYM/common.h @@ -15,7 +15,7 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public
License along with this file; see the file license.txt. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
+Boston, MA 02111-1307, USA.
*/
#pragma once
@@ -26,9 +26,9 @@ Boston, MA 02111-1307, USA. #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.
+#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
+#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.
@@ -102,6 +102,4 @@ extern COLORREF colTitle, colLabels, colBg, colValues; extern int iCodePage;
extern char szMetaModuleName[256];
-extern MM_INTERFACE mmi;
-extern LIST_INTERFACE li;
extern FI_INTERFACE *fii;
\ No newline at end of file diff --git a/plugins/TipperYM/tipper.cpp b/plugins/TipperYM/tipper.cpp index 09903c4302..788836da85 100644 --- a/plugins/TipperYM/tipper.cpp +++ b/plugins/TipperYM/tipper.cpp @@ -15,7 +15,7 @@ Library General Public License for more details. You should have received a copy of the GNU Library General Public
License along with this file; see the file license.txt. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
+Boston, MA 02111-1307, USA.
*/
#include "common.h"
@@ -35,7 +35,7 @@ ColourIDT colourBg, colourBorder, colourAvatarBorder, colourDivider, colourSideb HFONT hFontTitle, hFontLabels, hFontValues, hFontTrayTitle;
// hooked here so it's in the main thread
-HANDLE hAvChangeEvent, hShowTipEvent, hHideTipEvent, hAckEvent, hFramesSBShow, hFramesSBHide;
+HANDLE hAvChangeEvent, hShowTipEvent, hHideTipEvent, hAckEvent, hFramesSBShow, hFramesSBHide;
HANDLE hSettingChangedEvent, hEventDeleted;
HANDLE hShowTipService, hShowTipWService, hHideTipService;
HANDLE hReloadFonts = NULL;
@@ -44,12 +44,10 @@ HANDLE hFolderChanged, hSkinFolder; TCHAR SKIN_FOLDER[256];
FI_INTERFACE *fii = NULL;
-MM_INTERFACE mmi;
-LIST_INTERFACE li;
TIME_API tmi;
int hLangpack;
-PLUGININFOEX pluginInfoEx =
+PLUGININFOEX pluginInfoEx =
{
sizeof(PLUGININFOEX),
"Tipper YM",
@@ -82,7 +80,7 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) return interfaces;
}
-int ReloadFont(WPARAM wParam, LPARAM lParam)
+int ReloadFont(WPARAM wParam, LPARAM lParam)
{
LOGFONT logFont;
if (hFontTitle) DeleteObject(hFontTitle);
@@ -109,25 +107,25 @@ int ReloadFont(WPARAM wParam, LPARAM lParam) // hack to hide tip when clist hides from timeout
-int SettingChanged(WPARAM wParam, LPARAM lParam)
+int SettingChanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *dcws = (DBCONTACTWRITESETTING *)lParam;
- if (strcmp(dcws->szModule, "CList") != 0 || strcmp(dcws->szSetting, "State") != 0)
+ if (strcmp(dcws->szModule, "CList") != 0 || strcmp(dcws->szSetting, "State") != 0)
return 0;
// clist hiding
if (dcws->value.type == DBVT_BYTE && dcws->value.bVal == 0)
- HideTip(0, 0);
+ HideTip(0, 0);
return 0;
}
// needed for msg_count_xxx substitutions
-int EventDeleted(WPARAM wParam, LPARAM lParam)
+int EventDeleted(WPARAM wParam, LPARAM lParam)
{
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(dbei);
- if (!CallService(MS_DB_EVENT_GET, lParam, (LPARAM)&dbei))
+ if (!CallService(MS_DB_EVENT_GET, lParam, (LPARAM)&dbei))
{
if (dbei.eventType == EVENTTYPE_MESSAGE)
DBDeleteContactSetting((HANDLE)wParam, MODULE, "LastCountTS");
@@ -264,7 +262,7 @@ void InitFonts() void InitUpdaterSupport()
{
#ifndef _WIN64
- if (ServiceExists(MS_UPDATE_REGISTER))
+ if (ServiceExists(MS_UPDATE_REGISTER))
{
Update update = {0};
char szVersion[16];
@@ -284,7 +282,7 @@ void InitUpdaterSupport() #endif
}
-int ModulesLoaded(WPARAM wParam, LPARAM lParam)
+int ModulesLoaded(WPARAM wParam, LPARAM lParam)
{
InitFonts();
InitUpdaterSupport();
@@ -303,7 +301,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) FoldersGetCustomPathT(hSkinFolder, SKIN_FOLDER, SIZEOF(SKIN_FOLDER), _T(DEFAULT_SKIN_FOLDER));
InitTipperSmileys();
- LoadOptions();
+ LoadOptions();
ReloadFont(0, 0);
ParseSkinFile(opt.szSkinName, true, false);
@@ -320,7 +318,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) return 0;
}
-int Shutdown(WPARAM wParam, LPARAM lParam)
+int Shutdown(WPARAM wParam, LPARAM lParam)
{
if (hFramesSBShow) UnhookEvent(hFramesSBShow);
if (hFramesSBHide) UnhookEvent(hFramesSBHide);
@@ -343,16 +341,10 @@ int Shutdown(WPARAM wParam, LPARAM lParam) HANDLE hEventPreShutdown, hEventModulesLoaded;
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
pluginLink = link;
- if (mir_getMMI(&mmi) || mir_getLI(&li) || !ServiceExists(MS_IMG_GETINTERFACE))
- {
- MessageBox(NULL, TranslateT("Cannot obtain required interfaces!\nTooltips will not be available until you upgrade Miranda IM to the newest version."), TranslateT("Tipper error"), MB_OK | MB_ICONSTOP);
- return 1;
- }
-
CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&fii);
mir_getTMI(&tmi);
mir_getLP(&pluginInfoEx);
@@ -376,11 +368,11 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) hSettingChangedEvent = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged);
hEventDeleted = HookEvent(ME_DB_EVENT_DELETED, EventDeleted);
-
+
return 0;
}
-extern "C" int __declspec(dllexport) Unload()
+extern "C" int __declspec(dllexport) Unload()
{
UnhookEvent(hSettingChangedEvent);
UnhookEvent(hEventDeleted);
|