/[ascend]/trunk/pygtk/interface/ascendgui.py
ViewVC logotype

Contents of /trunk/pygtk/interface/ascendgui.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 132 - (show annotations) (download) (as text)
Wed Dec 21 00:14:13 2005 UTC (14 years, 7 months ago) by johnpye
File MIME type: text/x-python
File size: 5339 byte(s)
Adding the PyGTK interface to CMU repository. Whaddyareckon?
1 #!/usr/bin/env python
2 # -*- coding: UTF8 -*-
3
4 # Python module ascendgui.py
5 # Autogenerated from ascend.glade
6 # Generated on Sun Nov 13 20:38:11 2005
7
8 # Warning: Do not modify any context comment such as #--
9 # They are required to keep user's code
10
11 import os
12
13 import gtk
14
15 from SimpleGladeApp import SimpleGladeApp
16 from SimpleGladeApp import bindtextdomain
17
18 app_name = "ascend"
19 app_version = "0.0.1"
20
21 glade_dir = ""
22 locale_dir = ""
23
24 bindtextdomain(app_name, locale_dir)
25
26
27 class Mainwin(SimpleGladeApp):
28
29 def __init__(self, path="ascend.glade",
30 root="mainwin",
31 domain=app_name, **kwargs):
32 path = os.path.join(glade_dir, path)
33 SimpleGladeApp.__init__(self, path, root, domain, **kwargs)
34
35 #-- Mainwin.new {
36 def new(self):
37 print "A new %s has been created" % self.__class__.__name__
38 #-- Mainwin.new }
39
40 #-- Mainwin custom methods {
41 # Write your own methods here
42 #-- Mainwin custom methods }
43
44 #-- Mainwin.on_mainwin_delete_event {
45 def on_mainwin_delete_event(self, widget, *args):
46 print "on_mainwin_delete_event called with self.%s" % widget.get_name()
47 #-- Mainwin.on_mainwin_delete_event }
48
49 #-- Mainwin.on_new1_activate {
50 def on_new1_activate(self, widget, *args):
51 print "on_new1_activate called with self.%s" % widget.get_name()
52 #-- Mainwin.on_new1_activate }
53
54 #-- Mainwin.on_open1_activate {
55 def on_open1_activate(self, widget, *args):
56 print "on_open1_activate called with self.%s" % widget.get_name()
57 #-- Mainwin.on_open1_activate }
58
59 #-- Mainwin.on_save1_activate {
60 def on_save1_activate(self, widget, *args):
61 print "on_save1_activate called with self.%s" % widget.get_name()
62 #-- Mainwin.on_save1_activate }
63
64 #-- Mainwin.on_save_as1_activate {
65 def on_save_as1_activate(self, widget, *args):
66 print "on_save_as1_activate called with self.%s" % widget.get_name()
67 #-- Mainwin.on_save_as1_activate }
68
69 #-- Mainwin.on_quit1_activate {
70 def on_quit1_activate(self, widget, *args):
71 # print "on_quit1_activate called with self.%s" % widget.get_name()
72 self.quit();
73 #-- Mainwin.on_quit1_activate }
74
75 #-- Mainwin.on_cut1_activate {
76 def on_cut1_activate(self, widget, *args):
77 print "on_cut1_activate called with self.%s" % widget.get_name()
78 #-- Mainwin.on_cut1_activate }
79
80 #-- Mainwin.on_copy1_activate {
81 def on_copy1_activate(self, widget, *args):
82 print "on_copy1_activate called with self.%s" % widget.get_name()
83 #-- Mainwin.on_copy1_activate }
84
85 #-- Mainwin.on_paste1_activate {
86 def on_paste1_activate(self, widget, *args):
87 print "on_paste1_activate called with self.%s" % widget.get_name()
88 #-- Mainwin.on_paste1_activate }
89
90 #-- Mainwin.on_delete1_activate {
91 def on_delete1_activate(self, widget, *args):
92 print "on_delete1_activate called with self.%s" % widget.get_name()
93 #-- Mainwin.on_delete1_activate }
94
95 #-- Mainwin.on_about1_activate {
96 def on_about1_activate(self, widget, *args):
97 # print "on_about1_activate called with self.%s" % widget.get_name()
98 Aboutwin()
99 #-- Mainwin.on_about1_activate }
100
101
102 class Aboutwin(SimpleGladeApp):
103
104 def __init__(self, path="ascend.glade",
105 root="aboutwin",
106 domain=app_name, **kwargs):
107 path = os.path.join(glade_dir, path)
108 SimpleGladeApp.__init__(self, path, root, domain, **kwargs)
109
110 #-- Aboutwin.new {
111 def new(self):
112 print "A new %s has been created" % self.__class__.__name__
113 #-- Aboutwin.new }
114
115 #-- Aboutwin custom methods {
116 # Write your own methods here
117 #-- Aboutwin custom methods }
118
119 #-- Aboutwin.on_aboutwin_delete_event {
120 def on_aboutwin_delete_event(self, widget, *args):
121 print "on_aboutwin_delete_event called with self.%s" % widget.get_name()
122 self.Aboutwin.destroy()
123 #-- Aboutwin.on_aboutwin_delete_event }
124
125 #-- Aboutwin.on_close_clicked {
126 def on_close_clicked(self, widget, *args):
127 print "on_close_clicked called with self.%s" % widget.get_name()
128 self.destroy()
129 #-- Aboutwin.on_close_clicked }
130
131
132 class Errorwin(SimpleGladeApp):
133
134 def __init__(self, path="ascend.glade",
135 root="errorwin",
136 domain=app_name, **kwargs):
137 path = os.path.join(glade_dir, path)
138 SimpleGladeApp.__init__(self, path, root, domain, **kwargs)
139
140 #-- Errorwin.new {
141 def new(self):
142 print "A new %s has been created" % self.__class__.__name__
143 #-- Errorwin.new }
144
145 #-- Errorwin custom methods {
146 # Write your own methods here
147 #-- Errorwin custom methods }
148
149
150 class Menu8(SimpleGladeApp):
151
152 def __init__(self, path="ascend.glade",
153 root="menu8",
154 domain=app_name, **kwargs):
155 path = os.path.join(glade_dir, path)
156 SimpleGladeApp.__init__(self, path, root, domain, **kwargs)
157
158 #-- Menu8.new {
159 def new(self):
160 print "A new %s has been created" % self.__class__.__name__
161 #-- Menu8.new }
162
163 #-- Menu8 custom methods {
164 # Write your own methods here
165 #-- Menu8 custom methods }
166
167 #-- Menu8.on_copy2_activate {
168 def on_copy2_activate(self, widget, *args):
169 print "on_copy2_activate called with self.%s" % widget.get_name()
170 #-- Menu8.on_copy2_activate }
171
172 #-- Menu8.on_clear_all1_activate {
173 def on_clear_all1_activate(self, widget, *args):
174 print "on_clear_all1_activate called with self.%s" % widget.get_name()
175 #-- Menu8.on_clear_all1_activate }
176
177
178 #-- main {
179
180 def main():
181 mainwin = Mainwin()
182 #aboutwin = Aboutwin()
183 #errorwin = Errorwin()
184 menu8 = Menu8()
185
186 mainwin.run()
187
188 if __name__ == "__main__":
189 main()
190
191 #-- main }

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22