From fbc45ca35ec37193c98efe2e804278b26ef34eb6 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 19 May 2003 14:12:31 +0000 Subject: fix #3560 (drakboot not updating bootloader label): the only confusing bug is that when one come back to drakboot main window after having altered the bootloader, the main window still list the old bootloader as the current bootloader. let update this label. btw consolidate bootloader detection in bootloader::detect_bootloader() --- perl-install/standalone/drakboot | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'perl-install/standalone/drakboot') diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot index a83bd00c0..e75045c6b 100755 --- a/perl-install/standalone/drakboot +++ b/perl-install/standalone/drakboot @@ -49,7 +49,7 @@ ugtk2->import(qw(:helpers :wrappers :create)); my $no_bootsplash; my $x_mode = Xconfig::various::runlevel() == 5; my $auto_mode = any::get_autologin(); -my $lilogrub = chomp_(`detectloader -q`); +my $lilogrub = bootloader::detect_bootloader(); my $w = ugtk2->new(N("Boot Style Configuration")); my $window = $w->{window}; @@ -239,8 +239,7 @@ gtkadd($window, gtkadd(new Gtk2::Frame($disp_mode), # gtkpack__(new Gtk2::VBox(0,0), (gtkpack_(gtkset_border_width(new Gtk2::HBox(0, 0),5), - 1, N("You are currently using %s as your boot manager. -Click on Configure to launch the setup wizard.", $lilogrub), + 1, my $boot_label = Gtk2::Label->new(""), 0, gtksignal_connect(new Gtk2::Button(N("Configure")), clicked => \&lilo_choice), )), # "" #we need some place under the button -- replaced by gtkset_border_width( for the moment @@ -306,10 +305,18 @@ $x_box->set_sensitive($x_mode); $auto_box->set_sensitive($auto_mode->{autologin} ? 1 : 0); $window->show_all(); $no_bootsplash and $thm_frame->hide(); +update_bootloader_label($lilogrub); gtkflush(); $w->main; $in->exit(0); + +sub update_bootloader_label { + my ($bootloader) = @_; + $boot_label->set_label(N("You are currently using %s as your boot manager. +Click on Configure to launch the setup wizard.", $bootloader)); +} + sub lilo_choice() { my $bootloader = bootloader::read(); @@ -329,6 +336,7 @@ sub lilo_choice() { [ N("Installation of %s failed. The following error occured:", $loader), $err ]); goto ask; } + update_bootloader_label(bootloader::detect_bootloader()); } -- cgit v1.2.1