Index: src/protocols/msn/msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.326 diff -u -p -r1.326 msn.c --- src/protocols/msn/msn.c 19 Sep 2004 19:07:14 -0000 1.326 +++ src/protocols/msn/msn.c 21 Sep 2004 00:50:31 -0000 @@ -404,7 +404,8 @@ msn_list_emblems(GaimBuddy *b, const cha else if (gaim_presence_is_status_active(presence, "busy") || gaim_presence_is_status_active(presence, "phone")) emblems[i++] = "occupied"; - else if (gaim_presence_is_status_active(presence, "away")) + else if (gaim_presence_is_status_active(presence, "away") || + gaim_presence_is_idle(presence)) emblems[i++] = "away"; if (user == NULL) @@ -423,43 +424,43 @@ msn_list_emblems(GaimBuddy *b, const cha static char * msn_status_text(GaimBuddy *buddy) { - GString *s; GaimPresence *presence; GaimStatus *status; - MsnUser *user; - s = g_string_new(""); - user = buddy->proto_data; presence = gaim_buddy_get_presence(buddy); status = gaim_presence_get_active_status(presence); - if (!gaim_status_is_available(status)) + if (!gaim_presence_is_available(presence) && !gaim_presence_is_idle(presence)) { - g_string_append_printf(s, _("\n%s: %s"), _("Status"), - gaim_status_get_name(status)); + return g_strdup(gaim_status_get_name(status)); } - g_string_append_printf(s, _("\n%s: %s"), _("Has you"), - (user->list_op & (1 << MSN_LIST_RL)) ? - _("Yes") : _("No")); - - return g_string_free(s, FALSE); + return NULL; } static char * msn_tooltip_text(GaimBuddy *buddy) { + MsnUser *user; GaimPresence *presence = gaim_buddy_get_presence(buddy); GaimStatus *status = gaim_presence_get_active_status(presence); - char *text = NULL; + GString *s; + user = buddy->proto_data; + + s = g_string_new(""); if (gaim_presence_is_online(presence)) { - text = g_strdup_printf(_("\n%s: %s"), _("Status"), - gaim_status_get_name(status)); + g_string_append_printf(s, _("\n%s: %s"), _("Status"), + gaim_presence_is_idle(presence) ? + _("Idle") : gaim_status_get_name(status)); } - return text; + g_string_append_printf(s, _("\n%s: %s"), _("Has you"), + (user->list_op & (1 << MSN_LIST_RL)) ? + _("Yes") : _("No")); + + return g_string_free(s, FALSE); } static GList * @@ -468,21 +469,16 @@ msn_status_types(GaimAccount *account) GaimStatusType *status; GList *types = NULL; - status = gaim_status_type_new(GAIM_STATUS_OFFLINE, - "offline", _("Offline"), FALSE); + status = gaim_status_type_new_full(GAIM_STATUS_OFFLINE, + "offline", _("Offline"), FALSE, FALSE, FALSE); types = g_list_append(types, status); - status = gaim_status_type_new(GAIM_STATUS_ONLINE, - "online", _("Online"), FALSE); + status = gaim_status_type_new_full(GAIM_STATUS_ONLINE, + "online", _("Online"), FALSE, FALSE, FALSE); types = g_list_append(types, status); status = gaim_status_type_new_full(GAIM_STATUS_AVAILABLE, - "available", _("Available"), FALSE, FALSE, FALSE); - types = g_list_append(types, status); - - status = gaim_status_type_new_full(GAIM_STATUS_UNAVAILABLE, - "unavailable", _("Unavailable"), - FALSE, FALSE, FALSE); + "available", _("Available"), FALSE, TRUE, FALSE); types = g_list_append(types, status); status = gaim_status_type_new_full(GAIM_STATUS_AWAY, "away", Index: src/protocols/msn/notification.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/notification.c,v retrieving revision 1.119 diff -u -p -r1.119 notification.c --- src/protocols/msn/notification.c 19 Sep 2004 03:02:28 -0000 1.119 +++ src/protocols/msn/notification.c 21 Sep 2004 00:50:31 -0000 @@ -495,11 +495,6 @@ iln_cmd(MsnCmdProc *cmdproc, MsnCommand if (!g_ascii_strcasecmp(state, "BSY")) status = "busy"; - else if (!g_ascii_strcasecmp(state, "IDL")) - { - /* XXX - Do something about idle time? */ - status = "idle"; - } else if (!g_ascii_strcasecmp(state, "BRB")) status = "brb"; else if (!g_ascii_strcasecmp(state, "AWY")) @@ -512,6 +507,11 @@ iln_cmd(MsnCmdProc *cmdproc, MsnCommand status = "available"; gaim_prpl_got_user_status(account, passport, status, NULL); + + if (!g_ascii_strcasecmp(state, "IDL")) + gaim_prpl_got_user_idle(account, passport, TRUE, -1); + else + gaim_prpl_got_user_idle(account, passport, FALSE, 0); } static void @@ -573,11 +573,6 @@ nln_cmd(MsnCmdProc *cmdproc, MsnCommand if (!g_ascii_strcasecmp(state, "BSY")) status = "busy"; - else if (!g_ascii_strcasecmp(state, "IDL")) - { - /* XXX - Do something about idle time? */ - status = "idle"; - } else if (!g_ascii_strcasecmp(state, "BRB")) status = "brb"; else if (!g_ascii_strcasecmp(state, "AWY")) @@ -590,6 +585,11 @@ nln_cmd(MsnCmdProc *cmdproc, MsnCommand status = "available"; gaim_prpl_got_user_status(account, passport, status, NULL); + + if (!g_ascii_strcasecmp(state, "IDL")) + gaim_prpl_got_user_idle(account, passport, TRUE, -1); + else + gaim_prpl_got_user_idle(account, passport, FALSE, 0); } static void