summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcontrol-center20
1 files changed, 14 insertions, 6 deletions
diff --git a/control-center b/control-center
index 35e8c5bd..bba60472 100755
--- a/control-center
+++ b/control-center
@@ -1233,12 +1233,13 @@ sub clean_list {
foreach (@tree) {
- my ($text, $icon, $subtree) = @$_;
+ my ($text, $icon, $subtrees) = @$_;
+
+ my @subtrees = grep { !is_empty_array_ref($_->{list}) } @$subtrees;
- my @subtree = clean_list($subtree);
# Skip empty classes:
- next if !@subtree;
+ next if !@subtrees;
my $_my_index = $index++;
my $string = join("\n", qq(<HTML>
@@ -1256,7 +1257,7 @@ foreach (@tree) {
</style>
</HEAD>
-<BODY><TABLE BORDER=0 cellspacing="20" WIDTH="100%">
+<BODY>
));
my $view = Gtk2::Html2::View->new;
my $document = Gtk2::Html2::Document->new;
@@ -1276,6 +1277,11 @@ foreach (@tree) {
# Create right notebook pages :
+ foreach my $subtree (@subtrees) {
+ $string .= qq(
+<h2>$subtree->{title}</h2>
+<TABLE BORDER=0 cellspacing="20" WIDTH="100%">
+);
$string .= join("\n",
map {
"<TR>" . join("\n", grep { defined $_ } @$_) . "</TR>" }
@@ -1302,14 +1308,16 @@ foreach (@tree) {
@widgets
</TR></TABLE>
);
- } @subtree)
+ } @{$subtree->{list}})
);
+ $string .= "</TABLE>\n";
+ }
# b/c we use Pango text markup language, we've to protect '&' caracter:
$text =~ s/&/&amp;/g;
$page_count++;
- $string .= qq(</TABLE></BODY></HTML>);
+ $string .= qq(</BODY></HTML>);
$document->clear;
$document->open_stream("text/html");