Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
4c2bae7d
Commit
4c2bae7d
authored
Feb 21, 2003
by
Diederik van Arkel
Browse files
improve file save handling
parent
da3a144d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Ide/edfiles.icl
View file @
4c2bae7d
...
...
@@ -39,15 +39,6 @@ where
texts
=
[
"Save changes to"
,
"
\"
"
+++
RemovePath
pathname
+++
"
\"
?"
]
=
ask
texts
win
res
ps
save
win
ps
#
(
reply
,
ps
)
=
message
win
msgSave
ps
|
isNothing
reply
=
okNotice
[
"Save failed:"
,
"Internal error [edfiles:ed_ask_save_all]"
]
ps
#
error
=
fromJust
reply
|
isJust
error
=
okNotice
[
"Save failed:"
,
fromJust
error
]
ps
=
ps
ask
texts
win
res
ps
#
(
sId
,
ps
)
=
openId
ps
#
(
okId
,
ps
)
=
openId
ps
...
...
@@ -76,7 +67,7 @@ where
]
// not this one but continue with rest
:+:
ButtonControl
"&Yes"
[
ControlId
okId
,
ControlFunction
(
noLS
(
doall
res
o
maybeclose
win
o
save
win
o
(
closeWindow
sId
))
)
,
ControlFunction
(
noLS
(
try_save
sId
))
,
ControlWidth
(
ContentWidth
"Cancel"
)
]
// do this one and continue
)
...
...
@@ -86,7 +77,27 @@ where
,
WindowClose
(
noLS
(
mb_update_undoinfo
o
closeWindow
sId
))
,
WindowInitActive
okId
]
try_save
sId
ps
#
ps
=
closeWindow
sId
ps
// # ps = save win ps
#
(
reply
,
ps
)
=
message
win
msgSave
ps
|
isNothing
reply
=
okNotice
[
"Save failed:"
,
"Internal error [edfiles:ed_ask_save_all]"
,
"Aborting quit"
]
ps
#
error
=
fromJust
reply
|
isJust
error
=
okNotice
[
"Save failed:"
,
fromJust
error
,
"Aborting quit"
]
ps
#
ps
=
maybeclose
win
ps
=
doall
res
ps
/*
save win ps
# (reply,ps) = message win msgSave ps
| isNothing reply
= okNotice ["Save failed:","Internal error [edfiles:ed_ask_save_all]"] ps
# error = fromJust reply
| isJust error
= okNotice ["Save failed:",fromJust error] ps
= ps
*/
ed_open_path_sel
::
.
String
!
Selection
!*(
PSt
General
)
->
*
PSt
General
ed_open_path_sel
pathName
sel
ps
#
(
mFHrecId
,
ps
)
=
getFHI
ps
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment