mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
change to use open_local_file
This commit is contained in:
parent
ec8164470b
commit
3dfaa2cdaa
@ -15,6 +15,7 @@ from PyQt4.Qt import QDialog, SIGNAL
|
|||||||
|
|
||||||
from calibre import prints
|
from calibre import prints
|
||||||
from calibre.constants import iswindows, isosx, DEBUG
|
from calibre.constants import iswindows, isosx, DEBUG
|
||||||
|
from calibre.gui2 import open_local_file
|
||||||
from calibre.gui2.dialogs.tweak_epub_ui import Ui_Dialog
|
from calibre.gui2.dialogs.tweak_epub_ui import Ui_Dialog
|
||||||
from calibre.libunzip import extract as zipextract
|
from calibre.libunzip import extract as zipextract
|
||||||
from calibre.ptempfile import PersistentTemporaryDirectory
|
from calibre.ptempfile import PersistentTemporaryDirectory
|
||||||
@ -33,7 +34,7 @@ class TweakEpub(QDialog, Ui_Dialog):
|
|||||||
|
|
||||||
self._epub = epub
|
self._epub = epub
|
||||||
self._exploded = None
|
self._exploded = None
|
||||||
self._file_browser_proc = None
|
#self._file_browser_proc = None
|
||||||
self._output = None
|
self._output = None
|
||||||
|
|
||||||
# Run the dialog setup generated from tweak_epub.ui
|
# Run the dialog setup generated from tweak_epub.ui
|
||||||
@ -64,14 +65,6 @@ class TweakEpub(QDialog, Ui_Dialog):
|
|||||||
'''
|
'''
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
prints("gui2.dialogs.tweak_epub:TweakEpub.cleanup()")
|
prints("gui2.dialogs.tweak_epub:TweakEpub.cleanup()")
|
||||||
# Kill file browser proc
|
|
||||||
if self._file_browser_proc:
|
|
||||||
if DEBUG:
|
|
||||||
prints(" killing file browser proc")
|
|
||||||
#self._file_browser_proc.terminate()
|
|
||||||
#self._file_browser_proc.kill()
|
|
||||||
#self._file_browser_send_signal(?)
|
|
||||||
self._file_browser_proc = None
|
|
||||||
|
|
||||||
# Delete directory containing exploded ePub
|
# Delete directory containing exploded ePub
|
||||||
if self._exploded is not None:
|
if self._exploded is not None:
|
||||||
@ -87,6 +80,7 @@ class TweakEpub(QDialog, Ui_Dialog):
|
|||||||
'''
|
'''
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
prints("gui2.dialogs.tweak_epub:TweakEpub.display_exploded()")
|
prints("gui2.dialogs.tweak_epub:TweakEpub.display_exploded()")
|
||||||
|
'''
|
||||||
if isosx:
|
if isosx:
|
||||||
cmd = 'open %s' % self._exploded
|
cmd = 'open %s' % self._exploded
|
||||||
elif iswindows:
|
elif iswindows:
|
||||||
@ -97,6 +91,8 @@ class TweakEpub(QDialog, Ui_Dialog):
|
|||||||
|
|
||||||
# *** Kovid - need a way of launching this process than can be killed in cleanup() ***
|
# *** Kovid - need a way of launching this process than can be killed in cleanup() ***
|
||||||
self._file_browser_proc = subprocess.Popen(cmd, shell=True)
|
self._file_browser_proc = subprocess.Popen(cmd, shell=True)
|
||||||
|
'''
|
||||||
|
open_local_file(self._exploded)
|
||||||
|
|
||||||
def explode(self):
|
def explode(self):
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user