diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-03 17:01:26 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-03 17:01:26 +0000 |
commit | ff9b44a245ff217232d0feb8eebac9df5d1dd5f9 (patch) | |
tree | c961c6da4a2b12e42796649570524fa536054d51 /perl-install/install/steps_interactive.pm | |
parent | 62135b5ce9b002b7d6b676d0183b985e1c23900c (diff) | |
download | drakx-ff9b44a245ff217232d0feb8eebac9df5d1dd5f9.tar drakx-ff9b44a245ff217232d0feb8eebac9df5d1dd5f9.tar.gz drakx-ff9b44a245ff217232d0feb8eebac9df5d1dd5f9.tar.bz2 drakx-ff9b44a245ff217232d0feb8eebac9df5d1dd5f9.tar.xz drakx-ff9b44a245ff217232d0feb8eebac9df5d1dd5f9.zip |
- nicer "choose desktop" step with icons
Diffstat (limited to 'perl-install/install/steps_interactive.pm')
-rw-r--r-- | perl-install/install/steps_interactive.pm | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm index f7323c2e7..3783bc792 100644 --- a/perl-install/install/steps_interactive.pm +++ b/perl-install/install/steps_interactive.pm @@ -409,19 +409,27 @@ The format is the same as auto_install generated files."), sub _chooseDesktop { my ($o, $rpmsrate_flags_chosen, $chooseGroups) = @_; - my @l = ( - N_("Install Mandriva KDE Desktop"), - N_("Install Mandriva GNOME Desktop"), - N_("Custom install"), + my @l = group_by2( + KDE => N("Install Mandriva KDE Desktop"), + GNOME => N("Install Mandriva GNOME Desktop"), + Custom => N("Custom install"), ); + my $title = N("Package Group Selection"); + my $message = N("You can choose your workstation desktop profile: KDE, GNOME or Custom"); my $choice; - $o->ask_from_({}, [ - { val => \$choice, list => \@l, type => 'list', format => \&translate }, - ]); - log::l("chosen Desktop: $choice"); - if (my ($desktop) = $choice =~ /(KDE|GNOME)/) { - my ($want, $dontwant) = ($desktop, grep { $desktop ne $_ } 'KDE', 'GNOME'); + if ($o->isa('interactive::gtk') && 0) { + $choice = install::steps_gtk::reallyChooseDesktop($o, $title, $message, \@l); + } else { + $o->ask_from_({ title => $title, message => $message }, [ + { val => \$choice, list => \@l, type => 'list', format => sub { $_[0][1] } }, + ]); + } + my $desktop = $choice->[0]; + log::l("chosen Desktop: $desktop"); + my @desktops = ('KDE', 'GNOME'); + if (member($desktop, @desktops)) { + my ($want, $dontwant) = ($desktop, grep { $desktop ne $_ } @desktops); $rpmsrate_flags_chosen->{"CAT_$want"} = 1; $rpmsrate_flags_chosen->{"CAT_$dontwant"} = 0; my @flags = map_each { if_($::b, $::a) } %$rpmsrate_flags_chosen; |