diff --git a/resources/default_tweaks.py b/resources/default_tweaks.py index 1cf699efa3..c4c951f980 100644 --- a/resources/default_tweaks.py +++ b/resources/default_tweaks.py @@ -88,13 +88,6 @@ categories_collapsed_rating_template = r'{first.avg_rating:4.2f:ifempty(0)} - {l categories_collapsed_popularity_template = r'{first.count:d} - {last.count:d}' -#: Set boolean custom columns to be tristate -# Set whether boolean custom columns are two- or three-valued. -# Two-values for true booleans -# three-values for yes/no/unknown -# Set to 'yes' for three-values, 'no' for two-values -bool_custom_columns_are_tristate = 'yes' - #: Specify columns to sort the booklist by on startup # Provide a set of columns to be sorted on when calibre starts # The argument is None if saved sort history is to be used diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index b05e029c38..50ecc4f1e5 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -213,6 +213,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): defs['gui_restriction'] = defs['cs_restriction'] = '' defs['categories_using_hierarchy'] = [] + # Migrate the bool tristate tweak defs['bools_are_tristate'] = \ tweaks.get('bool_custom_columns_are_tristate', 'yes') == 'yes' if self.prefs.get('bools_are_tristate') is None: