diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-12-16 23:23:29 +0200 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-12-16 23:23:29 +0200 |
commit | 4d6851c77b1d02968e83e60b1dfbed28cd729408 (patch) | |
tree | 6b98f2b123b23b4418c3248628890fd94262db99 /main.cpp | |
parent | bfc94324aca08f9ba3e89e678f17a01088f550c4 (diff) | |
parent | 8142cedd8b857edd99a92f328e8b692b32bfeba6 (diff) |
Merge branch 'new_gpg' into new_gpg_autoexchange
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -39,6 +39,7 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM { case WM_INITDIALOG: { + SetWindowPos(hwndDlg, 0, firstrun_rect.left, firstrun_rect.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW); TranslateDialogDefault(hwndDlg); col.pszText = _T("Key ID"); col.mask = LVCF_TEXT | LVCF_WIDTH; @@ -490,6 +491,11 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM DestroyWindow(hwndDlg); break; case WM_DESTROY: + { + GetWindowRect(hwndDlg, &firstrun_rect); + DBWriteContactSettingDword(NULL, szGPGModuleName, "FirstrunWindowX", firstrun_rect.left); + DBWriteContactSettingDword(NULL, szGPGModuleName, "FirstrunWindowY", firstrun_rect.top); + } hwndFirstRun = NULL; break; @@ -959,6 +965,7 @@ static BOOL CALLBACK DlgProcNewKeyDialog(HWND hwndDlg, UINT msg, WPARAM wParam, { case WM_INITDIALOG: { + SetWindowPos(hwndDlg, 0, new_key_rect.left, new_key_rect.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW); TranslateDialogDefault(hwndDlg); TCHAR *tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T("")); SetDlgItemText(hwndDlg, IDC_MESSAGE, (_tcslen(tmp) > 0)?_T("There is existing key for contact, would you like to replace with new key ?"):_T("New public key was received, do you want to import it?")); @@ -1014,6 +1021,11 @@ static BOOL CALLBACK DlgProcNewKeyDialog(HWND hwndDlg, UINT msg, WPARAM wParam, DestroyWindow(hwndDlg); break; case WM_DESTROY: + { + GetWindowRect(hwndDlg, &new_key_rect); + DBWriteContactSettingDword(NULL, szGPGModuleName, "NewKeyWindowX", new_key_rect.left); + DBWriteContactSettingDword(NULL, szGPGModuleName, "NewKeyWindowY", new_key_rect.top); + } hwndNewKey = NULL; break; @@ -1026,6 +1038,7 @@ static BOOL CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wParam, { case WM_INITDIALOG: { + SetWindowPos(hwndDlg, 0, key_gen_rect.left, key_gen_rect.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW); TranslateDialogDefault(hwndDlg); ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEY_TYPE), _T("RSA"), 0); ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEY_TYPE), _T("DSA"), 1); @@ -1309,6 +1322,11 @@ static BOOL CALLBACK DlgProcKeyGenDialog(HWND hwndDlg, UINT msg, WPARAM wParam, DestroyWindow(hwndDlg); break; case WM_DESTROY: + { + GetWindowRect(hwndDlg, &key_gen_rect); + DBWriteContactSettingDword(NULL, szGPGModuleName, "KeyGenWindowX", key_gen_rect.left); + DBWriteContactSettingDword(NULL, szGPGModuleName, "KeyGenWindowY", key_gen_rect.top); + } hwndKeyGen = NULL; break; @@ -1330,6 +1348,7 @@ static BOOL CALLBACK DlgProcLoadExistingKey(HWND hwndDlg,UINT msg,WPARAM wParam, { case WM_INITDIALOG: { + SetWindowPos(hwndDlg, 0, load_existing_key_rect.left, load_existing_key_rect.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW); TranslateDialogDefault(hwndDlg); col.pszText = _T("Key ID"); col.mask = LVCF_TEXT | LVCF_WIDTH; @@ -1516,6 +1535,11 @@ static BOOL CALLBACK DlgProcLoadExistingKey(HWND hwndDlg,UINT msg,WPARAM wParam, DestroyWindow(hwndDlg); break; case WM_DESTROY: + { + GetWindowRect(hwndDlg, &load_existing_key_rect); + DBWriteContactSettingDword(NULL, szGPGModuleName, "LoadExistingKeyWindowX", load_existing_key_rect.left); + DBWriteContactSettingDword(NULL, szGPGModuleName, "LoadExistingKeyWindowY", load_existing_key_rect.top); + } hwndSelectExistingKey = NULL; break; @@ -1533,6 +1557,7 @@ static BOOL CALLBACK DlgProcImportKeyDialog(HWND hwndDlg, UINT msg, WPARAM wPara { case WM_INITDIALOG: { + SetWindowPos(hwndDlg, 0 , import_key_rect.left, import_key_rect.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW); TranslateDialogDefault(hwndDlg); ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEYSERVER), _T("subkeys.pgp.net"), 0); ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_KEYSERVER), _T("keys.gnupg.net"), 0); @@ -1594,6 +1619,11 @@ static BOOL CALLBACK DlgProcImportKeyDialog(HWND hwndDlg, UINT msg, WPARAM wPara DestroyWindow(hwndDlg); break; case WM_DESTROY: + { + GetWindowRect(hwndDlg, &import_key_rect); + DBWriteContactSettingDword(NULL, szGPGModuleName, "ImportKeyWindowX", import_key_rect.left); + DBWriteContactSettingDword(NULL, szGPGModuleName, "ImportKeyWindowY", import_key_rect.top); + } break; } |