diff --git a/ivette/src/frama-c/kernel/Properties.tsx b/ivette/src/frama-c/kernel/Properties.tsx index 4cbb8f9919c8bff9d838215bfb9b498d6d2f06bb..d458118d53dbd4c958eab47c4c557d114789cb51 100644 --- a/ivette/src/frama-c/kernel/Properties.tsx +++ b/ivette/src/frama-c/kernel/Properties.tsx @@ -142,7 +142,9 @@ function filterSummary(prefix: string) : string { if (filter(key)) enabled++; } } - return `${enabled} / ${total}`; + if (enabled == 0) return '(none)'; + if (enabled == total) return '(all)'; + return `(${enabled}/${total})`; } function filterStatus( @@ -416,7 +418,7 @@ async function onContextMenu(prefix:string): Promise<void> { function FilterSection(props: SectionProps): JSX.Element { const settings = `properties-section-${props.label}`; - const { prefix } = props; + const { label, prefix } = props; const filterButtonProps = prefix ? { icon: 'TUNINGS', @@ -425,14 +427,13 @@ function FilterSection(props: SectionProps): JSX.Element { } : undefined; const update = Dome.useForceUpdate(); Settings.useWindowSettingsEvent(update); - const summary = prefix ? filterSummary(prefix) : undefined; + const theLabel = prefix ? `${label} ${filterSummary(prefix)}` : label; return ( <Section - label={props.label} + label={theLabel} settings={settings} defaultUnfold={props.unfold} rightButtonProps={filterButtonProps} - summary={summary} > {props.children} </Section>