Skip to content
Permalink
Browse files

[pyqgis-console] small fixes

  • Loading branch information
slarosa committed May 21, 2013
1 parent 3f58142 commit 9242170d8d167406c944ba6c0d918af29b69f1b2
Showing with 9 additions and 9 deletions.
  1. +3 −3 python/console/console_editor.py
  2. +4 −4 python/console/console_history_dlg.ui
  3. +2 −2 python/console/console_sci.py
@@ -514,8 +514,8 @@ def _runSubProcess(self, filename, tmp=False):
else:
raise e
if tmp:
tmpFileTr = QCoreApplication.translate('PythonConsole', ' [Temporary file saved in ')
file = file + tmpFileTr + dir + ']'
tmpFileTr = QCoreApplication.translate('PythonConsole', ' [Temporary file saved in %1]').arg(dir)
file = file + tmpFileTr
if _traceback:
msgTraceTr = QCoreApplication.translate('PythonConsole', '## Script error: %1').arg(file)
print "## %s" % datetime.datetime.now()
@@ -608,7 +608,7 @@ def syntaxCheck(self, filename=None, fromContextMenu=True):
source = source.encode('utf-8')
if type(filename) == type(u""):
filename = filename.encode('utf-8')
compile(source, filename, 'exec')
compile(source, str(filename), 'exec')
except SyntaxError, detail:
s = traceback.format_exception_only(SyntaxError, detail)
fn = detail.filename
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>HistoryDialog</class>
<widget class="QDialog" name="HistoryDialog">
<class>HistoryDialogPythonConsole</class>
<widget class="QDialog" name="HistoryDialogPythonConsole">
<property name="geometry">
<rect>
<x>0</x>
@@ -69,7 +69,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>HistoryDialog</receiver>
<receiver>HistoryDialogPythonConsole</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
@@ -85,7 +85,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>HistoryDialog</receiver>
<receiver>HistoryDialogPythonConsole</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
@@ -31,7 +31,7 @@
import code

from qgis.core import QgsApplication
from ui_console_history_dlg import Ui_HistoryDialog
from ui_console_history_dlg import Ui_HistoryDialogPythonConsole

_init_commands = ["from qgis.core import *", "import qgis.utils",
"from qgis.utils import iface"]
@@ -562,7 +562,7 @@ def writeCMD(self, txt):
prompt = getCmdString[0:4]
sys.stdout.write(prompt+txt+'\n')

class HistoryDialog(QDialog, Ui_HistoryDialog):
class HistoryDialog(QDialog, Ui_HistoryDialogPythonConsole):
def __init__(self, parent):
QDialog.__init__(self, parent)
self.setupUi(self)

0 comments on commit 9242170

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