You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(106) |
Oct
(334) |
Nov
(246) |
Dec
(145) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(53) |
Mar
(232) |
Apr
(109) |
May
(137) |
Jun
(63) |
Jul
(26) |
Aug
(263) |
Sep
(193) |
Oct
(507) |
Nov
(440) |
Dec
(241) |
2003 |
Jan
(567) |
Feb
(195) |
Mar
(504) |
Apr
(481) |
May
(524) |
Jun
(522) |
Jul
(594) |
Aug
(502) |
Sep
(643) |
Oct
(508) |
Nov
(430) |
Dec
(377) |
2004 |
Jan
(361) |
Feb
(251) |
Mar
(219) |
Apr
(499) |
May
(461) |
Jun
(419) |
Jul
(314) |
Aug
(519) |
Sep
(416) |
Oct
(247) |
Nov
(305) |
Dec
(382) |
2005 |
Jan
(267) |
Feb
(282) |
Mar
(327) |
Apr
(338) |
May
(189) |
Jun
(400) |
Jul
(462) |
Aug
(530) |
Sep
(316) |
Oct
(523) |
Nov
(481) |
Dec
(650) |
2006 |
Jan
(536) |
Feb
(361) |
Mar
(287) |
Apr
(146) |
May
(101) |
Jun
(169) |
Jul
(221) |
Aug
(498) |
Sep
(300) |
Oct
(236) |
Nov
(209) |
Dec
(205) |
2007 |
Jan
(30) |
Feb
(23) |
Mar
(26) |
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Eric W. <war...@us...> - 2001-12-09 10:55:27
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv26798 Modified Files: gtkimhtml.c Log Message: take away this ball and chain Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- gtkimhtml.c 2001/12/08 10:15:09 1.88 +++ gtkimhtml.c 2001/12/09 10:55:24 1.89 @@ -1799,6 +1799,25 @@ layout_class->set_scroll_adjustments = gtk_imhtml_set_scroll_adjustments; } +/* the font stuff is the most insane stuff. i don't understand it half + * the time. so we're going to comment it. isn't that wonderful. */ + +/* when you g_strsplit a valid font name, these are the positions of all the various parts of it. */ +#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 + static gchar* gtk_imhtml_get_font_name (GdkFont *font) { @@ -1822,6 +1841,27 @@ g_strfreev (xflds); \ g_strfreev (names); \ return ret_font; \ + } else if (newvals [RGSTRY][0] != '*') { \ + /* if the registry isn't "*" then try it as "*". this is evil. */ \ + gchar *reg = newvals [RGSTRY]; \ + gchar *enc = newvals [ENCDNG]; \ + newvals [RGSTRY] = "*"; \ + newvals [ENCDNG] = "*"; \ + tmp = g_strjoinv ("-", newvals); \ + if (default_font->type == GDK_FONT_FONT) \ + ret_font = gdk_font_load (tmp); \ + else \ + ret_font = gdk_fontset_load (tmp); \ + g_free (tmp); \ + if (ret_font) { \ + g_free (newvals); \ + g_strfreev (xnames); \ + g_strfreev (xflds); \ + g_strfreev (names); \ + return ret_font; \ + } \ + newvals [RGSTRY] = reg; \ + newvals [ENCDNG] = enc; \ } @@ -1837,12 +1877,15 @@ gchar **xnames; gchar **pos; + /* if we're not changing anything, use the default. this is the common case */ if (!name && !bold && !italics && !fontsize) return gdk_font_ref (default_font); + /* base things off of the default font name */ default_name = gtk_imhtml_get_font_name (default_font); - xnames = g_strsplit (default_name, ",", -1); + /* the default font name can actually be several names separated by ','. */ + xnames = g_strsplit (default_name, ",", -1); for (pos = xnames; pos && *pos; pos++) { gchar *xname; gchar **xflds; @@ -1860,22 +1903,9 @@ xname = g_strchug (xname); xflds = g_strsplit (xname, "-", -1); - -#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 + /* figure out if we have a valid name. i wish there were an + * easier way for determining how many values g_strplit gave */ for (i = 0; xflds [i]; i++); if (i != 15) { int tmp; @@ -1886,11 +1916,14 @@ } else newvals = g_memdup (xflds, 16 * sizeof (xflds)); + /* we force foundry as "*" because i hate them. i should give a better reason. */ newvals [FNDRY] = "*"; + /* if it's "*" then it defaults to (nil) anyway. some fonts don't want (nil) */ if ((i > ADSTYL) && !xflds [ADSTYL][0]) newvals [ADSTYL] = "*"; + /* right. */ if (bold) newvals [WGHT] = "bold"; if (italics) @@ -1901,21 +1934,34 @@ newvals [PTSZ] = fs; } - if (name) - names = g_strsplit (name, ",", -1); - else if (i > FMLY) { + if (name) { + /* we got passed a name. it might be a list of names. */ + gchar **tmp_nms = g_strsplit (name, ",", -1); + /* we do a bunch of weird things to also use the gtk font name as an option. */ + for (j = 0; tmp_nms [j]; j++); + names = g_new0 (char *, j + 2); + for (j = 0; tmp_nms [j]; j++) + names [j] = tmp_nms [j]; + g_free (tmp_nms); + if (i > FMLY) + names [j] = g_strdup (xflds [FMLY]); + } else if (i > FMLY) { + /* we didn't get a name. we come here if the gtk font name is valid */ names = g_new0 (gchar *, 2); names [0] = g_strdup (xflds [FMLY]); } else { + /* we got fucked */ names = g_new0 (gchar *, 2); names [0] = g_strdup ("*"); } + /* for each name, try it */ for (j = 0; names [j]; j++) { newvals [FMLY] = names [j]; TRY_FONT; } + /* if italics is set, try various italics options for each name, including no italics */ for (j = 0; italics && names [j]; j++) { newvals [FMLY] = names [j]; @@ -1929,6 +1975,7 @@ TRY_FONT; } + /* if font size was set, try ignoring font size. for each name. */ for (j = 0; fontsize && names [j]; j++) { newvals [FMLY] = names [j]; @@ -1942,6 +1989,7 @@ TRY_FONT; } + /* abandon bold */ for (j = 0; bold && names [j]; j++) { newvals [FMLY] = names [j]; @@ -1960,6 +2008,7 @@ g_strfreev (xnames); + /* we couldn't get anything. so, we quit. you get the default. */ return gdk_font_ref (default_font); } |
From: Eric W. <war...@us...> - 2001-12-08 10:34:26
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv32707 Modified Files: buddy_chat.c Log Message: you really oughta know Index: buddy_chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v retrieving revision 1.137 retrieving revision 1.138 diff -u -d -r1.137 -r1.138 --- buddy_chat.c 2001/12/08 09:48:51 1.137 +++ buddy_chat.c 2001/12/08 10:34:23 1.138 @@ -645,7 +645,7 @@ if (!*c) return FALSE; if (!g_strncasecmp(c, "/me ", 4)) { - memmove(c, c + 4, len - 4); + memmove(c, c + 4, len - 3); return TRUE; } else return FALSE; |
From: Eric W. <war...@us...> - 2001-12-08 10:15:11
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv26985 Modified Files: gtkimhtml.c Log Message: heh. one of these days i'll start thinking before acting. Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- gtkimhtml.c 2001/12/08 10:13:36 1.87 +++ gtkimhtml.c 2001/12/08 10:15:09 1.88 @@ -3088,8 +3088,6 @@ pos += tlen; } else if (*c == '\n') { if (!(options & GTK_IMHTML_NO_NEWLINE)) { - ws [wpos] = 0; - wpos = 0; NEW_BIT (NEW_TEXT_BIT); NEW_BIT (NEW_BR_BIT); } @@ -3110,7 +3108,6 @@ } } - ws [wpos] = 0; NEW_BIT (NEW_TEXT_BIT); while (newbits) { |
From: Eric W. <war...@us...> - 2001-12-08 10:13:39
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv26664 Modified Files: gtkimhtml.c Log Message: details Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- gtkimhtml.c 2001/12/08 09:48:51 1.86 +++ gtkimhtml.c 2001/12/08 10:13:36 1.87 @@ -3096,8 +3096,6 @@ c++; pos++; } else if (gtk_imhtml_is_smiley (imhtml, c, &smilelen)) { - ws [wpos] = 0; - wpos = 0; NEW_BIT (NEW_TEXT_BIT); g_snprintf (ws, smilelen + 1, "%s", c); wpos = smilelen + 1; |
From: Eric W. <war...@us...> - 2001-12-08 10:03:41
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv23902 Modified Files: conversation.c Log Message: not that any of this matters. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.314 retrieving revision 1.315 diff -u -d -r1.314 -r1.315 --- conversation.c 2001/12/08 09:48:51 1.314 +++ conversation.c 2001/12/08 10:03:38 1.315 @@ -1485,24 +1485,6 @@ } } - /* XXX CUI: this is really bad and should be moved somewhere else later. */ - if (!c->is_chat && c->gc) { - int index = g_slist_index(connections, c->gc); - int sconv = strlen(c->name); - int sname = strlen(who); - int swhat = length == -1 ? strlen(what) : length; - UI_build_broadcast(CUI_TYPE_MESSAGE, CUI_MESSAGE_RECV, - sizeof(index), &index, - sizeof(sconv), &sconv, - sconv, c->name, - sizeof(sname), &sname, - sname, who, - sizeof(flags), &flags, - sizeof(swhat), &swhat, - swhat, what, - sizeof(mtime), &mtime, -1); - } - strftime(mdate, sizeof(mdate), "%H:%M:%S", localtime(&mtime)); gtk_font_options = gtk_font_options ^ GTK_IMHTML_NO_COMMENTS; @@ -1622,6 +1604,7 @@ gtk_imhtml_append_text(GTK_IMHTML(c->text), "<BR>", -1, 0); + /* XXX this needs to be updated for the new length argument */ if (logging_options & OPT_LOG_STRIP_HTML) { char *t1, *t2; t1 = strip_html(buf); @@ -1644,6 +1627,7 @@ g_free(t2); } + /* XXX this needs to be updated for the new length argument */ if ((logging_options & OPT_LOG_ALL) || find_log_info(c->name)) { char *t1, *t2; char *nm = g_malloc(256); @@ -1674,15 +1658,6 @@ g_free(nm); } } - -/* if (!GTK_WIDGET_MAPPED(c->window)) { - - if (dark_icon_pm == NULL) - dark_icon_pm = gdk_pixmap_create_from_xpm_d(c->window->window, &dark_icon_bm, - NULL, (gchar **)aimicon2_xpm); - gdk_window_set_icon(c->window->window, NULL, dark_icon_pm, dark_icon_bm); - } -*/ if ((c->is_chat && (chat_options & OPT_CHAT_POPUP)) || (!c->is_chat && (im_options & OPT_IM_POPUP))) |
From: Eric W. <war...@us...> - 2001-12-08 09:48:56
|
Update of /cvsroot/gaim/gaim/src/protocols/napster In directory usw-pr-cvs1:/tmp/cvs-serv19507/src/protocols/napster Modified Files: napster.c Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: napster.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/napster/napster.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- napster.c 2001/11/30 21:16:27 1.15 +++ napster.c 2001/12/08 09:48:52 1.16 @@ -201,7 +201,7 @@ if (command == 0xCD) { res = g_strsplit(buf, " ", 1); - serv_got_im(gc, res[0], res[1], 0, time((time_t)NULL)); + serv_got_im(gc, res[0], res[1], 0, time(NULL), -1); g_strfreev(res); g_free(buf); return; |
From: Eric W. <war...@us...> - 2001-12-08 09:48:56
|
Update of /cvsroot/gaim/gaim/src/protocols/zephyr In directory usw-pr-cvs1:/tmp/cvs-serv19507/src/protocols/zephyr Modified Files: zephyr.c Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: zephyr.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/zephyr/zephyr.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- zephyr.c 2001/11/27 21:26:23 1.18 +++ zephyr.c 2001/12/08 09:48:52 1.19 @@ -374,7 +374,7 @@ away = TRUE; else away = FALSE; - serv_got_im(zgc, notice.z_sender, buf2, 0, time((time_t)NULL)); + serv_got_im(zgc, notice.z_sender, buf2, 0, time(NULL), -1); } else { zephyr_triple *zt1, *zt2; zt1 = new_triple(notice.z_class, notice.z_class_inst, |
From: Eric W. <war...@us...> - 2001-12-08 09:48:56
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv19507/src/protocols/oscar Modified Files: oscar.c Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- oscar.c 2001/12/02 10:08:09 1.80 +++ oscar.c 2001/12/08 09:48:52 1.81 @@ -304,7 +304,7 @@ g_snprintf(buf, sizeof buf, _("Direct IM with %s closed"), sn); if ((cnv = find_conversation(sn))) - write_to_conv(cnv, buf, WFLAG_SYSTEM, NULL, time((time_t)NULL)); + write_to_conv(cnv, buf, WFLAG_SYSTEM, NULL, time(NULL), -1); g_free(dim); /* I guess? I don't see it anywhere else... -- mid */ g_free(sn); @@ -1202,7 +1202,7 @@ if (!(cnv = find_conversation(dim->name))) cnv = new_conversation(dim->name); g_snprintf(buf, sizeof buf, _("Direct IM with %s established"), dim->name); - write_to_conv(cnv, buf, WFLAG_SYSTEM, NULL, time((time_t)NULL)); + write_to_conv(cnv, buf, WFLAG_SYSTEM, NULL, time(NULL), -1); od->direct_ims = g_slist_append(od->direct_ims, dim); @@ -1342,7 +1342,7 @@ g_snprintf(tmp, BUF_LONG, "%s", args->msg); strip_linefeed(tmp); - serv_got_im(gc, userinfo->sn, tmp, flags, time(NULL)); + serv_got_im(gc, userinfo->sn, tmp, flags, time(NULL), -1); g_free(tmp); return 1; @@ -2070,7 +2070,7 @@ time_t t = get_time(msg->year, msg->month, msg->day, msg->hour, msg->minute, 0); g_snprintf(sender, sizeof(sender), "%lu", msg->sender); strip_linefeed(tmp); - serv_got_im(gc, sender, tmp, 0, t); + serv_got_im(gc, sender, tmp, 0, t, -1); g_free(tmp); } else { debug_printf("unknown offline message type 0x%04x\n", msg->type); @@ -2640,7 +2640,7 @@ oscar_callback, dim->conn); g_snprintf(buf, sizeof buf, _("Direct IM with %s established"), sn); g_free(sn); - write_to_conv(cnv, buf, WFLAG_SYSTEM, NULL, time((time_t)NULL)); + write_to_conv(cnv, buf, WFLAG_SYSTEM, NULL, time(NULL), -1); aim_conn_addhandler(sess, newconn, AIM_CB_FAM_OFT, AIM_CB_OFT_DIRECTIMINCOMING, gaim_directim_incoming, 0); @@ -2662,7 +2662,7 @@ debug_printf("Got DirectIM message from %s\n", sn); - serv_got_im(gc, sn, msg, 0, time((time_t)NULL)); + serv_got_im(gc, sn, msg, 0, time(NULL), -1); return 1; } |
From: Eric W. <war...@us...> - 2001-12-08 09:48:56
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv19507/src/protocols/yahoo Modified Files: yahoo.c Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- yahoo.c 2001/12/05 10:59:52 1.22 +++ yahoo.c 2001/12/08 09:48:52 1.23 @@ -488,7 +488,7 @@ msg[j++] = m[i]; } msg[j] = 0; - serv_got_im(gc, from, msg, 0, tm); + serv_got_im(gc, from, msg, 0, tm, -1); } else if (pkt->status == 2) { do_error_dialog(_("Your message did not get sent."), _("Gaim - Error")); } |
From: Eric W. <war...@us...> - 2001-12-08 09:48:56
|
Update of /cvsroot/gaim/gaim/src/protocols/irc In directory usw-pr-cvs1:/tmp/cvs-serv19507/src/protocols/irc Modified Files: irc.c Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: irc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- irc.c 2001/12/05 10:15:18 1.65 +++ irc.c 2001/12/08 09:48:52 1.66 @@ -322,7 +322,7 @@ static void irc_got_im(struct gaim_connection *gc, char *who, char *what, int flags, time_t t) { GString *str = decode_html(what); - serv_got_im(gc, who, str->str, flags, t); + serv_got_im(gc, who, str->str, flags, t, -1); g_string_free(str, TRUE); } @@ -428,7 +428,7 @@ chat_set_topic(c, NULL, po); g_snprintf(buf, sizeof(buf), _("<B>%s has changed the topic to: %s</B>"), text, po); - write_to_conv(c, buf, WFLAG_SYSTEM, NULL, time(NULL)); + write_to_conv(c, buf, WFLAG_SYSTEM, NULL, time(NULL), -1); } } @@ -961,7 +961,7 @@ chat_set_topic(c, nick, topic); g_snprintf(buf, sizeof(buf), _("<B>%s has changed the topic to: %s</B>"), nick, topic); - write_to_conv(c, buf, WFLAG_SYSTEM, NULL, time(NULL)); + write_to_conv(c, buf, WFLAG_SYSTEM, NULL, time(NULL), -1); } } else if (!strcmp(cmd, "WALLOPS")) { /* */ } @@ -1377,7 +1377,7 @@ "JOIN PART TOPIC KICK<BR>" "OP DEOP VOICE DEVOICE<BR>" "ME MSG QUOTE SAY</B>", - WFLAG_NOLOG, NULL, time(NULL)); + WFLAG_NOLOG, NULL, time(NULL), -1); } else { struct conversation *c = NULL; if (is_channel(gc, who)) { @@ -1387,7 +1387,7 @@ } if (!c) return -EINVAL; - write_to_conv(c, "<B>Unknown command</B>", WFLAG_NOLOG, NULL, time(NULL)); + write_to_conv(c, "<B>Unknown command</B>", WFLAG_NOLOG, NULL, time(NULL), -1); } return 0; |
From: Eric W. <war...@us...> - 2001-12-08 09:48:55
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv19507/src/protocols/msn Modified Files: msn.c Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: msn.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/msn.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- msn.c 2001/12/04 05:38:53 1.43 +++ msn.c 2001/12/08 09:48:52 1.44 @@ -520,7 +520,7 @@ if (ms->chat) serv_got_chat_in(ms->gc, ms->chat->id, ms->msguser, flags, utf, time(NULL)); else - serv_got_im(ms->gc, ms->msguser, utf, flags, time(NULL)); + serv_got_im(ms->gc, ms->msguser, utf, flags, time(NULL), -1); g_free(utf); } @@ -1084,7 +1084,7 @@ utf = utf8_to_str(skiphead); strip_linefeed(utf); - serv_got_im(gc, md->msguser, utf, 0, time(NULL)); + serv_got_im(gc, md->msguser, utf, 0, time(NULL), -1); g_free(utf); } @@ -1498,7 +1498,7 @@ ms->fd = -1; } else /* in msn you can't send messages to yourself, so we'll fake like we received it ;) */ - serv_got_im(gc, who, message, flags | IM_FLAG_GAIMUSER, time(NULL)); + serv_got_im(gc, who, message, flags | IM_FLAG_GAIMUSER, time(NULL), -1); return 1; } |
From: Eric W. <war...@us...> - 2001-12-08 09:48:55
|
Update of /cvsroot/gaim/gaim/src/protocols/toc In directory usw-pr-cvs1:/tmp/cvs-serv19507/src/protocols/toc Modified Files: toc.c Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: toc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/toc/toc.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- toc.c 2001/12/06 20:13:24 1.37 +++ toc.c 2001/12/08 09:48:52 1.38 @@ -619,7 +619,7 @@ a = (away && (*away == 'T')) ? IM_FLAG_AWAY : 0; - serv_got_im(gc, c, message, a, time((time_t)NULL)); + serv_got_im(gc, c, message, a, time(NULL), -1); } else if (!strcasecmp(c, "UPDATE_BUDDY")) { char *l, *uc, *tmp; int logged, evil, idle, type = 0; |
From: Eric W. <war...@us...> - 2001-12-08 09:48:55
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv19507/src Modified Files: away.c buddy.c buddy_chat.c conversation.c convo.h core.h dialogs.c gaim.h gtkimhtml.c gtkimhtml.h perl.c prefs.c server.c ui.h Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: away.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/away.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- away.c 2001/11/15 22:47:03 1.67 +++ away.c 2001/12/08 09:48:51 1.68 @@ -74,7 +74,7 @@ if (g_slist_index(connections, qm->gc) >= 0) set_convo_gc(cnv, qm->gc); - write_to_conv(cnv, qm->message, qm->flags, NULL, qm->tm); + write_to_conv(cnv, qm->message, qm->flags, NULL, qm->tm, qm->len); message_queue = g_slist_remove(message_queue, qm); @@ -111,7 +111,7 @@ if (g_slist_index(connections, qm->gc) >= 0) set_convo_gc(cnv, qm->gc); - write_to_conv(cnv, qm->message, qm->flags, NULL, qm->tm); + write_to_conv(cnv, qm->message, qm->flags, NULL, qm->tm, qm->len); g_free(qm->message); g_free(qm); templist = message_queue = g_slist_remove(message_queue, qm); @@ -222,10 +222,10 @@ gaim_setup_imhtml(awaytext); gtk_widget_show(awaytext); buf = stylize(a->message, BUF_LONG); - gtk_imhtml_append_text(GTK_IMHTML(awaytext), buf, GTK_IMHTML_NO_TITLE | + gtk_imhtml_append_text(GTK_IMHTML(awaytext), buf, -1, GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); g_free(buf); - gtk_imhtml_append_text(GTK_IMHTML(awaytext), "<BR>", GTK_IMHTML_NO_TITLE | + gtk_imhtml_append_text(GTK_IMHTML(awaytext), "<BR>", -1, GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); clistqueuesw = gtk_scrolled_window_new(NULL, NULL); Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy.c,v retrieving revision 1.279 retrieving revision 1.280 diff -u -d -r1.279 -r1.280 --- buddy.c 2001/12/01 02:14:47 1.279 +++ buddy.c 2001/12/08 09:48:51 1.280 @@ -1499,7 +1499,7 @@ set_convo_gc(c, u->gc); - write_to_conv(c, b->message, WFLAG_SEND, NULL, time((time_t) NULL)); + write_to_conv(c, b->message, WFLAG_SEND, NULL, time(NULL), -1); serv_send_im(u->gc, name, b->message, 0); } } @@ -2110,7 +2110,7 @@ if (c) { char tmp[1024]; g_snprintf(tmp, sizeof(tmp), _("%s logged in."), b->name); - write_to_conv(c, tmp, WFLAG_SYSTEM, NULL, time((time_t) NULL)); + write_to_conv(c, tmp, WFLAG_SYSTEM, NULL, time(NULL), -1); } } bs->sound = 2; @@ -2165,7 +2165,7 @@ if (c) { char tmp[1024]; g_snprintf(tmp, sizeof(tmp), _("%s logged out."), b->name); - write_to_conv(c, tmp, WFLAG_SYSTEM, NULL, time((time_t) NULL)); + write_to_conv(c, tmp, WFLAG_SYSTEM, NULL, time(NULL), -1); } } Index: buddy_chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v retrieving revision 1.136 retrieving revision 1.137 diff -u -d -r1.136 -r1.137 --- buddy_chat.c 2001/12/07 00:19:06 1.136 +++ buddy_chat.c 2001/12/08 09:48:51 1.137 @@ -605,7 +605,7 @@ g_free(tmp); matches = g_list_remove(matches, matches->data); } - write_to_conv(c, addthis, WFLAG_NOLOG, NULL, time(NULL)); + write_to_conv(c, addthis, WFLAG_NOLOG, NULL, time(NULL), -1); gtk_editable_insert_text(GTK_EDITABLE(c->entry), partial, strlen(partial), &start); if (t == start) { t = start + strlen(partial); @@ -618,7 +618,7 @@ g_free(partial); } -gboolean meify(char *message) +gboolean meify(char *message, int len) { /* read /me-ify : if the message (post-HTML) starts with /me, remove * the "/me " part of it (including that space) and return TRUE */ @@ -626,6 +626,8 @@ int inside_HTML = 0; /* i really don't like descriptive names */ if (!c) return FALSE; /* um... this would be very bad if this happens */ + if (len == -1) + len = strlen(message); while (*c) { if (inside_HTML) { if (*c == '>') @@ -637,12 +639,13 @@ break; } c++; /* i really don't like c++ either */ + len--; } /* k, so now we've gotten past all the HTML crap. */ if (!*c) return FALSE; if (!g_strncasecmp(c, "/me ", 4)) { - sprintf(c, "%s", c + 4); + memmove(c, c + 4, len - 4); return TRUE; } else return FALSE; @@ -721,7 +724,7 @@ if ((flag & WFLAG_RECV) && find_nick(b->gc, message)) flag |= WFLAG_NICK; - write_to_conv(b, message, flag, who, mtime); + write_to_conv(b, message, flag, who, mtime, -1); } @@ -884,7 +887,7 @@ if (chat_options & OPT_CHAT_LOGON) { g_snprintf(tmp, sizeof(tmp), _("%s entered the room."), name); - write_to_conv(b, tmp, WFLAG_SYSTEM, NULL, time(NULL)); + write_to_conv(b, tmp, WFLAG_SYSTEM, NULL, time(NULL), -1); } } @@ -958,7 +961,7 @@ if (chat_options & OPT_CHAT_LOGON) { g_snprintf(tmp, sizeof(tmp), _("%s is now known as %s"), old, new); - write_to_conv(b, tmp, WFLAG_SYSTEM, NULL, time(NULL)); + write_to_conv(b, tmp, WFLAG_SYSTEM, NULL, time(NULL), -1); } } @@ -1007,7 +1010,7 @@ g_snprintf(tmp, sizeof(tmp), _("%s left the room (%s)."), buddy, reason); else g_snprintf(tmp, sizeof(tmp), _("%s left the room."), buddy); - write_to_conv(b, tmp, WFLAG_SYSTEM, NULL, time(NULL)); + write_to_conv(b, tmp, WFLAG_SYSTEM, NULL, time(NULL), -1); } } Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.313 retrieving revision 1.314 diff -u -d -r1.313 -r1.314 --- conversation.c 2001/12/08 08:46:00 1.313 +++ conversation.c 2001/12/08 09:48:51 1.314 @@ -451,14 +451,12 @@ } } else { if (chat_options & OPT_CHAT_ONE_WINDOW) { - if ((convo_options & OPT_CONVO_COMBINE) && - (im_options & OPT_IM_ONE_WINDOW) && conversations) { + if ((g_list_length(chats) > 1) || + ((convo_options & OPT_CONVO_COMBINE) && + (im_options & OPT_IM_ONE_WINDOW) && conversations)) { gtk_notebook_remove_page(GTK_NOTEBOOK(chat_notebook), g_list_index(chats, c) + g_list_length(conversations)); - } else if (g_list_length(chats) > 1) { - gtk_notebook_remove_page(GTK_NOTEBOOK(chat_notebook), - g_list_index(chats, c)); } else { if (c->window) gtk_widget_destroy(c->window); @@ -1005,7 +1003,7 @@ if (err > 0) { - write_to_conv(c, buf, WFLAG_SEND, NULL, time(NULL)); + write_to_conv(c, buf, WFLAG_SEND, NULL, time(NULL), -1); if (c->makesound && (sound_options & OPT_SOUND_SEND)) play_sound(SEND); @@ -1443,7 +1441,7 @@ /* this is going to be interesting since the conversation could either be a * normal IM conversation or a chat window. but hopefully it won't matter */ -void write_to_conv(struct conversation *c, char *what, int flags, char *who, time_t mtime) +void write_to_conv(struct conversation *c, char *what, int flags, char *who, time_t mtime, gint length) { char buf[BUF_LONG]; char *str; @@ -1455,7 +1453,7 @@ char buf2[BUF_LONG]; char mdate[64]; - if (c->is_chat && !g_list_find(chats, c)) + if (c->is_chat && (!c->gc || !g_slist_find(c->gc->buddy_chats, c))) return; if (!c->is_chat && !g_list_find(conversations, c)) @@ -1492,7 +1490,7 @@ int index = g_slist_index(connections, c->gc); int sconv = strlen(c->name); int sname = strlen(who); - int swhat = strlen(what); + int swhat = length == -1 ? strlen(what) : length; UI_build_broadcast(CUI_TYPE_MESSAGE, CUI_MESSAGE_RECV, sizeof(index), &index, sizeof(sconv), &sconv, @@ -1529,7 +1527,7 @@ g_snprintf(buf2, sizeof(buf2), "<FONT SIZE=\"2\"><!--(%s) --></FONT><B>%s</B><BR>", mdate, what); - gtk_imhtml_append_text(GTK_IMHTML(c->text), buf2, 0); + gtk_imhtml_append_text(GTK_IMHTML(c->text), buf2, -1, 0); if (logging_options & OPT_LOG_STRIP_HTML) { char *t1 = strip_html(buf); @@ -1569,11 +1567,11 @@ } } else if (flags & WFLAG_NOLOG) { g_snprintf(buf, BUF_LONG, "<B><FONT COLOR=\"#777777\">%s</FONT></B><BR>", what); - gtk_imhtml_append_text(GTK_IMHTML(c->text), buf, 0); + gtk_imhtml_append_text(GTK_IMHTML(c->text), buf, -1, 0); } else { if (flags & WFLAG_WHISPER) { /* if we're whispering, it's not an autoresponse */ - if (meify(what)) { + if (meify(what, length)) { str = g_malloc(1024); g_snprintf(str, 1024, "***%s", who); strcpy(colour, "#6C2585"); @@ -1583,7 +1581,7 @@ strcpy(colour, "#00ff00"); } } else { - if (meify(what)) { + if (meify(what, length)) { str = g_malloc(1024); if (flags & WFLAG_AUTO) g_snprintf(str, 1024, "%s ***%s", AUTO_RESPONSE, who); @@ -1618,11 +1616,11 @@ g_free(str); - gtk_imhtml_append_text(GTK_IMHTML(c->text), buf2, 0); + gtk_imhtml_append_text(GTK_IMHTML(c->text), buf2, -1, 0); - logstr = gtk_imhtml_append_text(GTK_IMHTML(c->text), what, gtk_font_options); + logstr = gtk_imhtml_append_text(GTK_IMHTML(c->text), what, length, gtk_font_options); - gtk_imhtml_append_text(GTK_IMHTML(c->text), "<BR>", 0); + gtk_imhtml_append_text(GTK_IMHTML(c->text), "<BR>", -1, 0); if (logging_options & OPT_LOG_STRIP_HTML) { char *t1, *t2; Index: convo.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/convo.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- convo.h 2001/12/04 07:53:55 1.13 +++ convo.h 2001/12/08 09:48:51 1.14 @@ -78,6 +78,6 @@ extern void send_callback(GtkWidget *, struct conversation *); extern int close_callback(GtkWidget *, struct conversation *); -extern gboolean meify(char *); +extern gboolean meify(char *, int); #endif /* _CONVO_H_ */ Index: core.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/core.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- core.h 2001/11/19 04:09:58 1.13 +++ core.h 2001/12/08 09:48:51 1.14 @@ -191,7 +191,7 @@ /* Functions in server.c */ extern void serv_got_update(struct gaim_connection *, char *, int, int, time_t, time_t, int, gushort); -extern void serv_got_im(struct gaim_connection *, char *, char *, guint32, time_t); +extern void serv_got_im(struct gaim_connection *, char *, char *, guint32, time_t, gint); extern void serv_got_eviled(struct gaim_connection *, char *, int); extern void serv_got_chat_invite(struct gaim_connection *, char *, char *, char *, GList *); extern struct conversation *serv_got_joined_chat(struct gaim_connection *, int, char *); Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.295 retrieving revision 1.296 diff -u -d -r1.295 -r1.296 --- dialogs.c 2001/12/05 19:40:06 1.295 +++ dialogs.c 2001/12/08 09:48:51 1.296 @@ -1846,14 +1846,14 @@ options ^= GTK_IMHTML_NO_NEWLINE; options ^= GTK_IMHTML_NO_SCROLL; - gtk_imhtml_append_text(GTK_IMHTML(b->text), info, options); + gtk_imhtml_append_text(GTK_IMHTML(b->text), info, -1, options); va_start(ap, info); while ((more_info = va_arg(ap, char *)) != NULL) - gtk_imhtml_append_text(GTK_IMHTML(b->text), more_info, options); + gtk_imhtml_append_text(GTK_IMHTML(b->text), more_info, -1, options); va_end(ap); - gtk_imhtml_append_text(GTK_IMHTML(b->text), "<BR>", 0); + gtk_imhtml_append_text(GTK_IMHTML(b->text), "<BR>", -1, 0); if (away) info_dlgs = g_slist_remove(info_dlgs, b); @@ -3584,7 +3584,7 @@ g_string_append(string, buf); if (i == 30) { - gtk_imhtml_append_text(GTK_IMHTML(view->layout), string->str, view->options); + gtk_imhtml_append_text(GTK_IMHTML(view->layout), string->str, -1, view->options); g_string_free(string, TRUE); string = g_string_new(""); /* you can't have these anymore. if someone clicks on another item while one is @@ -3596,8 +3596,8 @@ } } - gtk_imhtml_append_text(GTK_IMHTML(view->layout), string->str, view->options); - gtk_imhtml_append_text(GTK_IMHTML(view->layout), "<BR>", view->options); + gtk_imhtml_append_text(GTK_IMHTML(view->layout), string->str, -1, view->options); + gtk_imhtml_append_text(GTK_IMHTML(view->layout), "<BR>", -1, view->options); gtk_widget_set_sensitive(view->bbox, TRUE); gtk_signal_disconnect(GTK_OBJECT(view->window), block); Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.302 retrieving revision 1.303 diff -u -d -r1.302 -r1.303 --- gaim.h 2001/12/04 07:53:55 1.302 +++ gaim.h 2001/12/08 09:48:51 1.303 @@ -331,7 +331,7 @@ extern void remove_chat_buddy(struct conversation *, char *, char *); /* Functions in conversation.c */ -extern void write_to_conv(struct conversation *, char *, int, char *, time_t); +extern void write_to_conv(struct conversation *, char *, int, char *, time_t, int); extern struct conversation *find_conversation(char *); /* Functions in dialogs.c */ Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- gtkimhtml.c 2001/12/01 22:53:51 1.85 +++ gtkimhtml.c 2001/12/08 09:48:51 1.86 @@ -36,10 +36,10 @@ #endif #if GTK_CHECK_VERSION(1,3,0) -#define GTK_IMHTML_GET_STYLE_FONT(style) gtk_style_get_font (style) +# define GTK_IMHTML_GET_STYLE_FONT(style) gtk_style_get_font (style) #else -#define GTK_IMHTML_GET_STYLE_FONT(style) (style)->font -#define GTK_CLASS_TYPE(class) (class)->type +# define GTK_IMHTML_GET_STYLE_FONT(style) (style)->font +# define GTK_CLASS_TYPE(class) (class)->type #endif [...1461 lines suppressed...] imhtml->x = 0; imhtml->y = TOP_BORDER; imhtml->xsize = 0; @@ -3616,11 +3300,12 @@ layout->vadjustment->upper = imhtml->y; gtk_adjustment_set_value (layout->vadjustment, 0); - gtk_signal_emit_by_name (GTK_OBJECT (layout->hadjustment), "changed"); - gtk_signal_emit_by_name (GTK_OBJECT (layout->vadjustment), "changed"); - - if (GTK_WIDGET_REALIZED (GTK_WIDGET (imhtml))) + if (GTK_WIDGET_REALIZED (GTK_WIDGET (imhtml))) { + gdk_window_set_cursor (GTK_LAYOUT (imhtml)->bin_window, imhtml->arrow_cursor); gdk_window_clear (GTK_LAYOUT (imhtml)->bin_window); + gtk_signal_emit_by_name (GTK_OBJECT (layout->hadjustment), "changed"); + gtk_signal_emit_by_name (GTK_OBJECT (layout->vadjustment), "changed"); + } } void Index: gtkimhtml.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gtkimhtml.h 2001/11/15 23:43:44 1.9 +++ gtkimhtml.h 2001/12/08 09:48:51 1.10 @@ -53,7 +53,7 @@ GdkCursor *arrow_cursor; GList *bits; - GList *urls; + GList *click; struct _GtkIMHtmlBit *tip_bit; GtkWidget *tip_window; guint tip_timer; @@ -127,6 +127,7 @@ GString* gtk_imhtml_append_text (GtkIMHtml *imhtml, const gchar *text, + gint len, GtkIMHtmlOptions options); void gtk_imhtml_clear (GtkIMHtml *imhtml); Index: perl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/perl.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- perl.c 2001/11/13 06:36:27 1.67 +++ perl.c 2001/12/08 09:48:51 1.68 @@ -564,7 +564,7 @@ if (!c) c = new_conversation(nick); - write_to_conv(c, what, wflags, who, time((time_t)NULL)); + write_to_conv(c, what, wflags, who, time(NULL), -1); XSRETURN(0); } @@ -612,7 +612,7 @@ if (!c) c = new_conversation(nick); set_convo_gc(c, gc); - write_to_conv(c, what, WFLAG_SEND | (isauto ? WFLAG_AUTO : 0), NULL, time((time_t)NULL)); + write_to_conv(c, what, WFLAG_SEND | (isauto ? WFLAG_AUTO : 0), NULL, time(NULL), -1); serv_send_im(c->gc, nick, what, isauto ? IM_FLAG_AWAY : 0); XSRETURN(0); } Index: prefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prefs.c,v retrieving revision 1.210 retrieving revision 1.211 diff -u -d -r1.210 -r1.211 --- prefs.c 2001/12/04 07:53:55 1.210 +++ prefs.c 2001/12/08 09:48:52 1.211 @@ -1738,9 +1738,9 @@ /* Fill the text box with new message */ strcpy(buffer, a->message); tmp = stylize(buffer, BUF_LONG); - gtk_imhtml_append_text(GTK_IMHTML(away_text), tmp, GTK_IMHTML_NO_TITLE | + gtk_imhtml_append_text(GTK_IMHTML(away_text), tmp, -1, GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); - gtk_imhtml_append_text(GTK_IMHTML(away_text), "<BR>", GTK_IMHTML_NO_TITLE | + gtk_imhtml_append_text(GTK_IMHTML(away_text), "<BR>", -1, GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); g_free(tmp); } @@ -1988,9 +1988,9 @@ a = (struct away_message *)awy->data; g_snprintf(buffer, sizeof(buffer), "%s", a->message); tmp = stylize(buffer, BUF_LONG); - gtk_imhtml_append_text(GTK_IMHTML(away_text), tmp, GTK_IMHTML_NO_TITLE | + gtk_imhtml_append_text(GTK_IMHTML(away_text), tmp, -1, GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); - gtk_imhtml_append_text(GTK_IMHTML(away_text), "<BR>", GTK_IMHTML_NO_TITLE | + gtk_imhtml_append_text(GTK_IMHTML(away_text), "<BR>", -1, GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_SCROLL); g_free(tmp); } Index: server.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/server.c,v retrieving revision 1.213 retrieving revision 1.214 diff -u -d -r1.213 -r1.214 --- server.c 2001/12/02 00:35:34 1.213 +++ server.c 2001/12/08 09:48:52 1.214 @@ -427,7 +427,7 @@ } /* woo. i'm actually going to comment this function. isn't that fun. make sure to follow along, kids */ -void serv_got_im(struct gaim_connection *gc, char *name, char *message, guint32 flags, time_t mtime) +void serv_got_im(struct gaim_connection *gc, char *name, char *message, guint32 flags, time_t mtime, gint len) { char *buffy; char *angel; @@ -457,26 +457,32 @@ /* plugin stuff. we pass a char ** but we don't want to pass what's been given us * by the prpls. so we create temp holders and pass those instead. it's basically - * just to avoid segfaults. */ - buffy = g_malloc(MAX(strlen(message) + 1, BUF_LONG)); - strcpy(buffy, message); - angel = g_strdup(name); - plugin_return = plugin_event(event_im_recv, gc, &angel, &buffy, (void *)flags); + * just to avoid segfaults. of course, if the data is binary, plugins don't see it. + * bitch all you want; i really don't want you to be dealing with it. */ + if (len < 0) { + buffy = g_malloc(MAX(strlen(message) + 1, BUF_LONG)); + strcpy(buffy, message); + angel = g_strdup(name); + plugin_return = plugin_event(event_im_recv, gc, &angel, &buffy, (void *)flags); - if (!buffy || !angel || plugin_return) { - if (buffy) - g_free(buffy); - if (angel) - g_free(angel); - return; + if (!buffy || !angel || plugin_return) { + if (buffy) + g_free(buffy); + if (angel) + g_free(angel); + return; + } + name = angel; + message = buffy; + } else { + name = g_strdup(name); + message = g_memdup(message, len); } - name = angel; - message = buffy; /* TiK, using TOC, sends an automated message in order to get your away message. Now, * this is one of the biggest hacks I think I've seen. But, in order to be nice to * TiK, we're going to give users the option to ignore it. */ - if ((away_options & OPT_AWAY_TIK_HACK) && gc->away && strlen(gc->away) && + if ((away_options & OPT_AWAY_TIK_HACK) && gc->away && strlen(gc->away) && (len < 0) && !strcmp(message, ">>>Automated Message: Getting Away Message<<<")) { char *tmpmsg = stylize(awaymessage->message, MSG_LEN); serv_send_im(gc, name, tmpmsg, IM_FLAG_AWAY); @@ -488,7 +494,7 @@ /* if you can't figure this out, stop reading right now. * "we're not worthy! we're not worthy!" */ - if (convo_options & OPT_CONVO_SEND_LINKS) + if ((len < 0) && (convo_options & OPT_CONVO_SEND_LINKS)) linkify_text(message); /* um. when we call write_to_conv with the message we received, it's nice to pass whether @@ -523,10 +529,11 @@ qm = g_new0(struct queued_message, 1); g_snprintf(qm->name, sizeof(qm->name), "%s", name); - qm->message = g_strdup(message); + qm->message = g_memdup(message, len == -1 ? strlen(message) + 1 : len); qm->gc = gc; qm->tm = mtime; qm->flags = WFLAG_RECV | away; + qm->len = len; message_queue = g_slist_append(message_queue, qm); #ifdef USE_APPLET @@ -572,7 +579,7 @@ else if (cnv->makesound && (sound_options & OPT_SOUND_RECV)) play_sound(RECEIVE); - write_to_conv(cnv, message, away | WFLAG_RECV, NULL, mtime); + write_to_conv(cnv, message, away | WFLAG_RECV, NULL, mtime, len); } /* regardless of whether we queue it or not, we should send an auto-response. That is, @@ -616,7 +623,7 @@ message_queue = g_slist_append(message_queue, qm); } else if (cnv != NULL) write_to_conv(cnv, away_subs(tmpmsg, alias), WFLAG_SEND | WFLAG_AUTO, NULL, - mtime); + mtime, len); g_free(tmpmsg); } else { /* we're not away. this is easy. if the convo window doesn't exist, create and update @@ -631,7 +638,7 @@ else if (cnv->makesound && (sound_options & OPT_SOUND_RECV)) play_sound(RECEIVE); - write_to_conv(cnv, message, away | WFLAG_RECV, NULL, mtime); + write_to_conv(cnv, message, away | WFLAG_RECV, NULL, mtime, len); } plugin_event(event_im_displayed_rcvd, gc, name, message, (void *)flags); @@ -986,5 +993,5 @@ gtk_widget_show_all(window); - gtk_imhtml_append_text(GTK_IMHTML(text), msg, GTK_IMHTML_NO_NEWLINE); + gtk_imhtml_append_text(GTK_IMHTML(text), msg, -1, GTK_IMHTML_NO_NEWLINE); } Index: ui.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/ui.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ui.h 2001/12/04 07:53:55 1.24 +++ ui.h 2001/12/08 09:48:52 1.25 @@ -202,6 +202,7 @@ time_t tm; struct gaim_connection *gc; int flags; + int len; }; struct mod_user { |
From: Eric W. <war...@us...> - 2001-12-08 09:48:55
|
Update of /cvsroot/gaim/gaim/src/protocols/jabber In directory usw-pr-cvs1:/tmp/cvs-serv19507/src/protocols/jabber Modified Files: jabber.c Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: jabber.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/jabber.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- jabber.c 2001/11/30 21:16:27 1.31 +++ jabber.c 2001/12/08 09:48:52 1.32 @@ -622,10 +622,10 @@ if (xmlnode_get_tag(p->x, "gaim")) flags = IM_FLAG_GAIMUSER; if (find_conversation(jid_full(p->from))) - serv_got_im(GJ_GC(j), jid_full(p->from), m, flags, time(NULL)); + serv_got_im(GJ_GC(j), jid_full(p->from), m, flags, time(NULL), -1); else { from = g_strdup_printf("%s@%s", p->from->user, p->from->server); - serv_got_im(GJ_GC(j), from, m, flags, time(NULL)); + serv_got_im(GJ_GC(j), from, m, flags, time(NULL), -1); g_free(from); } } @@ -690,7 +690,7 @@ msg = xmlnode_get_data(y); g_snprintf(buf, sizeof(buf), "%s now has status: %s", p->from->resource, msg); - write_to_conv(jc->b, buf, WFLAG_SYSTEM, NULL, time(NULL)); + write_to_conv(jc->b, buf, WFLAG_SYSTEM, NULL, time(NULL), -1); } } else if (jc->b && msg) { char buf[8192]; @@ -847,7 +847,7 @@ char *msg = xmlnode_get_data(y); g_snprintf(buf, sizeof(buf), "%s now has status: %s", p->from->resource, msg); - write_to_conv(jc->b, buf, WFLAG_SYSTEM, NULL, time(NULL)); + write_to_conv(jc->b, buf, WFLAG_SYSTEM, NULL, time(NULL), -1); } } } |
From: Eric W. <war...@us...> - 2001-12-08 09:48:55
|
Update of /cvsroot/gaim/gaim/src/protocols/icq In directory usw-pr-cvs1:/tmp/cvs-serv19507/src/protocols/icq Modified Files: gaim_icq.c Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: gaim_icq.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/icq/gaim_icq.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- gaim_icq.c 2001/11/26 20:39:53 1.22 +++ gaim_icq.c 2001/12/08 09:48:52 1.23 @@ -114,7 +114,7 @@ g_snprintf(tmp, BUF_LONG, "%s", data); g_snprintf(buf, sizeof buf, "%lu", uin); strip_linefeed(tmp); - serv_got_im(gc, buf, tmp, 0, time((time_t)NULL)); + serv_got_im(gc, buf, tmp, 0, time(NULL), -1); g_free(tmp); } @@ -169,7 +169,7 @@ char *msg = g_malloc(BUF_LONG), buf[256]; g_snprintf(msg, BUF_LONG, "<A HREF=\"%s\">%s</A>", url, descr); g_snprintf(buf, 256, "%lu", uin); - serv_got_im(gc, buf, msg, 0, time((time_t)NULL)); + serv_got_im(gc, buf, msg, 0, time(NULL), -1); g_free(msg); } @@ -211,7 +211,7 @@ char *who = g_strdup_printf("ICQ Web Pager: %s (%s)", nick, email); char *what = g_malloc(BUF_LONG); g_snprintf(what, BUF_LONG, "%s", msg); - serv_got_im(gc, who, what, 0, time((time_t)NULL)); + serv_got_im(gc, who, what, 0, time(NULL), -1); g_free(who); g_free(what); } @@ -223,7 +223,7 @@ char *who = g_strdup_printf("ICQ Mail Express: %s (%s)", nick, email); char *what = g_malloc(BUF_LONG); g_snprintf(what, BUF_LONG, "%s", msg); - serv_got_im(gc, who, what, 0, time((time_t)NULL)); + serv_got_im(gc, who, what, 0, time(NULL), -1); g_free(who); g_free(what); } |
From: Eric W. <war...@us...> - 2001-12-08 09:48:55
|
Update of /cvsroot/gaim/gaim/src/protocols/gg In directory usw-pr-cvs1:/tmp/cvs-serv19507/src/protocols/gg Modified Files: gg.c Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: gg.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/gg/gg.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- gg.c 2001/12/05 09:48:56 1.15 +++ gg.c 2001/12/08 09:48:52 1.16 @@ -369,7 +369,7 @@ imsg = charset_convert(e->event.msg.message, "CP1250", find_local_charset()); strip_linefeed(imsg); /* e->event.msg.time - we don't know what this time is for */ - serv_got_im(gc, user, imsg, 0, time((time_t) NULL)); + serv_got_im(gc, user, imsg, 0, time(NULL), -1); g_free(imsg); } break; |
From: Eric W. <war...@us...> - 2001-12-08 09:48:54
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv19507 Modified Files: configure.ac Log Message: rewrote the html parser in gtkimhtml. yes, that's really all i did. the reason for the massive change is because i added a length argument, which then needed to be propogated down to everything that would ever receive anything that would get drawn to the window. the new parser isn't any faster. that wasn't my goal. it's much more understandable now (hopefully, anyway). Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- configure.ac 2001/12/06 05:52:04 1.37 +++ configure.ac 2001/12/08 09:48:51 1.38 @@ -85,7 +85,7 @@ AC_ARG_ENABLE(gtk2, [ --enable-gtk2 compile using GTK 2 (BROKEN)],,enable_gtk2=no) AC_ARG_ENABLE(gnome, [ --disable-gnome compile without Gnome bits],,enable_gnome=yes) -AC_ARG_ENABLE(pixbuf, [ --disable-pixbuf compile without GdkPixbuf (needed for Buddy Icons)],,enable_pixbuf=yes) +AC_ARG_ENABLE(pixbuf, [ --disable-pixbuf compile without GdkPixbuf],,enable_pixbuf=yes) AC_ARG_ENABLE(panel, [ --enable-panel compile as a GNOME applet],,enable_panel=$enable_distrib) AM_CONDITIONAL(GNOMEAPPLET, test "x$enable_panel" = "xyes") @@ -428,9 +428,9 @@ echo UI Library.................... : GTK+ 1.2 fi if test "x$enable_gtk2" = "xyes" ; then - echo Use GdkPixbuf for Buddy Icons. : yes + echo Use GdkPixbuf................. : yes else - echo Use GdkPixbuf for Buddy Icons. : $use_pixbuf + echo Use GdkPixbuf................. : $use_pixbuf fi echo echo Build with Plugin support..... : $enable_plugins |
From: Eric W. <war...@us...> - 2001-12-08 08:46:03
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv2399 Modified Files: conversation.c Log Message: huh Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.312 retrieving revision 1.313 diff -u -d -r1.312 -r1.313 --- conversation.c 2001/12/04 07:53:55 1.312 +++ conversation.c 2001/12/08 08:46:00 1.313 @@ -451,12 +451,14 @@ } } else { if (chat_options & OPT_CHAT_ONE_WINDOW) { - if ((g_list_length(chats) > 1) || - ((convo_options & OPT_CONVO_COMBINE) && - (im_options & OPT_IM_ONE_WINDOW) && conversations)) { + if ((convo_options & OPT_CONVO_COMBINE) && + (im_options & OPT_IM_ONE_WINDOW) && conversations) { gtk_notebook_remove_page(GTK_NOTEBOOK(chat_notebook), g_list_index(chats, c) + g_list_length(conversations)); + } else if (g_list_length(chats) > 1) { + gtk_notebook_remove_page(GTK_NOTEBOOK(chat_notebook), + g_list_index(chats, c)); } else { if (c->window) gtk_widget_destroy(c->window); @@ -1453,7 +1455,7 @@ char buf2[BUF_LONG]; char mdate[64]; - if (c->is_chat && (!c->gc || !g_slist_find(c->gc->buddy_chats, c))) + if (c->is_chat && !g_list_find(chats, c)) return; if (!c->is_chat && !g_list_find(conversations, c)) |
From: Eric W. <war...@us...> - 2001-12-07 00:19:09
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv16791 Modified Files: buddy_chat.c Log Message: leave it alone Index: buddy_chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v retrieving revision 1.135 retrieving revision 1.136 diff -u -d -r1.135 -r1.136 --- buddy_chat.c 2001/12/04 19:51:27 1.135 +++ buddy_chat.c 2001/12/07 00:19:06 1.136 @@ -812,8 +812,10 @@ static gint right_click_chat(GtkObject *obj, GdkEventButton *event, struct conversation *b) { if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { - if (!find_conversation(gtk_object_get_user_data(obj))) - new_conversation(gtk_object_get_user_data(obj)); + struct conversation *c; + if ((c = find_conversation(gtk_object_get_user_data(obj))) == NULL) + c = new_conversation(gtk_object_get_user_data(obj)); + set_convo_gc(c, b->gc); } else if (event->button == 3 && event->type == GDK_BUTTON_PRESS) { GtkWidget *menu; GtkWidget *button; |
From: Eric W. <war...@us...> - 2001-12-06 20:13:28
|
Update of /cvsroot/gaim/gaim/src/protocols/toc In directory usw-pr-cvs1:/tmp/cvs-serv14588/protocols/toc Modified Files: toc.c Log Message: don't go in the FUCKING window Index: toc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/toc/toc.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- toc.c 2001/11/30 21:16:28 1.36 +++ toc.c 2001/12/06 20:13:24 1.37 @@ -130,7 +130,6 @@ static void toc_login_callback(gpointer, gint, GaimInputCondition); static void toc_callback(gpointer, gint, GaimInputCondition); -static unsigned char *roast_password(char *); static void accept_file_dialog(struct ft_request *); /* ok. this function used to take username/password, and return 0 on success. @@ -514,6 +513,9 @@ } debug_printf("* Client sends TOC \"toc_signon\" message\n"); + /* i hate icq. */ + if (gc->username[0] >= '0' && gc->username[0] <= '9') + gc->password[9] = '\0'; g_snprintf(snd, sizeof snd, "toc_signon %s %d %s %s %s \"%s\"", AUTH_HOST, AUTH_PORT, normalize(gc->username), roast_password(gc->password), LANGUAGE, REVISION); |
From: Eric W. <war...@us...> - 2001-12-06 05:52:07
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv6201 Modified Files: configure.ac Log Message: damn false-positives Index: configure.ac =================================================================== RCS file: /cvsroot/gaim/gaim/configure.ac,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- configure.ac 2001/12/03 06:25:29 1.36 +++ configure.ac 2001/12/06 05:52:04 1.37 @@ -430,7 +430,7 @@ if test "x$enable_gtk2" = "xyes" ; then echo Use GdkPixbuf for Buddy Icons. : yes else - echo Use GdkPixbuf for Buddy Icons. : $enable_pixbuf + echo Use GdkPixbuf for Buddy Icons. : $use_pixbuf fi echo echo Build with Plugin support..... : $enable_plugins |
From: Eric W. <war...@us...> - 2001-12-05 19:40:09
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv3684 Modified Files: dialogs.c Log Message: runnin' around robbin' banks all wacked out on scooby snacks! i actually don't like that song except for that one line. Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.294 retrieving revision 1.295 diff -u -d -r1.294 -r1.295 --- dialogs.c 2001/12/02 00:35:33 1.294 +++ dialogs.c 2001/12/05 19:40:06 1.295 @@ -42,6 +42,9 @@ #include "gaim.h" #include "gtkimhtml.h" #include "prpl.h" +#ifdef USE_APPLET +#include "applet.h" +#endif #include "pixmaps/gnome_preferences.xpm" #include "pixmaps/cancel.xpm" @@ -2912,8 +2915,14 @@ if (!ca->mess) am = g_new0(struct away_message, 1); - else + else { +#ifdef USE_APPLET + char *awayname = g_strdup_printf("away/%s", ca->mess->name); + applet_widget_unregister_callback(APPLET_WIDGET(applet), awayname); + g_free(awayname); +#endif am = ca->mess; + } g_snprintf(am->name, sizeof(am->name), "%s", gtk_entry_get_text(GTK_ENTRY(ca->entry))); text_len = gtk_text_get_length(GTK_TEXT(ca->text)); |
From: Eric W. <war...@us...> - 2001-12-05 10:59:55
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv588/protocols/yahoo Modified Files: yahoo.c Log Message: thanks abiligiri Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- yahoo.c 2001/11/29 08:39:55 1.21 +++ yahoo.c 2001/12/05 10:59:52 1.22 @@ -565,7 +565,12 @@ l = l->next; } - connection_has_mail(gc, count, NULL, NULL, "http://mail.yahoo.com/"); + if (who && email && subj) { + char *from = g_strdup_printf("%s (%s)", who, email); + connection_has_mail(gc, -1, from, subj, "http://mail.yahoo.com/"); + g_free(from); + } else + connection_has_mail(gc, count, NULL, NULL, "http://mail.yahoo.com/"); } static void yahoo_packet_process(struct gaim_connection *gc, struct yahoo_packet *pkt) |
From: Eric W. <war...@us...> - 2001-12-05 10:38:42
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory usw-pr-cvs1:/tmp/cvs-serv27884/protocols/yahoo Modified Files: Makefile.am Removed Files: md5.c Log Message: md5.c really should be in gaim-core. it's used by oscar (aim and icq), msn, and yahoo. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.am 2001/11/26 23:18:36 1.7 +++ Makefile.am 2001/12/05 10:38:39 1.8 @@ -11,7 +11,7 @@ pkg_LTLIBRARIES = noinst_LIBRARIES = libyahoo.a -libyahoo_a_SOURCES = crypt.c md5.c yahoo.c +libyahoo_a_SOURCES = crypt.c yahoo.c else @@ -19,6 +19,6 @@ pkg_LTLIBRARIES = libyahoo.la noinst_LIBRARIES = -libyahoo_la_SOURCES = crypt.c md5.c yahoo.c +libyahoo_la_SOURCES = crypt.c yahoo.c endif --- md5.c DELETED --- |
From: Eric W. <war...@us...> - 2001-12-05 10:38:42
|
Update of /cvsroot/gaim/gaim/src/protocols/msn In directory usw-pr-cvs1:/tmp/cvs-serv27884/protocols/msn Modified Files: Makefile.am Removed Files: md5.c Log Message: md5.c really should be in gaim-core. it's used by oscar (aim and icq), msn, and yahoo. Index: Makefile.am =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/msn/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.am 2001/09/27 19:27:52 1.5 +++ Makefile.am 2001/12/05 10:38:39 1.6 @@ -11,7 +11,7 @@ pkg_LTLIBRARIES = noinst_LIBRARIES = libmsn.a -libmsn_a_SOURCES = msn.c md5.c +libmsn_a_SOURCES = msn.c else @@ -19,6 +19,6 @@ pkg_LTLIBRARIES = libmsn.la noinst_LIBRARIES = -libmsn_la_SOURCES = msn.c md5.c +libmsn_la_SOURCES = msn.c endif --- md5.c DELETED --- |