From ca8dce326734050448f93fdfd6b93c6a779dd2c5 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 27 Jan 2003 08:31:50 +0000 Subject: sort users by lexical order, but keep root as first shown user --- menus_launcher.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'menus_launcher.pl') diff --git a/menus_launcher.pl b/menus_launcher.pl index 17dfcb11..3175dea0 100755 --- a/menus_launcher.pl +++ b/menus_launcher.pl @@ -39,10 +39,10 @@ $table->attach($b1, 1, 2, 0, 1, 'fill', 'fill', 0, 0); $table->attach(Gtk2::Label->new(N("User menu")), 0, 1, 1, 2, 'fill', 'fill', 0, 0); my $combo = Gtk2::Combo->new; -$combo->set_popdown_strings(map { +$combo->set_popdown_strings("root", sort(map { my ($username, undef, $uid) = @$_; - if_($uid == 0 || 500 < $uid && $username ne "nobody", $username); -} &list_passwd()); + if_(500 < $uid && $username ne "nobody", $username); +} &list_passwd())); $table->attach($combo, 2, 3, 1, 2, 'fill', 'fill', 0, 0); my $b2 = gtksignal_connect(Gtk2::Button->new(N("Configure...")), clicked => sub { my $a = $combo->entry->get_text(); system($a eq "root" ? "$bindir/menudrake --usermenu &" : " su $a -c \"$bindir/menudrake &\"") }); -- cgit v1.2.1