File: ttest.py

package info (click to toggle)
teg 0.11.2%2Bdebian-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny, squeeze
  • size: 11,484 kB
  • ctags: 7,108
  • sloc: ansic: 16,775; sh: 8,559; python: 1,442; xml: 490; makefile: 385
file content (43 lines) | stat: -rw-r--r-- 1,186 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
###############################################################################################
# $Id: ttest.py,v 1.1 2003/09/14 04:31:39 riq Exp $
###############################################################################################

import pygame
from pygame.locals import *
import twidget
from tbutton          import TButton
from twidget_manager  import TWidgetManager
from tdialog          import *
import theme

class TTest(TDialog):

    def __init__ (self):
        "Creates the dialog."
        # init superclass
        TDialog.__init__ (self, TWidgetManager.sdl_surface)


    def createWidgets (self):
        "Creates all widgets for the dialog."

        # create the cancel button
        self.wm.register ( TButton ( 'Connect', theme.Theme.loadImage('icon_connect.png'), {twidget.MOUSEBUTTONUP : self.ok } ) )



    def ok (self, trigger, event):
        """Callback triggered when the user clicks the 'Ok' button. Simply closes the dialog and
        returns to the main dialog."""

        # we're cancelling the dialog
        self.state = ACCEPTED
        
        return twidget.DONE



#  Local Variables:
#  mode: auto-fill
#  fill-column: 100
#  End: