From 22af52874f0dea916c142d1179766676a14c333e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 30 Apr 2016 07:38:20 +0530 Subject: [PATCH] Use 'Not rated" for zero in all rating spin boxes --- src/calibre/gui2/custom_column_widgets.py | 4 ++-- src/calibre/gui2/library/delegates.py | 1 + src/calibre/gui2/metadata/basic_widgets.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/custom_column_widgets.py b/src/calibre/gui2/custom_column_widgets.py index d69d4b708c..bbca774332 100644 --- a/src/calibre/gui2/custom_column_widgets.py +++ b/src/calibre/gui2/custom_column_widgets.py @@ -134,7 +134,7 @@ class Rating(Int): w = self.widgets[1] w.setRange(0, 5) w.setSuffix(' '+_('star(s)')) - w.setSpecialValueText(_('Unrated')) + w.setSpecialValueText(_('Not rated')) def setter(self, val): if val is None: @@ -794,7 +794,7 @@ class BulkRating(BulkBase): self.make_widgets(parent, QSpinBox) self.main_widget.setRange(0, 5) self.main_widget.setSuffix(' '+_('star(s)')) - self.main_widget.setSpecialValueText(_('Unrated')) + self.main_widget.setSpecialValueText(_('Not rated')) self.main_widget.setSingleStep(1) def setter(self, val): diff --git a/src/calibre/gui2/library/delegates.py b/src/calibre/gui2/library/delegates.py index 8b38da4fce..ae986d7402 100644 --- a/src/calibre/gui2/library/delegates.py +++ b/src/calibre/gui2/library/delegates.py @@ -189,6 +189,7 @@ class RatingDelegate(QStyledItemDelegate, UpdateEditorGeometry): # {{{ sb.setMinimum(0) sb.setMaximum(5) sb.setSuffix(' ' + _('stars')) + sb.setSpecialValueText(_('Not rated')) return sb def get_required_width(self, editor, style, fm): diff --git a/src/calibre/gui2/metadata/basic_widgets.py b/src/calibre/gui2/metadata/basic_widgets.py index cf24baec61..cce340fed1 100644 --- a/src/calibre/gui2/metadata/basic_widgets.py +++ b/src/calibre/gui2/metadata/basic_widgets.py @@ -1242,6 +1242,7 @@ class RatingEdit(make_undoable(QSpinBox), ToMetadataMixin): # {{{ self.setWhatsThis(self.TOOLTIP) self.setMaximum(5) self.setSuffix(' ' + _('stars')) + self.setSpecialValueText(_('Not rated')) @dynamic_property def current_val(self):