Fix docstrings
This commit is contained in:
parent
1b5f1aaebf
commit
64443a3eed
@ -301,12 +301,12 @@ def process_pos_args(args, via_ipc=False, cwd=None, target_arg=None):
|
|||||||
|
|
||||||
|
|
||||||
def open_url(url, target=None, no_raise=False, via_ipc=True):
|
def open_url(url, target=None, no_raise=False, via_ipc=True):
|
||||||
"""Open an URL in new window/tab
|
"""Open an URL in new window/tab.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
url: An URL to open
|
url: An URL to open.
|
||||||
target: same as new_instance_open_target (used as a default)
|
target: same as new_instance_open_target (used as a default).
|
||||||
no_raise: suppress target window raising
|
no_raise: suppress target window raising.
|
||||||
via_ipc: Whether the arguments were transmitted over IPC.
|
via_ipc: Whether the arguments were transmitted over IPC.
|
||||||
|
|
||||||
Return:
|
Return:
|
||||||
@ -828,6 +828,7 @@ class Application(QApplication):
|
|||||||
self._last_focus_object = output
|
self._last_focus_object = output
|
||||||
|
|
||||||
def event(self, e):
|
def event(self, e):
|
||||||
|
"""Handle macOS FileOpen events."""
|
||||||
if e.type() == QEvent.FileOpen:
|
if e.type() == QEvent.FileOpen:
|
||||||
open_url(e.url(), no_raise=True)
|
open_url(e.url(), no_raise=True)
|
||||||
else:
|
else:
|
||||||
|
@ -95,6 +95,7 @@ def get_window(via_ipc, force_window=False, force_tab=False,
|
|||||||
|
|
||||||
|
|
||||||
def raise_window(window):
|
def raise_window(window):
|
||||||
|
"""Raise the given MainWindow object."""
|
||||||
window.setWindowState(window.windowState() & ~Qt.WindowMinimized)
|
window.setWindowState(window.windowState() & ~Qt.WindowMinimized)
|
||||||
window.setWindowState(window.windowState() | Qt.WindowActive)
|
window.setWindowState(window.windowState() | Qt.WindowActive)
|
||||||
window.raise_()
|
window.raise_()
|
||||||
|
Loading…
Reference in New Issue
Block a user