Mercurial > pidgin
changeset 12662:eb4841fa697c
[gaim-migrate @ 15005]
sf bug #1385691, Text field visible even when status set to "online"
Don't allow available messages for ICQ. The server doesn't support them.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 26 Dec 2005 07:43:41 +0000 |
parents | e265e2eac9e1 |
children | 09a241749828 |
files | src/protocols/oscar/oscar.c |
diffstat | 1 files changed, 26 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Mon Dec 26 06:50:51 2005 +0000 +++ b/src/protocols/oscar/oscar.c Mon Dec 26 07:43:41 2005 +0000 @@ -7835,18 +7835,37 @@ static GList * oscar_status_types(GaimAccount *account) { + gboolean is_icq; GList *status_types = NULL; GaimStatusType *type; g_return_val_if_fail(account != NULL, NULL); + is_icq = aim_sn_is_icq(gaim_account_get_username(account)); + /* Oscar-common status types */ - type = gaim_status_type_new_with_attrs(GAIM_STATUS_AVAILABLE, - OSCAR_STATUS_ID_AVAILABLE, - NULL, TRUE, TRUE, FALSE, - "message", _("Message"), - gaim_value_new(GAIM_TYPE_STRING), NULL); - status_types = g_list_append(status_types, type); + if (is_icq) + { + type = gaim_status_type_new_full(GAIM_STATUS_AVAILABLE, + OSCAR_STATUS_ID_AVAILABLE, + NULL, TRUE, TRUE, FALSE); + status_types = g_list_append(status_types, type); + + type = gaim_status_type_new_full(GAIM_STATUS_AVAILABLE, + OSCAR_STATUS_ID_FREE4CHAT, + _("Free For Chat"), TRUE, TRUE, FALSE); + status_types = g_list_append(status_types, type); + } + else + { + type = gaim_status_type_new_with_attrs(GAIM_STATUS_AVAILABLE, + OSCAR_STATUS_ID_AVAILABLE, + NULL, TRUE, TRUE, FALSE, + "message", _("Message"), + gaim_value_new(GAIM_TYPE_STRING), NULL); + status_types = g_list_append(status_types, type); + } + type = gaim_status_type_new_with_attrs(GAIM_STATUS_AWAY, OSCAR_STATUS_ID_AWAY, @@ -7861,13 +7880,8 @@ status_types = g_list_append(status_types, type); /* ICQ-specific status types */ - if (aim_sn_is_icq(gaim_account_get_username(account))) + if (is_icq) { - type = gaim_status_type_new_full(GAIM_STATUS_AVAILABLE, - OSCAR_STATUS_ID_FREE4CHAT, - _("Free For Chat"), TRUE, TRUE, FALSE); - status_types = g_list_append(status_types, type); - type = gaim_status_type_new_full(GAIM_STATUS_UNAVAILABLE, OSCAR_STATUS_ID_OCCUPIED, _("Occupied"), TRUE, TRUE, FALSE);