From e1879c22c4608a7b0f33a5989ab0925fc9503679 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 29 Oct 2010 05:19:01 +0300 Subject: modified: main.cpp modified: new_gpg.rc modified: options.cpp modified: resource.h --- main.cpp | 4 +++- new_gpg.rc | 7 ++++--- options.cpp | 4 ++-- resource.h | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/main.cpp b/main.cpp index 501caa5..34bb175 100644 --- a/main.cpp +++ b/main.cpp @@ -25,6 +25,7 @@ HWND hwndFirstRun = NULL, hwndSetDirs = NULL, hwndNewKey = NULL, hwndKeyGen = NU int itemnum = 0; HWND hwndList_g = NULL; +BOOL CheckStateStoreDB(HWND hwndDlg, int idCtrl, const char* szSetting); static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) { @@ -224,6 +225,7 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM } delete [] name; } + bAutoExchange = CheckStateStoreDB(hwndDlg, IDC_AUTO_EXCHANGE, "bAutoExchange"); DestroyWindow(hwndDlg); break; case IDC_OTHER: @@ -480,8 +482,8 @@ static BOOL CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM SetWindowText(hwndCurKey_p, path.c_str()); } } + bAutoExchange = CheckStateStoreDB(hwndDlg, IDC_AUTO_EXCHANGE, "bAutoExchange"); DestroyWindow(hwndDlg); - //use new key break; } break; diff --git a/new_gpg.rc b/new_gpg.rc index bd4efbe..ce97ab4 100644 --- a/new_gpg.rc +++ b/new_gpg.rc @@ -63,12 +63,12 @@ BEGIN PUSHBUTTON "Import key from keyserver",IDC_IMPORT,231,152,97,14,WS_DISABLED END -IDD_FIRST_RUN DIALOGEX 0, 0, 291, 196 +IDD_FIRST_RUN DIALOGEX 0, 0, 291, 205 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Set own key" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "خت",ID_OK,12,175,50,14,WS_DISABLED + DEFPUSHBUTTON "خت",ID_OK,12,184,50,14,WS_DISABLED CONTROL "",IDC_KEY_LIST,"SysListView32",LVS_REPORT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,23,277,105 PUSHBUTTON "Generate key",IDC_GENERATE_KEY,11,131,58,14 LTEXT "Select key for use",IDC_STATIC,16,12,186,8 @@ -77,6 +77,7 @@ BEGIN PUSHBUTTON "Load other",IDC_OTHER,73,131,56,14 PUSHBUTTON "Delete key",IDC_DELETE_KEY,132,131,56,14 PUSHBUTTON "Generatr and use random key",IDC_GENERATE_RANDOM,99,163,118,14 + CONTROL "Turn on key autoexchange",IDC_AUTO_EXCHANGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,101,180,113,10 END IDD_BIN_PATH DIALOGEX 0, 0, 354, 89 @@ -188,7 +189,7 @@ BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 284 TOPMARGIN, 7 - BOTTOMMARGIN, 189 + BOTTOMMARGIN, 198 END IDD_BIN_PATH, DIALOG diff --git a/options.cpp b/options.cpp index 22edd1c..246be86 100644 --- a/options.cpp +++ b/options.cpp @@ -22,14 +22,14 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA static BOOL CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); static BOOL CALLBACK DlgProcGpgMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -static BOOL CheckStateLoadDB(HWND hwndDlg, int idCtrl, const char* szSetting, BYTE bDef) +BOOL CheckStateLoadDB(HWND hwndDlg, int idCtrl, const char* szSetting, BYTE bDef) { BOOL state = DBGetContactSettingByte(NULL, szGPGModuleName, szSetting, bDef); CheckDlgButton(hwndDlg, idCtrl, state); return state; } -static BOOL CheckStateStoreDB(HWND hwndDlg, int idCtrl, const char* szSetting) +BOOL CheckStateStoreDB(HWND hwndDlg, int idCtrl, const char* szSetting) { BOOL state = IsDlgButtonChecked(hwndDlg, idCtrl); DBWriteContactSettingByte(NULL, szGPGModuleName, szSetting, (BYTE)state); diff --git a/resource.h b/resource.h index 9bdc8d7..f292c2b 100644 --- a/resource.h +++ b/resource.h @@ -70,8 +70,8 @@ #define IDC_FILE_TRANSFERS 1061 #define IDC_REMOVE_FILTERS 1062 #define IDC_GENERATE_RANDOM 1063 -#define IDC_CHECK1 1064 #define IDC_AUTO_EXCHANGE 1064 +#define IDC_AUT_EXCHANGE 1065 // Next default values for new objects // @@ -79,7 +79,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 114 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1065 +#define _APS_NEXT_CONTROL_VALUE 1066 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif -- cgit v1.2.3