You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(45) |
May
(185) |
Jun
|
Jul
(36) |
Aug
(205) |
Sep
(98) |
Oct
(107) |
Nov
(6) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
(2) |
Mar
(19) |
Apr
(26) |
May
(18) |
Jun
|
Jul
(12) |
Aug
(16) |
Sep
(22) |
Oct
(7) |
Nov
(11) |
Dec
(74) |
2006 |
Jan
(14) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(14) |
Jun
(5) |
Jul
(20) |
Aug
(10) |
Sep
(1) |
Oct
|
Nov
(4) |
Dec
(1) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(14) |
Aug
|
Sep
|
Oct
(6) |
Nov
(1) |
Dec
|
From: Kevin A. <ka...@us...> - 2004-05-09 23:58:19
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9019/components Modified Files: combobox.py Log Message: fixed rogue lines ending in just a carriage return Index: combobox.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/combobox.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** combobox.py 4 May 2004 17:15:42 -0000 1.26 --- combobox.py 9 May 2004 23:58:08 -0000 1.27 *************** *** 98,102 **** # Mac ComboBox is missing SetStringSelection if wx.Platform == '__WXMAC__': ! def _setStringSelection(self, s): self.SetSelection(self.FindString(s)) stringSelection = property(ContainerMixin._getStringSelection, _setStringSelection) --- 98,103 ---- # Mac ComboBox is missing SetStringSelection if wx.Platform == '__WXMAC__': ! def _setStringSelection(self, s): ! self.SetSelection(self.FindString(s)) stringSelection = property(ContainerMixin._getStringSelection, _setStringSelection) |
From: Kevin A. <ka...@us...> - 2004-05-09 19:47:07
|
Update of /cvsroot/pythoncard/PythonCard/samples/fpop In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20248/samples/fpop Modified Files: emailfilter.py Log Message: converted tabs to spaces or deleted rogue lines Index: emailfilter.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/fpop/emailfilter.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** emailfilter.py 25 Sep 2003 18:29:28 -0000 1.4 --- emailfilter.py 9 May 2004 19:46:05 -0000 1.5 *************** *** 93,100 **** """ Content-Type: application/octet-stream; ! name="document_all.pif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; ! filename="document_all.pif" """ def isVirus(message): --- 93,100 ---- """ Content-Type: application/octet-stream; ! name="document_all.pif" Content-Transfer-Encoding: base64 Content-Disposition: attachment; ! filename="document_all.pif" """ def isVirus(message): |
From: Kevin A. <ka...@us...> - 2004-05-09 19:46:45
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20248 Modified Files: debug.py model.py turtle.py Log Message: converted tabs to spaces or deleted rogue lines Index: debug.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/debug.py,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** debug.py 5 May 2004 03:51:53 -0000 1.129 --- debug.py 9 May 2004 19:46:05 -0000 1.130 *************** *** 100,104 **** self.maxSizeMsgHistory = 29000 ! #self.maxSizeMsgHistory = 0 # Turn off # eventually, the font size should be settable in the user config --- 100,104 ---- self.maxSizeMsgHistory = 29000 ! #self.maxSizeMsgHistory = 0 # Turn off # eventually, the font size should be settable in the user config Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -d -r1.167 -r1.168 *** model.py 9 May 2004 18:50:58 -0000 1.167 --- model.py 9 May 2004 19:46:05 -0000 1.168 *************** *** 5,9 **** """ ! import os, sys, copy # some things might work with lesser # versions, but this is a reasonable base --- 5,9 ---- """ ! import os, sys # some things might work with lesser # versions, but this is a reasonable base *************** *** 411,415 **** log.debug('Initializing Background...') self._stack = Stack(self, self.resource) ! bg = self._stack.getBackgrounds()[0] self.showPropertyEditor() --- 411,415 ---- log.debug('Initializing Background...') self._stack = Stack(self, self.resource) ! ## bg = self._stack.getBackgrounds()[0] self.showPropertyEditor() *************** *** 594,598 **** def getBackgrounds( self ) : ! return copy.copy( self.backgrounds ) def getName( self ) : --- 594,599 ---- def getBackgrounds( self ) : ! ## return copy.copy( self.backgrounds ) ! return self.backgrounds def getName( self ) : Index: turtle.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/turtle.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** turtle.py 9 May 2004 16:26:24 -0000 1.17 --- turtle.py 9 May 2004 19:46:05 -0000 1.18 *************** *** 65,69 **** self._invradian = math.pi / (fullcircle * 0.5) ! # illegal syntax, so I used None and the if tests instead #def plot(self, x=self._position[0], y=self._position[1]): def plot(self, x=None, y=None): --- 65,69 ---- self._invradian = math.pi / (fullcircle * 0.5) ! # illegal syntax, so I used None and the if tests instead #def plot(self, x=self._position[0], y=self._position[1]): def plot(self, x=None, y=None): *************** *** 563,567 **** if self._dirty and self._turtleDelay > 0: time.sleep(self._turtleDelay) - #for j in range(1000000): pass # huge delay so we can see the turtle def reset(self): --- 563,566 ---- |
From: Kevin A. <ka...@us...> - 2004-05-09 19:46:39
|
Update of /cvsroot/pythoncard/PythonCard/samples/rpn In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20248/samples/rpn Modified Files: rpn.py Log Message: converted tabs to spaces or deleted rogue lines Index: rpn.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/rpn/rpn.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** rpn.py 5 May 2004 16:53:44 -0000 1.8 --- rpn.py 9 May 2004 19:46:24 -0000 1.9 *************** *** 19,95 **** def __init__(self): ! ''' Initialize stack and registers ''' # init stack T, Z, Y, X , top of stack is at the right side ! self._emptyStack = [0.0, 0.0, 0.0, 0.0] ! self._stackData = self._emptyStack # new_data_flag is set when the first new character is entered for a value self.clr_flag() # create a list for all 10 Storage Registers, initialize to 0 ! self._mem = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] def display(self): ! ''' display stack and memory data ''' ! print "\nStack: ", self._stackData ! print "Mem: ", self._mem, "\n" ! def stackSize(self): ! ''' make sure stack has at least 4 elements ''' ! while len(self._stackData) < 5: ! self.display() ! self._stackData.insert(0,0.0) ! # Stack functions def rotate(self): ! ''' rotate top 4 elements of stack ''' ! self.stackSize() ! # remove top 4 elements, then add back to stack in reverse order self._X = self._stackData.pop() ! self._Y = self._stackData.pop() ! self._Z = self._stackData.pop() self._T = self._stackData.pop() ! self._stackData.append(self._X) ! self._stackData.append(self._T) ! self._stackData.append(self._Z) ! self._stackData.append(self._Y) ! def push(self, value): ! ''' add value to top of stack ''' self._stackData.append(float(value)) def pop(self): ! ''' remove and return top of stack - X ''' ! self.stackSize() ! return self._stackData.pop() def readX(self): ! ''' return the top of stack, X, no change to stack ''' ! return self._stackData[-1:][0] def swap(self): ! ''' swap X and Y ''' ! self.stackSize() self._X = self._stackData.pop() self._Y = self._stackData.pop() ! self._stackData.append(self._X) ! self._stackData.append(self._Y) def add(self): ''' X = X + Y ''' ! self.stackSize() self._stackData.append(self._stackData.pop() + self._stackData.pop()) def subtract(self): ''' X = Y - X ''' ! self.stackSize() self._stackData.append( - (self._stackData.pop()) + self._stackData.pop()) def multiply(self): ''' X = X * Y ''' ! self.stackSize() self._stackData.append(self._stackData.pop() * self._stackData.pop()) def divide(self): ''' X = Y / X ''' ! self.stackSize() self._X = self._stackData.pop() self._Y = self._stackData.pop() --- 19,95 ---- def __init__(self): ! ''' Initialize stack and registers ''' # init stack T, Z, Y, X , top of stack is at the right side ! self._emptyStack = [0.0, 0.0, 0.0, 0.0] ! self._stackData = self._emptyStack # new_data_flag is set when the first new character is entered for a value self.clr_flag() # create a list for all 10 Storage Registers, initialize to 0 ! self._mem = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] def display(self): ! ''' display stack and memory data ''' ! print "\nStack: ", self._stackData ! print "Mem: ", self._mem, "\n" ! def stackSize(self): ! ''' make sure stack has at least 4 elements ''' ! while len(self._stackData) < 5: ! self.display() ! self._stackData.insert(0,0.0) ! # Stack functions def rotate(self): ! ''' rotate top 4 elements of stack ''' ! self.stackSize() ! # remove top 4 elements, then add back to stack in reverse order self._X = self._stackData.pop() ! self._Y = self._stackData.pop() ! self._Z = self._stackData.pop() self._T = self._stackData.pop() ! self._stackData.append(self._X) ! self._stackData.append(self._T) ! self._stackData.append(self._Z) ! self._stackData.append(self._Y) ! def push(self, value): ! ''' add value to top of stack ''' self._stackData.append(float(value)) def pop(self): ! ''' remove and return top of stack - X ''' ! self.stackSize() ! return self._stackData.pop() def readX(self): ! ''' return the top of stack, X, no change to stack ''' ! return self._stackData[-1:][0] def swap(self): ! ''' swap X and Y ''' ! self.stackSize() self._X = self._stackData.pop() self._Y = self._stackData.pop() ! self._stackData.append(self._X) ! self._stackData.append(self._Y) def add(self): ''' X = X + Y ''' ! self.stackSize() self._stackData.append(self._stackData.pop() + self._stackData.pop()) def subtract(self): ''' X = Y - X ''' ! self.stackSize() self._stackData.append( - (self._stackData.pop()) + self._stackData.pop()) def multiply(self): ''' X = X * Y ''' ! self.stackSize() self._stackData.append(self._stackData.pop() * self._stackData.pop()) def divide(self): ''' X = Y / X ''' ! self.stackSize() self._X = self._stackData.pop() self._Y = self._stackData.pop() *************** *** 98,102 **** else: self._X = None ! self._stackData.append(self._X) # memory operations --- 98,102 ---- else: self._X = None ! self._stackData.append(self._X) # memory operations *************** *** 156,160 **** self.components.result.text = "ERROR" self._stack.clr_flag() ! self._stack.display() def on_InvertBtn_mouseClick(self, event): --- 156,160 ---- self.components.result.text = "ERROR" self._stack.clr_flag() ! self._stack.display() def on_InvertBtn_mouseClick(self, event): *************** *** 164,171 **** self._stack.push( 1 / self._stack.pop() ) else: ! self.stack.pop() self._stack.push(None) self.components.result.text = str(self._stack.readX()) ! self._stack.display() def on_ROTBtn_mouseClick(self, event): --- 164,171 ---- self._stack.push( 1 / self._stack.pop() ) else: ! self.stack.pop() self._stack.push(None) self.components.result.text = str(self._stack.readX()) ! self._stack.display() def on_ROTBtn_mouseClick(self, event): *************** *** 174,178 **** # put X back into the result box self.components.result.text = str(self._stack.readX()) ! self._stack.display() --- 174,178 ---- # put X back into the result box self.components.result.text = str(self._stack.readX()) ! self._stack.display() *************** *** 182,186 **** # put X back into the result box self.components.result.text = str(self._stack.readX()) ! self._stack.display() --- 182,186 ---- # put X back into the result box self.components.result.text = str(self._stack.readX()) ! self._stack.display() *************** *** 196,200 **** # put X back into the result box self.components.result.text = str(self._stack.readX()) ! self._stack.display() def on_MinusBtn_mouseClick(self, event): --- 196,200 ---- # put X back into the result box self.components.result.text = str(self._stack.readX()) ! self._stack.display() def on_MinusBtn_mouseClick(self, event): *************** *** 203,207 **** # put X back into the result box self.components.result.text = str(self._stack.readX()) ! self._stack.display() --- 203,207 ---- # put X back into the result box self.components.result.text = str(self._stack.readX()) ! self._stack.display() *************** *** 211,215 **** # put X back into the result box self.components.result.text = str(self._stack.readX()) ! self._stack.display() --- 211,215 ---- # put X back into the result box self.components.result.text = str(self._stack.readX()) ! self._stack.display() *************** *** 223,228 **** else: self.components.result.text = "Divide by Zero Error" ! self._stack.display() ! def on_CHSBtn_mouseClick(self, event): --- 223,228 ---- else: self.components.result.text = "Divide by Zero Error" ! self._stack.display() ! def on_CHSBtn_mouseClick(self, event): *************** *** 232,236 **** self._stack.push( -1.0 * self._stack.pop() ) self.components.result.text = str(self._stack.readX()) ! self._stack.display() # storage register operations --- 232,236 ---- self._stack.push( -1.0 * self._stack.pop() ) self.components.result.text = str(self._stack.readX()) ! self._stack.display() # storage register operations *************** *** 247,251 **** # register is a non-integer print "ERROR - Non-integer value given for register" ! self._stack.display() --- 247,251 ---- # register is a non-integer print "ERROR - Non-integer value given for register" ! self._stack.display() *************** *** 260,264 **** print "ERROR - Non-integer value given for register" return ! self._stack.display() # misc --- 260,264 ---- print "ERROR - Non-integer value given for register" return ! self._stack.display() # misc |
From: Kevin A. <ka...@us...> - 2004-05-09 19:46:39
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20248/tools/resourceEditor Modified Files: resourceEditor.py Log Message: converted tabs to spaces or deleted rogue lines Index: resourceEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.py,v retrieving revision 1.191 retrieving revision 1.192 diff -C2 -d -r1.191 -r1.192 *** resourceEditor.py 9 May 2004 03:58:03 -0000 1.191 --- resourceEditor.py 9 May 2004 19:46:25 -0000 1.192 *************** *** 154,158 **** (wx.ACCEL_CTRL, ord('C'), self.menuBar.getMenuId('menuEditCopy')), (wx.ACCEL_CTRL, ord('X'), self.menuBar.getMenuId('menuEditCut')), ! (wx.ACCEL_CTRL, ord('V'), self.menuBar.getMenuId('menuEditPaste')) ]) self.SetAcceleratorTable(acctbl) --- 154,158 ---- (wx.ACCEL_CTRL, ord('C'), self.menuBar.getMenuId('menuEditCopy')), (wx.ACCEL_CTRL, ord('X'), self.menuBar.getMenuId('menuEditCut')), ! (wx.ACCEL_CTRL, ord('V'), self.menuBar.getMenuId('menuEditPaste')) ]) self.SetAcceleratorTable(acctbl) |
From: Kevin A. <ka...@us...> - 2004-05-09 19:46:39
|
Update of /cvsroot/pythoncard/PythonCard/samples/textRouter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20248/samples/textRouter Modified Files: setup.py Log Message: converted tabs to spaces or deleted rogue lines Index: setup.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/textRouter/setup.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** setup.py 26 Mar 2004 16:37:37 -0000 1.3 --- setup.py 9 May 2004 19:46:25 -0000 1.4 *************** *** 6,10 **** console = ["textRouter.py"], data_files = [ ("docs", ! ["docs/textRouter_help.html", "docs/readme.html"]), (".", ["strings.txt", "readme.txt", "textRouter.rsrc.py", --- 6,10 ---- console = ["textRouter.py"], data_files = [ ("docs", ! ["docs/textRouter_help.html", "docs/readme.html"]), (".", ["strings.txt", "readme.txt", "textRouter.rsrc.py", |
From: Kevin A. <ka...@us...> - 2004-05-09 18:51:07
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8989 Modified Files: event.py model.py Log Message: moved background events from event.py to model.py except IdleEvent fiuxed InsteadOfTypeEvent classes updated Background to use _bindEvents and _dispatch from Widget class added OnClose event handler so that the activate event could be unbound when the background is closed to prevent an exception being thrown when _dispatch tries use the handler of a deleted background added comments about Scriptable and bound/unbound method issues Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -d -r1.166 -r1.167 *** model.py 6 May 2004 17:33:13 -0000 1.166 --- model.py 9 May 2004 18:50:58 -0000 1.167 *************** *** 182,185 **** --- 182,264 ---- self.SetEventType(wxEVT_LATENT_BACKGROUNDBIND) + # background events + + class ActivateEvent(event.Event, event.InsteadOfTypeEvent): + name = 'activate' + binding = wx.EVT_ACTIVATE + id = wx.wxEVT_ACTIVATE + + def translateEventType(self, aWxEvent): + if aWxEvent.GetActive(): + return self.id + else: + return DeactivateEvent.id + + class DeactivateEvent(ActivateEvent): + name = 'deactivate' + id = wx.NewEventType() + + class CloseEvent(event.Event): + name = 'close' + binding = wx.EVT_CLOSE + id = wx.wxEVT_CLOSE_WINDOW + + class MaximizeEvent(event.Event): + name = 'maximize' + binding = wx.EVT_MAXIMIZE + id = wx.wxEVT_MAXIMIZE + + def decorate(self, aWxEvent, source): + aWxEvent = event.Event.decorate(self, aWxEvent, source) + aWxEvent.maximized = aWxEvent.target.IsMaximized() + return aWxEvent + + class MinimizeEvent(event.Event, event.InsteadOfTypeEvent): + name = 'minimize' + binding = wx.EVT_ICONIZE + id = wx.wxEVT_ICONIZE + + def translateEventType(self, aWxEvent): + if aWxEvent.Iconized(): + return self.id + else: + return RestoreEvent.id + + class RestoreEvent(MinimizeEvent): + name = 'restore' + id = wx.NewEventType() + + class MoveEvent(event.Event): + name = 'move' + binding = wx.EVT_MOVE + id = wx.wxEVT_MOVE + + def decorate(self, aWxEvent, source): + aWxEvent = event.Event.decorate(self, aWxEvent, source) + aWxEvent.position = tuple(aWxEvent.GetPosition()) + return aWxEvent + + class SizeEvent(event.Event): + name = 'size' + binding = wx.EVT_SIZE + id = wx.wxEVT_SIZE + + def decorate(self, aWxEvent, source): + aWxEvent = event.Event.decorate(self, aWxEvent, source) + aWxEvent.size = tuple(aWxEvent.GetSize()) + return aWxEvent + + BackgroundEvents = ( + ActivateEvent, + CloseEvent, + DeactivateEvent, + event.IdleEvent, + MaximizeEvent, + MinimizeEvent, + MoveEvent, + RestoreEvent, + SizeEvent, + ) + class Application(wx.App): *************** *** 395,399 **** --- 474,486 ---- # using the inspect module pythoncardMethods = [] + # KEA 2004-05-09 + # if we use bound methods then we'll have to change the + # initialization order so that Scriptable.__init__ + # is done after the object is actually created + # all _dispatch methods have to be updated to use bound + # methods if this is changed methods = inspect.getmembers(self.__class__, inspect.ismethod) + ## # use bound methods instead of the class unbound methods + ## methods = inspect.getmembers(self, inspect.ismethod) for m in methods: if m[0].split('_')[0] == 'on': *************** *** 533,537 **** self.menuBar = None self.statusBar = None - self._exiting = False # override for application defined position --- 620,623 ---- *************** *** 628,761 **** ! # KEA 2004-04-28 ! # experimental alternative implementation of ! # OnLatentBackgroundBind and _dispatch ! def OnLatentBackgroundBind(self, evt): ! if self.stack.app.mw: bindUnusedEvents = True else: bindUnusedEvents = False - - self.eventIdToHandler = {} ! # this is actually slightly evil because dictionary keys ! # are supposed to be immutable, but you can change classes ! # and the same class imported into a different namespace ! # would be different, so for now I just made this a local variable ! # which is probably okay compared to keeping a reference around in self ! wxRegistry = {event.IdleEvent:(wx.EVT_IDLE, wx.wxEVT_IDLE), ! event.MoveEvent:(wx.EVT_MOVE, wx.wxEVT_MOVE), ! event.SizeEvent:(wx.EVT_SIZE, wx.wxEVT_SIZE), ! event.MinimizeEvent:(wx.EVT_ICONIZE, wx.wxEVT_ICONIZE), ! event.MaximizeEvent:(wx.EVT_MAXIMIZE, wx.wxEVT_MAXIMIZE), ! event.ActivateEvent:(wx.EVT_ACTIVATE, wx.wxEVT_ACTIVATE), ! event.CloseEvent:(wx.EVT_CLOSE, wx.wxEVT_CLOSE_WINDOW)} self.wxEventIdMap = {} ! for key in wxRegistry: ! value = wxRegistry[key] ! self.wxEventIdMap[value[1]] = key ! # helper variable to simplify test for whether to bind virtual events ! boundEvents = [] ! ! # once we aren't using a registry this will be a bit easier to ! # decipher compared to having to index into wxRegistry ! for eventClass in wxRegistry: ! handler = self.findHandler('on_' + eventClass.name) if handler or bindUnusedEvents: ! # only bind events that have an event handler ! # in this scenario unused events are never bound ! # which is more efficient, but the Message Watcher needs ! # to be changed ! # alternatively we can bind everything and then in _dispatch ! # if there isn't a match in eventIdToHandler then we know ! # the event isn't used and we can set used to False ! # the complication would be that we probably have to have to ! # always call Skip() which may or may not be a hassle with components ! self.Bind(wxRegistry[eventClass][0], self._dispatch) ! boundEvents.append(eventClass) if handler: if 0: ! print "binding", eventClass.name, handler.__name__, wxRegistry[eventClass][1] ! self.eventIdToHandler[wxRegistry[eventClass][1]] = handler ! # deactivate is a special case ! # as far as wxPython is concerned it is an activate event ! # so if we've already bound that to _dispatch we don't want ! # to bind it twice ! # if we have an on_deactivate event handler though we need to record ! # that separately for dispatch in eventIdToHandler ! # we'll have the same issue with other "virtual" events like mouseDrag ! handler = self.findHandler('on_' + event.DeactivateEvent.name) ! if handler or bindUnusedEvents: ! if not event.ActivateEvent in boundEvents: ! self.Bind(wxRegistry[event.ActivateEvent][0], self._dispatch) ! if handler: ! # there is no such thing as a deactivate event id, so just use the name ! self.eventIdToHandler[event.DeactivateEvent.name] = handler ! handler = self.findHandler('on_' + event.RestoreEvent.name) ! # now do the same kind of thing for restore ! if handler or bindUnusedEvents: ! if not event.MinimizeEvent in boundEvents: ! self.Bind(wxRegistry[event.MinimizeEvent][0], self._dispatch) ! if handler: ! self.eventIdToHandler[event.RestoreEvent.name] = handler if 0: ! print "\nboundEvents:" ! for evt in boundEvents: ! print " ", evt.name print "\n\n" ! print "\nself.eventIdToHandler:" for id in self.eventIdToHandler: ! print " ", id, self.eventIdToHandler[id]._function print "\n\n" ! # is this cleanup necessary ! # it would be a pain to have to ! # do this everywhere ! handler = None ! boundEvents = None ! def _dispatch(self, aWxEvent): eventType = aWxEvent.GetEventType() ! try: ! # All events should have GetEventObject(). ! aWxEvent.target = aWxEvent.eventObject = aWxEvent.GetEventObject() ! except: ! pass ! eventName = None ! if eventType == wx.wxEVT_MOVE: ! aWxEvent.position = tuple(aWxEvent.GetPosition()) ! elif eventType == wx.wxEVT_SIZE: ! aWxEvent.size = tuple(aWxEvent.GetSize()) ! elif eventType == wx.wxEVT_ICONIZE: ! #aWxEvent.minimized = aWxEvent.Iconized() ! minimized = aWxEvent.Iconized() ! if not minimized: ! eventType = event.RestoreEvent.name ! eventName = event.RestoreEvent.name ! elif eventType == wx.wxEVT_MAXIMIZE: ! aWxEvent.maximized = aWxEvent.target.IsMaximized() ! elif eventType == wx.wxEVT_ACTIVATE and not aWxEvent.GetActive(): ! eventType = event.DeactivateEvent.name ! eventName = event.DeactivateEvent.name ! if not eventName: ! eventName = self.wxEventIdMap[eventType].name ! if self._exiting: ! # Don't display messages when quitting the app ! # the Message Watcher may no longer exist ! # and will cause Python to crash. ! try: ! event.EventLog.getInstance().removeListener(self.stack.app.mw) ! except: ! # already removed Message Watcher or it is not in use ! pass - # it shouldn't be possible to be in _dispatch for an event - # that wasn't bound above, but just in case... handler = self.eventIdToHandler.get(eventType, None) if handler: --- 714,801 ---- ! # KEA 2004-05-09 ! # this is _bindEvents taken from widget.Widget ! # so we can see how moving this to Scriptable will impact binding ! # comments have been removed ! def _bindEvents(self, eventList): ! background = wx.GetTopLevelParent(self) ! if wx.GetApp()._showDebugMenu: bindUnusedEvents = True else: bindUnusedEvents = False ! self.boundEvents = {} ! ! self.eventIdToHandler = {} self.wxEventIdMap = {} ! if 0: ! print "\nBINDING...", self.name ! for eventClass in eventList: ! self.wxEventIdMap[eventClass.id] = eventClass ! if issubclass(eventClass, event.CommandTypeEvent) and self.command: ! handler = background.findHandler('on_' + self.command + '_command') ! if not handler: ! handler = background.findHandler('on_' + self.name + '_' + eventClass.name) ! else: ! handler = background.findHandler('on_' + self.name + '_' + eventClass.name) ! if not handler: ! handler = background.findHandler('on_' + eventClass.name) if handler or bindUnusedEvents: ! if not self.boundEvents.get(eventClass.binding, None): ! self.Bind(eventClass.binding, self._dispatch) ! self.boundEvents[eventClass.binding] = eventClass.name if handler: if 0: ! print " binding", self.name, eventClass.name, handler.__name__, eventClass.id ! self.eventIdToHandler[eventClass.id] = handler if 0: ! print "\n boundEvents:" ! for name in self.boundEvents.values(): ! print " ", name print "\n\n" ! print "\n self.eventIdToHandler:" for id in self.eventIdToHandler: ! print " ", id, self.eventIdToHandler[id] print "\n\n" ! # KEA 2004-05-09 ! # this is _dispatch taken from widget.Widget ! # so we can see how moving this to Scriptable will impact dispatch ! # comments have been removed ! # the only line I added was self.command = None ! # since I'm not sure what we should do about that attribute ! # I suspect that the if test should just be changed so that instead of ! # if self.command ... ! # we use ! # if hasattr(self, 'command') and self.command ... ! # OOPS one other change ! # we're still using unbound methods and after a close event ! # additional events will be sent as the frame is closed and destroyed ! # in particular the last event appears to be a deactivate event ! # to work around this I went ahead and added code def _dispatch(self, aWxEvent): + # this is a temporary workaround, see comment above + self.command = None + eventType = aWxEvent.GetEventType() + eventClass = self.wxEventIdMap[eventType] ! eventClassInstance = eventClass() ! aWxEvent = eventClassInstance.decorate(aWxEvent, self) ! if self.command and isinstance(eventClassInstance, event.CommandTypeEvent): ! eventName = 'command' ! else: ! if isinstance(eventClassInstance, event.InsteadOfTypeEvent): ! eventType = eventClassInstance.translateEventType(aWxEvent) ! eventName = self.wxEventIdMap[eventType].name ! ! eventClass = None ! eventClassInstance = None handler = self.eventIdToHandler.get(eventType, None) if handler: *************** *** 763,786 **** if 0: print "dispatching", handler.__name__ - # make a lowercase alias aWxEvent.skip = aWxEvent.Skip ! # this is what is in event.py ! # aHandler.getFunction()( aOwner, self.getSource(), self ) ! #handler.getFunction()(self, aWxEvent) ! handler(self, aWxEvent) ! # do we have to clean up this alias? aWxEvent.skip = None - # how about this local reference to handler? handler = None ! ! # this check is done here because there is always an on_close handler defined ! # in the Background class ! if eventType == wx.wxEVT_CLOSE_WINDOW and aWxEvent.GetSkipped() and self.GetParent() is None: ! self._exiting = True else: event.EventLog.getInstance().log(eventName, self.name, False) - # hopefully this is all we need to do for "unused events" aWxEvent.Skip() # KEA 2002-06-27 --- 803,823 ---- if 0: print "dispatching", handler.__name__ aWxEvent.skip = aWxEvent.Skip ! ! background = wx.GetTopLevelParent(self) ! ! handler(background, aWxEvent) ! aWxEvent.skip = None handler = None ! background = None else: event.EventLog.getInstance().log(eventName, self.name, False) aWxEvent.Skip() + aWxEvent.target = aWxEvent.eventObject = None + + def OnLatentBackgroundBind(self, evt): + self._bindEvents(BackgroundEvents) # KEA 2002-06-27 *************** *** 997,1003 **** ! def _bindWindowEvents( self ) : wx.EVT_WINDOW_DESTROY(self, self.OnDestroy) # KEA 2002-07-09 # make sure wxSTC text, bitmaps, etc. aren't lost --- 1034,1054 ---- ! def _bindWindowEvents(self): ! wx.EVT_CLOSE(self, self.OnClose) wx.EVT_WINDOW_DESTROY(self, self.OnDestroy) + # KEA 2004-05-09 + # this is necessary so that we don't try and dispatch + # the activate event which is sent after close + # this might not be needed if we start using bound + # events, but that will require more testing + def OnClose(self, evt): + # this will be found when the on_close method above + # or override calls close so that we can still + # disconnect the deactivateevent during close + # otherwise trying to dispatch to + self.Disconnect(-1, -1, ActivateEvent.id) + evt.Skip() + # KEA 2002-07-09 # make sure wxSTC text, bitmaps, etc. aren't lost Index: event.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/event.py,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** event.py 5 May 2004 03:51:53 -0000 1.67 --- event.py 9 May 2004 18:50:58 -0000 1.68 *************** *** 275,296 **** name = 'select' ! ! # background events ! ! class ActivateEvent(Event): ! name = 'activate' ! binding = wx.EVT_ACTIVATE ! id = wx.wxEVT_ACTIVATE ! ! class CloseEvent(Event): ! name = 'close' ! binding = wx.EVT_CLOSE ! id = wx.wxEVT_CLOSE_WINDOW ! ! class DeactivateEvent(Event, InsteadOfTypeEvent): ! name = 'deactivate' ! binding = wx.EVT_ACTIVATE ! id = wx.NewEventType() ! class IdleEvent(Event): name = 'idle' --- 275,287 ---- name = 'select' ! # KEA 2004-05-09 ! # this is referenced in debug.py ! # and I don't want to create a circular import ! # with model.py, so I'm going to go ahead ! # and leave this in event.py ! # this might actually be better as an app level ! # event anyway, since I'm not sure every Background ! # should receive a separate idle event?! ! # need to test/experiment class IdleEvent(Event): name = 'idle' *************** *** 298,327 **** id = wx.wxEVT_IDLE - class MaximizeEvent(Event): - name = 'maximize' - binding = wx.EVT_MAXIMIZE - id = wx.wxEVT_MAXIMIZE - - class MinimizeEvent(Event): - name = 'minimize' - binding = wx.EVT_ICONIZE - id = wx.wxEVT_ICONIZE - - class MoveEvent(Event): - name = 'move' - binding = wx.EVT_MOVE - id = wx.wxEVT_MOVE - - class RestoreEvent(Event, InsteadOfTypeEvent): - name = 'restore' - binding = wx.EVT_ICONIZE - id = wx.NewEventType() - - class SizeEvent(Event): - name = 'size' - binding = wx.EVT_SIZE - id = wx.wxEVT_SIZE - - # focus events --- 289,292 ---- *************** *** 433,441 **** id = wx.wxEVT_LEFT_DOWN - class MouseDragEvent(MouseEvent, InsteadOfTypeEvent): - name = 'mouseDrag' - binding = wx.EVT_MOTION - id = wx.NewEventType() - class MouseEnterEvent(MouseEvent): name = 'mouseEnter' --- 398,401 ---- *************** *** 473,477 **** else: return self.id ! class MouseUpEvent(MouseEvent): name = 'mouseUp' --- 433,441 ---- else: return self.id ! ! class MouseDragEvent(MouseMoveEvent): ! name = 'mouseDrag' ! id = wx.NewEventType() ! class MouseUpEvent(MouseEvent): name = 'mouseUp' |
From: Kevin A. <ka...@us...> - 2004-05-09 16:26:33
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13856 Modified Files: turtle.py Log Message: added saveState and restoreState and cleaned up reset Index: turtle.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/turtle.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** turtle.py 9 May 2004 05:42:25 -0000 1.16 --- turtle.py 9 May 2004 16:26:24 -0000 1.17 *************** *** 15,19 **** def __init__(self, size): """ this should be called after a subclass has done its init """ ! self.__size = size self._tracing = False self._degrees() --- 15,19 ---- def __init__(self, size): """ this should be called after a subclass has done its init """ ! self._size = size self._tracing = False self._degrees() *************** *** 305,334 **** def reset(self): """ this should be called after a subclass has done its reset """ - """ but currently it needs to be overridden""" - #canvas = self.canvas - # just get the width and height from the window? - #width = FRAME_WIDTH #canvas.winfo_width() - #height = FRAME_HEIGHT # canvas.winfo_height() - #self._color = "black" - #self._color = wx.Pen(wx.NamedColour("black")) ! width, height = self.__size self._origin = width/2.0, height/2.0 self._position = self._origin self._odometer = 0.0 # don't waste time tracking unless requested self._odometerOn = False ! self._angle = 0.0 self._drawing = True self._width = 1 ! self._filling = 0 ! self._path = [] ! self._tofill = [] ! self._dirty = False self._visible = False self._drawingTurtle = False self._turtleDelay = 0 # implicit save of pen state, penUp, pen state restore def moveTo(self, x=None, y=None): """move the turtle to position x, y""" --- 305,338 ---- def reset(self): """ this should be called after a subclass has done its reset """ ! width, height = self._size self._origin = width/2.0, height/2.0 + #print "width: %d, height: %d" % (width, height) + #print "_origin.x: %f, _origin.y: %f" % (self._origin[0], self._origin[1]) self._position = self._origin + self._angle = 0.0 + # used for saveState and restoreState methods + self._savePosition = self._position + self._saveAngle = self._angle self._odometer = 0.0 # don't waste time tracking unless requested self._odometerOn = False ! # whether the pen is down self._drawing = True + # the pen width self._width = 1 ! # whether the turtle is visible, independent of the pen state self._visible = False + # if _dirty then erase old turtle before drawing + self._dirty = False + # only true while drawing the turtle self._drawingTurtle = False + # number of seconds to pause after drawing the turtle self._turtleDelay = 0 # implicit save of pen state, penUp, pen state restore + # KEA 2004-05-09 + # why the heck did I not require both x and y to be specified? + # is that the way Logo works? def moveTo(self, x=None, y=None): """move the turtle to position x, y""" *************** *** 356,359 **** --- 360,371 ---- self._position = (float(x1), float(y1)) + def saveState(self): + self._savePosition = self._position + self._saveAngle = self._angle + + def restoreState(self): + self.moveTo(self._savePosition[0], self._savePosition[1]) + self.setHeading(self._saveAngle) + class BitmapTurtle(AbstractTurtle): *************** *** 403,407 **** # Logo functions to implement # see http://www.embry.com/rLogo/rLogoReference.html ! # and http://www.embry.com/rLogo/Index.html for a working logo applet # setpencolor will be handled by color() --- 415,419 ---- # Logo functions to implement # see http://www.embry.com/rLogo/rLogoReference.html ! # and http://www.embry.com/rLogo/ for a working logo applet # setpencolor will be handled by color() *************** *** 499,510 **** """set the background pen color both (r, g, b) values and named colors are valid""" - ###brush = self.dc.GetBackground() if len(args) == 1: - ###brush.SetColour(wx.NamedColour(args[0])) self.canvas.backgroundColor = args[0] else: - ###brush.SetColour(wx.Colour(args[0], args[1], args[2])) self.canvas.backgroundColor = (args[0], args[1], args[2]) - ###self.dc.SetBackground(brush) # non-optimized turtle --- 511,518 ---- *************** *** 559,598 **** def reset(self): """reset the turtle to its initial state""" ! #canvas = self.canvas ! # just get the width and height from the window? ! #width = FRAME_WIDTH #canvas.winfo_width() ! #height = FRAME_HEIGHT # canvas.winfo_height() ! ! #width, height = self.canvas._deviceSize ! width, height = self.canvas.size ! ! #self._color = "black" self._color = wx.Pen(wx.NamedColour("black")) self._pen = wx.Pen('black', 1, wx.SOLID) self.setBackColor('white') ! ! #AbstractTurtle.reset() ! self._origin = width/2.0, height/2.0 ! #print "width: %d, height: %d" % (width, height) ! #print "_origin.x: %f, _origin.y: %f" % (self._origin[0], self._origin[1]) ! self._position = self._origin ! self._odometer = 0.0 ! # don't waste time tracking unless requested ! self._odometerOn = False ! self._angle = 0.0 ! # whether the pen is down ! self._drawing = True ! self._width = 1 ! #self._filling = 0 ! #self._path = [] ! #self._tofill = [] ! # whether the turtle is visible, independent of the pen state ! self._visible = False ! # if _dirty then erase old turtle before drawing ! self._dirty = False ! # only true while drawing the turtle ! self._drawingTurtle = False ! # number of seconds to pause after drawing the turtle ! self._turtleDelay = 0 def _goto(self, x1, y1): --- 567,575 ---- def reset(self): """reset the turtle to its initial state""" ! self._size = self.canvas.size self._color = wx.Pen(wx.NamedColour("black")) self._pen = wx.Pen('black', 1, wx.SOLID) self.setBackColor('white') ! AbstractTurtle.reset(self) def _goto(self, x1, y1): *************** *** 610,616 **** x0, y0 = start = self._position self._position = (float(x1), float(y1)) - #if self._filling: - # self._path.append(self._position) - #print self._drawing if self._drawing: """ --- 587,590 ---- |
From: Kevin A. <ka...@us...> - 2004-05-09 05:42:35
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28944 Modified Files: turtle.py Log Message: added size parameter to AbstractTurtle init fixed _goto in AbstractTurtle, not recording distance though Index: turtle.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/turtle.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** turtle.py 1 May 2004 17:29:13 -0000 1.15 --- turtle.py 9 May 2004 05:42:25 -0000 1.16 *************** *** 13,18 **** class AbstractTurtle: ! def __init__(self): """ this should be called after a subclass has done its init """ self._tracing = False self._degrees() --- 13,19 ---- class AbstractTurtle: ! def __init__(self, size): """ this should be called after a subclass has done its init """ + self.__size = size self._tracing = False self._degrees() *************** *** 312,315 **** --- 313,317 ---- #self._color = wx.Pen(wx.NamedColour("black")) + width, height = self.__size self._origin = width/2.0, height/2.0 self._position = self._origin *************** *** 352,356 **** def _goto(self, x1, y1): """ override """ ! pass --- 354,358 ---- def _goto(self, x1, y1): """ override """ ! self._position = (float(x1), float(y1)) *************** *** 360,364 **** #self.dc.SetOptimization(1) ! AbstractTurtle.__init__(self) # illegal syntax, so I used None and the if tests instead --- 362,366 ---- #self.dc.SetOptimization(1) ! AbstractTurtle.__init__(self, canvas.size) # illegal syntax, so I used None and the if tests instead |
From: Kevin A. <ka...@us...> - 2004-05-09 04:12:06
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17729/resourceEditor/modules Modified Files: propertyEditor.py Log Message: added ticks and labels attributes for slider Index: propertyEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/modules/propertyEditor.py,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** propertyEditor.py 24 Apr 2004 06:49:47 -0000 1.45 --- propertyEditor.py 9 May 2004 04:11:57 -0000 1.46 *************** *** 124,130 **** def on_wUpdate_mouseClick(self, event): # make these attributes of self, since they are duplicated below in displayProperty ! checkItems = ['enabled', 'visible', 'editable', 'checked', 'default', 'rules'] popItems = ['layout', 'border', 'style', 'alignment', 'stringSelection'] ! cantmodify = ['id', 'name', 'alignment', 'layout', 'style', 'border', 'min', 'max', 'columns', 'rules'] wName, wClass = self.components.wComponentList.stringSelection.split(" : ") --- 124,131 ---- def on_wUpdate_mouseClick(self, event): # make these attributes of self, since they are duplicated below in displayProperty ! checkItems = ['enabled', 'visible', 'editable', 'checked', 'default', 'rules', 'labels', 'ticks'] popItems = ['layout', 'border', 'style', 'alignment', 'stringSelection'] ! cantmodify = ['id', 'name', 'alignment', 'layout', 'style', 'border', \ ! 'min', 'max', 'columns', 'rules', 'labels', 'ticks'] wName, wClass = self.components.wComponentList.stringSelection.split(" : ") *************** *** 282,286 **** def displayProperty(self, wName, wClass, propName): ! checkItems = ['enabled', 'visible', 'editable', 'checked', 'default', 'rules'] popItems = ['layout', 'border', 'style', 'alignment', 'stringSelection'] --- 283,287 ---- def displayProperty(self, wName, wClass, propName): ! checkItems = ['enabled', 'visible', 'editable', 'checked', 'default', 'rules', 'labels', 'ticks'] popItems = ['layout', 'border', 'style', 'alignment', 'stringSelection'] |
From: Kevin A. <ka...@us...> - 2004-05-09 04:11:38
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17688/components Modified Files: slider.py Log Message: added ticks, labels, and tickFrequency attributes Index: slider.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/slider.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** slider.py 4 May 2004 17:15:42 -0000 1.18 --- slider.py 9 May 2004 04:11:28 -0000 1.19 *************** *** 20,23 **** --- 20,26 ---- attributes = { 'layout' : { 'presence' : 'optional', 'default' : 'horizontal', 'values' : [ 'horizontal', 'vertical' ] }, + 'labels' : { 'presence' : 'optional', 'default' : False }, + 'ticks' : { 'presence' : 'optional', 'default' : False }, + 'tickFrequency' : { 'presence' : 'optional', 'default' : 0 }, 'min' : { 'presence' : 'optional', 'default' : 0 }, 'max' : { 'presence' : 'optional', 'default' : 100 }, *************** *** 42,46 **** aResource.position, aResource.size, ! style= self.__getLayout( aResource.layout ) | \ wx.NO_FULL_REPAINT_ON_RESIZE | wx.CLIP_SIBLINGS, name = aResource.name --- 45,51 ---- aResource.position, aResource.size, ! style= self.__getLayout(aResource.layout) | \ ! self.__getLabels(aResource.labels) | \ ! self.__getTicks(aResource.ticks) | \ wx.NO_FULL_REPAINT_ON_RESIZE | wx.CLIP_SIBLINGS, name = aResource.name *************** *** 50,53 **** --- 55,62 ---- self._layout = aResource.layout + self._labels = aResource.labels + self._ticks = aResource.ticks + if aResource.ticks and aResource.tickFrequency: + self._setTickFrequency(aResource.tickFrequency) self._bindEvents(event.WIDGET_EVENTS + SliderEvents) *************** *** 60,64 **** else : raise 'invalid Slider.layout value: ', aString ! def setRange( self, aMin, aMax ) : self.SetRange( aMin, aMax ) --- 69,85 ---- else : raise 'invalid Slider.layout value: ', aString ! ! def __getLabels(self, aBoolean): ! if aBoolean: ! return wx.SL_LABELS ! else : ! return 0 ! ! def __getTicks(self, aBoolean): ! if aBoolean: ! return wx.SL_AUTOTICKS ! else : ! return 0 ! def setRange( self, aMin, aMax ) : self.SetRange( aMin, aMax ) *************** *** 76,80 **** --- 97,122 ---- raise AttributeError, "layout attribute is read-only" + def _getLabels(self): + return self._labels + + def _setLabels(self, aBoolean): + raise AttributeError, "labels attribute is read-only" + + def _getTicks(self): + return self._ticks + + def _setTicks(self, aBoolean): + raise AttributeError, "ticks attribute is read-only" + + def _getTickFrequency(self): + return self.GetTickFreq() + + def _setTickFrequency(self, aInteger): + self.SetTickFreq(aInteger, 1) + layout = property(_getLayout, _setLayout) + labels = property(_getLabels, _setLabels) + ticks = property(_getTicks, _setTicks) + tickFrequency = property(_getTickFrequency, _setTickFrequency) max = property(wx.Slider.GetMax, _setMax) min = property(wx.Slider.GetMin, _setMin) |
From: Kevin A. <ka...@us...> - 2004-05-09 03:58:15
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15756/tools/resourceEditor Modified Files: resourceEditor.py Log Message: added auto-save on run Index: resourceEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.py,v retrieving revision 1.190 retrieving revision 1.191 diff -C2 -d -r1.190 -r1.191 *** resourceEditor.py 6 May 2004 20:13:29 -0000 1.190 --- resourceEditor.py 9 May 2004 03:58:03 -0000 1.191 *************** *** 207,216 **** pass else: ! if self.documentPath is None: # if the user cancels out of the Save As then go back to editing if not self.on_menuFileSaveAs_select(None): return else: ! self.saveFile(self.documentPath) self.openFile(path) --- 207,216 ---- pass else: ! if self.filename is None: # if the user cancels out of the Save As then go back to editing if not self.on_menuFileSaveAs_select(None): return else: ! self.saveFile() self.openFile(path) *************** *** 1473,1476 **** --- 1473,1492 ---- def runScript(self, useInterpreter): + # KEA 2004-05-08 + # auto-save code taken from codeEditor + if self.filename is None: + save = self.saveChanges() + if save == "Cancel" or save == "No": + # don't do anything, just go back to editing + return + else: + if not self.on_menuFileSaveAs_select(None): + # they didn't actually save, just go back + # to editing + return + elif self.documentChanged: + # auto-save + self.saveFile() + if self.filename is None: # KEA 2002-03-25 *************** *** 1515,1530 **** def on_fileRun_command(self, event): ! # KEA 2001-12-14 ! # we should prompt to save the .rsrc.py file if needed ! # or in the case of a new file, do a save as before attempting ! # to do a run ! self.runScript(0) def on_fileRunWithInterpreter_command(self, event): ! # KEA 2001-12-14 ! # we should prompt to save the .rsrc.py file if needed ! # or in the case of a new file, do a save as before attempting ! # to do a run ! self.runScript(1) def copyWidgetDescriptionToClipboard(self, name): --- 1531,1538 ---- def on_fileRun_command(self, event): ! self.runScript(False) def on_fileRunWithInterpreter_command(self, event): ! self.runScript(True) def copyWidgetDescriptionToClipboard(self, name): |
From: Kevin A. <ka...@us...> - 2004-05-06 20:13:39
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14680/tools/resourceEditor Modified Files: resourceEditor.py resourceEditor.rsrc.py Log Message: added ToggleButton component Index: resourceEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.py,v retrieving revision 1.189 retrieving revision 1.190 diff -C2 -d -r1.189 -r1.190 *** resourceEditor.py 1 May 2004 18:46:55 -0000 1.189 --- resourceEditor.py 6 May 2004 20:13:29 -0000 1.190 *************** *** 1055,1058 **** --- 1055,1060 ---- elif className == 'TextField': desc = baseDesc + "'text':''}" + elif className == 'ToggleButton': + desc = baseDesc + "'label':'ToggleButton n', 'checked':0}" elif className == 'Tree': desc = baseDesc + "}" *************** *** 1128,1131 **** --- 1130,1135 ---- elif className == 'TextField': pass + elif className == 'ToggleButton': + d['label'] = d['name'] elif className == 'Tree': d['size'] = (50, 50) Index: resourceEditor.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.rsrc.py,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** resourceEditor.rsrc.py 30 Apr 2004 16:26:12 -0000 1.49 --- resourceEditor.rsrc.py 6 May 2004 20:13:29 -0000 1.50 *************** *** 245,248 **** --- 245,253 ---- }, {'type':'MenuItem', + 'name':'menuComponentAddToggleButton', + 'label':'ToggleButton', + 'command':'componentAdd', + }, + {'type':'MenuItem', 'name':'menuComponentAddTree', 'label':'Tree', |
From: Kevin A. <ka...@us...> - 2004-05-06 20:13:39
|
Update of /cvsroot/pythoncard/PythonCard/samples/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14680/samples/widgets Modified Files: widgets.py widgets.rsrc.py Log Message: added ToggleButton component Index: widgets.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/widgets/widgets.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** widgets.py 5 May 2004 16:53:49 -0000 1.38 --- widgets.py 6 May 2004 20:13:29 -0000 1.39 *************** *** 113,116 **** --- 113,117 ---- self.components.txtStaticText.foregroundColor = color self.components.chkCheckBox.foregroundColor = color + self.components.chkToggleButton.foregroundColor = color self.components.radRadioGroup.foregroundColor = color self.components.popChoice.foregroundColor = color Index: widgets.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/widgets/widgets.rsrc.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** widgets.rsrc.py 5 May 2004 16:53:49 -0000 1.20 --- widgets.rsrc.py 6 May 2004 20:13:29 -0000 1.21 *************** *** 5,8 **** --- 5,9 ---- 'name':'bgWidgets', 'title':'Widgets Test', + 'position':(5, 5), 'size':(700, 600), *************** *** 28,31 **** --- 29,45 ---- 'components': [ + {'type':'ToggleButton', + 'name':'chkToggleButton', + 'position':(100, 225), + 'size':(85, -1), + 'label':'ToggleButton', + }, + + {'type':'StaticText', + 'name':'labelToggleButton', + 'position':(5, 230), + 'text':'ToggleButton:', + }, + {'type':'StaticText', 'name':'labelBitmapCanvas', *************** *** 39,43 **** 'size':(112, 50), 'backgroundColor':(255, 255, 255), - 'thickness':1, }, --- 53,56 ---- *************** *** 78,82 **** 'name':'spnSpinner', 'position':(310, 450), - 'size':(-1, 21), 'max':100, 'min':1, --- 91,94 ---- *************** *** 93,97 **** 'name':'gagGauge', 'position':(310, 404), ! 'size':(128, 28), 'layout':'horizontal', 'max':100, --- 105,109 ---- 'name':'gagGauge', 'position':(310, 404), ! 'size':(128, -1), 'layout':'horizontal', 'max':100, *************** *** 102,105 **** --- 114,118 ---- 'name':'calCalendar', 'position':(299, 200), + 'font':{'faceName': 'Arial', 'family': 'sansSerif', 'size': 8}, }, *************** *** 113,117 **** 'name':'cmbComboBox', 'position':(311, 364), ! 'size':(125, 21), 'items':['one', 'two', 'three'], 'stringSelection':'two', --- 126,130 ---- 'name':'cmbComboBox', 'position':(311, 364), ! 'size':(125, -1), 'items':['one', 'two', 'three'], 'stringSelection':'two', *************** *** 142,146 **** 'name':'chkEnabled', 'position':(500, 30), ! 'checked':1, 'label':'Enabled', }, --- 155,159 ---- 'name':'chkEnabled', 'position':(500, 30), ! 'checked':True, 'label':'Enabled', }, *************** *** 149,153 **** 'name':'chkVisible', 'position':(500, 50), ! 'checked':1, 'label':'Visible', }, --- 162,166 ---- 'name':'chkVisible', 'position':(500, 50), ! 'checked':True, 'label':'Visible', }, *************** *** 156,160 **** 'name':'chkEditable', 'position':(500, 70), ! 'checked':1, 'label':'Editable', }, --- 169,173 ---- 'name':'chkEditable', 'position':(500, 70), ! 'checked':True, 'label':'Editable', }, *************** *** 216,220 **** {'type':'StaticText', 'name':'labelStaticText', ! 'position':(5, 200), 'text':'StaticText:', }, --- 229,233 ---- {'type':'StaticText', 'name':'labelStaticText', ! 'position':(5, 170), 'text':'StaticText:', }, *************** *** 222,226 **** {'type':'StaticText', 'name':'labelCheckBox', ! 'position':(5, 230), 'text':'CheckBox:', }, --- 235,239 ---- {'type':'StaticText', 'name':'labelCheckBox', ! 'position':(5, 200), 'text':'CheckBox:', }, *************** *** 303,307 **** {'type':'StaticText', 'name':'txtStaticText', ! 'position':(100, 200), 'text':'StaticText', }, --- 316,320 ---- {'type':'StaticText', 'name':'txtStaticText', ! 'position':(100, 170), 'text':'StaticText', }, *************** *** 309,313 **** {'type':'CheckBox', 'name':'chkCheckBox', ! 'position':(100, 230), 'label':'CheckBox', }, --- 322,326 ---- {'type':'CheckBox', 'name':'chkCheckBox', ! 'position':(100, 200), 'label':'CheckBox', }, *************** *** 326,330 **** 'name':'popChoice', 'position':(100, 350), - 'size':(-1, 21), 'items':['one', 'two', 'three'], 'stringSelection':'two', --- 339,342 ---- *************** *** 358,362 **** 'name':'imgImageButton', 'position':(385, 110), - 'size':(55, 17), 'border':'transparent', 'file':'edit.gif', --- 370,373 ---- |
From: Kevin A. <ka...@us...> - 2004-05-06 20:13:38
|
Update of /cvsroot/pythoncard/PythonCard/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14680/docs Modified Files: changelog.txt Log Message: added ToggleButton component Index: changelog.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/changelog.txt,v retrieving revision 1.283 retrieving revision 1.284 diff -C2 -d -r1.283 -r1.284 *** changelog.txt 6 May 2004 17:33:13 -0000 1.283 --- changelog.txt 6 May 2004 20:13:28 -0000 1.284 *************** *** 3,6 **** --- 3,7 ---- Release 0.8 2004-05-?? + added ToggleButton component fixed enableCommand and disableCommand for components & menus added ataxx sample |
From: Kevin A. <ka...@us...> - 2004-05-06 20:13:37
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14680/components Added Files: togglebutton.py Log Message: added ToggleButton component --- NEW FILE: togglebutton.py --- """ __version__ = "$Revision: 1.1 $" __date__ = "$Date: 2004/05/06 20:13:27 $" """ import wx from PythonCard import event, widget # KEA 2004-05-06 # expose the same interface as CheckBox class ToggleButtonMouseClickEvent(event.MouseClickEvent): binding = wx.EVT_TOGGLEBUTTON id = wx.wxEVT_COMMAND_TOGGLEBUTTON_CLICKED ToggleButtonEvents = (ToggleButtonMouseClickEvent,) class ToggleButtonSpec(widget.WidgetSpec): def __init__(self): events = list(ToggleButtonEvents) attributes = { 'label' : { 'presence' : 'mandatory' }, 'checked' : { 'presence' : 'optional', 'default' : 0 } } widget.WidgetSpec.__init__(self, 'ToggleButton', 'Widget', events, attributes ) class ToggleButton(widget.Widget, wx.ToggleButton): """ A toggle button. """ _spec = ToggleButtonSpec() def __init__( self, aParent, aResource ) : wx.ToggleButton.__init__( self, aParent, widget.makeNewId(aResource.id), aResource.label, aResource.position, aResource.size, style = wx.CLIP_SIBLINGS | wx.NO_FULL_REPAINT_ON_RESIZE, name = aResource.name ) widget.Widget.__init__( self, aParent, aResource) if aResource.checked: self.SetValue(True) self._bindEvents(event.WIDGET_EVENTS + ToggleButtonEvents) checked = property(wx.ToggleButton.GetValue, wx.ToggleButton.SetValue) label = property(wx.ToggleButton.GetLabel, wx.ToggleButton.SetLabel) # KEA 2004-05-06 # you can't actually set the foregroundColor and backgroundColor of # a ToggleButton so I wonder whether we should have those as valid # attributes? The same goes for other components where some of our # base attributes don't make any sense. OTOH, having the attribute # which fails silently when it tries to set it gives some symmetry # to the components and gets rid of the need for try/except blocks # when processing a group of component attributes. import sys from PythonCard import registry registry.Registry.getInstance().register(sys.modules[__name__].ToggleButton) |
From: Kevin A. <ka...@us...> - 2004-05-06 17:33:22
|
Update of /cvsroot/pythoncard/PythonCard/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14515/docs Modified Files: changelog.txt Log Message: fixed enableCommand and disableCommand Index: changelog.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/changelog.txt,v retrieving revision 1.282 retrieving revision 1.283 diff -C2 -d -r1.282 -r1.283 *** changelog.txt 4 May 2004 23:31:54 -0000 1.282 --- changelog.txt 6 May 2004 17:33:13 -0000 1.283 *************** *** 3,6 **** --- 3,7 ---- Release 0.8 2004-05-?? + fixed enableCommand and disableCommand for components & menus added ataxx sample codeEditor now persists all View menu settings |
From: Kevin A. <ka...@us...> - 2004-05-06 17:33:21
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14515 Modified Files: menu.py model.py Log Message: fixed enableCommand and disableCommand Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -d -r1.165 -r1.166 *** model.py 5 May 2004 20:27:07 -0000 1.165 --- model.py 6 May 2004 17:33:13 -0000 1.166 *************** *** 870,883 **** ! def enableCommand(self, aString): """ Fined every component with a 'command' attribute that matches aString, and enable the component. """ ! self.menuBar.enableCommand(aString) for component in self.components.itervalues(): ! if component._getCommand() is aString: ! component.setEnabled(1) def disableCommand(self, aString): --- 870,883 ---- ! def enableCommand(self, aString, aBoolean=True): """ Fined every component with a 'command' attribute that matches aString, and enable the component. """ ! self.menuBar.enableCommand(aString, aBoolean) for component in self.components.itervalues(): ! if component.command == aString: ! component.enabled = aBoolean def disableCommand(self, aString): *************** *** 886,895 **** that matches aString, and disable the component. """ ! self.menuBar.disableCommand(aString) ! ! for component in self.components.itervalues(): ! if component._getCommand() is aString: ! component.setEnabled(0) ! def _initLayout(self, aResourceList): --- 886,890 ---- that matches aString, and disable the component. """ ! self.enableCommand(aString, False) def _initLayout(self, aResourceList): *************** *** 1211,1235 **** ! def enableCommand( self, aString ) : """ Fined every component with a 'command' attribute that matches aString, and enable the component. """ ! self.menuBar.enableCommand( aString ) ! ! for component in self.components.itervalues() : ! if component._getCommand() is aString : ! component.setEnabled( 1 ) ! def disableCommand( self, aString ) : """ Fined every component with a 'command' attribute that matches aString, and disable the component. """ ! self.menuBar.disableCommand( aString ) ! ! for component in self.components.itervalues() : ! if component._getCommand() is aString : ! component.setEnabled( 0 ) --- 1206,1224 ---- ! def enableCommand(self, aString, aBoolean=True): """ Fined every component with a 'command' attribute that matches aString, and enable the component. """ ! for component in self.components.itervalues(): ! if component.command == aString: ! component.enabled = aBoolean ! def disableCommand(self, aString): """ Fined every component with a 'command' attribute that matches aString, and disable the component. """ ! self.enableCommand(aString, False) Index: menu.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/menu.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** menu.py 6 May 2004 01:30:22 -0000 1.35 --- menu.py 6 May 2004 17:33:13 -0000 1.36 *************** *** 84,87 **** --- 84,92 ---- self._bindEvents((MenuSelectEvent,), aScriptable, id) + # KEA 2004-05-06 + # since the only use of id2itemMap + # is enableCommand and disableCommand + # it might make more sense to just store + # a mapping of command names to ids aParent.parent.id2itemMap[id] = self *************** *** 194,197 **** --- 199,208 ---- background = aWxEvent.GetEventObject().parent.parent else: + # KEA 2004-05-05 + # it looks like Windows is actually the busted platform + # this time + # if we end up caching the handlers as bound methods + # then I guess this kind of problem would go away because + # we won't have to supply the first arg "self" background = aWxEvent.GetEventObject() ## background = wx.GetTopLevelParent(self) *************** *** 420,437 **** return self.menus ! # KEA 2003-08-02 ! # why don't these do anything?! ! # go ahead and add the code so they are functional ! def enableCommand( self, aString ) : ! for item in self.id2itemMap.itervalues() : ! if item.getCommand() is aString : ! print 'enabling menu item', item.getName() ! pass ! def disableCommand( self, aString ) : ! for item in self.id2itemMap.itervalues() : ! if item.getCommand() is aString : ! print 'disabling menu item', item.getName() ! pass --- 431,441 ---- return self.menus ! def enableCommand(self, aString, aBoolean=True): ! for item in self.id2itemMap.itervalues(): ! if item.command == aString : ! self.Enable(item.GetId(), aBoolean) ! def disableCommand(self, aString): ! self.enableCommand(aString, False) |
From: Kevin A. <ka...@us...> - 2004-05-06 01:30:35
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4144 Modified Files: menu.py Log Message: workaround needed for GTK too Index: menu.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/menu.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** menu.py 5 May 2004 20:27:07 -0000 1.34 --- menu.py 6 May 2004 01:30:22 -0000 1.35 *************** *** 191,195 **** # is returning the menu item, not the frame the event was # bound to ! if wx.Platform == '__WXMAC__': background = aWxEvent.GetEventObject().parent.parent else: --- 191,195 ---- # is returning the menu item, not the frame the event was # bound to ! if wx.Platform in ('__WXGTK__', '__WXMAC__'): background = aWxEvent.GetEventObject().parent.parent else: |
From: Kevin A. <ka...@us...> - 2004-05-05 20:27:18
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9199 Modified Files: menu.py model.py widget.py Log Message: added WXMAC workaround for menu _dispatch fixed function._name references to be __name__ Index: widget.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/widget.py,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -d -r1.126 -r1.127 *** widget.py 5 May 2004 03:51:53 -0000 1.126 --- widget.py 5 May 2004 20:27:09 -0000 1.127 *************** *** 320,324 **** if handler: if 0: ! print " binding", self.name, eventClass.name, handler._name, eventClass.id # KEA 2004-05-02 # change to just using the method directly, Handler class not needed --- 320,324 ---- if handler: if 0: ! print " binding", self.name, eventClass.name, handler.__name__, eventClass.id # KEA 2004-05-02 # change to just using the method directly, Handler class not needed Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.164 retrieving revision 1.165 diff -C2 -d -r1.164 -r1.165 *** model.py 5 May 2004 03:51:53 -0000 1.164 --- model.py 5 May 2004 20:27:07 -0000 1.165 *************** *** 679,683 **** if handler: if 0: ! print "binding", eventClass.name, handler._name, wxRegistry[eventClass][1] self.eventIdToHandler[wxRegistry[eventClass][1]] = handler # deactivate is a special case --- 679,683 ---- if handler: if 0: ! print "binding", eventClass.name, handler.__name__, wxRegistry[eventClass][1] self.eventIdToHandler[wxRegistry[eventClass][1]] = handler # deactivate is a special case *************** *** 762,766 **** event.EventLog.getInstance().log(eventName, self.name, True) if 0: ! print "dispatching", handler._name # make a lowercase alias aWxEvent.skip = aWxEvent.Skip --- 762,766 ---- event.EventLog.getInstance().log(eventName, self.name, True) if 0: ! print "dispatching", handler.__name__ # make a lowercase alias aWxEvent.skip = aWxEvent.Skip Index: menu.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/menu.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** menu.py 5 May 2004 03:51:53 -0000 1.33 --- menu.py 5 May 2004 20:27:07 -0000 1.34 *************** *** 133,137 **** if handler: if 0: ! print " binding", self.name, eventClass.name, handler._name, eventClass.id #self.eventIdToHandler[eventClass.id] = handler.getFunction() self.eventIdToHandler[eventClass.id] = handler --- 133,137 ---- if handler: if 0: ! print " binding", self.name, eventClass.name, handler.__name__, eventClass.id #self.eventIdToHandler[eventClass.id] = handler.getFunction() self.eventIdToHandler[eventClass.id] = handler *************** *** 187,191 **** # the menu events are always bound to the parent frame # so the target of the event will be the "background" ! background = aWxEvent.GetEventObject() ## background = wx.GetTopLevelParent(self) --- 187,198 ---- # the menu events are always bound to the parent frame # so the target of the event will be the "background" ! # KEA 2004-05-05 ! # it looks like WXMAC might be broken since GetEventObject ! # is returning the menu item, not the frame the event was ! # bound to ! if wx.Platform == '__WXMAC__': ! background = aWxEvent.GetEventObject().parent.parent ! else: ! background = aWxEvent.GetEventObject() ## background = wx.GetTopLevelParent(self) |
From: Kevin A. <ka...@us...> - 2004-05-05 20:27:18
|
Update of /cvsroot/pythoncard/PythonCard/components In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9199/components Modified Files: iehtmlwindow.py Log Message: added WXMAC workaround for menu _dispatch fixed function._name references to be __name__ Index: iehtmlwindow.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/components/iehtmlwindow.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** iehtmlwindow.py 5 May 2004 03:51:54 -0000 1.16 --- iehtmlwindow.py 5 May 2004 20:27:09 -0000 1.17 *************** *** 194,198 **** if handler: if 0: ! print " binding", self.name, eventClass.name, handler._name, eventClass.id # KEA 2004-05-02 # change to just using the method directly, Handler class not needed --- 194,198 ---- if handler: if 0: ! print " binding", self.name, eventClass.name, handler.__name__, eventClass.id # KEA 2004-05-02 # change to just using the method directly, Handler class not needed |
From: Kevin A. <ka...@us...> - 2004-05-05 18:07:18
|
Update of /cvsroot/pythoncard/PythonCard/tools/codeEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11898 Modified Files: codeEditor.py Log Message: replaced lambda with standard setChecked method Index: codeEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/codeEditor.py,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** codeEditor.py 5 May 2004 16:53:50 -0000 1.112 --- codeEditor.py 5 May 2004 18:07:09 -0000 1.113 *************** *** 321,327 **** path = os.path.join(self.configPath, USERCONFIG) self.config = util.readAndEvalFile(path) - menuBar = self.GetMenuBar() - checkMenuItem = lambda menu, menuItem, checked, _menuBar=menuBar: \ - _menuBar.FindItemById(_menuBar.FindMenuItem(menu, menuItem)).Check(checked) if self.config != {}: if 'position' in self.config: --- 321,324 ---- *************** *** 336,355 **** if 'view_white_space' in self.config: self.components.document.SetViewWhiteSpace(self.config['view_white_space']) ! checkMenuItem('View', 'Whitespace', self.config['view_white_space']) if 'indentation_guides' in self.config: self.components.document.SetIndentationGuides(self.config['indentation_guides']) ! checkMenuItem('View', 'Indentation guides', self.config['indentation_guides']) if 'right_edge_guide' in self.config: self.components.document.SetEdgeMode(self.config['right_edge_guide']) ! checkMenuItem('View', 'Right edge indicator', self.config['right_edge_guide']) if 'view_EOL' in self.config: self.components.document.SetViewEOL(self.config['view_EOL']) ! checkMenuItem('View', 'End-of-line markers', self.config['view_EOL']) if 'line_numbers' in self.config: self.components.document.lineNumbersVisible = self.config['line_numbers'] ! checkMenuItem('View', 'Line Numbers', self.config['line_numbers']) if 'folding' in self.config: self.components.document.codeFoldingVisible = self.config['folding'] ! checkMenuItem('View', 'Code Folding', self.config['folding']) if 'macros' in self.config: --- 333,352 ---- if 'view_white_space' in self.config: self.components.document.SetViewWhiteSpace(self.config['view_white_space']) ! self.menuBar.setChecked('menuViewWhitespace', self.config['view_white_space']) if 'indentation_guides' in self.config: self.components.document.SetIndentationGuides(self.config['indentation_guides']) ! self.menuBar.setChecked('menuViewIndentationGuides', self.config['indentation_guides']) if 'right_edge_guide' in self.config: self.components.document.SetEdgeMode(self.config['right_edge_guide']) ! self.menuBar.setChecked('menuViewRightEdgeIndicator', self.config['right_edge_guide']) if 'view_EOL' in self.config: self.components.document.SetViewEOL(self.config['view_EOL']) ! self.menuBar.setChecked('menuViewEndOfLineMarkers', self.config['view_EOL']) if 'line_numbers' in self.config: self.components.document.lineNumbersVisible = self.config['line_numbers'] ! self.menuBar.setChecked('menuViewLineNumbers', self.config['line_numbers']) if 'folding' in self.config: self.components.document.codeFoldingVisible = self.config['folding'] ! self.menuBar.setChecked('menuViewCodeFolding', self.config['folding']) if 'macros' in self.config: |
From: Kevin A. <ka...@us...> - 2004-05-05 16:54:07
|
Update of /cvsroot/pythoncard/PythonCard/samples/radioclient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28150/samples/radioclient Modified Files: radioclient.py radioclient.rsrc.py Log Message: removed on_menuFileExit_select, using Background on_exit_command instead Index: radioclient.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/radioclient/radioclient.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** radioclient.py 25 Apr 2004 04:23:50 -0000 1.23 --- radioclient.py 5 May 2004 16:53:28 -0000 1.24 *************** *** 194,200 **** self.on_radioGetRecentPosts_command(None) - def on_menuFileExit_select(self, event): - self.close() - def on_menuOptionsAutoComplete_select(self, event): self.stack.app.shell.autoComplete = self.menuBar.getChecked('menuOptionsAutoComplete') --- 194,197 ---- Index: radioclient.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/radioclient/radioclient.rsrc.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** radioclient.rsrc.py 28 May 2002 00:34:22 -0000 1.6 --- radioclient.rsrc.py 5 May 2004 16:53:28 -0000 1.7 *************** *** 18,21 **** --- 18,22 ---- 'name':'menuFileExit', 'label':'E&xit\tAlt+X', + 'command':'exit', }, ] |
From: Kevin A. <ka...@us...> - 2004-05-05 16:54:07
|
Update of /cvsroot/pythoncard/PythonCard/samples/pysshed In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28150/samples/pysshed Modified Files: pysshed.py pysshed.rsrc.py Log Message: removed on_menuFileExit_select, using Background on_exit_command instead Index: pysshed.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/pysshed/pysshed.rsrc.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pysshed.rsrc.py 24 Apr 2004 06:49:47 -0000 1.3 --- pysshed.rsrc.py 5 May 2004 16:53:28 -0000 1.4 *************** *** 17,21 **** 'name':'menuFileExit', 'label':'E&xit\tAlt+X', ! 'command':'programExit', }, ] --- 17,21 ---- 'name':'menuFileExit', 'label':'E&xit\tAlt+X', ! 'command':'exit', }, ] *************** *** 65,69 **** 'name':'quitBtn', 'position':(270, 160), ! 'command':'programExit', 'label':'Quit', }, --- 65,69 ---- 'name':'quitBtn', 'position':(270, 160), ! 'command':'exit', 'label':'Quit', }, Index: pysshed.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/pysshed/pysshed.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pysshed.py 24 Apr 2004 21:09:20 -0000 1.9 --- pysshed.py 5 May 2004 16:53:28 -0000 1.10 *************** *** 48,54 **** class pysshed(model.Background): - def on_programExit_command(self, event): - self.close() - def on_initialize(self, event): self.cfg = ConfigParser.ConfigParser() --- 48,51 ---- |
From: Kevin A. <ka...@us...> - 2004-05-05 16:54:07
|
Update of /cvsroot/pythoncard/PythonCard/samples/multicolumnexample In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28150/samples/multicolumnexample Modified Files: multicolumnexample.py multicolumnexample.rsrc.py Log Message: removed on_menuFileExit_select, using Background on_exit_command instead Index: multicolumnexample.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/multicolumnexample/multicolumnexample.rsrc.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** multicolumnexample.rsrc.py 5 Sep 2003 03:03:33 -0000 1.2 --- multicolumnexample.rsrc.py 5 May 2004 16:53:27 -0000 1.3 *************** *** 21,25 **** { 'type':'MenuItem', 'name':'menuFileExit', ! 'label':'E&xit\tAlt+X' } ] } ] }, --- 21,26 ---- { 'type':'MenuItem', 'name':'menuFileExit', ! 'label':'E&xit\tAlt+X', ! 'command':'exit' } ] } ] }, Index: multicolumnexample.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/multicolumnexample/multicolumnexample.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** multicolumnexample.py 24 Apr 2004 21:09:19 -0000 1.5 --- multicolumnexample.py 5 May 2004 16:53:27 -0000 1.6 *************** *** 152,158 **** self.listcacheidx = 0 - def on_menuFileExit_select(self, event): - self.close() - def on_appendButton_mouseClick(self, event): self._save_current_list() --- 152,155 ---- |