Fixed a rename error

bzr-revno: 2172
This commit is contained in:
Andreas Preikschat 2013-02-06 22:41:07 +01:00
commit 801b364c01

View File

@ -184,7 +184,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
Load the media files into a combobox.
"""
self.audioAddFromMediaButton.setVisible(False)
for plugin in self.parent().pluginManager.plugins:
for plugin in self.plugin_manager.plugins:
if plugin.name == u'media' and plugin.status == PluginStatus.Active:
self.audioAddFromMediaButton.setVisible(True)
self.mediaForm.populateFiles(plugin.mediaItem.getList(MediaType.Audio))
@ -907,6 +907,16 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
except:
log.exception(u'Problem processing song Lyrics \n%s', sxml.dump_xml())
def _get_plugin_manager(self):
"""
Adds the plugin manager to the class dynamically
"""
if not hasattr(self, u'_plugin_manager'):
self._plugin_manager = Registry().get(u'plugin_manager')
return self._plugin_manager
plugin_manager = property(_get_plugin_manager)
def _get_theme_manager(self):
"""
Adds the theme manager to the class dynamically
@ -915,4 +925,5 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
self._theme_manager = Registry().get(u'theme_manager')
return self._theme_manager
theme_manager = property(_get_theme_manager)
theme_manager = property(_get_theme_manager)