Changeset 823859a in sasview
- Timestamp:
- May 20, 2011 3:10:54 PM (14 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 12cd4ec
- Parents:
- 5e4520c
- Location:
- guiframe
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/__init__.py
rb2629b4 r823859a 30 30 raise RuntimeError('Could not find guiframe images files') 31 31 32 def get_media_path(media): 33 """ 34 """ 35 # Check for data path in the package 36 path = os.path.join(os.path.dirname(__file__), media) 37 if os.path.isdir(path): 38 return path 39 40 # Check for data path next to exe/zip file. 41 # If we are inside a py2exe zip file, we need to go up 42 # to get to the directory containing 43 # the media for this module 44 path = os.path.dirname(__file__) 45 #Look for maximum n_dir up of the current dir to find media 46 n_dir = 12 47 for i in range(n_dir): 48 path, _ = os.path.split(path) 49 media_path = os.path.join(path, media) 50 if os.path.isdir(media_path): 51 module_media_path = os.path.join(media_path, 'guiframe_media') 52 if os.path.isdir(module_media_path): 53 return module_media_path 54 return media_path 55 raise RuntimeError('Could not find guiframe media files') 56 32 57 def data_files(): 33 58 """ … … 42 67 for f in findall(path): 43 68 data_files.append(('images/icons', [f])) 44 path = get_ data_path(media="media")69 path = get_media_path(media="media") 45 70 for f in findall(path): 46 data_files.append(('media ', [f]))71 data_files.append(('media/guiframe_media', [f])) 47 72 return data_files -
guiframe/local_perspectives/data_loader/help_panel.py
rb2629b4 r823859a 7 7 import wx.html as html 8 8 from wx.lib.splitter import MultiSplitterWindow 9 from sans.guiframe import get_ data_path9 from sans.guiframe import get_media_path 10 10 11 11 class HelpWindow(wx.Frame): … … 51 51 size=(500,-1)) 52 52 53 self.path = get_ data_path(media='media')53 self.path = get_media_path(media='media') 54 54 page1 = """<html> 55 55 <body> -
guiframe/local_perspectives/plotting/help_panel.py
r5e4520c r823859a 7 7 import wx.html as html 8 8 from wx.lib.splitter import MultiSplitterWindow 9 from sans.guiframe import get_ data_path9 from sans.guiframe import get_media_path 10 10 11 11 … … 52 52 size=(500,-1)) 53 53 54 self.path = get_ data_path(media='media')54 self.path = get_media_path(media='media') 55 55 56 56 page1 = """<html>
Note: See TracChangeset
for help on using the changeset viewer.