def query_pa(self, device: Device, item: Gtk.MenuItem) -> None: def list_cb(cards: Mapping[str, "CardInfo"]) -> None: for c in cards.values(): if c["proplist"]["device.string"] == device['Address']: self.devices[device['Address']] = c self.generate_menu(device, item) return pa = PulseAudioUtils() pa.list_cards(list_cb)
def query_pa(self, device): def list_cb(cards): for c in cards.values(): if c["proplist"]["device.string"] == device['Address']: self.devices[device['Address']] = c self.generate_menu(device) return pa = PulseAudioUtils() pa.list_cards(list_cb)
def query_pa(self, device): def list_cb(cards): for c in cards.values(): if c["proplist"]["device.string"] == device['Address']: self.devices[device['Address']] = c self.generate_menu(device) return pa = PulseAudioUtils() pa.list_cards(list_cb)
def query_pa(self, device: "Device") -> None: def list_cb(cards: Mapping[str, "CardInfo"]) -> None: for c in cards.values(): if c["proplist"]["device.string"] == device['Address']: self._devices[device['Address']] = c self.add_device_profile_menu(device) return pa = PulseAudioUtils() pa.list_cards(list_cb)