From 7e93d98888a3fdb19fdfdff2167d8679e5116fe5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 28 Mar 2019 12:32:45 +0300 Subject: unused translations removed --- plugins/MsgPopup/src/main.cpp | 11 ++------- plugins/NotesAndReminders/res/resource.rc | 4 ++-- plugins/Popup/src/opt_skins.cpp | 13 ----------- plugins/Popup/src/popup_thread.cpp | 7 ------ plugins/Popup/src/popup_wnd2.cpp | 37 ++++++++----------------------- plugins/UserInfoEx/src/svc_constants.cpp | 4 ++-- protocols/MSN/src/msn_ieembed.cpp | 6 +---- 7 files changed, 16 insertions(+), 66 deletions(-) diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp index a9df9d1142..c1b31f4ae7 100644 --- a/plugins/MsgPopup/src/main.cpp +++ b/plugins/MsgPopup/src/main.cpp @@ -138,20 +138,13 @@ void HookOnImport(HMODULE hModule, char *lpszImpModName, PVOID lpOrigFunc, PVOID g_mod++; if (!VirtualProtect((LPVOID)ppfn, sizeof(void*), PAGE_EXECUTE_READWRITE, &oldProtect)) { - if (!g_HookError) { - wchar_t buf[200]; - + if (!g_HookError) g_HookError = TRUE; - mir_snwprintf(buf, TranslateT("VirtualProtect failed. Code %d\nTry to call the author"), GetLastError()); - prevMessageBox(nullptr, buf, TranslateT("Error"), MB_OK); - } } *(PVOID*)ppfn = lpNewFunc; if (*(PVOID*)ppfn != lpNewFunc) { - if (!g_HookError2) { + if (!g_HookError2) g_HookError2 = TRUE; - prevMessageBox(nullptr, TranslateT("Hmm. Something goes wrong. I can't write into the memory.\nAnd as you can see, there are no any exception raised...\nTry to call the author"), TranslateT("Error"), MB_OK); - } } } } diff --git a/plugins/NotesAndReminders/res/resource.rc b/plugins/NotesAndReminders/res/resource.rc index 887cb04e72..05f7ce409e 100644 --- a/plugins/NotesAndReminders/res/resource.rc +++ b/plugins/NotesAndReminders/res/resource.rc @@ -113,7 +113,7 @@ BEGIN DEFPUSHBUTTON "&Add Reminder",IDC_ADDREMINDER,158,6,76,14 PUSHBUTTON "&Close",IDCANCEL,158,23,76,14 PUSHBUTTON "&View Reminders",IDC_VIEWREMINDERS,158,40,76,14 - LTEXT "reftime",IDC_REFTIME,0,191,22,8,NOT WS_VISIBLE | NOT WS_GROUP + LTEXT "",IDC_REFTIME,0,191,22,8,NOT WS_VISIBLE | NOT WS_GROUP END IDD_NOTIFYREMINDER DIALOGEX 0, 0, 240, 146 @@ -134,7 +134,7 @@ BEGIN DEFPUSHBUTTON "&Remind Again",IDC_REMINDAGAIN,161,92,75,14 PUSHBUTTON "&Create Note",IDC_NONE,161,111,75,14 PUSHBUTTON "&Dismiss",IDC_DISMISS,161,129,75,14 - LTEXT "reftime",IDC_REFTIME,0,137,22,8,NOT WS_VISIBLE | NOT WS_GROUP + LTEXT "",IDC_REFTIME,0,137,22,8,NOT WS_VISIBLE | NOT WS_GROUP END IDD_LISTREMINDERS DIALOGEX 0, 0, 258, 244 diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 810e1f285c..458cf19f6a 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -30,7 +30,6 @@ INT_PTR CALLBACK BoxPreviewWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM void RegisterOptPrevBox() { - DWORD err; WNDCLASSEX wcl; wcl.cbSize = sizeof(wcl); wcl.lpfnWndProc = (WNDPROC)BoxPreviewWndProc; @@ -45,12 +44,6 @@ void RegisterOptPrevBox() wcl.lpszClassName = BOXPREVIEW_WNDCLASS; wcl.hIconSm = Skin_LoadIcon(SKINICON_OTHER_POPUP); g_wndClass.cPopupPreviewBoxWndclass = RegisterClassEx(&wcl); - err = GetLastError(); - if (!g_wndClass.cPopupPreviewBoxWndclass) { - wchar_t msg[1024]; - mir_snwprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); - MSGERROR(msg); - } // register custom class for dialog box with drop-shadow attribute // "#32770" stays for class name of default system dialog box @@ -59,12 +52,6 @@ void RegisterOptPrevBox() wcl.lpszClassName = L"PopupPlusDlgBox"; wcl.style |= CS_DROPSHADOW; g_wndClass.cPopupPlusDlgBox = RegisterClassEx(&wcl); - err = GetLastError(); - if (!g_wndClass.cPopupPlusDlgBox) { - wchar_t msg[1024]; - mir_snwprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); - MSGERROR(msg); - } } static void updatePreviewImage(HWND hwndBox) diff --git a/plugins/Popup/src/popup_thread.cpp b/plugins/Popup/src/popup_thread.cpp index 4a3d6a6f47..183014a76f 100644 --- a/plugins/Popup/src/popup_thread.cpp +++ b/plugins/Popup/src/popup_thread.cpp @@ -215,7 +215,6 @@ static unsigned __stdcall PopupThread(void *) Thread_SetName("Popup: PopupThread"); // Create manager window - DWORD err; WNDCLASSEX wcl; wcl.cbSize = sizeof(wcl); wcl.lpfnWndProc = PopupThreadManagerWndProc; @@ -230,12 +229,6 @@ static unsigned __stdcall PopupThread(void *) wcl.lpszClassName = L"PopupThreadManagerWnd"; wcl.hIconSm = Skin_LoadIcon(SKINICON_OTHER_POPUP); g_wndClass.cPopupThreadManagerWnd = RegisterClassExW(&wcl); - err = GetLastError(); - if (!g_wndClass.cPopupThreadManagerWnd) { - wchar_t msg[1024]; - mir_snwprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); - MSGERROR(msg); - } gHwndManager = CreateWindow(L"PopupThreadManagerWnd", nullptr, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, nullptr, g_plugin.getInst(), nullptr); SetWindowPos(gHwndManager, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_DEFERERASE | SWP_NOSENDCHANGING | SWP_HIDEWINDOW); diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 6f255e4c9b..1f7fa7b44c 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -48,7 +48,7 @@ bool LoadPopupWnd2() { bool res = true; - WNDCLASSEX wcl = { 0 }; + WNDCLASSEX wcl = {}; wcl.cbSize = sizeof(wcl); wcl.lpfnWndProc = PopupWnd2::WindowProc; wcl.hInstance = g_plugin.getInst(); @@ -57,31 +57,19 @@ bool LoadPopupWnd2() wcl.lpszClassName = POPUP_WNDCLASS; wcl.hIconSm = Skin_LoadIcon(SKINICON_OTHER_POPUP); g_wndClass.cPopupWnd2 = RegisterClassEx(&wcl); - DWORD err = GetLastError(); - if (!g_wndClass.cPopupWnd2) { + if (!g_wndClass.cPopupWnd2) res = false; - wchar_t msg[1024]; - mir_snwprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); - MessageBox(nullptr, msg, MODULNAME_LONG, MB_ICONSTOP | MB_OK); - } - WNDCLASSEX wclw = { 0 }; + WNDCLASSEX wclw = {}; wclw.cbSize = sizeof(wclw); - if (!GetClassInfoEx(nullptr, L"EDIT", &wclw)) - MSGERROR(TranslateT("Failed to GetClassInfoExW from EDIT class.")); + GetClassInfoEx(nullptr, L"EDIT", &wclw); + wclw.hInstance = g_plugin.getInst(); wclw.lpszClassName = L"PopupEditBox"; wclw.style |= CS_DROPSHADOW; g_wndClass.cPopupEditBox = RegisterClassEx(&wclw); - err = GetLastError(); - if (!g_wndClass.cPopupEditBox) { - wchar_t msg[2048]; - mir_snwprintf(msg, TranslateT("Failed to register custom edit box window class.\r\n\r\ncbSize: %i\r\nstyle: %p\r\nlpfnWndProc: %i\r\ncbClsExtra: %i\r\ncbWndExtra: %i\r\nhInstance: %i\r\nhIcon: %i\r\nhCursor: %i\r\nhbrBackground: %i\r\nlpszMenuName: %s\r\nlpszClassName: %s\r\nhIconSm: %i\r\n"), - wclw.cbSize, wclw.style, wclw.lpfnWndProc, wclw.cbClsExtra, wclw.cbWndExtra, wclw.hInstance, wclw.hIcon, wclw.hCursor, - wclw.hbrBackground, wclw.lpszMenuName, wclw.lpszClassName, wclw.hIconSm); - - MSGERROR(msg); - } + if (!g_wndClass.cPopupEditBox) + res = false; memset(&wcl, 0, sizeof(wcl)); wcl.cbSize = sizeof(wcl); @@ -97,13 +85,8 @@ bool LoadPopupWnd2() wcl.lpszClassName = L"PopupMenuHostWnd"; wcl.hIconSm = Skin_LoadIcon(SKINICON_OTHER_POPUP); g_wndClass.cPopupMenuHostWnd = RegisterClassEx(&wcl); - err = GetLastError(); - if (!g_wndClass.cPopupMenuHostWnd) { + if (!g_wndClass.cPopupMenuHostWnd) res = false; - wchar_t msg[1024]; - mir_snwprintf(msg, TranslateT("Failed to register %s class."), wcl.lpszClassName); - MSGERROR(msg); - } ghwndMenuHost = CreateWindow(L"PopupMenuHostWnd", nullptr, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, nullptr, g_plugin.getInst(), nullptr); SetWindowPos(ghwndMenuHost, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_DEFERERASE | SWP_NOSENDCHANGING | SWP_HIDEWINDOW); @@ -113,9 +96,7 @@ bool LoadPopupWnd2() iccex.dwSize = sizeof(INITCOMMONCONTROLSEX); InitCommonControlsEx(&iccex); - res = res && ghwndMenuHost; - - return res; + return res && ghwndMenuHost; } void UnloadPopupWnd2() diff --git a/plugins/UserInfoEx/src/svc_constants.cpp b/plugins/UserInfoEx/src/svc_constants.cpp index 2ab6f5fa40..f91faadd8e 100644 --- a/plugins/UserInfoEx/src/svc_constants.cpp +++ b/plugins/UserInfoEx/src/svc_constants.cpp @@ -215,8 +215,8 @@ static IDSTRLIST TmplPast[] = { {302, LPGEN("College"), nullptr}, {303, LPGEN("University"), nullptr}, {304, LPGEN("Military"), nullptr}, - {305, LPGEN("TmplPast Work Place"), nullptr}, - {306, LPGEN("TmplPast Organization"), nullptr}, + {305, LPGEN("Past Work Place"), nullptr}, + {306, LPGEN("Past Organization"), nullptr}, {399, LPGEN("Other"), nullptr} }; diff --git a/protocols/MSN/src/msn_ieembed.cpp b/protocols/MSN/src/msn_ieembed.cpp index 8e2c3f1239..4d6b9aad3b 100644 --- a/protocols/MSN/src/msn_ieembed.cpp +++ b/protocols/MSN/src/msn_ieembed.cpp @@ -190,13 +190,10 @@ IEEmbed::IEEmbed(HWND _parent) pOleObject->SetClientSite(this); pOleObject->DoVerb(OLEIVERB_INPLACEACTIVATE, &msg, this, 0, this->parent, &rcClient); } - else MessageBox(nullptr, TranslateT("IID_IOleObject failed."), TranslateT("RESULT"), MB_OK); CComPtr pOleInPlace; if (SUCCEEDED(pWebBrowser.QueryInterface(&pOleInPlace))) pOleInPlace->GetWindow(&hwnd); - else - MessageBox(nullptr, TranslateT("IID_IOleInPlaceObject failed."), TranslateT("RESULT"), MB_OK); //setBorder(); CComPtr pCPContainer; @@ -208,8 +205,7 @@ IEEmbed::IEEmbed(HWND _parent) // Step 3: Advise the connection point that you // want to sink its events. sink = new IEEmbedSink(this); - if (FAILED(m_pConnectionPoint->Advise(sink, &m_dwCookie))) - MessageBox(nullptr, TranslateT("Failed to Advise"), TranslateT("C++ Event Sink"), MB_OK); + m_pConnectionPoint->Advise(sink, &m_dwCookie); } } setMainWndProc((WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)IEEmbedWindowProcedure)); -- cgit v1.2.3