From 671171d1c00ad62e761b7dfcf4bd99187c01a7d4 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 2 May 2016 08:37:11 +0200 Subject: pretty format --- perl-install/any.pm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'perl-install/any.pm') diff --git a/perl-install/any.pm b/perl-install/any.pm index 0fbe7e0a6..e71132b69 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -989,6 +989,25 @@ sub urpmi_add_all_media { $val; } +sub format_wm { + my ($wm) = @_; + return { + cinnamon => 'Cinnamon', + enlightenment => 'Enlightenment', + 'gnome-classic' => 'Gnome Classic', + gnome => 'Gnome', + i3 => 'I3', + 'i3-with-shmlog' => 'I3 with shmlog', + lxqt => 'LxQt', + mate => 'Mate', + openbox => 'OpenBox', + 'plasma-mediacenter' => 'Plasma Mediacenter', + '01plasma' => 'Plasma', + sugar => 'Sugar', + xfce => 'XFCE', + }->{$wm}; +} + sub autologin { my ($o, $in) = @_; @@ -1007,7 +1026,7 @@ sub autologin { messages => N("I can set up your computer to automatically log on one user.") }, [ { text => N("Use this feature"), val => \$use_autologin, type => 'bool' }, { label => N("Choose the default user:"), val => \$o->{autologin}, list => \@users, disabled => sub { !$use_autologin } }, - { label => N("Choose the window manager to run:"), val => \$o->{desktop}, list => \@wm, disabled => sub { !$use_autologin } } ] + { label => N("Choose the window manager to run:"), val => \$o->{desktop}, list => \@wm, disabled => sub { !$use_autologin }, format => \&format_wm } ] ); delete $o->{autologin} if !$use_autologin; } else { -- cgit v1.2.1