summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/FTPFileYM/src/common.h1
-rw-r--r--plugins/FTPFileYM/src/dialog.cpp2
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp63
-rw-r--r--plugins/FTPFileYM/src/manager.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/CSendFTPFile.cpp3
5 files changed, 11 insertions, 60 deletions
diff --git a/plugins/FTPFileYM/src/common.h b/plugins/FTPFileYM/src/common.h
index d7a60e7566..80dfddeb1c 100644
--- a/plugins/FTPFileYM/src/common.h
+++ b/plugins/FTPFileYM/src/common.h
@@ -92,7 +92,6 @@ using namespace std;
#define DEBUG_CLIENTBLOCK
#endif
-#define MS_FTPFILE_SHAREFILE "FTPFile/ShareFiles"
#define MS_FTPFILE_CONTACTMENU "FTPFile/ContactMenu"
#define MS_FTPFILE_MAINMENU "FTPFile/MainMenu"
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp
index 376dd204b1..8c8236b09b 100644
--- a/plugins/FTPFileYM/src/dialog.cpp
+++ b/plugins/FTPFileYM/src/dialog.cpp
@@ -287,7 +287,7 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
if (hMenu)
{
HMENU hPopupMenu = GetSubMenu(hMenu, 0);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hPopupMenu, 0);
+ TranslateMenu(hPopupMenu);
CheckMenuItem(hPopupMenu, IDM_CLOSEDLG, MF_BYCOMMAND | tab->bOptCloseDlg ? MF_CHECKED : 0);
CheckMenuItem(hPopupMenu, IDM_COPYLINK, MF_BYCOMMAND | tab->bOptCopyLink ? MF_CHECKED : 0);
CheckMenuItem(hPopupMenu, IDM_AUTOSEND, MF_BYCOMMAND | tab->bOptAutosend ? MF_CHECKED : 0);
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index 1240f4aa89..7f44b271e4 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -22,7 +22,7 @@ HINSTANCE hInst;
int hLangpack;
HANDLE hModulesLoaded, hEventPreShutdown, hOptionsInit, hPrebuildContactMenu, hTabsrmmButtonPressed;
-HANDLE hServiceUpload, hServiceShowManager, hServiceContactMenu, hServiceMainMenu, hServiceShareFile;
+HANDLE hServiceUpload, hServiceShowManager, hServiceContactMenu, hServiceMainMenu;
HGENMENU hMenu, hMainMenu, hSubMenu[ServerList::FTP_COUNT], hMainSubMenu[ServerList::FTP_COUNT];
extern UploadDialog *uDlg;
@@ -133,7 +133,7 @@ void InitMenuItems()
mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
mi2.popupPosition = mi2.position = i + UploadJob::FTP_RAWFILE;
- mi2.ptszName = TranslateT("Upload file(s)");
+ mi2.ptszName = LPGENT("Upload file(s)");
Menu_AddContactMenuItem(&mi2);
mi2.pszService = MS_FTPFILE_MAINMENU;
@@ -143,7 +143,7 @@ void InitMenuItems()
mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
mi2.popupPosition = i + UploadJob::FTP_ZIPFILE;
- mi2.ptszName = TranslateT("Zip and upload file(s)");
+ mi2.ptszName = LPGENT("Zip and upload file(s)");
Menu_AddContactMenuItem(&mi2);
mi2.pszService = MS_FTPFILE_MAINMENU;
@@ -153,7 +153,7 @@ void InitMenuItems()
mi2.hParentMenu = hSubMenu[i];
mi2.pszService = MS_FTPFILE_CONTACTMENU;
mi2.popupPosition = i + UploadJob::FTP_ZIPFOLDER;
- mi2.ptszName = TranslateT("Zip and upload folder");
+ mi2.ptszName = LPGENT("Zip and upload folder");
Menu_AddContactMenuItem(&mi2);
mi2.pszService = MS_FTPFILE_MAINMENU;
@@ -181,7 +181,7 @@ void InitHotkeys()
HOTKEYDESC hk = {0};
hk.cbSize = sizeof(hk);
hk.pszDescription = LPGEN("Show FTPFile manager");
- hk.pszName = LPGEN("FTP_ShowManager");
+ hk.pszName = "FTP_ShowManager";
hk.pszSection = MODULE;
hk.pszService = MS_FTPFILE_SHOWMANAGER;
Hotkey_Register(&hk);
@@ -354,51 +354,6 @@ INT_PTR UploadService(WPARAM wParam, LPARAM lParam)
return 0;
}
-INT_PTR ShareFileService(WPARAM wParam, LPARAM lParam)
-{
- if (!wParam || !lParam)
- return 1;
-
- FTPUPLOAD ftpu = {0};
- ftpu.cbSize = sizeof(ftpu);
- ftpu.ftpNum = FNUM_DEFAULT;
- ftpu.mode = FMODE_RAWFILE;
- ftpu.hContact = (HANDLE)wParam;
-
- char *szFile = (char *)mir_alloc(1024 * sizeof(char));
- ZeroMemory(szFile, 1024);
- strcpy(szFile, (char *)lParam);
-
- char *ptr, buff[256];
- if (szFile[strlen(szFile) + 1])
- {
- ptr = szFile + strlen(szFile) + 1;
- while (ptr[0])
- {
- ftpu.pszObjects = (char **)mir_realloc(ftpu.pszObjects, (ftpu.objectCount + 1) * sizeof(char *));
- mir_snprintf(buff, MAX_PATH, "%s\\%s", szFile, ptr);
- ftpu.pszObjects[ftpu.objectCount++] = mir_strdup(buff);
- ptr += strlen(ptr) + 1;
- }
- }
- else
- {
- ftpu.pszObjects = (char **)mir_alloc(sizeof(char *));
- ftpu.pszObjects[0] = mir_strdup(szFile);
- ftpu.objectCount = 1;
- }
-
- CallService(MS_FTPFILE_UPLOAD, 0, (LPARAM)&ftpu);
-
- for (int i = 0; i < ftpu.objectCount; i++)
- FREE(ftpu.pszObjects[i]);
-
- FREE(ftpu.pszObjects);
- FREE(szFile);
-
- return 0;
-}
-
INT_PTR ShowManagerService(WPARAM wParam, LPARAM lParam)
{
manDlg = Manager::getInstance();
@@ -423,15 +378,15 @@ INT_PTR MainMenuService(WPARAM wParam, LPARAM lParam)
//------------ START & EXIT STUFF ------------//
-int ModulesLoaded(WPARAM wParam, LPARAM lParam)
+int ModulesLoaded(WPARAM, LPARAM)
{
InitIcolib();
InitMenuItems();
InitHotkeys();
InitTabsrmmButton();
- SkinAddNewSoundEx(SOUND_UPCOMPLETE, Translate("FTP File"), Translate("File upload complete"));
- SkinAddNewSoundEx(SOUND_CANCEL, Translate("FTP File"), Translate("Upload canceled"));
+ SkinAddNewSoundEx(SOUND_UPCOMPLETE, LPGEN("FTP File"), LPGEN("File upload complete"));
+ SkinAddNewSoundEx(SOUND_CANCEL, LPGEN("FTP File"), LPGEN("Upload canceled"));
curl_global_init(CURL_GLOBAL_ALL);
@@ -475,7 +430,6 @@ extern "C" int __declspec(dllexport) Load(void)
hServiceShowManager = CreateServiceFunction(MS_FTPFILE_SHOWMANAGER, ShowManagerService);
hServiceContactMenu = CreateServiceFunction(MS_FTPFILE_CONTACTMENU, ContactMenuService);
hServiceMainMenu = CreateServiceFunction(MS_FTPFILE_MAINMENU, MainMenuService);
- hServiceShareFile = CreateServiceFunction(MS_FTPFILE_SHAREFILE, ShareFileService);
opt.loadOptions();
deleteTimer.init();
@@ -496,7 +450,6 @@ extern "C" int __declspec(dllexport) Unload(void)
DestroyServiceFunction(hServiceShowManager);
DestroyServiceFunction(hServiceContactMenu);
DestroyServiceFunction(hServiceMainMenu);
- DestroyServiceFunction(hServiceShareFile);
return 0;
} \ No newline at end of file
diff --git a/plugins/FTPFileYM/src/manager.cpp b/plugins/FTPFileYM/src/manager.cpp
index 13b8a8cd82..9db3710d17 100644
--- a/plugins/FTPFileYM/src/manager.cpp
+++ b/plugins/FTPFileYM/src/manager.cpp
@@ -371,7 +371,7 @@ INT_PTR CALLBACK Manager::ManagerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
if (hMenu)
{
HMENU hPopupMenu = GetSubMenu(hMenu, 0);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hPopupMenu, 0);
+ TranslateMenu(hPopupMenu);
int command = TrackPopupMenu(hPopupMenu, TPM_LEFTALIGN | TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
switch (command)
{
diff --git a/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp b/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp
index 1105cfea5d..355ea225ad 100644
--- a/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp
+++ b/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp
@@ -71,7 +71,7 @@ void CSendFTPFile::Send() {
void CSendFTPFile::SendThread() {
mir_freeAndNil(m_URL);
- INT_PTR ret = CallService(MS_FTPFILE_SHAREFILE, (WPARAM)m_hContact, (LPARAM)m_pszFileName);
+ INT_PTR ret = FTPFileUploadA(m_hContact, FNUM_DEFAULT, FMODE_RAWFILE, &m_pszFileName,1);
if (ret != 0) {
Error(TranslateT("%s (%i):\nCould not add a share to the FTP File plugin."),TranslateTS(m_pszSendTyp),ret);
Exit(ret);
@@ -82,7 +82,6 @@ void CSendFTPFile::SendThread() {
if (m_URL && m_URL[0]!= NULL) {
m_ChatRoom ? svcSendChat(m_URL) : svcSendMsg(m_URL);
- return;
}
}