--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesHeaderDialog.py Sun Mar 30 22:00:14 2014 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesHeaderDialog.py Thu Apr 03 23:05:31 2014 +0200 @@ -9,8 +9,8 @@ from __future__ import unicode_literals try: - str = unicode # __IGNORE_WARNING__ -except (NameError): + str = unicode +except NameError: pass import os @@ -22,8 +22,6 @@ from .Ui_HgQueuesHeaderDialog import Ui_HgQueuesHeaderDialog -import Preferences - class HgQueuesHeaderDialog(QDialog, Ui_HgQueuesHeaderDialog): """ @@ -89,13 +87,9 @@ if os.path.splitdrive(repodir)[1] == os.sep: return - args = [] - args.append('qheader') + args = self.vcs.initCommand("qheader") if self.__hgClient: - self.inputGroup.setEnabled(False) - self.inputGroup.hide() - out, err = self.__hgClient.runcommand( args, output=self.__showOutput, error=self.__showError) if err: @@ -112,8 +106,8 @@ if not procStarted: E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -169,8 +163,7 @@ """ if self.process is not None: s = str(self.process.readAllStandardOutput(), - Preferences.getSystem("IOEncoding"), - 'replace') + self.vcs.getEncoding(), 'replace') self.__showOutput(s) def __showOutput(self, out): @@ -190,8 +183,7 @@ """ if self.process is not None: s = str(self.process.readAllStandardError(), - Preferences.getSystem("IOEncoding"), - 'replace') + self.vcs.getEncoding(), 'replace') self.__showError(s) def __showError(self, out): @@ -200,5 +192,5 @@ @param out error to be shown (string) """ - self.messageEdit.appendPlainText(self.trUtf8("Error: ")) + self.messageEdit.appendPlainText(self.tr("Error: ")) self.messageEdit.appendPlainText(out)