Ignore:
Timestamp:
03/07/12 23:42:15 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
rebase_source:
67b720793d84aa776182caf747fc54a490f33e23
Message:

Added unicode filename support for save/load dialogs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/orngDoc.py

    r9671 r10463  
    438438 
    439439    def saveDocumentAs(self): 
    440         name = str(QFileDialog.getSaveFileName(self, "Save Orange Schema", os.path.join(self.schemaPath, self.schemaName or "Untitled.ows"), "Orange Widget Schema (*.ows)")) 
     440        name = QFileDialog.getSaveFileName(self, "Save Orange Schema", os.path.join(self.schemaPath, self.schemaName or "Untitled.ows"), "Orange Widget Schema (*.ows)") 
     441        name = unicode(name) 
    441442        if os.path.splitext(name)[0] == "": 
    442443            return 
     
    546547        try: 
    547548            #load the data ... 
    548             doc = parse(str(filename)) 
     549            doc = parse(filename) 
    549550            schema = doc.firstChild 
    550551            widgets = schema.getElementsByTagName("widgets")[0] 
     
    620621        qname = QFileDialog.getSaveFileName(self, "Save Orange Schema as Application", os.path.join(appPath, appName) , "Orange Scripts (*%s)" % extension) 
    621622        if qname.isEmpty(): return 
    622         (appPath, appName) = os.path.split(str(qname)) 
     623        qname = unicode(qname) 
     624        (appPath, appName) = os.path.split(qname) 
    623625        appNameWithoutExt = os.path.splitext(appName)[0] 
    624626        if os.path.splitext(appName)[1].lower() not in [".py", ".pyw"]: appName = appNameWithoutExt + extension 
Note: See TracChangeset for help on using the changeset viewer.