Added /gpg command and re-arranged commands scope

This commit is contained in:
Alexander Cherniuk 2010-03-18 10:45:56 +02:00
parent 03f6c9f380
commit 033843093f
1 changed files with 22 additions and 9 deletions

View File

@ -157,13 +157,18 @@ class StandardCommonCommands(CommandContainer):
for connection in gajim.connections.itervalues(): for connection in gajim.connections.itervalues():
connection.change_status('online', message) connection.change_status('online', message)
class StandardChatCommands(CommandContainer): class StandardCommonChatCommands(CommandContainer):
""" """
This command container contains standard command which are unique to This command container contans standard commands, which are common
a chat. to a chat and a private chat only.
""" """
HOSTS = (ChatCommands,) HOSTS = (ChatCommands, PrivateChatCommands)
@command
@documentation(_("Toggle the GPG encryption"))
def gpg(self):
self._toggle_gpg()
@command @command
@documentation(_("Send a ping to the contact")) @documentation(_("Send a ping to the contact"))
@ -209,18 +214,26 @@ class StandardChatCommands(CommandContainer):
state = self._video_button.get_active() state = self._video_button.get_active()
self._video_button.set_active(not state) self._video_button.set_active(not state)
class StandardChatCommands(CommandContainer):
"""
This command container contains standard commands which are unique
to a chat.
"""
HOSTS = (ChatCommands,)
class StandardPrivateChatCommands(CommandContainer): class StandardPrivateChatCommands(CommandContainer):
""" """
This command container contains standard command which are unique to This command container contains standard commands which are unique
a private chat. to a private chat.
""" """
HOSTS = (PrivateChatCommands,) HOSTS = (PrivateChatCommands,)
class StandardGroupchatCommands(CommandContainer): class StandardGroupChatCommands(CommandContainer):
""" """
This command container contains standard command which are unique to This command container contains standard commands which are unique
a group chat. to a group chat.
""" """
HOSTS = (GroupChatCommands,) HOSTS = (GroupChatCommands,)