Re-introduce blaenk's rewind checkbox, conditional on constant
This commit is contained in:
parent
e9390259c6
commit
1314842b09
@ -5,6 +5,7 @@ from PySide.QtGui import QApplication, QLineEdit, QCursor, QLabel, QCheckBox, QD
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from syncplay.messages import getMessage
|
from syncplay.messages import getMessage
|
||||||
|
from syncplay import constants
|
||||||
|
|
||||||
class GuiConfiguration:
|
class GuiConfiguration:
|
||||||
def __init__(self, config, error = None):
|
def __init__(self, config, error = None):
|
||||||
@ -169,6 +170,11 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
self.config['slowOnDesync'] = True
|
self.config['slowOnDesync'] = True
|
||||||
else:
|
else:
|
||||||
self.config['slowOnDesync'] = False
|
self.config['slowOnDesync'] = False
|
||||||
|
if constants.SHOW_REWIND_ON_DESYNC_CHECKBOX == True:
|
||||||
|
if self.rewindCheckbox.isChecked() == True:
|
||||||
|
self.config['rewindOnDesync'] = True
|
||||||
|
else:
|
||||||
|
self.config['rewindOnDesync'] = False
|
||||||
self.config['malUsername'] = self.malusernameTextbox.text()
|
self.config['malUsername'] = self.malusernameTextbox.text()
|
||||||
if self.malSettingsGroup.isChecked():
|
if self.malSettingsGroup.isChecked():
|
||||||
self.config['malPassword'] = self.malpasswordTextbox.text()
|
self.config['malPassword'] = self.malpasswordTextbox.text()
|
||||||
@ -261,6 +267,8 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
self.mediabrowseButton = QtGui.QPushButton(QtGui.QIcon(resourcespath + 'folder_explore.png'),"Browse")
|
self.mediabrowseButton = QtGui.QPushButton(QtGui.QIcon(resourcespath + 'folder_explore.png'),"Browse")
|
||||||
self.mediabrowseButton.clicked.connect(self.browseMediapath)
|
self.mediabrowseButton.clicked.connect(self.browseMediapath)
|
||||||
self.slowdownCheckbox = QCheckBox("Slow down on desync")
|
self.slowdownCheckbox = QCheckBox("Slow down on desync")
|
||||||
|
if constants.SHOW_REWIND_ON_DESYNC_CHECKBOX == True:
|
||||||
|
self.rewindCheckbox = QCheckBox("Rewind on major desync")
|
||||||
self.mediaplayerSettingsLayout = QtGui.QGridLayout()
|
self.mediaplayerSettingsLayout = QtGui.QGridLayout()
|
||||||
self.mediaplayerSettingsLayout.addWidget(self.executablepathLabel, 0, 0)
|
self.mediaplayerSettingsLayout.addWidget(self.executablepathLabel, 0, 0)
|
||||||
self.mediaplayerSettingsLayout.addWidget(self.executablepathCombobox , 0, 1)
|
self.mediaplayerSettingsLayout.addWidget(self.executablepathCombobox , 0, 1)
|
||||||
@ -269,9 +277,13 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
self.mediaplayerSettingsLayout.addWidget(self.mediapathTextbox , 1, 1)
|
self.mediaplayerSettingsLayout.addWidget(self.mediapathTextbox , 1, 1)
|
||||||
self.mediaplayerSettingsLayout.addWidget(self.mediabrowseButton , 1, 2)
|
self.mediaplayerSettingsLayout.addWidget(self.mediabrowseButton , 1, 2)
|
||||||
self.mediaplayerSettingsLayout.addWidget(self.slowdownCheckbox, 2, 0)
|
self.mediaplayerSettingsLayout.addWidget(self.slowdownCheckbox, 2, 0)
|
||||||
|
if constants.SHOW_REWIND_ON_DESYNC_CHECKBOX == True:
|
||||||
|
self.mediaplayerSettingsLayout.addWidget(self.rewindCheckbox, 3, 0)
|
||||||
self.mediaplayerSettingsGroup.setLayout(self.mediaplayerSettingsLayout)
|
self.mediaplayerSettingsGroup.setLayout(self.mediaplayerSettingsLayout)
|
||||||
if config['slowOnDesync'] == True:
|
if config['slowOnDesync'] == True:
|
||||||
self.slowdownCheckbox.setChecked(True)
|
self.slowdownCheckbox.setChecked(True)
|
||||||
|
if constants.SHOW_REWIND_ON_DESYNC_CHECKBOX == True and config['rewindOnDesync'] == True:
|
||||||
|
self.rewindCheckbox.setChecked(True)
|
||||||
|
|
||||||
self.malSettingsGroup = QtGui.QGroupBox("Enable MyAnimeList updater (EXPERIMENTAL)")
|
self.malSettingsGroup = QtGui.QGroupBox("Enable MyAnimeList updater (EXPERIMENTAL)")
|
||||||
self.malSettingsGroup.setCheckable(True)
|
self.malSettingsGroup.setCheckable(True)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user