Skip to content

Commit

Permalink
populate comboboxes before loading settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Odizinne committed Aug 3, 2024
1 parent e046af7 commit 59b0b8e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/BigPictureTV.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ def __init__(self):
self.paused = False
self.timer = QTimer()
self.init_checkrate_tooltipedslider()
self.populate_comboboxes()
self.load_settings()
self.initialize_ui()
self.setup_ui_connections()
self.get_audio_capabilities()
self.current_mode = read_current_mode()
self.switch_mode(self.current_mode or Mode.DESKTOP)
Expand All @@ -51,9 +52,7 @@ def __init__(self):
self.show()
self.first_run = False

def initialize_ui(self):
self.ui.gamemode_monitor_combobox.addItems([" External", " Clone"])
self.ui.desktop_monitor_combobox.addItems([" Internal", " Extend"])
def setup_ui_connections(self):
self.ui.disableAudioCheckbox.stateChanged.connect(self.handle_disableaudio_checkbox_state_changed)
self.ui.startupCheckBox.stateChanged.connect(handle_startup_checkbox_state_changed)
self.ui.gamemodeEntry.textChanged.connect(self.save_settings)
Expand All @@ -67,6 +66,10 @@ def initialize_ui(self):
self.ui.checkrate_slider.valueChanged.connect(self.handle_checkrate_slider_value_changed)
self.ui.checkrate_slider.sliderReleased.connect(self.save_settings)

def populate_comboboxes(self):
self.ui.gamemode_monitor_combobox.addItems([" External", " Clone"])
self.ui.desktop_monitor_combobox.addItems([" Internal", " Extend"])

def init_checkrate_tooltipedslider(self):
self.checkrate_tooltipedslider = TooltipedSlider(Qt.Orientation.Horizontal, self.ui.centralwidget)
layout = self.ui.settings_layout
Expand Down

0 comments on commit 59b0b8e

Please sign in to comment.