about summary refs log tree commit diff
path: root/kcc.py
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@vulturis.eu>2014-01-21 18:09:22 +0100
committerPaweł Jastrzębski <pawelj@vulturis.eu>2014-01-21 18:09:22 +0100
commit1e5bfc9f66996dc60dc068201c43bd4dcc26f390 (patch)
tree1f7b7faeb912b2830a8aff4411c53fd647f89e94 /kcc.py
parentReformated tooltips (diff)
downloadkcc-1e5bfc9f66996dc60dc068201c43bd4dcc26f390.tar.gz
kcc-1e5bfc9f66996dc60dc068201c43bd4dcc26f390.tar.bz2
kcc-1e5bfc9f66996dc60dc068201c43bd4dcc26f390.zip
OSX: Fixed file association (close #65)
Diffstat (limited to 'kcc.py')
-rwxr-xr-xkcc.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/kcc.py b/kcc.py
index 41a1c1b..2b1edd5 100755
--- a/kcc.py
+++ b/kcc.py
@@ -108,6 +108,14 @@ class QApplicationMessaging(QtWidgets.QApplication):
             self._memory.detach()
             self._server.close()
 
+    def event(self, e):
+        if e.type() == QtCore.QEvent.FileOpen:
+            # noinspection PyArgumentList
+            self.messageFromOtherInstance.emit(bytes(e.file(), 'UTF-8'))
+            return True
+        else:
+            return QtWidgets.QApplication.event(self, e)
+
     def isRunning(self):
         return self._running