Skip to content

Commit

Permalink
[pyqgis-console] changes and cleans up some icon
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed May 24, 2013
1 parent bdcc01e commit 35489cc
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 9 deletions.
3 changes: 0 additions & 3 deletions images/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@
<file>themes/default/cap_round.png</file>
<file>themes/default/cap_square.png</file>
<file>themes/default/clearInput.png</file>
<file>themes/default/console/iconAboutConsole.png</file>
<file>themes/default/console/iconClassConsole.png</file>
<file>themes/default/console/iconClearConsole.png</file>
<file>themes/default/console/iconCodepadConsole.png</file>
<file>themes/default/console/iconHelpConsole.png</file>
<file>themes/default/console/iconHideToolConsole.png</file>
<file>themes/default/console/iconIfaceConsole.png</file>
<file>themes/default/console/iconOpenConsole.png</file>
<file>themes/default/console/iconQtCoreConsole.png</file>
<file>themes/default/console/iconQtGuiConsole.png</file>
Expand All @@ -84,7 +82,6 @@
<file>themes/default/console/imgHelpMenu.png</file>
<file>themes/default/console/iconTabEditorConsole.png</file>
<file>themes/default/console/iconNewTabEditorConsole.png</file>
<file>themes/default/console/iconCloseTabEditorConsole.png</file>
<file>themes/default/console/iconRestoreTabsConsole.png</file>
<file>themes/default/console/iconFileTabsMenuConsole.png</file>
<file>themes/default/console/iconShowEditorConsole.png</file>
Expand Down
Binary file removed images/themes/default/console/iconAboutConsole.png
Binary file not shown.
Binary file not shown.
Binary file modified images/themes/default/console/iconFileTabsMenuConsole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/themes/default/console/iconIfaceConsole.png
Binary file not shown.
Binary file modified images/themes/default/console/iconNewTabEditorConsole.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion python/console/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ def saveSettingsConsole(self):
self.settings.setValue("pythonConsole/splitterObj", self.splitterObj.saveState())
self.settings.setValue("pythonConsole/splitterEditor", self.splitterEditor.saveState())

self.shell.writeHistoryFile()
self.shell.writeHistoryFile(True)

def restoreSettingsConsole(self):
storedTabScripts = self.settings.value("pythonConsole/tabScripts")
Expand Down
12 changes: 9 additions & 3 deletions python/console/console_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ def contextMenuEvent(self, e):
iconFind = QgsApplication.getThemeIcon("console/iconSearchEditorConsole.png")
iconSyntaxCk = QgsApplication.getThemeIcon("console/iconSyntaxErrorConsole.png")
iconObjInsp = QgsApplication.getThemeIcon("console/iconClassBrowserConsole.png")
iconCut = QgsApplication.getThemeIcon("console/iconCutEditorConsole.png")
iconCopy = QgsApplication.getThemeIcon("console/iconCopyEditorConsole.png")
iconPaste = QgsApplication.getThemeIcon("console/iconPasteEditorConsole.png")
hideEditorAction = menu.addAction(QCoreApplication.translate("PythonConsole", "Hide Editor"),
self.hideEditor)
menu.addSeparator()
Expand Down Expand Up @@ -300,15 +303,18 @@ def contextMenuEvent(self, e):
"Find Text"),
self.showFindWidget)
menu.addSeparator()
cutAction = menu.addAction(QCoreApplication.translate("PythonConsole",
cutAction = menu.addAction(iconCut,
QCoreApplication.translate("PythonConsole",
"Cut"),
self.cut,
QKeySequence.Cut)
copyAction = menu.addAction(QCoreApplication.translate("PythonConsole",
copyAction = menu.addAction(iconCopy,
QCoreApplication.translate("PythonConsole",
"Copy"),
self.copy,
QKeySequence.Copy)
pasteAction = menu.addAction(QCoreApplication.translate("PythonConsole",
pasteAction = menu.addAction(iconPaste,
QCoreApplication.translate("PythonConsole",
"Paste"),
self.paste, QKeySequence.Paste)
menu.addSeparator()
Expand Down
4 changes: 2 additions & 2 deletions python/console/console_sci.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def updateHistory(self, command):
self.history.append(command)
self.historyIndex = len(self.history)

def writeHistoryFile(self):
def writeHistoryFile(self, fromCloseConsole=False):
ok = False
try:
wH = open(_historyFile, 'w')
Expand All @@ -281,7 +281,7 @@ def writeHistoryFile(self):
except:
raise
wH.close()
if ok:
if ok and not fromCloseConsole:
msgText = QCoreApplication.translate('PythonConsole',
'History saved successfully.')
self.parent.callWidgetMessageBar(msgText)
Expand Down

0 comments on commit 35489cc

Please sign in to comment.