size optimization - better values for status_update

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5280 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-09-21 18:20:12 +00:00
parent d191cda8f8
commit 31a9a49502
3 changed files with 10 additions and 19 deletions

View file

@ -3216,7 +3216,7 @@ again:
zero_offset=add_string("$0");
// SetDetailsPrint none
ret=add_entry_direct(EW_SETFLAG, FLAG_OFFSET(status_update), add_intstring(16));
ret=add_entry_direct(EW_SETFLAG, FLAG_OFFSET(status_update), add_intstring(6));
if (ret != PS_OK) return ret;
// StrCmp $PLUGINSDIR ""

View file

@ -262,10 +262,6 @@ FORCE_INLINE int NSISCALL ui_doinstall(void)
mystrcat(state_language, g_tmp);
}
// initialize status update (SetDetailsPrint) flag
g_exec_flags.status_update = 6;
g_exec_flags_last_used.status_update = 6;
// set default language
set_language();
@ -1474,8 +1470,8 @@ void NSISCALL update_status_text(int strtab, const char *text) {
mystrcat(tmp, text);
}
if ((updateflag & 4)) my_SetWindowText(insthwnd2, tmp);
if ((updateflag & 2))
if ((updateflag & 4) == 0) my_SetWindowText(insthwnd2, tmp);
if ((updateflag & 2) == 0)
{
new_item.mask = LVIF_TEXT;
new_item.pszText = tmp;

View file

@ -4559,24 +4559,19 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
{
ent.which=EW_SETFLAG;
ent.offsets[0]=FLAG_OFFSET(status_update);
int k=line.gettoken_enum(1,"lastused\0listonly\0textonly\0both\0none\0");
int k=line.gettoken_enum(1,"both\0textonly\0listonly\0none\0lastused\0");
if (k<0) PRINTHELP()
if (k == 0)
if (k == 4)
{
ent.offsets[2]=1;
}
else
{
if (k == 4)
{
k = 16;
}
else
{
k <<= 1;
}
ent.offsets[1]=add_intstring(k);
// both 0
// textonly 2
// listonly 4
// none 6
ent.offsets[1]=add_intstring(k*2);
}
SCRIPT_MSG("SetDetailsPrint: %s\n",line.gettoken_str(1));
}