repo.or.cz
/
calf.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
+ VU meter: move to separate header to enable reuse, modify falloff behaviour, add...
[calf.git]
/
bigbull
/
calfgtkutils.py
blob
b62778f92e5f33a2e73201c39cd937dadd015795
1
import
pygtk
2
pygtk
.
require
(
'2.0'
)
3
import
gtk
4
5
def
add_option
(
menu
,
option
,
handler
,
data
=
None
):
6
item
=
gtk
.
MenuItem
(
option
)
7
item
.
connect_object
(
"activate"
,
handler
,
data
)
8
menu
.
add
(
item
)
9
10
def
add_submenu
(
menu
,
option
):
11
submenu
=
gtk
.
Menu
()
12
item
=
gtk
.
MenuItem
(
option
)
13
menu
.
append
(
item
)
14
item
.
set_submenu
(
submenu
)
15
return
submenu
16