Option to set unpause to instantly unpause even when others are not ready

This commit is contained in:
Et0h 2015-02-22 01:57:13 +00:00
parent 76f3bcb9b9
commit f1cb32bdd9
4 changed files with 36 additions and 38 deletions

View File

@ -518,7 +518,7 @@ class SyncplayClient(object):
self.stopAutoplayCountdown()
def instaplayConditionsMet(self):
if self.userlist.currentUser.isReady():
if self.userlist.currentUser.isReady() or self._config["alwaysUnpause"]:
return True
def autoplayConditionsMet(self):

View File

@ -181,6 +181,7 @@ en = {
"dontslowdownwithme-label" : "Never slow down or rewind others (experimental)",
"pauseonleave-label" : "Pause when user leaves (e.g. if they are disconnected)",
"readyatstart-label" : "Set me as 'ready to watch' by default",
"alwaysunpause-label" : u"Unpause always unpauses (rather than just sets as ready if unready)",
"forceguiprompt-label" : "Don't always show the Syncplay configuration window", # (Inverted)
"nostore-label" : "Don't store this configuration", # (Inverted)
"showosd-label" : "Enable OSD Messages",
@ -288,6 +289,7 @@ en = {
"dontslowdownwithme-tooltip" : "Means others do not get slowed down or rewinded if your playback is lagging. Useful for room operators.",
"pauseonleave-tooltip" : "Pause playback if you get disconnected or someone leaves from your room.",
"readyatstart-tooltip" : "Set yourself as 'ready' at start (otherwise you are set as 'not ready' until you change your readiness state)",
"alwaysunpause-tooltip" : "If you unpause when not ready it sets you as ready and unpauses, rather than just setting you as ready.",
"forceguiprompt-tooltip" : "Configuration dialogue is not shown when opening a file with Syncplay.", # (Inverted)
"nostore-tooltip" : "Run Syncplay with the given configuration, but do not permanently store the changes.", # (Inverted)
"rewindondesync-tooltip" : "Jump back when needed to get back in sync. Disabling this option can result in major desyncs!",
@ -526,6 +528,7 @@ ru = {
"dontslowdownwithme-label" : u"Никогда не замедлять или перематывать видео другим", # TODO: Update new wording into Russian (should state "Experimental" in brackets at the end)
"pauseonleave-label" : u"Приостанавливать, когда кто-то уходит (например, отключился)",
"readyatstart-label" : u"Set me as 'ready to watch' by default", # TODO: Translate into Russian
"alwaysunpause-label" : u"Unpause always unpauses (rather than just sets as ready if unready)", # TODO: Translate into Russian
"fastforwardondesync-label" : u"Fast-forward if lagging behind (recommended)", # TODO: Translate into Russian
"forceguiprompt-label" : u"Не показывать больше этот диалог", # (Inverted)
"nostore-label" : u"Не сохранять текущую конфигурацию", # (Inverted)
@ -872,6 +875,7 @@ de = {
"dontslowdownwithme-label" : u"Nie verlangsamen oder andere zurückspulen (Experimentell)",
"pauseonleave-label" : u"Pausieren wenn ein Benutzer austritt",
"readyatstart-label" : u"Set me as 'ready to watch' by default", # TODO: Translate into German
"alwaysunpause-label" : u"Unpause always unpauses (rather than just sets as ready if unready)", # TODO: Translate into German
"forceguiprompt-label" : u"Diesen Dialog nicht mehr anzeigen",
"nostore-label" : u"Diese Konfiguration nicht speichern",
"showosd-label" : u"OSD-Nachrichten anzeigen",

View File

@ -45,6 +45,7 @@ class ConfigurationGetter(object):
"filesizePrivacyMode": constants.PRIVACY_SENDRAW_MODE,
"pauseOnLeave": False,
"readyAtStart": False,
"alwaysUnpause": False,
"autoplayInitialState" : None,
"autoplayInitialThreshold" : -1,
"clearGUIData": False,
@ -83,6 +84,7 @@ class ConfigurationGetter(object):
"dontSlowDownWithMe",
"pauseOnLeave",
"readyAtStart",
"alwaysUnpause",
"clearGUIData",
"rewindOnDesync",
"slowOnDesync",
@ -112,7 +114,7 @@ class ConfigurationGetter(object):
self._iniStructure = {
"server_data": ["host", "port", "password"],
"client_settings": ["name", "room", "playerPath", "slowdownThreshold", "rewindThreshold", "fastforwardThreshold", "slowOnDesync", "rewindOnDesync", "fastforwardOnDesync", "dontSlowDownWithMe", "forceGuiPrompt", "filenamePrivacyMode", "filesizePrivacyMode", "pauseOnLeave", "readyAtStart", "autoplayInitialThreshold", "autoplayInitialState"],
"client_settings": ["name", "room", "playerPath", "slowdownThreshold", "rewindThreshold", "fastforwardThreshold", "slowOnDesync", "rewindOnDesync", "fastforwardOnDesync", "dontSlowDownWithMe", "forceGuiPrompt", "filenamePrivacyMode", "filesizePrivacyMode", "pauseOnLeave", "readyAtStart", "alwaysUnpause", "autoplayInitialThreshold", "autoplayInitialState"],
"gui": ["showOSD", "showOSDWarnings", "showSlowdownOSD", "showDifferentRoomOSD", "showSameRoomOSD", "showNonControllerOSD", "showDurationNotification"],
"general": ["language", "checkForUpdatesAutomatically", "lastCheckedForUpdates"]
}

View File

@ -476,37 +476,23 @@ class ConfigDialog(QtGui.QDialog):
self.miscFrame.setLayout(self.miscLayout)
self.coreSettingsGroup = QtGui.QGroupBox(getMessage("core-behaviour-title"))
self.coreSettingsLayout = QtGui.QVBoxLayout()
self.coreSettingsLayout = QtGui.QGridLayout()
self.coreSettingsGroup.setLayout(self.coreSettingsLayout)
self.pauseonleaveCheckbox = QCheckBox(getMessage("pauseonleave-label"))
self.pauseonleaveCheckbox.setObjectName("pauseOnLeave")
self.coreSettingsLayout.addWidget(self.pauseonleaveCheckbox)
self.coreSettingsLayout.addWidget(self.pauseonleaveCheckbox, 0, 0, 1, 4)
self.alwaysUnpauseCheckbox = QCheckBox(getMessage("alwaysunpause-label"))
self.alwaysUnpauseCheckbox.setObjectName("alwaysUnpause")
self.coreSettingsLayout.addWidget(self.alwaysUnpauseCheckbox, 1, 0, 1, 4)
self.readyatstartCheckbox = QCheckBox(getMessage("readyatstart-label"))
self.readyatstartCheckbox.setObjectName("readyAtStart")
self.coreSettingsLayout.addWidget(self.readyatstartCheckbox)
self.internalSettingsGroup = QtGui.QGroupBox(getMessage("syncplay-internals-title"))
self.internalSettingsLayout = QtGui.QVBoxLayout()
self.internalSettingsGroup.setLayout(self.internalSettingsLayout)
self.alwaysshowCheckbox = QCheckBox(getMessage("forceguiprompt-label"))
self.alwaysshowCheckbox.setObjectName(constants.INVERTED_STATE_MARKER + "forceGuiPrompt")
self.internalSettingsLayout.addWidget(self.alwaysshowCheckbox)
self.automaticupdatesCheckbox = QCheckBox(getMessage("checkforupdatesautomatically-label"))
self.automaticupdatesCheckbox.setObjectName("checkForUpdatesAutomatically")
self.internalSettingsLayout.addWidget(self.automaticupdatesCheckbox)
self.coreSettingsLayout.addWidget(self.readyatstartCheckbox, 2, 0, 1, 4)
### Privacy:
self.privacySettingsGroup = QtGui.QGroupBox(getMessage("privacy-title"))
self.privacySettingsLayout = QtGui.QVBoxLayout()
self.privacySettingsFrame = QtGui.QFrame()
self.privacyFrame = QtGui.QFrame()
self.privacyLayout = QtGui.QGridLayout()
self.filenameprivacyLabel = QLabel(getMessage("filename-privacy-label"), self)
self.filenameprivacyButtonGroup = QButtonGroup()
self.filenameprivacySendRawOption = QRadioButton(getMessage("privacy-sendraw-option"))
@ -534,25 +520,31 @@ class ConfigDialog(QtGui.QDialog):
self.filesizeprivacySendHashedOption.setObjectName("privacy-sendhashed" + constants.CONFIG_NAME_MARKER + "filesizePrivacyMode" + constants.CONFIG_VALUE_MARKER + constants.PRIVACY_SENDHASHED_MODE)
self.filesizeprivacyDontSendOption.setObjectName("privacy-dontsend" + constants.CONFIG_NAME_MARKER + "filesizePrivacyMode" + constants.CONFIG_VALUE_MARKER + constants.PRIVACY_DONTSEND_MODE)
self.privacyLayout.addWidget(self.filenameprivacyLabel, 1, 0)
self.privacyLayout.addWidget(self.filenameprivacySendRawOption, 1, 1, Qt.AlignLeft)
self.privacyLayout.addWidget(self.filenameprivacySendHashedOption, 1, 2, Qt.AlignLeft)
self.privacyLayout.addWidget(self.filenameprivacyDontSendOption, 1, 3, Qt.AlignLeft)
self.privacyLayout.addWidget(self.filesizeprivacyLabel, 2, 0)
self.privacyLayout.addWidget(self.filesizeprivacySendRawOption, 2, 1, Qt.AlignLeft)
self.privacyLayout.addWidget(self.filesizeprivacySendHashedOption, 2, 2, Qt.AlignLeft)
self.privacyLayout.addWidget(self.filesizeprivacyDontSendOption, 2, 3, Qt.AlignLeft)
self.coreSettingsLayout.addWidget(self.filenameprivacyLabel, 3, 0)
self.coreSettingsLayout.addWidget(self.filenameprivacySendRawOption, 3, 1, Qt.AlignLeft)
self.coreSettingsLayout.addWidget(self.filenameprivacySendHashedOption, 3, 2, Qt.AlignLeft)
self.coreSettingsLayout.addWidget(self.filenameprivacyDontSendOption, 3, 3, Qt.AlignLeft)
self.coreSettingsLayout.addWidget(self.filesizeprivacyLabel, 4, 0)
self.coreSettingsLayout.addWidget(self.filesizeprivacySendRawOption, 4, 1, Qt.AlignLeft)
self.coreSettingsLayout.addWidget(self.filesizeprivacySendHashedOption, 4, 2, Qt.AlignLeft)
self.coreSettingsLayout.addWidget(self.filesizeprivacyDontSendOption, 4, 3, Qt.AlignLeft)
self.privacyFrame.setLayout(self.privacyLayout)
self.privacySettingsGroup.setLayout(self.privacyLayout)
self.privacySettingsGroup.setMaximumHeight(self.privacySettingsGroup.minimumSizeHint().height())
self.privacySettingsLayout.addWidget(self.privacySettingsGroup)
self.privacySettingsLayout.setAlignment(Qt.AlignTop)
self.privacyFrame.setLayout(self.privacySettingsLayout)
## Syncplay internals
self.internalSettingsGroup = QtGui.QGroupBox(getMessage("syncplay-internals-title"))
self.internalSettingsLayout = QtGui.QVBoxLayout()
self.internalSettingsGroup.setLayout(self.internalSettingsLayout)
self.alwaysshowCheckbox = QCheckBox(getMessage("forceguiprompt-label"))
self.alwaysshowCheckbox.setObjectName(constants.INVERTED_STATE_MARKER + "forceGuiPrompt")
self.internalSettingsLayout.addWidget(self.alwaysshowCheckbox)
self.automaticupdatesCheckbox = QCheckBox(getMessage("checkforupdatesautomatically-label"))
self.automaticupdatesCheckbox.setObjectName("checkForUpdatesAutomatically")
self.internalSettingsLayout.addWidget(self.automaticupdatesCheckbox)
self.miscLayout.addWidget(self.coreSettingsGroup)
self.miscLayout.addWidget(self.internalSettingsGroup)
self.miscLayout.addWidget(self.privacySettingsGroup)
self.miscLayout.setAlignment(Qt.AlignTop)
self.stackedLayout.addWidget(self.miscFrame)