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
9c13e106
Commit
9c13e106
authored
May 17, 2017
by
MARCHE Claude
Browse files
GTK IDE: adding a popup menu on right click
parent
dac3b102
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ide/why3ide.ml
View file @
9c13e106
...
...
@@ -1265,7 +1265,17 @@ let _ =
|
1
->
(* Left click *)
()
|
2
->
(* Middle click *)
()
|
3
->
(* Right click *)
has_right_click
:=
true
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
|
_
->
(* 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