Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/pidgin-opensteamworks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreionrobb <eionrobb@8ca6c67d-4297-256d-f884-781da6d5760b>2011-11-23 02:02:50 +0400
committereionrobb <eionrobb@8ca6c67d-4297-256d-f884-781da6d5760b>2011-11-23 02:02:50 +0400
commit5e9d6152202daae1a2ce2c9258cc94908b7d45da (patch)
treea681b0c9f4fe3c581b4e53c970c4a128ee0c0152 /libsteamworks.cpp
parenta5f464cb5366f993663e554c6f50bd5e76ba63fe (diff)
Display a 'game' emblem in the buddy list if the user is in a game. also make the buddy update in the buddy list when the user starts/ends a game
Diffstat (limited to 'libsteamworks.cpp')
-rwxr-xr-xlibsteamworks.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/libsteamworks.cpp b/libsteamworks.cpp
index dbb610c..b55cf1a 100755
--- a/libsteamworks.cpp
+++ b/libsteamworks.cpp
@@ -342,7 +342,7 @@ steamworks_eventloop(gpointer userdata)
const gchar *alias = steam->friends->GetFriendPersonaName( state->m_ulSteamID );
serv_got_alias(pc, steamworks_sid_to_name(state->m_ulSteamID), alias);
}
- if (state->m_nChangeFlags & k_EPersonaChangeStatus)
+ if (state->m_nChangeFlags & (k_EPersonaChangeStatus | k_EPersonaChangeGamePlayed))
{
EPersonaState pstate = steam->friends->GetFriendPersonaState(state->m_ulSteamID);
const gchar *status_id = steamworks_personastate_to_statustype(pstate);
@@ -839,7 +839,7 @@ steamworks_tooltip_text(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gbo
PurpleStatus *status = purple_presence_get_active_status(presence);
purple_notify_user_info_add_pair(user_info, "Status", purple_status_get_name(status));
- if (steam && steam->friends)
+ if (steam)
{
guint64 gameid = steamworks_get_friend_gameid(steam, steamID);
if (gameid)
@@ -853,6 +853,20 @@ steamworks_tooltip_text(PurpleBuddy *buddy, PurpleNotifyUserInfo *user_info, gbo
}
}
+const gchar *
+steamworks_list_emblem(PurpleBuddy *buddy)
+{
+ PurpleConnection *pc = purple_account_get_connection(buddy->account);
+ SteamInfo *steam = (SteamInfo *)pc->proto_data;
+ CSteamID steamID = steamworks_name_to_sid(buddy->name);
+
+ if (steam && steamworks_get_friend_gameid(steam, steamID))
+ {
+ return "game";
+ }
+
+ return NULL;
+}
void
steamworks_close(PurpleConnection *pc)