def _read_zones_finished(self, code, stdout, stderr):
        if code != 0:
            return

        self._zones = []
        zones = config.config_parse(stdout)
        for z in zones:
            self._zones.append(z[0])

        self._read_config()
 def _read_config_finished(self, code, stdout, stderr):
     if code != 0:
         return
 
     self._ui.lwModules.clear()
     modules = config.config_parse(stdout)        
     for m in modules:
         mi = QtGui.QListWidgetItem(self._ui.lwModules)
         miw = QtGui.QCheckBox()
         miw.setText(m[0][1:])
         if m[0][0] == '+':
             miw.setChecked(True)
         else:
             miw.setChecked(False)                
         self._ui.lwModules.setItemWidget(mi, miw)
 def _read_config_finished(self, code, stdout, stderr):
     if code != 0:
         return
     
     self._ui.twZones.clear()
     zones = config.config_parse(stdout)
     for z in zones:
         item = QtGui.QTreeWidgetItem(self._ui.twZones)
         
         item.setText(0, z[0])
         item.setText(1, z[1])
         item.setText(2, z[2])
         
         try:
             item.setText(3, " ".join(z[3:]))
         except:
             pass
         
         item.setFlags(QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
    def _read_config_finished(self, code, stdout, stderr):
        if code != 0:
            return

        self._ui.twHosts.clear()
        hosts = config.config_parse(stdout)

        for host in hosts:
            item = QtGui.QTreeWidgetItem(self._ui.twHosts)
            cbZones = QtGui.QComboBox()
            cbZones.addItems(self._zones)
            cbZones.setCurrentIndex(cbZones.findText(host[0]))
            self._ui.twHosts.setItemWidget(item, 0, cbZones)
            item.setText(1, host[1])
            item.setText(2, host[2])
            item.setText(3, host[3])
            try:
                item.setText(4, " ".join(host[4:]))
            except:
                pass

            item.setFlags(QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)