Changeset 9704
- Timestamp:
- 05/28/08 18:15:39 (6 months ago)
- Files:
-
- 1 modified
-
trunk/src/common/sleepy.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common/sleepy.py
r8972 r9704 36 36 SUPPORTED = True 37 37 try: 38 if os.name == 'nt':39 import ctypes38 if os.name == 'nt': 39 import ctypes 40 40 41 GetTickCount = ctypes.windll.kernel32.GetTickCount42 GetLastInputInfo = ctypes.windll.user32.GetLastInputInfo41 GetTickCount = ctypes.windll.kernel32.GetTickCount 42 GetLastInputInfo = ctypes.windll.user32.GetLastInputInfo 43 43 44 class LASTINPUTINFO(ctypes.Structure):45 _fields_ = [('cbSize', ctypes.c_uint), ('dwTime', ctypes.c_uint)]44 class LASTINPUTINFO(ctypes.Structure): 45 _fields_ = [('cbSize', ctypes.c_uint), ('dwTime', ctypes.c_uint)] 46 46 47 lastInputInfo = LASTINPUTINFO()48 lastInputInfo.cbSize = ctypes.sizeof(lastInputInfo)47 lastInputInfo = LASTINPUTINFO() 48 lastInputInfo.cbSize = ctypes.sizeof(lastInputInfo) 49 49 50 elif sys.platform == 'darwin':51 import osx.idle as idle52 else: # unix53 import idle50 elif sys.platform == 'darwin': 51 import osx.idle as idle 52 else: # unix 53 import idle 54 54 except: 55 55 gajim.log.debug('Unable to load idle module')
