# HG changeset patch # User Mark Doliner # Date 1135583021 0 # Node ID eb4841fa697ce52fc665bea673ace630a6088d95 # Parent e265e2eac9e19a3ca58ac46fd32b19c296826440 [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 diff -r e265e2eac9e1 -r eb4841fa697c src/protocols/oscar/oscar.c --- 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);