Browse Source

Merge pull request #1 from Houston4444/fischer_pulse

add icons to source/sink combo box
pull/290/head
Mark Fisher GitHub 4 years ago
parent
commit
a2f2a8aae5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      src/bridgesourcesink.py

+ 12
- 1
src/bridgesourcesink.py View File

@@ -87,7 +87,18 @@ class BridgeSourceSink(QTableWidget):


# Type # Type
combo_box = QComboBox() combo_box = QComboBox()
combo_box.addItems(["source", "sink"])
microphone_icon = QIcon.fromTheme('audio-input-microphone')
if microphone_icon.isNull():
microphone_icon = QIcon.fromTheme('microphone')
loudspeaker_icon = QIcon.fromTheme('audio-volume-high')
if loudspeaker_icon.isNull():
loudspeaker_icon = QIcon.fromTheme('player-volume')
combo_box.addItem(microphone_icon, "source")
combo_box.addItem(loudspeaker_icon, "sink")
combo_box.setCurrentIndex(0 if data.s_type == "source" else 1) combo_box.setCurrentIndex(0 if data.s_type == "source" else 1)
combo_box.currentTextChanged.connect(self.enable_buttons) combo_box.currentTextChanged.connect(self.enable_buttons)
self.setCellWidget(row, 1, combo_box) self.setCellWidget(row, 1, combo_box)


Loading…
Cancel
Save