Mercurial > pidgin.yaz
diff 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 |
line wrap: on
line diff
--- a/src/gtklog.c Thu Oct 20 16:50:00 2005 +0000 +++ b/src/gtklog.c Thu Oct 20 17:11:56 2005 +0000 @@ -521,9 +521,8 @@ if (!GAIM_BLIST_NODE_IS_BUDDY(child)) continue; - logs = g_list_concat(logs, - gaim_log_get_logs(GAIM_LOG_IM, ((GaimBuddy *)child)->name, - ((GaimBuddy *)child)->account)); + logs = g_list_concat(gaim_log_get_logs(GAIM_LOG_IM, ((GaimBuddy *)child)->name, + ((GaimBuddy *)child)->account), logs); total_log_size += gaim_log_get_total_size(GAIM_LOG_IM, ((GaimBuddy *)child)->name, ((GaimBuddy *)child)->account); } logs = g_list_sort(logs, gaim_log_compare); @@ -558,7 +557,7 @@ if(gaim_find_prpl(gaim_account_get_protocol_id(account)) == NULL) continue; - logs = g_list_concat(logs, gaim_log_get_system_logs(account)); + logs = g_list_concat(gaim_log_get_system_logs(account), logs); } logs = g_list_sort(logs, gaim_log_compare);