summaryrefslogtreecommitdiff
path: root/src/core/core.py
diff options
context:
space:
mode:
authorEijebong <eijebong@bananium.fr>2014-12-03 13:53:41 +0100
committermathieui <mathieui@mathieui.net>2014-12-05 20:39:23 +0100
commit9caa992333cfc1a38c3b0a678fea7fa18e07eca9 (patch)
treecbd9f790baa5428d8c4bc828abfe7b8d866cae31 /src/core/core.py
parent5b7606722e56c867f9d5bf2065b7dc5535d87d1d (diff)
downloadpoezio-9caa992333cfc1a38c3b0a678fea7fa18e07eca9.tar.gz
poezio-9caa992333cfc1a38c3b0a678fea7fa18e07eca9.tar.bz2
poezio-9caa992333cfc1a38c3b0a678fea7fa18e07eca9.tar.xz
poezio-9caa992333cfc1a38c3b0a678fea7fa18e07eca9.zip
Add a set_default command.
Diffstat (limited to 'src/core/core.py')
-rw-r--r--src/core/core.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/core.py b/src/core/core.py
index 4daeed6c..65d8622c 100644
--- a/src/core/core.py
+++ b/src/core/core.py
@@ -1773,6 +1773,14 @@ class Core(object):
"used as a special value to toggle a boolean option."),
shortdesc=_("Set the value of an option"),
completion=self.completion_set)
+ self.register_command('set_default', self.command_set_default,
+ usage=_("[section] <option>"),
+ desc=_("Set the default value of an option. For example,"
+ "`/set_default resource` will reset the default_resource"
+ "option. You can also reset options in specific"
+ "sections by doing `/set_default section option`."),
+ shortdesc=_("Set the default value of an option"),
+ completion=self.completion_set_default)
self.register_command('toggle', self.command_toggle,
usage=_('<option>'),
desc=_('Shortcut for /set <option> toggle'),
@@ -1967,6 +1975,7 @@ class Core(object):
command_destroy_room = commands.command_destroy_room
command_remove_bookmark = commands.command_remove_bookmark
command_set = commands.command_set
+ command_set_default = commands.command_set_default
command_toggle = commands.command_toggle
command_server_cycle = commands.command_server_cycle
command_last_activity = commands.command_last_activity
@@ -2007,6 +2016,7 @@ class Core(object):
completion_last_activity = completions.completion_last_activity
completion_server_cycle = completions.completion_server_cycle
completion_set = completions.completion_set
+ completion_set_default = completions.completion_set_default
completion_toggle = completions.completion_toggle
completion_bookmark_local = completions.completion_bookmark_local