From 82445d5d3a0a11d8220315f3fbb8a02c63c0a49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Wed, 9 Oct 2013 13:53:03 +0200 Subject: [PATCH] File association: Socket encoding fix --- kcc.py | 2 +- kcc/KCC_gui.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kcc.py b/kcc.py index 0b3f966..9b4916d 100644 --- a/kcc.py +++ b/kcc.py @@ -71,7 +71,7 @@ class QApplicationMessaging(QtGui.QApplication): def handleMessage(self): socket = self._server.nextPendingConnection() if socket.waitForReadyRead(self._timeout): - self.emit(QtCore.SIGNAL('messageFromOtherInstance'), socket.readAll().data()) + self.emit(QtCore.SIGNAL('messageFromOtherInstance'), socket.readAll().data().decode('utf8')) def sendMessage(self, message): if self.isRunning(): diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py index 568292b..ffdda89 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -631,6 +631,7 @@ class Ui_KCC(object): def handleMessage(self, message): MainWindow.raise_() + MainWindow.activateWindow() if not self.conversionAlive: if self.needClean: self.needClean = False