Changes so xrced always looks in the module's location for extra files.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -31,6 +31,10 @@ from myxml import *
|
|||||||
# Globals
|
# Globals
|
||||||
testWin = None
|
testWin = None
|
||||||
testWinPos = wxDefaultPosition
|
testWinPos = wxDefaultPosition
|
||||||
|
if __name__ == '__main__':
|
||||||
|
basePath = sys.argv[0]
|
||||||
|
else:
|
||||||
|
basePath = os.path.dirname(__file__)
|
||||||
|
|
||||||
# 1 adds CMD command to Help menu
|
# 1 adds CMD command to Help menu
|
||||||
debug = 0
|
debug = 0
|
||||||
@@ -748,7 +752,7 @@ class XML_Tree(wxTreeCtrl):
|
|||||||
# but it's first child possibly can...
|
# but it's first child possibly can...
|
||||||
child = tree.GetFirstChild(item, 0)[0]
|
child = tree.GetFirstChild(item, 0)[0]
|
||||||
if child.IsOk() and tree.GetPyData(child).__class__ == xxxPanel:
|
if child.IsOk() and tree.GetPyData(child).__class__ == xxxPanel:
|
||||||
# Clean-up before recurcive call or error
|
# Clean-up before recursive call or error
|
||||||
wxMemoryFSHandler_RemoveFile('xxx.xrc')
|
wxMemoryFSHandler_RemoveFile('xxx.xrc')
|
||||||
wxEndBusyCursor()
|
wxEndBusyCursor()
|
||||||
self.CreateTestWin(child)
|
self.CreateTestWin(child)
|
||||||
@@ -1599,7 +1603,7 @@ class Frame(wxFrame):
|
|||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
|
|
||||||
def OnReadme(self, evt):
|
def OnReadme(self, evt):
|
||||||
text = open(os.path.join(sys.path[0], 'README'), 'r').read()
|
text = open(os.path.join(basePath, 'README'), 'r').read()
|
||||||
dlg = ScrolledMessageDialog(self, text, "XRCed README")
|
dlg = ScrolledMessageDialog(self, text, "XRCed README")
|
||||||
dlg.ShowModal()
|
dlg.ShowModal()
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
@@ -1922,7 +1926,7 @@ class App(wxApp):
|
|||||||
import params
|
import params
|
||||||
params.frame = frame
|
params.frame = frame
|
||||||
frame.res = wxXmlResource('')
|
frame.res = wxXmlResource('')
|
||||||
frame.res.Load(os.path.join(sys.path[0], 'xrced.xrc'))
|
frame.res.Load(os.path.join(basePath, 'xrced.xrc'))
|
||||||
|
|
||||||
# Load file after showing
|
# Load file after showing
|
||||||
if args:
|
if args:
|
||||||
|
Reference in New Issue
Block a user