[Commits] (jed) Fixed problem where html page wasn't being found
when run from within Wing 2.0.
commits at osafoundation.org
commits at osafoundation.org
Wed May 19 23:57:47 PDT 2004
Commit by: jed
Modified files:
chandler/parcels/osaf/framework/blocks/ControlBlocks.py 1.26 1.27
Log message:
Fixed problem where html page wasn't being found when run from within Wing 2.0.
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/ControlBlocks.py.diff?r1=text&tr1=1.26&r2=text&tr2=1.27
Index: chandler/parcels/osaf/framework/blocks/ControlBlocks.py
diff -u chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.26 chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.27
--- chandler/parcels/osaf/framework/blocks/ControlBlocks.py:1.26 Wed May 19 19:37:15 2004
+++ chandler/parcels/osaf/framework/blocks/ControlBlocks.py Wed May 19 23:57:17 2004
@@ -1,9 +1,10 @@
-__version__ = "$Revision: 1.26 $"
-__date__ = "$Date: 2004/05/20 02:37:15 $"
+__version__ = "$Revision: 1.27 $"
+__date__ = "$Date: 2004/05/20 06:57:17 $"
__copyright__ = "Copyright (c) 2003 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
import time
+import os
import application.Globals as Globals
from application.Application import mixinAClass
from Block import *
@@ -28,7 +29,8 @@
wx.DefaultPosition,
(self.minimumSize.width, self.minimumSize.height))
elif self.buttonKind == "Image":
- image = wx.Image(self.icon, wx.BITMAP_TYPE_PNG)
+ image = wx.Image(os.path.join(Globals.chandlerDirectory, self.icon),
+ wx.BITMAP_TYPE_PNG)
bitmap = image.ConvertToBitmap()
button = wx.BitmapButton(parentWindow, id, bitmap,
wx.DefaultPosition,
@@ -142,8 +144,8 @@
(self.minimumSize.width,
self.minimumSize.height))
if self.url:
- htmlWindow.LoadPage(self.url)
-
+ htmlWindow.LoadPage(os.path.join(Globals.chandlerDirectory, self.url))
+
self.parentBlock.addToContainer(parent,
htmlWindow,
self.stretchFactor,
@@ -575,7 +577,8 @@
toolbar = Globals.repository.find(wxToolbar.counterpartUUID)
id = Block.getwxID(self)
if self.toolbarItemKind == 'Button':
- bitmap = wx.Image (self.bitmap, wx.BITMAP_TYPE_PNG).ConvertToBitmap()
+ bitmap = wx.Image (os.path.join(Globals.chandlerDirectory, self.bitmap),
+ wx.BITMAP_TYPE_PNG).ConvertToBitmap()
tool = wxToolbar.AddSimpleTool (id, bitmap,
self.title, self.statusMessage)
parentWindow.Bind(wx.EVT_TOOL, toolbar.toolPressed, id=id)
More information about the Commits
mailing list