FrancescoCeruti / linux-show-player

Linux Show Player - Cue player designed for stage productions
https://linux-show-player.org
GNU General Public License v3.0
205 stars 49 forks source link

allow config to disable go key while playing #192

Closed paulbdavis closed 3 years ago

paulbdavis commented 4 years ago

Adds a config option to allow disabling the Go hotkey in list layout mode while there are actively playing cues.

The Go button itself will still work, as will any programmed triggers, etc. It only disables the go key combo as to prevent accidentally triggering the next cue.

For some reason I cannot get the setting from the defaults to actually apply when a list layout is loaded (having to manually apply the settings via the layout menu), but this seems to be the case for all of the options at the moment

FrancescoCeruti commented 4 years ago

For some reason I cannot get the setting from the defaults to actually apply when a list layout is loaded (having to manually apply the settings via the layout menu), but this seems to be the case for all of the options at the moment

It's because the options you see in the layout menu (except "Show resize handles") are saved into the session file, this allow to have different saves with different options without changing them every time you switch file. The corresponding "defaults" only applied when you start a new session.

# This expose the "option" to be saved into the session-file
go_key_disabled_while_playing = ProxyProperty()

# This two are defining how "go_key_disabled_while_playing" get/set it's value
@go_key_disabled_while_playing.set
def _set_go_key_disabled_while_playing(self, enable):
    self.go_key_disabled_while_playing_action.setChecked(enable)

@go_key_disabled_while_playing.get
def _get_go_key_disabled_while_playing(self):
    return self.go_key_disabled_while_playing_action.isChecked()