01:
02:
03:
04:
05:
06:
07:
08:
09: reloadables=[]
10:
11:
12:
13: import sys,os
14: import gtk,gtk.glade,gobject
15:
16:
17:
18: widgets=gtk.glade.XML(os.path.join(sys.path[0],'glade/timesheet.pyscore.glade'))
19:
20: widgets.get_widget('vbox1').set_focus_chain((
21: widgets.get_widget('hbox1'),
22: widgets.get_widget('hbox7'),
23: ))
24:
25: widgets.get_widget('hbox1').set_focus_chain((
26: widgets.get_widget('frame1'),
27: widgets.get_widget('frame2'),
28: widgets.get_widget('frame3'),
29: widgets.get_widget('frame4'),
30: ))
31:
32: widgets.get_widget('hbox7').set_focus_chain((
33: widgets.get_widget('entry5'),
34: ))
35:
36:
37:
38: widgets.signal_autoconnect({
39: "gtk_main_quit": lambda *x: gtk.main_quit(),
40: "on_quit1_activate": lambda *x: gtk.main_quit(),
41: })
42:
43:
44:
45: entrywindow=widgets.get_widget('window1')
46: entrywindow.connect("delete-event", lambda *x: gtk.main_quit())
47:
48:
49:
50: entryview=widgets.get_widget('treeview1')
51: enterbutton=widgets.get_widget('button1')
52: entrybox=[widgets.get_widget('entry'+x) for x in "12345"]
53:
54: completions=entrybox[0:4]+[entryview]
55: compbook=widgets.get_widget('notebook1')
56: compview=[widgets.get_widget('treeview'+x) for x in "2345678"]
57: summary=widgets.get_widget('vbox3')
58: complabel=[widgets.get_widget('label'+x) for x in "56789"]
59:
60: entryview.set_property("can-focus",True)
61: enterbutton.set_property("can-focus",False)
62: enterbutton.set_property("can-default",True)
63: enterbutton.set_property("has-default",True)
64: for eb in entrybox:
65: eb.set_property("can-focus",True)
66: eb.set_property("activates-default",True)
67: compbook.set_property("can-focus",False)
68: for cv in compview: cv.set_property("can-focus",False)
69: for cl in complabel: cl.set_property("can-focus",False)
70:
71: compcheckbuttontoggle=[widgets.get_widget('checkbutton'+x) for x in "123456"]
72:
73:
PyScore
A badly written regatta scoring programme in Python and PyGtk.
register
relational
standing
tabulate
timesheet
treemodel
utility
Copyright 2004, M.E.J.Draisey
This file is part of pyscore.
pyscore is free software; you can redistribute it and/or modify it under
the terms of the GNU General
Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
pyscore is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pyscore; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Formatted with
GNU source-highlight:
http:// www.gnu.org/ software/ src-highlite