Ñò +z2Wc @ sd d Z d d k Z d d k l Z l Z d d k l Z l Z d d d „ ƒ YZ d „ Z d Z d S( s TUI QETH Interface ModuleiÿÿÿÿN( t HW_CONFt getHardwareList( t _t QETHt NCQethInterfaceTuic B sA e Z d Z d d „ Z d d „ Z d „ Z d „ Z d „ Z RS( s TUI QETH Interface Dialogc C s | | _ t i d d ƒ | _ t i d d ƒ | _ t i d ƒ | _ t i d d ƒ | _ t i d d ƒ | _ t i d d ƒ | _ t i d d ƒ | _ t i d d ƒ | _ t i d d ƒ | _ t i d d ƒ | _ t i d d ƒ | _ d | _ | o | i ƒ n d S( sI The constructor @screen A snack screen instance i t N( t devt snackt Entryt namet hwdevt Checkboxt dynipt statipt netmaskt gwyt ioportt ioport1t ioport2t optionst macaddrt Nonet screent setState( t selfR ( ( sH /usr/share/system-config-network/netconfpkg/tui/NCPluginQethInterface.pyt __init__ s c C sÓ | p | i } n | o´| i o | i i | i ƒ n | i o | i i | i ƒ n | i oA | i i ƒ } | d j p | d j o | i i d ƒ q¨ n | i o | i i | i ƒ n | i o | i i | i ƒ n | i o | i i | i ƒ n t ƒ } x¸ | D]¬ } | i | i j o“ | i i | i i p d ƒ | i i | i i p d ƒ | i i | i i p d ƒ | i i | i i p d ƒ | i i | i p d ƒ PqqWn d S( sŸ Set the default values of the fields according to the given device @dev The NCDevice (type devernet) to use as default values t dhcpt bootpt *R N( R t DeviceIdR t sett DeviceR t BootProtot lowerR t setValuet IPR t NetmaskR t GatewayR R t NameR t Cardt IoPortR t IoPort1R t IoPort2R t OptionsR t MacAddress( R R t bpt hardwarelistt hw( ( sH /usr/share/system-config-network/netconfpkg/tui/NCPluginQethInterface.pyR s6 c C s` | i i ƒ o t i } n t i } x3 | i | i | i f D] } | i t i | ƒ q? Wd S( sh Set the static IP field to enabled/disabled determined by the dynamic IP field N( R t selectedR t FLAGS_SETt FLAGS_RESETR R R t setFlagst FLAG_DISABLED( R t statet i( ( sH /usr/share/system-config-network/netconfpkg/tui/NCPluginQethInterface.pyt useDynamicCheckBoxC s c C sè | i i ƒ | i _ | i i ƒ | i _ t ƒ } xc | D]! } | i | i i j o Pq: q: W| i t ƒ } | | } t | _ | i i | _ t | _ | i p | i ƒ n d | i _ | i i ƒ | i _ | i i ƒ | i _ | i i ƒ | i _ | i i ƒ | i _ d | i i | i i | i i f } d | | _ | i i ƒ | _ | i i ƒ o4 d | i _ d | i _ d | i _ d | i _ nL | i! i ƒ | i _ | i" i ƒ | i _ | i# i ƒ | i _ d | i _ d S( sQ Extracts info from the screen, and puts it into a device object t qeths %s,%s,%ss qeth %sR N($ R t valueR R R R R R&