This commit is contained in:
Andreas Preikschat 2011-01-20 15:51:26 +01:00
commit 678699621b
25 changed files with 25423 additions and 16339 deletions

View File

@ -169,8 +169,9 @@ class MediaManagerItem(QtGui.QWidget):
``slot`` ``slot``
The method to call when the button is clicked. The method to call when the button is clicked.
``objectname`` ``checkable``
The name of the button. If *True* the button has two, *off* and *on*, states. Default is
*False*, which means the buttons has only one state.
""" """
# NB different order (when I broke this out, I didn't want to # NB different order (when I broke this out, I didn't want to
# break compatability), but it makes sense for the icon to # break compatability), but it makes sense for the icon to
@ -193,13 +194,13 @@ class MediaManagerItem(QtGui.QWidget):
""" """
# Add a toolbar # Add a toolbar
self.addToolbar() self.addToolbar()
#Allow the plugin to define buttons at start of bar # Allow the plugin to define buttons at start of bar
self.addStartHeaderBar() self.addStartHeaderBar()
#Add the middle of the tool bar (pre defined) # Add the middle of the tool bar (pre defined)
self.addMiddleHeaderBar() self.addMiddleHeaderBar()
#Allow the plugin to define buttons at end of bar # Allow the plugin to define buttons at end of bar
self.addEndHeaderBar() self.addEndHeaderBar()
#Add the list view # Add the list view
self.addListViewToToolBar() self.addListViewToToolBar()
def addMiddleHeaderBar(self): def addMiddleHeaderBar(self):

View File

@ -69,8 +69,9 @@ class OpenLPToolbar(QtGui.QToolBar):
``slot`` ``slot``
The method to run when this button is clicked. The method to run when this button is clicked.
``objectname`` ``checkable``
The name of the object, as used in `<button>.setObjectName()`. If *True* the button has two, *off* and *on*, states. Default is
*False*, which means the buttons has only one state.
""" """
newAction = None newAction = None
if icon: if icon:

View File

@ -437,7 +437,8 @@ class MainDisplay(DisplayWidget):
self.hideDisplay(self.hideMode) self.hideDisplay(self.hideMode)
# Hide mouse cursor when moved over display if enabled in settings # Hide mouse cursor when moved over display if enabled in settings
settings = QtCore.QSettings() settings = QtCore.QSettings()
if settings.value(u'advanced/hide mouse', QtCore.QVariant(False)).toBool(): if settings.value(u'advanced/hide mouse',
QtCore.QVariant(False)).toBool():
self.setCursor(QtCore.Qt.BlankCursor) self.setCursor(QtCore.Qt.BlankCursor)
self.frame.evaluateJavaScript('document.body.style.cursor = "none"') self.frame.evaluateJavaScript('document.body.style.cursor = "none"')
else: else:

View File

@ -85,7 +85,7 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
item.setIcon(plugin.icon) item.setIcon(plugin.icon)
self.pluginListWidget.addItem(item) self.pluginListWidget.addItem(item)
pluginListWidth = max(pluginListWidth, self.fontMetrics().width( pluginListWidth = max(pluginListWidth, self.fontMetrics().width(
unicode(translate('OpenLP.PluginForm', '%s (Inactive)')) % unicode(translate('OpenLP.PluginForm', '%s (Inactive)')) %
name_string[u'singular'])) name_string[u'singular']))
self.pluginListWidget.setFixedWidth(pluginListWidth + self.pluginListWidget.setFixedWidth(pluginListWidth +
self.pluginListWidget.iconSize().width() + 48) self.pluginListWidget.iconSize().width() + 48)

View File

@ -245,6 +245,9 @@ class ServiceManager(QtGui.QWidget):
QtCore.SIGNAL(u'servicemanager_list_request'), self.listRequest) QtCore.SIGNAL(u'servicemanager_list_request'), self.listRequest)
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'config_updated'), self.configUpdated) QtCore.SIGNAL(u'config_updated'), self.configUpdated)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'config_screen_changed'),
self.regenerateServiceItems)
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'theme_update_global'), self.themeChange) QtCore.SIGNAL(u'theme_update_global'), self.themeChange)
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
@ -289,7 +292,7 @@ class ServiceManager(QtGui.QWidget):
self.themeMenu = QtGui.QMenu( self.themeMenu = QtGui.QMenu(
translate('OpenLP.ServiceManager', '&Change Item Theme')) translate('OpenLP.ServiceManager', '&Change Item Theme'))
self.menu.addMenu(self.themeMenu) self.menu.addMenu(self.themeMenu)
self.configUpdated(True) self.configUpdated()
def setModified(self, modified=True): def setModified(self, modified=True):
""" """
@ -328,15 +331,13 @@ class ServiceManager(QtGui.QWidget):
""" """
return split_filename(self._fileName)[1] return split_filename(self._fileName)[1]
def configUpdated(self, firstTime=False): def configUpdated(self):
""" """
Triggered when Config dialog is updated. Triggered when Config dialog is updated.
""" """
self.expandTabs = QtCore.QSettings().value( self.expandTabs = QtCore.QSettings().value(
u'advanced/expand service item', u'advanced/expand service item',
QtCore.QVariant(u'False')).toBool() QtCore.QVariant(u'False')).toBool()
if not firstTime:
self.regenerateServiceItems()
def supportedSuffixes(self, suffix): def supportedSuffixes(self, suffix):
self.suffixes.append(suffix) self.suffixes.append(suffix)

View File

@ -376,8 +376,6 @@ class SlideController(QtGui.QWidget):
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'slidecontroller_%s_text_request' % self.typePrefix), QtCore.SIGNAL(u'slidecontroller_%s_text_request' % self.typePrefix),
self.onTextRequest) self.onTextRequest)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'config_updated'), self.refreshServiceItem)
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged) QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
@ -395,6 +393,8 @@ class SlideController(QtGui.QWidget):
self.ratio = float(self.screens.current[u'size'].width()) / \ self.ratio = float(self.screens.current[u'size'].width()) / \
float(self.screens.current[u'size'].height()) float(self.screens.current[u'size'].height())
self.previewSizeChanged() self.previewSizeChanged()
if self.serviceItem:
self.refreshServiceItem()
def previewSizeChanged(self): def previewSizeChanged(self):
""" """
@ -493,11 +493,10 @@ class SlideController(QtGui.QWidget):
Method to update the service item if the screen has changed Method to update the service item if the screen has changed
""" """
log.debug(u'refreshServiceItem live = %s' % self.isLive) log.debug(u'refreshServiceItem live = %s' % self.isLive)
if self.serviceItem: if self.serviceItem.is_text() or self.serviceItem.is_image():
if self.serviceItem.is_text() or self.serviceItem.is_image(): item = self.serviceItem
item = self.serviceItem item.render()
item.render() self._processItem(item, self.selectedRow)
self._processItem(item, self.selectedRow)
def addServiceItem(self, item): def addServiceItem(self, item):
""" """

View File

@ -95,7 +95,7 @@ class OpenLPWizard(QtGui.QWizard):
def addProgressPage(self): def addProgressPage(self):
""" """
Add the progress page for the wizard. This page informs the user how Add the progress page for the wizard. This page informs the user how
the wizard is progressing with its task. the wizard is progressing with its task.
""" """
self.progressPage = QtGui.QWizardPage() self.progressPage = QtGui.QWizardPage()
@ -125,7 +125,7 @@ class OpenLPWizard(QtGui.QWizard):
log.debug(u'Wizard cancelled by user.') log.debug(u'Wizard cancelled by user.')
if self.currentPage() == self.progressPage: if self.currentPage() == self.progressPage:
Receiver.send_message(u'openlp_stop_wizard') Receiver.send_message(u'openlp_stop_wizard')
self.done(QtGui.QDialog.Rejected) self.done(QtGui.QDialog.Rejected)
def onCurrentIdChanged(self, pageId): def onCurrentIdChanged(self, pageId):
""" """

