Skip to content

Commit

Permalink
Set default values for python console settings
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 29, 2013
1 parent 17d4243 commit a0b4515
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions python/console/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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:
Expand Down Expand Up @@ -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"))

Expand Down
2 changes: 1 addition & 1 deletion python/console/console_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a0b4515

Please sign in to comment.