Skip to content

Commit

Permalink
[pyqgis-console] small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed May 21, 2013
1 parent 3f58142 commit 9242170
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions python/console/console_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions python/console/console_history_dlg.ui
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -69,7 +69,7 @@
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>HistoryDialog</receiver>
<receiver>HistoryDialogPythonConsole</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
Expand All @@ -85,7 +85,7 @@
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>HistoryDialog</receiver>
<receiver>HistoryDialogPythonConsole</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
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 @@ -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"]
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9242170

Please sign in to comment.