Author: kmachalkova
Date: Thu Sep 4 12:16:56 2008
New Revision: 50647
URL: http://svn.opensuse.org/viewcvs/yast?rev=50647&view=rev
Log:
Prompt user for confirmation of deleting NFS share
Modified:
trunk/nfs-client/src/ui.ycp
Modified: trunk/nfs-client/src/ui.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/nfs-client/src/ui.ycp?rev=50647&r1=50646&r2=50647&view=diff
==============================================================================
--- trunk/nfs-client/src/ui.ycp (original)
+++ trunk/nfs-client/src/ui.ycp Thu Sep 4 12:16:56 2008
@@ -539,10 +539,10 @@
{
integer count = 0;
nfs_entries = maplist(map ent, nfs_entries, ``{
- count = count+1;
- if (count-1 != entryno)
- return ent;
- return entry;
+ count = count+1;
+ if (count-1 != entryno)
+ return ent;
+ return entry;
});
modify_line = entry;
@@ -551,12 +551,14 @@
}
else if (widget == `delbut && size (nfs_entries) > 0)
{
- integer count = 0;
- //FIXME: prompt user for delete confirmation
- modify_line = nfs_entries[entryno]: $[];
- nfs_entries = remove (nfs_entries, entryno);
+ map share = nfs_entries[entryno]: $[];
+ if ( Popup::YesNo( sformat( _("Really delete %1?"), share["spec"]:"")) )
+ {
+ modify_line = share;
+ nfs_entries = remove (nfs_entries, entryno);
- UI::ChangeWidget (`id(`fstable), `Items, FstabTableItems (nfs_entries));
+ UI::ChangeWidget (`id(`fstable), `Items, FstabTableItems (nfs_entries));
+ }
}
else if (widget == `enable_nfs4)
{
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org