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
|
@ -58,7 +58,7 @@
|
|||
extern HANDLE dbd_hFile;
|
||||
#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
|
||||
HWND g_hwnd;
|
||||
HANDLE g_hInstance;
|
||||
|
|
|
@ -170,6 +170,16 @@ void NSISCALL build_g_logfile()
|
|||
|
||||
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()
|
||||
{
|
||||
LANGID lang_mask=(LANGID)~0;
|
||||
|
@ -200,14 +210,9 @@ lang_again:
|
|||
}
|
||||
|
||||
cur_langtable = selected_langtable;
|
||||
|
||||
myitoa(state_language, *(LANGID*)language_table);
|
||||
{
|
||||
TCHAR *caption = GetNSISString(g_caption,LANG_CAPTION);
|
||||
#ifdef NSIS_SUPPORT_BGBG
|
||||
my_SetWindowText(m_bgwnd, caption);
|
||||
#endif
|
||||
}
|
||||
|
||||
update_caption();
|
||||
|
||||
// reload section names
|
||||
{
|
||||
|
@ -581,7 +586,7 @@ nextPage:
|
|||
SetActiveCtl(m_hwndOK);
|
||||
}
|
||||
|
||||
mystrcpy(g_tmp,g_caption);
|
||||
mystrcpy(g_tmp,update_caption());
|
||||
GetNSISString(g_tmp+mystrlen(g_tmp),this_page->caption);
|
||||
my_SetWindowText(hwndDlg,g_tmp);
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ enum NSPIM
|
|||
// Should always be __cdecl for future expansion possibilities
|
||||
typedef UINT_PTR (*NSISPLUGINCALLBACK)(enum NSPIM);
|
||||
|
||||
// extra_parameters data structures containing other interesting stuff
|
||||
// but the stack, variables and HWND passed on to plug-ins.
|
||||
// extra_parameters data structure containing other interesting stuff
|
||||
// besides the stack, variables and HWND passed on to plug-ins.
|
||||
typedef struct
|
||||
{
|
||||
int autoclose;
|
||||
|
@ -83,4 +83,4 @@ typedef struct {
|
|||
// sent as wParam with WM_NOTIFY_OUTER_NEXT when user cancels - heed its warning
|
||||
#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.hInstance = g_hInstance;
|
||||
mbp.lpszText = text;
|
||||
mbp.lpszCaption = g_caption;
|
||||
mbp.lpszCaption = g_caption; // Should call update_caption() here?
|
||||
mbp.dwStyle = _type;
|
||||
|
||||
return MessageBoxIndirect(&mbp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue