Author: jdsn Date: Thu Aug 28 13:52:15 2008 New Revision: 50443 URL: http://svn.opensuse.org/viewcvs/yast?rev=50443&view=rev Log: enable edit and delete buttons Modified: branches/tmp/jdsn/edu-users/src/Makefile.am branches/tmp/jdsn/edu-users/src/dialogs.ycp Modified: branches/tmp/jdsn/edu-users/src/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jdsn/edu-users/src/Makefile.am?rev=50443&r1=50442&r2=50443&view=diff ============================================================================== --- branches/tmp/jdsn/edu-users/src/Makefile.am (original) +++ branches/tmp/jdsn/edu-users/src/Makefile.am Thu Aug 28 13:52:15 2008 @@ -23,7 +23,7 @@ fillup_DATA = \ sysconfig.edu-users-yast2-edu-users -rnd_DATA = \ +rnc_DATA = \ edu-users.rnc # create a symlink for local build, #145327 Modified: branches/tmp/jdsn/edu-users/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/jdsn/edu-users/src/dialogs.ycp?rev=50443&r1=50442&r2=50443&view=diff ============================================================================== --- branches/tmp/jdsn/edu-users/src/dialogs.ycp (original) +++ branches/tmp/jdsn/edu-users/src/dialogs.ycp Thu Aug 28 13:52:15 2008 @@ -156,6 +156,7 @@ y2milestone("USERSUSERSUSERS: %1", users); UI::ReplaceWidget(`id(`tabContent), `Table( `id(`edutable), `opt(`notify, `vstretch) , `header( _("Name"), _("Login"), _("Age") ), users ) ); + UI::ChangeWidget(`id(`edit), `Enabled, true); UI::ChangeWidget(`id(`delete), `Enabled, true); any ret = nil; @@ -186,6 +187,8 @@ } } + UI::ChangeWidget(`id(`edit), `Enabled, false); + UI::ChangeWidget(`id(`delete), `Enabled, false); return ret; } @@ -194,19 +197,17 @@ any GroupsDialog() { - // fill table with data - //Popup::Notify(_("Groups")); - list<term> groups = EduUsers::getGroupItems(); UI::ReplaceWidget(`id(`tabContent), `Table( `id(`edutable), `opt(`notify, `vstretch) , `header( _("Groups"), _("Templates") ), groups ) ); + UI::ChangeWidget(`id(`edit), `Enabled, true); + UI::ChangeWidget(`id(`delete), `Enabled, true); any ret = nil; while(true) { ret = UI::UserInput(); - /* abort? */ if(ret == `abort || ret == `cancel) { if(ReallyAbort()) break; else continue; @@ -218,7 +219,7 @@ continue; } else if(ret == `add || ret == `edit || ret == `delete) { - continue; + break; } else { y2error("unexpected retcode: %1", ret); @@ -226,8 +227,12 @@ } } + UI::ChangeWidget(`id(`edit), `Enabled, false); + UI::ChangeWidget(`id(`delete), `Enabled, false); return ret; } + + any TemplatesDialog() { // fill table with data @@ -268,14 +273,14 @@ return ret; } any UserDelete() { - return `userdelete; + return `next; } any GroupEdit() { - return `groupedit; + return `next; } any GroupDelete() { - return `groupdelete; + return `next; } symbol GroupMap(symbol toChange, string key, string value) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org