From 56dd0798a682fcf8079a67e8a29c1339c0eda95b Mon Sep 17 00:00:00 2001 From: cage Date: Sun, 21 May 2023 15:59:59 +0200 Subject: [PATCH] - [GUI] allowed opening a URI indicated on the command line using the '-o' switch, when using the GUI. --- src/gui/client/main-window.lisp | 8 ++++++-- src/main.lisp | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/client/main-window.lisp b/src/gui/client/main-window.lisp index bfb9262..3c7cea8 100644 --- a/src/gui/client/main-window.lisp +++ b/src/gui/client/main-window.lisp @@ -1416,7 +1416,7 @@ (funcall (menu:show-bookmarks-clsr main-window))) :exclusive t)) -(defun init-main-window () +(defun init-main-window (starting-iri) (setf gui:*debug-tk* nil) (gui:with-nodgui (:title +program-name+ :debugger-class 'gui:graphical-condition-handler) (icons:load-icons) @@ -1428,4 +1428,8 @@ (initialize-menu gui:*tk* main-frame) (gui:grid main-frame 0 0 :sticky :nswe) (initialize-keybindings main-frame) - (gui-goodies:gui-resize-grid-all gui-goodies:*toplevel*)))) + (gui-goodies:gui-resize-grid-all gui-goodies:*toplevel*) + (gui:wait-complete-redraw) + (when (string-not-empty-p starting-iri) + (set-address-bar-text main-frame starting-iri) + (open-iri starting-iri main-frame nil))))) diff --git a/src/main.lisp b/src/main.lisp index 24ff809..ba37bca 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -265,7 +265,7 @@ etc.) happened" (command-line:*rpc-client-mode* (rpc-client-init) (json-rpc-communication::start-client) - (client-main-window:init-main-window)) + (client-main-window:init-main-window command-line:*net-address*)) (command-line:*print-lisp-dependencies* (misc:all-program-dependencies t)) (command-line:*script-file*