Changeset 08e1912 in sasview
- Timestamp:
- May 2, 2011 5:07:22 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:
- d34f9f6
- Parents:
- 53fc7636
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
r53fc7636 r08e1912 16 16 import sys 17 17 import xml 18 if sys.platform.count("darwin")==0: 19 ON_MAC = False 20 else: 21 ON_MAC = True 18 22 19 try: 23 20 # Try to find a local config … … 2204 2201 self.s_screen = None 2205 2202 try: 2206 if not ON_MAC: 2207 # make sure the current dir is App dir when it starts 2208 temp_path = os.path.dirname(os.path.sys.path[0]) 2209 os.chdir(temp_path) 2203 # make sure the current dir is App dir when it starts 2204 temp_path = os.path.dirname(os.path.sys.path[0]) 2205 os.chdir(temp_path) 2210 2206 except: 2211 2207 pass -
sansview/perspectives/fitting/help_panel.py
r23ccf07 r08e1912 5 5 from wx.lib.splitter import MultiSplitterWindow 6 6 import os 7 import sys8 7 9 8 10 9 class HelpWindow(wx.Frame): 11 10 """ … … 16 15 contains help info 17 16 """ 18 path = os.path.dirname(__file__) 19 temp_path = os.path.join(path,'images') 20 ico_file = os.path.join(temp_path,'ball.ico') 21 if os.path.isfile(ico_file): 22 self.SetIcon(wx.Icon(ico_file, wx.BITMAP_TYPE_ICO)) 23 else: 24 temp_path = os.path.join(os.getcwd(),'images') 25 ico_file = os.path.join(temp_path,'ball.ico') 26 if os.path.isfile(ico_file): 27 self.SetIcon(wx.Icon(ico_file, wx.BITMAP_TYPE_ICO)) 28 else: 29 ico_file = os.path.join(os.path.dirname(os.path.sys.path[0]), 30 'images', 'ball.ico') 31 if os.path.isfile(ico_file): 32 self.SetIcon(wx.Icon(ico_file, wx.BITMAP_TYPE_ICO)) 33 17 34 18 splitter = MultiSplitterWindow(self, style=wx.SP_LIVE_UPDATE) 35 19 rpanel = wx.Panel(splitter, -1) … … 68 52 # get the media path 69 53 path = models.get_data_path(media='media') 70 if not os.path.isdir(path):71 path = os.path.dirname(os.path.sys.path[0])72 54 self.path = os.path.join(path,"model_functions.html") 73 55 self.path_pd = os.path.join(path,"pd_help.html") … … 79 61 </body> 80 62 </html>""" 81 82 if not os.path.isfile(os.path.join(path, "change_scale_help.html")): 83 path = os.path.join(os.path.dirname(os.path.sys.path[0]), 'media') 84 page = """<html> 63 page="""<html> 85 64 <body> 86 65 <ul> 87 <li><a href ="%s" target ="showframe">Change Scale</a><br></li> 88 """ % str(os.path.join(path, "change_scale_help.html")) 89 page += """ 90 <li><a href ="%s" target ="showframe">Graph Help</a><br></li> 91 """ % str(os.path.join(path, "reset_Graph_help.html")) 92 page += """ 93 <li><a href ="%s" target ="showframe">Status Bar Help</a><br></li> 94 """ % str(os.path.join(path, "status_bar_help.html")) 95 page += """ 96 <li><a href ="%s" target ="showframe">Load a File</a><br></li> 97 """ % str(os.path.join(path, "load_data_help.html")) 98 page += """ 99 <li><a href ="%s" 100 target ="showframe">Simultaneous Fit</a><br></li> 101 """ % str(os.path.join(path, "simultaneous_fit_help.html")) 102 page += """ 103 <li><a href ="%s" 104 target ="showframe">Single Fit</a><br></li> 105 """ % str(os.path.join(path, "single_fit_help.html")) 106 page += """ 107 <li><a href ="%s" 108 target ="showframe">Visualize Model</a><br></li> 109 """ % str(os.path.join(path, "model_use_help.html")) 110 page += """ 111 <li><a href ="%s" 112 target ="showframe">Data Averaging</a><br></li> 113 """ % str(os.path.join(path, "averaging_help.html")) 114 page += """ 66 <li><a href ="media/change_scale_help.html" target ="showframe">Change Scale</a><br></li> 67 <li><a href ="media/reset_Graph_help.html" target ="showframe">Graph Help</a><br></li> 68 <li><a href ="media/status_bar_help.html" target ="showframe">Status Bar Help</a><br></li> 69 <li><a href ="media/load_data_help.html" target ="showframe">Load a File</a><br></li> 70 <li><a href ="media/simultaneous_fit_help.html" target ="showframe">Simultaneous Fit</a><br></li> 71 <li><a href ="media/single_fit_help.html" target ="showframe">Single Fit</a><br></li> 72 <li><a href ="media/model_use_help.html" target ="showframe">Visualize Model</a><br></li> 73 <li><a href ="media/averaging_help.html" target ="showframe">Data Averaging</a><br></li> 115 74 <li><a href ="%s" target ="showframe">Model Functions</a><br></li> 116 """ % str(self.path) 117 page += """<li><a href ="%s" target ="showframe"> 118 Polydispersion Distributions</a><br></li> 119 """ % str(self.path_pd) 120 page += """ 75 <li><a href ="%s" target ="showframe">Polydispersion Distributions</a><br></li> 121 76 <li><a href ="%s" target ="showframe">Smear Computation</a><br></li> 122 """ % str(self.path_sm) 123 page += """<li><a href ="%s" 124 target ="showframe">Key Combination</a><br></li> 77 <li><a href ="media/key_help.html" target ="showframe">Key Combination</a><br></li> 125 78 </ul> 126 79 </body> 127 </html>""" % str(os.path.join(path, "key_help.html"))80 </html>""" % (self.path, self.path_pd, self.path_sm) 128 81 129 82 self.rhelp.SetPage(page1)
Note: See TracChangeset
for help on using the changeset viewer.