[yast-commit] r39118 - in /trunk/network: VERSION package/yast2-network.changes src/lan/complex.ycp src/modules/LanItems.ycp
Author: mzugec Date: Mon Jul 2 17:48:23 2007 New Revision: 39118 URL: http://svn.opensuse.org/viewcvs/yast?rev=39118&view=rev Log: fixed delete item Modified: trunk/network/VERSION trunk/network/package/yast2-network.changes trunk/network/src/lan/complex.ycp trunk/network/src/modules/LanItems.ycp Modified: trunk/network/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/VERSION?rev=39118&r1=3911... ============================================================================== --- trunk/network/VERSION (original) +++ trunk/network/VERSION Mon Jul 2 17:48:23 2007 @@ -1 +1 @@ -2.15.46 +2.15.47 Modified: trunk/network/package/yast2-network.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/package/yast2-network.cha... ============================================================================== --- trunk/network/package/yast2-network.changes (original) +++ trunk/network/package/yast2-network.changes Mon Jul 2 17:48:23 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Mon Jul 2 17:47:46 CEST 2007 - mzugec@suse.cz + +- fixed delete item +- 2.15.47 + +------------------------------------------------------------------- Mon Jul 2 16:53:26 CEST 2007 - mzugec@suse.cz - new module LanItems.ycp Modified: trunk/network/src/lan/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/lan/complex.ycp?rev=3... ============================================================================== --- trunk/network/src/lan/complex.ycp (original) +++ trunk/network/src/lan/complex.ycp Mon Jul 2 17:48:23 2007 @@ -216,11 +216,9 @@ NetworkService::SetManaged (value); } -//list<map<string,any> > o_items = nil; void initOverview (string key) ``{ -// o_items = (list<map<string,any> >)LanItems::Overview(); - +y2internal("init"); list<term> term_items = maplist (map<string,any> i, (list<map<string,any> >)LanItems::Overview(), { term t = `item (`id (i["id"]:-1)); @@ -240,8 +238,13 @@ } LanItems::current = (integer)UI::QueryWidget (`id (`_hw_items), `CurrentItem); UI::ChangeWidget(`_hw_sum, `Value,LanItems::GetItemDescription()); + if (!LanItems::IsItemConfigured()) // unconfigured + UI::ChangeWidget(`id(`delete), `Enabled, false); + else UI::ChangeWidget(`id(`delete), `Enabled, true); } + + symbol handleOverview( string key, map event ) { LanItems::current = (integer)UI::QueryWidget (`id (`_hw_items), `CurrentItem); Modified: trunk/network/src/modules/LanItems.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/modules/LanItems.ycp?... ============================================================================== --- trunk/network/src/modules/LanItems.ycp (original) +++ trunk/network/src/modules/LanItems.ycp Mon Jul 2 17:48:23 2007 @@ -1128,6 +1128,17 @@ NetworkModules::DeleteM(hwcfg); Items[current, "hwcfg"] = ""; } + if (! (size(Items[current, "hwinfo"]:$[])>0) ){ + map<integer, any> tmp_items = $[]; + foreach(integer key, any value, Items, { + if (key==current) continue; + else{ + if (key<current) tmp_items[key]=Items[key]:$[]; + else tmp_items[key-1]=Items[key]:$[]; + } + }); + Items = tmp_items; + } SetModified(); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mzugec@svn.opensuse.org