diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-01-19 20:35:37 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-01-19 20:35:37 +0000 |
commit | b32fc4b4f1604d906ff82257d948f468e35ff8a5 (patch) | |
tree | 40bd6f0c61b160bb7778e26dd7819e5180339303 /plugins/FTPFileYM | |
parent | 44fb7e9e5fb9db8ef1876c32a2a6e296c9215c3e (diff) |
-more translation fixes
-removed deprecated service
git-svn-id: http://svn.miranda-ng.org/main/trunk@7772 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FTPFileYM')
-rw-r--r-- | plugins/FTPFileYM/src/common.h | 1 | ||||
-rw-r--r-- | plugins/FTPFileYM/src/dialog.cpp | 2 | ||||
-rw-r--r-- | plugins/FTPFileYM/src/ftpfile.cpp | 63 | ||||
-rw-r--r-- | plugins/FTPFileYM/src/manager.cpp | 2 |
4 files changed, 10 insertions, 58 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)
{
|