size optimization
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4253 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8b91e361ca
commit
0bca3c8255
2 changed files with 11 additions and 14 deletions
|
@ -34,17 +34,17 @@ void NSISCALL SectionFlagsChanged(unsigned int index) {
|
|||
}
|
||||
}
|
||||
|
||||
static unsigned int NSISCALL _RefreshSectionGroups(unsigned int i, int first_call) {
|
||||
unsigned int NSISCALL _RefreshSectionGroups(unsigned int i, int not_first_call) {
|
||||
unsigned int selected = 0;
|
||||
unsigned int not_selected = 0;
|
||||
|
||||
section *sections = g_sections;
|
||||
|
||||
unsigned int sec = i;
|
||||
section *sec = §ions[i];
|
||||
|
||||
if (sections[sec].flags & SF_SECGRP) {
|
||||
if (!first_call) {
|
||||
sections[sec].flags &= ~(SF_SELECTED | SF_PSELECTED);
|
||||
if (sec->flags & SF_SECGRP) {
|
||||
if (not_first_call) {
|
||||
sec->flags &= ~(SF_SELECTED | SF_PSELECTED);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -54,17 +54,17 @@ static unsigned int NSISCALL _RefreshSectionGroups(unsigned int i, int first_cal
|
|||
int ni = i + 1;
|
||||
|
||||
if (flags & SF_SECGRP) {
|
||||
ni = _RefreshSectionGroups(i, 0);
|
||||
ni = _RefreshSectionGroups(i, 1);
|
||||
flags = sections[i].flags;
|
||||
}
|
||||
|
||||
if (flags & SF_SECGRPEND) {
|
||||
if (selected) {
|
||||
if (not_selected) {
|
||||
sections[sec].flags |= SF_PSELECTED;
|
||||
sec->flags |= SF_PSELECTED;
|
||||
} else {
|
||||
sections[sec].flags |= SF_SELECTED;
|
||||
sections[sec].flags &= ~SF_TOGGLED;
|
||||
sec->flags |= SF_SELECTED;
|
||||
sec->flags &= ~SF_TOGGLED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,10 +87,6 @@ static unsigned int NSISCALL _RefreshSectionGroups(unsigned int i, int first_cal
|
|||
return 0;
|
||||
}
|
||||
|
||||
void NSISCALL RefreshSectionGroups() {
|
||||
_RefreshSectionGroups(0, 1);
|
||||
}
|
||||
|
||||
#ifdef NSIS_CONFIG_COMPONENTPAGE
|
||||
|
||||
void NSISCALL SetInstType(int inst_type) {
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
#define ___COMPONENTS_H___
|
||||
|
||||
void NSISCALL SectionFlagsChanged(unsigned int index);
|
||||
void NSISCALL RefreshSectionGroups();
|
||||
#define RefreshSectionGroups() _RefreshSectionGroups(0, 0)
|
||||
unsigned int NSISCALL _RefreshSectionGroups(unsigned int i, int not_first_call);
|
||||
#ifdef NSIS_CONFIG_COMPONENTPAGE
|
||||
void NSISCALL SetInstType(int inst_type);
|
||||
unsigned int NSISCALL GetInstType(HTREEITEM *items);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue