mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-29 10:46:40 +01:00
macOS: Fix calibre:// URLs not working from other documents
This commit is contained in:
parent
33dbbb2bee
commit
4265c87463
1 changed files with 6 additions and 0 deletions
|
|
@ -1153,6 +1153,12 @@ def load_translations(self):
|
|||
|
||||
def event(self, e):
|
||||
if callable(self.file_event_hook) and e.type() == QEvent.FileOpen:
|
||||
url = e.url().toString(QUrl.FullyEncoded)
|
||||
if url and url.startswith('calibre://'):
|
||||
with self._file_open_lock:
|
||||
self._file_open_paths.append(url)
|
||||
QTimer.singleShot(1000, self._send_file_open_events)
|
||||
return True
|
||||
path = unicode_type(e.file())
|
||||
if os.access(path, os.R_OK):
|
||||
with self._file_open_lock:
|
||||
|
|
|
|||
Loading…
Reference in a new issue