summaryrefslogtreecommitdiffstats
path: root/perl-install/install_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-12-17 16:03:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-12-17 16:03:04 +0000
commit6902e4292254fac7e7088e82c7acc67819a34705 (patch)
tree41a03caa0819a4a02ae52ad79f63eafae10a1fdd /perl-install/install_gtk.pm
parent1f827eb197702deabebe3ff7b2dd228d4eae3461 (diff)
downloaddrakx-backup-do-not-use-6902e4292254fac7e7088e82c7acc67819a34705.tar
drakx-backup-do-not-use-6902e4292254fac7e7088e82c7acc67819a34705.tar.gz
drakx-backup-do-not-use-6902e4292254fac7e7088e82c7acc67819a34705.tar.bz2
drakx-backup-do-not-use-6902e4292254fac7e7088e82c7acc67819a34705.tar.xz
drakx-backup-do-not-use-6902e4292254fac7e7088e82c7acc67819a34705.zip
don't parse the theme rc file to set the root window background color during install,
instead use the gc of a fake window named "background"
Diffstat (limited to 'perl-install/install_gtk.pm')
-rw-r--r--perl-install/install_gtk.pm24
1 files changed, 10 insertions, 14 deletions
diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm
index 59eff6373..28256021d 100644
--- a/perl-install/install_gtk.pm
+++ b/perl-install/install_gtk.pm
@@ -13,8 +13,6 @@ 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"
@@ -57,17 +55,10 @@ widget "*logo*" style "background-logo"
sub load_rc {
my ($o, $name) = @_;
- 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 { $_ * 255 * 255 } split ',', $1 if /NORMAL.*\{(.*)\}/;
- }
- }
+ my $f = $name;
+ -r $name or $f = find { -r $_ } map { "$_/themes-$name.rc" } ("share", $ENV{SHARE_PATH}, dirname(__FILE__));
+ if ($f) {
+ Gtk2::Rc->parse_string($o->{doc} ? $theme_overriding_for_doc : scalar cat_($f));
}
if ($::move) {
@@ -118,7 +109,12 @@ sub install_theme {
load_rc($o, $o->{theme} ||= default_theme($o));
load_font($o);
- mygtk2::set_root_window_background(@background) if !$::move;
+
+ if (!$::move) {
+ my $win = gtknew('Window', widget_name => 'background');
+ $win->realize;
+ mygtk2::set_root_window_background_with_gc($win->style->bg_gc('normal'));
+ }
}
#------------------------------------------------------------------------------