Skip to content

Commit

Permalink
minor fixes and changes
Browse files Browse the repository at this point in the history
- rename helpConsole to console_help
- add key event (del) to prevent removing of the prompt when selected
  • Loading branch information
slarosa committed Oct 7, 2012
1 parent 5317e85 commit a28157c
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Expand Up @@ -141,7 +141,7 @@ ENDIF(WITH_QSCIAPI)

ADD_CUSTOM_TARGET(compile_python_files ALL)

ADD_SUBDIRECTORY(helpConsole)
ADD_SUBDIRECTORY(console_help)

ADD_CUSTOM_COMMAND(TARGET compile_python_files
POST_BUILD
Expand Down
2 changes: 1 addition & 1 deletion python/console.py
Expand Up @@ -116,7 +116,7 @@ def __init__(self, parent=None):
self.clearButton = QAction(parent)
self.clearButton.setCheckable(False)
self.clearButton.setEnabled(True)
self.clearButton.setIcon(QIcon( ":/images/console/iconClearConsole.png"))
self.clearButton.setIcon(QIcon(":/images/console/iconClearConsole.png"))
self.clearButton.setMenuRole(QAction.PreferencesRole)
self.clearButton.setIconVisibleInMenu(True)
self.clearButton.setToolTip(clearBt)
Expand Down
4 changes: 2 additions & 2 deletions python/console_help.py
Expand Up @@ -26,7 +26,7 @@
from PyQt4 import QtCore, QtGui, QtWebKit
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.core import QgsApplication
import os

class HelpDialog(QtGui.QDialog):
Expand Down Expand Up @@ -57,7 +57,7 @@ def setupUi(self):
self.setLayout(self.verticalLayout)
jQueryPath = QgsApplication.pkgDataPath()
localeFullName = QSettings().value( "locale/userLocale", QVariant( "" ) ).toString()
filename = QgsApplication.pkgDataPath() + "/python/helpConsole/help.htm? \
filename = QgsApplication.pkgDataPath() + "/python/console_help/help.htm? \
lang=" + localeFullName \
+ "&pkgDir=" + jQueryPath

Expand Down
Expand Up @@ -2,6 +2,6 @@ FILE(GLOB HTML_FILES *.htm)
FILE(GLOB I18N_FILES i18n/*.properties)
FILE(GLOB JS_FILES js/*.js)

INSTALL(FILES ${HTML_FILES} DESTINATION ${QGIS_DATA_DIR}/python/helpConsole)
INSTALL(FILES ${I18N_FILES} DESTINATION ${QGIS_DATA_DIR}/python/helpConsole/i18n)
INSTALL(FILES ${JS_FILES} DESTINATION ${QGIS_DATA_DIR}/python/helpConsole/js)
INSTALL(FILES ${HTML_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console_help)
INSTALL(FILES ${I18N_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console_help/i18n)
INSTALL(FILES ${JS_FILES} DESTINATION ${QGIS_DATA_DIR}/python/console_help/js)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion python/console_sci.py
Expand Up @@ -377,7 +377,7 @@ def keyPressEvent(self, e):
else:
self.setCursorPosition(line, 4)

elif e.key() == Qt.Key_Backspace:
elif e.key() in (Qt.Key_Backspace, Qt.Key_Delete):
QsciScintilla.keyPressEvent(self, e)
# check whether the cursor is moved out of the edition zone
_, newindex = self.getCursorPosition()
Expand Down

0 comments on commit a28157c

Please sign in to comment.