Author: mzugec Date: Tue Feb 24 18:25:42 2009 New Revision: 55741 URL: http://svn.opensuse.org/viewcvs/yast?rev=55741&view=rev Log: possible to not use LABEL for aliases (bnc#471253) Modified: trunk/network/VERSION trunk/network/package/yast2-network.changes trunk/network/src/lan/virtual.ycp trunk/network/src/modules/LanItems.ycp Modified: trunk/network/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/VERSION?rev=55741&r1=55740&r2=55741&view=diff ============================================================================== --- trunk/network/VERSION (original) +++ trunk/network/VERSION Tue Feb 24 18:25:42 2009 @@ -1 +1 @@ -2.18.11 +2.18.12 Modified: trunk/network/package/yast2-network.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/package/yast2-network.changes?rev=55741&r1=55740&r2=55741&view=diff ============================================================================== --- trunk/network/package/yast2-network.changes (original) +++ trunk/network/package/yast2-network.changes Tue Feb 24 18:25:42 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Feb 24 18:22:06 CET 2009 - mzugec@suse.cz + +- possible to not use LABEL for aliases (bnc#471253) +- 2.18.12 + +------------------------------------------------------------------- Mon Feb 23 13:52:21 CET 2009 - mzugec@suse.cz - correctly write modem configuration in case of edit (bnc#465371) Modified: trunk/network/src/lan/virtual.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/lan/virtual.ycp?rev=55741&r1=55740&r2=55741&view=diff ============================================================================== --- trunk/network/src/lan/virtual.ycp (original) +++ trunk/network/src/lan/virtual.ycp Tue Feb 24 18:25:42 2009 @@ -60,17 +60,17 @@ void initAdditional (string key) { - //#165059 if (NetworkService::IsManaged()) UI::ChangeWidget(`f_additional, `Enabled, false); list<term> table_items = []; /* make ui items from the aliases list */ maplist(string alias, map data, (map<string,map>) LanItems::aliases, { + string label = data["LABEL"]:""; string ip = data["IPADDR"]:""; string mask = data["NETMASK"]:""; if (size(data["PREFIXLEN"]:"")>0) mask=sformat("/%1", data["PREFIXLEN"]:""); - table_items = add(table_items, `item(`id(size(table_items)), alias, ip, mask)); + table_items = add(table_items, `item(`id(size(table_items)), label, ip, mask)); }); UI::ChangeWidget(`id(`table), `Items, table_items); @@ -137,10 +137,11 @@ maplist(term e, table_items, { map alias = $[]; alias["IPADDR"] = e[2]:""; + if (size(e[1]:"")>0) alias["LABEL"]=e[1]:""; if(substring(e[3]:"", 0,1)=="/") alias["PREFIXLEN"]=substring(e[3]:"", 1); else alias["NETMASK"]=e[3]:""; - LanItems::aliases[e[1]:""] = alias; - aliases_to_delete[e[1]:""] = nil; + LanItems::aliases[tostring(size(LanItems::aliases))] = alias; +// aliases_to_delete[tostring(size(LanItems::aliases))] = nil; }); foreach (string a, any v, (map <string, any>)aliases_to_delete, { if (v != nil) { NetworkInterfaces::DeleteAlias (NetworkInterfaces::Name, a); } @@ -205,12 +206,13 @@ UI::SetFocus(`id(`name)); continue; } +/* if(contains(forbidden, val)) { - /* Popup::Error text */ Popup::Error(sformat(_("IP address %1 is already present."), val)); UI::SetFocus(`id(`host)); continue; } +*/ host = add(host, val); val = (string) UI::QueryWidget(`id(`ipaddr), `Value); Modified: trunk/network/src/modules/LanItems.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/LanItems.ycp?rev=55741&r1=55740&r2=55741&view=diff ============================================================================== --- trunk/network/src/modules/LanItems.ycp (original) +++ trunk/network/src/modules/LanItems.ycp Tue Feb 24 18:25:42 2009 @@ -46,6 +46,7 @@ global string type = ""; global string device = ""; +//FIXME: always empty string - remove all occuriences global string alias = ""; global integer current = -1; global string hotplug = ""; @@ -496,8 +497,8 @@ // build aliases overview if (size(NetworkInterfaces::Current["_aliases"]:$[])>0 && !NetworkService::IsManaged()){ foreach(string key, map<string, any> desc, (map<string ,map<string, any> >) NetworkInterfaces::Current["_aliases"]:$[], { - string parameters = sformat(_("IP address: %1, subnet mask %2"), desc["IPADDR"]:"", desc["NETMASK"]:""); - bullets = add(bullets, sformat("%1 (%2)", key, parameters) ); + string parameters = sformat("%1/%2", desc["IPADDR"]:"", desc["PREFIXLEN"]:""); + bullets = add(bullets, sformat("%1 (%2)", desc["LABEL"]:"", parameters) ); }); } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org