aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xuserdrake215
1 files changed, 10 insertions, 5 deletions
diff --git a/userdrake2 b/userdrake2
index 07fd0b2..10e3764 100755
--- a/userdrake2
+++ b/userdrake2
@@ -78,7 +78,11 @@ my ($menu, $factory) = create_factory_menu($us->{wnd}{rwindow},
$checkall = $factory->get_widget("<main>" . N("/Options") . N("/Filter system users"));
$checkedit = $factory->get_widget("<main>" . N("/Actions") . N("/Edit"));
$checkdel = $factory->get_widget("<main>" . N("/Actions") . N("/Delete"));
-$checkall->set_active($sysfilter);
+if (defined $checkall) {
+ $checkall->set_active($sysfilter);
+} else {
+ print STDERR "BUG with LANGUAGE $ENV{LANGUAGE}\n";
+}
my $toolb = Gtk2::Toolbar->new;
my $searchBox = Gtk2::HBox->new(0,5);
$searchBox->pack_end(my $fbut = Gtk2::Button->new("Apply filter"), 0, 0, 4);
@@ -138,16 +142,17 @@ sub NotebookSwitch {
}
sub RefreshUsersFull {
my ($filterusers, $strfilt) = @_;
- my $users = $ctx->UsersEnumerateFull();
+ my ($users, $gid, $group, $groupnm);
+ $users = $ctx->UsersEnumerateFull();
$utree_model->clear();
my @UserReal;
LOOP: foreach my $l (@$users) { next LOOP if ($filterusers && $l->Uid($GetValue) <= 499 || $l->Uid($GetValue) == 65534) ; push(@UserReal, $l) if $l->UserName($GetValue) =~ /^\Q$strfilt/; };
foreach my $l (@UserReal) {
- my $a = $l->Gid($GetValue); my $group = $ctx->LookupGroupById($a);
- $utree_model->append_set([ 0 => $l->UserName($GetValue), 1 => $l->Uid($GetValue), 2 => $group->GroupName($GetValue), 3 => $l->Gecos($GetValue), 4 => $l->LoginShell($GetValue), 5 => $l->HomeDir($GetValue) ]);
+ $a = $l->Gid($GetValue); $group = $ctx->LookupGroupById($a); $groupnm = '';
+ $group and $groupnm = $group->GroupName($GetValue);
+ $utree_model->append_set([ 0 => $l->UserName($GetValue), 1 => $l->Uid($GetValue), 2 => $groupnm, 3 => $l->Gecos($GetValue), 4 => $l->LoginShell($GetValue), 5 => $l->HomeDir($GetValue) ]);
}
}
-
sub RefreshGroupsFull {
my ($filtergroups, $strfilt) = @_;
my $groups = $ctx->GroupsEnumerateFull();