From 1095357c905d94c671ca5f88037581e9131468e3 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Wed, 30 Nov 2005 16:17:06 +0000 Subject: [PATCH] try to make get_status work --- src/gajim-remote.py | 7 +++---- src/remote_control.py | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gajim-remote.py b/src/gajim-remote.py index 0ce6a95b0..4d437c2d8 100755 --- a/src/gajim-remote.py +++ b/src/gajim-remote.py @@ -208,10 +208,9 @@ class GajimRemote: ], 'get_status': [ - _('Returns current status'), + _('Returns current status (the global one unless account is specified)'), [ - (_('account'), _('if specified, returns status for this account; ' - 'Else returns global status'), False) + (_('account'), _(''), False) ] ], @@ -562,7 +561,7 @@ Type "%s help %s" for more info') % (args[argv_len][0], BASENAME, self.command)) elif self.argv_len == 5: res = self.method(sys.argv[2], sys.argv[3], sys.argv[4]) elif argv_len == 6: - res = self.method(sys.argv[2], sys.argv[3], sys.argv[4], + res = self.method(sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5]) return res except Exception: diff --git a/src/remote_control.py b/src/remote_control.py index 7679e148c..d7f76c48f 100644 --- a/src/remote_control.py +++ b/src/remote_control.py @@ -135,7 +135,7 @@ class SignalObject(DbusPrototype): '''get_status(account = None) returns status (show to be exact) which is the global one unless account is given''' - account = self._get_real_arguments(args, 1) + account = self._get_real_arguments(args, 1)[0] accounts = gajim.contacts.keys() if not account and len(accounts) == 1: # if there is only one account in roster, take it as default @@ -532,6 +532,7 @@ class SignalObject(DbusPrototype): prefs_store = method(INTERFACE)(prefs_store) remove_contact = method(INTERFACE)(remove_contact) add_contact = method(INTERFACE)(add_contact) + get_status = method(INTERFACE)(get_status) class SessionBusNotPresent(Exception): '''This exception indicates that there is no session daemon'''