[Pidgin] #7233: Ad-Hoc Commands are not always shown

Pidgin trac at pidgin.im
Sat Nov 1 17:06:10 EDT 2008


#7233: Ad-Hoc Commands are not always shown
------------------------------+---------------------------------------------
 Reporter:  chemistrydioxide  |        Owner:  deryni
     Type:  defect            |       Status:  new   
Milestone:                    |    Component:  XMPP  
  Version:  2.5.1             |   Resolution:        
 Keywords:  ad-hoc commands   |  
------------------------------+---------------------------------------------

Comment(by dreiss):

 I think I've tracked this down, but I'm not familiar enough with
 Pidgin/Purple's signal model to fix it.  Basically, the problem is that
 the iq result that provides the list of ad hoc commands comes long after
 the account is considered connected, so while the internal data structures
 are correct after the admin account logs on, the menu remains stale until
 some other account action (enabling your other account) triggers an
 update.  The approximate order of actions is
 {{{
 (13:44:22) adhoc: JABBER_STREAM_CONNECTED
 (13:44:22) adhoc: Updating accounts menu
 (13:44:22) adhoc: jabber_disco_items_server
 (13:44:22) adhoc: jabber_disco_finish_server_info_result_cb
 (13:44:22) adhoc: jabber_adhoc_server_get_list
 (13:44:22) adhoc: jabber_adhoc_server_got_list_cb
 }}}
 I think the solution is to trigger an accounts menu update at the end of
 `jabber_adhoc_server_got_list_cb`.  In pidgin/gtkblist.c, the call path is
 `update_menu_bar` -> `pidgin_blist_update_accounts_menu`.  It looks like
 the easiest way to call `update_menu_bar` is to emit the `account-
 modified` or `account-status-changed` signal.  This is the part that I'm
 not really sure how to do.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/7233#comment:5>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list