Added new function LockWindow for flickering problems workaround, fixed crash on NSISdl, fixed focus button redraw
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3115 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
a97fc1a9b2
commit
48a62f51e8
11 changed files with 89 additions and 31 deletions
|
@ -1075,6 +1075,7 @@ Var MUI_TEMP2
|
|||
|
||||
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
|
||||
|
||||
LockWindow on
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
|
@ -1092,6 +1093,7 @@ Var MUI_TEMP2
|
|||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
|
||||
ShowWindow $MUI_TEMP1 ${SW_NORMAL}
|
||||
LockWindow off
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ioSpecial.ini"
|
||||
Pop $MUI_HWND
|
||||
|
@ -1113,6 +1115,7 @@ Var MUI_TEMP2
|
|||
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW
|
||||
|
||||
LockWindow on
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
|
||||
ShowWindow $MUI_TEMP1 ${SW_NORMAL}
|
||||
|
||||
|
@ -1130,7 +1133,8 @@ Var MUI_TEMP2
|
|||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
LockWindow off
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function "${LEAVE}"
|
||||
|
@ -1291,24 +1295,6 @@ Var MUI_TEMP2
|
|||
|
||||
Function "${PRE}"
|
||||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1035
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
|
||||
ShowWindow $MUI_TEMP1 ${SW_NORMAL}
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "NextButtonText" "${MUI_FINISHPAGE_BUTTON}"
|
||||
|
||||
!ifdef MUI_FINISHPAGE_ABORTWARNINGCHECK
|
||||
|
@ -1459,6 +1445,26 @@ Var MUI_TEMP2
|
|||
|
||||
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
|
||||
|
||||
LockWindow on
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1035
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
|
||||
ShowWindow $MUI_TEMP1 ${SW_NORMAL}
|
||||
LockWindow off
|
||||
|
||||
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ioSpecial.ini"
|
||||
Pop $MUI_HWND
|
||||
SetCtlColors $MUI_HWND "" "${MUI_BGCOLOR}"
|
||||
|
@ -1532,6 +1538,7 @@ Var MUI_TEMP2
|
|||
StrCpy $MUI_NOABORTWARNING ""
|
||||
!endif
|
||||
|
||||
LockWindow on
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
|
||||
ShowWindow $MUI_TEMP1 ${SW_NORMAL}
|
||||
|
||||
|
@ -1549,7 +1556,8 @@ Var MUI_TEMP2
|
|||
|
||||
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1045
|
||||
ShowWindow $MUI_TEMP1 ${SW_HIDE}
|
||||
|
||||
LockWindow off
|
||||
|
||||
FunctionEnd
|
||||
|
||||
Function "${LEAVE}"
|
||||
|
@ -2089,4 +2097,4 @@ Var MUI_TEMP2
|
|||
|
||||
!endif
|
||||
|
||||
!verbose 4
|
||||
!verbose 4
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
;--------------------------------
|
||||
;Pages
|
||||
|
||||
!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt"
|
||||
;!insertmacro MUI_PAGE_COMPONENTS
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
;Start Menu Folder Page Configuration
|
||||
|
@ -46,7 +46,7 @@
|
|||
|
||||
!insertmacro MUI_PAGE_STARTMENU Application
|
||||
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
;!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
|
Binary file not shown.
|
@ -42,7 +42,7 @@ HICON g_hIcon;
|
|||
#endif
|
||||
|
||||
int dlg_offset;
|
||||
|
||||
int ui_dlg_visible=0; // At start main window is not visible
|
||||
int g_quit_flag; // set when Quit has been called (meaning bail out ASAP)
|
||||
|
||||
#if NSIS_MAX_INST_TYPES > 32 || NSIS_MAX_INST_TYPES < 1
|
||||
|
@ -354,9 +354,9 @@ static int CALLBACK WINAPI BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lPara
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
BOOL bNextPage=FALSE;
|
||||
if (uMsg == WM_INITDIALOG || uMsg == WM_NOTIFY_OUTER_NEXT)
|
||||
{
|
||||
page *this_page;
|
||||
|
@ -383,9 +383,9 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
SetDlgItemTextFromLang(hwndDlg,IDC_VERSTR,LANG_BRANDING);
|
||||
SetClassLong(hwndDlg,GCL_HICON,(long)g_hIcon);
|
||||
#if defined(NSIS_SUPPORT_CODECALLBACKS) && defined(NSIS_CONFIG_ENHANCEDUI_SUPPORT)
|
||||
if (!(g_quit_flag = ExecuteCodeSegment(g_header->code_onGUIInit,NULL)))
|
||||
g_quit_flag = ExecuteCodeSegment(g_header->code_onGUIInit,NULL);
|
||||
#endif
|
||||
ShowWindow(hwndDlg,SW_SHOW);
|
||||
//ShowWindow(hwndDlg, SW_SHOW);
|
||||
}
|
||||
|
||||
this_page=g_pages+m_page;
|
||||
|
@ -406,7 +406,7 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
SendMessage(m_curwnd, WM_NOTIFY_INIGO_MONTOYA, 0, 0);
|
||||
|
||||
nextPage:
|
||||
|
||||
bNextPage=FALSE;
|
||||
m_page+=m_delta;
|
||||
this_page+=m_delta;
|
||||
|
||||
|
@ -452,6 +452,7 @@ nextPage:
|
|||
|
||||
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
||||
if (ExecuteCodeSegment(this_page->prefunc, NULL) || !this_page->dlg_id) {
|
||||
bNextPage=TRUE;
|
||||
goto nextPage;
|
||||
}
|
||||
#endif //NSIS_SUPPORT_CODECALLBACKS
|
||||
|
@ -461,7 +462,7 @@ nextPage:
|
|||
if (g_exec_flags.abort) SetFocus(m_hwndCancel);
|
||||
else if (g_exec_flags.autoclose) goto nextPage;
|
||||
else SetFocus(m_hwndOK); // without focus button, the system Beeps every time user press one key
|
||||
return 0;
|
||||
goto skipPage;
|
||||
}
|
||||
|
||||
// update g_this_page for the dialog proc
|
||||
|
@ -498,6 +499,18 @@ nextPage:
|
|||
//XGE End
|
||||
}
|
||||
}
|
||||
|
||||
skipPage:
|
||||
|
||||
if (!ui_dlg_visible && m_curwnd)
|
||||
{
|
||||
ShowWindow(hwndDlg, SW_SHOW);
|
||||
ui_dlg_visible = TRUE;
|
||||
}
|
||||
|
||||
if (bNextPage)
|
||||
goto nextPage;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -514,6 +527,7 @@ nextPage:
|
|||
if (uMsg == WM_NOTIFY_CUSTOM_READY) {
|
||||
DestroyWindow(m_curwnd);
|
||||
m_curwnd = (HWND)wParam;
|
||||
goto skipPage;
|
||||
}
|
||||
if (uMsg == WM_CLOSE)
|
||||
{
|
||||
|
@ -559,7 +573,7 @@ nextPage:
|
|||
else
|
||||
{
|
||||
// Forward WM_COMMANDs to inner dialogs, can be custom ones
|
||||
SendMessage(m_curwnd, uMsg, wParam, lParam);
|
||||
//SendMessage(m_curwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
}
|
||||
return HandleStaticBkColor();
|
||||
|
|
|
@ -221,6 +221,8 @@
|
|||
// __TIMESTAMP__ - date & time according to the current locale
|
||||
#define NSIS_SUPPORT_STANDARD_PREDEFINES
|
||||
|
||||
#define NSIS_LOCKWINDOW_SUPPORT
|
||||
|
||||
// Added by Ximon Eighteen 5th August 2002
|
||||
// If this is uncommented the following changes/new features are
|
||||
// turned on :-
|
||||
|
|
|
@ -1557,6 +1557,15 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
|||
}
|
||||
break;
|
||||
#endif//NSIS_CONFIG_COMPONENTPAGE
|
||||
|
||||
#ifdef NSIS_LOCKWINDOW_SUPPORT
|
||||
case EW_LOCKWINDOW:
|
||||
{
|
||||
SendMessage(g_hwnd, WM_SETREDRAW, parm0 && ui_dlg_visible, 0);
|
||||
if ( parm0 )
|
||||
InvalidateRect(g_hwnd, NULL, FALSE);
|
||||
}
|
||||
#endif //NSIS_LOCKWINDOW_SUPPORT
|
||||
}
|
||||
|
||||
g_exec_flags.exec_error += exec_error;
|
||||
|
|
|
@ -178,6 +178,10 @@ enum
|
|||
// instructions not actually implemented in exehead, but used in compiler.
|
||||
EW_GETLABELADDR, // both of these get converted to EW_ASSIGNVAR
|
||||
EW_GETFUNCTIONADDR,
|
||||
|
||||
#ifdef NSIS_LOCKWINDOW_SUPPORT
|
||||
EW_LOCKWINDOW,
|
||||
#endif
|
||||
};
|
||||
|
||||
#define FH_FLAGS_MASK 15
|
||||
|
|
|
@ -7,6 +7,9 @@ int NSISCALL ui_doinstall(void);
|
|||
void NSISCALL update_status_text(int strtab, const char *text2);
|
||||
extern int ui_st_updateflag;
|
||||
|
||||
extern int ui_dlg_visible;
|
||||
extern HWND m_curwnd;
|
||||
|
||||
#ifdef NSIS_CONFIG_LOG
|
||||
void NSISCALL build_g_logfile(void);
|
||||
#endif
|
||||
|
|
|
@ -5025,6 +5025,22 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
return PS_ERROR;
|
||||
#endif// NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
|
||||
#ifdef NSIS_LOCKWINDOW_SUPPORT
|
||||
case TOK_LOCKWINDOW:
|
||||
SCRIPT_MSG("LockWindow: lock state=%d\n",line.gettoken_str(1));
|
||||
ent.which=EW_LOCKWINDOW;
|
||||
ent.offsets[0]=line.gettoken_enum(1,"on\0off\0");
|
||||
if ( ent.offsets[0] == -1 )
|
||||
PRINTHELP();
|
||||
return add_entry(&ent);
|
||||
#else
|
||||
case TOK_LOCKWINDOW:
|
||||
{
|
||||
ERROR_MSG("Error: %s specified, NSIS_LOCKWINDOW_SUPPORT not defined.\n",line.gettoken_str(0));
|
||||
}
|
||||
return PS_ERROR;
|
||||
#endif // NSIS_LOCKWINDOW_SUPPORT
|
||||
|
||||
default: break;
|
||||
|
||||
}
|
||||
|
|
|
@ -240,6 +240,7 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
// Added by ramon 6 jun 2003
|
||||
{TOK_VI_ADDKEY,"VIAddVersionKey",2,1,"/LANG=lang_id keyname value"},
|
||||
{TOK_VI_SETPRODUCTVERSION,"VIProductVersion",1,0,"[version_string_X.X.X.X]"},
|
||||
{TOK_LOCKWINDOW,"LockWindow",1,0,"(on|off)"},
|
||||
};
|
||||
|
||||
void CEXEBuild::print_help(char *commandname)
|
||||
|
|
|
@ -228,6 +228,7 @@ enum
|
|||
TOK_ENABLEWINDOW,
|
||||
TOK_SETSILENT,
|
||||
TOK_IFSILENT,
|
||||
TOK_LOCKWINDOW,
|
||||
|
||||
TOK__LAST,
|
||||
TOK__PLUGINCOMMAND
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue