From cf52bb31fcb41c526c9060d205e0594fa60f5b7f Mon Sep 17 00:00:00 2001 From: Et0h Date: Sat, 28 Jun 2014 10:48:54 +0100 Subject: [PATCH] Use constant for min slowdown threshold --- syncplay/constants.py | 1 + syncplay/ui/GuiConfiguration.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/syncplay/constants.py b/syncplay/constants.py index a2949b6..a801891 100644 --- a/syncplay/constants.py +++ b/syncplay/constants.py @@ -26,6 +26,7 @@ SEEK_THRESHOLD = 1 SLOWDOWN_RATE = 0.95 DEFAULT_SLOWDOWN_KICKIN_THRESHOLD = 1.5 SLOWDOWN_RESET_THRESHOLD = 0.1 +MINIMUM_SLOWDOWN_THRESHOLD = 0.2 DIFFFERENT_DURATION_THRESHOLD = 2.5 PROTOCOL_TIMEOUT = 12.5 RECONNECT_RETRIES = 10 diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index 2bcd27a..42afc52 100644 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -370,7 +370,7 @@ class ConfigDialog(QtGui.QDialog): self.slowdownThresholdSpinbox.setSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) self.slowdownThresholdSpinbox.setMinimumWidth(80) self.slowdownThresholdSpinbox.setMaximumWidth(80) - self.slowdownThresholdSpinbox.setMinimum(0.1) + self.slowdownThresholdSpinbox.setMinimum(constants.MINIMUM_SLOWDOWN_THRESHOLD) self.slowdownThresholdSpinbox.setSingleStep(0.1) self.slowdownThresholdSpinbox.setSuffix(" secs") self.slowdownThresholdSpinbox.adjustSize()