Skip to content

Commit a28157c

Browse files
committedOct 7, 2012
minor fixes and changes
- rename helpConsole to console_help - add key event (del) to prevent removing of the prompt when selected
1 parent 5317e85 commit a28157c

File tree

11 files changed

+8
-8
lines changed

11 files changed

+8
-8
lines changed
 

‎python/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ ENDIF(WITH_QSCIAPI)
141141

142142
ADD_CUSTOM_TARGET(compile_python_files ALL)
143143

144-
ADD_SUBDIRECTORY(helpConsole)
144+
ADD_SUBDIRECTORY(console_help)
145145

146146
ADD_CUSTOM_COMMAND(TARGET compile_python_files
147147
POST_BUILD

‎python/console.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def __init__(self, parent=None):
116116
self.clearButton = QAction(parent)
117117
self.clearButton.setCheckable(False)
118118
self.clearButton.setEnabled(True)
119-
self.clearButton.setIcon(QIcon( ":/images/console/iconClearConsole.png"))
119+
self.clearButton.setIcon(QIcon(":/images/console/iconClearConsole.png"))
120120
self.clearButton.setMenuRole(QAction.PreferencesRole)
121121
self.clearButton.setIconVisibleInMenu(True)
122122
self.clearButton.setToolTip(clearBt)

‎python/console_help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from PyQt4 import QtCore, QtGui, QtWebKit
2727
from PyQt4.QtCore import *
2828
from PyQt4.QtGui import *
29-
from qgis.core import *
29+
from qgis.core import QgsApplication
3030
import os
3131

3232
class HelpDialog(QtGui.QDialog):
@@ -57,7 +57,7 @@ def setupUi(self):
5757
self.setLayout(self.verticalLayout)
5858
jQueryPath = QgsApplication.pkgDataPath()
5959
localeFullName = QSettings().value( "locale/userLocale", QVariant( "" ) ).toString()
60-
filename = QgsApplication.pkgDataPath() + "/python/helpConsole/help.htm? \
60+
filename = QgsApplication.pkgDataPath() + "/python/console_help/help.htm? \
6161
lang=" + localeFullName \
6262
+ "&pkgDir=" + jQueryPath
6363

‎python/helpConsole/CMakeLists.txt renamed to ‎python/console_help/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ FILE(GLOB HTML_FILES *.htm)
22
FILE(GLOB I18N_FILES i18n/*.properties)
33
FILE(GLOB JS_FILES js/*.js)
44

5-
INSTALL(FILES ${HTML_FILES} DESTINATION ${QGIS_DATA_DIR}/python/helpConsole)
6-
INSTALL(FILES ${I18N_FILES} DESTINATION ${QGIS_DATA_DIR}/python/helpConsole/i18n)
7-
INSTALL(FILES ${JS_FILES} DESTINATION ${QGIS_DATA_DIR}/python/helpConsole/js)
5+
INSTALL(FILES ${HTML_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console_help)
6+
INSTALL(FILES ${I18N_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console_help/i18n)
7+
INSTALL(FILES ${JS_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console_help/js)
File renamed without changes.
File renamed without changes.

‎python/console_sci.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def keyPressEvent(self, e):
377377
else:
378378
self.setCursorPosition(line, 4)
379379

380-
elif e.key() == Qt.Key_Backspace:
380+
elif e.key() in (Qt.Key_Backspace, Qt.Key_Delete):
381381
QsciScintilla.keyPressEvent(self, e)
382382
# check whether the cursor is moved out of the edition zone
383383
_, newindex = self.getCursorPosition()

0 commit comments

Comments
 (0)
Please sign in to comment.