Author: kmachalkova Date: Mon Jan 12 16:38:48 2009 New Revision: 54552 URL: http://svn.opensuse.org/viewcvs/yast?rev=54552&view=rev Log: Do not keep default gw in UI if it has been reset in the meantime Modified: trunk/network/src/services/routing.ycp Modified: trunk/network/src/services/routing.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/services/routing.ycp?rev=54552&r1=54551&r2=54552&view=diff ============================================================================== --- trunk/network/src/services/routing.ycp (original) +++ trunk/network/src/services/routing.ycp Mon Jan 12 16:38:48 2009 @@ -140,13 +140,18 @@ integer max = 0; // integer items = 0; list<term> table_items_orig = []; - boolean forward = Routing::Forward; list<map> route_conf = Routing::Routes; + + //reset, so that UI really reflect current state + //maplist below will supply correct data, if there are some + defgw = ""; + defgwdev = ""; r_items = []; /* make ui items from the routes list */ term item = nil; + maplist(map r, route_conf, { if(r["destination"]:"" == "default" && !issubstring(r["extrapara"]:"", "metric")) { defgw = r["gateway"]:""; @@ -167,7 +172,7 @@ y2debug("table_items=%1", r_items); // y2debug("items=%1", items); -// max = items; + // max = items; UI::ChangeWidget(`gw, `Items, [ defgw ]); UI::ChangeWidget(`id(`gw), `ValidChars, IP::ValidChars); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org