From 63b61ee0c9908f03da1c2fd7acfe27bbc4e18d3d Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Wed, 20 Oct 2021 12:39:35 +0100 Subject: [PATCH] Bug #1947841: Title & Author is/is not set. Implemented option 1. --- src/calibre/gui2/preferences/coloring.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/calibre/gui2/preferences/coloring.py b/src/calibre/gui2/preferences/coloring.py index 4bd69b8851..11905ae8c2 100644 --- a/src/calibre/gui2/preferences/coloring.py +++ b/src/calibre/gui2/preferences/coloring.py @@ -93,6 +93,12 @@ class ConditionEditor(QWidget): # {{{ (_('is set'), 'is set'), (_('is not set'), 'is not set'), ), + 'multiple_no_isset' : ( + (_('has'), 'has'), + (_('does not have'), 'does not have'), + (_('has pattern'), 'has pattern'), + (_('does not have pattern'), 'does not have pattern'), + ), 'single' : ( (_('is'), 'is'), (_('is not'), 'is not'), @@ -103,6 +109,14 @@ class ConditionEditor(QWidget): # {{{ (_('is set'), 'is set'), (_('is not set'), 'is not set'), ), + 'single_no_isset' : ( + (_('is'), 'is'), + (_('is not'), 'is not'), + (_('contains'), 'contains'), + (_('does not contain'), 'does not contain'), + (_('matches pattern'), 'matches pattern'), + (_('does not match pattern'), 'does not match pattern'), + ), } for x in ('float', 'rating'): @@ -229,6 +243,10 @@ class ConditionEditor(QWidget): # {{{ k = 'ondevice' elif col == 'identifiers': k = 'identifiers' + elif col == 'authors': + k = 'multiple_no_isset' + elif col == 'title': + k = 'single_no_isset' else: k = 'multiple' if m['is_multiple'] else 'single' actions = self.action_map[k]