| 390 | def refreshPanels(self): |
---|
| 391 | log.debug("PanelManager::refreshPanels()") |
---|
| 392 | nbDevices = self.devmgr.getNbDevices() |
---|
| 393 | #self.statusBar().showMessage("Reconfiguring the mixer panels...") |
---|
| 394 | |
---|
| 395 | # list of panels present |
---|
| 396 | guids_with_tabs = self.panels.keys() |
---|
| 397 | |
---|
| 398 | # build list of guids on the bus now |
---|
| 399 | guid_indexes = {} |
---|
| 400 | for idx in range(nbDevices): |
---|
| 401 | path = self.devmgr.getDeviceName(idx) |
---|
| 402 | cfgrom = ConfigRomInterface(FFADO_DBUS_SERVER, FFADO_DBUS_BASEPATH+'/DeviceManager/'+path) |
---|
| 403 | guid = cfgrom.getGUID() |
---|
| 404 | guid_indexes[guid] = idx |
---|
| 405 | |
---|
| 406 | # remove/create the widget |
---|
| 407 | for guid in guids_with_tabs: |
---|
| 408 | self.removePanel(guid) |
---|
| 409 | idx = guid_indexes[guid] |
---|
| 410 | self.addPanel(idx) |
---|
| 411 | |
---|
| 412 | self.displayPanels() |
---|
| 413 | |
---|