changeset 629a8c094d09 in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=629a8c094d09
description: Minor reimplementation the /audio and /video commands

diffstat:

 src/command_system/implementation/standard.py |  18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diffs (34 lines):

diff -r 3c789e643723 -r 629a8c094d09 
src/command_system/implementation/standard.py
--- a/src/command_system/implementation/standard.py     Sat Aug 07 17:26:12 
2010 +0300
+++ b/src/command_system/implementation/standard.py     Sat Aug 07 17:37:14 
2010 +0300
@@ -198,22 +198,20 @@
     def audio(self):
         if not self.audio_available:
             raise CommandError(_("Audio sessions are not available"))
-        else:
-            # A state of an audio session is toggled by inverting a state of 
the
-            # appropriate button.
-            state = self._audio_button.get_active()
-            self._audio_button.set_active(not state)
+        # An audio session is toggled by inverting the state of the
+        # appropriate button.
+        state = self._audio_button.get_active()
+        self._audio_button.set_active(not state)
 
     @command
     @doc(_("Toggle video session"))
     def video(self):
         if not self.video_available:
             raise CommandError(_("Video sessions are not available"))
-        else:
-            # A state of a video session is toggled by inverting a state of the
-            # appropriate button.
-            state = self._video_button.get_active()
-            self._video_button.set_active(not state)
+        # A video session is toggled by inverting the state of the
+        # appropriate button.
+        state = self._video_button.get_active()
+        self._video_button.set_active(not state)
 
 class StandardChatCommands(CommandContainer):
     """
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to