1
0
mirror of https://github.com/ciromattia/kcc synced 2026-06-02 20:53:28 +00:00

Added support for file association

This commit is contained in:
Paweł Jastrzębski
2013-10-09 11:20:18 +02:00
parent 98c6a569bf
commit 839bc4cc9e
2 changed files with 28 additions and 3 deletions
+5 -1
View File
@@ -39,6 +39,11 @@ if sys.platform.startswith('darwin'):
elif sys.platform.startswith('linux'):
from kcc import KCC_ui_linux as KCC_ui
else:
# Workaround for Windows file association mechanism
if getattr(sys, 'frozen', False):
os.chdir(os.path.dirname(os.path.abspath(sys.executable)))
else:
os.chdir(os.path.dirname(os.path.abspath(__file__)))
from kcc import KCC_ui
@@ -85,7 +90,6 @@ freeze_support()
APP = QApplicationMessaging(sys.argv)
if APP.isRunning():
if len(sys.argv) > 1:
APP.sendMessage('Araise!')
APP.sendMessage(sys.argv[1].decode(sys.getfilesystemencoding()))
sys.exit(0)
else: