mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use 'Not rated" for zero in all rating spin boxes
This commit is contained in:
parent
cfe6ad37a1
commit
22af52874f
@ -134,7 +134,7 @@ class Rating(Int):
|
|||||||
w = self.widgets[1]
|
w = self.widgets[1]
|
||||||
w.setRange(0, 5)
|
w.setRange(0, 5)
|
||||||
w.setSuffix(' '+_('star(s)'))
|
w.setSuffix(' '+_('star(s)'))
|
||||||
w.setSpecialValueText(_('Unrated'))
|
w.setSpecialValueText(_('Not rated'))
|
||||||
|
|
||||||
def setter(self, val):
|
def setter(self, val):
|
||||||
if val is None:
|
if val is None:
|
||||||
@ -794,7 +794,7 @@ class BulkRating(BulkBase):
|
|||||||
self.make_widgets(parent, QSpinBox)
|
self.make_widgets(parent, QSpinBox)
|
||||||
self.main_widget.setRange(0, 5)
|
self.main_widget.setRange(0, 5)
|
||||||
self.main_widget.setSuffix(' '+_('star(s)'))
|
self.main_widget.setSuffix(' '+_('star(s)'))
|
||||||
self.main_widget.setSpecialValueText(_('Unrated'))
|
self.main_widget.setSpecialValueText(_('Not rated'))
|
||||||
self.main_widget.setSingleStep(1)
|
self.main_widget.setSingleStep(1)
|
||||||
|
|
||||||
def setter(self, val):
|
def setter(self, val):
|
||||||
|
@ -189,6 +189,7 @@ class RatingDelegate(QStyledItemDelegate, UpdateEditorGeometry): # {{{
|
|||||||
sb.setMinimum(0)
|
sb.setMinimum(0)
|
||||||
sb.setMaximum(5)
|
sb.setMaximum(5)
|
||||||
sb.setSuffix(' ' + _('stars'))
|
sb.setSuffix(' ' + _('stars'))
|
||||||
|
sb.setSpecialValueText(_('Not rated'))
|
||||||
return sb
|
return sb
|
||||||
|
|
||||||
def get_required_width(self, editor, style, fm):
|
def get_required_width(self, editor, style, fm):
|
||||||
|
@ -1242,6 +1242,7 @@ class RatingEdit(make_undoable(QSpinBox), ToMetadataMixin): # {{{
|
|||||||
self.setWhatsThis(self.TOOLTIP)
|
self.setWhatsThis(self.TOOLTIP)
|
||||||
self.setMaximum(5)
|
self.setMaximum(5)
|
||||||
self.setSuffix(' ' + _('stars'))
|
self.setSuffix(' ' + _('stars'))
|
||||||
|
self.setSpecialValueText(_('Not rated'))
|
||||||
|
|
||||||
@dynamic_property
|
@dynamic_property
|
||||||
def current_val(self):
|
def current_val(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user