Created
May 11, 2012 16:12
-
-
Save prof7bit/2660700 to your computer and use it in GitHub Desktop.
Why doesn't it update the GUI, did I forget something?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure TTorChatPurpleClient.OnBuddyStatusChange(ABuddy: TABuddy); | |
var | |
buddy: PPurpleBuddy; | |
presence : PPurplePresence; | |
status_id: PChar; | |
begin | |
WriteLn('TTorChatPurpleClient.OnBuddyStatusChange()'); | |
buddy := purple_find_buddy(purple_account, PChar(ABuddy.ID)); | |
if Assigned(buddy) then begin | |
case ABuddy.Status of | |
TORCHAT_AVAILABLE: status_id := ID_AVAILABLE; | |
TORCHAT_AWAY: status_id := ID_AWAY; | |
TORCHAT_EXTENDED_AWAY: status_id := ID_XA; | |
TORCHAT_OFFLINE: status_id := ID_OFFLINE; | |
end; | |
presence := purple_buddy_get_presence(buddy); | |
purple_presence_switch_status(presence, status_id); | |
end; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment