From 9e31b075da56b77217eda794ce39b5415f4ccf41 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 15 Jun 2010 11:06:21 -0600 Subject: [PATCH] Click to open in book details on device view now opens the actual file instead of the folder containing it --- src/calibre/gui2/book_details.py | 5 +---- src/calibre/gui2/status.py | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py index 75c045d011..8cf726420c 100644 --- a/src/calibre/gui2/book_details.py +++ b/src/calibre/gui2/book_details.py @@ -258,8 +258,7 @@ class BookDetails(QWidget): id_, fmt = val.split(':') self.view_specific_format.emit(int(id_), fmt) elif typ == 'devpath': - path = os.path.dirname(val) - QDesktopServices.openUrl(QUrl.fromLocalFile(path)) + QDesktopServices.openUrl(QUrl.fromLocalFile(val)) def mouseReleaseEvent(self, ev): @@ -275,8 +274,6 @@ class BookDetails(QWidget): 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 90426f8021..9aa9b8262c 100644 --- a/src/calibre/gui2/status.py +++ b/src/calibre/gui2/status.py @@ -239,8 +239,7 @@ class StatusBar(QStatusBar, StatusBarInterface, BookDetailsInterface): id_, fmt = val.split(':') self.view_specific_format.emit(int(id_), fmt) elif typ == 'devpath': - path = os.path.dirname(val) - QDesktopServices.openUrl(QUrl.fromLocalFile(path)) + QDesktopServices.openUrl(QUrl.fromLocalFile(val)) def resizeEvent(self, ev):