Mercurial > pidgin
changeset 19333:5e39506a0e3b
Select the correct item in the dropdown when using a transient status.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 18 Aug 2007 05:57:52 +0000 |
parents | 56078ee8692e |
children | fda2d2d99850 770b04e551a7 |
files | pidgin/gtkstatusbox.c |
diffstat | 1 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkstatusbox.c Sat Aug 18 03:22:08 2007 +0000 +++ b/pidgin/gtkstatusbox.c Sat Aug 18 05:57:52 2007 +0000 @@ -788,7 +788,8 @@ primitive = purple_savedstatus_get_type(saved_status); if (!status_box->token_status_account && purple_savedstatus_is_transient(saved_status) && ((primitive == PURPLE_STATUS_AVAILABLE) || (primitive == PURPLE_STATUS_AWAY) || - (primitive == PURPLE_STATUS_INVISIBLE) || (primitive == PURPLE_STATUS_OFFLINE)) && + (primitive == PURPLE_STATUS_INVISIBLE) || (primitive == PURPLE_STATUS_OFFLINE) || + (primitive == PURPLE_STATUS_UNAVAILABLE)) && (!purple_savedstatus_has_substatuses(saved_status))) { index = get_statusbox_index(status_box, saved_status); @@ -2562,24 +2563,23 @@ static gint get_statusbox_index(PidginStatusBox *box, PurpleSavedStatus *saved_status) { - gint index; + gint index = -1; switch (purple_savedstatus_get_type(saved_status)) { - case PURPLE_STATUS_AVAILABLE: - index = 0; - break; + /* In reverse order */ + case PURPLE_STATUS_OFFLINE: + index++; + case PURPLE_STATUS_INVISIBLE: + index++; + case PURPLE_STATUS_UNAVAILABLE: + index++; case PURPLE_STATUS_AWAY: - index = 1; - break; - case PURPLE_STATUS_INVISIBLE: - index = 2; - break; - case PURPLE_STATUS_OFFLINE: - index = 3; + index++; + case PURPLE_STATUS_AVAILABLE: + index++; break; default: - index = -1; break; }