Ignore:
Timestamp:
03/07/12 20:34:41 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
rebase_source:
e0e81317be7e94777360a2a0373960fc9889a2ac
Message:

Added unicode filename support for save/load widgets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/OWReport.py

    r9873 r10462  
    229229    def saveReport(self): 
    230230        filename = QFileDialog.getSaveFileName(self, "Save Report", self.saveDir, "Web page (*.html *.htm)") 
     231        filename = unicode(filename) 
     232         
    231233        if not filename: 
    232234            return 
    233  
    234         filename = str(filename) 
     235         
    235236        path, fname = os.path.split(filename) 
    236237        self.saveDir = path 
     
    287288    def saveXML(self): 
    288289        filename = QFileDialog.getSaveFileName(self, "Export Report", self.saveDir, "XML file (*.xml)") 
     290        filename = unicode(filename) 
    289291        if not filename: 
    290292            return 
    291293 
    292         outf = file(str(filename), "wt") 
     294        outf = file(filename, "wt") 
    293295        outf.write('<?xml version="1.0" encoding="ascii"?>\n<report version="1.0">\n') 
    294296         
     
    319321    def loadXML(self): 
    320322        filename = QFileDialog.getOpenFileName(self, "Import Report", self.saveDir, "XML file (*.xml)") 
     323        filename = unicode(filename) 
     324         
    321325        if not filename: 
    322326            return 
Note: See TracChangeset for help on using the changeset viewer.