diff --git a/resources/default_tweaks.py b/resources/default_tweaks.py index 5642b00190..420df116ce 100644 --- a/resources/default_tweaks.py +++ b/resources/default_tweaks.py @@ -98,15 +98,6 @@ authors_split_regex = r'(?i),?\s+(and|with)\s+' # categories_use_field_for_author_name = 'author_sort' categories_use_field_for_author_name = 'author' -#: Completion sort order: choose when to change from lexicographic to ASCII-like -# Calibre normally uses locale-dependent lexicographic ordering when showing -# completion values. This means that the sort order is correct for the user's -# language. However, this can be slow. Performance is improved by switching to -# ascii ordering. This tweak controls when that switch happens. Set it to zero -# to always use ascii ordering. Set it to something larger than zero to switch -# to ascii ordering for performance reasons. -completion_change_to_ascii_sorting = 2500 - #: Control partitioning of Tag Browser # When partitioning the tags browser, the format of the subcategory label is # controlled by a template: categories_collapsed_name_template if sorting by diff --git a/src/calibre/gui2/complete.py b/src/calibre/gui2/complete.py index ec2720b534..1c2d567130 100644 --- a/src/calibre/gui2/complete.py +++ b/src/calibre/gui2/complete.py @@ -16,7 +16,6 @@ from PyQt4.Qt import (QLineEdit, QAbstractListModel, Qt, from calibre.utils.icu import sort_key from calibre.gui2 import NONE from calibre.gui2.widgets import EnComboBox, LineEditECM -from calibre.utils.config_base import tweaks class CompleteModel(QAbstractListModel): @@ -27,7 +26,7 @@ class CompleteModel(QAbstractListModel): def set_items(self, items): items = [unicode(x.strip()) for x in items] - if len(items) < tweaks['completion_change_to_ascii_sorting']: + if len(items) < 2500: self.items = sorted(items, key=sort_key) self.sorting = QCompleter.UnsortedModel else: