diff --git a/wxPython/wxPython/lib/PyCrust/crust.py b/wxPython/wxPython/lib/PyCrust/crust.py index 45de8b585a..435b1ed64a 100644 --- a/wxPython/wxPython/lib/PyCrust/crust.py +++ b/wxPython/wxPython/lib/PyCrust/crust.py @@ -56,9 +56,8 @@ class CrustFrame(wxFrame, ShellMenu): intro += '\nSponsored by Orbtech - Your source for Python programming expertise.' self.CreateStatusBar() self.SetStatusText(intro.replace('\n', ', ')) - filename = os.path.join(os.path.dirname(__file__), 'PyCrust.ico') - icon = wxIcon(filename, wxBITMAP_TYPE_ICO) - self.SetIcon(icon) + import images + self.SetIcon(images.getPyCrustIcon()) self.crust = Crust(parent=self, intro=intro, \ rootObject=rootObject, \ rootLabel=rootLabel, \ diff --git a/wxPython/wxPython/lib/PyCrust/images.py b/wxPython/wxPython/lib/PyCrust/images.py new file mode 100644 index 0000000000..375e2004fd --- /dev/null +++ b/wxPython/wxPython/lib/PyCrust/images.py @@ -0,0 +1,71 @@ +#---------------------------------------------------------------------- +# This file was generated by ../scripts/img2py +# +from wxPython.wx import wxImageFromStream, wxBitmapFromImage +from wxPython.wx import wxEmptyIcon +import cStringIO + + +def getPyCrustData(): + return \ +'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\x00\ +\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x04\ +\x95IDATx\x9c\xed\x97?lSG\x1c\xc7?\x97\x98\xd8Q\xa3\xdeY\xa2j\x06\xa4\xf7"QJ\ +\xbb<3@\x01\xa9\xc2\x0c\xa8!\x1d\x1c6\xcaB\xa8D[uI2\xf4\x8f\xe8\x103\xb4\xa2\ +,5\x0b\x03\x032C\xab\xc0\x92dh:t\xc0)*E\xcd@Y\x1c#\x97\xddCUk\xf4B\x8d3\x9f\x8d\x9a\x9bU%\xe2~b\xab\xdf\x82\ +\x83N+\xd3\xe92\\\x1f\xcf\x93\xdd\x9f\xa1\x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\x8c\x05(|\xd8\ +N\xba\xb3\xab\x87\xfb\x8f\x97\xd8\xd9\xd5\x03\xc0\xfd\xc7K\xec\xd8\xd6\xdd\ +\xfc\xfd\xc1r\xd0\xf4\x01\xda~\x03H\xf4\x04\xd4j :\xb75\xc7\xae\xfd\xbcLW\ +\xda\xa5\xf0M\x1e\t\xcc\xcc\xcdq\xa9P@\x8c\xf5fL\xdaHF\x16g\x9a\x19\xad\xcc\ +\xee\xcb\xa3\n\xad\xa1\xda\xf1\x08\xef\xe5\x97x\xf8\xc8f\xf8\xc7\x93:\xdb;\ +\x93M\xc8\x08j\xc7\xb6n\x1e,\x07m`\x97o\x04|;>\xd1T\xc4\x17\x8a\x13\xb9\xc3\ +\x88\x01\x0fs\xa4\x9cc}\xf3A\x190\x82\x1f\xddR{-\x1bV\xfc\xd8f\xba\xbd3\xd9\ +\x06\x15\x07\xbb\xf8\xd3\x12\xdf]-"\x93\xb2\xb1C*\xde\xcd\x1d\xde\xccN(\xc1\ +\xae\x17"\xd0#+>> shell.run('print "this"') >>> print "this" this - >>> + >>> """ # Go to the very bottom of the text. endpos = self.GetTextLength() - self.SetCurrentPos(endpos) + self.SetCurrentPos(endpos) command = command.rstrip() if prompt: self.prompt() if verbose: self.write(command) @@ -791,9 +791,9 @@ class Shell(wxStyledTextCtrl): def autoCompleteShow(self, command): """Display auto-completion popup list.""" - list = self.interp.getAutoCompleteList(command, - includeMagic=self.autoCompleteIncludeMagic, - includeSingle=self.autoCompleteIncludeSingle, + list = self.interp.getAutoCompleteList(command, + includeMagic=self.autoCompleteIncludeMagic, + includeSingle=self.autoCompleteIncludeSingle, includeDouble=self.autoCompleteIncludeDouble) if list: options = ' '.join(list) @@ -957,7 +957,7 @@ class Shell(wxStyledTextCtrl): command += '\n' command += line commands.append(command) - for command in commands: + for command in commands: command = command.replace('\n', os.linesep + sys.ps2) self.write(command) self.processLine() @@ -972,7 +972,7 @@ class Shell(wxStyledTextCtrl): def zoom(self, points=0): """Set the zoom level. - + This number of points is added to the size of all fonts. It may be positive to magnify or negative to reduce.""" self.SetZoom(points) @@ -1169,9 +1169,8 @@ class ShellFrame(wxFrame, ShellMenu): intro += '\nSponsored by Orbtech - Your source for Python programming expertise.' self.CreateStatusBar() self.SetStatusText(intro.replace('\n', ', ')) - filename = os.path.join(os.path.dirname(__file__), 'PyCrust.ico') - icon = wxIcon(filename, wxBITMAP_TYPE_ICO) - self.SetIcon(icon) + import images + self.SetIcon(images.getPyCrustIcon()) self.shell = Shell(parent=self, id=-1, introText=intro, \ locals=locals, InterpClass=InterpClass, \ *args, **kwds) diff --git a/wxPython/wxPython/tools/XRCed/xrced.py b/wxPython/wxPython/tools/XRCed/xrced.py index 7e6c2797a8..9c81402bd5 100644 --- a/wxPython/wxPython/tools/XRCed/xrced.py +++ b/wxPython/wxPython/tools/XRCed/xrced.py @@ -1000,8 +1000,10 @@ class Frame(wxFrame): frame = self wxFrame.__init__(self, None, -1, '', pos, size) self.CreateStatusBar() - progpath = os.path.split(__file__)[0] - icon = wxIcon(os.path.join(progpath, 'xrced.ico'), wxBITMAP_TYPE_ICO) + #progpath = os.path.split(__file__)[0] + #icon = wxIcon(os.path.join(progpath, 'xrced.ico'), wxBITMAP_TYPE_ICO) + icon = wxEmptyIcon() + icon.CopyFromBitmap(images.getIconBitmap()) self.SetIcon(icon) # Idle flag