~rockstar/entertainer/kill-fixmes

« back to all changes in this revision

Viewing changes to entertainerlib/frontend/__init__.py

  • Committer: Paul Hummer
  • Date: 2009-02-07 20:20:19 UTC
  • mfrom: (340.2.6 frontend-cleanup)
  • Revision ID: paul@eventuallyanyway.com-20090207202019-s13v5owgxwwcbaz8
Frontend refactored to include the system tray handler. (Matt Layman)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
    # Import statements are inside thu function so that they aren't imported
7
7
    # every time something from the frontend is imported
 
8
    import clutter
 
9
    import gobject
 
10
    import gtk
 
11
 
8
12
    from entertainerlib.frontend.translation_setup import TranslationSetup
9
13
    TranslationSetup()
10
14
 
11
15
    from entertainerlib.backend.backend_server import BackendServer
12
16
    from entertainerlib.utils.configuration import Configuration
13
17
    from entertainerlib.frontend.frontend_client import FrontendClient
14
 
    from entertainerlib.utils.system_tray_icon import init_systray
 
18
 
 
19
    gobject.threads_init()
 
20
    gtk.gdk.threads_init()
 
21
    clutter.threads_init()
15
22
 
16
23
    config = Configuration()
17
24
    if config.start_auto_server():
18
25
        print "Entertainer backend starting..."
19
26
        backend = BackendServer()
20
27
 
21
 
    if config.tray_icon_enabled():
22
 
        init_systray()
23
 
    else:
24
 
        FrontendClient()
 
28
    frontend_client = FrontendClient()
 
29
    frontend_client.start()
25
30
 
26
31