From 359868c88e0785f623e859ac3b25897299633a3b Mon Sep 17 00:00:00 2001 From: ramon18 Date: Sun, 9 Nov 2003 23:10:04 +0000 Subject: [PATCH] Reverted "Examples\Modern UI\StartMenu.nsi" and "Plugins\StartMenu.dll" to previous version, little size optimization git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3117 212acab6-be3b-0410-9dea-997c60f758d6 --- Examples/Modern UI/StartMenu.nsi | 4 ++-- Plugins/StartMenu.dll | Bin 6656 -> 6656 bytes Source/exehead/Ui.c | 18 ++++++++++-------- 3 files changed, 12 insertions(+), 10 deletions(-) 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 b78686112bd0067a956678a7fbe838cc8cbe50f4..8f380c8a7681d3fb18d15cc147bfc889584b6290 100644 GIT binary patch delta 23 ccmZoLX)u}afcZ*W%*Mxtf*^XcxX?>>0DM6S?EnA( delta 23 fcmZoLX)u}afSK*!yp4|y1({h7&f6?5^pYI_b0Y~# 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; } }