Open new window for IPC args.
This commit is contained in:
parent
19be96b4a8
commit
191b1dd240
@ -230,16 +230,19 @@ class Application(QApplication):
|
||||
self._open_startpage()
|
||||
self._open_quickstart()
|
||||
|
||||
def process_args(self, args):
|
||||
def process_args(self, args, ipc=False):
|
||||
"""Process commandline args.
|
||||
|
||||
URLs to open have no prefix, commands to execute begin with a colon.
|
||||
|
||||
Args:
|
||||
args: A list of arguments to process.
|
||||
ipc: Whether the arguments were transmitted over IPC.
|
||||
"""
|
||||
# FIXME handle win_id with IPC
|
||||
win_id = 0
|
||||
if ipc:
|
||||
win_id = mainwindow.MainWindow.spawn()
|
||||
else:
|
||||
win_id = 0
|
||||
for cmd in args:
|
||||
if cmd.startswith(':'):
|
||||
log.init.debug("Startup cmd {}".format(cmd))
|
||||
|
@ -145,7 +145,7 @@ class IPCServer(QObject):
|
||||
return
|
||||
log.ipc.debug("Processing: {}".format(decoded))
|
||||
app = objreg.get('app')
|
||||
app.process_args(args)
|
||||
app.process_args(args, ipc=True)
|
||||
|
||||
@pyqtSlot()
|
||||
def on_timeout(self):
|
||||
|
Loading…
Reference in New Issue
Block a user