Fix & not being rendered in preference labels

This commit is contained in:
Kovid Goyal 2017-04-22 20:31:17 +05:30
parent 30aac83fa8
commit b1e5388929

View File

@ -132,7 +132,7 @@ class Category(QWidget): # {{{
self.actions = []
for p in plugins:
target = partial(self.triggered, p)
ac = self.bar.addAction(QIcon(p.icon), p.gui_name, target)
ac = self.bar.addAction(QIcon(p.icon), p.gui_name.replace('&', '&&'), target)
ac.setToolTip(textwrap.fill(p.description))
ac.setWhatsThis(textwrap.fill(p.description))
ac.setStatusTip(p.description)
@ -409,6 +409,7 @@ class Preferences(QDialog):
return QDialog.reject(self)
self.hide_plugin()
if __name__ == '__main__':
from calibre.gui_launch import init_dbus
from calibre.gui2 import Application