Mercurial > pidgin
comparison libpurple/pounce.c @ 25808:5ebfa814b9e8
Finish off the libpurple updates for the hidden blist structs
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Sun, 02 Nov 2008 10:54:00 +0000 |
parents | f215729af7a7 |
children | a6e3cb32cdd2 |
comparison
equal
deleted
inserted
replaced
25807:e35115192593 | 25808:5ebfa814b9e8 |
---|---|
1040 } | 1040 } |
1041 | 1041 |
1042 static void | 1042 static void |
1043 buddy_state_cb(PurpleBuddy *buddy, PurplePounceEvent event) | 1043 buddy_state_cb(PurpleBuddy *buddy, PurplePounceEvent event) |
1044 { | 1044 { |
1045 purple_pounce_execute(buddy->account, buddy->name, event); | 1045 PurpleAccount *account = purple_buddy_get_account(buddy); |
1046 const gchar *name = purple_buddy_get_name(buddy); | |
1047 | |
1048 purple_pounce_execute(account, name, event); | |
1046 } | 1049 } |
1047 | 1050 |
1048 static void | 1051 static void |
1049 buddy_status_changed_cb(PurpleBuddy *buddy, PurpleStatus *old_status, | 1052 buddy_status_changed_cb(PurpleBuddy *buddy, PurpleStatus *old_status, |
1050 PurpleStatus *status) | 1053 PurpleStatus *status) |
1051 { | 1054 { |
1055 PurpleAccount *account = purple_buddy_get_account(buddy); | |
1056 const gchar *name = purple_buddy_get_name(buddy); | |
1052 gboolean old_available, available; | 1057 gboolean old_available, available; |
1053 | 1058 |
1054 available = purple_status_is_available(status); | 1059 available = purple_status_is_available(status); |
1055 old_available = purple_status_is_available(old_status); | 1060 old_available = purple_status_is_available(old_status); |
1056 | 1061 |
1057 if (available && !old_available) | 1062 if (available && !old_available) |
1058 purple_pounce_execute(buddy->account, buddy->name, | 1063 purple_pounce_execute(account, name, PURPLE_POUNCE_AWAY_RETURN); |
1059 PURPLE_POUNCE_AWAY_RETURN); | |
1060 else if (!available && old_available) | 1064 else if (!available && old_available) |
1061 purple_pounce_execute(buddy->account, buddy->name, | 1065 purple_pounce_execute(account, name, PURPLE_POUNCE_AWAY); |
1062 PURPLE_POUNCE_AWAY); | |
1063 } | 1066 } |
1064 | 1067 |
1065 static void | 1068 static void |
1066 buddy_idle_changed_cb(PurpleBuddy *buddy, gboolean old_idle, gboolean idle) | 1069 buddy_idle_changed_cb(PurpleBuddy *buddy, gboolean old_idle, gboolean idle) |
1067 { | 1070 { |
1071 PurpleAccount *account = purple_buddy_get_account(buddy); | |
1072 const gchar *name = purple_buddy_get_name(buddy); | |
1073 | |
1068 if (idle && !old_idle) | 1074 if (idle && !old_idle) |
1069 purple_pounce_execute(buddy->account, buddy->name, | 1075 purple_pounce_execute(account, name, PURPLE_POUNCE_IDLE); |
1070 PURPLE_POUNCE_IDLE); | |
1071 else if (!idle && old_idle) | 1076 else if (!idle && old_idle) |
1072 purple_pounce_execute(buddy->account, buddy->name, | 1077 purple_pounce_execute(account, name, PURPLE_POUNCE_IDLE_RETURN); |
1073 PURPLE_POUNCE_IDLE_RETURN); | |
1074 } | 1078 } |
1075 | 1079 |
1076 static void | 1080 static void |
1077 buddy_typing_cb(PurpleAccount *account, const char *name, void *data) | 1081 buddy_typing_cb(PurpleAccount *account, const char *name, void *data) |
1078 { | 1082 { |