[yast-commit] r38321 - in /trunk/network: VERSION package/yast2-network.changes src/dsl/dialogs.ycp src/lan/complex.ycp src/lan/hardware.ycp src/lan/virtual.ycp src/routines/complex.ycp src/routines/widgets.ycp
Author: mzugec Date: Wed Jun 6 16:35:16 2007 New Revision: 38321 URL: http://svn.opensuse.org/viewcvs/yast?rev=38321&view=rev Log: values proposal for hardware dialog Modified: trunk/network/VERSION trunk/network/package/yast2-network.changes trunk/network/src/dsl/dialogs.ycp trunk/network/src/lan/complex.ycp trunk/network/src/lan/hardware.ycp trunk/network/src/lan/virtual.ycp trunk/network/src/routines/complex.ycp trunk/network/src/routines/widgets.ycp Modified: trunk/network/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/VERSION?rev=38321&r1=38320&r2=38321&view=diff ============================================================================== --- trunk/network/VERSION (original) +++ trunk/network/VERSION Wed Jun 6 16:35:16 2007 @@ -1 +1 @@ -2.15.39 +2.15.40 Modified: trunk/network/package/yast2-network.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/package/yast2-network.changes?rev=38321&r1=38320&r2=38321&view=diff ============================================================================== --- trunk/network/package/yast2-network.changes (original) +++ trunk/network/package/yast2-network.changes Wed Jun 6 16:35:16 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Jun 6 16:31:35 CEST 2007 - mzugec@suse.cz + +- values proposal for hardware dialog +- 2.15.40 + +------------------------------------------------------------------- Fri Jun 1 11:14:21 CEST 2007 - mzugec@suse.cz - save_network.ycp moved from routines/ to clients/ Modified: trunk/network/src/dsl/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/dsl/dialogs.ycp?rev=38321&r1=38320&r2=38321&view=diff ============================================================================== --- trunk/network/src/dsl/dialogs.ycp (original) +++ trunk/network/src/dsl/dialogs.ycp Wed Jun 6 16:35:16 2007 @@ -109,7 +109,6 @@ // define void UpdateInterfaces() { list<string> items = getNetDeviceItems(); if(size(items)>0 && interface=="") interface=items[0]:""; -y2internal("items %1", items); /* FIXME Why is not the current interface added? */ if(false && /*interface != "" && */!contains(ifaces, interface)) ifaces = add(ifaces, interface); @@ -138,7 +137,6 @@ // list<string> items = NetworkDevices::List(""); -// y2internal("network devices list %1", items); /* NetworkDevices::Read(); @@ -147,7 +145,6 @@ string connection_text = _("%1 - %2 (%3)"); */ -y2internal("interface %1", interface); /* DSL dialog contents */ term contents = `HBox( `HSpacing(6), Modified: trunk/network/src/lan/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/lan/complex.ycp?rev=38321&r1=38320&r2=38321&view=diff ============================================================================== --- trunk/network/src/lan/complex.ycp (original) +++ trunk/network/src/lan/complex.ycp Wed Jun 6 16:35:16 2007 @@ -76,8 +76,7 @@ Lan::AbortFunction = ``{return PollAbort();}; boolean ret = Lan::Read (`cache); - boolean xenbr = Lan::HaveXenBridge (); - if (xenbr) + if ( Lan::HaveXenBridge() ) { if (! Popup::ContinueCancel ( sformat ( @@ -263,6 +262,10 @@ else // configured { Lan::Edit(current); + foreach(map<string, any> row, o_items, { + if (row["id"]:"" == current && row["hw_num"]:-1 != -1) Lan::SelectHW(row["hw_num"]:-1); + }); +// Lan::SelectHW (1); if (Lan::startmode == "managed") { // Continue-Cancel popup Modified: trunk/network/src/lan/hardware.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/lan/hardware.ycp?rev=38321&r1=38320&r2=38321&view=diff ============================================================================== --- trunk/network/src/lan/hardware.ycp (original) +++ trunk/network/src/lan/hardware.ycp Wed Jun 6 16:35:16 2007 @@ -90,7 +90,7 @@ // #38213, remember device id when we switch back from pcmcia/usb hardware["non_hotplug_device_id"] = hardware["device"]:""; hardware["hwcfg"] = Lan::nm_name; - if (Lan::nm_name=="" && Lan::nm_name_old!=nil) hardware["hwcfg"]=Lan::nm_name_old; + if (size(Lan::nm_name)==0 && size(Lan::nm_name_old)>0) hardware["hwcfg"]=Lan::nm_name_old; // FIXME duplicated in address.ycp hardware["device_types"] = [ "arc", "bnep", "dummy", "eth", "fddi", "myri", "tr", "usb", "wlan", "bond" ]; @@ -203,7 +203,7 @@ `HStretch() ); - term contents = `CheckBoxFrame(`id(`enable_hwconfig), caption, hardware["hwcfg"]:"" != "", + term contents = `CheckBoxFrame(`id(`enable_hwcfg), caption, hardware["hwcfg"]:"" != "", `HBox( `HSpacing(2), `VBox( @@ -221,7 +221,7 @@ UI::ReplaceWidget(`hw_content, contents); -if (Lan::nm_name=="" && Lan::nm_name_old!=nil) UI::ChangeWidget(`enable_hwconfig, `Value, false); +if (size(Lan::nm_name)==0 && size(Lan::nm_name_old)>0) UI::ChangeWidget(`enable_hwcfg, `Value, false); hardware["no_hotplug"] = hardware["hotplug"]:"" == ""; hardware["no_hotplug_dummy"] = hardware["no_hotplug"]:false && hardware["type"]:"" != "dummy"; UI::ChangeWidget(`id(`modul), `Enabled, hardware["no_hotplug_dummy"]:false); @@ -421,17 +421,13 @@ } void storeHW (string key, map event) { - if(!(boolean)UI::QueryWidget(`enable_hwconfig, `Value)) + if(!(boolean)UI::QueryWidget(`enable_hwcfg, `Value)) { - -NetworkModules::DeleteM(Lan::nm_name); -if(Lan::nm_name_old==nil) Lan::nm_name_old = Lan::nm_name; -Lan::nm_name=""; -map<string, any> tmp_current=$[]; -foreach(string key, any value, NetworkDevices::Current, { -if (key != "_nm_name") tmp_current[key]=value; -}); -NetworkDevices::Current=tmp_current; + NetworkModules::DeleteM(Lan::nm_name); + if(size(Lan::nm_name_old)==0) Lan::nm_name_old = Lan::nm_name; + Lan::nm_name=""; + NetworkDevices::Current["_nm_name"]=""; + NetworkDevices::Commit(); } else { if(UI::WidgetExists(`id(`hwcfg))) { @@ -466,10 +462,10 @@ if(UI::WidgetExists(`id(`num))) { string devic = (string) UI::QueryWidget(`id(`num), `Value); } - } - NetworkModules::Alias = (string) UI::QueryWidget(`id(`modul), `Value); NetworkModules::Options = (string) UI::QueryWidget(`id(`options), `Value); + } + if(UI::WidgetExists(`id(`num))) Lan::device = (string) UI::QueryWidget(`id(`num), `Value); Modified: trunk/network/src/lan/virtual.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/lan/virtual.ycp?rev=38321&r1=38320&r2=38321&view=diff ============================================================================== --- trunk/network/src/lan/virtual.ycp (original) +++ trunk/network/src/lan/virtual.ycp Wed Jun 6 16:35:16 2007 @@ -98,7 +98,6 @@ item = VirtualEditDialog(cur, item, []/*forbidden*/); - y2internal("item=%1", item); if(item != nil) { table_items = maplist(term e, table_items, { Modified: trunk/network/src/routines/complex.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/routines/complex.ycp?rev=38321&r1=38320&r2=38321&view=diff ============================================================================== --- trunk/network/src/routines/complex.ycp (original) +++ trunk/network/src/routines/complex.ycp Wed Jun 6 16:35:16 2007 @@ -518,10 +518,12 @@ // summary description of STARTMODE=off "off" : _("Will not be started at all") ]; +/* list<string> models = []; foreach(map<string, any>row, (list<map<string, any> >)SCR::Read (.probe.netcard), { models=add(models, row["model"]:""); }); +*/ maplist(string type, map devmap, Devs, { maplist(string k, map v, (map<string,map>)devmap, { @@ -581,12 +583,14 @@ , ip, v["NETMASK"]:""), ]; } -if (size(v["_aliases"]:$[])>0 && !NetworkService::IsManaged()){ - foreach(string key, map<string, any> desc, (map<string ,map<string, any> >) v["_aliases"]:$[], { - string parameters = sformat(_("IP address: %1, subnet mask %2"), desc["IPADDR"]:"", desc["NETMASK"]:""); - bullets = add(bullets, sformat("%1 (%2)", key, parameters) ); - }); -} + + // build aliases overview + if (size(v["_aliases"]:$[])>0 && !NetworkService::IsManaged()){ + foreach(string key, map<string, any> desc, (map<string ,map<string, any> >) v["_aliases"]:$[], { + string parameters = sformat(_("IP address: %1, subnet mask %2"), desc["IPADDR"]:"", desc["NETMASK"]:""); + bullets = add(bullets, sformat("%1 (%2)", key, parameters) ); + }); + } } // build the "Bond Slaves" entry of rich box @@ -603,21 +607,17 @@ string rich = descr; rich = HTML::Bold ( rich ) + getConnMacBusDescription(v, Hardware) + HTML::List (bullets); - item = `item(`id(dev), descr, ip, rich); + integer hw_id=-1; + boolean found=false; + foreach(map device, Hardware, { + hw_id=hw_id+1; + if (v["udi"]:(v["UDI"]:"")==device["udi"]:"") { found=true; break; } + }); + + item = `item(`id(dev), descr, ip, rich, (found) ? hw_id : -1); } overview = add(overview, item); - /* aliases summary */ -/* - map<string,map> aliasee = v["_aliases"]:$[]; - if(aliasee != $[]) - maplist(string aid, map amap, aliasee, { - string adev = NetworkDevices::alias_name(type, k, aid); - ip = DeviceProtocol(amap); - item = `item(`id(adev), DeviceType(adev), adev, ip); - overview = add(overview, item); - }); -*/ }); }); Modified: trunk/network/src/routines/widgets.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/network/src/routines/widgets.ycp?rev=38321&r1=38320&r2=38321&view=diff ============================================================================== --- trunk/network/src/routines/widgets.ycp (original) +++ trunk/network/src/routines/widgets.ycp Wed Jun 6 16:35:16 2007 @@ -212,7 +212,6 @@ NetworkDevices::Read(); list<string> items = NetworkDevices::List("eth"); items = filter (string i, items, ``( i != "lo" )); - y2internal("network devices list %1", items); return items; } -- 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