Skip to content
Permalink
Browse files

[pyqgis-console] remove unnecessary code and fix tabs tooltip

  • Loading branch information
slarosa committed Apr 20, 2013
1 parent 0ca725c commit f12eebe35e63249ab629a742b25a5e0c0235c114
Showing with 4 additions and 6 deletions.
  1. +3 −6 python/console/console.py
  2. +1 −0 python/console/console_editor.py
@@ -129,7 +129,7 @@ def __init__(self, parent=None):
openFileBt = QCoreApplication.translate("PythonConsole", "Open file")
self.openFileButton = QAction(parent)
self.openFileButton.setCheckable(False)
self.openFileButton.setEnabled(False)
self.openFileButton.setEnabled(True)
self.openFileButton.setIcon(QgsApplication.getThemeIcon("console/iconOpenConsole.png"))
self.openFileButton.setMenuRole(QAction.PreferencesRole)
self.openFileButton.setIconVisibleInMenu(True)
@@ -139,7 +139,7 @@ def __init__(self, parent=None):
saveFileBt = QCoreApplication.translate("PythonConsole", "Save")
self.saveFileButton = QAction(parent)
self.saveFileButton.setCheckable(False)
self.saveFileButton.setEnabled(False)
self.saveFileButton.setEnabled(True)
self.saveFileButton.setIcon(QgsApplication.getThemeIcon("console/iconSaveConsole.png"))
self.saveFileButton.setMenuRole(QAction.PreferencesRole)
self.saveFileButton.setIconVisibleInMenu(True)
@@ -149,7 +149,7 @@ def __init__(self, parent=None):
saveAsFileBt = QCoreApplication.translate("PythonConsole", "Save As..")
self.saveAsFileButton = QAction(parent)
self.saveAsFileButton.setCheckable(False)
self.saveAsFileButton.setEnabled(False)
self.saveAsFileButton.setEnabled(True)
self.saveAsFileButton.setIcon(QgsApplication.getThemeIcon("console/iconSaveAsConsole.png"))
self.saveAsFileButton.setMenuRole(QAction.PreferencesRole)
self.saveAsFileButton.setIconVisibleInMenu(True)
@@ -445,9 +445,6 @@ def qtGui(self):

def toggleEditor(self, checked):
self.widgetEditor.show() if checked else self.widgetEditor.hide()
self.openFileButton.setEnabled(checked)
self.saveFileButton.setEnabled(checked)
self.saveAsFileButton.setEnabled(checked)

def pasteEditor(self):
self.tabEditorWidget.currentWidget().newEditor.paste()
@@ -496,6 +496,7 @@ def save(self):
os.remove(temp_path)
fN = self.path.split('/')[-1]
self.mw.setTabTitle(self, fN)
self.mw.setTabToolTip(self.mw.currentIndex(), self.path)
self.newEditor.setModified(False)
self.pc.updateTabListScript(self.path, action='append')

0 comments on commit f12eebe

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