##// END OF EJS Templates
Yet more PySide compatibility fixes.
epatters -
Show More
@@ -100,7 +100,7 class CallTipWidget(QtGui.QLabel):
100 100 """
101 101 painter = QtGui.QStylePainter(self)
102 102 option = QtGui.QStyleOptionFrame()
103 option.init(self)
103 option.initFrom(self)
104 104 painter.drawPrimitive(QtGui.QStyle.PE_PanelTipLabel, option)
105 105 painter.end()
106 106
@@ -335,7 +335,7 class IPythonWidget(FrontendWidget):
335 335 block = self._previous_prompt_obj.block
336 336
337 337 # Make sure the prompt block has not been erased.
338 if block.isValid() and not block.text().isEmpty():
338 if block.isValid() and block.text():
339 339
340 340 # Remove the old prompt and insert a new prompt.
341 341 cursor = QtGui.QTextCursor(block)
@@ -43,9 +43,7 class RichIPythonWidget(IPythonWidget):
43 43 """
44 44 format = self._control.cursorForPosition(pos).charFormat()
45 45 name = format.stringProperty(QtGui.QTextFormat.ImageName)
46 if name.isEmpty():
47 menu = super(RichIPythonWidget, self)._context_menu_make(pos)
48 else:
46 if name:
49 47 menu = QtGui.QMenu()
50 48
51 49 menu.addAction('Copy Image', lambda: self._copy_image(name))
@@ -53,11 +51,13 class RichIPythonWidget(IPythonWidget):
53 51 menu.addSeparator()
54 52
55 53 svg = format.stringProperty(self._svg_text_format_property)
56 if not svg.isEmpty():
54 if svg:
57 55 menu.addSeparator()
58 56 menu.addAction('Copy SVG', lambda: svg_to_clipboard(svg))
59 57 menu.addAction('Save SVG As...',
60 58 lambda: save_svg(svg, self._control))
59 else:
60 menu = super(RichIPythonWidget, self)._context_menu_make(pos)
61 61 return menu
62 62
63 63 #---------------------------------------------------------------------------
@@ -102,7 +102,7 class QtSubSocketChannel(SocketChannelQObject, SubSocketChannel):
102 102 pyerr_received = QtCore.Signal(object)
103 103
104 104 # Emitted when a message of type 'display_data' is received
105 display_data_received = QtCore.pyqtSignal(object)
105 display_data_received = QtCore.Signal(object)
106 106
107 107 # Emitted when a crash report message is received from the kernel's
108 108 # last-resort sys.excepthook.
General Comments 0
You need to be logged in to leave comments. Login now