Skip to content

Instantly share code, notes, and snippets.

@prof7bit
Created May 11, 2012 16:12
Show Gist options
  • Save prof7bit/2660700 to your computer and use it in GitHub Desktop.
Save prof7bit/2660700 to your computer and use it in GitHub Desktop.
Why doesn't it update the GUI, did I forget something?
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