Some little tweaks to PyCrust
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,8 +13,10 @@ class App(wxApp):
|
|||||||
"""PyCrust standalone application."""
|
"""PyCrust standalone application."""
|
||||||
|
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
|
wxInitAllImageHandlers()
|
||||||
locals = {'__app__': 'PyCrust Standalone Application'}
|
locals = {'__app__': 'PyCrust Standalone Application'}
|
||||||
self.crustFrame = CrustFrame(locals=locals)
|
self.crustFrame = CrustFrame(locals=locals)
|
||||||
|
self.crustFrame.SetSize((750, 525))
|
||||||
self.crustFrame.Show(true)
|
self.crustFrame.Show(true)
|
||||||
self.SetTopWindow(self.crustFrame)
|
self.SetTopWindow(self.crustFrame)
|
||||||
# Add the application object to the sys module's namespace.
|
# Add the application object to the sys module's namespace.
|
||||||
|
@@ -13,8 +13,10 @@ class App(wxApp):
|
|||||||
"""PyShell standalone application."""
|
"""PyShell standalone application."""
|
||||||
|
|
||||||
def OnInit(self):
|
def OnInit(self):
|
||||||
|
wxInitAllImageHandlers()
|
||||||
locals = {'__app__': 'PyShell Standalone Application'}
|
locals = {'__app__': 'PyShell Standalone Application'}
|
||||||
self.shellFrame = ShellFrame(locals=locals)
|
self.shellFrame = ShellFrame(locals=locals)
|
||||||
|
self.shellFrame.SetSize((750, 525))
|
||||||
self.shellFrame.Show(true)
|
self.shellFrame.Show(true)
|
||||||
self.SetTopWindow(self.shellFrame)
|
self.SetTopWindow(self.shellFrame)
|
||||||
# Add the application object to the sys module's namespace.
|
# Add the application object to the sys module's namespace.
|
||||||
|
@@ -55,11 +55,12 @@ class CrustFrame(wxFrame, ShellMenu):
|
|||||||
intro += '\nSponsored by Orbtech - Your source for Python programming expertise.'
|
intro += '\nSponsored by Orbtech - Your source for Python programming expertise.'
|
||||||
self.CreateStatusBar()
|
self.CreateStatusBar()
|
||||||
self.SetStatusText(intro.replace('\n', ', '))
|
self.SetStatusText(intro.replace('\n', ', '))
|
||||||
if wxPlatform == '__WXMSW__':
|
|
||||||
import os
|
import os
|
||||||
filename = os.path.join(os.path.dirname(__file__), 'PyCrust.ico')
|
filename = os.path.join(os.path.dirname(__file__), 'PyCrust.ico')
|
||||||
icon = wxIcon(filename, wxBITMAP_TYPE_ICO)
|
icon = wxIcon(filename, wxBITMAP_TYPE_ICO)
|
||||||
self.SetIcon(icon)
|
self.SetIcon(icon)
|
||||||
|
|
||||||
self.crust = Crust(parent=self, intro=intro, \
|
self.crust = Crust(parent=self, intro=intro, \
|
||||||
rootObject=rootObject, \
|
rootObject=rootObject, \
|
||||||
rootLabel=rootLabel, \
|
rootLabel=rootLabel, \
|
||||||
|
@@ -1124,11 +1124,12 @@ class ShellFrame(wxFrame, ShellMenu):
|
|||||||
intro += '\nSponsored by Orbtech - Your source for Python programming expertise.'
|
intro += '\nSponsored by Orbtech - Your source for Python programming expertise.'
|
||||||
self.CreateStatusBar()
|
self.CreateStatusBar()
|
||||||
self.SetStatusText(intro.replace('\n', ', '))
|
self.SetStatusText(intro.replace('\n', ', '))
|
||||||
if wxPlatform == '__WXMSW__':
|
|
||||||
import os
|
import os
|
||||||
filename = os.path.join(os.path.dirname(__file__), 'PyCrust.ico')
|
filename = os.path.join(os.path.dirname(__file__), 'PyCrust.ico')
|
||||||
icon = wxIcon(filename, wxBITMAP_TYPE_ICO)
|
icon = wxIcon(filename, wxBITMAP_TYPE_ICO)
|
||||||
self.SetIcon(icon)
|
self.SetIcon(icon)
|
||||||
|
|
||||||
self.shell = Shell(parent=self, id=-1, introText=intro, \
|
self.shell = Shell(parent=self, id=-1, introText=intro, \
|
||||||
locals=locals, InterpClass=InterpClass, \
|
locals=locals, InterpClass=InterpClass, \
|
||||||
*args, **kwds)
|
*args, **kwds)
|
||||||
|
Reference in New Issue
Block a user