Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
6cf8e120
Commit
6cf8e120
authored
May 18, 2017
by
Sylvain Dailler
Browse files
GTK IDE: added a mark obsolete in popup_menu.
parent
9c13e106
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ide/why3ide.ml
View file @
6cf8e120
...
...
@@ -1250,7 +1250,22 @@ let (_ : GtkSignal.id) =
|
[
r
]
->
on_selected_row
r
;
if
!
has_right_click
then
(* TODO here show the menu *)
()
;
GToolbox
.
popup_menu
~
entries
:
[
`I
(
"Mark Obsolete"
,
(* TODO add a mark_obsolete function *)
(
fun
()
->
match
get_selected_row_references
()
with
|
[
r
]
->
let
id
=
get_node_id
r
#
iter
in
send_request
(
Mark_obsolete_req
id
)
|
_
->
print_message
"Select only one node to perform this action"
));
`I
(
"Choix 1.2"
,
(
fun
()
->
Format
.
eprintf
"Popup menu: choix 1.2 active@."
));
`S
;
`I
(
"Choix 2.1"
,
(
fun
()
->
Format
.
eprintf
"Popup menu: choix 2.1 active@."
));
`I
(
"Choix 2.2"
,
(
fun
()
->
Format
.
eprintf
"Popup menu: choix 2.2 active@."
));
`I
(
"Choix 2.3"
,
(
fun
()
->
Format
.
eprintf
"Popup menu: choix 2.3 active@."
));
]
~
button
:
1
~
time
:
0
l
;
has_right_click
:=
false
|
_
->
()
...
...
@@ -1265,16 +1280,7 @@ let _ =
|
1
->
(* Left click *)
()
|
2
->
(* Middle click *)
()
|
3
->
(* Right click *)
has_right_click
:=
true
;
GToolbox
.
popup_menu
~
entries
:
[
`I
(
"Choix 1.1"
,
(
fun
()
->
Format
.
eprintf
"Popup menu: choix 1.1 active@."
));
`I
(
"Choix 1.2"
,
(
fun
()
->
Format
.
eprintf
"Popup menu: choix 1.2 active@."
));
`S
;
`I
(
"Choix 2.1"
,
(
fun
()
->
Format
.
eprintf
"Popup menu: choix 2.1 active@."
));
`I
(
"Choix 2.2"
,
(
fun
()
->
Format
.
eprintf
"Popup menu: choix 2.2 active@."
));
`I
(
"Choix 2.3"
,
(
fun
()
->
Format
.
eprintf
"Popup menu: choix 2.3 active@."
));
]
~
button
:
1
~
time
:
0
l
has_right_click
:=
true
|
_
->
(* Error case TODO *)
assert
false
);
Format
.
eprintf
"TODO button number %d was clicked on the tree view@."
(
GdkEvent
.
Button
.
button
x
);
false
)
...
...
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