mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
focus window if exist instead of create popup
This commit is contained in:
parent
3b309036b6
commit
6fc6f84f60
1 changed files with 24 additions and 21 deletions
|
|
@ -32,27 +32,30 @@
|
||||||
(defun on-open-file-ext (obj &key open-file popup)
|
(defun on-open-file-ext (obj &key open-file popup)
|
||||||
(if (and *open-external-with-emacs* open-file)
|
(if (and *open-external-with-emacs* open-file)
|
||||||
(swank:ed-in-emacs open-file)
|
(swank:ed-in-emacs open-file)
|
||||||
(if *open-external-using-clog-popups*
|
(let ((win (window-to-top-by-title obj open-file)))
|
||||||
(let ((pop (open-clog-popup obj
|
(if win
|
||||||
:specs (if (or popup *open-external-source-in-popup*)
|
(window-focus win)
|
||||||
"width=640,height=480"
|
(if *open-external-using-clog-popups*
|
||||||
"")
|
(let ((pop (open-clog-popup obj
|
||||||
:name "_blank")))
|
:specs (if (or popup *open-external-source-in-popup*)
|
||||||
(if pop
|
"width=640,height=480"
|
||||||
(let ((app (connection-data-item obj "builder-app-data")))
|
"")
|
||||||
(setf (connection-data-item pop "builder-app-data") app)
|
:name "_blank")))
|
||||||
(clog-gui-initialize pop :parent-desktop-obj obj)
|
(if pop
|
||||||
(on-open-file pop :open-file open-file :maximized t))
|
(let ((app (connection-data-item obj "builder-app-data")))
|
||||||
(on-open-file obj :open-file open-file)))
|
(setf (connection-data-item pop "builder-app-data") app)
|
||||||
(open-window (window (connection-body obj))
|
(clog-gui-initialize pop :parent-desktop-obj obj)
|
||||||
(if open-file
|
(on-open-file pop :open-file open-file :maximized t))
|
||||||
(format nil "/source-editor?open-file=~A"
|
(on-open-file obj :open-file open-file)))
|
||||||
open-file)
|
(open-window (window (connection-body obj))
|
||||||
"/source-editor?open-file=%20")
|
(if open-file
|
||||||
:specs (if (or popup *open-external-source-in-popup*)
|
(format nil "/source-editor?open-file=~A"
|
||||||
"width=800,height=600"
|
open-file)
|
||||||
"")
|
"/source-editor?open-file=%20")
|
||||||
:name "_blank"))))
|
:specs (if (or popup *open-external-source-in-popup*)
|
||||||
|
"width=800,height=600"
|
||||||
|
"")
|
||||||
|
:name "_blank"))))))
|
||||||
|
|
||||||
(defun on-open-file (obj &key open-file
|
(defun on-open-file (obj &key open-file
|
||||||
(title "New Source Editor")
|
(title "New Source Editor")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue