From b67ac4fc1d8af1ee0abc67c634cd3a46a7291516 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 14 Jun 2010 15:38:51 -0600 Subject: [PATCH] Add tooltip to book details pane --- src/calibre/gui2/book_details.py | 8 ++++++-- src/calibre/gui2/status.py | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py index 6978c68fc2..75c045d011 100644 --- a/src/calibre/gui2/book_details.py +++ b/src/calibre/gui2/book_details.py @@ -42,8 +42,8 @@ def render_rows(data): txt = prepare_string_for_xml(txt) if 'id' in data: if key == _('Path'): - txt = u'%s'%(data['id'], - _('Click to open')) + txt = u'%s'%(data['id'], + txt, _('Click to open')) if key == _('Formats') and txt and txt != _('None'): fmts = [x.strip() for x in txt.split(',')] fmts = [u'%s' % (data['id'], x, x) for x @@ -272,6 +272,10 @@ class BookDetails(QWidget): def show_data(self, data): self.cover_view.show_data(data) self.book_info.show_data(data) + self.setToolTip('

'+_('Click to open Book Details window') + + '

' + _('Path') + ': ' + data.get(_('Path'), '')) + + def reset_info(self): self.show_data({}) diff --git a/src/calibre/gui2/status.py b/src/calibre/gui2/status.py index 876d4cdb05..90426f8021 100644 --- a/src/calibre/gui2/status.py +++ b/src/calibre/gui2/status.py @@ -163,6 +163,10 @@ class BookInfoDisplay(QWidget): self.book_data.updateGeometry() self.updateGeometry() self.setVisible(True) + self.setToolTip('

'+_('Click to open Book Details window') + + '

' + _('Path') + ': ' + data.get(_('Path'), '')) + + class StatusBarInterface(object):