diff --git a/src/constants.lisp b/src/constants.lisp index 4111878..f9b8bdb 100644 --- a/src/constants.lisp +++ b/src/constants.lisp @@ -123,7 +123,11 @@ General Public License for more details." (define-constant +mime-type-text+ "text/plain" :test #'string=) (define-constant +db-file-extension+ "sqlite3" :test #'string= - :documentation "the extension filename of the databases") + :documentation "the extension filename of the databases") + +(define-constant +default-database-username+ "default" :test #'string=) + +(define-constant +default-database-server-name+ "default" :test #'string=) (define-constant +json-true+ "true" :test #'string=) diff --git a/src/main.lisp b/src/main.lisp index 88b4724..a8586a1 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -282,5 +282,5 @@ etc.) happened" (print c)))) (tui-init) - (let ((first-time-starting (not (db-utils:db-file-exists-p)))) - (run first-time-starting)))))) + (let ((first-time-starting (not (db-utils:db-file-exists-p)))) + (run first-time-starting)))))) diff --git a/src/package.lisp b/src/package.lisp index ecd6ea5..0a20508 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -56,6 +56,8 @@ :+mime-type-html+ :+mime-type-text+ :+db-file-extension+ + :+default-database-username+ + :+default-database-server-name+ :+fps+ :+command-window-height+ :+starting-init-file+ diff --git a/src/software-configuration.lisp b/src/software-configuration.lisp index 42882c6..9b41afb 100644 --- a/src/software-configuration.lisp +++ b/src/software-configuration.lisp @@ -1136,7 +1136,11 @@ (cond ((not (or username server-name)) - (set-currents (first (config-username)) (first (config-server-name)))) + (if (and (config-username) + (config-server-name)) + (set-currents (first (config-username)) (first (config-server-name))) + (set-currents +default-database-username+ + +default-database-server-name+))) ((and (text-utils:string-not-empty-p username) (text-utils:string-not-empty-p server-name)) (let* ((position-all-usernames (loop for pos from 0