summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp13
2 files changed, 6 insertions, 9 deletions
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 081ea47669..84694eeae6 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -71,8 +71,6 @@ static HOTKEYDESC _hotkeydescs[] = {
{ 0, "tabsrmm_close_other", LPGEN("Close Other Tabs"), TABSRMM_HK_SECTION_GENERIC, 0, HOTKEYCODE(HOTKEYF_ALT|HOTKEYF_CONTROL, 'W'), TABSRMM_HK_CLOSE_OTHER },
};
-static SendLaterJobIterator g_jobs;
-
LRESULT ProcessHotkeysByMsgFilter(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, UINT_PTR ctrlId)
{
MSGFILTER mf;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index c9e2dc7234..b2928e20e8 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -2367,7 +2367,7 @@ LONG TSAPI GetDefaultMinimumInputHeight(const TWindowData *dat)
}
#endif
-static std::vector<TCHAR *> vTempFilenames;
+static LIST<TCHAR> vTempFilenames(5);
/**
* send a pasted bitmap by file transfer.
@@ -2463,7 +2463,7 @@ void TSAPI SendHBitmapAsFile(const TWindowData *dat, HBITMAP hbmp)
Utils::AddToFileList(&ppFiles, &totalCount, filename);
wchar_t* _t = mir_tstrdup(filename);
- vTempFilenames.push_back(_t);
+ vTempFilenames.insert(_t);
CallService(MS_FILE_SENDSPECIFICFILEST, (WPARAM)dat->cache->getActiveContact(), (LPARAM)ppFiles);
@@ -2476,10 +2476,9 @@ void TSAPI SendHBitmapAsFile(const TWindowData *dat, HBITMAP hbmp)
*/
void TSAPI CleanTempFiles()
{
- std::vector<wchar_t *>::iterator it = vTempFilenames.begin();
-
- while(it != vTempFilenames.end()) {
- DeleteFileW(*it);
- mir_free(*it++);
+ for (int i=0; i < vTempFilenames.getCount(); i++) {
+ wchar_t* _t = vTempFilenames[i];
+ DeleteFileW(_t);
+ mir_free(_t);
}
}