diff --git a/Examples/Modern UI/StartMenu.nsi b/Examples/Modern UI/StartMenu.nsi index 35dca7f0..7af28e21 100644 --- a/Examples/Modern UI/StartMenu.nsi +++ b/Examples/Modern UI/StartMenu.nsi @@ -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 diff --git a/Plugins/StartMenu.dll b/Plugins/StartMenu.dll index b7868611..8f380c8a 100644 Binary files a/Plugins/StartMenu.dll and b/Plugins/StartMenu.dll differ diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 90bbefff..3730c751 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -1364,32 +1364,34 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar int ui_st_updateflag=0x6; -void NSISCALL update_status_text(int strtab, const char *text) -{ +void NSISCALL update_status_text(int strtab, const char *text) { static char tmp[NSIS_MAX_STRLEN*2]; LVITEM new_item; HWND linsthwnd = insthwnd; if (linsthwnd) { - int tmplen = mystrlen(tmp); + int updateflag = ui_st_updateflag; + int tmplen; - if (!(ui_st_updateflag & 1)) + if (!(updateflag & 1)) GetNSISString(tmp, strtab); + tmplen = mystrlen(tmp); + if (text) { if (tmplen + mystrlen(text) >= sizeof(tmp)) return; lstrcat(tmp, text); } - if ((ui_st_updateflag & 4)) my_SetWindowText(insthwnd2, tmp); - if ((ui_st_updateflag & 2)) + if ((updateflag & 4)) my_SetWindowText(insthwnd2, tmp); + if ((updateflag & 2)) { new_item.mask = LVIF_TEXT; new_item.pszText = tmp; new_item.iItem = ListView_GetItemCount(linsthwnd); new_item.iSubItem = 0; - if (ui_st_updateflag & 1) + if (updateflag & 1) { new_item.iItem--; ListView_SetItem(linsthwnd, &new_item); @@ -1399,7 +1401,7 @@ void NSISCALL update_status_text(int strtab, const char *text) ListView_EnsureVisible(linsthwnd, new_item.iItem, 0); } - if (ui_st_updateflag & 1) + if (updateflag & 1) tmp[tmplen]=0; } }