mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-23 10:25:34 +01:00
Use unicode() instead of str() when filtering the tags
This commit is contained in:
parent
98c4e00156
commit
a2f1318576
1 changed files with 4 additions and 4 deletions
|
|
@ -173,9 +173,9 @@ def add_tag(self):
|
|||
# do the filtering on the available tags
|
||||
def filter_available(self, filter_value):
|
||||
itemCount = self.available_tags.count()
|
||||
l_filter_value = str(filter_value).lower()
|
||||
l_filter_value = unicode(filter_value).lower()
|
||||
for i in range(0, itemCount): # on every available tag
|
||||
if l_filter_value in str(self.available_tags.item(i).text()).lower():
|
||||
if l_filter_value in unicode(self.available_tags.item(i).text()).lower():
|
||||
# if contains the filter text, then show it
|
||||
self.available_tags.item(i).setHidden(False)
|
||||
else:
|
||||
|
|
@ -185,9 +185,9 @@ def filter_available(self, filter_value):
|
|||
# do the filtering on the applied tags
|
||||
def filter_applied(self, filter_value):
|
||||
itemCount = self.applied_tags.count()
|
||||
l_filter_value = str(filter_value).lower()
|
||||
l_filter_value = unicode(filter_value).lower()
|
||||
for i in range(0, itemCount): # on every applied tag
|
||||
if l_filter_value in str(self.applied_tags.item(i).text()).lower():
|
||||
if l_filter_value in unicode(self.applied_tags.item(i).text()).lower():
|
||||
# if contains the filter text, then show it
|
||||
self.applied_tags.item(i).setHidden(False)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue