diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2014-08-05 18:29:53 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2014-08-05 18:29:53 +0000 |
commit | 10117ea2b47b9c5ae8258cbafe212c3b3a966ca7 (patch) | |
tree | fd95dedce7f8725bcf54fa32462197df0ceadd49 /plugins/PluginUpdater/src | |
parent | 268feddae8e9970bb059e81d044541c32e982517 (diff) |
IM Updater fixes (thanks Wishmaster)
git-svn-id: http://svn.miranda-ng.org/main/trunk@10081 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src')
-rw-r--r-- | plugins/PluginUpdater/src/Compat/compat.cpp | 15 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Compat/compat.h | 11 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/PluginUpdater.cpp | 21 |
3 files changed, 22 insertions, 25 deletions
diff --git a/plugins/PluginUpdater/src/Compat/compat.cpp b/plugins/PluginUpdater/src/Compat/compat.cpp index 25fdcf27e0..260ff99039 100644 --- a/plugins/PluginUpdater/src/Compat/compat.cpp +++ b/plugins/PluginUpdater/src/Compat/compat.cpp @@ -19,6 +19,21 @@ Boston, MA 02111-1307, USA. This file contains some compatibility functions for Miranda IM
*/
+#include "Common.h"
+
+PLUGINLINK *pluginLink;
+MM_INTERFACE mmi;
+LIST_INTERFACE li;
+MD5_INTERFACE md5i;
+UTF8_INTERFACE utfi;
+
+static const MUUID interfaces[] = {MIID_UPDATER, MIID_LAST};
+
+extern "C" __declspec(dllexport) const MUUID *MirandaPluginInterfaces()
+{
+ return interfaces;
+}
+
static char szHexTable[] = "0123456789abcdef";
char *bin2hex(const void *pData, size_t len, char *dest)
diff --git a/plugins/PluginUpdater/src/Compat/compat.h b/plugins/PluginUpdater/src/Compat/compat.h index 26e807f478..6ba3ae3254 100644 --- a/plugins/PluginUpdater/src/Compat/compat.h +++ b/plugins/PluginUpdater/src/Compat/compat.h @@ -1,3 +1,5 @@ +#define MIID_UPDATER {0x4a47b19b, 0xde5a, 0x4436, { 0xab, 0x4b, 0xe1, 0xf3, 0xa0, 0x22, 0x5d, 0xe7}}
+
#define db_free(A) DBFreeVariant(A)
#define db_get_b(A,B,C,D) DBGetContactSettingByte(A,B,C,D)
@@ -14,6 +16,9 @@ #define db_get_wsa DBGetStringW
#define db_get_tsa DBGetStringT
+#define PUAddPopupT PUAddPopUpT
+#define PUDeletePopup PUDeletePopUp
+
template<class T> class mir_ptr
{
T *data;
@@ -78,7 +83,7 @@ __forceinline INT_PTR Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE *odp) char *bin2hex(const void *pData, size_t len, char *dest);
char *rtrim(char *str);
-int CreatePathToFileT(const TCHAR *ptszPath);
+void CreatePathToFileT(TCHAR *ptszPath);
int wildcmpit(const WCHAR *name, const WCHAR *mask);
#define NEWTSTR_ALLOCA(A) (A == NULL)?NULL:_tcscpy((TCHAR*)alloca((_tcslen(A)+1) *sizeof(TCHAR)), A)
@@ -119,10 +124,6 @@ __forceinline INT_PTR CreateDirectoryTreeT(const TCHAR *ptszPath) { return CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)ptszPath);
}
-int __forceinline PUDeletePopup(HWND hWndPopup)
-{ return (int)SendMessage(hWndPopup, UM_DESTROYPOPUP, 0, 0);
-}
-
#define _qtoupper(_c) (((_c) >= 'a' && (_c) <= 'z')?((_c)-('a'+'A')):(_c))
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index d0678e91e5..6e12f8739d 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -21,16 +21,6 @@ Boston, MA 02111-1307, USA. PlugOptions opts;
-#if MIRANDA_VER < 0x0A00
- #define MIID_UPDATER {0x4a47b19b, 0xde5a, 0x4436, { 0xab, 0x4b, 0xe1, 0xf3, 0xa0, 0x22, 0x5d, 0xe7}}
-
- PLUGINLINK *pluginLink;
- MM_INTERFACE mmi;
- LIST_INTERFACE li;
- MD5_INTERFACE md5i;
- UTF8_INTERFACE utfi;
-#endif
-
HINSTANCE hInst = NULL;
TCHAR tszRoot[MAX_PATH] = {0}, tszTempPath[MAX_PATH];
int hLangpack;
@@ -59,16 +49,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE;
}
-#if MIRANDA_VER < 0x0A00
-static const MUUID interfaces[] = {MIID_UPDATER, MIID_LAST};
-
-extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
-{
- return interfaces;
-}
-#endif
-
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
{
g_mirandaVersion = mirandaVersion;
return &pluginInfoEx;
|