# HG changeset patch # User Mark Doliner # Date 1145592233 0 # Node ID 53fdb7cc6940f9cf29ed65a5b9aecc263c8e04c2 # Parent 183c177d8cdd0414efbf5e021c9dca6e665a3f63 [gaim-migrate @ 16077] Don't show simple transient statuses in the list of popular statuses in the gtkstatusbox or in the docklet. i.e. don't show "Available" twice. The argument in favor of showing "Available" without a message is that you don't have to wait for the timeout before the status is activated. I don't think the added confusion of people saying "Why does it say available 2 times?!" is worth this ability. And you can still create a basic saved status with no message if you want that functionality. committer: Tailor Script diff -r 183c177d8cdd -r 53fdb7cc6940 src/savedstatuses.c --- a/src/savedstatuses.c Fri Apr 21 03:54:35 2006 +0000 +++ b/src/savedstatuses.c Fri Apr 21 04:03:53 2006 +0000 @@ -687,7 +687,7 @@ GList *popular = NULL; GList *cur; int i; - GaimSavedStatus *current; + GaimSavedStatus *current, *next; /* We don't want the current status to be in the GList */ current = gaim_savedstatus_get_current(); @@ -697,7 +697,9 @@ cur = saved_statuses; while ((i < how_many) && (cur != NULL)) { - if (cur->data != current) + next = cur->data; + if ((next != current) && (!gaim_savedstatus_is_transient(next) + || gaim_savedstatus_get_message(next) != NULL)) { popular = g_list_prepend(popular, cur->data); i++; diff -r 183c177d8cdd -r 53fdb7cc6940 src/savedstatuses.h --- a/src/savedstatuses.h Fri Apr 21 03:54:35 2006 +0000 +++ b/src/savedstatuses.h Fri Apr 21 04:03:53 2006 +0000 @@ -156,7 +156,9 @@ * determined by when the last time a saved_status was used and * how many times it has been used. If the current status would * normally show up in this list, then it is omited and instead - * the "how_many+1" saved status will appear in the list. + * the "how_many+1" saved status will appear in the list. Also + * transient statuses without messages are not included in the + * list. * * @param how_many The maximum number of saved statuses * to return, or '0' to get all saved