forked from openlp/openlp
Last set of fixes
This commit is contained in:
parent
644706a62a
commit
0b46165429
@ -386,11 +386,12 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
duplicatesFound = True
|
||||
else:
|
||||
newFiles.append(file)
|
||||
self.loadList(newFiles)
|
||||
lastDir = os.path.split(unicode(files[0]))[0]
|
||||
SettingsManager.set_last_dir(self.settingsSection, lastDir)
|
||||
SettingsManager.set_list(self.settingsSection,
|
||||
self.settingsSection, self.getFileList())
|
||||
if newFiles:
|
||||
self.loadList(newFiles)
|
||||
lastDir = os.path.split(unicode(files[0]))[0]
|
||||
SettingsManager.set_last_dir(self.settingsSection, lastDir)
|
||||
SettingsManager.set_list(self.settingsSection,
|
||||
self.settingsSection, self.getFileList())
|
||||
if duplicatesFound:
|
||||
critical_error_message_box(
|
||||
UiStrings().Duplicate,
|
||||
|
@ -408,20 +408,33 @@ class ServiceManager(QtGui.QWidget):
|
||||
return False
|
||||
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():
|
||||
result = self.saveModifiedService()
|
||||
if result == QtGui.QMessageBox.Cancel:
|
||||
return False
|
||||
elif result == QtGui.QMessageBox.Save:
|
||||
self.saveFile()
|
||||
fileName = unicode(QtGui.QFileDialog.getOpenFileName(self.mainwindow,
|
||||
translate('OpenLP.ServiceManager', 'Open File'),
|
||||
SettingsManager.get_last_dir(
|
||||
self.mainwindow.serviceSettingsSection),
|
||||
translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz)')))
|
||||
if not fileName:
|
||||
return False
|
||||
if not loadFile:
|
||||
fileName = unicode(QtGui.QFileDialog.getOpenFileName(
|
||||
self.mainwindow,
|
||||
translate('OpenLP.ServiceManager', 'Open File'),
|
||||
SettingsManager.get_last_dir(
|
||||
self.mainwindow.serviceSettingsSection),
|
||||
translate('OpenLP.ServiceManager',
|
||||
'OpenLP Service Files (*.osz)')))
|
||||
if not fileName:
|
||||
return False
|
||||
else:
|
||||
fileName = loadFile
|
||||
SettingsManager.set_last_dir(self.mainwindow.serviceSettingsSection,
|
||||
split_filename(fileName)[0])
|
||||
self.loadFile(fileName)
|
||||
@ -1245,7 +1258,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
for url in event.mimeData().urls():
|
||||
filename = unicode(url.toLocalFile())
|
||||
if filename.endswith(u'.osz'):
|
||||
self.loadFile(filename)
|
||||
self.onLoadServiceClicked(filename)
|
||||
elif event.mimeData().hasText():
|
||||
plugin = unicode(event.mimeData().text())
|
||||
item = self.serviceManagerList.itemAt(event.pos())
|
||||
|
@ -91,8 +91,8 @@ class SongUsagePlugin(Plugin):
|
||||
self.toolsMenu.addAction(self.songUsageMenu.menuAction())
|
||||
self.songUsageMenu.addAction(self.songUsageStatus)
|
||||
self.songUsageMenu.addSeparator()
|
||||
self.songUsageMenu.addAction(self.songUsageDelete)
|
||||
self.songUsageMenu.addAction(self.songUsageReport)
|
||||
self.songUsageMenu.addAction(self.songUsageDelete)
|
||||
self.songUsageActiveButton = QtGui.QToolButton(
|
||||
self.formparent.statusBar)
|
||||
self.songUsageActiveButton.setCheckable(True)
|
||||
|
Loading…
Reference in New Issue
Block a user