[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
This commit is contained in:
donho 2007-10-22 23:50:59 +00:00
parent efb48516c5
commit 0ea22b1a1e
4 changed files with 21 additions and 13 deletions

View File

@ -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

View File

@ -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;

View File

@ -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)

View File

@ -576,6 +576,10 @@
RelativePath="..\src\resource.h"
>
</File>
<File
RelativePath="..\src\WinControls\Preference\resource.h"
>
</File>
<File
RelativePath="..\src\WinControls\StaticDialog\RunDlg\RunDlg.h"
>