← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol-hush/openlp/tweaks into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol-hush/openlp/tweaks into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~googol-hush/openlp/tweaks/+merge/58728

Hello,

- fixed names
- fixed hiding/showing import/export entries when enabling/disabling the songs plugin.
-- 
https://code.launchpad.net/~googol-hush/openlp/tweaks/+merge/58728
Your team OpenLP Core is requested to review the proposed merge of lp:~googol-hush/openlp/tweaks into lp:openlp.
=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py	2011-04-15 21:43:59 +0000
+++ openlp/plugins/songs/songsplugin.py	2011-04-21 18:05:55 +0000
@@ -65,10 +65,12 @@
     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 @@
             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 @@
             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 @@
         """
         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)
\ No newline at end of file
+        Plugin.finalise(self)
+


Follow ups