diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-09-25 00:06:15 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-09-25 00:06:15 +0000 |
commit | c914424fcb95b8f46fa706ff63c10d9645050c8b (patch) | |
tree | f09248689dd204bf1c761f2e234ae77a9e218a12 /control-center | |
parent | 8a425956787096d607cb316dd7398776cfdd57be (diff) | |
download | control-center-c914424fcb95b8f46fa706ff63c10d9645050c8b.tar control-center-c914424fcb95b8f46fa706ff63c10d9645050c8b.tar.gz control-center-c914424fcb95b8f46fa706ff63c10d9645050c8b.tar.bz2 control-center-c914424fcb95b8f46fa706ff63c10d9645050c8b.tar.xz control-center-c914424fcb95b8f46fa706ff63c10d9645050c8b.zip |
handle --save-html-pages in order to debug HTML pages generated by mcc
Diffstat (limited to 'control-center')
-rwxr-xr-x | control-center | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/control-center b/control-center index 12ccc6b7..6cd3f48b 100755 --- a/control-center +++ b/control-center @@ -68,7 +68,7 @@ my %option_values; $option_values{show_log} = text2bool($h{LOGS}); my $theme = $h{THEME}; my $program; -my ($i, $geometry); +my ($i, $geometry, $save_html); foreach (@ARGV) { $i++; $theme = $1 if /--theme (\w+)/; @@ -77,6 +77,7 @@ foreach (@ARGV) { $geometry = splice @ARGV, $i, 1; last; } + $save_html = 1 if /--save-html-pages/; } -d "$themes_dir/$theme" or $theme = 'default'; @@ -780,6 +781,7 @@ sub clean_list { my @labels; sub build_list { + my $i; foreach (@tree) { my ($text, $icon, $help, $subtrees) = @$_; @@ -788,6 +790,7 @@ foreach (@tree) { # Skip empty classes: next if !@subtrees; + $i++; my $my_index = $index++; @@ -870,6 +873,7 @@ foreach (@tree) { $page_count++; $string .= qq(</BODY></HTML>); + output_p("/tmp/mcc/$i.html", $string) if $save_html; $labels[$index-1]{text} = $text; $labels[$index-1]{help} = $help; |