Changeset 509

Show
Ignore:
Timestamp:
11/26/06 20:42:57 (2 years ago)
Author:
nicfit
Message:

Got a start on dbus support.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main.py

    r497 r509  
    6262        gtk.gdk.notify_startup_complete() 
    6363 
    64         # Tips window 
     64        # Show tips window if user still has that on  
    6565        if mesk.config.getboolean(mesk.CONFIG_UI, 'show_tip_window_on_startup'): 
    6666            self.main_window.show_tips_window() 
     
    148148                # http://www.sacredchao.net/quodlibet/ticket/591 
    149149                cli.set_restart_command(len(argv), argv) 
     150 
     151        # Initialize Dbus, if possible 
     152        try: 
     153            import dbus, dbus.service 
     154        except ImportError: 
     155            self.DBUS_SUPPORT = False 
     156            self.mesk_dbus = None 
     157            mesk.log.warning("Not able to load DBus, support is disabled") 
     158        else: 
     159            import dbus_service 
     160            self.DBUS_SUPPORT = True 
     161            session_bus = dbus.SessionBus() 
     162            name = dbus.service.BusName(dbus_service.SERVICE, bus=session_bus) 
     163            self.mesk_dbus = dbus_service.MeskDbusService(name) 
     164            mesk.log.verbose("DBus support activated") 
    150165 
    151166        # Initialize plugin manager 
  • trunk/src/mesk/playlist/m3u.py

    r495 r509  
    2222 
    2323NAME = 'Extended M3U' 
    24 EXTENSIONS = ['.m3u'
     24EXTENSIONS = ['.m3u', '.pls'
    2525MIME_TYPES = ['audio/x-mpegurl'] 
    2626