[Commits] (john) Changed working directory to the chandler
directory so we don't need to prefix each path with the
chandler directory. This also works around a bug in wing 2.0 beta
commits at osafoundation.org
commits at osafoundation.org
Thu May 20 18:34:43 PDT 2004
Commit by: john
Modified files:
chandler/parcels/osaf/framework/blocks/ControlBlocks.py 1.31 1.32
chandler/application/Application.py 1.223 1.224
Log message:
Changed working directory to the chandler directory so we don't need to prefix each path with the chandler directory. This also works around a bug in wing 2.0 beta
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/ControlBlocks.py.diff?r1=text&tr1=1.31&r2=text&tr2=1.32
http://cvs.osafoundation.org/index.cgi/chandler/application/Application.py.diff?r1=text&tr1=1.223&r2=text&tr2=1.224
Index: chandler/parcels/osaf/framework/blocks/ControlBlocks.py
diff -u chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.31 chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.32
--- chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.31 Thu May 20 17:36:37 2004
+++ chandler/parcels/osaf/framework/blocks/ControlBlocks.py Thu May 20 18:34:12 2004
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.31 $"
-__date__ = "$Date: 2004/05/21 00:36:37 $"
+__version__ = "$Revision: 1.32 $"
+__date__ = "$Date: 2004/05/21 01:34:12 $"
__copyright__ = "Copyright (c) 2003 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -29,7 +29,7 @@
wx.DefaultPosition,
(self.minimumSize.width, self.minimumSize.height))
elif self.buttonKind == "Image":
- image = wx.Image(os.path.join(Globals.chandlerDirectory, self.icon),
+ image = wx.Image(self.icon,
wx.BITMAP_TYPE_PNG)
bitmap = image.ConvertToBitmap()
button = wx.BitmapButton(parentWindow, id, bitmap,
@@ -144,7 +144,7 @@
(self.minimumSize.width,
self.minimumSize.height))
if self.url:
- htmlWindow.LoadPage(os.path.join(Globals.chandlerDirectory, self.url))
+ htmlWindow.LoadPage(self.url)
self.parentBlock.addToContainer(parent,
htmlWindow,
@@ -577,7 +577,7 @@
toolbar = Globals.repository.find(wxToolbar.blockUUID)
id = Block.getWidgetID(self)
if self.toolbarItemKind == 'Button':
- bitmap = wx.Image (os.path.join(Globals.chandlerDirectory, self.bitmap),
+ bitmap = wx.Image (self.bitmap,
wx.BITMAP_TYPE_PNG).ConvertToBitmap()
tool = wxToolbar.AddSimpleTool (id, bitmap,
self.title, self.statusMessage)
Index: chandler/application/Application.py
diff -u chandler/application/Application.py:1.223 chandler/application/Application.py:1.224
--- chandler/application/Application.py:1.223 Thu May 20 17:18:02 2004
+++ chandler/application/Application.py Thu May 20 18:34:13 2004
@@ -1,5 +1,5 @@
-__version__ = "$Revision: 1.223 $"
-__date__ = "$Date: 2004/05/21 00:18:02 $"
+__version__ = "$Revision: 1.224 $"
+__date__ = "$Date: 2004/05/21 01:34:13 $"
__copyright__ = "Copyright (c) 2003 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -136,6 +136,7 @@
sys.displayhook = _displayHook
Globals.chandlerDirectory = os.path.dirname (os.path.abspath (sys.argv[0]))
+ os.chdir (Globals.chandlerDirectory)
assert Globals.wxApplication == None, "We can have only one application"
Globals.wxApplication = self
self.ignoreSynchronizeWidget = False
@@ -144,9 +145,7 @@
"""
Splash Screen
"""
- splashFile = os.path.join(Globals.chandlerDirectory,
- "application", "images", "splash.png")
- splashBitmap = wx.Image(splashFile, wx.BITMAP_TYPE_PNG).ConvertToBitmap()
+ splashBitmap = wx.Image("application/images/splash.png", wx.BITMAP_TYPE_PNG).ConvertToBitmap()
splash = wx.SplashScreen(splashBitmap,
wx.SPLASH_CENTRE_ON_SCREEN|wx.SPLASH_TIMEOUT,
6000, None, -1, wx.DefaultPosition, wx.DefaultSize,
@@ -166,7 +165,7 @@
"""
# wx.Locale_AddCatalogLookupPathPrefix('locale')
# self.locale.AddCatalog('Chandler.mo')
- gettext.install('chandler', os.path.join (Globals.chandlerDirectory, 'locale'))
+ gettext.install('chandler', 'locale')
"""
Load the parcels which are contained in the PARCEL_IMPORT directory.
It's necessary to add the "parcels" directory to sys.path in order
@@ -194,9 +193,7 @@
Load the Repository after the path has been altered, but before
the parcels are loaded.
"""
- repositoryPath = os.path.join(Globals.chandlerDirectory,
- "__repository__")
- Globals.repository = XMLRepository(repositoryPath)
+ Globals.repository = XMLRepository("__repository__")
kwds = { 'stderr': '-stderr' in sys.argv,
'ramdb': '-ramdb' in sys.argv,
@@ -213,9 +210,7 @@
Bootstrap an empty repository by loading only the stuff that
can't be loaded in a data parcel.
"""
- Globals.repository.loadPack(os.path.join(Globals.chandlerDirectory,
- "repository", "packs",
- "schema.pack"))
+ Globals.repository.loadPack("repository/packs/schema.pack")
# Load Parcels
parcelSearchPath = parcelDir
More information about the Commits
mailing list