Mercurial > pidgin
changeset 1435:f16e17d42b43
[gaim-migrate @ 1445]
correction time is done again, for protocols that need it (which are only the AIM protocols so far)
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 28 Jan 2001 09:16:50 +0000 |
parents | 348a70e15f07 |
children | f6a9bd50fd19 |
files | src/buddy.c src/multi.h src/oscar.c src/server.c src/toc.c |
diffstat | 5 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buddy.c Sun Jan 28 09:09:18 2001 +0000 +++ b/src/buddy.c Sun Jan 28 09:16:50 2001 +0000 @@ -1853,7 +1853,8 @@ gtk_widget_show(bs->idle); /* now we do the tooltip */ - sotime = sec_to_text(t - b->signon); + sotime = sec_to_text(t - b->signon + + ((struct gaim_connection *)bs->connlist->data)->correction_time); if (b->idle) itime = sec_to_text(t - b->idle);
--- a/src/multi.h Sun Jan 28 09:09:18 2001 +0000 +++ b/src/multi.h Sun Jan 28 09:16:50 2001 +0000 @@ -62,6 +62,7 @@ time_t login_time; time_t lastsent; int is_idle; + int correction_time; /* stuff for a signin progress meter */ GtkWidget *meter;
--- a/src/oscar.c Sun Jan 28 09:09:18 2001 +0000 +++ b/src/oscar.c Sun Jan 28 09:16:50 2001 +0000 @@ -2286,7 +2286,7 @@ void oscar_init(struct prpl *ret) { ret->protocol = PROTO_OSCAR; - ret->options = OPT_PROTO_HTML; + ret->options = OPT_PROTO_HTML | OPT_PROTO_CORRECT_TIME; ret->name = oscar_name; ret->list_icon = oscar_list_icon; ret->away_states = oscar_away_states;
--- a/src/server.c Sun Jan 28 09:09:18 2001 +0000 +++ b/src/server.c Sun Jan 28 09:16:50 2001 +0000 @@ -423,6 +423,13 @@ { struct buddy *b = find_buddy(gc, name); + if (gc->prpl->options & OPT_PROTO_CORRECT_TIME) { + char *tmp = g_strdup(normalize(name)); + if (!strcasecmp(tmp, normalize(gc->username))) + gc->correction_time = (int)(signon - gc->login_time); + g_free(tmp); + } + if (!b) { debug_printf("Error, no such buddy %s\n", name); return;
--- a/src/toc.c Sun Jan 28 09:09:18 2001 +0000 +++ b/src/toc.c Sun Jan 28 09:16:50 2001 +0000 @@ -46,7 +46,7 @@ #include "pixmaps/dt_icon.xpm" #include "pixmaps/free_icon.xpm" -#define REVISION "gaim:$Revision: 1422 $" +#define REVISION "gaim:$Revision: 1445 $" #define TYPE_SIGNON 1 #define TYPE_DATA 2 @@ -1182,7 +1182,7 @@ void toc_init(struct prpl *ret) { ret->protocol = PROTO_TOC; - ret->options = OPT_PROTO_HTML; + ret->options = OPT_PROTO_HTML | OPT_PROTO_CORRECT_TIME; ret->name = toc_name; ret->list_icon = toc_list_icon; ret->away_states = toc_away_states;