| 7833 } |
7833 } |
| 7834 |
7834 |
| 7835 static GList * |
7835 static GList * |
| 7836 oscar_status_types(GaimAccount *account) |
7836 oscar_status_types(GaimAccount *account) |
| 7837 { |
7837 { |
| |
7838 gboolean is_icq; |
| 7838 GList *status_types = NULL; |
7839 GList *status_types = NULL; |
| 7839 GaimStatusType *type; |
7840 GaimStatusType *type; |
| 7840 |
7841 |
| 7841 g_return_val_if_fail(account != NULL, NULL); |
7842 g_return_val_if_fail(account != NULL, NULL); |
| 7842 |
7843 |
| |
7844 is_icq = aim_sn_is_icq(gaim_account_get_username(account)); |
| |
7845 |
| 7843 /* Oscar-common status types */ |
7846 /* Oscar-common status types */ |
| 7844 type = gaim_status_type_new_with_attrs(GAIM_STATUS_AVAILABLE, |
7847 if (is_icq) |
| 7845 OSCAR_STATUS_ID_AVAILABLE, |
7848 { |
| 7846 NULL, TRUE, TRUE, FALSE, |
7849 type = gaim_status_type_new_full(GAIM_STATUS_AVAILABLE, |
| 7847 "message", _("Message"), |
7850 OSCAR_STATUS_ID_AVAILABLE, |
| 7848 gaim_value_new(GAIM_TYPE_STRING), NULL); |
7851 NULL, TRUE, TRUE, FALSE); |
| 7849 status_types = g_list_append(status_types, type); |
7852 status_types = g_list_append(status_types, type); |
| |
7853 |
| |
7854 type = gaim_status_type_new_full(GAIM_STATUS_AVAILABLE, |
| |
7855 OSCAR_STATUS_ID_FREE4CHAT, |
| |
7856 _("Free For Chat"), TRUE, TRUE, FALSE); |
| |
7857 status_types = g_list_append(status_types, type); |
| |
7858 } |
| |
7859 else |
| |
7860 { |
| |
7861 type = gaim_status_type_new_with_attrs(GAIM_STATUS_AVAILABLE, |
| |
7862 OSCAR_STATUS_ID_AVAILABLE, |
| |
7863 NULL, TRUE, TRUE, FALSE, |
| |
7864 "message", _("Message"), |
| |
7865 gaim_value_new(GAIM_TYPE_STRING), NULL); |
| |
7866 status_types = g_list_append(status_types, type); |
| |
7867 } |
| |
7868 |
| 7850 |
7869 |
| 7851 type = gaim_status_type_new_with_attrs(GAIM_STATUS_AWAY, |
7870 type = gaim_status_type_new_with_attrs(GAIM_STATUS_AWAY, |
| 7852 OSCAR_STATUS_ID_AWAY, |
7871 OSCAR_STATUS_ID_AWAY, |
| 7853 NULL, TRUE, TRUE, FALSE, |
7872 NULL, TRUE, TRUE, FALSE, |
| 7854 "message", _("Message"), |
7873 "message", _("Message"), |
| 7859 OSCAR_STATUS_ID_INVISIBLE, |
7878 OSCAR_STATUS_ID_INVISIBLE, |
| 7860 NULL, TRUE, TRUE, FALSE); |
7879 NULL, TRUE, TRUE, FALSE); |
| 7861 status_types = g_list_append(status_types, type); |
7880 status_types = g_list_append(status_types, type); |
| 7862 |
7881 |
| 7863 /* ICQ-specific status types */ |
7882 /* ICQ-specific status types */ |
| 7864 if (aim_sn_is_icq(gaim_account_get_username(account))) |
7883 if (is_icq) |
| 7865 { |
7884 { |
| 7866 type = gaim_status_type_new_full(GAIM_STATUS_AVAILABLE, |
|
| 7867 OSCAR_STATUS_ID_FREE4CHAT, |
|
| 7868 _("Free For Chat"), TRUE, TRUE, FALSE); |
|
| 7869 status_types = g_list_append(status_types, type); |
|
| 7870 |
|
| 7871 type = gaim_status_type_new_full(GAIM_STATUS_UNAVAILABLE, |
7885 type = gaim_status_type_new_full(GAIM_STATUS_UNAVAILABLE, |
| 7872 OSCAR_STATUS_ID_OCCUPIED, |
7886 OSCAR_STATUS_ID_OCCUPIED, |
| 7873 _("Occupied"), TRUE, TRUE, FALSE); |
7887 _("Occupied"), TRUE, TRUE, FALSE); |
| 7874 status_types = g_list_append(status_types, type); |
7888 status_types = g_list_append(status_types, type); |
| 7875 |
7889 |