Added Select All
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@977 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
4d6e00a745
commit
3e86ebe7ad
4 changed files with 48 additions and 38 deletions
|
@ -147,6 +147,8 @@ Version History
|
||||||
- Drag and Drop Support into the Makensisw window
|
- Drag and Drop Support into the Makensisw window
|
||||||
- Updated icon to Trace's modern NSIS icon
|
- Updated icon to Trace's modern NSIS icon
|
||||||
- Added Load Script option on File menu
|
- Added Load Script option on File menu
|
||||||
|
- Added Search Dialog (Ctrl+F) (Kickik)
|
||||||
|
- Added Select All (Ctrl+A)
|
||||||
|
|
||||||
|
|
||||||
Copyright Information
|
Copyright Information
|
||||||
|
|
|
@ -59,7 +59,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, char *cmdParam, int cmd
|
||||||
MSG msg;
|
MSG msg;
|
||||||
int status;
|
int status;
|
||||||
while ((status=GetMessage(&msg,0,0,0))!=0) {
|
while ((status=GetMessage(&msg,0,0,0))!=0) {
|
||||||
if (status==-1) return -1;
|
if (status==-1) return -1;
|
||||||
if (!IsDialogMessage(hwndFind, &msg)) {
|
if (!IsDialogMessage(hwndFind, &msg)) {
|
||||||
if (!TranslateAccelerator(hDialog,haccel,&msg)) {
|
if (!TranslateAccelerator(hDialog,haccel,&msg)) {
|
||||||
if (!IsDialogMessage(hDialog,&msg)) {
|
if (!IsDialogMessage(hDialog,&msg)) {
|
||||||
|
@ -181,6 +181,11 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
ShellExecute(g_hwnd,"open",NSIS_URL,NULL,NULL,SW_SHOWNORMAL);
|
ShellExecute(g_hwnd,"open",NSIS_URL,NULL,NULL,SW_SHOWNORMAL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
case IDM_SELECTALL:
|
||||||
|
{
|
||||||
|
SendDlgItemMessage(g_hwnd, IDC_LOGWIN, EM_SETSEL, 0, -1);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
case IDM_DOCS:
|
case IDM_DOCS:
|
||||||
{
|
{
|
||||||
char pathf[MAX_PATH],*path;
|
char pathf[MAX_PATH],*path;
|
||||||
|
@ -288,44 +293,43 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
case IDM_FIND:
|
case IDM_FIND:
|
||||||
{
|
{
|
||||||
if (!uFindReplaceMsg)
|
if (!uFindReplaceMsg)
|
||||||
uFindReplaceMsg = RegisterWindowMessage(FINDMSGSTRING);
|
uFindReplaceMsg = RegisterWindowMessage(FINDMSGSTRING);
|
||||||
my_memset(&fr, 0, sizeof(FINDREPLACE));
|
my_memset(&fr, 0, sizeof(FINDREPLACE));
|
||||||
fr.lStructSize = sizeof(FINDREPLACE);
|
fr.lStructSize = sizeof(FINDREPLACE);
|
||||||
fr.hwndOwner = hwndDlg;
|
fr.hwndOwner = hwndDlg;
|
||||||
fr.Flags = FR_NOUPDOWN;
|
fr.Flags = FR_NOUPDOWN;
|
||||||
fr.lpstrFindWhat = (char *)GlobalAlloc(GPTR, 128);
|
fr.lpstrFindWhat = (char *)GlobalAlloc(GPTR, 128);
|
||||||
if (!fr.lpstrFindWhat) return TRUE;
|
if (!fr.lpstrFindWhat) return TRUE;
|
||||||
fr.wFindWhatLen = 128;
|
fr.wFindWhatLen = 128;
|
||||||
hwndFind = FindText(&fr);
|
hwndFind = FindText(&fr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (msg == uFindReplaceMsg) {
|
if (msg == uFindReplaceMsg) {
|
||||||
LPFINDREPLACE lpfr = (LPFINDREPLACE)lParam;
|
LPFINDREPLACE lpfr = (LPFINDREPLACE)lParam;
|
||||||
if (lpfr->Flags & FR_FINDNEXT) {
|
if (lpfr->Flags & FR_FINDNEXT) {
|
||||||
WPARAM flags = FR_DOWN;
|
WPARAM flags = FR_DOWN;
|
||||||
if (lpfr->Flags & FR_MATCHCASE) flags |= FR_MATCHCASE;
|
if (lpfr->Flags & FR_MATCHCASE) flags |= FR_MATCHCASE;
|
||||||
if (lpfr->Flags & FR_WHOLEWORD) flags |= FR_WHOLEWORD;
|
if (lpfr->Flags & FR_WHOLEWORD) flags |= FR_WHOLEWORD;
|
||||||
|
FINDTEXTEX ft;
|
||||||
FINDTEXTEX ft;
|
SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_EXGETSEL, 0, (LPARAM)&ft.chrg);
|
||||||
SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_EXGETSEL, 0, (LPARAM)&ft.chrg);
|
if (ft.chrg.cpMax == ft.chrg.cpMin) ft.chrg.cpMin = 0;
|
||||||
if (ft.chrg.cpMax == ft.chrg.cpMin) ft.chrg.cpMin = 0;
|
else ft.chrg.cpMin = ft.chrg.cpMax;
|
||||||
else ft.chrg.cpMin = ft.chrg.cpMax;
|
ft.chrg.cpMax = SendDlgItemMessage(hwndDlg, IDC_LOGWIN, WM_GETTEXTLENGTH, 0, 0);
|
||||||
ft.chrg.cpMax = SendDlgItemMessage(hwndDlg, IDC_LOGWIN, WM_GETTEXTLENGTH, 0, 0);
|
ft.lpstrText = lpfr->lpstrFindWhat;
|
||||||
ft.lpstrText = lpfr->lpstrFindWhat;
|
ft.chrg.cpMin = SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_FINDTEXTEX, flags, (LPARAM)&ft);
|
||||||
ft.chrg.cpMin = SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_FINDTEXTEX, flags, (LPARAM)&ft);
|
if (ft.chrg.cpMin != -1)
|
||||||
if (ft.chrg.cpMin != -1)
|
SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_SETSEL, ft.chrgText.cpMin, ft.chrgText.cpMax);
|
||||||
SendDlgItemMessage(hwndDlg, IDC_LOGWIN, EM_SETSEL, ft.chrgText.cpMin, ft.chrgText.cpMax);
|
else MessageBeep(MB_ICONASTERISK);
|
||||||
else MessageBeep(MB_ICONASTERISK);
|
}
|
||||||
}
|
if (lpfr->Flags & FR_DIALOGTERM) hwndFind = 0;
|
||||||
if (lpfr->Flags & FR_DIALOGTERM) hwndFind = 0;
|
return TRUE;
|
||||||
return TRUE;
|
}
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,13 +28,14 @@
|
||||||
#define IDM_DOCS 40004
|
#define IDM_DOCS 40004
|
||||||
#define IDM_LOADSCRIPT 40005
|
#define IDM_LOADSCRIPT 40005
|
||||||
#define IDM_FIND 40006
|
#define IDM_FIND 40006
|
||||||
|
#define IDM_SELECTALL 40007
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 111
|
#define _APS_NEXT_RESOURCE_VALUE 111
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40007
|
#define _APS_NEXT_COMMAND_VALUE 40008
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1009
|
#define _APS_NEXT_CONTROL_VALUE 1009
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -81,6 +81,8 @@ BEGIN
|
||||||
MENUITEM "Copy &Selected", IDM_COPYSELECTED
|
MENUITEM "Copy &Selected", IDM_COPYSELECTED
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Find...\tCtrl+F", IDM_FIND
|
MENUITEM "Find...\tCtrl+F", IDM_FIND
|
||||||
|
MENUITEM SEPARATOR
|
||||||
|
MENUITEM "&Select All\tCtrl+A", IDM_SELECTALL
|
||||||
END
|
END
|
||||||
POPUP "&Help"
|
POPUP "&Help"
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -99,6 +101,7 @@ END
|
||||||
|
|
||||||
IDK_ACCEL ACCELERATORS PRELOAD MOVEABLE PURE
|
IDK_ACCEL ACCELERATORS PRELOAD MOVEABLE PURE
|
||||||
BEGIN
|
BEGIN
|
||||||
|
"A", IDM_SELECTALL, VIRTKEY, CONTROL, NOINVERT
|
||||||
"E", IDM_EDITSCRIPT, VIRTKEY, CONTROL, NOINVERT
|
"E", IDM_EDITSCRIPT, VIRTKEY, CONTROL, NOINVERT
|
||||||
"F", IDM_FIND, VIRTKEY, CONTROL, NOINVERT
|
"F", IDM_FIND, VIRTKEY, CONTROL, NOINVERT
|
||||||
"R", IDM_RECOMPILE, VIRTKEY, CONTROL, NOINVERT
|
"R", IDM_RECOMPILE, VIRTKEY, CONTROL, NOINVERT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue