Fix regression in 0.7.32 that broke opening formats in the ebook viewer from the edit metadata dialog

This commit is contained in:
Kovid Goyal 2010-12-05 22:03:42 -07:00
parent 7ff5842e71
commit 90fa43bf37
2 changed files with 5 additions and 9 deletions

View File

@ -147,8 +147,13 @@ class EditMetadataAction(InterfaceAction):
d = MetadataSingleDialog(self.gui, row_list[current_row], db, d = MetadataSingleDialog(self.gui, row_list[current_row], db,
prev=prev, next_=next_) prev=prev, next_=next_)
d.view_format.connect(lambda
fmt:self.gui.iactions['View'].view_format(row_list[current_row],
fmt))
if d.exec_() != d.Accepted: if d.exec_() != d.Accepted:
d.view_format.disconnect()
break break
d.view_format.disconnect()
changed.add(d.id) changed.add(d.id)
if d.row_delta == 0: if d.row_delta == 0:
break break

View File

@ -26,7 +26,6 @@ class ViewAction(InterfaceAction):
def genesis(self): def genesis(self):
self.persistent_files = [] self.persistent_files = []
self.metadata_view_id = None
self.qaction.triggered.connect(self.view_book) self.qaction.triggered.connect(self.view_book)
self.view_menu = QMenu() self.view_menu = QMenu()
self.view_menu.addAction(_('View'), partial(self.view_book, False)) self.view_menu.addAction(_('View'), partial(self.view_book, False))
@ -51,14 +50,6 @@ class ViewAction(InterfaceAction):
if fmt_path: if fmt_path:
self._view_file(fmt_path) self._view_file(fmt_path)
def metadata_view_format(self, fmt):
fmt_path = self.gui.library_view.model().db.\
format_abspath(self.metadata_view_id,
fmt, index_is_id=True)
if fmt_path:
self._view_file(fmt_path)
def book_downloaded_for_viewing(self, job): def book_downloaded_for_viewing(self, job):
if job.failed: if job.failed:
self.gui.device_job_exception(job) self.gui.device_job_exception(job)