Mercurial > pidgin.yaz
comparison src/status.c @ 12015:5a63ea24ac83
[gaim-migrate @ 14308]
Fix from sadrul for updating the Conv. tab icon when the buddy's idle status changes.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 09 Nov 2005 01:36:28 +0000 |
parents | aadf61b30056 |
children | 355c7acbb61d |
comparison
equal
deleted
inserted
replaced
12014:bdf8081b1bc1 | 12015:5a63ea24ac83 |
---|---|
1258 static void | 1258 static void |
1259 update_buddy_idle(GaimBuddy *buddy, GaimPresence *presence, | 1259 update_buddy_idle(GaimBuddy *buddy, GaimPresence *presence, |
1260 time_t current_time, gboolean old_idle, gboolean idle) | 1260 time_t current_time, gboolean old_idle, gboolean idle) |
1261 { | 1261 { |
1262 GaimBlistUiOps *ops = gaim_get_blist()->ui_ops; | 1262 GaimBlistUiOps *ops = gaim_get_blist()->ui_ops; |
1263 GaimConversation *conv; | |
1263 | 1264 |
1264 if (!old_idle && idle) | 1265 if (!old_idle && idle) |
1265 { | 1266 { |
1266 if (gaim_prefs_get_bool("/core/logging/log_system")) | 1267 if (gaim_prefs_get_bool("/core/logging/log_system")) |
1267 { | 1268 { |
1292 gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle-changed", buddy, | 1293 gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle-changed", buddy, |
1293 old_idle, idle); | 1294 old_idle, idle); |
1294 | 1295 |
1295 gaim_contact_invalidate_priority_buddy(gaim_buddy_get_contact(buddy)); | 1296 gaim_contact_invalidate_priority_buddy(gaim_buddy_get_contact(buddy)); |
1296 | 1297 |
1298 /* Should this be done here? It'd perhaps make more sense to | |
1299 * connect to buddy-[un]idle signals and update from there | |
1300 */ | |
1301 | |
1297 if (ops != NULL && ops->update != NULL) | 1302 if (ops != NULL && ops->update != NULL) |
1298 ops->update(gaim_get_blist(), (GaimBlistNode *)buddy); | 1303 ops->update(gaim_get_blist(), (GaimBlistNode *)buddy); |
1304 | |
1305 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, | |
1306 gaim_buddy_get_name(buddy), | |
1307 gaim_buddy_get_account(buddy)); | |
1308 if (conv) | |
1309 { | |
1310 GaimConversationUiOps *conv_ops; | |
1311 conv_ops = gaim_conversation_get_ui_ops(conv); | |
1312 if (conv_ops && conv_ops->updated) | |
1313 conv_ops->updated(conv, GAIM_CONV_UPDATE_AWAY); | |
1314 } | |
1299 } | 1315 } |
1300 | 1316 |
1301 void | 1317 void |
1302 gaim_presence_set_idle(GaimPresence *presence, gboolean idle, time_t idle_time) | 1318 gaim_presence_set_idle(GaimPresence *presence, gboolean idle, time_t idle_time) |
1303 { | 1319 { |