summaryrefslogtreecommitdiffstats
path: root/menus_launcher.pl
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-01-27 08:31:50 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-01-27 08:31:50 +0000
commitca8dce326734050448f93fdfd6b93c6a779dd2c5 (patch)
tree4e38db711375f9b17ea76b650a5b4fea46803820 /menus_launcher.pl
parentdacd55976cce68ca91a72ff906a94da2c0560d2f (diff)
downloadcontrol-center-ca8dce326734050448f93fdfd6b93c6a779dd2c5.tar
control-center-ca8dce326734050448f93fdfd6b93c6a779dd2c5.tar.gz
control-center-ca8dce326734050448f93fdfd6b93c6a779dd2c5.tar.bz2
control-center-ca8dce326734050448f93fdfd6b93c6a779dd2c5.tar.xz
control-center-ca8dce326734050448f93fdfd6b93c6a779dd2c5.zip
sort users by lexical order, but keep root as first shown user
Diffstat (limited to 'menus_launcher.pl')
-rwxr-xr-xmenus_launcher.pl6
1 files changed, 3 insertions, 3 deletions
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 &\"") });