Improve `agenda-files' comprehension
This commit is contained in:
parent
f8dfa0df41
commit
9a904ee756
3 changed files with 16 additions and 5 deletions
|
|
@ -4,14 +4,18 @@
|
|||
|
||||
(set-config-package :sextant/options/options)
|
||||
|
||||
(defconfig agenda-files '()
|
||||
(defconfig agenda-files '("~/Documents/")
|
||||
:validate ((path) (not (null (probe-file path))))
|
||||
:get ((index) (nth index agenda-files))
|
||||
:set ((index path)
|
||||
(when (validate-agenda-files path)
|
||||
(loop while (<= (length agenda-files) index)
|
||||
do (setf agenda-files (append agenda-files '(""))))
|
||||
(setf (nth index agenda-files) path))))
|
||||
(let ((path (if (and (uiop:directory-pathname-p (probe-file path))
|
||||
(not (uiop:directory-pathname-p (parse-namestring path))))
|
||||
(concatenate 'string path "/")
|
||||
path)))
|
||||
(loop while (<= (length agenda-files) index)
|
||||
do (setf agenda-files (append agenda-files '(""))))
|
||||
(setf (nth index agenda-files) path)))))
|
||||
|
||||
(defconfig undo-history-size 100)
|
||||
(defconfig recent-files-size 10)
|
||||
|
|
|
|||
|
|
@ -74,6 +74,13 @@ Dialog {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
id: agendaFilesHist
|
||||
width: parent.width
|
||||
text: qsTr("Customize directories list in Settings page.")
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
}
|
||||
|
||||
onAccepted: {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Page {
|
|||
}
|
||||
|
||||
ListTextField {
|
||||
label: "Agenda files"
|
||||
label: "Agenda files or directories"
|
||||
getter: "options:get-agenda-files"
|
||||
setter: "options:set-agenda-files"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue