Mercurial > pidgin.yaz
changeset 10050:30e052ebb5ae
[gaim-migrate @ 11011]
Patch from Dave West:
Updates the SILC prpl to use gaim_prpl_got_user_status
instead of gaim_blist_update_buddy_presence.
Thanks Dave! Sorry it took me so long to get to this!
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 19 Sep 2004 20:17:12 +0000 |
parents | 2ef4b5121efc |
children | 0810288958ad |
files | src/protocols/silc/buddy.c src/protocols/silc/ops.c src/protocols/silc/silc.c src/protocols/silc/silcgaim.h |
diffstat | 4 files changed, 24 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/silc/buddy.c Sun Sep 19 19:07:14 2004 +0000 +++ b/src/protocols/silc/buddy.c Sun Sep 19 20:17:12 2004 +0000 @@ -732,7 +732,7 @@ _("You cannot receive buddy notifications until you " "import his/her public key. You can use the Get Public Key " "command to get the public key.")); - gaim_blist_update_buddy_presence(r->b, FALSE); + gaim_prpl_got_user_status(gaim_buddy_get_account(r->b), gaim_buddy_get_name(r->b), SILCGAIM_STATUS_ID_OFFLINE, NULL); } static void @@ -771,7 +771,7 @@ "%s" G_DIR_SEPARATOR_S "clientkeys" G_DIR_SEPARATOR_S "clientkey_%s.pub", silcgaim_silcdir(), fingerprint); gaim_blist_node_set_string((GaimBlistNode *)b, "public-key", filename); - gaim_blist_update_buddy_presence(r->b, FALSE); + gaim_prpl_got_user_status(gaim_buddy_get_account(r->b), gaim_buddy_get_name(r->b), SILCGAIM_STATUS_ID_OFFLINE, NULL); silc_free(fingerprint); silc_free(r->offline_pk); silc_free(r); @@ -962,8 +962,8 @@ silcgaim_silcdir(), fingerprint); gaim_blist_node_set_string((GaimBlistNode *)b, "public-key", filename); - /* Update online status on the buddy list */ - gaim_blist_update_buddy_presence(b, TRUE); + /* Update online status */ + gaim_prpl_got_user_status(gaim_buddy_get_account(r->b), gaim_buddy_get_name(r->b), SILCGAIM_STATUS_ID_ONLINE, NULL); /* Finally, start watching this user so we receive its status changes from the server */
--- a/src/protocols/silc/ops.c Sun Sep 19 19:07:14 2004 +0000 +++ b/src/protocols/silc/ops.c Sun Sep 19 20:17:12 2004 +0000 @@ -708,7 +708,7 @@ client_entry->mode & SILC_UMODE_PAGE || client_entry->mode & SILC_UMODE_DETACHED)) { client_entry->mode = mode; - gaim_blist_update_buddy_presence(b, TRUE); + gaim_prpl_got_user_status(gaim_buddy_get_account(b), gaim_buddy_get_name(b), SILCGAIM_STATUS_ID_ONLINE, NULL); } else if ((mode & SILC_UMODE_GONE) || (mode & SILC_UMODE_INDISPOSED) || @@ -716,16 +716,16 @@ (mode & SILC_UMODE_PAGE) || (mode & SILC_UMODE_DETACHED)) { client_entry->mode = mode; - gaim_blist_update_buddy_presence(b, FALSE); + gaim_prpl_got_user_status(gaim_buddy_get_account(b), gaim_buddy_get_name(b), SILCGAIM_STATUS_ID_OFFLINE, NULL); } } else if (notify == SILC_NOTIFY_TYPE_SIGNOFF || notify == SILC_NOTIFY_TYPE_SERVER_SIGNOFF || notify == SILC_NOTIFY_TYPE_KILLED) { client_entry->mode = mode; - gaim_blist_update_buddy_presence(b, FALSE); + gaim_prpl_got_user_status(gaim_buddy_get_account(b), gaim_buddy_get_name(b), SILCGAIM_STATUS_ID_OFFLINE, NULL); } else if (notify == SILC_NOTIFY_TYPE_NONE) { client_entry->mode = mode; - gaim_blist_update_buddy_presence(b, TRUE); + gaim_prpl_got_user_status(gaim_buddy_get_account(b), gaim_buddy_get_name(b), SILCGAIM_STATUS_ID_ONLINE, NULL); } } break;
--- a/src/protocols/silc/silc.c Sun Sep 19 19:07:14 2004 +0000 +++ b/src/protocols/silc/silc.c Sun Sep 19 20:17:12 2004 +0000 @@ -43,19 +43,19 @@ GaimStatusType *type; GList *types = NULL; - type = gaim_status_type_new(GAIM_STATUS_OFFLINE, "offline", _("Offline"), FALSE); + type = gaim_status_type_new(GAIM_STATUS_OFFLINE, SILCGAIM_STATUS_ID_OFFLINE, _("Offline"), FALSE); types = g_list_append(types, type); - type = gaim_status_type_new(GAIM_STATUS_ONLINE, "offline", _("Online"), FALSE); + type = gaim_status_type_new(GAIM_STATUS_ONLINE, SILCGAIM_STATUS_ID_ONLINE, _("Online"), FALSE); types = g_list_append(types, type); - type = gaim_status_type_new_full(GAIM_STATUS_AVAILABLE, "hyper", _("Hyper Active"), FALSE, TRUE, FALSE); + type = gaim_status_type_new_full(GAIM_STATUS_AVAILABLE, SILCGAIM_STATUS_ID_HYPER, _("Hyper Active"), FALSE, TRUE, FALSE); types = g_list_append(types, type); - type = gaim_status_type_new_full(GAIM_STATUS_AWAY, "away", _("Away"), FALSE, TRUE, FALSE); + type = gaim_status_type_new_full(GAIM_STATUS_AWAY, SILCGAIM_STATUS_ID_AWAY, _("Away"), FALSE, TRUE, FALSE); types = g_list_append(types, type); - type = gaim_status_type_new_full(GAIM_STATUS_AWAY, "busy", _("Busy"), FALSE, TRUE, FALSE); + type = gaim_status_type_new_full(GAIM_STATUS_AWAY, SILCGAIM_STATUS_ID_BUSY, _("Busy"), FALSE, TRUE, FALSE); types = g_list_append(types, type); - type = gaim_status_type_new_full(GAIM_STATUS_AWAY, "indisposed", _("Indisposed"), FALSE, TRUE, FALSE); + type = gaim_status_type_new_full(GAIM_STATUS_AWAY, SILCGAIM_STATUS_ID_INDISPOSED, _("Indisposed"), FALSE, TRUE, FALSE); types = g_list_append(types, type); - type = gaim_status_type_new_full(GAIM_STATUS_AWAY, "page", _("Wake Me Up"), FALSE, TRUE, FALSE); + type = gaim_status_type_new_full(GAIM_STATUS_AWAY, SILCGAIM_STATUS_ID_PAGE, _("Wake Me Up"), FALSE, TRUE, FALSE); types = g_list_append(types, type); return types;
--- a/src/protocols/silc/silcgaim.h Sun Sep 19 19:07:14 2004 +0000 +++ b/src/protocols/silc/silcgaim.h Sun Sep 19 20:17:12 2004 +0000 @@ -44,6 +44,15 @@ #define SILCGAIM_PRVGRP 0x001fffff +/* Status IDs */ +#define SILCGAIM_STATUS_ID_OFFLINE "offline" +#define SILCGAIM_STATUS_ID_ONLINE "online" +#define SILCGAIM_STATUS_ID_HYPER "hyper" +#define SILCGAIM_STATUS_ID_AWAY "away" +#define SILCGAIM_STATUS_ID_BUSY "busy" +#define SILCGAIM_STATUS_ID_INDISPOSED "indisposed" +#define SILCGAIM_STATUS_ID_PAGE "page" + typedef struct { unsigned long id; const char *channel;