From 0ea22b1a1e3902f7439df79e6edb36af96050ab4 Mon Sep 17 00:00:00 2001 From: donho Date: Mon, 22 Oct 2007 23:50:59 +0000 Subject: [PATCH] [ADD] Add a edit control in Preference dlg for the session file extension. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@59 f5eea248-9336-0410-98b8-ebc06183d4e3 --- .../src/WinControls/Preference/preference.rc | 6 ++++-- .../WinControls/Preference/preferenceDlg.cpp | 18 +++++++++--------- .../src/WinControls/Preference/preference_rc.h | 6 ++++-- PowerEditor/visual.net/notepadPlus.vcproj | 4 ++++ 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/PowerEditor/src/WinControls/Preference/preference.rc b/PowerEditor/src/WinControls/Preference/preference.rc index 173e3aa3f..20f683cdb 100644 --- a/PowerEditor/src/WinControls/Preference/preference.rc +++ b/PowerEditor/src/WinControls/Preference/preference.rc @@ -106,9 +106,11 @@ BEGIN CONTROL "Update silently",IDC_CHECK_UPDATESILENTLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,24,78,98,10 //GROUPBOX "Backup Option",IDC_BACKUP_GB_STATIC,11,98,120,46,BS_CENTER - CONTROL "Enable",IDC_CHECK__CLICKABLELINK_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,65,98,10 + CONTROL "Enable",IDC_CHECK_CLICKABLELINK_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,65,98,10 GROUPBOX "Clickable link setting",IDC_CLICKABLELINK_STATIC,144,54,150,39,BS_CENTER - CONTROL "Don't draw underline",IDC_CHECK__CLICKABLELINK_NOUNDERLINE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,78,119,10 + CONTROL "Don't draw underline",IDC_CHECK_CLICKABLELINK_NOUNDERLINE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,157,78,119,10 + EDITTEXT IDC_EDIT_SESSIONFILEEXT,231,113,67,14,ES_AUTOHSCROLL + LTEXT "Session file ext:",IDC_SESSIONFILEEXT_STATIC,233,101,66,8 END IDD_PREFERENCE_NEWDOCSETTING_BOX DIALOGEX 0, 0, 305, 147 diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index 5a8a77a99..0cbae7dce 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -489,9 +489,9 @@ BOOL CALLBACK SettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPara dontUnderlineState = TRUE; } - ::SendDlgItemMessage(_hSelf, IDC_CHECK__CLICKABLELINK_ENABLE, BM_SETCHECK, linkEnable, 0); - ::SendDlgItemMessage(_hSelf, IDC_CHECK__CLICKABLELINK_NOUNDERLINE, BM_SETCHECK, dontUnderline, 0); - ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK__CLICKABLELINK_NOUNDERLINE), dontUnderlineState); + ::SendDlgItemMessage(_hSelf, IDC_CHECK_CLICKABLELINK_ENABLE, BM_SETCHECK, linkEnable, 0); + ::SendDlgItemMessage(_hSelf, IDC_CHECK_CLICKABLELINK_NOUNDERLINE, BM_SETCHECK, dontUnderline, 0); + ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_CLICKABLELINK_NOUNDERLINE), dontUnderlineState); ETDTProc enableDlgTheme = (ETDTProc)pNppParam->getEnableThemeDlgTexture(); if (enableDlgTheme) @@ -529,20 +529,20 @@ BOOL CALLBACK SettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPara return TRUE; - case IDC_CHECK__CLICKABLELINK_ENABLE: + case IDC_CHECK_CLICKABLELINK_ENABLE: { - bool isChecked = isCheckedOrNot(IDC_CHECK__CLICKABLELINK_ENABLE); + bool isChecked = isCheckedOrNot(IDC_CHECK_CLICKABLELINK_ENABLE); if (!isChecked) - ::SendDlgItemMessage(_hSelf, IDC_CHECK__CLICKABLELINK_NOUNDERLINE, BM_SETCHECK, BST_UNCHECKED, 0); - ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK__CLICKABLELINK_NOUNDERLINE), isChecked); + ::SendDlgItemMessage(_hSelf, IDC_CHECK_CLICKABLELINK_NOUNDERLINE, BM_SETCHECK, BST_UNCHECKED, 0); + ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_CLICKABLELINK_NOUNDERLINE), isChecked); nppGUI._styleURL = isChecked?2:0; } return TRUE; - case IDC_CHECK__CLICKABLELINK_NOUNDERLINE: + case IDC_CHECK_CLICKABLELINK_NOUNDERLINE: { - bool isChecked = isCheckedOrNot(IDC_CHECK__CLICKABLELINK_NOUNDERLINE); + bool isChecked = isCheckedOrNot(IDC_CHECK_CLICKABLELINK_NOUNDERLINE); nppGUI._styleURL = isChecked?1:2; } return TRUE; diff --git a/PowerEditor/src/WinControls/Preference/preference_rc.h b/PowerEditor/src/WinControls/Preference/preference_rc.h index 51c6697bf..9e604f9a4 100644 --- a/PowerEditor/src/WinControls/Preference/preference_rc.h +++ b/PowerEditor/src/WinControls/Preference/preference_rc.h @@ -80,8 +80,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #define IDC_RADIO_BKSIMPLE (IDD_PREFERENCE_SETTING_BOX + 16) #define IDC_RADIO_BKVERBOSE (IDD_PREFERENCE_SETTING_BOX + 17) #define IDC_CLICKABLELINK_STATIC (IDD_PREFERENCE_SETTING_BOX + 18) - #define IDC_CHECK__CLICKABLELINK_ENABLE (IDD_PREFERENCE_SETTING_BOX + 19) - #define IDC_CHECK__CLICKABLELINK_NOUNDERLINE (IDD_PREFERENCE_SETTING_BOX + 20) + #define IDC_CHECK_CLICKABLELINK_ENABLE (IDD_PREFERENCE_SETTING_BOX + 19) + #define IDC_CHECK_CLICKABLELINK_NOUNDERLINE (IDD_PREFERENCE_SETTING_BOX + 20) + #define IDC_EDIT_SESSIONFILEEXT (IDD_PREFERENCE_SETTING_BOX + 21) + #define IDC_SESSIONFILEEXT_STATIC (IDD_PREFERENCE_SETTING_BOX + 22) #define IDD_PREFERENCE_NEWDOCSETTING_BOX 6400 //(IDD_PREFERENCE_BOX + 400) #define IDC_FORMAT_GB_STATIC (IDD_PREFERENCE_NEWDOCSETTING_BOX + 1) diff --git a/PowerEditor/visual.net/notepadPlus.vcproj b/PowerEditor/visual.net/notepadPlus.vcproj index 015febaef..f37281e50 100644 --- a/PowerEditor/visual.net/notepadPlus.vcproj +++ b/PowerEditor/visual.net/notepadPlus.vcproj @@ -576,6 +576,10 @@ RelativePath="..\src\resource.h" > + +