diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-15 13:05:26 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-15 13:05:26 +0000 |
commit | a0ae9fc453e192325e153ace7c95bf6cab05f215 (patch) | |
tree | 5bcfa45eeba748c239f307057f448fc393772a28 | |
parent | 5b09157e8050f3f49de5701c0b892f6552105360 (diff) |
added 'Set password' button on the database options' page
git-svn-id: http://svn.miranda-ng.org/main/trunk@8127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/Db3x_mmap/res/db3x_mmap.rc | 16 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/ui.cpp | 8 |
2 files changed, 15 insertions, 9 deletions
diff --git a/plugins/Db3x_mmap/res/db3x_mmap.rc b/plugins/Db3x_mmap/res/db3x_mmap.rc index 15f1388232..e17834ff94 100644 --- a/plugins/Db3x_mmap/res/db3x_mmap.rc +++ b/plugins/Db3x_mmap/res/db3x_mmap.rc @@ -43,7 +43,8 @@ EXSTYLE WS_EX_TOPMOST | WS_EX_TOOLWINDOW CAPTION "New password"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "Please enter your new password",IDC_HEADERBAR,"MHeaderbarCtrl",0x0,0,0,190,26
+ CONTROL "Please enter your new password",IDC_HEADERBAR,
+ "MHeaderbarCtrl",0x0,0,0,190,26
CTEXT "EN",IDC_LANG,158,34,13,13,SS_CENTERIMAGE | NOT WS_GROUP
EDITTEXT IDC_USERPASS1,21,34,128,14,ES_PASSWORD | ES_AUTOHSCROLL
EDITTEXT IDC_USERPASS2,21,54,128,14,ES_PASSWORD | ES_AUTOHSCROLL
@@ -71,16 +72,17 @@ BEGIN LTEXT "Old password",IDC_STATIC,11,31,140,10,0,WS_EX_TRANSPARENT
END
-IDD_OPTIONS DIALOGEX 0, 0, 318, 188
+IDD_OPTIONS DIALOGEX 0, 0, 318, 176
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- GROUPBOX "Database encryption mode",IDC_STATIC,6,22,305,160
- CONTROL "Standard",IDC_STANDARD,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,54,292,12
- CONTROL "Total",IDC_TOTAL,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,111,292,12
- LTEXT "Only critical data are encrypted (passwords, security tokens, etc). All another settings and history remains unencrypted. Fast and effective, suitable for the most cases",IDC_STATIC,22,70,284,37
- LTEXT "All string settings and all events in histories are encrypted. It also makes Miranda much slower and creates a risk of losing everything you've stored in a profile in case of losing password. Recommended only for paranoidal users",IDC_STATIC,22,126,284,37
+ GROUPBOX "Database encryption mode",IDC_STATIC,6,22,305,125
+ CONTROL "Standard",IDC_STANDARD,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,12,38,292,12
+ CONTROL "Total",IDC_TOTAL,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,12,95,292,12
+ LTEXT "Only critical data are encrypted (passwords, security tokens, etc). All another settings and history remains unencrypted. Fast and effective, suitable for the most cases",IDC_STATIC,22,54,284,37
+ LTEXT "All string settings and all events in histories are encrypted. It also makes Miranda much slower and creates a risk of losing everything you've stored in a profile in case of losing password. Recommended only for paranoidal users",IDC_STATIC,22,110,284,33
+ PUSHBUTTON "Set password",IDC_USERPASS,200,153,111,17
END
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp index 73ec799079..a8fedea835 100644 --- a/plugins/Db3x_mmap/src/ui.cpp +++ b/plugins/Db3x_mmap/src/ui.cpp @@ -260,8 +260,12 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP return TRUE;
case WM_COMMAND:
- if (HIWORD(wParam) == BN_CLICKED && (HWND)lParam == GetFocus())
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ if (HIWORD(wParam) == BN_CLICKED && (HWND)lParam == GetFocus()) {
+ if (LOWORD(wParam) == IDC_USERPASS)
+ CallService(MS_DB_CHANGEPASSWORD, 0, 0);
+ else
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ }
break;
case WM_NOTIFY:
|