Changeset 14:38e4af417f34 in documentViewer


Ignore:
Timestamp:
Jun 16, 2010, 7:04:42 PM (14 years ago)
Author:
casties
Branch:
modularisierung
Message:

fixed oopsie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentViewer.py

    r13 r14  
    218218       
    219219        if viewMode=="auto": # automodus gewaehlt
    220             if docinfo.get("textURL",'') and self.textViewerUrl: #texturl gesetzt und textViewer konfiguriert
     220            if docinfo.has_key("textURL") or docinfo.has_key('textURLPath'): #texturl gesetzt und textViewer konfiguriert
    221221                viewMode="text"
    222222            else:
     
    254254           
    255255        if viewMode=="auto": # automodus gewaehlt
    256             if docinfo.get("textURL",''): #texturl gesetzt und textViewer konfiguriert
     256            if docinfo.has_key("textURL") or docinfo.has_key('textURLPath'): #texturl gesetzt und textViewer konfiguriert
    257257                viewMode="text_dict"
    258258            else:
     
    569569            viewerUrl = getTextFromNode(viewerUrls[0])
    570570            docinfo['viewerURL'] = viewerUrl
    571                    
     571       
     572        # old style text URL
    572573        textUrls = dom.xpath("//texttool/text")
    573574        if textUrls and (len(textUrls) > 0):
     
    581582            docinfo['textURL'] = textUrl
    582583   
     584        # new style text-url-path
    583585        textUrls = dom.xpath("//texttool/text-url-path")
    584586        if textUrls and (len(textUrls) > 0):
Note: See TracChangeset for help on using the changeset viewer.