Variables used in Caption can now be set in .onGuiInit (RFE #539)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6860 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
ce7078517f
commit
d39ef1d219
6 changed files with 21 additions and 14 deletions
|
@ -60,7 +60,7 @@ When used outside a \R{pageex}{PageEx} block: Sets the text for the titlebar of
|
||||||
|
|
||||||
When used inside a \R{pageex}{PageEx} block: Sets the subcaption of the current page.
|
When used inside a \R{pageex}{PageEx} block: Sets the subcaption of the current page.
|
||||||
|
|
||||||
Accepts variables. If variables are used, they must be initialized on \R{oninit}{.onInit}.
|
Accepts variables. If variables are used, they must be initialized on \R{oninit}{.onInit} or \R{onguiinit}{.onGUIInit}.
|
||||||
|
|
||||||
\S2{achangeui} ChangeUI
|
\S2{achangeui} ChangeUI
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@ Released on ? ?th, 2017
|
||||||
|
|
||||||
\S2{} Minor Changes
|
\S2{} Minor Changes
|
||||||
|
|
||||||
|
\b Variables used in Caption can now be set in .onGuiInit (\W{http://sf.net/p/nsis/feature-requests/539}{RFE #539})
|
||||||
|
|
||||||
\b MultiUser now supports $ProgramFiles64 (\W{http://sf.net/p/nsis/bugs/843}{bug #843})
|
\b MultiUser now supports $ProgramFiles64 (\W{http://sf.net/p/nsis/bugs/843}{bug #843})
|
||||||
|
|
||||||
\b Added support for MUI_UNCONFIRMPAGE_VARIABLE (\W{http://sf.net/p/nsis/feature-requests/511}{RFE #511}) and MUI_PAGE_CUSTOMFUNCTION_DESTROYED
|
\b Added support for MUI_UNCONFIRMPAGE_VARIABLE (\W{http://sf.net/p/nsis/feature-requests/511}{RFE #511}) and MUI_PAGE_CUSTOMFUNCTION_DESTROYED
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
extern HANDLE dbd_hFile;
|
extern HANDLE dbd_hFile;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TCHAR g_caption[NSIS_MAX_STRLEN*2];
|
TCHAR g_caption[NSIS_MAX_STRLEN*2]; // Why does this have to be NSIS_MAX_STRLEN*2?
|
||||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||||
HWND g_hwnd;
|
HWND g_hwnd;
|
||||||
HANDLE g_hInstance;
|
HANDLE g_hInstance;
|
||||||
|
|
|
@ -170,6 +170,16 @@ void NSISCALL build_g_logfile()
|
||||||
|
|
||||||
int *cur_langtable;
|
int *cur_langtable;
|
||||||
|
|
||||||
|
static TCHAR* update_caption()
|
||||||
|
{
|
||||||
|
TCHAR *gcap = g_caption;
|
||||||
|
GetNSISString(gcap, LANG_CAPTION);
|
||||||
|
#ifdef NSIS_SUPPORT_BGBG
|
||||||
|
my_SetWindowText(m_bgwnd, gcap);
|
||||||
|
#endif
|
||||||
|
return gcap;
|
||||||
|
}
|
||||||
|
|
||||||
static void NSISCALL set_language()
|
static void NSISCALL set_language()
|
||||||
{
|
{
|
||||||
LANGID lang_mask=(LANGID)~0;
|
LANGID lang_mask=(LANGID)~0;
|
||||||
|
@ -200,14 +210,9 @@ lang_again:
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_langtable = selected_langtable;
|
cur_langtable = selected_langtable;
|
||||||
|
|
||||||
myitoa(state_language, *(LANGID*)language_table);
|
myitoa(state_language, *(LANGID*)language_table);
|
||||||
{
|
|
||||||
TCHAR *caption = GetNSISString(g_caption,LANG_CAPTION);
|
update_caption();
|
||||||
#ifdef NSIS_SUPPORT_BGBG
|
|
||||||
my_SetWindowText(m_bgwnd, caption);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// reload section names
|
// reload section names
|
||||||
{
|
{
|
||||||
|
@ -581,7 +586,7 @@ nextPage:
|
||||||
SetActiveCtl(m_hwndOK);
|
SetActiveCtl(m_hwndOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
mystrcpy(g_tmp,g_caption);
|
mystrcpy(g_tmp,update_caption());
|
||||||
GetNSISString(g_tmp+mystrlen(g_tmp),this_page->caption);
|
GetNSISString(g_tmp+mystrlen(g_tmp),this_page->caption);
|
||||||
my_SetWindowText(hwndDlg,g_tmp);
|
my_SetWindowText(hwndDlg,g_tmp);
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,8 @@ enum NSPIM
|
||||||
// Should always be __cdecl for future expansion possibilities
|
// Should always be __cdecl for future expansion possibilities
|
||||||
typedef UINT_PTR (*NSISPLUGINCALLBACK)(enum NSPIM);
|
typedef UINT_PTR (*NSISPLUGINCALLBACK)(enum NSPIM);
|
||||||
|
|
||||||
// extra_parameters data structures containing other interesting stuff
|
// extra_parameters data structure containing other interesting stuff
|
||||||
// but the stack, variables and HWND passed on to plug-ins.
|
// besides the stack, variables and HWND passed on to plug-ins.
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int autoclose;
|
int autoclose;
|
||||||
|
@ -83,4 +83,4 @@ typedef struct {
|
||||||
// sent as wParam with WM_NOTIFY_OUTER_NEXT when user cancels - heed its warning
|
// sent as wParam with WM_NOTIFY_OUTER_NEXT when user cancels - heed its warning
|
||||||
#define NOTIFY_BYE_BYE 'x'
|
#define NOTIFY_BYE_BYE 'x'
|
||||||
|
|
||||||
#endif /* _PLUGIN_H_ */
|
#endif /* _NSIS_EXEHEAD_API_H_ */
|
||||||
|
|
|
@ -144,7 +144,7 @@ int NSISCALL my_MessageBox(const TCHAR *text, UINT type) {
|
||||||
mbp.hwndOwner = g_hwnd;
|
mbp.hwndOwner = g_hwnd;
|
||||||
mbp.hInstance = g_hInstance;
|
mbp.hInstance = g_hInstance;
|
||||||
mbp.lpszText = text;
|
mbp.lpszText = text;
|
||||||
mbp.lpszCaption = g_caption;
|
mbp.lpszCaption = g_caption; // Should call update_caption() here?
|
||||||
mbp.dwStyle = _type;
|
mbp.dwStyle = _type;
|
||||||
|
|
||||||
return MessageBoxIndirect(&mbp);
|
return MessageBoxIndirect(&mbp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue