Changeset 3db44fb in sasview for src/sas/perspectives


Ignore:
Timestamp:
Jun 7, 2015 9:33:19 PM (9 years ago)
Author:
butler
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:
4b5fe655
Parents:
f06bbf5
Message:

1) Fixed second issue that was caused by the recent cleanup of
DocumentationWindow?: loading html at anchor point for context help
(broken). In order to preserve the cleanup, the class was refactored to
take another parameter: html instruction string. This keeps it general
to accept not only the # anchor but alos queries of all sorts in the
future. Thus all modules using this class were also edited to match.

2) in process of editing the dozen or so instances did a bit of code
cleanup and pylint cleanup.

Location:
src/sas/perspectives
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/calculator/data_operator.py

    ra27e8b8 r3db44fb  
    635635 
    636636        _TreeLocation = "user/perspectives/calculator/data_operator_help.html" 
    637         _doc_viewer = DocumentationWindow(self, -1, \ 
    638              _TreeLocation, "Data Operation Help") 
     637        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     638                                         "Data Operation Help") 
    639639 
    640640    def disconnect_panels(self): 
  • src/sas/perspectives/calculator/density_panel.py

    rd5419f7f r3db44fb  
    385385 
    386386        _TreeLocation = "user/perspectives/calculator/density_calculator_help.html" 
    387         _doc_viewer = DocumentationWindow(self, -1, \ 
    388              _TreeLocation, "Density/Volume Calculator Help") 
     387        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     388                                         "Density/Volume Calculator Help") 
    389389 
    390390    def on_close(self, event): 
  • src/sas/perspectives/calculator/gen_scatter_panel.py

    rd5419f7f r3db44fb  
    914914 
    915915        _TreeLocation = "user/perspectives/calculator/sas_calculator_help.html" 
    916         _doc_viewer = DocumentationWindow(self, -1, \ 
    917              _TreeLocation, "General Scattering Calculator Help") 
     916        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     917                                         "General Scattering Calculator Help") 
    918918 
    919919    def _check_value(self): 
  • src/sas/perspectives/calculator/image_viewer.py

    r49ab5d7 r3db44fb  
    150150 
    151151        _TreeLocation = "user/perspectives/calculator/image_viewer_help.html" 
    152         _doc_viewer = DocumentationWindow(self, -1, \ 
    153              _TreeLocation, "Image Viewer Help") 
     152        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     153                                         "Image Viewer Help") 
    154154 
    155155 
  • src/sas/perspectives/calculator/kiessig_calculator_panel.py

    rd5419f7f r3db44fb  
    173173    """ 
    174174        _TreeLocation = "user/perspectives/calculator/kiessig_calculator_help.html" 
    175         _doc_viewer = DocumentationWindow(self, -1, 
    176                                           _TreeLocation, 
     175        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
    177176                                          "Density/Volume Calculator Help") 
    178177 
  • src/sas/perspectives/calculator/resolution_calculator_panel.py

    rd5419f7f r3db44fb  
    642642 
    643643        _TreeLocation = "user/perspectives/calculator/resolution_calculator_help.html" 
    644         _doc_viewer = DocumentationWindow(self, -1, 
    645                                           _TreeLocation, "Resolution Calculator Help") 
     644        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     645                                          "Resolution Calculator Help") 
    646646 
    647647    def on_close(self, event): 
  • src/sas/perspectives/calculator/sld_panel.py

    rd5419f7f r3db44fb  
    326326 
    327327        _TreeLocation = "user/perspectives/calculator/sld_calculator_help.html" 
    328         _doc_viewer = DocumentationWindow(self, -1, \ 
    329              _TreeLocation, "General Scattering Calculator Help") 
     328        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     329                                         "General Scattering Calculator Help") 
    330330 
    331331    def on_close(self, event): 
  • src/sas/perspectives/calculator/slit_length_calculator_panel.py

    rd5419f7f r3db44fb  
    187187 
    188188        _TreeLocation = "user/perspectives/calculator/slit_calculator_help.html" 
    189         _doc_viewer = DocumentationWindow(self, -1, \ 
    190              _TreeLocation, "Slit Length Calculator Help") 
     189        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     190                                         "Slit Length Calculator Help") 
    191191 
    192192    def on_close(self, event): 
  • src/sas/perspectives/fitting/basepage.py

    r373d4ee r3db44fb  
    28472847        """ 
    28482848 
    2849         if self.model == None: 
    2850             name = 'index.html' 
     2849        _TreeLocation = 'user/models/model_functions.html' 
     2850        if self.model != None: 
     2851            name = self.formfactorbox.GetValue() 
     2852            _PageAnchor = '#' + name 
     2853            _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, 
     2854                                              _PageAnchor, name + "Help") 
    28512855        else: 
    2852             name = self.formfactorbox.GetValue() 
    2853  
    2854         if self.model != None: 
    2855             _docspath = 'user/models/model_functions.html#' + name 
    2856             _doc_viewer = DocumentationWindow(self, -1, _docspath, name + "Help") 
    2857         else: 
    2858             _doc_viewer = DocumentationWindow(self, -1, "index.html", \ 
    2859                                                 "General Help") 
     2856            _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     2857                                                "General Model Help") 
    28602858 
    28612859 
     
    29082906 
    29092907        _TreeLocation = "_images/M_angles_pic.bmp" 
    2910         _doc_viewer = DocumentationWindow(self, -1, \ 
    2911              _TreeLocation, "Magnetic Angle Defintions") 
     2908        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     2909                                         "Magnetic Angle Defintions") 
    29122910 
    29132911    def _on_mag_on(self, event): 
     
    29542952 
    29552953        _TreeLocation = "user/perspectives/fitting/fitting_help.html" 
    2956         _TreeLocation += "#polydispersity-distributions" 
    2957         _doc_viewer = DocumentationWindow(self, -1, \ 
    2958              _TreeLocation, "Polydispersity Help") 
     2954        _PageAnchor = "#polydispersity-distributions" 
     2955        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, 
     2956                                          _PageAnchor, "Polydispersity Help") 
    29592957 
    29602958    def on_left_down(self, event): 
  • src/sas/perspectives/invariant/invariant_panel.py

    rcce0ad3 r3db44fb  
    18931893 
    18941894        _TreeLocation = "user/perspectives/invariant/invariant_help.html" 
    1895         _doc_viewer = DocumentationWindow(self, -1, \ 
    1896              _TreeLocation, "Invariant Help") 
     1895        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     1896                                         "Invariant Help") 
    18971897 
    18981898 
  • src/sas/perspectives/pr/inversion_panel.py

    r3d250da3 r3db44fb  
    958958 
    959959        _TreeLocation = "user/perspectives/pr/pr_help.html" 
    960         _doc_viewer = DocumentationWindow(self, -1, \ 
    961              _TreeLocation, "P(r) Help") 
     960        _doc_viewer = DocumentationWindow(self, -1, _TreeLocation, "", 
     961                                         "P(r) Help") 
    962962 
    963963 
Note: See TracChangeset for help on using the changeset viewer.