Changeset 4160

Show
Ignore:
Timestamp:
06/18/08 23:39:09 (4 months ago)
Author:
paul
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/ui/uiwx/__init__.py

    r4115 r4160  
    13811381    """ 
    13821382    ret = None 
     1383    cwd = os.getcwd() 
     1384    app = dabo.dAppRef 
     1385    if app: 
     1386        cwd = app.HomeDirectory 
     1387 
    13831388    try: 
    13841389        ret = _bmpCache[val] 
     
    13921397            dabopaths = [os.path.join(pth, val) 
    13931398                    for pth in dabo.__path__] 
    1394             localpaths = [os.path.join(os.getcwd(), pth, val) 
     1399            localpaths = [os.path.join(cwd, pth, val) 
    13951400                    for pth in ("icons", "resources")] 
    13961401            # Create a list of the places to search for the image, with