Mercurial > pidgin.yaz
comparison src/gtklog.c @ 11703:a53cef8bd22b
[gaim-migrate @ 13994]
Change some g_list_append()s to g_list_prepend()s, since the list is sorted later either way. Also, change the order of arguments to a couple g_list_concat()s to cut down on the number of list elements to walk. These changes may improve performance a bit if you have a lot of logs. They certainly don't make the code more confusing or uglier, so I didn't see much harm.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 20 Oct 2005 17:11:56 +0000 |
parents | 249fb5de4c5b |
children | d56778d594d9 |
comparison
equal
deleted
inserted
replaced
11702:994f1c7bee8b | 11703:a53cef8bd22b |
---|---|
519 | 519 |
520 for (child = contact->node.child ; child ; child = child->next) { | 520 for (child = contact->node.child ; child ; child = child->next) { |
521 if (!GAIM_BLIST_NODE_IS_BUDDY(child)) | 521 if (!GAIM_BLIST_NODE_IS_BUDDY(child)) |
522 continue; | 522 continue; |
523 | 523 |
524 logs = g_list_concat(logs, | 524 logs = g_list_concat(gaim_log_get_logs(GAIM_LOG_IM, ((GaimBuddy *)child)->name, |
525 gaim_log_get_logs(GAIM_LOG_IM, ((GaimBuddy *)child)->name, | 525 ((GaimBuddy *)child)->account), logs); |
526 ((GaimBuddy *)child)->account)); | |
527 total_log_size += gaim_log_get_total_size(GAIM_LOG_IM, ((GaimBuddy *)child)->name, ((GaimBuddy *)child)->account); | 526 total_log_size += gaim_log_get_total_size(GAIM_LOG_IM, ((GaimBuddy *)child)->name, ((GaimBuddy *)child)->account); |
528 } | 527 } |
529 logs = g_list_sort(logs, gaim_log_compare); | 528 logs = g_list_sort(logs, gaim_log_compare); |
530 | 529 |
531 filename = g_build_filename(DATADIR, "pixmaps", "gaim", "icons", "online.png", NULL); | 530 filename = g_build_filename(DATADIR, "pixmaps", "gaim", "icons", "online.png", NULL); |
556 | 555 |
557 GaimAccount *account = (GaimAccount *)accounts->data; | 556 GaimAccount *account = (GaimAccount *)accounts->data; |
558 if(gaim_find_prpl(gaim_account_get_protocol_id(account)) == NULL) | 557 if(gaim_find_prpl(gaim_account_get_protocol_id(account)) == NULL) |
559 continue; | 558 continue; |
560 | 559 |
561 logs = g_list_concat(logs, gaim_log_get_system_logs(account)); | 560 logs = g_list_concat(gaim_log_get_system_logs(account), logs); |
562 } | 561 } |
563 logs = g_list_sort(logs, gaim_log_compare); | 562 logs = g_list_sort(logs, gaim_log_compare); |
564 | 563 |
565 syslog_viewer = display_log_viewer(NULL, logs, _("System Log"), NULL, 0); | 564 syslog_viewer = display_log_viewer(NULL, logs, _("System Log"), NULL, 0); |
566 } | 565 } |