summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/install2.pm8
-rw-r--r--perl-install/install_gtk.pm23
-rw-r--r--perl-install/install_steps_gtk.pm2
-rw-r--r--perl-install/my_gtk.pm3
4 files changed, 14 insertions, 22 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index e16f95678..c4305b0aa 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -577,8 +577,12 @@ sub main {
$clicked = 1;
redo MAIN;
}
- /^theme_changed$/ and redo MAIN;
- unless (/^already displayed/) {
+ if (/^set_theme$/) {
+ require install_gtk;
+ install_gtk::install_theme($o, 'marble3d');
+ redo MAIN;
+ }
+ if (!/^already displayed/) {
eval { $o->errorInStep($_) };
$o->{steps}{$o->{step}}{auto} = 0;
$err = $@;
diff --git a/perl-install/install_gtk.pm b/perl-install/install_gtk.pm
index f33495571..0b0804a0c 100644
--- a/perl-install/install_gtk.pm
+++ b/perl-install/install_gtk.pm
@@ -11,10 +11,6 @@ use devices;
#-#####################################################################################
#-INTERN CONSTANT
#-#####################################################################################
-my @themes_vga16 = qw(blue blackwhite savane);
-my @themes_desktop = qw(mdk-Desktop marble3d);
-my @themes_firewall = qw(mdk-Firewall);
-my @themes = qw(mdk marble3d);
my (@background1, @background2);
@@ -36,10 +32,9 @@ sub load_rc {
sub default_theme {
my ($o) = @_;
- @themes = @themes_desktop if $o->{meta_class} eq 'desktop';
- @themes = @themes_firewall if $o->{meta_class} eq 'firewall';
- @themes = @themes_vga16 if $o->{simple_themes} || $o->{vga16};
- install_theme($o, $o->{theme} || $themes[0]);
+ $o->{meta_class} eq 'desktop' ? 'blue' :
+ $o->{meta_class} eq 'firewall' ? 'mdk-Firewall' :
+ $o->{simple_themes} || $o->{vga16} ? 'blue' : 'mdk';
}
#------------------------------------------------------------------------------
@@ -156,17 +151,7 @@ sub create_steps_window {
gtkpack_(new Gtk::HBox(0,5), 0, $darea, 0, new Gtk::Label(translate($step->{text})));
} grep {
!eval $o->{steps}{$_}{hidden};
- } @{$o->{orderedSteps}}),
- 0, gtkpack(new Gtk::HBox(0,0), map {
- my $t = $_;
- my $w = new Gtk::Button('');
- $w->set_name($t);
- $w->set_usize(0, 7);
- gtksignal_connect($w, clicked => sub {
- $::setstep or return; #- just as setstep s
- install_theme($o, $t); die "theme_changed\n"
- });
- } @themes)));
+ } @{$o->{orderedSteps}})));
$w->show;
$o->{steps_window} = $w;
}
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 10f964191..9fc63db6e 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -107,7 +107,7 @@ sub new($$) {
}
OK:
install_gtk::init_sizes();
- install_gtk::default_theme($o);
+ install_gtk::install_theme($o, install_gtk::default_theme($o));
install_gtk::create_logo_window($o);
$my_gtk::force_center = [ $::rootwidth - $::windowwidth, $::logoheight, $::windowwidth, $::windowheight ];
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 28abc7ceb..d41430c7a 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -222,6 +222,7 @@ sub _create_window($$) {
$w->signal_connect(key_press_event => sub {
my $d = ${{ 0xffbe => 'help',
0xffbf => 'screenshot',
+ 0xffc2 => 'set_theme',
0xffc9 => 'next',
0xffc8 => 'previous' }}{$_[1]{keyval}};
@@ -230,6 +231,8 @@ sub _create_window($$) {
install_gtk::create_big_help($::o);
} elsif ($::isInstall && $d eq 'screenshot') {
common::take_screenshot($o);
+ } elsif ($::isInstall && $d eq 'set_theme') {
+ $::setstep and die "set_theme\n"; #- set_theme is similar to setstep, don't raise one when not allowed to
} elsif (chr($_[1]{keyval}) eq 'e' && $_[1]{state} & 8) {
log::l("Switching to " . ($::expert ? "beginner" : "expert"));
$::expert = !$::expert;