Date: Tue, 15 Jun 2010 11:06:21 -0600
Subject: [PATCH 25/26] 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):
From 6db976e5aaf973ffa72b6a6a0dac5fe6748a6258 Mon Sep 17 00:00:00 2001
From: Kovid Goyal
Date: Tue, 15 Jun 2010 11:16:09 -0600
Subject: [PATCH 26/26] Fix #5843 (Book covers not displaying when in device
view)
---
src/calibre/gui2/book_details.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py
index 8cf726420c..a397ab903d 100644
--- a/src/calibre/gui2/book_details.py
+++ b/src/calibre/gui2/book_details.py
@@ -109,7 +109,7 @@ class CoverView(QWidget): # {{{
def show_data(self, data):
self.animation.stop()
- if data.get('id', None) == self.data.get('id', None):
+ if data.get('id', True) == self.data.get('id', False):
return
self.data = {'id':data.get('id', None)}
if data.has_key('cover'):