Mercurial > pidgin.yaz
changeset 25077:9ee0cb95a252
This small optimization has been sitting in my tree for a long time.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 10 Feb 2009 04:25:45 +0000 |
parents | 008f186c7bc7 |
children | d720bedc091e |
files | pidgin/gtkdocklet.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkdocklet.c Tue Feb 10 04:20:24 2009 +0000 +++ b/pidgin/gtkdocklet.c Tue Feb 10 04:25:45 2009 +0000 @@ -88,13 +88,16 @@ static GList * get_pending_list(guint max) { - GList *l_im = NULL; - GList *l_chat = NULL; + GList *l_im, *l_chat; l_im = pidgin_conversations_find_unseen_list(PURPLE_CONV_TYPE_IM, PIDGIN_UNSEEN_TEXT, FALSE, max); + /* Short circuit if we have our information already */ + if (max == 1 && l_im != NULL) + return l_im; + l_chat = pidgin_conversations_find_unseen_list(PURPLE_CONV_TYPE_CHAT, PIDGIN_UNSEEN_NICK, FALSE, max);