From: Kevin A. <al...@se...> - 2002-01-08 22:55:56
|
Cliff Wells and I worked through some more Linux/GTK issues today. I updated findfiles.py, resourceEditor.py, and samples.py launcher code to put launched scripts in the background: os.system(python + ' ' + filename + args + ' &') instead of os.system(python + ' ' + filename + args) Cliff has suggested wrapping up the launching functionality to hide platform differences and this is probably a good candidate for the utils.py module since we already have four samples that do some launching; Simon is updating textRouter and will check that in later. Anyway, the change above should mean that the launching script no longer stops updating while it waits for the launched script to terminate. *nix folks are welcome to suggest better solutions. I updated the imagebutton.py component module to take care of a difference between how Windows and GTK update the bitmap of a wxBitmapButton, which is what ImageButton uses as a delegate. def _setBitmap( self, aValue ) : self._bitmap = aValue bmp = aValue.getBits() self._delegate.SetBitmapLabel(bmp) if wx.wxPlatform != "__WXMSW__": self._delegate.SetBitmapDisabled(bmp) self._delegate.SetBitmapFocus(bmp) self._delegate.SetBitmapSelected(bmp) self._delegate.Refresh() I've posted a note on wx-dev asking whether I found a bug or this behavior is expected. Note that when we move the components to an IS-A class structure instead of the current HAS-A structure where the wxPython controls are delegates of the PythonCard component classes, the wxPython methods above will be exposed so that you can set the separate bitmaps if you want. I just don't want to add methods for that functionality right now since it is a waste of time. It is the same reason I haven't added a combobox, tree control or some of the other wxPython controls. I expect to switch to direct IS-A subclasses Real Soon Now. I changed the worldclock sample to use an Image instead of an ImageButton. I left the tictactoe sample using ImageButtons. That way we have tests that switch bitmaps after initialization with both component types. ka |