forked from openlp/openlp
Last set of fixes
This commit is contained in:
parent
644706a62a
commit
0b46165429
@ -386,6 +386,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
duplicatesFound = True
|
duplicatesFound = True
|
||||||
else:
|
else:
|
||||||
newFiles.append(file)
|
newFiles.append(file)
|
||||||
|
if newFiles:
|
||||||
self.loadList(newFiles)
|
self.loadList(newFiles)
|
||||||
lastDir = os.path.split(unicode(files[0]))[0]
|
lastDir = os.path.split(unicode(files[0]))[0]
|
||||||
SettingsManager.set_last_dir(self.settingsSection, lastDir)
|
SettingsManager.set_last_dir(self.settingsSection, lastDir)
|
||||||
|
@ -408,20 +408,33 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
return False
|
return False
|
||||||
self.newFile()
|
self.newFile()
|
||||||
|
|
||||||
def onLoadServiceClicked(self):
|
def onLoadServiceClicked(self, loadFile=None):
|
||||||
|
"""
|
||||||
|
Loads the service file and saves the existing one it there is one
|
||||||
|
unchanged
|
||||||
|
|
||||||
|
``loadFile``
|
||||||
|
The service file to the loaded. Will be None is from menu so
|
||||||
|
selection will be required.
|
||||||
|
"""
|
||||||
if self.isModified():
|
if self.isModified():
|
||||||
result = self.saveModifiedService()
|
result = self.saveModifiedService()
|
||||||
if result == QtGui.QMessageBox.Cancel:
|
if result == QtGui.QMessageBox.Cancel:
|
||||||
return False
|
return False
|
||||||
elif result == QtGui.QMessageBox.Save:
|
elif result == QtGui.QMessageBox.Save:
|
||||||
self.saveFile()
|
self.saveFile()
|
||||||
fileName = unicode(QtGui.QFileDialog.getOpenFileName(self.mainwindow,
|
if not loadFile:
|
||||||
|
fileName = unicode(QtGui.QFileDialog.getOpenFileName(
|
||||||
|
self.mainwindow,
|
||||||
translate('OpenLP.ServiceManager', 'Open File'),
|
translate('OpenLP.ServiceManager', 'Open File'),
|
||||||
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)')))
|
||||||
if not fileName:
|
if not fileName:
|
||||||
return False
|
return False
|
||||||
|
else:
|
||||||
|
fileName = loadFile
|
||||||
SettingsManager.set_last_dir(self.mainwindow.serviceSettingsSection,
|
SettingsManager.set_last_dir(self.mainwindow.serviceSettingsSection,
|
||||||
split_filename(fileName)[0])
|
split_filename(fileName)[0])
|
||||||
self.loadFile(fileName)
|
self.loadFile(fileName)
|
||||||
@ -1245,7 +1258,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
for url in event.mimeData().urls():
|
for url in event.mimeData().urls():
|
||||||
filename = unicode(url.toLocalFile())
|
filename = unicode(url.toLocalFile())
|
||||||
if filename.endswith(u'.osz'):
|
if filename.endswith(u'.osz'):
|
||||||
self.loadFile(filename)
|
self.onLoadServiceClicked(filename)
|
||||||
elif event.mimeData().hasText():
|
elif event.mimeData().hasText():
|
||||||
plugin = unicode(event.mimeData().text())
|
plugin = unicode(event.mimeData().text())
|
||||||
item = self.serviceManagerList.itemAt(event.pos())
|
item = self.serviceManagerList.itemAt(event.pos())
|
||||||
|
@ -91,8 +91,8 @@ class SongUsagePlugin(Plugin):
|
|||||||
self.toolsMenu.addAction(self.songUsageMenu.menuAction())
|
self.toolsMenu.addAction(self.songUsageMenu.menuAction())
|
||||||
self.songUsageMenu.addAction(self.songUsageStatus)
|
self.songUsageMenu.addAction(self.songUsageStatus)
|
||||||
self.songUsageMenu.addSeparator()
|
self.songUsageMenu.addSeparator()
|
||||||
self.songUsageMenu.addAction(self.songUsageDelete)
|
|
||||||
self.songUsageMenu.addAction(self.songUsageReport)
|
self.songUsageMenu.addAction(self.songUsageReport)
|
||||||
|
self.songUsageMenu.addAction(self.songUsageDelete)
|
||||||
self.songUsageActiveButton = QtGui.QToolButton(
|
self.songUsageActiveButton = QtGui.QToolButton(
|
||||||
self.formparent.statusBar)
|
self.formparent.statusBar)
|
||||||
self.songUsageActiveButton.setCheckable(True)
|
self.songUsageActiveButton.setCheckable(True)
|
||||||
|
Loading…
Reference in New Issue
Block a user