Changeset 04da935d01fe…
Parent 24a354d1895b…
by
Changes to one file · Browse files at 04da935d01fe Showing diff from parent 24a354d1895b Diff from another changeset...
@@ -445,6 +445,10 @@ geomname = 'editor-geom'
editor.setText(contents)
editor.setModified(False)
+ if '\r\n' in contents:
+ editor.setEolMode(QsciScintilla.EolWindows)
+ else:
+ editor.setEolMode(QsciScintilla.EolUnix)
dialog.restoreGeometry(s.value(geomname).toByteArray())
ret = dialog.exec_()
if ret == QDialog.Accepted:
@@ -454,5 +458,5 @@ s.setValue(geomname, dialog.saveGeometry())
except EnvironmentError, e:
qtlib.WarningMsgBox(_('Unable to read/write config file'),
- hglib.tounicode(e), parent=dialog)
+ hglib.tounicode(str(e)), parent=dialog)
return ret
|
Loading...