Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -37,17 +37,22 @@ tasksmod.scm pgdb.scm launchmod.scm runsmod.scm \ portloggermod.scm archivemod.scm ezstepsmod.scm \ subrunmod.scm bigmod.scm testsmod.scm vgmod.scm -GUISRCF = dashboard-context-menu.scm dashboard-tests.scm \ - dashboard-guimonitor.scm gutils.scm dcommon.scm tree.scm +GUISRCF = dashboard-tests.scm \ + dashboard-guimonitor.scm gutils.scm tree.scm + +GUIMODFILES = dashboard-context-menu.scm dcommon.scm + +mofiles/dashboard-context-menu.o : mofiles/dcommon.o OFILES = $(SRCFILES:%.scm=%.o) GOFILES = $(GUISRCF:%.scm=%.o) -MOFILES = $(addprefix mofiles/,$(MSRCFILES:%.scm=%.o)) +MOFILES = $(addprefix mofiles/,$(MSRCFILES:%.scm=%.o)) \ +$(addprefix mofiles/,$(GUIMODFILES:%.scm=%.o)) # compiled import files MOIMPFILES = $(MSRCFILES:%.scm=%.import.o) %.import.o : %.import.scm Index: dashboard-context-menu.scm ================================================================== --- dashboard-context-menu.scm +++ dashboard-context-menu.scm @@ -39,10 +39,13 @@ chicken.file.posix chicken.pathname chicken.process chicken.process-context chicken.string + chicken.time + + srfi-1 regex regex-case srfi-69 (prefix sqlite3 sqlite3:)) (declare (unit dashboard-context-menu)) (declare (uses commonmod)) @@ -53,18 +56,22 @@ (declare (uses ezstepsmod)) ;; (declare (uses sdb)) ;; (declare (uses filedb)) (declare (uses subrunmod)) (declare (uses debugprint)) +(declare (uses testsmod)) +(declare (uses dcommon)) (import commonmod dbmod rmtmod ezstepsmod subrunmod debugprint configfmod + testsmod + dcommon ) ;; (include "common_records.scm") (include "db_records.scm") (include "run_records.scm") Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -82,10 +82,11 @@ mtver processmod runsmod subrunmod vgmod + dcommon dashboard-context-menu) (define help (conc "Megatest Dashboard, documentation at http://www.kiatoa.com/fossils/megatest version " megatest-version " Index: dcommon.scm ================================================================== --- dcommon.scm +++ dcommon.scm @@ -16,23 +16,50 @@ ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; ;;====================================================================== -(import format) -(import iup) -(import (prefix iup iup:)) -(import canvas-draw) +(module dcommon + * -(import regex typed-records matchable srfi-69) + (import scheme + chicken.base + chicken.condition + chicken.string + chicken.pretty-print + chicken.sort + chicken.time + + chicken.file + chicken.file.posix + chicken.process + chicken.process-context + chicken.process-context.posix + + srfi-18 + format + iup + (prefix iup iup:) + canvas-draw + + regex + typed-records + matchable + srfi-69 + sparse-vectors + srfi-1 + ) (declare (unit dcommon)) (declare (uses gutils)) (declare (uses dbmod)) (declare (uses mtver)) (declare (uses debugprint)) +(declare (uses commonmod)) +(declare (uses configfmod)) +(declare (uses rmtmod)) ;; (include "megatest-version.scm") ;; (include "common_records.scm") (include "db_records.scm") (include "key_records.scm") @@ -39,11 +66,14 @@ (include "run_records.scm") (import mtver dbmod + commonmod debugprint + configfmod + rmtmod ) ;; yes, this is non-ideal (define dashboard:update-summary-tab #f) (define dashboard:update-servers-table #f) @@ -1410,11 +1440,11 @@ (iup:send-url lfilename)))) (define (dashboard:monitor-changed? commondat tabdat) (let* ((run-update-time (current-seconds)) (monitor-db-path (dboard:tabdat-monitor-db-path tabdat)) - (monitor-modtime (if (and monitor-db-path (common:file-exists? monitor-db-path)) + (monitor-modtime (if (and monitor-db-path (file-exists? monitor-db-path)) (file-modification-time monitor-db-path) -1))) (if (and (eq? (dboard:commondat-curr-tab-num commondat) 0) (or (> monitor-modtime *last-monitor-update-time*) (> (- run-update-time *last-monitor-update-time*) 5))) ;; update every 1/2 minute just in case @@ -1465,5 +1495,6 @@ (or please-update-buttons (and ;; (> (current-milliseconds)(+ *last-recalc-ended-time* 150)) ;; can't use this - it needs to be tab specific (> modtime (- last-db-update-time 3)) ;; add three seconds of margin (> (current-seconds)(+ last-db-update-time 1))))) +)