r1302 + merge clash

This commit is contained in:
Tim Bentley 2011-02-15 18:56:14 +00:00
commit e5239697f0
26 changed files with 185 additions and 142 deletions

View File

@ -252,7 +252,6 @@ class MediaManagerItem(QtGui.QWidget):
self.pageLayout.addWidget(self.listView) self.pageLayout.addWidget(self.listView)
# define and add the context menu # define and add the context menu
self.listView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu) self.listView.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
name_string = self.plugin.getString(StringContent.Name)
if self.hasEditIcon: if self.hasEditIcon:
self.listView.addAction( self.listView.addAction(
context_menu_action( context_menu_action(

View File

@ -335,37 +335,39 @@ class Plugin(QtCore.QObject):
""" """
return self.textStrings[name] return self.textStrings[name]
def setPluginTextStrings(self): def setPluginUiTextStrings(self, tooltips):
""" """
Called to define all translatable texts of the plugin Called to define all translatable texts of the plugin
""" """
## Load Action ## ## Load Action ##
self._setSingularTextString(StringContent.Load, self.__setNameTextString(StringContent.Load,
UiStrings.Load, UiStrings.LoadANew) UiStrings.Load, tooltips[u'load'])
## Import Action ##
self.__setNameTextString(StringContent.Import,
UiStrings.Import, tooltips[u'import'])
## New Action ## ## New Action ##
self._setSingularTextString(StringContent.New, self.__setNameTextString(StringContent.New,
UiStrings.Add, UiStrings.AddANew) UiStrings.Add, tooltips[u'new'])
## Edit Action ## ## Edit Action ##
self._setSingularTextString(StringContent.Edit, self.__setNameTextString(StringContent.Edit,
UiStrings.Edit, UiStrings.EditSelect) UiStrings.Edit, tooltips[u'edit'])
## Delete Action ## ## Delete Action ##
self._setSingularTextString(StringContent.Delete, self.__setNameTextString(StringContent.Delete,
UiStrings.Delete, UiStrings.DeleteSelect) UiStrings.Delete, tooltips[u'delete'])
## Preview Action ## ## Preview Action ##
self._setSingularTextString(StringContent.Preview, self.__setNameTextString(StringContent.Preview,
UiStrings.Preview, UiStrings.PreviewSelect) UiStrings.Preview, tooltips[u'preview'])
## Send Live Action ## ## Send Live Action ##
self._setSingularTextString(StringContent.Live, self.__setNameTextString(StringContent.Live,
UiStrings.Live, UiStrings.SendSelectLive) UiStrings.Live, tooltips[u'live'])
## Add to Service Action ## ## Add to Service Action ##
self._setSingularTextString(StringContent.Service, self.__setNameTextString(StringContent.Service,
UiStrings.Service, UiStrings.AddSelectService) UiStrings.Service, tooltips[u'service'])
def _setSingularTextString(self, name, title, tooltip): def __setNameTextString(self, name, title, tooltip):
""" """
Utility method for creating a plugin's textStrings. This method makes Utility method for creating a plugin's textStrings. This method makes
use of the singular name of the plugin object so must only be called use of the singular name of the plugin object so must only be called
after this has been set. after this has been set.
""" """
self.textStrings[name] = { u'title': title, u'tooltip': tooltip % self.textStrings[name] = {u'title': title, u'tooltip': tooltip}
self.getString(StringContent.Name)[u'singular']}

View File

@ -436,7 +436,6 @@ class ServiceItem(object):
""" """
Returns the start and finish time for a media item Returns the start and finish time for a media item
""" """
tooltip = None
start = None start = None
end = None end = None
if self.start_time != 0: if self.start_time != 0:

View File

@ -178,9 +178,9 @@ class HorizontalType(object):
""" """
Return a string representation of a horizontal type. Return a string representation of a horizontal type.
""" """
if horizontal_type == Horizontal.Right: if horizontal_type == HorizontalType.Right:
return u'right' return u'right'
elif horizontal_type == Horizontal.Center: elif horizontal_type == HorizontalType.Center:
return u'center' return u'center'
else: else:
return u'left' return u'left'

View File

@ -41,42 +41,29 @@ class UiStrings(object):
# These strings should need a good reason to be retranslated elsewhere. # These strings should need a good reason to be retranslated elsewhere.
# Should some/more/less of these have an & attached? # Should some/more/less of these have an & attached?
Add = translate('OpenLP.Ui', '&Add') Add = translate('OpenLP.Ui', '&Add')
AddANew = unicode(translate('OpenLP.Ui', 'Add a new %s.'))
AddSelectService = unicode(translate('OpenLP.Ui',
'Add the selected %s to the service.'))
Advanced = translate('OpenLP.Ui', 'Advanced') Advanced = translate('OpenLP.Ui', 'Advanced')
AllFiles = translate('OpenLP.Ui', 'All Files') AllFiles = translate('OpenLP.Ui', 'All Files')
Authors = translate('OpenLP.Ui', 'Authors') Authors = translate('OpenLP.Ui', 'Authors')
CreateANew = unicode(translate('OpenLP.Ui', 'Create a new %s.'))
CopyToHtml = translate('OpenLP.Ui', 'Copy to Html') CopyToHtml = translate('OpenLP.Ui', 'Copy to Html')
CopyToText = translate('OpenLP.Ui', 'Copy to Text') CopyToText = translate('OpenLP.Ui', 'Copy to Text')
CreateService = translate('OpenLP.Ui', 'Create a new service.')
Delete = translate('OpenLP.Ui', '&Delete') Delete = translate('OpenLP.Ui', '&Delete')
DeleteSelect = unicode(translate('OpenLP.Ui', 'Delete the selected %s.'))
DeleteType = unicode(translate('OpenLP.Ui', 'Delete %s'))
Edit = translate('OpenLP.Ui', '&Edit') Edit = translate('OpenLP.Ui', '&Edit')
EditSelect = unicode(translate('OpenLP.Ui', 'Edit the selected %s.'))
EditType = unicode(translate('OpenLP.Ui', 'Edit %s'))
Error = translate('OpenLP.Ui', 'Error') Error = translate('OpenLP.Ui', 'Error')
ExportType = unicode(translate('OpenLP.Ui', 'Export %s'))
Import = translate('OpenLP.Ui', 'Import') Import = translate('OpenLP.Ui', 'Import')
ImportType = unicode(translate('OpenLP.Ui', 'Import %s'))
LengthTime = unicode(translate('OpenLP.Ui', 'Length %s')) LengthTime = unicode(translate('OpenLP.Ui', 'Length %s'))
Live = translate('OpenLP.Ui', 'Live') Live = translate('OpenLP.Ui', 'Live')
Load = translate('OpenLP.Ui', 'Load') Load = translate('OpenLP.Ui', 'Load')
LoadANew = unicode(translate('OpenLP.Ui', 'Load a new %s.'))
New = translate('OpenLP.Ui', 'New') New = translate('OpenLP.Ui', 'New')
NewType = unicode(translate('OpenLP.Ui', 'New %s')) NewService = translate('OpenLP.Ui', 'New Service')
OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0') OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
OpenType = unicode(translate('OpenLP.Ui', 'Open %s')) OpenService = translate('OpenLP.Ui', 'Open Service')
Preview = translate('OpenLP.Ui', 'Preview') Preview = translate('OpenLP.Ui', 'Preview')
PreviewSelect = unicode(translate('OpenLP.Ui', 'Preview the selected %s.'))
ReplaceBG = translate('OpenLP.Ui', 'Replace Background') ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
ReplaceLiveBG = translate('OpenLP.Ui', 'Replace Live Background') ReplaceLiveBG = translate('OpenLP.Ui', 'Replace Live Background')
ResetBG = translate('OpenLP.Ui', 'Reset Background') ResetBG = translate('OpenLP.Ui', 'Reset Background')
ResetLiveBG = translate('OpenLP.Ui', 'Reset Live Background') ResetLiveBG = translate('OpenLP.Ui', 'Reset Live Background')
SaveType = unicode(translate('OpenLP.Ui', 'Save %s')) SaveService = translate('OpenLP.Ui', 'Save Service')
SendSelectLive = unicode(translate('OpenLP.Ui',
'Send the selected %s live.'))
Service = translate('OpenLP.Ui', 'Service') Service = translate('OpenLP.Ui', 'Service')
StartTimeCode = unicode(translate('OpenLP.Ui', 'Start %s')) StartTimeCode = unicode(translate('OpenLP.Ui', 'Start %s'))
Theme = translate('OpenLP.Ui', 'Theme') Theme = translate('OpenLP.Ui', 'Theme')

View File

@ -319,17 +319,16 @@ class Ui_MainWindow(object):
self.themeManagerDock.setWindowTitle( self.themeManagerDock.setWindowTitle(
translate('OpenLP.MainWindow', 'Theme Manager')) translate('OpenLP.MainWindow', 'Theme Manager'))
self.FileNewItem.setText(translate('OpenLP.MainWindow', '&New')) self.FileNewItem.setText(translate('OpenLP.MainWindow', '&New'))
self.FileNewItem.setToolTip(UiStrings.NewType % UiStrings.Service) self.FileNewItem.setToolTip(UiStrings.NewService)
self.FileNewItem.setStatusTip( self.FileNewItem.setStatusTip(UiStrings.CreateService)
UiStrings.CreateANew % UiStrings.Service.toLower())
self.FileNewItem.setShortcut(translate('OpenLP.MainWindow', 'Ctrl+N')) self.FileNewItem.setShortcut(translate('OpenLP.MainWindow', 'Ctrl+N'))
self.FileOpenItem.setText(translate('OpenLP.MainWindow', '&Open')) self.FileOpenItem.setText(translate('OpenLP.MainWindow', '&Open'))
self.FileOpenItem.setToolTip(UiStrings.OpenType % UiStrings.Service) self.FileOpenItem.setToolTip(UiStrings.OpenService)
self.FileOpenItem.setStatusTip( self.FileOpenItem.setStatusTip(
translate('OpenLP.MainWindow', 'Open an existing service.')) translate('OpenLP.MainWindow', 'Open an existing service.'))
self.FileOpenItem.setShortcut(translate('OpenLP.MainWindow', 'Ctrl+O')) self.FileOpenItem.setShortcut(translate('OpenLP.MainWindow', 'Ctrl+O'))
self.FileSaveItem.setText(translate('OpenLP.MainWindow', '&Save')) self.FileSaveItem.setText(translate('OpenLP.MainWindow', '&Save'))
self.FileSaveItem.setToolTip(UiStrings.SaveType % UiStrings.Service) self.FileSaveItem.setToolTip(UiStrings.SaveService)
self.FileSaveItem.setStatusTip( self.FileSaveItem.setStatusTip(
translate('OpenLP.MainWindow', 'Save the current service to disk.')) translate('OpenLP.MainWindow', 'Save the current service to disk.'))
self.FileSaveItem.setShortcut(translate('OpenLP.MainWindow', 'Ctrl+S')) self.FileSaveItem.setShortcut(translate('OpenLP.MainWindow', 'Ctrl+S'))

View File

@ -24,7 +24,6 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
############################################################################### ###############################################################################
import datetime import datetime
import os
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui

View File

@ -96,18 +96,14 @@ class ServiceManager(QtGui.QWidget):
# Create the top toolbar # Create the top toolbar
self.toolbar = OpenLPToolbar(self) self.toolbar = OpenLPToolbar(self)
self.toolbar.addToolbarButton( self.toolbar.addToolbarButton(
UiStrings.NewType % UiStrings.Service, UiStrings.NewService, u':/general/general_new.png',
u':/general/general_new.png', UiStrings.CreateService, self.onNewServiceClicked)
UiStrings.CreateANew % UiStrings.Service.toLower(),
self.onNewServiceClicked)
self.toolbar.addToolbarButton( self.toolbar.addToolbarButton(
UiStrings.OpenType % UiStrings.Service, UiStrings.OpenService, u':/general/general_open.png',
u':/general/general_open.png',
translate('OpenLP.ServiceManager', 'Load an existing service'), translate('OpenLP.ServiceManager', 'Load an existing service'),
self.onLoadServiceClicked) self.onLoadServiceClicked)
self.toolbar.addToolbarButton( self.toolbar.addToolbarButton(
UiStrings.SaveType % UiStrings.Service, UiStrings.SaveService, u':/general/general_save.png',
u':/general/general_save.png',
translate('OpenLP.ServiceManager', 'Save this service'), translate('OpenLP.ServiceManager', 'Save this service'),
self.saveFile) self.saveFile)
self.toolbar.addSeparator() self.toolbar.addSeparator()
@ -469,7 +465,7 @@ class ServiceManager(QtGui.QWidget):
save the file. save the file.
""" """
fileName = unicode(QtGui.QFileDialog.getSaveFileName(self.mainwindow, fileName = unicode(QtGui.QFileDialog.getSaveFileName(self.mainwindow,
UiStrings.SaveType % UiStrings.Service, UiStrings.SaveService,
SettingsManager.get_last_dir( SettingsManager.get_last_dir(
self.mainwindow.serviceSettingsSection), self.mainwindow.serviceSettingsSection),
translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz)'))) translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz)')))

View File

@ -36,7 +36,6 @@ class Ui_SettingsDialog(object):
settingsDialog.setWindowIcon( settingsDialog.setWindowIcon(
build_icon(u':/system/system_settings.png')) build_icon(u':/system/system_settings.png'))
self.settingsLayout = QtGui.QVBoxLayout(settingsDialog) self.settingsLayout = QtGui.QVBoxLayout(settingsDialog)
margins = self.settingsLayout.contentsMargins()
self.settingsLayout.setObjectName(u'settingsLayout') self.settingsLayout.setObjectName(u'settingsLayout')
self.settingsTabWidget = QtGui.QTabWidget(settingsDialog) self.settingsTabWidget = QtGui.QTabWidget(settingsDialog)
self.settingsTabWidget.setObjectName(u'settingsTabWidget') self.settingsTabWidget.setObjectName(u'settingsTabWidget')

View File

@ -483,7 +483,8 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
Background Image button pushed. Background Image button pushed.
""" """
images_filter = get_images_filter() images_filter = get_images_filter()
images_filter = '%s;;%s (*.*) (*)' % (images_filter, UiStrings.AllFiles) images_filter = u'%s;;%s (*.*) (*)' % (
images_filter, UiStrings.AllFiles)
filename = QtGui.QFileDialog.getOpenFileName(self, filename = QtGui.QFileDialog.getOpenFileName(self,
translate('OpenLP.ThemeForm', 'Select Image'), u'', translate('OpenLP.ThemeForm', 'Select Image'), u'',
images_filter) images_filter)

View File

@ -63,28 +63,28 @@ class ThemeManager(QtGui.QWidget):
self.layout.setObjectName(u'layout') self.layout.setObjectName(u'layout')
self.toolbar = OpenLPToolbar(self) self.toolbar = OpenLPToolbar(self)
self.toolbar.addToolbarButton( self.toolbar.addToolbarButton(
UiStrings.NewType % UiStrings.Theme, translate('OpenLP.ThemeManager', 'New Theme'),
u':/themes/theme_new.png', u':/themes/theme_new.png',
UiStrings.CreateANew % UiStrings.Theme.toLower(), translate('OpenLP.ThemeManager', 'Create a new theme.'),
self.onAddTheme) self.onAddTheme)
self.toolbar.addToolbarButton( self.toolbar.addToolbarButton(
UiStrings.EditType % UiStrings.Theme, translate('OpenLP.ThemeManager', 'Edit Theme'),
u':/themes/theme_edit.png', u':/themes/theme_edit.png',
translate('OpenLP.ThemeManager', 'Edit a theme.'), translate('OpenLP.ThemeManager', 'Edit a theme.'),
self.onEditTheme) self.onEditTheme)
self.deleteToolbarAction = self.toolbar.addToolbarButton( self.deleteToolbarAction = self.toolbar.addToolbarButton(
UiStrings.DeleteType % UiStrings.Theme, translate('OpenLP.ThemeManager', 'Delete Theme'),
u':/general/general_delete.png', u':/general/general_delete.png',
translate('OpenLP.ThemeManager', 'Delete a theme.'), translate('OpenLP.ThemeManager', 'Delete a theme.'),
self.onDeleteTheme) self.onDeleteTheme)
self.toolbar.addSeparator() self.toolbar.addSeparator()
self.toolbar.addToolbarButton( self.toolbar.addToolbarButton(
UiStrings.ImportType % UiStrings.Theme, translate('OpenLP.ThemeManager', 'Import Theme'),
u':/general/general_import.png', u':/general/general_import.png',
translate('OpenLP.ThemeManager', 'Import a theme.'), translate('OpenLP.ThemeManager', 'Import a theme.'),
self.onImportTheme) self.onImportTheme)
self.toolbar.addToolbarButton( self.toolbar.addToolbarButton(
UiStrings.ExportType % UiStrings.Theme, translate('OpenLP.ThemeManager', 'Export Theme'),
u':/general/general_export.png', u':/general/general_export.png',
translate('OpenLP.ThemeManager', 'Export a theme.'), translate('OpenLP.ThemeManager', 'Export a theme.'),
self.onExportTheme) self.onExportTheme)
@ -314,7 +314,6 @@ class ThemeManager(QtGui.QWidget):
translate('OpenLP.ThemeManager', translate('OpenLP.ThemeManager',
'You must select a theme to edit.')): 'You must select a theme to edit.')):
item = self.themeListWidget.currentItem() item = self.themeListWidget.currentItem()
themeName = unicode(item.text())
theme = self.getThemeData( theme = self.getThemeData(
unicode(item.data(QtCore.Qt.UserRole).toString())) unicode(item.data(QtCore.Qt.UserRole).toString()))
if theme.background_type == u'image': if theme.background_type == u'image':
@ -406,8 +405,8 @@ class ThemeManager(QtGui.QWidget):
files = QtGui.QFileDialog.getOpenFileNames(self, files = QtGui.QFileDialog.getOpenFileNames(self,
translate('OpenLP.ThemeManager', 'Select Theme Import File'), translate('OpenLP.ThemeManager', 'Select Theme Import File'),
SettingsManager.get_last_dir(self.settingsSection), SettingsManager.get_last_dir(self.settingsSection),
translate('OpenLP.ThemeManager', 'Theme v1 (*.theme);;' unicode(translate('OpenLP.ThemeManager', 'Theme v1 (*.theme);;'
'Theme v2 (*.otz);;%s (*.*)') % UiStrings.AllFiles) 'Theme v2 (*.otz);;%s (*.*)')) % UiStrings.AllFiles)
log.info(u'New Themes %s', unicode(files)) log.info(u'New Themes %s', unicode(files))
if files: if files:
for file in files: for file in files:

View File

@ -29,7 +29,6 @@ import logging
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import Plugin, StringContent, build_icon, translate from openlp.core.lib import Plugin, StringContent, build_icon, translate
from openlp.core.lib.ui import UiStrings
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -129,9 +128,15 @@ class BiblePlugin(Plugin):
u'title': translate('BiblesPlugin', 'Bibles', 'container title') u'title': translate('BiblesPlugin', 'Bibles', 'container title')
} }
# Middle Header Bar # Middle Header Bar
## Import Action ## tooltips = {
self.textStrings[StringContent.Import] = { u'load': u'',
u'title': UiStrings.Import, u'import': translate('BiblesPlugin', 'Import a Bible'),
u'tooltip': translate('BiblesPlugin', 'Import a Bible') u'new': translate('BiblesPlugin', 'Add a new Bible'),
u'edit': translate('BiblesPlugin', 'Edit the selected Bible'),
u'delete': translate('BiblesPlugin', 'Delete the selected Bible'),
u'preview': translate('BiblesPlugin', 'Preview the selected Bible'),
u'live': translate('BiblesPlugin', 'Send the selected Bible live'),
u'service': translate('BiblesPlugin',
'Add the selected Bible to the service')
} }
Plugin.setPluginTextStrings(self) self.setPluginUiTextStrings(tooltips)

View File

@ -30,6 +30,7 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, \ from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, \
translate translate
from openlp.core.lib.searchedit import SearchEdit
from openlp.core.lib.ui import UiStrings, add_widget_completer, \ from openlp.core.lib.ui import UiStrings, add_widget_completer, \
media_item_combo_box, critical_error_message_box media_item_combo_box, critical_error_message_box
from openlp.plugins.bibles.forms import BibleImportForm from openlp.plugins.bibles.forms import BibleImportForm
@ -37,6 +38,14 @@ from openlp.plugins.bibles.lib import get_reference_match
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class BibleSearch(object):
"""
Enumeration class for the different search methods for the "quick search".
"""
Reference = 1
Text = 2
class BibleMediaItem(MediaManagerItem): class BibleMediaItem(MediaManagerItem):
""" """
This is the custom media manager item for Bibles. This is the custom media manager item for Bibles.
@ -83,18 +92,17 @@ class BibleMediaItem(MediaManagerItem):
u'quickSecondComboBox') u'quickSecondComboBox')
self.quickSecondLabel.setBuddy(self.quickSecondComboBox) self.quickSecondLabel.setBuddy(self.quickSecondComboBox)
self.quickLayout.addRow(self.quickSecondLabel, self.quickSecondComboBox) self.quickLayout.addRow(self.quickSecondLabel, self.quickSecondComboBox)
self.quickSearchTypeLabel = QtGui.QLabel(self.quickTab)
self.quickSearchTypeLabel.setObjectName(u'quickSearchTypeLabel')
self.quickSearchComboBox = media_item_combo_box(self.quickTab,
u'quickSearchComboBox')
self.quickSearchTypeLabel.setBuddy(self.quickSearchComboBox)
self.quickLayout.addRow(self.quickSearchTypeLabel,
self.quickSearchComboBox)
self.quickSearchLabel = QtGui.QLabel(self.quickTab) self.quickSearchLabel = QtGui.QLabel(self.quickTab)
self.quickSearchLabel.setObjectName(u'quickSearchLabel') self.quickSearchLabel.setObjectName(u'quickSearchLabel')
self.quickSearchEdit = QtGui.QLineEdit(self.quickTab) self.quickSearchEdit = SearchEdit(self.quickTab)
self.quickSearchEdit.setObjectName(u'quickSearchEdit') self.quickSearchEdit.setObjectName(u'quickSearchEdit')
self.quickSearchLabel.setBuddy(self.quickSearchEdit) self.quickSearchLabel.setBuddy(self.quickSearchEdit)
self.quickSearchEdit.setSearchTypes([
(BibleSearch.Reference, u':/bibles/bibles_search_reference.png',
translate('BiblesPlugin.MediaItem', 'Scripture Reference')),
(BibleSearch.Text, u':/bibles/bibles_search_text.png',
translate('BiblesPlugin.MediaItem', 'Text Search'))
])
self.quickLayout.addRow(self.quickSearchLabel, self.quickSearchEdit) self.quickLayout.addRow(self.quickSearchLabel, self.quickSearchEdit)
self.quickClearLabel = QtGui.QLabel(self.quickTab) self.quickClearLabel = QtGui.QLabel(self.quickTab)
self.quickClearLabel.setObjectName(u'quickClearLabel') self.quickClearLabel.setObjectName(u'quickClearLabel')
@ -196,8 +204,8 @@ class BibleMediaItem(MediaManagerItem):
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedFromVerse) QtCore.SIGNAL(u'activated(int)'), self.onAdvancedFromVerse)
QtCore.QObject.connect(self.advancedToChapter, QtCore.QObject.connect(self.advancedToChapter,
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedToChapter) QtCore.SIGNAL(u'activated(int)'), self.onAdvancedToChapter)
QtCore.QObject.connect(self.quickSearchComboBox, QtCore.QObject.connect(self.quickSearchEdit,
QtCore.SIGNAL(u'activated(int)'), self.updateAutoCompleter) QtCore.SIGNAL(u'searchTypeChanged(int)'), self.updateAutoCompleter)
QtCore.QObject.connect(self.quickVersionComboBox, QtCore.QObject.connect(self.quickVersionComboBox,
QtCore.SIGNAL(u'activated(int)'), self.updateAutoCompleter) QtCore.SIGNAL(u'activated(int)'), self.updateAutoCompleter)
# Buttons # Buttons
@ -231,8 +239,6 @@ class BibleMediaItem(MediaManagerItem):
translate('BiblesPlugin.MediaItem', 'Version:')) translate('BiblesPlugin.MediaItem', 'Version:'))
self.quickSecondLabel.setText( self.quickSecondLabel.setText(
translate('BiblesPlugin.MediaItem', 'Second:')) translate('BiblesPlugin.MediaItem', 'Second:'))
self.quickSearchTypeLabel.setText(
translate('BiblesPlugin.MediaItem', 'Search type:'))
self.quickSearchLabel.setText( self.quickSearchLabel.setText(
translate('BiblesPlugin.MediaItem', 'Find:')) translate('BiblesPlugin.MediaItem', 'Find:'))
self.quickSearchButton.setText( self.quickSearchButton.setText(
@ -257,10 +263,6 @@ class BibleMediaItem(MediaManagerItem):
translate('BiblesPlugin.MediaItem', 'Results:')) translate('BiblesPlugin.MediaItem', 'Results:'))
self.advancedSearchButton.setText( self.advancedSearchButton.setText(
translate('BiblesPlugin.MediaItem', 'Search')) translate('BiblesPlugin.MediaItem', 'Search'))
self.quickSearchComboBox.addItem(
translate('BiblesPlugin.MediaItem', 'Verse Search'))
self.quickSearchComboBox.addItem(
translate('BiblesPlugin.MediaItem', 'Text Search'))
self.quickClearComboBox.addItem( self.quickClearComboBox.addItem(
translate('BiblesPlugin.MediaItem', 'Clear')) translate('BiblesPlugin.MediaItem', 'Clear'))
self.quickClearComboBox.addItem( self.quickClearComboBox.addItem(
@ -358,11 +360,11 @@ class BibleMediaItem(MediaManagerItem):
""" """
This updates the bible book completion list for the search field. The This updates the bible book completion list for the search field. The
completion depends on the bible. It is only updated when we are doing a completion depends on the bible. It is only updated when we are doing a
verse search, otherwise the auto completion list is removed. reference search, otherwise the auto completion list is removed.
""" """
books = [] books = []
# We have to do a 'Verse Search'. # We have to do a 'Reference Search'.
if self.quickSearchComboBox.currentIndex() == 0: if self.quickSearchEdit.currentSearchType() == BibleSearch.Reference:
bibles = self.parent.manager.get_bibles() bibles = self.parent.manager.get_bibles()
bible = unicode(self.quickVersionComboBox.currentText()) bible = unicode(self.quickVersionComboBox.currentText())
if bible: if bible:
@ -491,7 +493,7 @@ class BibleMediaItem(MediaManagerItem):
def onQuickSearchButton(self): def onQuickSearchButton(self):
""" """
Does a quick search and saves the search results. Quick search can Does a quick search and saves the search results. Quick search can
either be "Verse Search" or "Text Search". either be "Reference Search" or "Text Search".
""" """
log.debug(u'Quick Search Button pressed') log.debug(u'Quick Search Button pressed')
self.quickSearchButton.setEnabled(False) self.quickSearchButton.setEnabled(False)
@ -499,8 +501,8 @@ class BibleMediaItem(MediaManagerItem):
bible = unicode(self.quickVersionComboBox.currentText()) bible = unicode(self.quickVersionComboBox.currentText())
second_bible = unicode(self.quickSecondComboBox.currentText()) second_bible = unicode(self.quickSecondComboBox.currentText())
text = unicode(self.quickSearchEdit.text()) text = unicode(self.quickSearchEdit.text())
if self.quickSearchComboBox.currentIndex() == 0: if self.quickSearchEdit.currentSearchType() == BibleSearch.Reference:
# We are doing a 'Verse Search'. # We are doing a 'Reference Search'.
self.search_results = self.parent.manager.get_verses(bible, text) self.search_results = self.parent.manager.get_verses(bible, text)
if second_bible and self.search_results: if second_bible and self.search_results:
self.second_search_results = self.parent.manager.get_verses( self.second_search_results = self.parent.manager.get_verses(

View File

@ -30,7 +30,6 @@ from forms import EditCustomForm
from openlp.core.lib import Plugin, StringContent, build_icon, translate from openlp.core.lib import Plugin, StringContent, build_icon, translate
from openlp.core.lib.db import Manager from openlp.core.lib.db import Manager
from openlp.core.lib.ui import UiStrings
from openlp.plugins.custom.lib import CustomMediaItem, CustomTab from openlp.plugins.custom.lib import CustomMediaItem, CustomTab
from openlp.plugins.custom.lib.db import CustomSlide, init_schema from openlp.plugins.custom.lib.db import CustomSlide, init_schema
@ -106,13 +105,20 @@ class CustomPlugin(Plugin):
u'title': translate('CustomsPlugin', 'Custom', 'container title') u'title': translate('CustomsPlugin', 'Custom', 'container title')
} }
# Middle Header Bar # Middle Header Bar
## Import Action ## tooltips = {
self.textStrings[StringContent.Import] = { u'load': translate('CustomsPlugin', 'Load a new Custom'),
u'title': UiStrings.Import, u'import': translate('CustomsPlugin', 'Import a Custom'),
u'tooltip': translate('CustomsPlugin', u'new': translate('CustomsPlugin', 'Add a new Custom'),
'Import a Custom') u'edit': translate('CustomsPlugin', 'Edit the selected Custom'),
u'delete': translate('CustomsPlugin', 'Delete the selected Custom'),
u'preview': translate('CustomsPlugin',
'Preview the selected Custom'),
u'live': translate('CustomsPlugin',
'Send the selected Custom live'),
u'service': translate('CustomsPlugin',
'Add the selected Custom to the service')
} }
Plugin.setPluginTextStrings(self) self.setPluginUiTextStrings(tooltips)
def finalise(self): def finalise(self):
""" """

View File

@ -69,4 +69,15 @@ class ImagePlugin(Plugin):
u'title': translate('ImagePlugin', 'Images', 'container title') u'title': translate('ImagePlugin', 'Images', 'container title')
} }
# Middle Header Bar # Middle Header Bar
Plugin.setPluginTextStrings(self) tooltips = {
u'load': translate('ImagePlugin', 'Load a new Image'),
u'import': u'',
u'new': translate('ImagePlugin', 'Add a new Image'),
u'edit': translate('ImagePlugin', 'Edit the selected Image'),
u'delete': translate('ImagePlugin', 'Delete the selected Image'),
u'preview': translate('ImagePlugin', 'Preview the selected Image'),
u'live': translate('ImagePlugin', 'Send the selected Image live'),
u'service': translate('ImagePlugin',
'Add the selected Image to the service')
}
self.setPluginUiTextStrings(tooltips)

View File

@ -95,4 +95,15 @@ class MediaPlugin(Plugin):
u'title': translate('MediaPlugin', 'Media', 'container title') u'title': translate('MediaPlugin', 'Media', 'container title')
} }
# Middle Header Bar # Middle Header Bar
Plugin.setPluginTextStrings(self) tooltips = {
u'load': translate('MediaPlugin', 'Load a new Media'),
u'import': u'',
u'new': translate('MediaPlugin', 'Add a new Media'),
u'edit': translate('MediaPlugin', 'Edit the selected Media'),
u'delete': translate('MediaPlugin', 'Delete the selected Media'),
u'preview': translate('MediaPlugin', 'Preview the selected Media'),
u'live': translate('MediaPlugin', 'Send the selected Media live'),
u'service': translate('MediaPlugin',
'Add the selected Media to the service')
}
self.setPluginUiTextStrings(tooltips)

View File

@ -167,4 +167,18 @@ class PresentationPlugin(Plugin):
'container title') 'container title')
} }
# Middle Header Bar # Middle Header Bar
Plugin.setPluginTextStrings(self) tooltips = {
u'load': translate('PresentationPlugin', 'Load a new Presentation'),
u'import': u'',
u'new': u'',
u'edit': u'',
u'delete': translate('PresentationPlugin',
'Delete the selected Presentation'),
u'preview': translate('PresentationPlugin',
'Preview the selected Presentation'),
u'live': translate('PresentationPlugin',
'Send the selected Presentation live'),
u'service': translate('PresentationPlugin',
'Add the selected Presentation to the service')
}
self.setPluginUiTextStrings(tooltips)

View File

@ -161,6 +161,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
def newSong(self): def newSong(self):
log.debug(u'New Song') log.debug(u'New Song')
self.song = None
self.initialise() self.initialise()
self.songTabWidget.setCurrentIndex(0) self.songTabWidget.setCurrentIndex(0)
self.titleEdit.setText(u'') self.titleEdit.setText(u'')

View File

@ -480,7 +480,7 @@ class SongImportForm(OpenLPWizard):
The file extension filters. It should contain the file descriptions The file extension filters. It should contain the file descriptions
as well as the file extensions. For example:: as well as the file extensions. For example::
u'SongBeamer files (*.sng)' u'SongBeamer Files (*.sng)'
""" """
if filters: if filters:
filters += u';;' filters += u';;'
@ -609,7 +609,7 @@ class SongImportForm(OpenLPWizard):
'Select Songs of Fellowship Files'), 'Select Songs of Fellowship Files'),
self.songsOfFellowshipFileListWidget, u'%s (*.rtf)' self.songsOfFellowshipFileListWidget, u'%s (*.rtf)'
% translate('SongsPlugin.ImportWizardForm', % translate('SongsPlugin.ImportWizardForm',
'Songs Of Felloship Song Files') 'Songs Of Fellowship Song Files')
) )
def onSongsOfFellowshipRemoveButtonClicked(self): def onSongsOfFellowshipRemoveButtonClicked(self):
@ -659,7 +659,7 @@ class SongImportForm(OpenLPWizard):
translate('SongsPlugin.ImportWizardForm', translate('SongsPlugin.ImportWizardForm',
'Select SongBeamer Files'), 'Select SongBeamer Files'),
self.songBeamerFileListWidget, u'%s (*.sng)' % self.songBeamerFileListWidget, u'%s (*.sng)' %
translate('SongsPlugin.ImportWizardForm', 'SongBeamer files') translate('SongsPlugin.ImportWizardForm', 'SongBeamer Files')
) )
def onSongBeamerRemoveButtonClicked(self): def onSongBeamerRemoveButtonClicked(self):

View File

@ -457,7 +457,7 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
def onTopicDeleteButtonClick(self): def onTopicDeleteButtonClick(self):
""" """
Delete the Book is the Book is not attached to any songs. Delete the Book if the Book is not attached to any songs.
""" """
self._deleteItem(Topic, self.topicsListWidget, self.resetTopics, self._deleteItem(Topic, self.topicsListWidget, self.resetTopics,
translate('SongsPlugin.SongMaintenanceForm', 'Delete Topic'), translate('SongsPlugin.SongMaintenanceForm', 'Delete Topic'),
@ -470,7 +470,7 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
def onBookDeleteButtonClick(self): def onBookDeleteButtonClick(self):
""" """
Delete the Book is the Book is not attached to any songs. Delete the Book if the Book is not attached to any songs.
""" """
self._deleteItem(Book, self.booksListWidget, self.resetBooks, self._deleteItem(Book, self.booksListWidget, self.resetBooks,
translate('SongsPlugin.SongMaintenanceForm', 'Delete Book'), translate('SongsPlugin.SongMaintenanceForm', 'Delete Book'),

View File

@ -68,11 +68,11 @@ class SongFormat(object):
CCLI = 5 CCLI = 5
SongsOfFellowship = 6 SongsOfFellowship = 6
Generic = 7 Generic = 7
#CSV = 8
EasiSlides = 8 EasiSlides = 8
EasyWorship = 9 EasyWorship = 9
SongBeamer = 10 SongBeamer = 10
SongShowPlus = 11 SongShowPlus = 11
#CSV = 12
@staticmethod @staticmethod
def get_class(format): def get_class(format):

View File

@ -107,7 +107,6 @@ class SongShowPlusImport(SongImport):
self.import_wizard.progressBar.setMaximum(len(self.import_source)) self.import_wizard.progressBar.setMaximum(len(self.import_source))
for file in self.import_source: for file in self.import_source:
author = u'' author = u''
copyright = u''
self.sspVerseOrderList = [] self.sspVerseOrderList = []
otherCount = 0 otherCount = 0
otherList = {} otherList = {}
@ -138,7 +137,6 @@ class SongShowPlusImport(SongImport):
else: else:
lengthDescriptor, = struct.unpack("B", songData.read(1)) lengthDescriptor, = struct.unpack("B", songData.read(1))
data = songData.read(lengthDescriptor) data = songData.read(lengthDescriptor)
if blockKey == TITLE: if blockKey == TITLE:
self.title = unicode(data, u'cp1252') self.title = unicode(data, u'cp1252')
elif blockKey == AUTHOR: elif blockKey == AUTHOR:

View File

@ -228,7 +228,18 @@ class SongsPlugin(Plugin):
u'title': translate('SongsPlugin', 'Songs', 'container title') u'title': translate('SongsPlugin', 'Songs', 'container title')
} }
# Middle Header Bar # Middle Header Bar
Plugin.setPluginTextStrings(self) tooltips = {
u'load': u'',
u'import': u'',
u'new': translate('SongsPlugin', 'Add a new Song'),
u'edit': translate('SongsPlugin', 'Edit the selected Song'),
u'delete': translate('SongsPlugin', 'Delete the selected Song'),
u'preview': translate('SongsPlugin', 'Preview the selected Song'),
u'live': translate('SongsPlugin', 'Send the selected Song live'),
u'service': translate('SongsPlugin',
'Add the selected Song to the service')
}
self.setPluginUiTextStrings(tooltips)
def finalise(self): def finalise(self):
""" """

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

View File

@ -21,6 +21,10 @@
<file>song_topic_edit.png</file> <file>song_topic_edit.png</file>
<file>song_book_edit.png</file> <file>song_book_edit.png</file>
</qresource> </qresource>
<qresource prefix="bibles">
<file>bibles_search_text.png</file>
<file>bibles_search_reference.png</file>
</qresource>
<qresource prefix="plugins"> <qresource prefix="plugins">
<file>plugin_alerts.png</file> <file>plugin_alerts.png</file>
<file>plugin_bibles.png</file> <file>plugin_bibles.png</file>