/[circus]/circus/modules/CircusGtkMenu/gtkmenu.py
ViewVC logotype

Diff of /circus/modules/CircusGtkMenu/gtkmenu.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by bskahan, Sun Nov 17 07:28:09 2002 UTC revision 1.2 by bskahan, Sun Nov 17 08:14:54 2002 UTC
# Line 15  __date__ = "Wed Nov 17 2002" Line 15  __date__ = "Wed Nov 17 2002"
15  __version__ = "$Revision$"  __version__ = "$Revision$"
16  # $Id$  # $Id$
17    
18    import pygtk
19    pygtk.require("2.0")
20    from gtk import *
21  from circus import module  from circus import module
22  from CircusMenus import *  from CircusMenus import *
23    
# Line 22  class MyModule(module.Module): Line 25  class MyModule(module.Module):
25    
26      def load(self):      def load(self):
27          pass          pass
28    
29    #menu_item1 = "gvim"
30    #
31    #def menu_button1(button):
32    #    _run_program(menu_item1)
33    #    root_menu.destroy()
34    #
35    ## create a top level root_menu
36    #root_menu = Window(WINDOW_TOPLEVEL)
37    #
38    ## quit the event loop on destruction
39    #root_menu.connect("destroy", mainquit)
40    #
41    ## set padding round child widget
42    #root_menu.set_border_width(2)        
43    #
44    ##turn of window frame
45    #root_menu.set_decorated(0)
46    #
47    #button1 = Button(menu_item1)
48    #
49    ## call hello_cb when clicked
50    #button1.connect("clicked", menu_button1)
51    #
52    ## add button to root_menu
53    #root_menu.add(button1)                  
54    #
55    ## show button
56    #button1.show()                      
57    #
58    #root_menu.show()
59    #
60    #mainloop()
61    #
62    #
63      #        
64    #class GtkMenu(Menu):
65    #
66    #    def callback(self, widget, data):
67    #        print "Eureeka - %s was pressed" % data
68    #
69    #    def delete_event(self, widget, event, data=None):
70    #        gtk.mainquit()
71    #        return gtk.FALSE
72    #
73    #
74    #    def __init__(self):
75    #        mainloop()
76    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26