View File

@ -553,7 +553,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
return False return False
if self.verseOrderEdit.text(): if self.verseOrderEdit.text():
order = [] order = []
order_names = self.verseOrderEdit.text().split() order_names = unicode(self.verseOrderEdit.text()).split()
for item in order_names: for item in order_names:
if len(item) == 1: if len(item) == 1:
order.append(item.lower() + u'1') order.append(item.lower() + u'1')

View File

@ -322,7 +322,7 @@ class SongImportForm(OpenLPWizard):
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
self.openLP1FormLabelSpacer.changeSize(width, 0, self.openLP1FormLabelSpacer.changeSize(width, 0,
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
self.easiSlidesFormLabelSpacer.changeSize(width, 0, self.easiSlidesFormLabelSpacer.changeSize(width, 0,
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
self.ewFormLabelSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed, self.ewFormLabelSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
QtGui.QSizePolicy.Fixed) QtGui.QSizePolicy.Fixed)
@ -654,7 +654,7 @@ class SongImportForm(OpenLPWizard):
'Select EasiSlides songfile'), 'Select EasiSlides songfile'),
self.easiSlidesFilenameEdit self.easiSlidesFilenameEdit
) )
def onEWBrowseButtonClicked(self): def onEWBrowseButtonClicked(self):
""" """
Get EasyWorship song database files Get EasyWorship song database files

View File

@ -171,10 +171,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
# not return False when nothing has changed (because this would # not return False when nothing has changed (because this would
# cause an error message later on). # cause an error message later on).
if edit: if edit:
if authors[0].id == new_author.id: for author in authors:
return True if author.id != new_author.id:
else: return False
return False return True
else: else:
return False return False
else: else:
@ -191,10 +191,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
# not return False when nothing has changed (because this would # not return False when nothing has changed (because this would
# cause an error message later on). # cause an error message later on).
if edit: if edit:
if topics[0].id == new_topic.id: for topic in topics:
return True if topic.id != new_topic.id:
else: return False
return False return True
else: else:
return False return False
else: else:
@ -212,10 +212,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
# not return False when nothing has changed (because this would # not return False when nothing has changed (because this would
# cause an error message later on). # cause an error message later on).
if edit: if edit:
if books[0].id == new_book.id: for book in books:
return True if book.id != new_book.id:
else: return False
return False return True
else: else:
return False return False
else: else:

View File

@ -39,7 +39,7 @@ class EasiSlidesImport(SongImport):
""" """
Import songs exported from EasiSlides Import songs exported from EasiSlides
The format example is here: The format example is here:
http://wiki.openlp.org/Development:EasiSlides_-_Song_Data_Format http://wiki.openlp.org/Development:EasiSlides_-_Song_Data_Format
""" """
def __init__(self, manager, **kwargs): def __init__(self, manager, **kwargs):
@ -71,7 +71,7 @@ class EasiSlidesImport(SongImport):
for song in song_xml.Item: for song in song_xml.Item:
self.import_wizard.incrementProgressBar( self.import_wizard.incrementProgressBar(
unicode(translate('SongsPlugin.ImportWizardForm', unicode(translate('SongsPlugin.ImportWizardForm',
u'Importing %s, song %s...')) % u'Importing %s, song %s...')) %
(os.path.split(self.filename)[-1], song.Title1)) (os.path.split(self.filename)[-1], song.Title1))
success = self._parse_song(song) success = self._parse_song(song)
if not success or self.stop_import_flag: if not success or self.stop_import_flag:
@ -313,7 +313,7 @@ class EasiSlidesImport(SongImport):
tag = SeqTypes[tag.lower()] tag = SeqTypes[tag.lower()]
else: else:
continue continue
if tag in versetags: if tag in versetags:
self.verse_order_list.append(tag) self.verse_order_list.append(tag)
else: else:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

5159
resources/i18n/nl.ts Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff