[Pidgin] #4696: Wrong attrs on old_status in buddy-status-changed signal

Pidgin trac at pidgin.im
Wed Feb 4 01:23:10 EST 2009


#4696: Wrong attrs on old_status in buddy-status-changed signal
------------------------+---------------------------------------------------
 Reporter:  shreevatsa  |           Owner:           
     Type:  defect      |          Status:  new      
Milestone:              |       Component:  libpurple
  Version:  2.3.1       |      Resolution:           
 Keywords:              |   Launchpad_bug:           
------------------------+---------------------------------------------------

Comment(by darkrain42):

 I ran into this a few months ago when trying to handle the `status-
 changed` signal. If I remember correctly, this happens when a status
 change involves only changing attributes (e.g. the buddy remains
 Available, but is changing her status message from "With my freeze ray..."
 to "What did they do with the yahren in the Re-Imagined Series?"). In this
 case, the two `PurpleStatus` objects passed to your signal are actually
 the same object.

 This is an unfortunate limitation of the status API, since each buddy
 always has a `PurpleStatus` for each possible state, so the sort of change
 I described is not easily discoverable by an entity using the signal.

 It might be possible to redesign the status API to store only one
 `PurpleStatus` at a time in a `PurplePresence`* (the 'active' one) and, to
 activate a new one, a caller would pass in a new `PurpleStatus` object.
 This would allow the signals to easily compare the two objects, but would
 probably have some other downsides I'm not thinking of (and would break
 ABI, so it would be a 3.0.0 change).

 *by one at a time, I mean one exclusive at a time. Independent statuses
 would probably be keyed off of a string identifier and activating a new
 one of those in my theoretical redesign would remove the old one (by id).

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


More information about the Tracker mailing list