forked from openlp/openlp
Stop reloading songs all the time
This commit is contained in:
parent
750a232311
commit
6751aa41b1
@ -118,7 +118,7 @@ class Plugin(QtCore.QObject):
|
|||||||
|
|
||||||
class MyPlugin(Plugin):
|
class MyPlugin(Plugin):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
Plugin.__init(self, u'MyPlugin', u'0.1')
|
Plugin.__init__(self, u'MyPlugin', u'0.1')
|
||||||
|
|
||||||
``name``
|
``name``
|
||||||
Defaults to *None*. The name of the plugin.
|
Defaults to *None*. The name of the plugin.
|
||||||
|
@ -506,6 +506,8 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
if filePath.endswith(u'osd'):
|
if filePath.endswith(u'osd'):
|
||||||
p_file = filePath
|
p_file = filePath
|
||||||
if 'p_file' in locals():
|
if 'p_file' in locals():
|
||||||
|
Receiver.send_message(u'cursor_busy')
|
||||||
|
Receiver.send_message(u'openlp_process_events')
|
||||||
fileTo = open(p_file, u'r')
|
fileTo = open(p_file, u'r')
|
||||||
items = cPickle.load(fileTo)
|
items = cPickle.load(fileTo)
|
||||||
fileTo.close()
|
fileTo.close()
|
||||||
@ -520,6 +522,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
Receiver.send_message(u'%s_service_load' %
|
Receiver.send_message(u'%s_service_load' %
|
||||||
serviceItem.name.lower(), serviceItem)
|
serviceItem.name.lower(), serviceItem)
|
||||||
delete_file(p_file)
|
delete_file(p_file)
|
||||||
|
Receiver.send_message(u'cursor_normal')
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
message=translate('OpenLP.ServiceManager',
|
message=translate('OpenLP.ServiceManager',
|
||||||
@ -536,9 +539,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
self.mainwindow.addRecentFile(fileName)
|
self.mainwindow.addRecentFile(fileName)
|
||||||
self.setModified(False)
|
self.setModified(False)
|
||||||
QtCore.QSettings(). \
|
QtCore.QSettings(). \
|
||||||
setValue(u'service/last file',QtCore.QVariant(fileName))
|
setValue(u'service/last file', QtCore.QVariant(fileName))
|
||||||
# Refresh Plugin lists
|
|
||||||
Receiver.send_message(u'plugin_list_refresh')
|
|
||||||
|
|
||||||
def loadLastFile(self):
|
def loadLastFile(self):
|
||||||
"""
|
"""
|
||||||
|
@ -95,8 +95,6 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
self.searchLayout.addLayout(self.searchButtonLayout)
|
self.searchLayout.addLayout(self.searchButtonLayout)
|
||||||
self.pageLayout.addWidget(self.searchWidget)
|
self.pageLayout.addWidget(self.searchWidget)
|
||||||
# Signals and slots
|
# Signals and slots
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'plugin_list_refresh'), self.onSearchTextButtonClick)
|
|
||||||
QtCore.QObject.connect(self.searchTextEdit,
|
QtCore.QObject.connect(self.searchTextEdit,
|
||||||
QtCore.SIGNAL(u'returnPressed()'), self.onSearchTextButtonClick)
|
QtCore.SIGNAL(u'returnPressed()'), self.onSearchTextButtonClick)
|
||||||
QtCore.QObject.connect(self.searchTextButton,
|
QtCore.QObject.connect(self.searchTextButton,
|
||||||
@ -433,6 +431,7 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
if add_song:
|
if add_song:
|
||||||
if self.addSongFromService:
|
if self.addSongFromService:
|
||||||
editId = self.openLyrics.xml_to_song(item.xml_version)
|
editId = self.openLyrics.xml_to_song(item.xml_version)
|
||||||
|
self.onSearchTextButtonClick()
|
||||||
# Update service with correct song id.
|
# Update service with correct song id.
|
||||||
if editId:
|
if editId:
|
||||||
Receiver.send_message(u'service_item_update',
|
Receiver.send_message(u'service_item_update',
|
||||||
|
Loading…
Reference in New Issue
Block a user