Mercurial > pidgin
diff src/savedstatuses.c @ 11739:a25be0e70a67
[gaim-migrate @ 14030]
I changed the GtkStatusBox list stores to use an enum instead of a string
to identify the items in the GtkStatusBox. This feels a lot cleaner to me
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 23 Oct 2005 06:46:07 +0000 |
parents | ef511dec9903 |
children | 7584d802f0ac |
line wrap: on
line diff
--- a/src/savedstatuses.c Sun Oct 23 04:48:01 2005 +0000 +++ b/src/savedstatuses.c Sun Oct 23 06:46:07 2005 +0000 @@ -522,28 +522,21 @@ gaim_savedstatus_activate_for_account(const GaimSavedStatus *saved_status, GaimAccount *account) { - const GList *status_types; GaimStatusType *status_type; g_return_if_fail(saved_status != NULL); g_return_if_fail(account != NULL); - /* Find the status type that matches the given primitive */ - status_types = gaim_account_get_status_types(account); - while (status_types != NULL) + status_type = gaim_account_get_status_type_with_primitive(account, saved_status->type); + + if (status_type != NULL) { - status_type = status_types->data; - if (gaim_status_type_get_primitive(status_type) == saved_status->type) - { - if (saved_status->message != NULL) - gaim_account_set_status(account, gaim_status_type_get_id(status_type), - TRUE, "message", saved_status->message, NULL); - else - gaim_account_set_status(account, gaim_status_type_get_id(status_type), - TRUE, NULL); - return; - } - status_types = status_types->next; + if (saved_status->message != NULL) + gaim_account_set_status(account, gaim_status_type_get_id(status_type), + TRUE, "message", saved_status->message, NULL); + else + gaim_account_set_status(account, gaim_status_type_get_id(status_type), + TRUE, NULL); } }