openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #14292
[Merge] lp:~mahfiaz/openlp/bug-903683 into lp:openlp
mahfiaz has proposed merging lp:~mahfiaz/openlp/bug-903683 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #903683 in OpenLP: "Capitalize webkit and phonon in config media"
https://bugs.launchpad.net/openlp/+bug/903683
For more details, see:
https://code.launchpad.net/~mahfiaz/openlp/bug-903683/+merge/96004
WebKit, Phonon and VLC now have proper case under Media Tab in Settings.
--
https://code.launchpad.net/~mahfiaz/openlp/bug-903683/+merge/96004
Your team OpenLP Core is requested to review the proposed merge of lp:~mahfiaz/openlp/bug-903683 into lp:openlp.
=== modified file 'openlp/core/ui/media/phononplayer.py'
--- openlp/core/ui/media/phononplayer.py 2012-02-05 14:39:46 +0000
+++ openlp/core/ui/media/phononplayer.py 2012-03-05 21:13:24 +0000
@@ -31,7 +31,7 @@
from PyQt4.phonon import Phonon
-from openlp.core.lib import Receiver
+from openlp.core.lib import Receiver, Translate
from openlp.core.lib.mediaplayer import MediaPlayer
from openlp.core.ui.media import MediaState
@@ -63,6 +63,7 @@
def __init__(self, parent):
MediaPlayer.__init__(self, parent, u'phonon')
+ self.display_name = translate('MediaPlugin.MediaTab', 'Phonon')
self.parent = parent
self.additional_extensions = ADDITIONAL_EXT
mimetypes.init()
=== modified file 'openlp/core/ui/media/vlcplayer.py'
--- openlp/core/ui/media/vlcplayer.py 2012-01-19 19:13:19 +0000
+++ openlp/core/ui/media/vlcplayer.py 2012-03-05 21:13:24 +0000
@@ -43,7 +43,7 @@
raise
from PyQt4 import QtCore, QtGui
-from openlp.core.lib import Receiver
+from openlp.core.lib import Receiver, translate
from openlp.core.lib.mediaplayer import MediaPlayer
from openlp.core.ui.media import MediaState
@@ -89,6 +89,7 @@
def __init__(self, parent):
MediaPlayer.__init__(self, parent, u'vlc')
+ self.display_name = translate('MediaPlugin.MediaTab', 'VLC')
self.parent = parent
self.canFolder = True
self.audio_extensions_list = AUDIO_EXT
=== modified file 'openlp/core/ui/media/webkitplayer.py'
--- openlp/core/ui/media/webkitplayer.py 2011-12-07 20:20:23 +0000
+++ openlp/core/ui/media/webkitplayer.py 2012-03-05 21:13:24 +0000
@@ -27,6 +27,7 @@
import logging
+from openlp.core.lib import translate
from openlp.core.lib.mediaplayer import MediaPlayer
from openlp.core.ui.media import MediaState
@@ -260,6 +261,7 @@
def __init__(self, parent):
MediaPlayer.__init__(self, parent, u'webkit')
+ self.display_name = translate('MediaPlugin.MediaTab', 'WebKit')
self.parent = parent
self.canBackground = True
self.audio_extensions_list = AUDIO_EXT
=== modified file 'openlp/plugins/media/lib/mediatab.py'
--- openlp/plugins/media/lib/mediatab.py 2011-12-31 17:37:56 +0000
+++ openlp/plugins/media/lib/mediatab.py 2012-03-05 21:13:24 +0000
@@ -117,11 +117,11 @@
player = self.mediaPlayers[key]
checkbox = self.playerCheckBoxes[player.name]
if player.available:
- checkbox.setText(player.name)
+ checkbox.setText(player.display_name)
else:
checkbox.setText(
unicode(translate('MediaPlugin.MediaTab',
- '%s (unavailable)')) % player.name)
+ '%s (unavailable)')) % player.display_name)
self.playerOrderGroupBox.setTitle(
translate('MediaPlugin.MediaTab', 'Player Order'))
self.orderingDownButton.setText(
@@ -134,7 +134,10 @@
'Allow media player to be overriden'))
def onPlayerCheckBoxChanged(self, check_state):
- player = self.sender().text()
+ display_name = self.sender().text()
+ for key in self.mediaPlayers:
+ if self.mediaPlayers[key].display_name == display_name:
+ player = key
if check_state == QtCore.Qt.Checked:
if player not in self.usedPlayers:
self.usedPlayers.append(player)
@@ -152,7 +155,8 @@
self.playerCheckBoxes[u'%s' % player].setEnabled(False)
else:
self.playerCheckBoxes[u'%s' % player].setEnabled(True)
- self.playerOrderlistWidget.addItem(player)
+ self.playerOrderlistWidget.addItem(
+ self.mediaPlayers[unicode(player)].display_name)
def onOrderingUpButtonPressed(self):
currentRow = self.playerOrderlistWidget.currentRow()
@@ -171,9 +175,6 @@
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',')
Follow ups