mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-05 14:47:37 +01:00
Fix #7424 (Formats hyperlinks are inconsistently launched)
This commit is contained in:
parent
63ef5a5425
commit
28732ccbdb
2 changed files with 5 additions and 6 deletions
|
|
@ -29,5 +29,6 @@ def show_book_info(self, *args):
|
|||
return
|
||||
index = self.gui.library_view.currentIndex()
|
||||
if index.isValid():
|
||||
BookInfo(self.gui, self.gui.library_view, index).show()
|
||||
BookInfo(self.gui, self.gui.library_view, index,
|
||||
self.gui.iactions['View'].view_format_by_id).show()
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,13 @@
|
|||
|
||||
class BookInfo(QDialog, Ui_BookInfo):
|
||||
|
||||
def __init__(self, parent, view, row):
|
||||
def __init__(self, parent, view, row, view_func):
|
||||
QDialog.__init__(self, parent)
|
||||
Ui_BookInfo.__init__(self)
|
||||
self.setupUi(self)
|
||||
self.cover_pixmap = None
|
||||
self.comments.sizeHint = self.comments_size_hint
|
||||
self.view_func = view_func
|
||||
|
||||
desktop = QCoreApplication.instance().desktop()
|
||||
screen_height = desktop.availableGeometry().height() - 100
|
||||
|
|
@ -58,10 +59,7 @@ def open_book_path(self, path):
|
|||
if os.sep in path:
|
||||
open_local_file(path)
|
||||
else:
|
||||
path = self.view.model().db.format_abspath(self.current_row, path)
|
||||
if path is not None:
|
||||
open_local_file(path)
|
||||
|
||||
self.view_func(self.view.model().id(self.current_row), path)
|
||||
|
||||
def next(self):
|
||||
row = self.view.currentIndex().row()
|
||||
|
|
|
|||
Loading…
Reference in a new issue