forked from openlp/openlp
more clean ups
This commit is contained in:
parent
4a979b49d9
commit
5378399302
@ -82,7 +82,7 @@ class Settings(QtCore.QSettings):
|
||||
return setting.toStringList()
|
||||
if isinstance(defaultValue, QtCore.QPoint):
|
||||
return setting.toPoint()
|
||||
print u'No!'
|
||||
print u'No!', type(defaultValue)
|
||||
return setting
|
||||
|
||||
def setValue(self, key, value):
|
||||
|
@ -274,9 +274,9 @@ class ServiceManager(QtGui.QWidget):
|
||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||
QtCore.SIGNAL(u'service_item_update'), self.serviceItemUpdate)
|
||||
# Last little bits of setting up
|
||||
self.service_theme = unicode(Settings().value(
|
||||
self.service_theme = Settings().value(
|
||||
self.mainwindow.serviceManagerSettingsSection + u'/service theme',
|
||||
u''))
|
||||
u'')
|
||||
self.servicePath = AppLocation.get_section_data_path(u'servicemanager')
|
||||
# build the drag and drop context menu
|
||||
self.dndMenu = QtGui.QMenu()
|
||||
@ -608,18 +608,18 @@ class ServiceManager(QtGui.QWidget):
|
||||
day_delta += 7
|
||||
time = now + timedelta(days=day_delta)
|
||||
time = time.replace(hour=service_hour, minute=service_minute)
|
||||
default_pattern = unicode(Settings().value(
|
||||
default_pattern = Settings().value(
|
||||
u'advanced/default service name',
|
||||
translate('OpenLP.AdvancedTab', 'Service %Y-%m-%d %H-%M',
|
||||
'This may not contain any of the following characters: '
|
||||
'/\\?*|<>\[\]":+\nSee http://docs.python.org/library/'
|
||||
'datetime.html#strftime-strptime-behavior for more '
|
||||
'information.')))
|
||||
'information.'))
|
||||
default_filename = time.strftime(default_pattern)
|
||||
else:
|
||||
default_filename = u''
|
||||
directory = unicode(SettingsManager.get_last_dir(
|
||||
self.mainwindow.serviceManagerSettingsSection))
|
||||
directory = SettingsManager.get_last_dir(
|
||||
self.mainwindow.serviceManagerSettingsSection)
|
||||
path = os.path.join(directory, default_filename)
|
||||
fileName = unicode(QtGui.QFileDialog.getSaveFileName(self.mainwindow,
|
||||
UiStrings().SaveService, path,
|
||||
|
@ -67,8 +67,7 @@ class MediaTab(SettingsTab):
|
||||
self.playerOrderGroupBox.setObjectName(u'playerOrderGroupBox')
|
||||
self.playerOrderLayout = QtGui.QHBoxLayout(self.playerOrderGroupBox)
|
||||
self.playerOrderLayout.setObjectName(u'playerOrderLayout')
|
||||
self.playerOrderlistWidget = QtGui.QListWidget( \
|
||||
self.playerOrderGroupBox)
|
||||
self.playerOrderlistWidget = QtGui.QListWidget(self.playerOrderGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
@ -76,11 +75,11 @@ class MediaTab(SettingsTab):
|
||||
sizePolicy.setHeightForWidth(self.playerOrderlistWidget. \
|
||||
sizePolicy().hasHeightForWidth())
|
||||
self.playerOrderlistWidget.setSizePolicy(sizePolicy)
|
||||
self.playerOrderlistWidget.setVerticalScrollBarPolicy( \
|
||||
self.playerOrderlistWidget.setVerticalScrollBarPolicy(
|
||||
QtCore.Qt.ScrollBarAsNeeded)
|
||||
self.playerOrderlistWidget.setHorizontalScrollBarPolicy( \
|
||||
self.playerOrderlistWidget.setHorizontalScrollBarPolicy(
|
||||
QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.playerOrderlistWidget.setEditTriggers( \
|
||||
self.playerOrderlistWidget.setEditTriggers(
|
||||
QtGui.QAbstractItemView.NoEditTriggers)
|
||||
self.playerOrderlistWidget.setObjectName(u'playerOrderlistWidget')
|
||||
self.playerOrderLayout.addWidget(self.playerOrderlistWidget)
|
||||
@ -199,13 +198,12 @@ class MediaTab(SettingsTab):
|
||||
player_string_changed = True
|
||||
override_changed = True
|
||||
setting_key = self.settingsSection + u'/override player'
|
||||
if Settings().value(setting_key).toInt()[0] != \
|
||||
if Settings().value(setting_key, QtCore.Qt.Unchecked) != \
|
||||
self.overridePlayerCheckBox.checkState():
|
||||
Settings().setValue(setting_key,
|
||||
self.overridePlayerCheckBox.checkState())
|
||||
override_changed = True
|
||||
if override_changed:
|
||||
Receiver.send_message(u'mediaitem_media_rebuild')
|
||||
if player_string_changed:
|
||||
Receiver.send_message(u'mediaitem_media_rebuild')
|
||||
if player_string_changed or override_changed:
|
||||
if override_changed:
|
||||
Receiver.send_message(u'mediaitem_media_rebuild')
|
||||
Receiver.send_message(u'config_screen_changed')
|
||||
|
Loading…
Reference in New Issue
Block a user