~andrewtrusty/context-agent/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python

# Install from Google Desktop Sidebar
# Right-click and select Add Gadget
# Enter  http://andrewtrusty.com/ig/rachel.xml  into the Search field
# Add the gadget that appears.


if __name__ == "__main__":
    import webserver
    import threading
    import os

    windows = (os.name == 'nt')
    ui = None
    if not windows:
        import linuxui
        ui = linuxui.AgentUI()

    server = threading.Thread(target=webserver.run)
    server.setDaemon(True)
    server.start()

    from hooker import hook_input
    hook_input()
    #threading.Thread(target=hook_input).start()
    
    if not windows:
        import gtk
        gtk.main()