Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Why3
why3
Commits
0bb8a73a
Commit
0bb8a73a
authored
Aug 04, 2011
by
MARCHE Claude
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a 'cancel' choice in the saving session dialog
parent
b77c9cf1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
18 deletions
+16
-18
ROADMAP
ROADMAP
+1
-1
src/ide/newmain.ml
src/ide/newmain.ml
+15
-17
No files found.
ROADMAP
View file @
0bb8a73a
...
...
@@ -62,7 +62,7 @@
+ suggested solution: replace model + filter_model by a custom model
(JC + ?)
** saving session
* add a "cancel" choice in the "ask" window
*
DONE
add a "cancel" choice in the "ask" window
* add "ctrl-S" to save the session explicitly
(partially done, but no shortcut)
...
...
src/ide/newmain.ml
View file @
0bb8a73a
...
...
@@ -545,6 +545,7 @@ let info_window ?(callback=(fun () -> ())) mt s =
~
message_type
:
mt
~
buttons
~
title
:
"Why3IDE"
~
icon
:
(
!
Gconfig
.
why_icon
)
~
modal
:
true
~
show
:
true
()
in
...
...
@@ -749,7 +750,7 @@ let save_session () =
eprintf
"[Info] saving session@."
;
M
.
save_session
()
let
exit_function
()
=
let
exit_function
?
(
destroy
=
false
)
()
=
eprintf
"[Info] saving IDE config file@."
;
save_config
()
;
(*
...
...
@@ -775,22 +776,18 @@ let exit_function () =
|
0
->
save_session
()
;
GMain
.
quit
()
|
1
->
GMain
.
quit
()
|
2
->
let
d
=
GWindow
.
message_dialog
~
message
:
"Do you want to save the session?"
~
message_type
:
`QUESTION
~
buttons
:
GWindow
.
Buttons
.
yes_no
~
title
:
"Why3 save"
~
modal
:
true
~
show
:
true
()
let
answer
=
GToolbox
.
question_box
~
title
:
"Why3 saving session"
~
buttons
:
([
"Yes"
;
"No"
]
@
(
if
destroy
then
[]
else
[
"Cancel"
]))
"Do you want to save the session?"
in
let
(
_
:
GtkSignal
.
id
)
=
d
#
connect
#
response
~
callback
:
(
function
x
->
d
#
destroy
()
;
if
x
=
`YES
then
save_session
()
;
GMain
.
quit
()
)
in
()
begin
match
answer
with
|
1
->
save_session
()
;
GMain
.
quit
()
|
2
->
GMain
.
quit
()
|
_
->
if
destroy
then
GMain
.
quit
()
else
()
end
|
_
->
eprintf
"unexpected value for saving_policy@."
;
GMain
.
quit
()
...
...
@@ -1258,7 +1255,8 @@ let (_ : GMenu.image_menu_item) =
()
*)
let
(
_
:
GtkSignal
.
id
)
=
w
#
connect
#
destroy
~
callback
:
exit_function
let
(
_
:
GtkSignal
.
id
)
=
w
#
connect
#
destroy
~
callback
:
(
exit_function
~
destroy
:
true
)
let
(
_
:
GMenu
.
image_menu_item
)
=
file_factory
#
add_image_item
~
key
:
GdkKeysyms
.
_Q
~
label
:
"_Quit"
...
...
Write
Preview
Markdown
is supported
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