Changeset 4205

Show
Ignore:
Timestamp:
06/20/07 00:56:04 (6 years ago)
Author:
cdietric
Message:

Right clicking on component gives option to view <installPath>/docs/<component name>/refman.pdf if it exists

Location:
WaveDev/trunk/WaveDev/wavedev
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • WaveDev/trunk/WaveDev/wavedev/MainFrame.py

    r4204 r4205  
    440440              size=wx.Size(507, 50), style= wx.TE_BESTWRAP | wx.TE_MULTILINE) 
    441441        self.compDescrBox.SetConstraints(LayoutAnchors(self.compDescrBox, 
    442               False, False, True, True)) 
     442              True, False, True, True)) 
    443443 
    444444        self.staticText4 = wx.StaticText (id=wxID_FRAME1STATICTEXT4, 
     
    446446              pos=wx.Point(7, 445), size=wx.Size (75, 40), style= wx.TE_BESTWRAP | wx.TE_MULTILINE) 
    447447        self.staticText4.SetConstraints(LayoutAnchors(self.staticText4, 
    448               False, False, True, True)) 
     448              True, False, False, True)) 
    449449 
    450450 
     
    15651565                x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPADDNODE) 
    15661566                x.Enable(False)            
     1567                 
    15671568                #x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDESCR) 
    15681569                #x.Enable(False) 
    1569                 #x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDOXYGENREFMAN) 
    1570                 #x.Enable(False) 
     1570                 
     1571                #disable Doxygen docs display if no docs directory found 
     1572                docsPath = self.installPath + 'docs/' + tmpRes.name 
     1573                if os.path.isdir(docsPath) != 1: 
     1574                    x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDOXYGENREFMAN) 
     1575                    x.Enable(False) 
    15711576            elif tmpRes.type == 'node': 
    15721577                x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPADDDEV) 
     
    16681673 
    16691674    def OnResourceBoxPopupGetDoxygenRefMan(self, event): 
    1670         errorMsg(self,"Doxygen Ref Man not implemented yet") 
     1675        docList = None 
     1676        sn = self.resourceBox.GetSelection() 
     1677        tmpRes = self.resourceBox.GetPyData(sn) 
     1678        docsPath = self.installPath + 'docs/' + tmpRes.name 
     1679        if os.path.isdir(docsPath): 
     1680            docList = os.listdir(docsPath) 
     1681            if os.path.isfile(docsPath + '/refman.pdf'): 
     1682                #Unix only, need to change 
     1683                os.system('evince ' + docsPath + '/refman.pdf &') 
     1684            else: 
     1685                errorMsg(self,'File refman.pdf not found in ' + docsPath + ': directory listing: ' + str(docList)) 
     1686        else: 
     1687            errorMsg(self,"No Doxygen documents for " + tmpRes.name + " could be found in: " + self.installPath + 'docs')             
     1688            return 
     1689 
     1690 
    16711691 
    16721692    def OnResourceBoxPopupAddnodeMenu(self, event): 
  • WaveDev/trunk/WaveDev/wavedev/importResource.py

    r4204 r4205  
    5050    doc_spd = amara.parse(stripDoctype(spdPath)) 
    5151    if not hasattr(doc_spd.softpkg.implementation, 'description'): 
    52         #errorMsg(parent,"No description found in " + spdPath) 
    53         Rdescription='Description unavailable' 
     52        #errorMsg(parent,'No description found in ' + spdPath) 
     53        Rdescription='No description found in ' + spdPath 
    5454    else: 
    5555        Rdescription=str(doc_spd.softpkg.implementation.description)