openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #13709
[Merge] lp:~meths/openlp/trivialfixes into lp:openlp
Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/87198
Fix crashes in media settings - bug #908252
Few cleanups
--
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/87198
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/ui/media/mediacontroller.py'
--- openlp/core/ui/media/mediacontroller.py 2011-12-19 22:46:31 +0000
+++ openlp/core/ui/media/mediacontroller.py 2011-12-31 17:41:32 +0000
@@ -318,7 +318,8 @@
controller.media_info.start_time = 0
controller.media_info.end_time = 0
else:
- controller.media_info.start_time = display.serviceItem.start_time
+ controller.media_info.start_time = \
+ display.serviceItem.start_time
controller.media_info.end_time = display.serviceItem.end_time
elif controller.previewDisplay:
display = controller.previewDisplay
=== modified file 'openlp/core/utils/actions.py'
--- openlp/core/utils/actions.py 2011-12-27 10:33:55 +0000
+++ openlp/core/utils/actions.py 2011-12-31 17:41:32 +0000
@@ -358,7 +358,7 @@
if action is existing_action:
continue
if existing_action.parent() is action.parent():
- return False
+ return False
if existing_action.shortcutContext() in [QtCore.Qt.WindowShortcut,
QtCore.Qt.ApplicationShortcut]:
return False
=== modified file 'openlp/plugins/media/lib/mediatab.py'
--- openlp/plugins/media/lib/mediatab.py 2011-12-27 10:33:55 +0000
+++ openlp/plugins/media/lib/mediatab.py 2011-12-31 17:41:32 +0000
@@ -36,6 +36,7 @@
"""
def __init__(self, parent, title, visible_title, media_players, icon_path):
self.mediaPlayers = media_players
+ self.savedUsedPlayers = None
SettingsTab.__init__(self, parent, title, visible_title, icon_path)
def setupUi(self):
@@ -138,7 +139,8 @@
if player not in self.usedPlayers:
self.usedPlayers.append(player)
else:
- self.usedPlayers.takeAt(self.usedPlayers.indexOf(player))
+ if player in self.usedPlayers:
+ self.usedPlayers.takeAt(self.usedPlayers.indexOf(player))
self.updatePlayerList()
def updatePlayerList(self):
@@ -146,7 +148,7 @@
for player in self.usedPlayers:
if player in self.playerCheckBoxes.keys():
if len(self.usedPlayers) == 1:
- # at least one media player have to stay active
+ # At least one media player has to stay active
self.playerCheckBoxes[u'%s' % player].setEnabled(False)
else:
self.playerCheckBoxes[u'%s' % player].setEnabled(True)
@@ -169,14 +171,20 @@
self.usedPlayers.move(currentRow, currentRow + 1)
def load(self):
+ if self.savedUsedPlayers:
+ self.usedPlayers = self.savedUsedPlayers
+ self.savedUsedPlayers = None
self.usedPlayers = QtCore.QSettings().value(
self.settingsSection + u'/players',
QtCore.QVariant(u'webkit')).toString().split(u',')
+ self.savedUsedPlayers = self.usedPlayers
for key in self.mediaPlayers:
player = self.mediaPlayers[key]
checkbox = self.playerCheckBoxes[player.name]
if player.available and player.name in self.usedPlayers:
checkbox.setChecked(True)
+ else:
+ checkbox.setChecked(False)
self.updatePlayerList()
self.overridePlayerCheckBox.setChecked(QtCore.QSettings().value(
self.settingsSection + u'/override player',
Follow ups