diff --git a/source/clog-window.lisp b/source/clog-window.lisp index f90431d..62c2552 100644 --- a/source/clog-window.lisp +++ b/source/clog-window.lisp @@ -630,9 +630,9 @@ them.") (t (create-div body :content "Invalid Access"))))) -(defun enable-clog-popup (&key (path *clog-popup-path*)) +(defun enable-clog-popup (&key (path *clog-popup-path*) (boot-file "/boot.html")) "Enable handling of clog enabled popups" - (set-on-new-window 'clog-popup-handler :path path)) + (set-on-new-window 'clog-popup-handler :path path :boot-file boot-file)) (defun open-clog-popup (obj &key (path *clog-popup-path*) (add-sync-to-path t) diff --git a/source/clog.lisp b/source/clog.lisp index 24577dd..44d2a06 100644 --- a/source/clog.lisp +++ b/source/clog.lisp @@ -940,6 +940,7 @@ embedded in a native template application.)" (defsection @clog-window (:title "CLOG Window Objects") "CLOG Popups" + (*clog-popup-path* variable) (enable-clog-popup function) (open-clog-popup function) (clog-popup-openned function) diff --git a/tools/clog-builder-panels.lisp b/tools/clog-builder-panels.lisp index 98ffbda..78ba1cb 100644 --- a/tools/clog-builder-panels.lisp +++ b/tools/clog-builder-panels.lisp @@ -1,10 +1,5 @@ (in-package :clog-tools) -;; Cross page syncing - -(defvar *app-sync-hash* (make-hash-table* :test #'equal) - "Exchange app instance with new external pages") - ;; Handle per content next-id counts (defun next-id (content) @@ -513,7 +508,8 @@ not a temporarily attached one when using select-control." (m-saveas (create-gui-menu-item m-file :content "save as..")) (m-reopnp (create-gui-menu-item m-file :content "save, close and reopen as panel")) (m-reopn (create-gui-menu-item m-file :content "save, close and popup this panel")) - (m-reopnh (create-gui-menu-item m-file :content "save, close and popup this panel no w3css")) + (m-reopnb (create-gui-menu-item m-file :content "save, close and popup this panel custom boot file")) + (m-reopnh (create-gui-menu-item m-file :content "save, close and popup this panel no css")) (m-edit (create-gui-menu-drop-down menu :content "Edit")) (m-undo (create-gui-menu-item m-edit :content "undo")) (m-redo (create-gui-menu-item m-edit :content "redo")) @@ -589,7 +585,12 @@ not a temporarily attached one when using select-control." (when (or open-ext *open-panels-as-popups*) (multiple-value-bind (pop pop-win) - (open-clog-popup obj :specs "width=640,height=480") + (if (typep open-ext 'string) + (progn + (enable-clog-popup :path "/customboot" :boot-file open-ext) + (open-clog-popup obj :path "/customboot" + :specs "width=640,height=480")) + (open-clog-popup obj :specs "width=640,height=480")) (when pop (let ((msg (create-button content :content "Panel is external. Click to bring to front."))) (set-geometry msg :units "%" :height 100 :width 100) @@ -929,6 +930,14 @@ not a temporarily attached one when using select-control." (save obj nil)) (window-close win) (on-new-builder-panel obj :open-file file-name :open-ext :custom))) + (set-on-click m-reopnb (lambda (obj) + (input-dialog obj "Boot file Name?" + (lambda (file) + (when file + (when is-dirty + (save obj nil)) + (window-close win) + (on-new-builder-panel obj :open-file file-name :open-ext file)))))) (set-on-click m-reopnp (lambda (obj) (when is-dirty (save obj nil)) @@ -953,3 +962,9 @@ not a temporarily attached one when using select-control." (defun on-new-builder-basic-page (obj) "Menu item to open new basic HTML page" (on-new-builder-panel obj :open-ext :custom)) + +(defun on-new-builder-custom-page (obj) + (input-dialog obj "Boot file Name?" + (lambda (file) + (when file + (on-new-builder-panel obj :open-ext file))))) diff --git a/tools/clog-builder.lisp b/tools/clog-builder.lisp index 1c120bf..77565e4 100644 --- a/tools/clog-builder.lisp +++ b/tools/clog-builder.lisp @@ -345,17 +345,18 @@ clog-builder window.") (help (create-gui-menu-drop-down menu :content "Help"))) (declare (ignore icon)) (add-class menu "w3-small") - (create-gui-menu-item file :content "New CLOG Panel" :on-click 'on-new-builder-panel) - (create-gui-menu-item file :content "New CLOG Panel External Edit" :on-click 'on-new-builder-page) - (create-gui-menu-item file :content "New HTML Panel External Edit" :on-click 'on-new-builder-basic-page) - (create-gui-menu-item file :content "New Application Template" :on-click 'on-new-app-template) - (create-gui-menu-item src :content "Project Window" :on-click 'on-show-project) - (create-gui-menu-item src :content "Directory Window" :on-click 'on-dir-win) - (create-gui-menu-item src :content "New Source Editor" :on-click 'on-open-file) - (create-gui-menu-item src :content "New Source Editor in New Tab" :on-click + (create-gui-menu-item file :content "New CLOG Panel Editor" :on-click 'on-new-builder-panel) + (create-gui-menu-item file :content "New CLOG Panel Popup Editor" :on-click 'on-new-builder-page) + (create-gui-menu-item file :content "New HTML Panel Popup Editor" :on-click 'on-new-builder-basic-page) + (create-gui-menu-item file :content "New Custom Boot Panel External Editor" :on-click 'on-new-builder-custom-page) + (create-gui-menu-item file :content "New Source Editor" :on-click 'on-open-file) + (create-gui-menu-item file :content "New Source External Editor" :on-click (lambda (obj) (declare (ignore obj)) (open-window (window body) "/source-editor?open-file=%20"))) + (create-gui-menu-item src :content "Project Window" :on-click 'on-show-project) + (create-gui-menu-item src :content "Directory Window" :on-click 'on-dir-win) + (create-gui-menu-item src :content "New Project Template" :on-click 'on-new-app-template) (create-gui-menu-item src :content "New System Browser" :on-click 'on-new-sys-browser) (create-gui-menu-item src :content "New ASDF System Browser" :on-click 'on-new-asdf-browser) (create-gui-menu-item tools :content "List Callers" :on-click 'on-show-callers)