mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Merge from trunk
This commit is contained in:
commit
ed1d2c44e3
@ -9,7 +9,7 @@ import sys
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from PyQt4.Qt import QComboBox, QLabel, QSpinBox, QDoubleSpinBox, QDateEdit, \
|
from PyQt4.Qt import QComboBox, QLabel, QSpinBox, QDoubleSpinBox, QDateEdit, \
|
||||||
QDate, QGroupBox, QVBoxLayout, QPlainTextEdit, QSizePolicy, \
|
QDate, QGroupBox, QVBoxLayout, QSizePolicy, \
|
||||||
QSpacerItem, QIcon, QCheckBox, QWidget, QHBoxLayout, SIGNAL, \
|
QSpacerItem, QIcon, QCheckBox, QWidget, QHBoxLayout, SIGNAL, \
|
||||||
QPushButton
|
QPushButton
|
||||||
|
|
||||||
|
@ -301,9 +301,13 @@ class CcCommentsDelegate(QStyledItemDelegate): # {{{
|
|||||||
self.document = QTextDocument()
|
self.document = QTextDocument()
|
||||||
|
|
||||||
def paint(self, painter, option, index):
|
def paint(self, painter, option, index):
|
||||||
|
style = self.parent().style()
|
||||||
self.document.setHtml(index.data(Qt.DisplayRole).toString())
|
self.document.setHtml(index.data(Qt.DisplayRole).toString())
|
||||||
painter.save()
|
painter.save()
|
||||||
if option.state & QStyle.State_Selected:
|
if hasattr(QStyle, 'CE_ItemViewItem'):
|
||||||
|
style.drawControl(QStyle.CE_ItemViewItem, option,
|
||||||
|
painter, self._parent)
|
||||||
|
elif option.state & QStyle.State_Selected:
|
||||||
painter.fillRect(option.rect, option.palette.highlight())
|
painter.fillRect(option.rect, option.palette.highlight())
|
||||||
painter.setClipRect(option.rect)
|
painter.setClipRect(option.rect)
|
||||||
painter.translate(option.rect.topLeft())
|
painter.translate(option.rect.topLeft())
|
||||||
|
@ -556,6 +556,7 @@ class BrowseServer(object):
|
|||||||
ids = self.search_cache('search:"%s"'%which)
|
ids = self.search_cache('search:"%s"'%which)
|
||||||
except:
|
except:
|
||||||
raise cherrypy.HTTPError(404, 'Search: %r not understood'%which)
|
raise cherrypy.HTTPError(404, 'Search: %r not understood'%which)
|
||||||
|
else:
|
||||||
all_ids = self.search_cache('')
|
all_ids = self.search_cache('')
|
||||||
if category == 'newest':
|
if category == 'newest':
|
||||||
ids = all_ids
|
ids = all_ids
|
||||||
|
Loading…
x
Reference in New Issue
Block a user