Changeset 7787 for branches/gajim_0.11/src/gajim-remote.py
- Timestamp:
- 01/06/07 12:00:50 (2 years ago)
- Files:
-
- 1 modified
-
branches/gajim_0.11/src/gajim-remote.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11/src/gajim-remote.py
r7519 r7787 76 76 ], 77 77 'show_next_pending_event': [ 78 _('Pop upsa window with the next pending event'),78 _('Pops up a window with the next pending event'), 79 79 [] 80 80 ], 81 81 'list_contacts': [ 82 _('Prints a list of all contacts in the roster. Each contact appear on a separate line'), 83 [ 84 (_('account'), _('show only contacts of the given account'), False) 82 _('Prints a list of all contacts in the roster. Each contact ' 83 'appears on a separate line'), 84 [ 85 (_('account'), _('show only contacts of the given account'), 86 False) 85 87 ] 86 88 … … 212 214 213 215 'get_unread_msgs_number': [ 214 _('Returns number of unread edmessages'),216 _('Returns number of unread messages'), 215 217 [ ] 216 218 ], … … 230 232 ] 231 233 ], 234 'handle_uri': [ 235 _('Handle a xmpp:/ uri'), 236 [ 237 (_('uri'), _(''), True), 238 (_('account'), _(''), False) 239 ] 240 ], 241 'join_room': [ 242 _('Join a MUC room'), 243 [ 244 (_('room'), _(''), True), 245 (_('nick'), _(''), False), 246 (_('password'), _(''), False), 247 (_('account'), _(''), False) 248 ] 249 ], 250 232 251 } 233 252 if self.argv_len < 2 or \ … … 241 260 print self.compose_help().encode(PREFERRED_ENCODING) 242 261 sys.exit(0) 243 262 if self.command == 'handle_uri': 263 self.handle_uri() 244 264 self.init_connection() 245 265 self.check_arguments() … … 422 442 (args[argv_len][0], BASENAME, self.command)) 423 443 444 def handle_uri(self): 445 if not sys.argv[2:][0].startswith('xmpp:'): 446 send_error(_('Wrong uri')) 447 sys.argv[2] = sys.argv[2][5:] 448 uri = sys.argv[2:][0] 449 if not '?' in uri: 450 self.command = sys.argv[1] = 'open_chat' 451 return 452 (jid, action) = uri.split('?', 1) 453 sys.argv[2] = jid 454 if action == 'join': 455 self.command = sys.argv[1] = 'join_room' 456 return 457 458 sys.exit(0) 459 424 460 def call_remote_method(self): 425 461 ''' calls self.method with arguments from sys.argv[2:] '''
