From 33a75dde718cf7af5d12240c708ddfe05261deda Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Wed, 15 Oct 2003 13:40:24 +0000 Subject: use installed galaxy gnome theme in move --- perl-install/install_gtk.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'perl-install/install_gtk.pm') diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm index 7bc3e725a..50e116de1 100644 --- a/perl-install/install_gtk.pm +++ b/perl-install/install_gtk.pm @@ -12,7 +12,7 @@ use devices; #-INTERN CONSTANT #-##################################################################################### -my @background; +my @background = qw(0.28 0.38 0.66); #- default is the mandrake blue 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 @@ -56,15 +56,15 @@ widget "*logo*" style "background-logo" sub load_rc { my ($o, $name) = @_; - if (my $f = find { -r $_ } map { "$_/$name.rc" } ("share", $ENV{SHARE_PATH}, dirname(__FILE__))) { - + if (my $f = -r $name ? $name + : find { -r $_ } map { "$_/themes-$name.rc" } ("share", $ENV{SHARE_PATH}, dirname(__FILE__))) { my @contents = cat_($f); $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.*\{(.*)\}/; + @background = split ',', $1 if /NORMAL.*\{(.*)\}/; } } } @@ -95,17 +95,17 @@ widget "*" style "default-font" #------------------------------------------------------------------------------ sub default_theme { my ($o) = @_; + $::move ? '/usr/share/themes/Galaxy/gtk-2.0/gtkrc' : $o->{meta_class} eq 'firewall' ? 'mdk-Firewall' : - $o->{simple_themes} || $o->{vga16} ? 'blue' : 'galaxy'; + $o->{simple_themes} || $o->{vga16} ? 'blue' : 'galaxy'; } sub install_theme { my ($o) = @_; - $o->{theme} ||= default_theme($o); - load_rc($o, "themes-$o->{theme}"); + load_rc($o, $o->{theme} ||= default_theme($o)); load_font($o); - gtkset_background(@background) unless $::live; #- || testing; + gtkset_background(map { $_ * 256 * 257 } @background) unless $::live; #- || testing; } #------------------------------------------------------------------------------ -- cgit v1.2.1