diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-14 13:25:11 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-01-14 13:25:11 +0000 |
commit | 2542f296e8ea67c7fecb3f2eb70fac000e893f58 (patch) | |
tree | 5fd00c63ebeecb3d6184583ab3bf17ae55fa0845 /perl-install/standalone/drakboot | |
parent | 891ce159baf752d08fc575f609aec24265479c67 (diff) | |
download | drakx-2542f296e8ea67c7fecb3f2eb70fac000e893f58.tar drakx-2542f296e8ea67c7fecb3f2eb70fac000e893f58.tar.gz drakx-2542f296e8ea67c7fecb3f2eb70fac000e893f58.tar.bz2 drakx-2542f296e8ea67c7fecb3f2eb70fac000e893f58.tar.xz drakx-2542f296e8ea67c7fecb3f2eb70fac000e893f58.zip |
- offer to configure bootsplash only on --splash
- drop useless frames
- set main window title according to current mode (autologin,
bootloader or bootsplash)
Diffstat (limited to 'perl-install/standalone/drakboot')
-rwxr-xr-x | perl-install/standalone/drakboot | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot index 205088584..3ac6a9b6f 100755 --- a/perl-install/standalone/drakboot +++ b/perl-install/standalone/drakboot @@ -37,7 +37,7 @@ use POSIX; use Xconfig::various; use log; -my $splash_working = 1; +my $splash_working = any { /^--splash$/ } @ARGV; my $in = 'interactive'->vnew('su'); @@ -55,7 +55,7 @@ my $auto_mode = any::get_autologin(); my $lilogrub = bootloader::detect_bootloader(); my $switch_theme = '/usr/share/bootsplash/scripts/switch-themes'; -my $w = ugtk2->new(N("Boot Style Configuration")); +my $w = ugtk2->new($splash_working ? N("Graphical boot theme selection") : N("System mode")); my $window = $w->{window}; $::main_window = $w->{rwindow} if !$::isEmbedded; @@ -138,9 +138,8 @@ my ($x_box,$splash_box); gtkadd($window, gtkpack_(new Gtk2::VBox(0,0), #Splash Selector - if_($splash_working, - 0, gtkadd(my $thm_frame = new Gtk2::Frame(N("Graphical boot theme selection")), - gtkpack(gtkset_border_width(new Gtk2::VBox(0, 5), 5), + ($splash_working ? + (0, gtkpack(gtkset_border_width(new Gtk2::VBox(0, 5), 5), gtksignal_connect(gtkset_active(new Gtk2::CheckButton(N("Use graphical boot")), $splash_mode), clicked => sub { $splash_box->set_sensitive(!$splash_mode); @@ -156,9 +155,8 @@ gtkadd($window, $boot_pic)) ), ), - ), - 0, gtkadd(new Gtk2::Frame(N("System mode")), - gtkpack__(new Gtk2::VBox(0, 5), + : + (0, gtkpack__(new Gtk2::VBox(0, 5), gtksignal_connect(gtkset_active(new Gtk2::CheckButton(N("Launch the graphical environment when your system starts")), $x_mode), clicked => sub { $x_box->set_sensitive(!$x_mode); $x_mode = !$x_mode; @@ -193,20 +191,22 @@ gtkadd($window, ugtk2->exit(0); } }, + ), + ) ) ); -$auto_buttons[0]->signal_connect('toggled' => sub { $auto_box->set_sensitive($auto_buttons[0]->get_active) }); -$auto_buttons[1]->signal_connect('toggled' => sub { $auto_box->set_sensitive(!$auto_buttons[1]->get_active) }); -$auto_buttons[0]->set_active(1) if $auto_mode->{autologin}; -$auto_buttons[1]->set_active(1) if !$auto_mode->{autologin}; +if (!$splash_working) { + $auto_buttons[0]->signal_connect('toggled' => sub { $auto_box->set_sensitive($auto_buttons[0]->get_active) }); + $auto_buttons[1]->signal_connect('toggled' => sub { $auto_box->set_sensitive(!$auto_buttons[1]->get_active) }); + $auto_buttons[0]->set_active(1) if $auto_mode->{autologin}; + $auto_buttons[1]->set_active(1) if !$auto_mode->{autologin}; + $x_box->set_sensitive($x_mode); + $auto_box->set_sensitive($auto_mode->{autologin} ? 1 : 0); +} -$x_box->set_sensitive($x_mode); -$auto_box->set_sensitive($auto_mode->{autologin} ? 1 : 0); $window->show_all; -#$no_bootsplash and $thm_frame->set_sensitive(0); -$thm_frame->hide if !$splash_working; gtkflush(); $w->main; $in->exit(0); |