Opened 10 years ago

Last modified 10 years ago

#8675 new patch

Changed Buddy State Notification to reflect Mobile status

Reported by: jlintern Owned by:
Milestone: 3.0.0 Component: plugins
Version: 2.5.5 Keywords: buddy state notification mobile

Description (last modified by jlintern)

References #3968

Small change to the Buddy State Notification plugin to print messages when buddies go/return from mobile status.

The only hitch--- I had to add a purple_signal_emit in prpl.c (which is duplicated in the subsequent call to purple_blist_update_buddy_status). It was the easiest way I could find for the correct behavior to surface in the plugin. As it stands, the signal emitted in prpl.c correctly handles the (available->mobile) case and the signal emitted in blist.c correctly handles the (mobile->available) case.

AFAICT, the issue arises from the active/exclusive status paradigm and I don't understand the model well enough to do this the Right Way.

Attachments (1)

buddy_state_notification_mobile.patch (2.1 KB) - added by jlintern 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by jlintern

comment:1 Changed 10 years ago by jlintern

  • Description modified (diff)

Actually, some notifications that aren't mobile-related are being duplicated now, so this patch is no good. However, someone might be able to take a look and figure out a better way to accomplish what I was after?

comment:2 Changed 10 years ago by rekkanoryo

  • Milestone set to Patches Needing Review

comment:3 Changed 10 years ago by darkrain42

  • Milestone changed from Patches Needing Review to Patches Needing Improvement

Per jlintern's comments, this isn't acceptable because it's duplicating notifications. It's not apparent to me why you wouldn't be able to pick up the mobile status deactivating without the modification to prpl.c.

I don't have any buddies that use mobile statuses, but if you print out the purple_status_type_get_id values for old_status and status when gong from mobile->active, what are the values?

comment:4 Changed 10 years ago by darkrain42

  • Milestone changed from Patches Needing Improvement to 3.0.0

Oh, I see now. purple_blist_update_buddy_status is only passed the old status (in this case, PURPLE_STATUS_AVAILABLE or something) and then that function picks the current active status (which is still PURPLE_STATUS_AVAILABLE, because mobile is independent) and emits a "hey, the status has changed" signal.

I think the fix is to change purple_blist_update_buddy_status() to take both the old and new status (or just the new status, possibly). That's a 3.0.0 change.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!