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/Prototypes/OWRScript.py

    r9671 r10462  
    66 
    77from OWWidget import * 
     8 
    89from OWPythonScript import OWPythonScript, Script, ScriptItemDelegate, PythonConsole 
    910from OWItemModels import PyListModel, ModelActionsWidget 
     
    304305         
    305306    def onAddScriptFromFile(self): 
    306         filename = str(QFileDialog.getOpenFileName(self, "Open script", self.lastDir)) 
     307        filename = QFileDialog.getOpenFileName(self, "Open script", self.lastDir) 
     308        filename = unicode(filename) 
    307309        if filename: 
    308310            script = open(filename, "rb").read() 
     
    315317        if row is not None: 
    316318            script = self.libraryModel[row] 
    317             filename = str(QFileDialog.getSaveFileName(self, "Save Script As", script.sourceFileName or self.lastDir)) 
     319            filename = QFileDialog.getSaveFileName(self, "Save Script As", script.sourceFileName or self.lastDir) 
     320            filename = unicode(filename) 
    318321            if filename: 
    319322                self.lastDir, name = os.path.split(filename) 
Note: See TracChangeset for help on using the changeset viewer.