Enabled/show stuff now doesn't do a thing unless specified in the INI file, no more IO defaults, only NSIS defaults.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1717 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
25943c6379
commit
590da83f5f
3 changed files with 18 additions and 30 deletions
|
@ -55,30 +55,18 @@ following values:
|
|||
<TD vAlign=top bgColor=#cccccc><I>(optional)</I></TD>
|
||||
<TD vAlign=top bgColor=#eeeeee>If specified, gives the text to set the
|
||||
titlebar to. Otherwise, the titlebar text is not changed.</TD></TR>
|
||||
<TR>
|
||||
<TD vAlign=top bgColor=#cccccc><B>CancelConfirm</B></TD>
|
||||
<TD vAlign=top bgColor=#cccccc><I>(optional)</I></TD>
|
||||
<TD vAlign=top bgColor=#eeeeee>If specified, prompts the user (With text) whether or not to cancel if they select the cancel button.</TD></TR>
|
||||
<TR>
|
||||
<TD vAlign=top bgColor=#cccccc><B>CancelConfirmCaption</B></TD>
|
||||
<TD vAlign=top bgColor=#cccccc><I>(optional)</I></TD>
|
||||
<TD vAlign=top bgColor=#eeeeee>If specified, replaces the default "Question" caption by a user specified value.</TD></TR>
|
||||
<TR>
|
||||
<TD vAlign=top bgColor=#cccccc><B>CancelConfirmFlags</B></TD>
|
||||
<TD vAlign=top bgColor=#cccccc><I>(optional)</I></TD>
|
||||
<TD vAlign=top bgColor=#eeeeee>If specified, can add an icon to the cancel confirmation message box (MB_ICONEXCLAMATION, MB_ICONINFORMATION, MB_ICONQUESTION, MB_ICONSTOP) or effect the behaviour of it in other ways (MB_TOPMOST, MB_SETFOREGROUND, MB_RIGHT, MB_DEFBUTTON1, MB_DEFBUTTON2). To specify multiple flags, separate using the pipe '|' symbol.</TD></TR>
|
||||
<TR>
|
||||
<TD vAlign=top bgColor=#cccccc><B>CancelEnabled</B></TD>
|
||||
<TD vAlign=top bgColor=#cccccc><I>(optional)</I></TD>
|
||||
<TD vAlign=top bgColor=#eeeeee>Controls whether or not the cancel button in the NSIS window is enabled. If set to 1 or omitted, the cancel button will be enabled. If set to 0, the cancel button will be disabled.</TD></TR>
|
||||
<TD vAlign=top bgColor=#eeeeee>If specified, overrides NSIS settings and enables or disables the cancel button. If set to 1, the cancel button will be enabled. If set to 0, the cancel button will be disabled.</TD></TR>
|
||||
<TR>
|
||||
<TD vAlign=top bgColor=#cccccc><B>CancelShow</B></TD>
|
||||
<TD vAlign=top bgColor=#cccccc><I>(optional)</I></TD>
|
||||
<TD vAlign=top bgColor=#eeeeee>Controls whether or not the cancel button in the NSIS window is shown. If set to 1 or omitted, the cancel button will be shown. If set to 0, the cancel button will be hidden.</TD></TR>
|
||||
<TD vAlign=top bgColor=#eeeeee>If specified, overrides NSIS settings and shows or hides the cancel button. If set to 1, the cancel button will be shown. If set to 0, the cancel button will be hidden.</TD></TR>
|
||||
<TR>
|
||||
<TD vAlign=top bgColor=#cccccc><B>BackDisabled</B></TD>
|
||||
<TD vAlign=top bgColor=#cccccc><B>BackEnabled</B></TD>
|
||||
<TD vAlign=top bgColor=#cccccc><I>(optional)</I></TD>
|
||||
<TD vAlign=top bgColor=#eeeeee>Controls whether or not the back button in the NSIS window is disabled. If set to 0 or omitted, the back button will be enabled. If set to 1, the back button will be disabled.</TD></TR>
|
||||
<TD vAlign=top bgColor=#eeeeee>If specified, overrides NSIS settings and enables or disables the back button. If set to 1, the back button will be enabled. If set to 0, the back button will be disabled.</TD></TR>
|
||||
<TR>
|
||||
<TD vAlign=top bgColor=#cccccc><B>CancelButtonText</B></TD>
|
||||
<TD vAlign=top bgColor=#cccccc><I>(optional)</I></TD>
|
||||
|
@ -294,7 +282,6 @@ Here is a little example:
|
|||
<UL>
|
||||
<LI><a name=DLL1.7>DLL version 1.7 beta (11/2/2002)
|
||||
<UL>
|
||||
<li>BackEnabled -> BackDisabled
|
||||
<li>Added initDialog and show DLL functions
|
||||
</UL>
|
||||
<LI><a name=DLL1.6>DLL version 1.6 beta (9/30/2002)
|
||||
|
|
|
@ -168,10 +168,10 @@ char *pszTitle = NULL;
|
|||
char *pszCancelButtonText = NULL;
|
||||
char *pszNextButtonText = NULL;
|
||||
char *pszBackButtonText = NULL;
|
||||
BOOL bBackDisabled = FALSE;
|
||||
|
||||
BOOL bCancelEnabled = TRUE; // by ORTIM: 13-August-2002
|
||||
int bCancelShow = 1; // by ORTIM: 13-August-2002
|
||||
int bBackEnabled = FALSE;
|
||||
int bCancelEnabled = FALSE; // by ORTIM: 13-August-2002
|
||||
int bCancelShow = FALSE; // by ORTIM: 13-August-2002
|
||||
|
||||
FieldType *pFields = NULL;
|
||||
int nNumFields = 0;
|
||||
|
@ -459,10 +459,11 @@ bool ReadSettings(void) {
|
|||
pszBackButtonText = myGetProfileStringDup("Settings", "BackButtonText");
|
||||
|
||||
nNumFields = GetPrivateProfileInt("Settings", "NumFields", 0, pszFilename);
|
||||
bBackDisabled = GetPrivateProfileInt("Settings", "BackDisabled", 0, pszFilename);
|
||||
|
||||
bCancelEnabled = GetPrivateProfileInt("Settings", "CancelEnabled", 1, pszFilename); // by ORTIM: 13-August-2002
|
||||
bCancelShow = GetPrivateProfileInt("Settings", "CancelShow", 1, pszFilename); // by ORTIM: 13-August-2002
|
||||
bBackEnabled = GetPrivateProfileInt("Settings", "BackEnabled", 0xFFFF0000, pszFilename);
|
||||
// by ORTIM: 13-August-2002
|
||||
bCancelEnabled = GetPrivateProfileInt("Settings", "CancelEnabled", 0xFFFF0000, pszFilename);
|
||||
bCancelShow = GetPrivateProfileInt("Settings", "CancelShow", 0xFFFF0000, pszFilename);
|
||||
|
||||
if (nNumFields > 0) {
|
||||
// make this twice as large for the worst case that every control is a browse button.
|
||||
|
@ -740,11 +741,10 @@ int createCfgDlg()
|
|||
GetWindowText(hBackButton,old_back,sizeof(old_back));
|
||||
if (pszBackButtonText) SetWindowText(hBackButton,pszBackButtonText);
|
||||
|
||||
if (bBackDisabled) EnableWindow(hBackButton,0);
|
||||
|
||||
old_cancel_enabled=!EnableWindow(hCancelButton,bCancelEnabled); // by ORTIM: 13-August-2002
|
||||
old_cancel_visible=IsWindowVisible(hCancelButton); // by ORTIM: 13-August-2002
|
||||
ShowWindow(hCancelButton,bCancelShow?SW_SHOWNA:SW_HIDE); // by ORTIM: 13-August-2002
|
||||
if (bBackEnabled!=0xFFFF0000) EnableWindow(hBackButton,bBackEnabled);
|
||||
// by ORTIM: 13-August-2002
|
||||
if (bCancelEnabled!=0xFFFF0000) old_cancel_enabled=!EnableWindow(hCancelButton,bCancelEnabled);
|
||||
if (bCancelShow!=0xFFFF0000) old_cancel_visible=ShowWindow(hCancelButton,bCancelShow?SW_SHOWNA:SW_HIDE);
|
||||
|
||||
// Added by Amir Szekely 22nd July 2002
|
||||
HFONT hFont = (HFONT)SendMessage(hMainWindow, WM_GETFONT, 0, 0);
|
||||
|
@ -997,8 +997,9 @@ void showCfgDlg()
|
|||
SetWindowText(hNextButton,old_ok);
|
||||
SetWindowText(hBackButton,old_back);
|
||||
|
||||
EnableWindow(hCancelButton,old_cancel_enabled); // by ORTIM: 13-August-2002
|
||||
ShowWindow(hCancelButton,old_cancel_visible?SW_SHOWNA:SW_HIDE); // by ORTIM: 13-August-2002
|
||||
// by ORTIM: 13-August-2002
|
||||
if (bCancelEnabled!=0xFFFF0000) EnableWindow(hCancelButton,old_cancel_enabled);
|
||||
if (bCancelShow!=0xFFFF0000) ShowWindow(hCancelButton,old_cancel_visible?SW_SHOWNA:SW_HIDE);
|
||||
|
||||
if (pszTitle) SetWindowText(hMainWindow,old_title);
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue