Added /audio /video commands

This commit is contained in:
red-agent 2009-11-10 23:06:59 +02:00
parent e617b134b2
commit 8a464786f4
1 changed files with 16 additions and 0 deletions

View File

@ -98,6 +98,22 @@ class StandardChatCommands(CommandContainer):
raise CommandError(_('Command is not supported for zeroconf accounts')) raise CommandError(_('Command is not supported for zeroconf accounts'))
gajim.connections[self.account].sendPing(self.contact) gajim.connections[self.account].sendPing(self.contact)
@command('audio')
@documentation(_("Toggle audio session"))
def audio(self):
if self.audio_state == self.JINGLE_STATE_NOT_AVAILABLE:
raise CommandError(_("Video sessions are not available"))
else:
self._audio_button.toggled()
@command('video')
@documentation(_("Toggle video session"))
def video(self):
if self.video_state == self.JINGLE_STATE_NOT_AVAILABLE:
raise CommandError(_("Video sessions are not available"))
else:
self._video_button.toggled()
class StandardPrivateChatCommands(CommandContainer): class StandardPrivateChatCommands(CommandContainer):
""" """
This command container contains standard command which are unique to a This command container contains standard command which are unique to a