forked from openlp/openlp
more tweeks
This commit is contained in:
parent
345b0fcd12
commit
42ff12dc48
@ -698,4 +698,3 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
|
||||
theme_manager = property(_get_theme_manager)
|
||||
|
||||
|
||||
|
@ -662,3 +662,4 @@ class Renderer(object):
|
||||
return self._theme_manager
|
||||
|
||||
theme_manager = property(_get_theme_manager)
|
||||
|
||||
|
@ -174,4 +174,13 @@ class SettingsTab(QtGui.QWidget):
|
||||
|
||||
theme_manager = property(_get_theme_manager)
|
||||
|
||||
def _get_media_controller(self):
|
||||
"""
|
||||
Adds the media controller to the class dynamically
|
||||
"""
|
||||
if not hasattr(self, u'_media_controller'):
|
||||
self._media_controller = Registry().get(u'media_controller')
|
||||
return self._media_controller
|
||||
|
||||
media_controller = property(_get_media_controller)
|
||||
|
||||
|
@ -39,7 +39,7 @@ from ConfigParser import SafeConfigParser
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate, PluginStatus, Receiver, build_icon, check_directory_exists, Settings
|
||||
from openlp.core.lib import translate, PluginStatus, Receiver, build_icon, check_directory_exists, Settings, Registry
|
||||
from openlp.core.utils import get_web_page, AppLocation, get_filesystem_encoding
|
||||
from firsttimewizard import Ui_FirstTimeWizard, FirstTimePage
|
||||
|
||||
@ -198,7 +198,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
||||
self.themeComboBox.addItem(item.text())
|
||||
if self.hasRunWizard:
|
||||
# Add any existing themes to list.
|
||||
for theme in self.parent().themeManagerContents.get_themes():
|
||||
for theme in self.theme_manager.get_themes():
|
||||
index = self.themeComboBox.findText(theme)
|
||||
if index == -1:
|
||||
self.themeComboBox.addItem(theme)
|
||||
@ -461,3 +461,13 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
||||
def _setPluginStatus(self, field, tag):
|
||||
status = PluginStatus.Active if field.checkState() == QtCore.Qt.Checked else PluginStatus.Inactive
|
||||
Settings().setValue(tag, status)
|
||||
|
||||
def _get_theme_manager(self):
|
||||
"""
|
||||
Adds the theme manager to the class dynamically
|
||||
"""
|
||||
if not hasattr(self, u'_theme_manager'):
|
||||
self._theme_manager = Registry().get(u'theme_manager')
|
||||
return self._theme_manager
|
||||
|
||||
theme_manager = property(_get_theme_manager)
|
||||
|
@ -46,7 +46,7 @@ class PlayerTab(SettingsTab):
|
||||
MediaTab is the Media settings tab in the settings dialog.
|
||||
"""
|
||||
def __init__(self, parent):
|
||||
self.mediaPlayers = self.main_window.mediaController.mediaPlayers
|
||||
self.mediaPlayers = self.media_controller.mediaPlayers
|
||||
self.savedUsedPlayers = None
|
||||
self.iconPath = u':/media/multimedia-player.png'
|
||||
player_translated = translate('OpenLP.PlayerTab', 'Players')
|
||||
|
@ -546,4 +546,3 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
return self._theme_manager
|
||||
|
||||
theme_manager = property(_get_theme_manager)
|
||||
|
Loading…
Reference in New Issue
Block a user