From d1f8d4589687bb481157a1372a41e37cdbc732ca Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 9 Feb 2004 14:54:39 +0000 Subject: resurrect 9.2 code for setting background. i was said to remove it for move because default colour is already mandrake colour but obviously it isn't. --- perl-install/install_gtk.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'perl-install/install_gtk.pm') diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm index 2c5d414ed..78eee6bc5 100644 --- a/perl-install/install_gtk.pm +++ b/perl-install/install_gtk.pm @@ -12,6 +12,8 @@ use devices; #-INTERN CONSTANT #-##################################################################################### +my @background; + #- if we're running for the doc team, we want screenshots with #- a good B&W contrast: we'll override values of our theme my $theme_overriding_for_doc = q(style "galaxy-default" @@ -60,7 +62,12 @@ sub load_rc { $o->{doc} and push @contents, $theme_overriding_for_doc; Gtk2::Rc->parse_string(join("\n", @contents)); - } + foreach (@contents) { + if (/style\s+"background"/ .. /^\s*$/) { + @background = map { $_ * 256 * 257 } split ',', $1 if /NORMAL.*\{(.*)\}/; + } + } + } if ($::move) { #- override selection color since we won't do inverse-video on the text when it's images @@ -111,6 +118,7 @@ sub install_theme { load_rc($o, $o->{theme} ||= default_theme($o)); load_font($o); + $::move or gtkset_background(@background); } #------------------------------------------------------------------------------ -- cgit v1.2.1