| 241 c = purple_connections_get_all(); |
241 c = purple_connections_get_all(); |
| 242 |
242 |
| 243 while(c != NULL) { |
243 while(c != NULL) { |
| 244 PurpleConnection *gc = c->data; |
244 PurpleConnection *gc = c->data; |
| 245 PurpleProtocol *protocol = purple_connection_get_protocol(gc); |
245 PurpleProtocol *protocol = purple_connection_get_protocol(gc); |
| 246 if (protocol != NULL && PURPLE_PROTOCOL_IMPLEMENTS(protocol, CHAT_IFACE, info)) |
246 if (protocol != NULL && PURPLE_PROTOCOL_IMPLEMENTS(protocol, CHAT, info)) |
| 247 return TRUE; |
247 return TRUE; |
| 248 c = c->next; |
248 c = c->next; |
| 249 } |
249 } |
| 250 |
250 |
| 251 return FALSE; |
251 return FALSE; |
| 277 |
277 |
| 278 static void |
278 static void |
| 279 docklet_signed_on_cb(PurpleConnection *gc) |
279 docklet_signed_on_cb(PurpleConnection *gc) |
| 280 { |
280 { |
| 281 if (!enable_join_chat) { |
281 if (!enable_join_chat) { |
| 282 if (PURPLE_PROTOCOL_IMPLEMENTS(purple_connection_get_protocol(gc), CHAT_IFACE, info)) |
282 if (PURPLE_PROTOCOL_IMPLEMENTS(purple_connection_get_protocol(gc), CHAT, info)) |
| 283 enable_join_chat = TRUE; |
283 enable_join_chat = TRUE; |
| 284 } |
284 } |
| 285 docklet_update_status(); |
285 docklet_update_status(); |
| 286 } |
286 } |
| 287 |
287 |
| 288 static void |
288 static void |
| 289 docklet_signed_off_cb(PurpleConnection *gc) |
289 docklet_signed_off_cb(PurpleConnection *gc) |
| 290 { |
290 { |
| 291 if (enable_join_chat) { |
291 if (enable_join_chat) { |
| 292 if (PURPLE_PROTOCOL_IMPLEMENTS(purple_connection_get_protocol(gc), CHAT_IFACE, info)) |
292 if (PURPLE_PROTOCOL_IMPLEMENTS(purple_connection_get_protocol(gc), CHAT, info)) |
| 293 enable_join_chat = online_account_supports_chat(); |
293 enable_join_chat = online_account_supports_chat(); |
| 294 } |
294 } |
| 295 docklet_update_status(); |
295 docklet_update_status(); |
| 296 } |
296 } |
| 297 |
297 |