applied patch #1634704 - FOCUS flag for InstallOptions Plugin
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4864 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
bd86ee1bfc
commit
31154c4424
2 changed files with 19 additions and 4 deletions
|
@ -120,6 +120,7 @@ char *WINAPI STRDUP(const char *c)
|
||||||
// WS_HSCROLL 0x00100000 // *ALL*
|
// WS_HSCROLL 0x00100000 // *ALL*
|
||||||
// WS_VSCROLL 0x00200000 // *ALL*
|
// WS_VSCROLL 0x00200000 // *ALL*
|
||||||
// WS_DISABLED 0x08000000 // *ALL*
|
// WS_DISABLED 0x08000000 // *ALL*
|
||||||
|
#define FLAG_FOCUS 0x10000000 // Controls that can receive focus
|
||||||
|
|
||||||
struct TableEntry {
|
struct TableEntry {
|
||||||
char *pszName;
|
char *pszName;
|
||||||
|
@ -481,6 +482,7 @@ int WINAPI ReadSettings(void) {
|
||||||
{ "VSCROLL", WS_VSCROLL },
|
{ "VSCROLL", WS_VSCROLL },
|
||||||
{ "DISABLED", WS_DISABLED },
|
{ "DISABLED", WS_DISABLED },
|
||||||
{ "TRANSPARENT", TRANSPARENT_BMP },
|
{ "TRANSPARENT", TRANSPARENT_BMP },
|
||||||
|
{ "FOCUS", FLAG_FOCUS },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
FieldType *pField = pFields + nIdx;
|
FieldType *pField = pFields + nIdx;
|
||||||
|
@ -949,6 +951,7 @@ int WINAPI createCfgDlg()
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL fFocused = FALSE;
|
BOOL fFocused = FALSE;
|
||||||
|
BOOL fFocusedByFlag = FALSE;
|
||||||
|
|
||||||
#define DEFAULT_STYLES (WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS)
|
#define DEFAULT_STYLES (WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS)
|
||||||
#define RTL_EX_STYLES (WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR)
|
#define RTL_EX_STYLES (WS_EX_RTLREADING | WS_EX_LEFTSCROLLBAR)
|
||||||
|
@ -1339,10 +1342,15 @@ int WINAPI createCfgDlg()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set initial focus to the first appropriate field
|
// Set initial focus to the first appropriate field ( with FOCUS flag)
|
||||||
if (!fFocused && (dwStyle & (WS_TABSTOP | WS_DISABLED)) == WS_TABSTOP && pField->nType >= FIELD_SETFOCUS) {
|
if (!fFocusedByFlag && (dwStyle & (WS_TABSTOP | WS_DISABLED)) == WS_TABSTOP && pField->nType >= FIELD_SETFOCUS) {
|
||||||
fFocused = TRUE;
|
if (pField->nFlags & FLAG_FOCUS) {
|
||||||
mySetFocus(hwCtrl);
|
fFocusedByFlag = TRUE;
|
||||||
|
}
|
||||||
|
if (!fFocused || fFocusedByFlag) {
|
||||||
|
fFocused = TRUE;
|
||||||
|
mySetFocus(hwCtrl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If multiline-readonly then hold the text back until after the
|
// If multiline-readonly then hold the text back until after the
|
||||||
|
|
|
@ -507,6 +507,13 @@ create multiple groups of radio button and makes keyboard
|
||||||
navigation using arrow keys easier.</td>
|
navigation using arrow keys easier.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td class="righttable">FOCUS</td>
|
||||||
|
<td class="righttable">Sets focus on the specified control,
|
||||||
|
instead of the first focusable control. If more than one field
|
||||||
|
is specified with this flag, only the last one will receive
|
||||||
|
focus.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td class="righttable">NOTABSTOP</td>
|
<td class="righttable">NOTABSTOP</td>
|
||||||
<td class="righttable">Do not stop on the control when the user
|
<td class="righttable">Do not stop on the control when the user
|
||||||
pressed the Tab key. Add NOTABSTOP to all controls of a group
|
pressed the Tab key. Add NOTABSTOP to all controls of a group
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue