forked from openlp/openlp
Fix bug 594909
This commit is contained in:
commit
341e0a165b
@ -646,13 +646,20 @@ class Ui_AmendThemeDialog(object):
|
||||
QtGui.QDialogButtonBox.Ok)
|
||||
self.ThemeButtonBox.setObjectName(u'ThemeButtonBox')
|
||||
self.AmendThemeLayout.addWidget(self.ThemeButtonBox)
|
||||
|
||||
self.SaveAsButton = QtGui.QPushButton(
|
||||
translate('AmendThemeForm','Save &as'))
|
||||
self.SaveAsButton.setCheckable(True)
|
||||
self.SaveAsButton.setAutoDefault(False)
|
||||
self.ThemeButtonBox.addButton(self.SaveAsButton,
|
||||
QtGui.QDialogButtonBox.ActionRole)
|
||||
self.retranslateUi(AmendThemeDialog)
|
||||
self.ThemeTabWidget.setCurrentIndex(0)
|
||||
QtCore.QObject.connect(self.ThemeButtonBox,
|
||||
QtCore.SIGNAL(u'accepted()'), AmendThemeDialog.accept)
|
||||
QtCore.QObject.connect(self.ThemeButtonBox,
|
||||
QtCore.SIGNAL(u'rejected()'), AmendThemeDialog.reject)
|
||||
QtCore.QObject.connect(self.SaveAsButton,
|
||||
QtCore.SIGNAL(u'clicked()'), AmendThemeDialog.saveAs)
|
||||
QtCore.QMetaObject.connectSlotsByName(AmendThemeDialog)
|
||||
AmendThemeDialog.setTabOrder(self.ThemeButtonBox, self.ThemeNameEdit)
|
||||
AmendThemeDialog.setTabOrder(self.ThemeNameEdit, self.ThemeTabWidget)
|
||||
@ -848,19 +855,19 @@ class Ui_AmendThemeDialog(object):
|
||||
translate('AmendThemeForm', 'Alignment'))
|
||||
self.HorizontalLabel.setText(
|
||||
translate('AmendThemeForm', 'Horizontal align:'))
|
||||
self.HorizontalComboBox.setItemText(0,
|
||||
self.HorizontalComboBox.setItemText(0,
|
||||
translate('AmendThemeForm', 'Left'))
|
||||
self.HorizontalComboBox.setItemText(1,
|
||||
self.HorizontalComboBox.setItemText(1,
|
||||
translate('AmendThemeForm', 'Right'))
|
||||
self.HorizontalComboBox.setItemText(2,
|
||||
self.HorizontalComboBox.setItemText(2,
|
||||
translate('AmendThemeForm', 'Center'))
|
||||
self.VerticalLabel.setText(
|
||||
translate('AmendThemeForm', 'Vertical align:'))
|
||||
self.VerticalComboBox.setItemText(0,
|
||||
self.VerticalComboBox.setItemText(0,
|
||||
translate('AmendThemeForm', 'Top'))
|
||||
self.VerticalComboBox.setItemText(1,
|
||||
self.VerticalComboBox.setItemText(1,
|
||||
translate('AmendThemeForm', 'Middle'))
|
||||
self.VerticalComboBox.setItemText(2,
|
||||
self.VerticalComboBox.setItemText(2,
|
||||
translate('AmendThemeForm', 'Bottom'))
|
||||
self.TransitionGroupBox.setTitle(
|
||||
translate('AmendThemeForm', 'Slide Transition'))
|
||||
|
@ -137,6 +137,12 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||
self.onSlideTransitionCheckBoxChanged)
|
||||
|
||||
def saveAs(self):
|
||||
self.ThemeNameEdit.setEnabled(True)
|
||||
self.SaveAsButton.setEnabled(False)
|
||||
self.ThemeNameEdit.setText(u'')
|
||||
self.ThemeNameEdit.setFocus()
|
||||
|
||||
def accept(self):
|
||||
new_theme = ThemeXML()
|
||||
theme_name = unicode(self.ThemeNameEdit.text())
|
||||
@ -200,7 +206,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
save_from, save_to) is not False:
|
||||
return QtGui.QDialog.accept(self)
|
||||
|
||||
def loadTheme(self, theme):
|
||||
def loadTheme(self, theme, newTheme=False):
|
||||
log.debug(u'LoadTheme %s', theme)
|
||||
self.theme = theme
|
||||
# Stop the initial screen setup generating 1 preview per field!
|
||||
@ -208,6 +214,12 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
self.paintUi(self.theme)
|
||||
self.allowPreview = True
|
||||
self.previewTheme()
|
||||
self.ThemeNameEdit.setEnabled(True)
|
||||
self.SaveAsButton.setEnabled(False)
|
||||
if not newTheme:
|
||||
self.ThemeNameEdit.setEnabled(False)
|
||||
self.SaveAsButton.setEnabled(True)
|
||||
|
||||
|
||||
def onImageToolButtonClicked(self):
|
||||
images_filter = get_images_filter()
|
||||
|
@ -240,7 +240,8 @@ class MainDisplay(DisplayWidget):
|
||||
#Sort out screen locations and sizes
|
||||
self.setGeometry(self.screen[u'size'])
|
||||
self.scene.setSceneRect(0,0,self.size().width(), self.size().height())
|
||||
self.webView.setGeometry(0, 0, self.size().width(), self.size().height())
|
||||
self.webView.setGeometry(0, 0, self.size().width(),
|
||||
self.size().height())
|
||||
#Build a custom splash screen
|
||||
self.InitialFrame = QtGui.QImage(
|
||||
self.screen[u'size'].width(),
|
||||
@ -287,11 +288,14 @@ class MainDisplay(DisplayWidget):
|
||||
self.webView = QtWebKit.QWebView()
|
||||
self.page = self.webView.page()
|
||||
self.videoDisplay = self.page.mainFrame()
|
||||
self.videoDisplay.setScrollBarPolicy(QtCore.Qt.Vertical, QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.videoDisplay.setScrollBarPolicy(QtCore.Qt.Horizontal, QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.videoDisplay.setScrollBarPolicy(QtCore.Qt.Vertical,
|
||||
QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.videoDisplay.setScrollBarPolicy(QtCore.Qt.Horizontal,
|
||||
QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.proxy = QtGui.QGraphicsProxyWidget()
|
||||
self.proxy.setWidget(self.webView)
|
||||
self.proxy.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint)
|
||||
self.proxy.setWindowFlags(QtCore.Qt.Window |
|
||||
QtCore.Qt.FramelessWindowHint)
|
||||
self.proxy.setZValue(1)
|
||||
self.scene.addItem(self.proxy)
|
||||
|
||||
@ -412,7 +416,8 @@ class MainDisplay(DisplayWidget):
|
||||
log.debug(u'adddisplayVideo')
|
||||
self.displayImage(self.transparent)
|
||||
self.videoDisplay.setHtml(HTMLVIDEO %
|
||||
(path, self.screen[u'size'].width(), self.screen[u'size'].height()))
|
||||
(path, self.screen[u'size'].width(),
|
||||
self.screen[u'size'].height()))
|
||||
|
||||
def frameView(self, frame, transition=False):
|
||||
"""
|
||||
@ -513,7 +518,7 @@ class VideoDisplay(Phonon.VideoWidget):
|
||||
Sets up the screen on a particular screen.
|
||||
"""
|
||||
log.debug(u'VideoDisplay Setup %s for %s ' % (self.screens,
|
||||
self.screens.monitor_number))
|
||||
self.screens.monitor_number))
|
||||
self.screen = self.screens.current
|
||||
#Sort out screen locations and sizes
|
||||
self.setGeometry(self.screen[u'size'])
|
||||
|
@ -173,7 +173,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
editing form for the user to make their customisations.
|
||||
"""
|
||||
theme = self.createThemeFromXml(self.baseTheme(), self.path)
|
||||
self.amendThemeForm.loadTheme(theme)
|
||||
self.amendThemeForm.loadTheme(theme, True)
|
||||
self.saveThemeName = u''
|
||||
self.amendThemeForm.exec_()
|
||||
|
||||
|
@ -84,8 +84,8 @@ class BiblePlugin(Plugin):
|
||||
self.ExportBibleItem.setVisible(False)
|
||||
|
||||
def onBibleImportClick(self):
|
||||
if self.media_item:
|
||||
self.media_item.onImportClick()
|
||||
if self.mediaItem:
|
||||
self.mediaItem.onImportClick()
|
||||
|
||||
def about(self):
|
||||
about_text = translate('BiblePlugin',
|
||||
|
@ -342,7 +342,7 @@ class BibleDB(QtCore.QObject, Manager):
|
||||
verse_list.extend(verses)
|
||||
else:
|
||||
log.debug(u'OpenLP failed to find book %s', book)
|
||||
QtGui.QMessageBox.information(self.bible_plugin.media_item,
|
||||
QtGui.QMessageBox.information(self.bible_plugin.mediaItem,
|
||||
translate('BibleDB', 'Book not found'),
|
||||
translate('BibleDB', u'The book you requested could not '
|
||||
'be found in this bible. Please check your spelling '
|
||||
|
@ -131,7 +131,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
self.QuickClearLabel.setObjectName(u'QuickSearchLabel')
|
||||
self.QuickLayout.addWidget(self.QuickClearLabel, 4, 0, 1, 1)
|
||||
self.ClearQuickSearchComboBox = QtGui.QComboBox(self.QuickTab)
|
||||
self.ClearQuickSearchComboBox.setObjectName(u'ClearQuickSearchComboBox')
|
||||
self.ClearQuickSearchComboBox.setObjectName(
|
||||
u'ClearQuickSearchComboBox')
|
||||
self.QuickLayout.addWidget(self.ClearQuickSearchComboBox, 4, 1, 1, 2)
|
||||
self.QuickSearchButtonLayout = QtGui.QHBoxLayout()
|
||||
self.QuickSearchButtonLayout.setMargin(0)
|
||||
@ -169,7 +170,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
self.AdvancedVersionComboBox.setObjectName(u'AdvancedVersionComboBox')
|
||||
self.AdvancedLayout.addWidget(self.AdvancedVersionComboBox, 0, 1, 1, 2)
|
||||
self.AdvancedSecondBibleLabel = QtGui.QLabel(self.AdvancedTab)
|
||||
self.AdvancedSecondBibleLabel.setObjectName(u'AdvancedSecondBibleLabel')
|
||||
self.AdvancedSecondBibleLabel.setObjectName(
|
||||
u'AdvancedSecondBibleLabel')
|
||||
self.AdvancedLayout.addWidget(self.AdvancedSecondBibleLabel, 1, 0, 1, 1)
|
||||
self.AdvancedSecondBibleComboBox = QtGui.QComboBox(self.AdvancedTab)
|
||||
self.AdvancedSecondBibleComboBox.setSizeAdjustPolicy(
|
||||
@ -223,7 +225,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
u'AdvancedSearchButtonLayout')
|
||||
self.AdvancedSearchButtonSpacer = QtGui.QSpacerItem(40, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.AdvancedSearchButtonLayout.addItem(self.AdvancedSearchButtonSpacer)
|
||||
self.AdvancedSearchButtonLayout.addItem(
|
||||
self.AdvancedSearchButtonSpacer)
|
||||
self.AdvancedSearchButton = QtGui.QPushButton(self.AdvancedTab)
|
||||
self.AdvancedSearchButton.setObjectName(u'AdvancedSearchButton')
|
||||
self.AdvancedSearchButtonLayout.addWidget(self.AdvancedSearchButton)
|
||||
@ -617,7 +620,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
else:
|
||||
self.AdvancedSearchButton.setEnabled(True)
|
||||
self.AdvancedMessage.setText(u'')
|
||||
self.adjustComboBox(1, self.chapters_from, self.AdvancedFromChapter)
|
||||
self.adjustComboBox(1, self.chapters_from,
|
||||
self.AdvancedFromChapter)
|
||||
self.adjustComboBox(1, self.chapters_from, self.AdvancedToChapter)
|
||||
self.adjustComboBox(1, self.verses, self.AdvancedFromVerse)
|
||||
self.adjustComboBox(1, self.verses, self.AdvancedToVerse)
|
||||
|
@ -150,8 +150,8 @@ class SongsPlugin(Plugin):
|
||||
pass
|
||||
|
||||
def onSongImportItemClicked(self):
|
||||
if self.media_item:
|
||||
self.media_item.onImportClick()
|
||||
if self.mediaItem:
|
||||
self.mediaItem.onImportClick()
|
||||
|
||||
def onImportSofItemClick(self):
|
||||
filenames = QtGui.QFileDialog.getOpenFileNames(
|
||||
|
Loading…
Reference in New Issue
Block a user