forked from openlp/openlp
- fixed names
- fixed hiding/showing import/export entries when enabling/disabling the songs plugin bzr-revno: 1478
This commit is contained in:
commit
fbc8468754
@ -65,10 +65,12 @@ class SongsPlugin(Plugin):
|
||||
def initialise(self):
|
||||
log.info(u'Songs Initialising')
|
||||
Plugin.initialise(self)
|
||||
self.songImportItem.setVisible(True)
|
||||
self.songExportItem.setVisible(True)
|
||||
self.toolsReindexItem.setVisible(True)
|
||||
action_list = ActionList.get_instance()
|
||||
action_list.add_action(self.SongImportItem, UiStrings().Import)
|
||||
action_list.add_action(self.SongExportItem, UiStrings().Export)
|
||||
action_list.add_action(self.songImportItem, UiStrings().Import)
|
||||
action_list.add_action(self.songExportItem, UiStrings().Export)
|
||||
action_list.add_action(self.toolsReindexItem, UiStrings().Tools)
|
||||
|
||||
def addImportMenuItem(self, import_menu):
|
||||
@ -81,13 +83,13 @@ class SongsPlugin(Plugin):
|
||||
use it as their parent.
|
||||
"""
|
||||
# Main song import menu item - will eventually be the only one
|
||||
self.SongImportItem = base_action(import_menu, u'SongImportItem')
|
||||
self.SongImportItem.setText(translate('SongsPlugin', '&Song'))
|
||||
self.SongImportItem.setToolTip(translate('SongsPlugin',
|
||||
self.songImportItem = base_action(import_menu, u'songImportItem')
|
||||
self.songImportItem.setText(translate('SongsPlugin', '&Song'))
|
||||
self.songImportItem.setToolTip(translate('SongsPlugin',
|
||||
'Import songs using the import wizard.'))
|
||||
import_menu.addAction(self.SongImportItem)
|
||||
import_menu.addAction(self.songImportItem)
|
||||
# Signals and slots
|
||||
QtCore.QObject.connect(self.SongImportItem,
|
||||
QtCore.QObject.connect(self.songImportItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.onSongImportItemClicked)
|
||||
|
||||
def addExportMenuItem(self, export_menu):
|
||||
@ -100,13 +102,13 @@ class SongsPlugin(Plugin):
|
||||
use it as their parent.
|
||||
"""
|
||||
# Main song import menu item - will eventually be the only one
|
||||
self.SongExportItem = base_action(export_menu, u'SongExportItem')
|
||||
self.SongExportItem.setText(translate('SongsPlugin', '&Song'))
|
||||
self.SongExportItem.setToolTip(translate('SongsPlugin',
|
||||
self.songExportItem = base_action(export_menu, u'songExportItem')
|
||||
self.songExportItem.setText(translate('SongsPlugin', '&Song'))
|
||||
self.songExportItem.setToolTip(translate('SongsPlugin',
|
||||
'Exports songs using the export wizard.'))
|
||||
export_menu.addAction(self.SongExportItem)
|
||||
export_menu.addAction(self.songExportItem)
|
||||
# Signals and slots
|
||||
QtCore.QObject.connect(self.SongExportItem,
|
||||
QtCore.QObject.connect(self.songExportItem,
|
||||
QtCore.SIGNAL(u'triggered()'), self.onSongExportItemClicked)
|
||||
|
||||
def addToolsMenuItem(self, tools_menu):
|
||||
@ -256,9 +258,12 @@ class SongsPlugin(Plugin):
|
||||
"""
|
||||
log.info(u'Songs Finalising')
|
||||
self.manager.finalise()
|
||||
self.songImportItem.setVisible(False)
|
||||
self.songExportItem.setVisible(False)
|
||||
self.toolsReindexItem.setVisible(False)
|
||||
action_list = ActionList.get_instance()
|
||||
action_list.remove_action(self.SongImportItem, UiStrings().Import)
|
||||
action_list.remove_action(self.SongExportItem, UiStrings().Export)
|
||||
action_list.remove_action(self.songImportItem, UiStrings().Import)
|
||||
action_list.remove_action(self.songExportItem, UiStrings().Export)
|
||||
action_list.remove_action(self.toolsReindexItem, UiStrings().Tools)
|
||||
Plugin.finalise(self)
|
||||
Plugin.finalise(self)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user