mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1371321 [HTML Paragraph Tag Shown In Bottom Status Bar](https://bugs.launchpad.net/calibre/+bug/1371321)
This commit is contained in:
parent
eff70b081a
commit
015bc98066
@ -5,14 +5,14 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
import textwrap
|
||||
import textwrap, re
|
||||
from functools import partial
|
||||
from collections import OrderedDict
|
||||
|
||||
from PyQt5.Qt import (QMainWindow, Qt, QIcon, QStatusBar, QFont, QWidget,
|
||||
QScrollArea, QStackedWidget, QVBoxLayout, QLabel, QFrame, QKeySequence,
|
||||
QToolBar, QSize, pyqtSignal, QPixmap, QToolButton, QAction,
|
||||
QDialogButtonBox, QHBoxLayout)
|
||||
QDialogButtonBox, QHBoxLayout, QStatusTipEvent)
|
||||
|
||||
from calibre.constants import __appname__, __version__, islinux
|
||||
from calibre.gui2 import (gprefs, min_available_height, available_width,
|
||||
@ -258,6 +258,12 @@ class Preferences(QMainWindow):
|
||||
if plugin is not None:
|
||||
self.show_plugin(plugin)
|
||||
|
||||
def event(self, ev):
|
||||
if ev.type() == ev.StatusTip:
|
||||
msg = re.sub(r'</?[a-z1-6]+>', ' ', ev.tip())
|
||||
ev = QStatusTipEvent(msg)
|
||||
return QMainWindow.event(self, ev)
|
||||
|
||||
def run_wizard(self):
|
||||
self.close()
|
||||
self.run_wizard_requested.emit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user