[tuxdroid-svn] r6029 - software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/execut
Status: Beta
Brought to you by:
ks156
From: jerome <c2m...@c2...> - 2010-01-05 08:23:27
|
Author: jerome Date: 2010-01-05 09:23:04 +0100 (Tue, 05 Jan 2010) New Revision: 6029 Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py Log: * Fixed the way to check for skype client process ( there have some problems with previous function on win xp ). Modified: software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py =================================================================== --- software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py 2010-01-04 10:03:31 UTC (rev 6028) +++ software_suite_v3/software/plugin/plugin-skype/branches/in_out_plugin/executables/utils.py 2010-01-05 08:23:04 UTC (rev 6029) @@ -23,7 +23,8 @@ import os import threading import commands -import subprocess +import subprocess +from ctypes import windll from string import find from time import sleep from threading import Thread @@ -78,20 +79,9 @@ def __is_running_windows__(self): '''Check for Skype client process. ''' - try: - from win32com.client import GetObject - import pythoncom - pythoncom.CoInitialize() - WMI = GetObject('winmgmts:\\') - processes = WMI.InstancesOf('Win32_Process') - for process in processes: - if process.name in ['skype.exe', 'Skype.exe']: - return True - pythoncom.CoUninitialize() - return False - except Exception, e: - pythoncom.CoUninitialize() - return False + # TZap is for Skype 4.0, tSk for 3.8 series + return bool(windll.user32.FindWindowA('TZapMainForm.UnicodeClass', None) or \ + windll.user32.FindWindowA('tSkMainForm.UnicodeClass', None)) # -------------------------------------------------------------------------- # Start skype on linux. |