mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Store: chooser, add descriptive tool tips.
This commit is contained in:
parent
e6d4b492de
commit
612c4c36da
@ -103,7 +103,22 @@ class Matches(QAbstractItemModel):
|
||||
return Qt.Unchecked
|
||||
return Qt.Checked
|
||||
elif role == Qt.ToolTipRole:
|
||||
return QVariant('<p>%s</p>' % result.description)
|
||||
if col == 0:
|
||||
if is_disabled(result):
|
||||
return QVariant(_('<p>This store is currently diabled and cannot be used in other parts of calibre.</p>'))
|
||||
else:
|
||||
return QVariant(_('<p>This store is currently enabled and can be used in other parts of calibre.</p>'))
|
||||
elif col == 1:
|
||||
return QVariant('<p>%s</p>' % result.description)
|
||||
elif col == 2:
|
||||
if result.drm_free_only:
|
||||
return QVariant(_('<p>This store only distributes ebooks with DRM.</p>'))
|
||||
else:
|
||||
return QVariant(_('<p>This store distributes ebooks with DRM. It may have some titles without DRM, but you will need to check on a per title basis.</p>'))
|
||||
elif col == 3:
|
||||
return QVariant(_('<p>This store is headquartered in %s. This is a good indication of what market the store caters to. However, this does not necessarily mean that the store is limited to that market only.</p>') % result.headquarters)
|
||||
elif col == 4:
|
||||
return QVariant(_('<p>This store distributes ebooks in the following formats: %s</p>') % ', '.join(result.formats))
|
||||
return NONE
|
||||
|
||||
def setData(self, index, data, role):
|
||||
|
Loading…
x
Reference in New Issue
Block a user