summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/BossKeyPlus/res/BossKey.rc2
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp13
2 files changed, 5 insertions, 10 deletions
diff --git a/plugins/BossKeyPlus/res/BossKey.rc b/plugins/BossKeyPlus/res/BossKey.rc
index 0e69fd1380..3f40658480 100644
--- a/plugins/BossKeyPlus/res/BossKey.rc
+++ b/plugins/BossKeyPlus/res/BossKey.rc
@@ -55,7 +55,7 @@ STYLE DS_ABSALIGN | DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS
EXSTYLE WS_EX_TOPMOST
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "",IDC_HEADERBAR,"MHeaderbarCtrl",0x0,0,0,188,25
+ CONTROL "Miranda NG is locked.\nEnter password to unlock it.",IDC_HEADERBAR,"MHeaderbarCtrl",0x0,0,0,188,25
LTEXT "Password:",-1,6,35,34,8
EDITTEXT IDC_EDIT1,48,33,113,13,ES_PASSWORD | ES_AUTOHSCROLL
CONTROL "",-1,"Static",SS_ETCHEDHORZ,0,52,190,1
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index ffe9b3709f..9d29063eee 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -77,6 +77,7 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
{
static DWORD dwOldIcon = 0;
HICON hIcon = 0;
+ UINT uid;
switch (uMsg){
case WM_INITDIALOG:
@@ -94,7 +95,6 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
SetWindowPos(hDlg, 0, 0, 0, rect.right, rect.bottom + GetSystemMetrics(SM_CYCAPTION), SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER);
}
SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_SETICON, 0, (LPARAM)hIcon);
- SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("Miranda NG is locked.\nEnter password to unlock it."));
TranslateDialogDefault(hDlg);
oldLangID = 0;
@@ -115,20 +115,16 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
return (INT_PTR)GetSysColorBrush(COLOR_HIGHLIGHT);
case WM_COMMAND:
- {
- UINT uid = LOWORD(wParam);
+ uid = LOWORD(wParam);
if (uid == IDOK){
char password[MAXPASSLEN + 1] = { 0 };
int passlen = GetDlgItemTextA(hDlg, IDC_EDIT1, password, SIZEOF(password));
-
- if (passlen == 0)
- {
+ if (passlen == 0) {
SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("Miranda NG is locked.\nEnter password to unlock it."));
SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_NCPAINT, 0, 0);
break;
}
- else if (mir_strcmp(password, g_password))
- {
+ else if (mir_strcmp(password, g_password)) {
SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("Password is not correct!\nPlease, enter correct password."));
SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_NCPAINT, 0, 0);
SetDlgItemText(hDlg, IDC_EDIT1, _T(""));
@@ -138,7 +134,6 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
}
else if (uid == IDCANCEL)
EndDialog(hDlg, IDCANCEL);
- }
case WM_TIMER:
LanguageChanged(hDlg);