From 99bac3f6d93c1410df972c05e7a39d39b777e1f8 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 17 Feb 2009 19:49:03 +0100 Subject: [PATCH] Cort on IRC ran into a few problems and we discovered that, From DBus 1.2. on, you HAVE to set the interface in function calls, or it will be denied. He was so kind as to send me a patch, which I now applied. --- pyweb/mumble/mmobjects.py | 4 ++-- pyweb/mumble/models.py | 6 +++--- template/mumble/content.htm | 26 ++++++++++++++++++++++---- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/pyweb/mumble/mmobjects.py b/pyweb/mumble/mmobjects.py index 0fe1da6..a8d3c0f 100644 --- a/pyweb/mumble/mmobjects.py +++ b/pyweb/mumble/mmobjects.py @@ -228,7 +228,7 @@ if __name__ == '__main__': # get our murmur servers dbus_base = 'net.sourceforge.mumble.murmur'; - murmur = bus.get_object( dbus_base, '/' ); + murmur = dbus.Interface( bus.get_object( dbus_base, '/' ), 'net.sourceforge.mumble.Meta') # example callback def travrz( obj, lvl ): @@ -236,7 +236,7 @@ if __name__ == '__main__': # show each server for srv in murmur.getBootedServers(): - theSrv = bus.get_object( dbus_base, '/%d' % srv ); + theSrv = dbus.Interface( bus.get_object( dbus_base, '/%d' % self.srvid ), 'net.sourceforge.mumble.Murmur' ); srvobj = mmServer( srv, theSrv, 'teh %d srvz root' % srv ); srvobj.visit( travrz ); diff --git a/pyweb/mumble/models.py b/pyweb/mumble/models.py index e9ac652..89345f9 100644 --- a/pyweb/mumble/models.py +++ b/pyweb/mumble/models.py @@ -55,17 +55,17 @@ class Mumble( models.Model ): booted = models.BooleanField( 'Boot Server', default = True ); def getDbusMeta( self ): - return dbus.SystemBus().get_object( self.dbus, '/' ); + return dbus.Interface( dbus.SystemBus().get_object( self.dbus, '/' ), 'net.sourceforge.mumble.Meta' ); def getDbusObject( self ): "Connects to DBus and returns an mmServer object representing this Murmur instance." bus = dbus.SystemBus(); - murmur = bus.get_object( self.dbus, '/' ); + murmur = dbus.Interface( bus.get_object( self.dbus, '/' ), 'net.sourceforge.mumble.Meta') if self.srvid not in murmur.getBootedServers(): raise Exception, 'No murmur process with the given server ID (%d) is running and attached to system dbus under %s.' % ( self.srvid, self.dbus ); - return bus.get_object( self.dbus, '/%d' % self.srvid ); + return dbus.Interface( bus.get_object( self.dbus, '/%d' % self.srvid ), 'net.sourceforge.mumble.Murmur' ); def getServerObject( self ): return mmServer( self.srvid, self.getDbusObject(), self.name ); diff --git a/template/mumble/content.htm b/template/mumble/content.htm index e292e9d..405ded8 100644 --- a/template/mumble/content.htm +++ b/template/mumble/content.htm @@ -10,6 +10,10 @@ {% for item in ChannelTable %} + {% spaceless %} {% for num in item.0|mrange %} | @@ -17,16 +21,17 @@ +- {% endspaceless %} {% if item.1.userid %} - player - {{ item.1.name }} + player + {{ item.1.name }} {% else %} {% if item.1.linked %} - linked channel + linked channel {% else %} - channel + channel {% endif %} {{ item.1.name }} {% endif %} + {% if item.1.userid %} @@ -52,3 +57,16 @@

Mumble-Account verwalten

+