From: Kevin A. <ka...@us...> - 2004-07-30 14:17:40
|
Update of /cvsroot/pythoncard/PythonCard/samples/moderator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17954 Modified Files: moderator.py moderator.rsrc.py Log Message: modified layout to work better on Mac, added AddSpeaker button Index: moderator.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/moderator/moderator.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** moderator.py 5 May 2004 16:53:27 -0000 1.3 --- moderator.py 30 Jul 2004 14:17:31 -0000 1.4 *************** *** 7,15 **** import sys ! from PythonCard import model, timer # maximum time per speaker in seconds ! MAX_TIME = 180 ! DELEGATE_FILE = "delegates.txt" class Moderator(model.Background): --- 7,15 ---- import sys ! from PythonCard import dialog, model, timer # maximum time per speaker in seconds ! MAX_TIME = 5 * 60 ! #MAX_TIME = 180 DELEGATE_FILE = "delegates.txt" class Moderator(model.Background): *************** *** 86,89 **** --- 86,99 ---- self.components.txtTime.text = self.clockModel.readout() + def on_btnAddSpeaker_mouseClick(self, event): + result = dialog.textEntryDialog(self, 'Add Speaker', 'Speaker:', 'First Last') + if result['accepted']: + #returned = result['returned'] + text = result['text'] + #self.components.lstDelegates.append(text) + self.delegates.add(text.strip()) + self.update() + + class CountdownClockModel: def __init__(self, max): Index: moderator.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/moderator/moderator.rsrc.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** moderator.rsrc.py 10 May 2004 05:02:20 -0000 1.3 --- moderator.rsrc.py 30 Jul 2004 14:17:31 -0000 1.4 *************** *** 25,28 **** --- 25,35 ---- 'components': [ + {'type':'Button', + 'name':'btnAddSpeaker', + 'position':(250, 539), + 'size':(151, -1), + 'label':'Add Speaker', + }, + {'type':'List', 'name':'lstDelegates', *************** *** 44,69 **** 'name':'btnPause', 'position':(106, 91), ! 'size':(99, 38), ! 'font':{'faceName': 'Microsoft Sans Serif', 'family': 'sansSerif', 'size': 16}, 'label':'Pause', }, - {'type':'StaticBox', - 'name':'StaticBox3', - 'position':(6, 138), - 'size':(421, 410), - }, - - {'type':'StaticBox', - 'name':'StaticBox1', - 'position':(6, -4), - 'size':(421, 150), - }, - {'type':'Button', 'name':'btnNext', 'position':(244, 90), ! 'size':(151, 38), ! 'font':{'faceName': 'Microsoft Sans Serif', 'family': 'sansSerif', 'size': 16}, 'label':'Next Speaker', }, --- 51,62 ---- 'name':'btnPause', 'position':(106, 91), ! 'size':(99, -1), 'label':'Pause', }, {'type':'Button', 'name':'btnNext', 'position':(244, 90), ! 'size':(151, -1), 'label':'Next Speaker', }, *************** *** 85,89 **** 'position':(16, 23), 'size':(378, 43), ! 'editable':0, 'font':{'faceName': 'Microsoft Sans Serif', 'family': 'sansSerif', 'size': 22}, }, --- 78,82 ---- 'position':(16, 23), 'size':(378, 43), ! 'editable':False, 'font':{'faceName': 'Microsoft Sans Serif', 'family': 'sansSerif', 'size': 22}, }, *************** *** 91,95 **** {'type':'StaticText', 'name':'lblSpeaking', ! 'position':(17, 7), 'text':'Now Speaking:', }, --- 84,88 ---- {'type':'StaticText', 'name':'lblSpeaking', ! 'position':(17, -1), 'text':'Now Speaking:', }, *************** *** 98,102 **** 'name':'lblTimeLeft', 'position':(18, 71), ! 'size':(203, 11), 'text':'Time Left:', }, --- 91,95 ---- 'name':'lblTimeLeft', 'position':(18, 71), ! 'size':(203, -1), 'text':'Time Left:', }, *************** *** 106,110 **** 'position':(16, 89), 'size':(79, 42), ! 'editable':0, 'font':{'faceName': 'Microsoft Sans Serif', 'family': 'sansSerif', 'size': 24}, 'text':'3:00', --- 99,103 ---- 'position':(16, 89), 'size':(79, 42), ! 'editable':False, 'font':{'faceName': 'Microsoft Sans Serif', 'family': 'sansSerif', 'size': 24}, 'text':'3:00', |