Changeset 7954acd in sasview


Ignore:
Timestamp:
Apr 5, 2012 8:12:43 AM (12 years ago)
Author:
Jae Cho <jhjcho@…>
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:
b53414b
Parents:
213b445
Message:

try to fix tutorial view problem on MAC when the default pdf viewer was set other than the Preview

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • invariantview/src/sans/perspectives/invariant/report_dialog.py

    r091c702 r7954acd  
    3131    FONT_VARIANT = 1 
    3232    ISMAC = True 
     33ISPDF = True 
    3334   
    3435class ReportDialog(wx.Dialog): 
     
    5556 
    5657        # check if tit is MAC 
    57         self.is_mac = ISMAC 
     58        self.is_pdf = ISPDF 
    5859         
    5960        # report string 
     
    6566        # wild card 
    6667        # pdf supporting only on MAC 
    67         if self.is_mac: 
     68        if self.is_pdf: 
    6869                self.wild_card = ' PDF files (*.pdf)|*.pdf|' 
    6970        else: 
     
    142143        ext_num = dlg.GetFilterIndex()   
    143144        # index correction  
    144         if not self.is_mac: 
     145        if not self.is_pdf: 
    145146                ind_cor = 1  
    146147        else: 
  • sansguiframe/src/sans/guiframe/gui_manager.py

    re8c61f6 r7954acd  
    21922192                    dialog.Show(True)  
    21932193                except: 
    2194                     msg = "This feature requires 'Adobe pdf Reader'\n" 
    2195                     msg += "Please install it first (Free)..." 
    2196                     wx.MessageBox(msg, 'Error') 
     2194                    try: 
     2195                        #in case when the pdf default set other than acrobat 
     2196                        import ho.pisa as pisa 
     2197                        pisa.startViewer(path) 
     2198                    except: 
     2199                        msg = "This feature requires 'PDF Viewer'\n" 
     2200                        msg += "Please install it first (Free)..." 
     2201                        wx.MessageBox(msg, 'Error') 
    21972202            else: 
    21982203                try: 
     
    22002205                    os.system(command) 
    22012206                except: 
    2202                     msg = "This feature requires 'Preview' Application\n" 
    2203                     msg += "Please install it first..." 
    2204                     wx.MessageBox(msg, 'Error') 
     2207                    try: 
     2208                        #in case when the pdf default set other than preview 
     2209                        import ho.pisa as pisa 
     2210                        pisa.startViewer(path) 
     2211                    except: 
     2212                        msg = "This feature requires 'Preview' Application\n" 
     2213                        msg += "Please install it first..." 
     2214                        wx.MessageBox(msg, 'Error') 
    22052215 
    22062216                       
Note: See TracChangeset for help on using the changeset viewer.