dabo Commit
Revision 4160
Date: 2008-06-18 23:39:09 -0700 (Wed, 18 Jun 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4160
Changed:
U trunk/dabo/ui/uiwx/__init__.py
Log:
Changed strToBmp() to use app.HomeDirectory as the cwd, if there's an app
defined,
as app.HomeDirectory always refers to the app's root directory, even if the
cwd is somewhere else, even if the app is frozen with py2exe.
Diff:
Modified: trunk/dabo/ui/uiwx/__init__.py
===================================================================
--- trunk/dabo/ui/uiwx/__init__.py 2008-06-19 02:47:56 UTC (rev 4159)
+++ trunk/dabo/ui/uiwx/__init__.py 2008-06-19 06:39:09 UTC (rev 4160)
@@ -1380,6 +1380,11 @@
final image will be a bitmap resized to those specs.
"""
ret = None
+ cwd = os.getcwd()
+ app = dabo.dAppRef
+ if app:
+ cwd = app.HomeDirectory
+
try:
ret = _bmpCache[val]
except KeyError:
@@ -1391,7 +1396,7 @@
for pth in dabo.icons.__path__]
dabopaths = [os.path.join(pth, val)
for pth in dabo.__path__]
- localpaths = [os.path.join(os.getcwd(), pth, val)
+ localpaths = [os.path.join(cwd, pth, val)
for pth in ("icons", "resources")]
# Create a list of the places to search for the image,
with
# the most likely choices first.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]