[yast-commit] r55797 - in /trunk/sudo/src: complex.ycp dialog-spec.ycp
Author: kmachalkova Date: Thu Feb 26 16:23:53 2009 New Revision: 55797 URL: http://svn.opensuse.org/viewcvs/yast?rev=55797&view=rev Log: Fixed command editing and deleting Modified: trunk/sudo/src/complex.ycp trunk/sudo/src/dialog-spec.ycp Modified: trunk/sudo/src/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/sudo/src/complex.ycp?rev=55797&r1=55796&r2=55797&view=diff ============================================================================== --- trunk/sudo/src/complex.ycp (original) +++ trunk/sudo/src/complex.ycp Thu Feb 26 16:23:53 2009 @@ -152,7 +152,7 @@ } string AddCommandDialog(string c, string p) { - string new_command = c + p; + string new_command = ""; list <string> items = Sudo::GetAliasNames("command"); Modified: trunk/sudo/src/dialog-spec.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/sudo/src/dialog-spec.ycp?rev=55797&r1=55796&r2=55797&view=diff ============================================================================== --- trunk/sudo/src/dialog-spec.ycp (original) +++ trunk/sudo/src/dialog-spec.ycp Thu Feb 26 16:23:53 2009 @@ -11,12 +11,10 @@ include "sudo/complex.ycp"; void RedrawCmndTable (list <string> commands) { - if (commands != []) { - list <term> items = UpdateCmdList(commands); + list <term> items = UpdateCmdList(commands); - UI::ChangeWidget(`id("commands"),`Items, items); - EnableDisableButtons("command_edit", "command_remove", items); - } + UI::ChangeWidget(`id("commands"),`Items, items); + EnableDisableButtons("command_edit", "command_remove", items); } @@ -128,6 +126,7 @@ string new_command = AddCommandDialog("",""); if(new_command != "" && !contains(commands, new_command)) { + y2milestone("%1", new_command); commands = add(commands, new_command); RedrawCmndTable(commands); } @@ -137,8 +136,11 @@ term it = (term) UI::QueryWidget(`id("commands"), `Item(current_item)); string new_command = AddCommandDialog(it[1]:"", it[2]:""); - commands[current_item] = new_command; - RedrawCmndTable(commands); + if( new_command !="") + { + commands[current_item] = new_command; + RedrawCmndTable(commands); + } /* remove command */ } else if (ret == "command_remove") { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
kmachalkova@svn.opensuse.org