From 08fc8e274a09452ce000a9298c757fde79790277 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 27 Jan 2013 23:16:23 +0530 Subject: [PATCH] Add the full item name to the tool tip of a leaf item displayed in the tag browser. Fixes #1106231 (Some enhancements for Tags) --- src/calibre/library/database2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index d93833ae9c..2c58658bef 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -1881,7 +1881,6 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): # icon_map is not None if get_categories is to store an icon and # possibly a tooltip in the tag structure. icon = None - tooltip = '(' + category + ')' label = tb_cats.key_to_label(category) if icon_map: if not tb_cats.is_custom_field(category): @@ -1935,7 +1934,9 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): 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, + tooltip=u'({0}:{1})'.format(category, + formatter(r.n)), + category=category, id_set=r.id_set, is_editable=is_editable, use_sort_as_name=use_sort_as_name) for r in items]