Skip to content
Permalink
Browse files

Set default values for python console settings

  • Loading branch information
m-kuhn committed May 29, 2013
1 parent 17d4243 commit a0b451593f16588881ac5a95275717c4c0ab2ffe
Showing with 4 additions and 4 deletions.
  1. +3 −3 python/console/console.py
  2. +1 −1 python/console/console_settings.py
@@ -636,7 +636,7 @@ def saveScriptFile(self):
except (IOError, OSError), error:
errTr = QCoreApplication.translate("PythonConsole", "Save Error")
msgText = QCoreApplication.translate('PythonConsole',
'The file <b>{}</b> could not be saved. Error: {}'.format(unicode(tabWidget.path),
'The file <b>{}</b> could not be saved. Error: {}'.format(unicode(tabWidget.path),
error.strerror))
self.callWidgetMessageBarEditor(msgText, 2, False)

@@ -663,7 +663,7 @@ def saveAsScriptFile(self, index=None):
except (IOError, OSError), error:
errTr = QCoreApplication.translate("PythonConsole", "Save Error")
msgText = QCoreApplication.translate('PythonConsole',
'The file <b>{}</b> could not be saved. Error: {}'.format(unicode(tabWidget.path),
'The file <b>{}</b> could not be saved. Error: {}'.format(unicode(tabWidget.path),
error.strerror))
self.callWidgetMessageBarEditor(msgText, 2, False)
if fileNone:
@@ -713,7 +713,7 @@ def saveSettingsConsole(self):
def restoreSettingsConsole(self):
storedTabScripts = self.settings.value("pythonConsole/tabScripts")
self.tabListScript = storedTabScripts
self.splitter.restoreState(self.settings.value("pythonConsole/splitterConsole"))
self.splitter.restoreState(self.settings.value("pythonConsole/splitterConsole", QByteArray()))
self.splitterEditor.restoreState(self.settings.value("pythonConsole/splitterEditor"))
self.splitterObj.restoreState(self.settings.value("pythonConsole/splitterObj"))

@@ -149,7 +149,7 @@ def restoreSettings(self):
self.fontComboBoxEditor.setCurrentFont(QFont(settings.value("pythonConsole/fontfamilytextEditor",
"Monospace")))
self.preloadAPI.setChecked(settings.value("pythonConsole/preloadAPI", True, type=bool))
itemTable = settings.value("pythonConsole/userAPI")
itemTable = settings.value("pythonConsole/userAPI", [])
for i in range(len(itemTable)):
self.tableWidget.insertRow(i)
self.tableWidget.setColumnCount(2)

0 comments on commit a0b4515

Please sign in to comment.
You can’t perform that action at this time.