Display only the plugin file without plugin path in the options. Fixes issues with text wrapping when the path was too long.

This commit is contained in:
Philipp Wolfer
2009-10-25 19:02:13 +01:00
parent cb99aaf7c1
commit c0f4bb7bb2
2 changed files with 4 additions and 3 deletions

View File

@@ -53,8 +53,9 @@ class ExtensionPoint(QtCore.QObject):
class PluginWrapper(object):
def __init__(self, module):
def __init__(self, module, plugindir):
self.module = module
self.dir = plugindir
def __get_name(self):
try:
@@ -133,7 +134,7 @@ class PluginManager(QtCore.QObject):
info = imp.find_module(name, [plugindir])
try:
plugin_module = imp.load_module('picard.plugins.' + name, *info)
plugin = PluginWrapper(plugin_module)
plugin = PluginWrapper(plugin_module, plugindir)
for version in list(plugin.api_versions):
found = False
for api_version in picard.api_versions:

View File

@@ -96,7 +96,7 @@ class PluginsOptionsPage(OptionsPage):
author = plugin.author
if author:
text.append("<b>" + _("Author") + "</b>: " + author)
text.append("<b>" + _("File") + "</b>: " + plugin.file)
text.append("<b>" + _("File") + "</b>: " + plugin.file[len(plugin.dir)+1:])
self.ui.details.setText("<p>%s</p>" % "<br/>\n".join(text))
def open_plugin_dir(self):