summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-05 13:33:57 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-05 13:33:57 +0000
commita039e3378554f4f7b12a38722f72dfded2f4b277 (patch)
treef265023db904a0fb05734095add7ec30a6285be2 /plugins
parentdfb3d8f9d75adce65f7f0d17698dca455a760769 (diff)
wrong code from MirandaPluginInfoEx moved to Load()
git-svn-id: http://svn.miranda-ng.org/main/trunk@311 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TabSRMM/include/mim.h2
-rw-r--r--plugins/TabSRMM/src/mim.cpp1
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp77
-rw-r--r--plugins/TabSRMM/src/srmm.cpp15
4 files changed, 26 insertions, 69 deletions
diff --git a/plugins/TabSRMM/include/mim.h b/plugins/TabSRMM/include/mim.h
index 35783b1ec2..286848aa11 100644
--- a/plugins/TabSRMM/include/mim.h
+++ b/plugins/TabSRMM/include/mim.h
@@ -276,8 +276,6 @@ public:
static DSILP m_pfnDwmSetIconicLivePreviewBitmap;
static bool m_shutDown, m_haveBufferedPaint;
- static DWORD m_MimVersion;
-
private:
UTF8_INTERFACE m_utfi;
TCHAR m_szProfilePath[MAX_PATH + 2], m_szSkinsPath[MAX_PATH + 2], m_szSavedAvatarsPath[MAX_PATH + 2], m_szChatLogsPath[MAX_PATH + 2];
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index c57269f1d2..853279a086 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -74,7 +74,6 @@ bool CMimAPI::m_shutDown = 0;
TCHAR CMimAPI::m_userDir[] = _T("\0");
bool CMimAPI::m_haveBufferedPaint = false;
-DWORD CMimAPI::m_MimVersion = 0;
void CMimAPI::timerMsg(const char *szMsg)
{
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 36fffd8b1f..9d70e9079e 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -3534,67 +3534,32 @@ quote_from_last:
}
}
if (dat->hContact != NULL) {
- if (CMimAPI::m_MimVersion >= PLUGIN_MAKE_VERSION(0, 9, 0, 0)) {
-
- TCHAR szFilename[MAX_PATH];
- HDROP hDrop = (HDROP)wParam;
- int fileCount = DragQueryFile(hDrop, -1, NULL, 0), totalCount = 0, i;
- TCHAR** ppFiles = NULL;
- for (i = 0; i < fileCount; i++) {
- DragQueryFile(hDrop, i, szFilename, SIZEOF(szFilename));
- Utils::AddToFileList(&ppFiles, &totalCount, szFilename);
- }
-
- if (!not_sending) {
- CallService(MS_FILE_SENDSPECIFICFILEST, (WPARAM)dat->hContact, (LPARAM)ppFiles);
- } else {
- if (ServiceExists(MS_HTTPSERVER_ADDFILENAME)) {
- char *szHTTPText;
- int i;
-
- for (i = 0;i < totalCount;i++) {
- char* szFileName = mir_t2a( ppFiles[i] );
- char *szTemp = (char*)CallService(MS_HTTPSERVER_ADDFILENAME, (WPARAM)szFileName, 0);
- mir_free( szFileName );
- }
- szHTTPText = "DEBUG";
- SendDlgItemMessageA(hwndDlg, IDC_MESSAGE, EM_REPLACESEL, TRUE, (LPARAM)szHTTPText);
- SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
- }
- }
- for (i = 0;ppFiles[i];i++) mir_free(ppFiles[i]);
- mir_free(ppFiles);
+ TCHAR szFilename[MAX_PATH];
+ HDROP hDrop = (HDROP)wParam;
+ int fileCount = DragQueryFile(hDrop, -1, NULL, 0), totalCount = 0, i;
+ TCHAR** ppFiles = NULL;
+ for (i = 0; i < fileCount; i++) {
+ DragQueryFile(hDrop, i, szFilename, SIZEOF(szFilename));
+ Utils::AddToFileList(&ppFiles, &totalCount, szFilename);
}
- else {
- TCHAR szFilename[MAX_PATH];
- HDROP hDrop = (HDROP)wParam;
- int fileCount = DragQueryFile(hDrop, -1, NULL, 0), totalCount = 0, i;
- char** ppFiles = NULL;
- for (i = 0; i < fileCount; i++) {
- DragQueryFile(hDrop, i, szFilename, SIZEOF(szFilename));
- Utils::AddToFileList(&ppFiles, &totalCount, szFilename);
- }
- if (!not_sending) {
- CallService(MS_FILE_SENDSPECIFICFILES, (WPARAM)dat->hContact, (LPARAM)ppFiles);
- } else {
- if (ServiceExists(MS_HTTPSERVER_ADDFILENAME)) {
- char *szHTTPText;
- int i;
-
- for (i = 0;i < totalCount;i++) {
- char* szFileName = ppFiles[i];
- char *szTemp = (char*)CallService(MS_HTTPSERVER_ADDFILENAME, (WPARAM)szFileName, 0);
- }
- szHTTPText = "DEBUG";
- SendDlgItemMessageA(hwndDlg, IDC_MESSAGE, EM_REPLACESEL, TRUE, (LPARAM)szHTTPText);
- SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
+ if (!not_sending) {
+ CallService(MS_FILE_SENDSPECIFICFILEST, (WPARAM)dat->hContact, (LPARAM)ppFiles);
+ } else {
+ if (ServiceExists(MS_HTTPSERVER_ADDFILENAME)) {
+ for (int i = 0; i < totalCount; i++) {
+ char* szFileName = mir_t2a( ppFiles[i] );
+ char *szTemp = (char*)CallService(MS_HTTPSERVER_ADDFILENAME, (WPARAM)szFileName, 0);
+ mir_free( szFileName );
}
+ char *szHTTPText = "DEBUG";
+ SendDlgItemMessageA(hwndDlg, IDC_MESSAGE, EM_REPLACESEL, TRUE, (LPARAM)szHTTPText);
+ SetFocus(GetDlgItem(hwndDlg, IDC_MESSAGE));
}
- for (i = 0;ppFiles[i];i++)
- mir_free(ppFiles[i]);
- mir_free(ppFiles);
}
+ for (i = 0;ppFiles[i];i++)
+ mir_free(ppFiles[i]);
+ mir_free(ppFiles);
}
}
return 0;
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp
index ff8aefa28a..9bddecfa1b 100644
--- a/plugins/TabSRMM/src/srmm.cpp
+++ b/plugins/TabSRMM/src/srmm.cpp
@@ -87,16 +87,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
{
- CMimAPI::m_MimVersion = mirandaVersion;
-
- if(WinVerMajor() < 5) {
- MessageBox(0, _T("This version of tabSRMM requires Windows 2000 or later."), _T("tabSRMM"), MB_OK | MB_ICONERROR);
- return(0);
- }
- if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 8, 6, 0)) {
- MessageBox(0, _T("This version of tabSRMM requires Miranda 0.8.5 or later. The plugin cannot be loaded."), _T("tabSRMM"), MB_OK | MB_ICONERROR);
- return(0);
- }
return &pluginInfo;
}
@@ -109,6 +99,11 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
extern "C" int __declspec(dllexport) Load(PLUGINLINK * link)
{
+ if (WinVerMajor() < 5) {
+ MessageBox(0, _T("This version of tabSRMM requires Windows 2000 or later."), _T("tabSRMM"), MB_OK | MB_ICONERROR);
+ return 1;
+ }
+
pluginLink = link;
mir_getMMI(&mmi);