Changeset 4f1791e in sasview


Ignore:
Timestamp:
Feb 17, 2015 10:17:30 AM (10 years ago)
Author:
smk78
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:
2b7d102
Parents:
cd06a5f (diff), 0c4bca6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasview.git

Location:
src
Files:
136 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/guiframe/documentation_window.py

    r79492222 ra4340d1  
     1import os 
     2import logging 
    13import wx 
    24from wx import Frame 
    3  
     5import webbrowser 
    46wx_supports_html2 = float(wx.__version__[:3]) >= 2.9 
    57if wx_supports_html2: 
     
    810    import wx.html as html 
    911 
     12    
    1013class DocumentationWindow(Frame): 
    1114    def __init__(self, parent, id, path, title='Help', size=(850, 540)): 
    1215        Frame.__init__(self, parent, id, title, size=size) 
    1316 
    14         if wx_supports_html2: 
     17        SPHINX_DOC_ENV = "SASVIEW_DOC_PATH" 
     18        if SPHINX_DOC_ENV in os.environ: 
     19            docs_path = os.path.join(os.environ[SPHINX_DOC_ENV]) 
     20        else: 
     21            docs_path = os.path.join(PATH_APP, "..", "..", "doc") 
     22 
     23        if (not os.path.exists(docs_path)): 
     24            print "logging" 
     25            logging.error("Could not find Sphinx documentation at %s \ 
     26            -- has it been built?", docs_path) 
     27 
     28        elif wx_supports_html2: 
    1529            # Complete HTML/CSS support! 
    1630            self.view = html.WebView.New(self) 
    17             self.view.LoadURL("file://" + path) 
    18         else: 
    19             # This ain't gonna be pretty... 
    20             self.view = html.HtmlWindow(self, -1, style=wx.NO_BORDER) 
    21             self.view.LoadPage(path) 
     31            self.view.LoadURL("file://" + docs_path + '\\' + path) 
     32            self.Show() 
     33        else:  
     34            #For cases that do not build against current version dependency 
     35            # Wx 3.0 we provide a webbrowser call - this is particularly for  
     36            #Red hat used at SNS for which Wx 3.0 is not available.  This 
     37            #does not deal with issue of math in docs of course.  
     38 
     39            webbrowser.open_new_tab("file:///" + docs_path + "/" + path) 
     40 
     41  
  • src/sas/guiframe/gui_manager.py

    r9bbb627 ra4340d1  
    2424import logging 
    2525import httplib 
    26 import webbrowser 
    2726 
    2827 
     
    21532152    def _onSphinxDocs(self, evt): 
    21542153        """ 
    2155         Bring up Sphinx Documentation.  If Wx 2.9 or higher is installed  
    2156         with proper HTML support then Pop up a Sphinx Documentation dialog 
    2157         locally.  If not pop up a new tab in the default system browser  
    2158         calling the documentation website. 
     2154        Bring up Sphinx Documentation at top level whenever the menu item 
     2155        'documentation' is clicked. Calls DocumentationWindow with the top 
     2156        level path of "index.html" 
    21592157         
    21602158        :param evt: menu event 
     
    21622160        # Running SasView "in-place" using run.py means the docs will be in a 
    21632161        # different place than they would otherwise. 
    2164  
    2165         show_sphinx_docs = float(wx.__version__[:3]) >= 2.9 
    2166         if show_sphinx_docs: 
    2167             SPHINX_DOC_ENV = "SASVIEW_DOC_PATH" 
    2168             if SPHINX_DOC_ENV in os.environ: 
    2169                 docs_path = os.path.join(os.environ[SPHINX_DOC_ENV], "index.html") 
    2170             else: 
    2171                 docs_path = os.path.join(PATH_APP, "..", "..", "doc", "index.html") 
    2172  
    2173             if os.path.exists(docs_path): 
    2174                 from documentation_window import DocumentationWindow 
    2175  
    2176                 sphinx_doc_viewer = DocumentationWindow(None, -1, docs_path) 
    2177                 sphinx_doc_viewer.Show() 
    2178             else: 
    2179                 logging.error("Could not find Sphinx documentation at '%' -- has it been built?" % docs_path) 
    2180         else: 
    2181             #For red hat and maybe others who do not have Wx 3.0 
    2182             #just send to webpage of documentation 
    2183             webbrowser.open_new_tab('http://www.sasview.org/sasview') 
     2162        from documentation_window import DocumentationWindow 
     2163         
     2164        sphinx_doc_viewer = DocumentationWindow(self, -1, "index.html") 
     2165#        sphinx_doc_viewer.Show() 
     2166 
    21842167 
    21852168    def set_manager(self, manager): 
  • src/sas/models/media/model_functions.rst

    r98b30b4 rcd06a5f  
    8787 
    8888 2.1 Shape-based_ Functions 
     89  
    8990 2.2 Shape-independent_ Functions 
     91  
    9092 2.3 Structure-factor_ Functions 
     93  
    9194 2.4 Customised_ Functions 
    9295 
Note: See TracChangeset for help on using the changeset viewer.