changed the strategy of the preferences library in the framework to use a different key at the file.ss level (and thus save the prefs on each call to preferences:set)
svn: r5058 original commit: d47247507f6dd55cf3d628a83570096137cda406
This commit is contained in:
parent
4068a307bf
commit
398113d503
|
@ -238,19 +238,7 @@
|
|||
", "
|
||||
"@flink preferences:set %"
|
||||
".")
|
||||
(preferences:save
|
||||
(-> boolean?)
|
||||
()
|
||||
"\\rawscm{(preferences:save-user-preferences)} saves the user's preferences to disk,"
|
||||
"potentially marshalling some of the preferences."
|
||||
""
|
||||
"Returns \\scm{\\#f} if saving the preferences fails and \\scm{\\#t} otherwise.")
|
||||
(preferences:silent-save
|
||||
(-> boolean?)
|
||||
()
|
||||
"Same as"
|
||||
"@flink preferences:save"
|
||||
"except that it does not put display a message if it fails.")
|
||||
|
||||
(preferences:restore-defaults
|
||||
(-> void?)
|
||||
()
|
||||
|
|
|
@ -296,22 +296,8 @@
|
|||
|
||||
(exit:insert-on-callback
|
||||
(λ ()
|
||||
(send (group:get-the-frame-group) on-close-all)
|
||||
(preferences:silent-save) ;; the prefs may have changed as a result of closing the windows...
|
||||
))
|
||||
(send (group:get-the-frame-group) on-close-all)))
|
||||
|
||||
(exit:insert-can?-callback
|
||||
(λ ()
|
||||
(or (preferences:save)
|
||||
(exit-anyway?))))
|
||||
|
||||
(define (exit-anyway?)
|
||||
(gui-utils:get-choice
|
||||
(string-constant still-locked-exit-anyway?)
|
||||
(string-constant yes)
|
||||
(string-constant no)
|
||||
(string-constant drscheme)))
|
||||
|
||||
;; reset these -- they are only for the test suite.
|
||||
;; they do not need to be set across starting up and shutting down
|
||||
;; the application.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -80,8 +80,6 @@
|
|||
set-default
|
||||
set-un/marshall
|
||||
|
||||
save
|
||||
silent-save
|
||||
restore-defaults
|
||||
|
||||
add-panel
|
||||
|
|
|
@ -49,8 +49,7 @@
|
|||
(lambda (f) (f))
|
||||
(lambda (v) (lambda () v)))
|
||||
(begin0 ((preferences:get ',marshalling-pref-sym))
|
||||
(preferences:set ',marshalling-pref-sym (lambda () 2))
|
||||
(preferences:save))))
|
||||
(preferences:set ',marshalling-pref-sym (lambda () 2)))))
|
||||
(shutdown-mred)
|
||||
(test 'preference-marshalling
|
||||
(check-eq? 2)
|
||||
|
@ -79,13 +78,11 @@
|
|||
(check-eq? 'stage1)
|
||||
`(begin (preferences:set-default ',default-test-sym 'default symbol?)
|
||||
(preferences:set ',default-test-sym 'new-value)
|
||||
(preferences:save)
|
||||
'stage1))
|
||||
(shutdown-mred)
|
||||
(test 'preference-no-set-default-stage2
|
||||
(check-eq? 'stage2)
|
||||
`(begin (preferences:save)
|
||||
'stage2))
|
||||
`(begin 'stage2))
|
||||
(shutdown-mred)
|
||||
(test 'preference-no-set-default-stage3
|
||||
(check-eq? 'new-value)
|
||||
|
|
Loading…
Reference in New Issue
Block a user