Remove sync thresholds from GuiConfig for usability

This commit is contained in:
Et0h 2015-03-10 08:18:02 +00:00
parent 0a661f5125
commit 84477934ce
2 changed files with 3 additions and 102 deletions

View File

@ -166,9 +166,6 @@ en = {
"browse-label" : "Browse",
"more-title" : "Show more settings",
"slowdown-threshold-label" : "Slow down threshold:",
"rewind-threshold-label" : "Rewind threshold:",
"fastforward-threshold-label" : "Fast-forward threshold:",
"never-rewind-value" : "Never",
"seconds-suffix" : " secs",
"privacy-sendraw-option" : "Send raw",
@ -278,9 +275,6 @@ en = {
"media-path-tooltip" : "Location of video or stream to be opened. Necessary for mpv and mplayer2.",
"more-tooltip" : "Display less frequently used settings.",
"slowdown-threshold-tooltip" : "Time ahead of slowest client before temporarily reducing playback speed (default: {} secs).".format(constants.DEFAULT_SLOWDOWN_KICKIN_THRESHOLD),
"rewind-threshold-tooltip" : "Time ahead slowest client before seeking to get back in sync (default: {} secs).".format(constants.DEFAULT_REWIND_THRESHOLD),
"fastforward-threshold-tooltip" : "Time behind room operator before seeking to get back in sync (default: {} secs).".format(constants.DEFAULT_FASTFORWARD_THRESHOLD),
"filename-privacy-tooltip" : "Privacy mode for sending currently playing filename to server.",
"filesize-privacy-tooltip" : "Privacy mode for sending size of currently playing file to server.",
"privacy-sendraw-tooltip" : "Send this information without obfuscation. This is the default option with most functionality.",
@ -516,9 +510,6 @@ ru = {
"browse-label" : u"Выбрать",
"more-title" : u"Больше настроек",
"slowdown-threshold-label" : u"Предел для замедления:",
"rewind-threshold-label" : u"Предел для перемотки:",
"fastforward-threshold-label" : u"Fast-forward threshold:", # TODO: Translate into Russian
"never-rewind-value" : u"Никогда",
"seconds-suffix" : u" секунд(ы)",
"privacy-sendraw-option" : u"отпр. как есть",
@ -629,9 +620,6 @@ ru = {
"media-path-tooltip" : u"Расположение видеофайла или потока для просмотра. Обязательно для mpv и mplayer2.",
"more-tooltip" : u"Показать дополнительные настройки.",
"slowdown-threshold-tooltip" : u"Отставание самого медленного клиента, необходимое для временного уменьшения скорости видео (по умолчанию: {} сек.).".format(constants.DEFAULT_SLOWDOWN_KICKIN_THRESHOLD),
"rewind-threshold-tooltip" : u"Отставание самого медленного клиента, необходимое для перемотки назад в целях синхронизации (по умолчанию: {} сек.).".format(constants.DEFAULT_REWIND_THRESHOLD),
"fastforward-threshold-tooltip" : u"Time behind room operator before seeking to get back in sync (default: {} secs).".format(constants.DEFAULT_FASTFORWARD_THRESHOLD), # TODO: Translate into Russian
"filename-privacy-tooltip" : u"Режим приватности для передачи имени воспроизводимого файла на сервер.",
"filesize-privacy-tooltip" : u"Режим приватности для передачи размера воспроизводимого файла на сервер.",
"privacy-sendraw-tooltip" : u"Отправляет эту информацию без шифрования. Рекомендуемая опция с наибольшей функциональностью.",
@ -866,9 +854,6 @@ de = {
"browse-label" : u"Durchsuchen",
"more-title" : u"Mehr Einstellungen zeigen",
"slowdown-threshold-label" : u"Verlangsamungs-Grenzwert:",
"rewind-threshold-label" : u"Zurückspul-Grenzwert:",
"fastforward-threshold-label" : u"Vorspul-Grenzwert:",
"never-rewind-value" : u"Niemals",
"seconds-suffix" : u" sek",
"privacy-sendraw-option" : u"Klartext senden",
@ -976,9 +961,6 @@ de = {
"media-path-tooltip" : u"Pfad zum wiederzugebenden Video oder Stream. Notwendig für mpv und mplayer2.",
"more-tooltip" : u"Weitere Einstellungen anzeigen.",
"slowdown-threshold-tooltip" : u"Zeitvorsprung zum langsamsten Client, ab dem die Wiedergabe verlangsamt wird (Standard: {} sek).".format(constants.DEFAULT_SLOWDOWN_KICKIN_THRESHOLD),
"rewind-threshold-tooltip" : u"Zeitvorsprung zum langsamsten Client, ab dem zur Wiederherstellung der Synchronität gesprungen wird (Standard: {} sek).".format(constants.DEFAULT_REWIND_THRESHOLD),
"fastforward-threshold-tooltip" : u"Zeitvorsprung zum Raumleiter, ab dem zur Wiederherstellung der Synchronität gesprungen wird (Standard: {} sek).".format(constants.DEFAULT_FASTFORWARD_THRESHOLD),
"filename-privacy-tooltip" : u"Privatheitsmodus beim Senden des Namens der aktuellen Datei zum Server.",
"filesize-privacy-tooltip" : u"Privatheitsmodus beim Senden der Größe der aktuellen Datei zum Server.",
"privacy-sendraw-tooltip" : u"Die Information im Klartext übertragen. Dies ist die Standard-Einstellung mit der besten Funktionalität.",

View File

@ -253,16 +253,6 @@ class ConfigDialog(QtGui.QDialog):
else:
self.config['file'] = unicode(self.mediapathTextbox.text())
if not self.slowdownThresholdSpinbox.text:
self.slowdownThresholdSpinbox.value = constants.DEFAULT_SLOWDOWN_KICKIN_THRESHOLD
if not self.rewindThresholdSpinbox.text:
self.rewindThresholdSpinbox.value = constants.DEFAULT_REWIND_THRESHOLD
if not self.fastforwardThresholdSpinbox.text:
self.fastforwardThresholdSpinbox.value = constants.DEFAULT_FASTFORWARD_THRESHOLD
self.config['slowdownThreshold'] = self.slowdownThresholdSpinbox.value()
self.config['rewindThreshold'] = self.rewindThresholdSpinbox.value()
self.config['fastforwardThreshold'] = self.fastforwardThresholdSpinbox.value()
self.pressedclosebutton = True
self.close()
return
@ -564,79 +554,14 @@ class ConfigDialog(QtGui.QDialog):
self.fastforwardCheckbox = QCheckBox(getMessage("fastforwardondesync-label"))
self.fastforwardCheckbox.setObjectName("fastforwardOnDesync")
self.spaceLabel = QLabel()
self.spaceLabel.setFixedHeight(5)
self.desyncSettingsLayout = QtGui.QGridLayout()
self.desyncSettingsLayout.setSpacing(2)
self.desyncFrame = QtGui.QFrame()
self.desyncFrame.setLineWidth(0)
self.desyncFrame.setMidLineWidth(0)
self.slowdownThresholdLabel = QLabel(getMessage("slowdown-threshold-label"), self)
self.slowdownThresholdLabel.setStyleSheet(constants.STYLE_SUBLABEL.format(self.posixresourcespath + "chevrons_right.png"))
self.slowdownThresholdSpinbox = QDoubleSpinBox()
try:
slowdownThreshold = float(config['slowdownThreshold'])
self.slowdownThresholdSpinbox.setValue(slowdownThreshold)
if slowdownThreshold < constants.MINIMUM_SLOWDOWN_THRESHOLD:
constants.MINIMUM_SLOWDOWN_THRESHOLD = slowdownThreshold
except ValueError:
self.slowdownThresholdSpinbox.setValue(constants.DEFAULT_SLOWDOWN_KICKIN_THRESHOLD)
self.slowdownThresholdSpinbox.setSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
self.slowdownThresholdSpinbox.setMinimum(constants.MINIMUM_SLOWDOWN_THRESHOLD)
self.slowdownThresholdSpinbox.setSingleStep(0.1)
self.slowdownThresholdSpinbox.setSuffix(getMessage("seconds-suffix"))
self.slowdownThresholdSpinbox.adjustSize()
self.rewindThresholdLabel = QLabel(getMessage("rewind-threshold-label"), self)
self.rewindThresholdLabel.setStyleSheet(constants.STYLE_SUBLABEL.format(self.posixresourcespath + "chevrons_right.png"))
self.rewindThresholdSpinbox = QDoubleSpinBox()
try:
rewindThreshold = float(config['rewindThreshold'])
self.rewindThresholdSpinbox.setValue(rewindThreshold)
if rewindThreshold < constants.MINIMUM_REWIND_THRESHOLD:
constants.MINIMUM_REWIND_THRESHOLD = rewindThreshold
except ValueError:
self.rewindThresholdSpinbox.setValue(constants.DEFAULT_REWIND_THRESHOLD)
self.rewindThresholdSpinbox.setSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
self.rewindThresholdSpinbox.setMinimum(constants.MINIMUM_REWIND_THRESHOLD)
self.rewindThresholdSpinbox.setSingleStep(0.1)
self.rewindThresholdSpinbox.setSuffix(getMessage("seconds-suffix"))
self.rewindThresholdSpinbox.adjustSize()
self.fastforwardThresholdLabel = QLabel(getMessage("fastforward-threshold-label"), self)
self.fastforwardThresholdLabel.setStyleSheet(constants.STYLE_SUBLABEL.format(self.posixresourcespath + "chevrons_right.png"))
self.fastforwardThresholdSpinbox = QDoubleSpinBox()
try:
fastforwardThreshold = float(config['fastforwardThreshold'])
self.fastforwardThresholdSpinbox.setValue(fastforwardThreshold)
if fastforwardThreshold < constants.MINIMUM_FASTFORWARD_THRESHOLD:
constants.MINIMUM_FASTFORWARD_THRESHOLD = fastforwardThreshold
except ValueError:
self.fastforwardThresholdSpinbox.setValue(constants.DEFAULT_FASTFORWARD_THRESHOLD)
self.fastforwardThresholdSpinbox.setSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
self.fastforwardThresholdSpinbox.setMinimum(constants.MINIMUM_FASTFORWARD_THRESHOLD)
self.fastforwardThresholdSpinbox.setSingleStep(0.1)
self.fastforwardThresholdSpinbox.setSuffix(getMessage("seconds-suffix"))
self.fastforwardThresholdSpinbox.adjustSize()
self.slowdownThresholdLabel.setObjectName("slowdown-threshold")
self.slowdownThresholdSpinbox.setObjectName("slowdown-threshold")
self.rewindThresholdLabel.setObjectName("rewind-threshold")
self.rewindThresholdSpinbox.setObjectName("rewind-threshold")
self.desyncSettingsLayout.addWidget(self.slowdownCheckbox, 0, 0, 1, 2, Qt.AlignLeft)
self.desyncSettingsLayout.addWidget(self.slowdownThresholdLabel, 1, 0, 1, 1, Qt.AlignLeft)
self.desyncSettingsLayout.addWidget(self.slowdownThresholdSpinbox, 1, 1, 1, 1, Qt.AlignLeft)
self.desyncSettingsLayout.addWidget(self.spaceLabel, 2, 0,1,2, Qt.AlignLeft)
self.desyncSettingsLayout.addWidget(self.rewindCheckbox, 3, 0,1,2, Qt.AlignLeft)
self.desyncSettingsLayout.addWidget(self.rewindThresholdLabel, 4, 0, 1, 1, Qt.AlignLeft)
self.desyncSettingsLayout.addWidget(self.rewindThresholdSpinbox, 4, 1, Qt.AlignLeft)
self.subitems['slowOnDesync'] = ["slowdown-threshold"]
self.subitems['rewindOnDesync'] = ["rewind-threshold"]
self.desyncSettingsLayout.addWidget(self.rewindCheckbox, 1, 0,1,2, Qt.AlignLeft)
self.desyncSettingsLayout.setAlignment(Qt.AlignLeft)
self.desyncSettingsGroup.setLayout(self.desyncSettingsLayout)
@ -651,16 +576,10 @@ class ConfigDialog(QtGui.QDialog):
self.dontslowwithmeCheckbox = QCheckBox(getMessage("dontslowdownwithme-label"))
self.dontslowwithmeCheckbox.setObjectName("dontSlowDownWithMe")
self.othersyncSettingsLayout.addWidget(self.dontslowwithmeCheckbox, 3, 0, 1, 2, Qt.AlignLeft)
self.fastforwardThresholdLabel.setObjectName("fastforward-threshold")
self.fastforwardThresholdSpinbox.setObjectName("fastforward-threshold")
self.othersyncSettingsLayout.addWidget(self.dontslowwithmeCheckbox, 2, 0, 1, 2, Qt.AlignLeft)
self.othersyncSettingsLayout.setAlignment(Qt.AlignLeft)
self.othersyncSettingsLayout.addWidget(self.fastforwardCheckbox, 4, 0,1,2, Qt.AlignLeft)
self.othersyncSettingsLayout.addWidget(self.fastforwardThresholdLabel, 5, 0, 1, 1, Qt.AlignLeft)
self.othersyncSettingsLayout.addWidget(self.fastforwardThresholdSpinbox, 5, 1, Qt.AlignLeft)
self.subitems['fastforwardOnDesync'] = ["fastforward-threshold"]
self.othersyncSettingsLayout.addWidget(self.fastforwardCheckbox, 3, 0,1,2, Qt.AlignLeft)
self.othersyncSettingsGroup.setLayout(self.othersyncSettingsLayout)
self.othersyncSettingsGroup.setMaximumHeight(self.othersyncSettingsGroup.minimumSizeHint().height())