Mercurial > pidgin
changeset 1376:730a1a19b4cc
[gaim-migrate @ 1386]
yay, no more negative online times. also no more correction_time. i hope this doesn't break things. it shoudln't, right? oh well. um. since there's no more correction_time there's no more reason to force ourselves as a buddy (right?), so that also fixes the problem of yahoo forcing you to have yourself as a buddy.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 04 Jan 2001 22:58:08 +0000 |
parents | b167222b5c93 |
children | 569835fcabc3 |
files | src/buddy.c src/gaim.h src/multi.h src/server.c src/util.c |
diffstat | 5 files changed, 8 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buddy.c Thu Jan 04 22:46:19 2001 +0000 +++ b/src/buddy.c Thu Jan 04 22:58:08 2001 +0000 @@ -1780,8 +1780,7 @@ gtk_widget_show(bs->idle); /* now we do the tooltip */ - sotime = sec_to_text(t - b->signon + - ((struct gaim_connection *)bs->connlist->data)->correction_time); + sotime = sec_to_text(t - b->signon); if (b->idle) itime = sec_to_text(t - b->idle);
--- a/src/gaim.h Thu Jan 04 22:46:19 2001 +0000 +++ b/src/gaim.h Thu Jan 04 22:58:08 2001 +0000 @@ -553,7 +553,7 @@ extern gint linkify_text(char *); extern void aol_icon(GdkWindow *); extern FILE *open_log_file (char *); -extern char *sec_to_text(int); +extern char *sec_to_text(guint); extern struct aim_user *find_user(const char *, int); extern char *full_date(); extern void check_gaim_versions();
--- a/src/multi.h Thu Jan 04 22:46:19 2001 +0000 +++ b/src/multi.h Thu Jan 04 22:58:08 2001 +0000 @@ -55,7 +55,6 @@ char g_screenname[64]; int options; /* same as aim_user options */ guint keepalive; - int correction_time; /* stuff needed for per-connection idle times */ guint idle_timer; time_t login_time;
--- a/src/server.c Thu Jan 04 22:46:19 2001 +0000 +++ b/src/server.c Thu Jan 04 22:58:08 2001 +0000 @@ -111,8 +111,6 @@ time(&gc->login_time); - serv_add_buddy(gc, gc->username); - update_keepalive(gc, gc->options & OPT_USR_KEEPALV); } @@ -414,17 +412,9 @@ time_t idle, int type, gushort caps) { struct buddy *b = find_buddy(gc, name); - struct gaim_connection *g = find_gaim_conn_by_name(name); - - if (g) { - gc->correction_time = (int)(signon - g->login_time); - if (!b) { - return; - } - } if (!b) { - debug_printf("Error, no such person\n"); + debug_printf("Error, no such buddy %s\n", name); return; }
--- a/src/util.c Thu Jan 04 22:46:19 2001 +0000 +++ b/src/util.c Thu Jan 04 22:58:08 2001 +0000 @@ -33,6 +33,7 @@ #include <sys/wait.h> #include <gtk/gtk.h> #include <ctype.h> +#include <math.h> #include <pixmaps/aimicon.xpm> #include "gaim.h" @@ -68,7 +69,7 @@ } -gchar *sec_to_text(gint sec) +gchar *sec_to_text(guint sec) { int hrs, min; char minutes[64]; @@ -86,11 +87,11 @@ if (min == 1) g_snprintf(minutes, sizeof(minutes), "%d minute.", min); else - g_snprintf(minutes, sizeof(minutes), "%d minutes.", min); + g_snprintf(minutes, sizeof(minutes), "%d minutes.", abs(min)); sep = ", "; } else { if (!hrs) - g_snprintf(minutes, sizeof(minutes), "%d minutes.", min); + g_snprintf(minutes, sizeof(minutes), "%d minutes.", abs(min)); else { minutes[0] = '.'; minutes[1] = '\0'; @@ -102,7 +103,7 @@ if (hrs == 1) g_snprintf(hours, sizeof(hours), "%d hour%s", hrs, sep); else - g_snprintf(hours, sizeof(hours), "%d hours%s", hrs, sep); + g_snprintf(hours, sizeof(hours), "%d hours%s", abs(hrs), sep); } else hours[0] = '\0';