diff options
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 77 | ||||
-rw-r--r-- | plugins/TabSRMM/src/srmm.cpp | 15 |
3 files changed, 26 insertions, 67 deletions
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);
|