Mercurial > pidgin
changeset 2734:9fc65bb80596
[gaim-migrate @ 2747]
it's 6am
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 17 Nov 2001 13:57:30 +0000 |
parents | eeac6ea7ade6 |
children | aeae739353d0 |
files | src/buddy.c src/gtkimhtml.c src/protocols/oscar/aim.h src/protocols/oscar/aim_internal.h src/protocols/oscar/conn.c src/protocols/oscar/info.c src/protocols/oscar/oscar.c src/protocols/oscar/service.c |
diffstat | 8 files changed, 73 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buddy.c Sat Nov 17 03:18:40 2001 +0000 +++ b/src/buddy.c Sat Nov 17 13:57:30 2001 +0000 @@ -1890,7 +1890,7 @@ static char buf[256], *tmp; int count = 0, i = 0; gushort bit = 1; - while (bit <= 0x400) { + while (bit <= 0x800) { if (bit & caps) { switch (bit) { case 0x1: @@ -1921,6 +1921,9 @@ case 0x400: tmp = _("EveryBuddy Bug"); break; + case 0x800: + tmp = _("AP User"); + break; default: tmp = NULL; break;
--- a/src/gtkimhtml.c Sat Nov 17 03:18:40 2001 +0000 +++ b/src/gtkimhtml.c Sat Nov 17 13:57:30 2001 +0000 @@ -1902,76 +1902,81 @@ xflds = g_strsplit (xname, "-", -1); -#define NAME 2 -#define BOLD 3 -#define ITALICS 4 -#define SIZE 6 -#define PTSZ 7 +#define FNDRY 1 +#define FMLY 2 +#define WGHT 3 +#define SLANT 4 +#define SWDTH 5 +#define ADSTYL 6 +#define PXLSZ 7 +#define PTSZ 8 +#define RESX 9 +#define RESY 10 +#define SPC 11 +#define AVGWDTH 12 +#define RGSTRY 13 +#define ENCDNG 14 for (i = 0; xflds [i]; i++); newvals = g_memdup (xflds, (i + 1) * sizeof (xflds)); + if (!xflds [ADSTYL][0]) + newvals [ADSTYL] = "*"; if (bold) - newvals [BOLD] = "bold"; + newvals [WGHT] = "bold"; if (italics) - newvals [ITALICS] = "i"; + newvals [SLANT] = "i"; if (fontsize) { g_snprintf (fs, sizeof (fs), "%d", font_sizes [MIN (fontsize, MAX_SIZE) - 1]); - newvals [SIZE] = fs; - newvals [PTSZ] = ""; + newvals [PXLSZ] = "*"; + newvals [PTSZ] = fs; } if (name) names = g_strsplit (name, ",", -1); else { names = g_new0 (gchar *, 2); - names [0] = g_strdup (xflds [NAME]); + names [0] = g_strdup (xflds [FMLY]); } for (i = 0; names [i]; i++) { - newvals [NAME] = names [i]; + newvals [FMLY] = names [i]; TRY_FONT; } for (i = 0; italics && names [i]; i++) { - newvals [NAME] = names [i]; - - newvals [ITALICS] = "o"; + newvals [FMLY] = names [i]; + + newvals [SLANT] = "o"; TRY_FONT; - newvals [ITALICS] = xflds [ITALICS]; + newvals [SLANT] = xflds [SLANT]; TRY_FONT; } for (i = 0; fontsize && names [i]; i++) { - newvals [NAME] = names [i]; - - if (xflds [PTSZ][0]) { - g_snprintf (fs, sizeof (fs), "%d", - font_sizes [MIN (fontsize, MAX_SIZE) - 1] / 10); - newvals [PTSZ] = fs; - newvals [SIZE] = ""; - TRY_FONT; - - newvals [PTSZ] = xflds [PTSZ]; - } else - newvals [SIZE] = xflds [SIZE]; + newvals [FMLY] = names [i]; + + g_snprintf (fs, sizeof (fs), "%d", + font_sizes [MIN (fontsize, MAX_SIZE) - 1] / 10); + newvals [PXLSZ] = fs; + newvals [PTSZ] = "*"; + + TRY_FONT; + + newvals [PXLSZ] = xflds [PXLSZ]; + newvals [PTSZ] = xflds [PTSZ]; + TRY_FONT; } for (i = 0; bold && names [i]; i++) { - newvals [NAME] = names [i]; - - newvals [BOLD] = xflds [BOLD]; + newvals [FMLY] = names [i]; + + newvals [WGHT] = xflds [WGHT]; TRY_FONT; } -#undef NAME -#undef BOLD -#undef ITALICS -#undef SIZE -#undef PTSZ - g_free (newvals); g_strfreev (xflds); g_strfreev (names);
--- a/src/protocols/oscar/aim.h Sat Nov 17 03:18:40 2001 +0000 +++ b/src/protocols/oscar/aim.h Sat Nov 17 13:57:30 2001 +0000 @@ -416,12 +416,13 @@ #define AIM_FLAG_OSCAR_PAY 0x0008 #define AIM_FLAG_FREE 0x0010 #define AIM_FLAG_AWAY 0x0020 -#define AIM_FLAG_UNKNOWN40 0x0040 +#define AIM_FLAG_ICQ 0x0040 #define AIM_FLAG_UNKNOWN80 0x0080 #define AIM_FLAG_UNKNOWN100 0x0100 #define AIM_FLAG_UNKNOWN200 0x0200 #define AIM_FLAG_ACTIVEBUDDY 0x0400 #define AIM_FLAG_UNKNOWN800 0x0800 +#define AIM_FLAG_ABINTERNAL 0x1000 #define AIM_FLAG_ALLUSERS 0x001f @@ -822,7 +823,8 @@ #define AIM_CAPS_SAVESTOCKS 0x0080 #define AIM_CAPS_SENDBUDDYLIST 0x0100 #define AIM_CAPS_GAMES2 0x0200 -#define AIM_CAPS_EVERYBUDDY 0x0400 +#define AIM_CAPS_ICQ 0x0400 +#define AIM_CAPS_ABINTERNAL 0x0800 #define AIM_CAPS_LAST 0x8000 faim_export int aim_0002_000b(aim_session_t *sess, aim_conn_t *conn, const char *sn); @@ -880,7 +882,7 @@ AIM_IMPARAM_FLAG_CHANMSGS_ALLOWED | AIM_IMPARAM_FLAG_MISSEDCALLS_ENABLED, \ 512, /* !! Note how small this is. */ \ (99.9)*10, (99.9)*10, \ - 1000 \ + 1000 /* !! And how large this is. */ \ } /* This is what most AIM versions use. */
--- a/src/protocols/oscar/aim_internal.h Sat Nov 17 03:18:40 2001 +0000 +++ b/src/protocols/oscar/aim_internal.h Sat Nov 17 13:57:30 2001 +0000 @@ -151,6 +151,7 @@ struct snacgroup *next; }; +#ifdef FAIM_NEED_CONN_INTERNAL struct snacpair { fu16_t group; fu16_t subtype; @@ -170,6 +171,7 @@ struct snacpair *members; struct rateclass *next; }; +#endif /* FAIM_NEED_CONN_INTERNAL */ /* * This is inside every connection. But it is a void * to anything
--- a/src/protocols/oscar/conn.c Sat Nov 17 03:18:40 2001 +0000 +++ b/src/protocols/oscar/conn.c Sat Nov 17 13:57:30 2001 +0000 @@ -7,6 +7,7 @@ */ #define FAIM_INTERNAL +#define FAIM_NEED_CONN_INTERNAL #include <aim.h> #ifndef _WIN32 @@ -127,9 +128,19 @@ for (rc = *head; rc; ) { struct rateclass *tmp; + struct snacpair *sp; tmp = rc->next; + + for (sp = rc->members; sp; ) { + struct snacpair *tmpsp; + + tmpsp = sp->next; + free(sp); + sp = tmpsp; + } free(rc); + rc = tmp; }
--- a/src/protocols/oscar/info.c Sat Nov 17 03:18:40 2001 +0000 +++ b/src/protocols/oscar/info.c Sat Nov 17 13:57:30 2001 +0000 @@ -145,7 +145,7 @@ /* * Advertised by the EveryBuddy client. */ - {AIM_CAPS_EVERYBUDDY, + {AIM_CAPS_ICQ, {0x09, 0x46, 0x13, 0x44, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, @@ -182,6 +182,10 @@ {0x09, 0x46, 0x13, 0x4b, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, + {AIM_CAPS_ABINTERNAL, + {0x09, 0x46, 0x13, 0x4f, 0x4c, 0x7f, 0x11, 0xd1, + 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, + {AIM_CAPS_LAST} };
--- a/src/protocols/oscar/oscar.c Sat Nov 17 03:18:40 2001 +0000 +++ b/src/protocols/oscar/oscar.c Sat Nov 17 13:57:30 2001 +0000 @@ -1115,8 +1115,8 @@ if (!(info->icqinfo.status & AIM_ICQ_STATE_CHAT)) type |= UC_UNAVAILABLE; } - if (caps & AIM_CAPS_EVERYBUDDY) - caps ^= AIM_CAPS_EVERYBUDDY; + if (caps & AIM_CAPS_ICQ) + caps ^= AIM_CAPS_ICQ; debug_printf("icq status: %d\n", info->icqinfo.status); }
--- a/src/protocols/oscar/service.c Sat Nov 17 03:18:40 2001 +0000 +++ b/src/protocols/oscar/service.c Sat Nov 17 13:57:30 2001 +0000 @@ -4,6 +4,7 @@ */ #define FAIM_INTERNAL +#define FAIM_NEED_CONN_INTERNAL #include <aim.h> #include "md5.h" @@ -289,6 +290,8 @@ if (mod->version >= 3) aimbs_getrawbuf(bs, rc.unknown, sizeof(rc.unknown)); + faimdprintf(sess, 1, "--- Adding rate class %d to connection type %d: window size = %ld, clear = %ld, alert = %ld, limit = %ld, disconnect = %ld, current = %ld, max = %ld\n", rx->conn->type, rc.classid, rc.windowsize, rc.clear, rc.alert, rc.limit, rc.disconnect, rc.current, rc.max); + rc_addclass(&ins->rates, &rc); }