16 |
# $Id$ |
# $Id$ |
17 |
|
|
18 |
import os |
import os |
|
import string |
|
19 |
from Xlib import X |
from Xlib import X |
20 |
from circus import module |
from circus import module |
21 |
|
|
82 |
if __debug__: |
if __debug__: |
83 |
print self.menu_dict |
print self.menu_dict |
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#################################################################### |
|
|
#import pygtk |
|
|
#pygtk.require("2.0") |
|
|
#from gtk import * |
|
|
|
|
|
#menu_item1 = "gvim" |
|
|
# |
|
|
#def menu_button1(button): |
|
|
# _run_program(menu_item1) |
|
|
# root_menu.destroy() |
|
|
# |
|
|
## create a top level root_menu |
|
|
#root_menu = Window(WINDOW_TOPLEVEL) |
|
|
# |
|
|
## quit the event loop on destruction |
|
|
#root_menu.connect("destroy", mainquit) |
|
|
# |
|
|
## set padding round child widget |
|
|
#root_menu.set_border_width(2) |
|
|
# |
|
|
##turn of window frame |
|
|
#root_menu.set_decorated(0) |
|
|
# |
|
|
#button1 = Button(menu_item1) |
|
|
# |
|
|
## call hello_cb when clicked |
|
|
#button1.connect("clicked", menu_button1) |
|
|
# |
|
|
## add button to root_menu |
|
|
#root_menu.add(button1) |
|
|
# |
|
|
## show button |
|
|
#button1.show() |
|
|
# |
|
|
#root_menu.show() |
|
|
# |
|
|
#mainloop() |
|
|
# |
|
|
# |
|
|
# |
|
|
#class GtkMenu(Menu): |
|
|
# |
|
|
# def callback(self, widget, data): |
|
|
# print "Eureeka - %s was pressed" % data |
|
|
# |
|
|
# def delete_event(self, widget, event, data=None): |
|
|
# gtk.mainquit() |
|
|
# return gtk.FALSE |
|
|
# |
|
|
# |
|
|
# def __init__(self): |
|
|
# mainloop() |
|
|
|
|