From f8e1220c22695d224c3ff8a600de99da342d4f1b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 23 Dec 2012 21:26:45 +0000 Subject: fix for the password saving in jabber.rc fixes: #71 git-svn-id: http://svn.miranda-ng.org/main/trunk@2822 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_thread.cpp | 11 +++++++++++ protocols/JabberG/src/resource.h | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 213de6f0a6..e948ba1572 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -86,11 +86,22 @@ static INT_PTR CALLBACK JabberPasswordDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa case WM_COMMAND: switch (LOWORD(wParam)) { + case IDC_SAVE_PERM: + EnableWindow(GetDlgItem(hwndDlg,IDC_SAVEPASSWORD),!IsDlgButtonChecked(hwndDlg, IDC_SAVE_PERM)); + break; case IDOK: param->saveOnlinePassword = IsDlgButtonChecked(hwndDlg, IDC_SAVEPASSWORD); param->pro->JSetByte(NULL, "SaveSessionPassword", param->saveOnlinePassword); GetDlgItemText(hwndDlg, IDC_PASSWORD, param->onlinePassword, SIZEOF(param->onlinePassword)); + { + BOOL savePassword = IsDlgButtonChecked(hwndDlg, IDC_SAVE_PERM); + param->pro->JSetByte(NULL, "SavePassword", savePassword); + if (savePassword) { + param->pro->JSetStringCrypt(NULL,"LoginPassword",param->onlinePassword); + param->saveOnlinePassword = TRUE; + } + } // Fall through case IDCANCEL: param->dlgResult = LOWORD(wParam); diff --git a/protocols/JabberG/src/resource.h b/protocols/JabberG/src/resource.h index 5cbc583aa5..fa3b6a0408 100644 --- a/protocols/JabberG/src/resource.h +++ b/protocols/JabberG/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. -// Used by jabber.rc +// Used by C:\Users\xx\Documents\Visual Studio 2010\Projects\miranda-ng\protocols\JabberG\res\jabber.rc // #define IDD_OPT_JABBER 101 #define IDI_JABBER 102 @@ -319,6 +319,7 @@ #define IDC_HEADERBAR 1320 #define IDC_USEDOMAINLOGIN 1323 #define IDC_TXT_ALTNICK 1323 +#define IDC_SAVE_PERM 1324 #define IDI_BOOKMARKS 3000 #define IDD_BOOKMARKS 3001 #define IDC_BM_LIST 3002 @@ -352,7 +353,7 @@ #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 235 #define _APS_NEXT_COMMAND_VALUE 40017 -#define _APS_NEXT_CONTROL_VALUE 1324 +#define _APS_NEXT_CONTROL_VALUE 1325 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif -- cgit v1.2.3