finch/gntlog.c

branch
soc.2013.gobjectification
changeset 34699
09b2c9219b57
parent 34696
6e0d13978666
child 34728
8efd73063ecf
equal deleted inserted replaced
34698:e0bd77bd4508 34699:09b2c9219b57
434 } 434 }
435 435
436 void finch_log_show_contact(PurpleContact *contact) 436 void finch_log_show_contact(PurpleContact *contact)
437 { 437 {
438 struct log_viewer_hash_t *ht; 438 struct log_viewer_hash_t *ht;
439 PurpleBlistNode *child; 439 PurpleBListNode *child;
440 FinchLogViewer *lv = NULL; 440 FinchLogViewer *lv = NULL;
441 GList *logs = NULL; 441 GList *logs = NULL;
442 const char *name = NULL; 442 const char *name = NULL;
443 char *title; 443 char *title;
444 int total_log_size = 0; 444 int total_log_size = 0;
455 gnt_window_present(lv->window); 455 gnt_window_present(lv->window);
456 g_free(ht); 456 g_free(ht);
457 return; 457 return;
458 } 458 }
459 459
460 for (child = purple_blist_node_get_first_child((PurpleBlistNode*)contact); child; 460 for (child = purple_blist_node_get_first_child((PurpleBListNode*)contact); child;
461 child = purple_blist_node_get_sibling_next(child)) { 461 child = purple_blist_node_get_sibling_next(child)) {
462 const char *name; 462 const char *name;
463 PurpleAccount *account; 463 PurpleAccount *account;
464 if (!PURPLE_IS_BUDDY(child)) 464 if (!PURPLE_IS_BUDDY(child))
465 continue; 465 continue;
478 478
479 /* This will happen if the contact doesn't have an alias, 479 /* This will happen if the contact doesn't have an alias,
480 * and none of the contact's buddies are online. 480 * and none of the contact's buddies are online.
481 * There is probably a better way to deal with this. */ 481 * There is probably a better way to deal with this. */
482 if (name == NULL) { 482 if (name == NULL) {
483 child = purple_blist_node_get_first_child((PurpleBlistNode*)contact); 483 child = purple_blist_node_get_first_child((PurpleBListNode*)contact);
484 if (child != NULL && PURPLE_IS_BUDDY(child)) 484 if (child != NULL && PURPLE_IS_BUDDY(child))
485 name = purple_buddy_get_contact_alias((PurpleBuddy *)child); 485 name = purple_buddy_get_contact_alias((PurpleBuddy *)child);
486 if (name == NULL) 486 if (name == NULL)
487 name = ""; 487 name = "";
488 } 488 }

mercurial