mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Bug #2016711: Long-text columns missing from grouped search dropdown
Also improved the explanatory text.
This commit is contained in:
parent
165f5a93da
commit
11d0994878
@ -55,26 +55,28 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
|||||||
"grouped search term in the drop-down box, enter the list of columns "
|
"grouped search term in the drop-down box, enter the list of columns "
|
||||||
"to search in the value box, then push the Save button. "
|
"to search in the value box, then push the Save button. "
|
||||||
"<p>Note: Search terms are forced to lower case; <code>MySearch</code> "
|
"<p>Note: Search terms are forced to lower case; <code>MySearch</code> "
|
||||||
"and <code>mysearch</code> are the same term."
|
"and <code>mysearch</code> are the same term. Search terms cannot be "
|
||||||
"<p>You can have your grouped search term show up as User categories in "
|
"hierarchical. Periods are not allowed in the term name."
|
||||||
" the Tag browser. Just add the grouped search term names to the Make User "
|
"<p>Grouped search terms can show as User categories in the Tag browser "
|
||||||
"categories from box. You can add multiple terms separated by commas. "
|
"by adding the grouped search term names to the 'Make User "
|
||||||
"The new User category will be automatically "
|
"categories from' box. Multiple terms are separated by commas. "
|
||||||
"populated with all the items in the categories included in the grouped "
|
"These 'automatic user categories' will be populated with items "
|
||||||
"search term. <p>Automatic User categories permit you to see easily "
|
"from the categories included in the grouped search term. "
|
||||||
"all the category items that "
|
"<p>Automatic user categories permit you to see all the category items that "
|
||||||
"are in the columns contained in the grouped search term. Using the above "
|
"are in the columns contained in the grouped search term. Using the above "
|
||||||
"<code>allseries</code> example, the automatically-generated User category "
|
"<code>allseries</code> example, the automatic user category "
|
||||||
"will contain all the series mentioned in <code>series</code>, "
|
"will contain all the series names in <code>series</code>, "
|
||||||
"<code>#myseries</code>, and <code>#myseries2</code>. This "
|
"<code>#myseries</code>, and <code>#myseries2</code>. This "
|
||||||
"can be useful to check for duplicates, to find which column contains "
|
"can be useful to check for duplicates, to find which column contains "
|
||||||
"a particular item, or to have hierarchical categories (categories "
|
"a particular item, or to have hierarchical categories (categories "
|
||||||
"that contain categories)."))
|
"that contain categories). "
|
||||||
|
"<p>Note: values from non-category columns such as comments won't appear "
|
||||||
|
"in automatic user categories. "))
|
||||||
self.gst = db.prefs.get('grouped_search_terms', {}).copy()
|
self.gst = db.prefs.get('grouped_search_terms', {}).copy()
|
||||||
self.orig_gst_keys = list(self.gst.keys())
|
self.orig_gst_keys = list(self.gst.keys())
|
||||||
|
|
||||||
fm = db.new_api.field_metadata
|
fm = db.new_api.field_metadata
|
||||||
categories = [x[0] for x in find_categories(fm) if fm[x[0]]['search_terms']]
|
categories = [x for x in fm.keys() if not x.startswith('@') and fm[x]['search_terms']]
|
||||||
self.gst_value.update_items_cache(categories)
|
self.gst_value.update_items_cache(categories)
|
||||||
QTimer.singleShot(0, self.fill_gst_box)
|
QTimer.singleShot(0, self.fill_gst_box)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user