[yast-commit] r52680 - /trunk/nfs-client/src/ui.ycp
Author: kmachalkova
Date: Wed Oct 29 16:05:10 2008
New Revision: 52680
URL: http://svn.opensuse.org/viewcvs/yast?rev=52680&view=rev
Log:
Correct enabling/disabling of edit and delete buttons
depending on # of nfs shares (#438665)
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=52680&r1=52679&r2=52680&view=diff
==============================================================================
--- trunk/nfs-client/src/ui.ycp (original)
+++ trunk/nfs-client/src/ui.ycp Wed Oct 29 16:05:10 2008
@@ -431,6 +431,12 @@
specific <b>NFSv4 Domain Name</b>, required for correct setting of file/directory access
rights.</p>") + fw_cwm_widget["help"]:"";
+ void EnableDisableButtons()
+ {
+ UI::ChangeWidget(`id(`editbut), `Enabled, ( nfs_entries != [] ) );
+ UI::ChangeWidget(`id(`delbut), `Enabled, ( nfs_entries != [] ) );
+ }
+
term FstabTab()
{
term fstab_content =
@@ -496,10 +502,7 @@
void InitFstabEntries( )
{
UI::ChangeWidget (`id(`fstable), `Items, FstabTableItems (nfs_entries));
-
- integer entryno = (integer) UI::QueryWidget(`id(`fstable), `CurrentItem);
- UI::ChangeWidget (`id(`editbut), `Enabled, entryno != nil);
- UI::ChangeWidget (`id(`delbut), `Enabled, entryno != nil);
+ EnableDisableButtons();
// Kludge, because a `Table still does not have a shortcut.
// Simple to solve here: there's only the table and buttons,
@@ -545,11 +548,13 @@
map
participants (1)
-
kmachalkova@svn.opensuse.org