From d086acf0763216fb9f73b3885ab95b0e9c4d0437 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Wed, 28 Sep 2011 12:04:26 +0200 Subject: [PATCH] Make the new languages field not editable in the tag browser --- src/calibre/gui2/tag_browser/model.py | 4 ++-- src/calibre/library/database2.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/tag_browser/model.py b/src/calibre/gui2/tag_browser/model.py index f4b429e641..61d893272c 100644 --- a/src/calibre/gui2/tag_browser/model.py +++ b/src/calibre/gui2/tag_browser/model.py @@ -63,9 +63,9 @@ class TagTreeItem(object): # {{{ self.category_key = category_key self.temporary = temporary self.tag = Tag(data, category=category_key, - is_editable=category_key not in ['news', 'search', 'identifiers'], + is_editable=category_key not in + ['news', 'search', 'identifiers', 'languages'], is_searchable=category_key not in ['search']) - elif self.type == self.TAG: self.icon_state_map[0] = QVariant(data.icon) self.tag = data diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index f491b16291..0da42e06fe 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -1740,7 +1740,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): use_sort_as_name = True else: use_sort_as_name = False - is_editable = category not in ['news', 'rating'] + is_editable = category not in ['news', 'rating', 'languages'] categories[category] = [tag_class(formatter(r.n), count=r.c, id=r.id, avg=avgr(r), sort=r.s, icon=icon, tooltip=tooltip, category=category,