| Trees | Indices | Help |
|
|---|
|
|
1 # -*- coding: utf8 -*-
2 #====================================================================
3 # About GNUmed
4 #====================================================================
5 # $Source: /cvsroot/gnumed/gnumed/gnumed/client/wxpython/gmAbout.py,v $
6 # $Id: gmAbout.py,v 1.35 2010/02/06 20:54:54 ncq Exp $
7 __version__ = "$Revision: 1.35 $"
8 __author__ = "M.Bonert"
9 __license__ = "GPL"
10
11 import zlib, cPickle, sys
12
13
14 import wx
15
16
17 try:
18 _('dummy-no-need-to-translate-but-make-epydoc-happy')
19 except NameError:
20 _ = lambda x:x
21
22 ID_MENU = wx.NewId()
23 ID_EXIT = wx.NewId()
24 #====================================================================
26 """
27 Scrolling Text!
28 """
29
30 # control parameters
31 __scroll_speed=.3 # pixels/milliseconds (?)
32 __delay=500 # milliseconds
33 name_list = [
34 u'Dr Gerardo Arnaez',
35 u'Dr Hilmar Berger',
36 u'Michael Bonert',
37 u'Dr Elizabeth Dodd',
38 u'Dr David Guest',
39 u'Ian Haywood',
40 u'Dr Tony Lembke',
41 u'Dr Richard Terry',
42 u'Syan J Tan',
43 u'Andreas Tille',
44 u'Dr Carlos Moro',
45 u'Dr James Busser',
46 u'Dr Rogerio Luz',
47 u'Dr Sebastian Hilbert'
48 ]
49
50 # initializations
51 __scroll_ctr = +230
52 __name_ctr = 1
53 __delay_ctr = 1
54
56 wx.Window.__init__(self, parent, -1, size=(230,20), style=wx.SUNKEN_BORDER)
57 self.SetBackgroundColour(wx.Colour(255, 255, 255))
58 self.__delay_ctr_reset=self.__delay*self.__scroll_speed
59
60 self.moving_txt=wx.StaticText(self, -1, "", size=(230,20), style=wx.ALIGN_CENTRE | wx.ST_NO_AUTORESIZE)
61 self.moving_txt.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL))
62 self.moving_txt.SetLabel(self.name_list[0])
63
64 wx.EVT_TIMER(self, -1, self.OnTimer)
65 self.timer = wx.Timer(self, -1)
66 #self.timer.Start(self.__scroll_speed)
67 self.timer.Start(milliseconds = 1./self.__scroll_speed)
68
70 if(self.__scroll_ctr<-2 and self.__delay_ctr<self.__delay_ctr_reset):
71 # pause at centre
72 self.__delay_ctr=self.__delay_ctr+1
73 else:
74 self.__scroll_ctr=self.__scroll_ctr-1
75 self.moving_txt.MoveXY(self.__scroll_ctr, 0)
76 if(self.__scroll_ctr<-230):
77 # reset counters
78 self.__scroll_ctr=+230
79 self.__delay_ctr=1
80
81 # get next name in dict.
82 self.moving_txt.SetLabel(self.name_list[self.__name_ctr])
83 self.__name_ctr=self.__name_ctr+1
84 if(self.__name_ctr>len(self.name_list)-1):
85 self.__name_ctr=0
86
88 """
89 About GNUmed
90 """
91
92 icon_serpent='x\xdae\x8f\xb1\x0e\x83 \x10\x86w\x9f\xe2\x92\x1blb\xf2\x07\x96\xeaH:0\xd6\
93 \xc1\x85\xd5\x98N5\xa5\xef?\xf5N\xd0\x8a\xdcA\xc2\xf7qw\x84\xdb\xfa\xb5\xcd\
94 \xd4\xda;\xc9\x1a\xc8\xb6\xcd<\xb5\xa0\x85\x1e\xeb\xbc\xbc7b!\xf6\xdeHl\x1c\
95 \x94\x073\xec<*\xf7\xbe\xf7\x99\x9d\xb21~\xe7.\xf5\x1f\x1c\xd3\xbdVlL\xc2\
96 \xcf\xf8ye\xd0\x00\x90\x0etH \x84\x80B\xaa\x8a\x88\x85\xc4(U\x9d$\xfeR;\xc5J\
97 \xa6\x01\xbbt9\xceR\xc8\x81e_$\x98\xb9\x9c\xa9\x8d,y\xa9t\xc8\xcf\x152\xe0x\
98 \xe9$\xf5\x07\x95\x0cD\x95t:\xb1\x92\xae\x9cI\xa8~\x84\x1f\xe0\xa3ec'
99
100 - def __init__(self, parent, ID, title, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE, version='???'):
101 wx.Frame.__init__(self, parent, ID, title, pos, size, style)
102
103 icon = wx.EmptyIcon()
104 icon.CopyFromBitmap(wx.BitmapFromXPMData(cPickle.loads(zlib.decompress(self.icon_serpent))))
105 self.SetIcon(icon)
106
107 box = wx.BoxSizer(wx.VERTICAL)
108 if wx.Platform == '__WXMAC__':
109 box.Add((0,0), 2)
110 else:
111 box.Add((0,0), 2)
112 intro_txt=wx.StaticText(self, -1, _("Monty the Serpent && the FSF Present"))
113 intro_txt.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.NORMAL,False,''))
114 box.Add(intro_txt, 0, wx.ALIGN_CENTRE)
115 if wx.Platform == '__WXMAC__':
116 box.Add((0,0), 3)
117 else:
118 box.Add((0,0), 3)
119 gm_txt=wx.StaticText(self, -1, "GNUmed")
120 gm_txt.SetFont(wx.Font(30, wx.SWISS, wx.NORMAL, wx.NORMAL))
121 box.Add(gm_txt, 0, wx.ALIGN_CENTRE)
122
123 motto_txt=wx.StaticText(self, -1, _("Free eMedicine"))
124 motto_txt.SetFont(wx.Font(10,wx.SWISS,wx.NORMAL,wx.NORMAL,False,''))
125 box.Add(motto_txt, 0, wx.ALIGN_CENTRE)
126 if wx.Platform == '__WXMAC__':
127 box.Add((0,0), 4)
128 else:
129 box.Add((0,0), 4)
130 ver_txt=wx.StaticText(self, -1, _("Version %s brought to you by") % version)
131 ver_txt.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL))
132 box.Add(ver_txt, 0, wx.ALIGN_CENTRE)
133
134 admins_txt=wx.StaticText(self, -1, _("Drs Horst Herb && Karsten Hilbert"))
135 admins_txt.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL))
136 box.Add(admins_txt, 0, wx.ALIGN_CENTRE)
137
138 self.win=ScrollTxtWin(self)
139 box.Add(self.win, 0, wx.ALIGN_CENTRE)
140 if wx.Platform == '__WXMAC__':
141 box.Add((0,0), 1)
142 else:
143 box.Add((0,0), 1)
144 info_txt=wx.StaticText(self, -1, _("Please visit http://www.gnumed.org"))
145 info_txt.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL))
146 box.Add(info_txt, 0, wx.ALIGN_CENTRE)
147 if wx.Platform == '__WXMAC__':
148 box.Add((0,0), 1)
149 else:
150 box.Add((0,0), 1)
151 btn = wx.Button(self, ID_MENU , _("Close"))
152 box.Add(btn,0, wx.ALIGN_CENTRE)
153 if wx.Platform == '__WXMAC__':
154 box.Add((0,0), 1)
155 else:
156 box.Add((0,0), 1)
157 wx.EVT_BUTTON(btn, ID_MENU, self.OnClose)
158
159 self.SetAutoLayout(True)
160 self.SetSizer(box)
161 self.Layout()
162
166 #====================================================================
168 # people who don't want to be listed here:
169 # ...
170 contributors = _(
171 'The following people kindly contributed to GNUmed.\n'
172 'Please write to <gnumed-devel@gnu.org> to have your\n'
173 'contribution duly recognized in this list or to have\n'
174 'your name removed from it for, say, privacy reasons.\n\n'
175 'Note that this list is sorted alphabetically by last\n'
176 'name, first name. If the only identifier is an email\n'
177 'address it is sorted under the first character of\n'
178 'the user name.\n'
179 '%s'
180 ) % u"""
181 == B ===========================================
182
183 James Busser, MD
184 British Columbia
185
186 - test results handling
187 - documentation would be nothing without him
188 - encouragment
189 - testing on MacOSX
190
191 == F ===========================================
192
193 Joachim Fischer
194 GP Fischer + Lintz
195 Fachärzte Allgemeinmedizin
196 Wolfschlugen
197
198 - Karteieintragsarten passend für Deutschland
199
200 == H ===========================================
201
202 Sebastian Hilbert, MD
203
204 - packaging, PR
205
206 == L ===========================================
207
208 Steffi Leibner, Leipzig
209
210 - Testen, Fehlerberichte
211 - Dokumentenvorlage
212
213 Rogerio Luz, Brasil
214
215 - testing, bug reporting
216 - SOAP handling discussion
217 - providing LaTeX form templates
218
219 == N ===========================================
220
221 Clemens Nietfeld, Oldenburg
222
223 - Information zur Anbindung von DocConcept
224
225 == P ===========================================
226
227 Martin Preuss, Hamburg
228
229 - Chipkartenansteuerung
230
231 == R ===========================================
232
233 Thomas Reus, Düsseldorf
234
235 - Testen, Fehlerberichte
236 - Dokumentenvorlage
237
238 == T ===========================================
239
240 Andreas Tille, Wernigerode
241
242 - Debian packages
243 - encouragement, wisdom
244
245 """
246 #----------------------------------------------
248 wx.Dialog.__init__(self, *args, **kwargs)
249 contributor_listing = wx.TextCtrl (
250 self,
251 -1,
252 cContributorsDlg.contributors,
253 style = wx.TE_MULTILINE | wx.TE_READONLY,
254 size = wx.Size(500, 300)
255 )
256 # contributor_listing.SetFont(wx.Font(12, wx.MODERN, wx.NORMAL, wx.NORMAL))
257 # arrange widgets
258 szr_outer = wx.BoxSizer(wx.VERTICAL)
259 szr_outer.Add(contributor_listing, 1, wx.EXPAND, 0)
260 # and do layout
261 self.SetAutoLayout(1)
262 self.SetSizerAndFit(szr_outer)
263 szr_outer.SetSizeHints(self)
264 self.Layout()
265 #====================================================================
266 # Main
267 #====================================================================
268 if __name__ == '__main__':
269 # set up dummy app
272 frame = AboutFrame(None, -1, u"About GNUmed", size=wx.Size(300, 250))
273 frame.Show(1)
274 return 1
275 #---------------------
276 if len(sys.argv) > 1 and sys.argv[1] == 'test':
277 app = TestApp()
278 app.MainLoop()
279
280 #------------------------------------------------------------
281 # $Log: gmAbout.py,v $
282 # Revision 1.35 2010/02/06 20:54:54 ncq
283 # - fix Jim's entry
284 #
285 # Revision 1.34 2010/01/21 08:41:56 ncq
286 # - properly acknowledge Rogerio
287 #
288 # Revision 1.33 2010/01/13 21:51:00 ncq
289 # - adjust supporters
290 #
291 # Revision 1.32 2009/01/15 11:35:06 ncq
292 # - cleanup
293 #
294 # Revision 1.31 2008/09/09 20:18:06 ncq
295 # - cleanup
296 #
297 # Revision 1.30 2008/07/28 20:41:58 ncq
298 # - support version in about box
299 #
300 # Revision 1.29 2007/09/20 19:34:04 ncq
301 # - cleanup
302 #
303 # Revision 1.28 2007/09/10 12:35:08 ncq
304 # - make accessible to epydoc
305 #
306 # Revision 1.27 2007/08/29 14:37:00 ncq
307 # - add Clemens Nietfeld
308 #
309 # Revision 1.26 2007/08/20 14:22:24 ncq
310 # - add more helpful people
311 #
312 # Revision 1.25 2006/10/23 15:48:07 ncq
313 # - fix unicode/latin1 string issue
314 #
315 # Revision 1.24 2005/12/27 18:46:20 ncq
316 # - define _()
317 #
318 # Revision 1.23 2005/12/24 10:27:42 shilbert
319 # - gui fixes
320 #
321 # Revision 1.22 2005/11/27 14:29:27 shilbert
322 # - more wx24 --> wx26 cleanup
323 #
324 # Revision 1.21 2005/09/28 21:27:30 ncq
325 # - a lot of wx2.6-ification
326 #
327 # Revision 1.20 2005/09/28 15:57:47 ncq
328 # - a whole bunch of wx.Foo -> wx.Foo
329 #
330 # Revision 1.19 2005/09/27 20:44:58 ncq
331 # - wx.wx* -> wx.*
332 #
333 # Revision 1.18 2005/09/26 18:01:50 ncq
334 # - use proper way to import wx26 vs wx2.4
335 # - note: THIS WILL BREAK RUNNING THE CLIENT IN SOME PLACES
336 # - time for fixup
337 #
338 # Revision 1.17 2005/07/24 11:35:59 ncq
339 # - use robustified gmTimer.Start() interface
340 #
341 # Revision 1.16 2005/07/18 20:45:25 ncq
342 # - make contributors dialog slightly larger
343 #
344 # Revision 1.15 2005/07/11 16:16:21 ncq
345 # - display contributor dialog in a proper size
346 #
347 # Revision 1.14 2005/07/11 09:04:27 ncq
348 # - add contributors dialog
349 #
350 # Revision 1.13 2005/07/02 18:19:01 ncq
351 # - one more GnuMed -> GNUmed
352 #
353 # Revision 1.12 2005/06/30 10:05:47 cfmoro
354 # String corrections
355 #
356 # Revision 1.11 2005/06/21 04:57:12 rterry
357 # fix this to run under wxPython26
358 # -e.g incorrect sizer attributes
359 #
360 # Revision 1.10 2005/05/30 09:20:51 ncq
361 # - add Carlos Moro
362 #
363 # Revision 1.9 2004/07/18 20:30:53 ncq
364 # - wxPython.true/false -> Python.True/False as Python tells us to do
365 #
366 # Revision 1.8 2004/06/30 15:56:14 shilbert
367 # - more wxMAC fixes -they don't stop surfacing :-)
368 #
369 # Revision 1.7 2003/11/17 10:56:37 sjtan
370 #
371 # synced and commiting.
372 #
373 # Revision 1.1 2003/10/23 06:02:39 sjtan
374 #
375 # manual edit areas modelled after r.terry's specs.
376 #
377 # Revision 1.6 2003/05/17 18:18:19 michaelb
378 # added $Log statement
379 #
380 # 30/01/03: inital version
381
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Feb 9 04:01:45 2010 | http://epydoc.sourceforge.net |