summaryrefslogtreecommitdiffstats
path: root/perl-install/install_gtk.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-10-15 13:40:24 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-10-15 13:40:24 +0000
commit33a75dde718cf7af5d12240c708ddfe05261deda (patch)
tree040aadb4d6fa9928ccea9e163de8266bb4ec7c02 /perl-install/install_gtk.pm
parenta42be79f5542b924e15756fb84a29eca66fa726c (diff)
downloaddrakx-backup-do-not-use-33a75dde718cf7af5d12240c708ddfe05261deda.tar
drakx-backup-do-not-use-33a75dde718cf7af5d12240c708ddfe05261deda.tar.gz
drakx-backup-do-not-use-33a75dde718cf7af5d12240c708ddfe05261deda.tar.bz2
drakx-backup-do-not-use-33a75dde718cf7af5d12240c708ddfe05261deda.tar.xz
drakx-backup-do-not-use-33a75dde718cf7af5d12240c708ddfe05261deda.zip
use installed galaxy gnome theme in move
Diffstat (limited to 'perl-install/install_gtk.pm')
-rw-r--r--perl-install/install_gtk.pm16
1 files changed, 8 insertions, 8 deletions
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;
}
#------------------------------------------------------------------------------