summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/install_steps_gtk.pm29
-rw-r--r--perl-install/install_steps_interactive.pm34
2 files changed, 4 insertions, 59 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 31cf25644..eeea9e05b 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -150,35 +150,6 @@ press `F1' when booting on CDROM, then enter `text'.")) if $first_time && availa
}
#------------------------------------------------------------------------------
-sub selectInstallClass1 {
- my ($o, $verif, $l, $def, $l2, $def2) = @_;
- $::live || @$l == 1 || !@$l2 and return $o->SUPER::selectInstallClass1($verif, $l, $def, $l2, $def2);
-
- my $w = ugtk2->new(N("Install Class"));
- my ($focused, @radios);
- gtkadd($w->{window},
- gtkpack($w->create_box_with_title(N("Please choose one of the following classes of installation:")),
- (@radios = gtkradio($def, @$l)),
- gtkadd(create_vbox(),
- map { my $v = $_;
- my $b = Gtk2::Button->new(translate($_));
- $focused = $b if $_ eq $def2;
- gtksignal_connect($b, "clicked" => sub {
- $w->{retval} = $v;
- mapn { $verif->($_[1]) if $_[0]->get_active } \@radios, $l;
- Gtk2->main_quit
- });
- } @$l2)
- ));
- $focused->grab_focus if $focused;
- $w->main;
-
- install_gtk::create_steps_window($o);
-
- $w->{retval};
-}
-
-#------------------------------------------------------------------------------
sub selectMouse {
my ($o, $force) = @_;
my %old = %{$o->{mouse}};
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index f0b150142..2652ea99e 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -122,44 +122,18 @@ sub selectKeyboard {
any::keyboard_group_toggle_choose($o, $o->{keyboard}) or goto &selectKeyboard;
install_steps::selectKeyboard($o);
}
-#------------------------------------------------------------------------------
-sub selectInstallClass1 {
- my ($o, $verif, $l, $def, $l2, $def2) = @_;
- $verif->($o->ask_from_list(N("Install Class"), N("Which installation class do you want?"), $l, $def) || die 'already displayed');
-
- return if !@$l2;
-
- $::live ? 'Update' : $o->ask_from_list_(N("Install/Update"), N("Is this an install or an update?"), $l2, $def2);
-}
#------------------------------------------------------------------------------
sub selectInstallClass {
my ($o, $clicked) = @_;
- my %c = my @c = (
- if_(!$::corporate,
- N("Recommended") => "beginner",
- ),
- if_($o->{meta_class} ne 'desktop',
- N("Expert") => "expert",
- ),
- );
- %c = @c = (N("Expert") => "expert") if $::expert && !$clicked;
-
- $o->set_help('selectInstallClassCorpo') if $::corporate;
-
- my $verifInstallClass = sub { $::expert = $c{$_[0]} eq "expert" };
my $installMode = $o->{isUpgrade} ? $o->{keepConfiguration} ? N_("Upgrade packages only") : N_("Upgrade") : N_("Install");
- if ($installMode = $o->selectInstallClass1($verifInstallClass,
- first(list2kv(@c)), ${{ reverse %c }}{$::expert ? "expert" : "beginner"},
- exists $o->{isUpgrade} ? [] : [ N_("Install"), N_("Upgrade"), N_("Upgrade packages only") ], $installMode)) {
- log::l("install class: $installMode");
- $o->{isUpgrade} = $installMode =~ /Upgrade/;
- $o->{keepConfiguration} = $installMode =~ /packages only/;
- }
+ $installMode = exists $o->{isUpgrade} || $::live ? 'Update' : $o->ask_from_list_(N("Install/Update"), N("Is this an install or an update?"), [ N_("Install"), N_("Upgrade"), N_("Upgrade packages only") ], $installMode);
- install_steps::selectInstallClass($o);
+ log::l("install class: $installMode");
+ $o->{isUpgrade} = $installMode =~ /Upgrade/;
+ $o->{keepConfiguration} = $installMode =~ /packages only/;
}
#------------------------------------------------------------------------------