this is a patch i made for gaim 0.66 to let it detect people chatting from their hiptop. if you don't know what a hiptop is, check here.
patches for:
hiptop.png, which you must stick into
pixmaps/status/default/
or here's an alternate image, graciously provided
by james german, which may scale better.
the icon is pretty crappy. feel free to make a better one if you have graphics skills. what happens is that gaim takes a 15x15 icon, shrinks it by 60%, and draws that on top of the aim running-man icon. so any hiptop icon is going to have to be pretty simple and clean to look like much of anything when it's displayed.
how it works: hiptops report a special capability flag when you're using oscar or toc2, so gaim just has to notice that flag and mark it with an icon. that's why the patch is so small.
fix for utf8 status crasher
Date: Thu, 14 Aug 2003 11:51:36 -0700
From: Robey Pointer
Subject: gaim utf8 status text patch
gaim will crash if one of your buddies is using japanese in her status
message. it sees that there are more than 20 bytes (not the same as
having more then 20 chars) and tries to truncate after 20 bytes.
oops, that might be in the middle of a utf8 sequence. gaim go bye
bye.
here's the patch. it jumps utf8char by utf8char instead of byte by
byte, and truncates at a utf8char boundary. it's only checking for
"&" and ";" in the first byte of a utf8 char, but those chars will
only be one byte anyway.
--- ../gaim-0.66/src/gtkblist.c 2003-07-17 06:55:22.000000000 -0700
+++ src/gtkblist.c 2003-08-14 11:42:07.000000000 -0700
@@ -1196,7 +1196,7 @@
if(tmp) {
char buf[32];
char *c = tmp;
- int length = 0, vis=0;
+ int vis = 0;
gboolean inside = FALSE;
g_strdelimit(tmp, "\n", ' ');
@@ -1207,12 +1207,11 @@
inside = FALSE;
if(!inside)
vis++;
- length++;
- c++; /* this is fun */
+ c = g_utf8_next_char(c); /* this is fun */
}
if(vis == 20)
- g_snprintf(buf, sizeof(buf), "%%.%ds...", length);
+ g_snprintf(buf, sizeof(buf), "%%.%ds...", c - tmp);
else
g_snprintf(buf, sizeof(buf), "%%s ");