summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-11-28 16:09:44 +0100
committermathieui <mathieui@mathieui.net>2011-11-28 16:09:44 +0100
commit5abf8ab3ae3e2be3fc92d6fb5f2db86aa1e7af94 (patch)
treebf3f388edfddfec33953b47230983c3654ecccd2
parent72eeba42a2622cf86071fc41f838cbfc8024278d (diff)
downloadpoezio-5abf8ab3ae3e2be3fc92d6fb5f2db86aa1e7af94.tar.gz
poezio-5abf8ab3ae3e2be3fc92d6fb5f2db86aa1e7af94.tar.bz2
poezio-5abf8ab3ae3e2be3fc92d6fb5f2db86aa1e7af94.tar.xz
poezio-5abf8ab3ae3e2be3fc92d6fb5f2db86aa1e7af94.zip
Add a /bookmarks command
-rw-r--r--doc/en/usage.txt2
-rw-r--r--src/core.py8
2 files changed, 10 insertions, 0 deletions
diff --git a/doc/en/usage.txt b/doc/en/usage.txt
index 08f488be..8c7acf3b 100644
--- a/doc/en/usage.txt
+++ b/doc/en/usage.txt
@@ -215,6 +215,8 @@ These commands work in *any* tab.
with this command will be stored locally. They have priority over the ones
stored online.
+*/bookmarks*:: Show the current bookmarks.
+
*/set <option> [value]*:: Set the value to the option in your configuration
file. You can, for example, change your default nickname by doing "/set
default_nick toto" or your resource with "/set resource blabla". You can also
diff --git a/src/core.py b/src/core.py
index c91f56a1..5ab0abfb 100644
--- a/src/core.py
+++ b/src/core.py
@@ -140,6 +140,7 @@ class Core(object):
'set_plugin': (self.command_set_plugin, _("Usage: /set_plugin <plugin> <option> [value]\nSet Plugin: Set the value of the option in a plugin configuration file."), self.completion_set_plugin),
'invite': (self.command_invite, _("Usage: /invite <jid> <room> [reason]\nInvite: Invite jid in room with reason."), self.completion_invite),
'decline': (self.command_decline, _("Usage: /decline <room> [reason]\nDecline: Decline the invitation to room with or without reason."), self.completion_decline),
+ 'bookmarks': (self.command_bookmarks, _("Usage: /bookmarks\nBookmarks: Show the current bookmarks."), None),
}
self.key_func = {
@@ -1765,6 +1766,13 @@ class Core(object):
self.information(_('Your remote bookmarks are now: %s') %
[b for b in bookmark.bookmarks if b.method in ('pep', 'privatexml')], 'Info')
+ def command_bookmarks(self, arg):
+ """/bookmarks"""
+ self.information(_('Your remote bookmarks are: %s') %
+ [b for b in bookmark.bookmarks if b.method in ('pep', 'privatexml')], 'Info')
+ self.information(_('Your local bookmarks are: %s') %
+ [b for b in bookmark.bookmarks if b.method is 'local'], 'Info')
+
def command_set(self, arg):
"""
/set <option> [value]