From 3adde30fee811cc5caa365fadb738962ca6f1dc9 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Fri, 22 Jul 2005 03:08:18 +0000 Subject: remove duplicate entry in access list --- perl-install/standalone/draknfs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/perl-install/standalone/draknfs b/perl-install/standalone/draknfs index 92857a014..495c2e00f 100644 --- a/perl-install/standalone/draknfs +++ b/perl-install/standalone/draknfs @@ -275,8 +275,8 @@ sub add_modify_entry { $_ = Gtk2::OptionMenu->new foreach $lr, $luserid, $lsecure, $lsync; $access = Gtk2::ComboBoxEntry->new_text; -# $access = Gtk2::OptionMenu; - foreach (get_access_list()) { + my @access_list = get_access_list(); + foreach (@access_list) { $_ and $access->append_text($_); } @@ -309,9 +309,11 @@ sub add_modify_entry { my $path = $model->get_path($iter); $i = ($path->get_indices)[0]; $dir->set_text($listshare[$i]{dir}); - $access->append_text($listshare[$i]{access}); + if (!member($listshare[$i]{access}, @access_list)) { + $access->append_text($listshare[$i]{access}); + } $access->child->set_text($listshare[$i]{access}); -# $access->set_active(0); + # list of all rigth in bracket # $anongid, $anonuid, $lr, $luserid, $lsecure, $lsync; $right = $listshare[$i]{right}; -- cgit v1.2.1