From: <the...@us...> - 2006-04-21 04:03:59
|
Revision: 16077 Author: thekingant Date: 2006-04-20 21:03:53 -0700 (Thu, 20 Apr 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16077&view=rev Log Message: ----------- 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. Modified Paths: -------------- trunk/src/savedstatuses.c trunk/src/savedstatuses.h Modified: trunk/src/savedstatuses.c =================================================================== --- trunk/src/savedstatuses.c 2006-04-21 03:54:35 UTC (rev 16076) +++ trunk/src/savedstatuses.c 2006-04-21 04:03:53 UTC (rev 16077) @@ -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++; Modified: trunk/src/savedstatuses.h =================================================================== --- trunk/src/savedstatuses.h 2006-04-21 03:54:35 UTC (rev 16076) +++ trunk/src/savedstatuses.h 2006-04-21 04:03:53 UTC (rev 16077) @@ -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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |