Beispiel #1
0
 def hydrate(self):
     if self.hw and self.hw.Name:
         self.xml.get_widget('ethernetDeviceEntry').set_text(self.hw.Name)
         self.xml.get_widget('adapterEntry').set_text(self.hw.Description)
         self.xml.get_widget('adapterEntry').set_sensitive(False)
         self.xml.get_widget('adapterComboBox').set_sensitive(False)
     else:
         nextDevice = NCHardwareList.getNextDev('eth')
         self.xml.get_widget('ethernetDeviceEntry').set_text(nextDevice)
Beispiel #2
0
 def hydrate(self):
     if self.hw and self.hw.Name:
         self.xml.get_widget('tokenringDeviceEntry').set_text(self.hw.Name)
         self.xml.get_widget('adapterEntry').set_text(self.hw.Description)
         self.xml.get_widget('adapterEntry').set_sensitive(False)
         self.xml.get_widget('adapterComboBox').set_sensitive(False)
     else:
         nextdev = NCHardwareList.getNextDev("tr")
         self.xml.get_widget('tokenringDeviceEntry').set_text(nextdev)
    def setup(self):
        HardwareDialog.setup(self)

        mlist = []
        modInfo = NCHardwareList.getModInfo()
        for i in modInfo.keys():
            if modInfo[i]['type'] == "tr" and \
                   modInfo[i].has_key('description'):
                mlist.append(modInfo[i]['description'])
        mlist.sort()
        self.xml.get_widget("adapterComboBox").set_popdown_strings(mlist)
        nextdev = NCHardwareList.getNextDev("tr")
        self.xml.get_widget('tokenringDeviceEntry').set_text(nextdev)
Beispiel #4
0
 def hydrate(self):
     if self.hw.Name:
         self.xml.get_widget('ethernetDeviceEntry').set_text(self.hw.Name)
         if self.hw.Card.IoPort:
             self.xml.get_widget('ioEntry').set_text(self.hw.Card.IoPort)
         if self.hw.Card.IoPort1:
             self.xml.get_widget('io1Entry').set_text(self.hw.Card.IoPort1)
         if self.hw.Card.IoPort2:
             self.xml.get_widget('io2Entry').set_text(self.hw.Card.IoPort2)
         if self.hw.Card.Options:
             self.xml.get_widget('optionsEntry').set_text(
                 self.hw.Card.Options)
         if self.hw.MacAddress:
             self.xml.get_widget('macEntry').set_text(self.hw.MacAddress)
     else:
         nextDevice = NCHardwareList.getNextDev('eth')
         self.xml.get_widget('ethernetDeviceEntry').set_text(nextDevice)