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-09-26 20:31:08
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv19229 Modified Files: multi.c Log Message: hi Index: multi.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/multi.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- multi.c 2001/09/20 04:50:50 1.77 +++ multi.c 2001/09/26 20:31:06 1.78 @@ -189,7 +189,7 @@ list = gtk_clist_new_with_titles(4, titles); gtk_clist_set_column_width(GTK_CLIST(list), 0, 90); - gtk_clist_set_selection_mode(GTK_CLIST(list), GTK_SELECTION_MULTIPLE); + gtk_clist_set_selection_mode(GTK_CLIST(list), GTK_SELECTION_EXTENDED); gtk_clist_column_titles_passive(GTK_CLIST(list)); gtk_container_add(GTK_CONTAINER(win), list); gtk_widget_show(list); |
From: Eric W. <war...@us...> - 2001-09-26 19:48:53
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv30582/src Modified Files: conversation.c gtkimhtml.c gtkimhtml.h Log Message: my cs165a (AI) teacher used to work at microsoft, and today he was wearing a microsoft t-shirt, so i've decided that every day that i go to his class i'll wear a different sun/netscape/linux t-shirt. Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.263 retrieving revision 1.264 diff -u -d -r1.263 -r1.264 --- conversation.c 2001/09/22 09:14:27 1.263 +++ conversation.c 2001/09/26 19:48:50 1.264 @@ -586,6 +586,10 @@ gtk_signal_emit_stop_by_name(GTK_OBJECT(entry), "key_press_event"); close_callback(c->close, c); } + } else if (event->keyval == GDK_Page_Up) { + gtk_imhtml_page_up(GTK_IMHTML(c->text)); + } else if (event->keyval == GDK_Page_Down) { + gtk_imhtml_page_down(GTK_IMHTML(c->text)); } else if ((event->keyval == GDK_F2) && (convo_options & OPT_CONVO_F2_TOGGLES)) { gtk_imhtml_show_comments(GTK_IMHTML(c->text), !GTK_IMHTML(c->text)->comments); } else if ((event->keyval == GDK_Return) || (event->keyval == GDK_KP_Enter)) { Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- gtkimhtml.c 2001/09/22 11:22:59 1.52 +++ gtkimhtml.c 2001/09/26 19:48:50 1.53 @@ -3477,3 +3477,31 @@ if (GTK_WIDGET_REALIZED (GTK_WIDGET (imhtml))) gdk_window_clear (GTK_LAYOUT (imhtml)->bin_window); } + +void +gtk_imhtml_page_up (GtkIMHtml *imhtml) +{ + GtkAdjustment *vadj; + + g_return_if_fail (imhtml != NULL); + g_return_if_fail (GTK_IS_IMHTML (imhtml)); + + vadj = GTK_LAYOUT (imhtml)->vadjustment; + gtk_adjustment_set_value (vadj, MAX (vadj->value - vadj->page_increment, + vadj->lower)); + gtk_signal_emit_by_name (GTK_OBJECT (vadj), "changed"); +} + +void +gtk_imhtml_page_down (GtkIMHtml *imhtml) +{ + GtkAdjustment *vadj; + + g_return_if_fail (imhtml != NULL); + g_return_if_fail (GTK_IS_IMHTML (imhtml)); + + vadj = GTK_LAYOUT (imhtml)->vadjustment; + gtk_adjustment_set_value (vadj, MIN (vadj->value + vadj->page_increment, + vadj->upper - vadj->page_size)); + gtk_signal_emit_by_name (GTK_OBJECT (vadj), "changed"); +} Index: gtkimhtml.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- gtkimhtml.h 2001/09/22 11:22:59 1.7 +++ gtkimhtml.h 2001/09/26 19:48:50 1.8 @@ -129,6 +129,10 @@ void gtk_imhtml_clear (GtkIMHtml *imhtml); +void gtk_imhtml_page_up (GtkIMHtml *imhtml); + +void gtk_imhtml_page_down (GtkIMHtml *imhtml); + #ifdef __cplusplus } #endif |
From: Eric W. <war...@us...> - 2001-09-26 19:22:23
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv18394 Modified Files: about.c Log Message: thanks Luke Warm Index: about.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/about.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- about.c 2001/09/20 01:20:29 1.45 +++ about.c 2001/09/26 19:22:19 1.46 @@ -133,7 +133,7 @@ text = gtk_text_new(NULL, NULL); - gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, _("Rob Flynn (maintainer) ro...@ma...\nEric Warmenhoven (lead coder) war...@ya...\n\nBenjamin Miller\nDecklin Foster\nJim Duchek\nMark Spencer (original author) mar...@ma..."), 199); + gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL, _("Rob Flynn (maintainer) ro...@ma...\nEric Warmenhoven (lead coder) war...@ya...\n\nBenjamin Miller\nDecklin Foster\nJim Duchek\nMark Spencer (original author) mar...@ma..."), 198); gtk_widget_show(text); |
From: Eric W. <war...@us...> - 2001-09-26 19:19:22
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv16189/protocols/oscar Modified Files: oscar.c Log Message: it's going to be a lot harder to insert backd^H^H^H^H^Heaster eggs with everyone watching me. Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- oscar.c 2001/09/24 21:41:19 1.39 +++ oscar.c 2001/09/26 19:19:19 1.40 @@ -149,15 +149,14 @@ tmp = g_strdup(++x); for (i = 0, j = 0; x[i]; i++) { - if (x[i] != '%') + char hex[3]; + if (x[i] != '%') { tmp[j++] = x[i]; - else { - char hex[3]; - hex[0] = x[++i]; - hex[1] = x[++i]; - hex[2] = 0; - sscanf(hex, "%x", (int *)&tmp[j++]); + continue; } + strncpy(hex, x + ++i, 2); hex[2] = 0; + i++; + tmp[j++] = strtol(hex, NULL, 16); } tmp[j] = 0; |
From: Eric W. <war...@us...> - 2001-09-26 01:43:44
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv5116 Modified Files: plugins.c Log Message: stupid, stupid Index: plugins.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/plugins.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- plugins.c 2001/09/26 00:53:49 1.80 +++ plugins.c 2001/09/26 01:43:41 1.81 @@ -865,6 +865,9 @@ g_snprintf(buf, sizeof buf, "%lu %d", (unsigned long)arg1, (int)arg2); break; case event_chat_recv: + g_snprintf(buf, sizeof buf, "%lu %d \"%s\" %s", (unsigned long)arg1, + (int)arg2, (char *)arg3, (char *)arg4 ? (char *)arg4 : "(null)"); + break; case event_chat_send_invite: g_snprintf(buf, sizeof buf, "%lu %d \"%s\" %s", (unsigned long)arg1, (int)arg2, (char *)arg3, *(char **)arg4 ? *(char **)arg4 : "(null)"); |
From: Eric W. <war...@us...> - 2001-09-26 00:53:52
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv29846/plugins Modified Files: SIGNALS Log Message: hi usa Index: SIGNALS =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/SIGNALS,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- SIGNALS 2001/09/22 09:14:27 1.25 +++ SIGNALS 2001/09/26 00:53:49 1.26 @@ -303,7 +303,7 @@ 'flags' is flags on the message. event_chat_send_invite: - struct gaim_connection *gc, int id, char *who, char *msg + struct gaim_connection *gc, int id, char *who, char **msg This is called just before you're about to invite someone. It's useful for if you want to pass someone a key so that they can @@ -312,4 +312,5 @@ 'gc' is the connection the invite is sent on. 'id' is the id of the room you're inviting them to. 'who' is who you're inviting. - 'msg' is the message they'll receive when they're invited. + 'msg' is the message they'll receive when they're invited. It may be + NULL. Setting this to NULL won't stop the invitation from going thru. |
From: Eric W. <war...@us...> - 2001-09-26 00:53:52
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv29846/src Modified Files: plugins.c server.c Log Message: hi usa Index: plugins.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/plugins.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- plugins.c 2001/09/24 19:32:57 1.79 +++ plugins.c 2001/09/26 00:53:49 1.80 @@ -867,7 +867,7 @@ case event_chat_recv: case event_chat_send_invite: g_snprintf(buf, sizeof buf, "%lu %d \"%s\" %s", (unsigned long)arg1, - (int)arg2, (char *)arg3, (char *)arg4); + (int)arg2, (char *)arg3, *(char **)arg4 ? *(char **)arg4 : "(null)"); break; case event_chat_send: g_snprintf(buf, sizeof buf, "%lu %d %s", (unsigned long)arg1, (int)arg2, Index: server.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/server.c,v retrieving revision 1.191 retrieving revision 1.192 diff -u -d -r1.191 -r1.192 --- server.c 2001/09/22 09:14:27 1.191 +++ server.c 2001/09/26 00:53:49 1.192 @@ -302,9 +302,12 @@ void serv_chat_invite(struct gaim_connection *g, int id, char *message, char *name) { - plugin_event(event_chat_send_invite, g, (void *)id, name, message); + char *buffy = message && *message ? g_strdup(message) : NULL; + plugin_event(event_chat_send_invite, g, (void *)id, name, &buffy); if (g->prpl && g->prpl->chat_invite) - (*g->prpl->chat_invite)(g, id, message, name); + (*g->prpl->chat_invite)(g, id, buffy, name); + if (buffy) + g_free(buffy); } void serv_chat_leave(struct gaim_connection *g, int id) |
From: Eric W. <war...@us...> - 2001-09-25 20:00:08
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv32690 Modified Files: TODO Log Message: i feel like people are watching me Index: TODO =================================================================== RCS file: /cvsroot/gaim/gaim/TODO,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- TODO 2001/09/20 01:23:04 1.118 +++ TODO 2001/09/25 20:00:05 1.119 @@ -1,39 +1,39 @@ THE CORE: - Status labels in buddy list (mostly just for yahoo/msn) - Transparency for GtkIMHtml - Rewrite the HTML parser in GtkIMHtml GPG Encryption of messages Have plugin_event use varargs instead of void* - Better way of showing away state - and possibly in main window - Moving GTK/GDK and related things out of the prpls - TOC: file transfer (move into the core) - Away needs to be modified to include "show" and "status", i.e. you can have - an away state, and an away message. This is exactly what ICQ does - - you're "N/A" (show in Jabber) and your away message is "I'm gone." - (status in Jabber). Since it only applies to ICQ and Jabber (and - actually, currently only Jabber, since icqlib doesn't handle away - messages yet), there should be some way of indicating that it can - do both without breaking the others. My suggestion is to put "/" at - the end of the "state", and when that's there, have it be a menu with - all of the custom messages, e.g. in Jabber it'd return "Away/" as one - of the states, and you'd see "Away" with a menu of all the away - messages you have. - IRC has /list, Jabber has jabber:iq:browse, AIM has what's currently in the - "Chat Rooms" options. We should have a way (besides the prefs window) - of showing all the rooms available for each account/protocol (what's a - good way to do this? IRC it varies based on who you're connected as, - Jabber you need a connection to retrieve the list, and AIM you can get - it while you're offline.) + Separate core functions from UI stuff. + about.c, applet.[ch], away.c, conversation.c, convo.h, multi.c, + gtk*, prefs.c, prpl.c, sound.c, ticker.c + little to no work (mostly GTK) - Syd is cool and gave all of these ideas: - Have multiple tickers in the same window, one for buddies - like it is now, one for who just came online/offline - (scrolled faster possibly because that doesn't - happen very often), etc. - Have tooltips on the passing buddies on the ticker - Have a stock ticker (a plugin could easily make use of - GtkTicker) + gaimrc.c, html.c, proxy.[ch], prpl.h, server.c, util.c + little to no work (mostly CORE) + aim.c - need to redo main() completely + - current main should be moved mostly to core + - GTK main should connect to core + browser.c - let the UI deal with this? little to no work. + buddy.c - need to split into buddy.c and list.c + - buddy.c handles add/remove/rename/alias buddies + - list.c handles drawing the buddy list for GTK + buddy_chat.c - need to move out non-GTK functions. some work. + dialogs.c - need to move import/export out of here and into buddy.c + gaim.h - need to separate into core.h and ui.h. + idle.c - Need to figure out how to report idle times when there's + more than one UI + multi.h - need to separate GTK out of gaim_connection + perl.c - Uh. Might need to do some splitting. + plugins.c - Split the selection dialog with the loading/unloading + - Need to figure out how plugins are going to interact + with UIs, though UIs are separate programs. + Need to create struct buddy_chat, move struct conversation's in_room and + ignored there, and copy id and name. + Need to write the core side of the core-ui protocol + Need to add in core.c to deal with sockets, etc. (Already written) + +---- +THE PROTOCOLS: + TOC: Other RVOUS Actions @@ -51,21 +51,25 @@ New User Registration MSN: + Need to make it so txqueue is a GSList* of char* instead of char*, so + that you can "send" more than one message before you're + actually connected. This is actually a bug that it doesn't do + this already. + Need some way of indicating "invite" in IM window File Transfer IRC: - Actions (e.g. /op) - File transfer? Maybe later? + /whois, /ban, /kickban, /list, /names + DCC + CTCP Jabber: Jabber Transports (having them show up on the buddy list should be fairly easy; having an appropriate right-click menu for them should also be somewhat easy. Providing a UI for adding transports should be rather difficult.) - New Chat Method (?) Rework how subscriptions are handled Browsing - Stop using libjabber New User Registration Napster: @@ -79,6 +83,37 @@ ICQ through Oscar plugin (ICQ2000) (requires hacking libfaim :-/) this would allow us to send SMS messages. Hotline (Or is this a waste of time?. Ill decide soon enough, heh) + +---- +THE UIS: + +GTK: + Transparency for GtkIMHtml + Rewrite the HTML parser in GtkIMHtml + Moving GTK/GDK and related things out of the prpls + TOC: file transfer (move into the core) + Status labels in buddy list (mostly just for yahoo/msn) + Better way of showing away state - and possibly in main window + Away needs to be modified to include "show" and "status", i.e. you can have + an away state, and an away message. This is exactly what ICQ does - + you're "N/A" (show in Jabber) and your away message is "I'm gone." + (status in Jabber). Since it only applies to ICQ and Jabber (and + actually, currently only Jabber, since icqlib doesn't handle away + messages yet), there should be some way of indicating that it can + do both without breaking the others. My suggestion is to put "/" at + the end of the "state", and when that's there, have it be a menu with + all of the custom messages, e.g. in Jabber it'd return "Away/" as one + of the states, and you'd see "Away" with a menu of all the away + messages you have. + + Syd is cool and gave all of these ideas: + Have multiple tickers in the same window, one for buddies + like it is now, one for who just came online/offline + (scrolled faster possibly because that doesn't + happen very often), etc. + Have tooltips on the passing buddies on the ticker + Have a stock ticker (a plugin could easily make use of + GtkTicker) Then, of course, are all the Bugs that need to be fixed |
From: Eric W. <war...@us...> - 2001-09-24 21:41:23
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv5664/protocols/oscar Modified Files: oscar.c Log Message: what the hell Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- oscar.c 2001/09/22 10:08:19 1.38 +++ oscar.c 2001/09/24 21:41:19 1.39 @@ -1311,7 +1311,7 @@ file = fopen(gc->user->iconfile, "r"); if (file) { fread(buf, 1, st.st_size, file); - debug_printf("Sending buddy icon to %d\n", userinfo->sn); + debug_printf("Sending buddy icon to %s\n", userinfo->sn); aim_send_icon(sess, conn, userinfo->sn, buf, st.st_size, st.st_mtime, aim_iconsum(buf, st.st_size)); fclose(file); |
From: Eric W. <war...@us...> - 2001-09-24 20:37:43
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv20159 Modified Files: chatlist.c Log Message: khromyy put in this patch Index: chatlist.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/chatlist.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- chatlist.c 2001/09/12 18:57:46 1.2 +++ chatlist.c 2001/09/24 20:37:41 1.3 @@ -120,7 +120,7 @@ } while (fgets(buf, 1024, f)) { struct chat_room *cr = g_new0(struct chat_room, 1); - g_snprintf(cr->name, sizeof(cr->name), "%s", buf); + g_snprintf(cr->name, sizeof(cr->name), "%s", g_strchomp(buf)); if (!fgets(buf, 1024, f)) { g_free(cr); break; |
From: Eric W. <war...@us...> - 2001-09-24 19:33:01
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv3194/src Modified Files: perl.c plugins.c prpl.c Log Message: gaim.pl works like it should now Index: perl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/perl.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- perl.c 2001/09/22 09:14:27 1.56 +++ perl.c 2001/09/24 19:32:57 1.57 @@ -60,6 +60,7 @@ #undef DEBUG #endif #include "gaim.h" +#include "prpl.h" struct perlscript { char *name; @@ -302,7 +303,6 @@ XS (XS_GAIM_get_info) { int i = 0; - unsigned int junk; dXSARGS; items = 0; @@ -325,7 +325,8 @@ break; case 2: { - struct gaim_connection *gc = (struct gaim_connection *)SvPV(ST(1), junk); + struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); + debug_printf("%lu %lu\n", connections->data, gc); if (g_slist_find(connections, gc)) XST_mIV(i++, gc->protocol); else @@ -334,15 +335,18 @@ break; case 3: { - struct gaim_connection *gc = (struct gaim_connection *)SvPV(ST(1), junk); + struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); + debug_printf("%lu %lu\n", connections->data, gc); if (g_slist_find(connections, gc)) XST_mPV(i++, gc->username); else XST_mPV(i++, ""); } + break; case 4: { - struct gaim_connection *gc = (struct gaim_connection *)SvPV(ST(1), junk); + struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); + debug_printf("%lu %lu\n", connections->data, gc); if (g_slist_find(connections, gc)) XST_mIV(i++, g_list_index(aim_users, gc->user)); else @@ -369,6 +373,16 @@ } } break; + case 7: + { + struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); + debug_printf("%lu %lu\n", connections->data, gc); + if (g_slist_find(connections, gc)) + XST_mPV(i++, (*gc->prpl->name)()); + else + XST_mPV(i++, "Unknown"); + } + break; default: XST_mPV(0, "Error2"); i = 1; @@ -482,7 +496,6 @@ while (c) { gc = (struct gaim_connection *)c->data; serv_set_idle(gc, SvIV(ST(1))); - gc->is_idle = 1; c = c->next; } } else if (!strncasecmp(command, "warn", 4)) { @@ -687,7 +700,8 @@ items = 0; handler = g_new0(struct _perl_timeout_handlers, 1); - timeout = 1000 * atol(SvPV(ST(0), junk)); + timeout = 1000 * SvIV(ST(0)); + debug_printf("Adding timeout for %d seconds.\n", timeout/1000); handler->handler_name = g_strdup(SvPV(ST(1), junk)); perl_timeout_handlers = g_list_append(perl_timeout_handlers, handler); handler->iotag = gtk_timeout_add(timeout, (GtkFunction)perl_timeout, handler); Index: plugins.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/plugins.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- plugins.c 2001/09/22 09:14:27 1.78 +++ plugins.c 2001/09/24 19:32:57 1.79 @@ -831,15 +831,15 @@ case event_signoff: case event_away: case event_back: - g_snprintf(buf, sizeof buf, "%p", arg1); + g_snprintf(buf, sizeof buf, "%lu", (unsigned long)arg1); break; case event_im_recv: - g_snprintf(buf, sizeof buf, "%p \"%s\" %s", arg1, + g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, *(char **)arg2 ? *(char **)arg2 : "(null)", *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_im_send: - g_snprintf(buf, sizeof buf, "%p \"%s\" %s", arg1, + g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, (char *)arg2, *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_buddy_signon: @@ -849,31 +849,33 @@ case event_buddy_back: case event_buddy_idle: case event_buddy_unidle: - g_snprintf(buf, sizeof buf, "%p \"%s\"", arg1, (char *)arg2); + g_snprintf(buf, sizeof buf, "%lu \"%s\"", (unsigned long)arg1, (char *)arg2); break; case event_chat_invited: - g_snprintf(buf, sizeof buf, "%p \"%s\" \"%s\" %s", arg1, + g_snprintf(buf, sizeof buf, "%lu \"%s\" \"%s\" %s", (unsigned long)arg1, (char *)arg2, (char *)arg3, arg4 ? (char *)arg4 : ""); break; case event_chat_join: case event_chat_buddy_join: case event_chat_buddy_leave: - g_snprintf(buf, sizeof buf, "%p %d \"%s\"", arg1, (int)arg2, (char *)arg3); + g_snprintf(buf, sizeof buf, "%lu %d \"%s\"", (unsigned long)arg1, + (int)arg2, (char *)arg3); break; case event_chat_leave: - g_snprintf(buf, sizeof buf, "%p %d", arg1, (int)arg2); + g_snprintf(buf, sizeof buf, "%lu %d", (unsigned long)arg1, (int)arg2); break; case event_chat_recv: case event_chat_send_invite: - g_snprintf(buf, sizeof buf, "%p %d \"%s\" %s", arg1, + g_snprintf(buf, sizeof buf, "%lu %d \"%s\" %s", (unsigned long)arg1, (int)arg2, (char *)arg3, (char *)arg4); break; case event_chat_send: - g_snprintf(buf, sizeof buf, "%p %d %s", arg1, (int)arg2, + g_snprintf(buf, sizeof buf, "%lu %d %s", (unsigned long)arg1, (int)arg2, *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_warned: - g_snprintf(buf, sizeof buf, "%p \"%s\" %d", arg1, arg2 ? (char *)arg2 : "", (int)arg3); + g_snprintf(buf, sizeof buf, "%lu \"%s\" %d", (unsigned long)arg1, + arg2 ? (char *)arg2 : "", (int)arg3); break; case event_quit: buf[0] = 0; @@ -882,11 +884,11 @@ g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg1); break; case event_im_displayed_sent: - g_snprintf(buf, sizeof buf, "%p \"%s\" %s", arg1, + g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, (char *)arg2, *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_im_displayed_rcvd: - g_snprintf(buf, sizeof buf, "%p \"%s\" %s", arg1, + g_snprintf(buf, sizeof buf, "%lu \"%s\" %s", (unsigned long)arg1, (char *)arg2, (char *)arg3 ? (char *)arg3 : "(null)"); break; default: Index: prpl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/prpl.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- prpl.c 2001/09/15 19:32:51 1.32 +++ prpl.c 2001/09/24 19:32:57 1.33 @@ -376,6 +376,7 @@ gtk_widget_show(gc->email_label); close = picture_button(gc->email_win, _("Close"), cancel_xpm); + gtk_window_set_focus(GTK_WINDOW(gc->email_win), close); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->action_area), close, 0, 0, 5); gtk_signal_connect(GTK_OBJECT(close), "clicked", @@ -405,6 +406,7 @@ gtk_widget_show(gc->email_label); close = picture_button(gc->email_win, _("Close"), cancel_xpm); + gtk_window_set_focus(GTK_WINDOW(gc->email_win), close); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(gc->email_win)->action_area), close, 0, 0, 5); gtk_signal_connect(GTK_OBJECT(close), "clicked", |
From: Eric W. <war...@us...> - 2001-09-24 19:33:01
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv3194/plugins Modified Files: PERL-HOWTO gaim.pl Log Message: gaim.pl works like it should now Index: PERL-HOWTO =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/PERL-HOWTO,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- PERL-HOWTO 2001/09/22 09:14:27 1.9 +++ PERL-HOWTO 2001/09/24 19:32:57 1.10 @@ -45,6 +45,7 @@ 4 - given a connection index, the index in the users list 5 - the list of names of users 6 - the list of protocols of the users + 7 - given a connection index, the name of the protocol (as a string) GAIM::print(title, message) This displays a nice little dialog window. Index: gaim.pl =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/gaim.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gaim.pl 2001/03/03 06:19:19 1.2 +++ gaim.pl 2001/09/24 19:32:57 1.3 @@ -1,24 +1,30 @@ GAIM::register("gaim test", "0.0.1", "goodbye", ""); $ver = GAIM::get_info(0); -$nam = GAIM::get_info(1); -$pro = GAIM::get_info(2, $nam); +@ids = GAIM::get_info(1); -GAIM::print("Perl Says", "Gaim $ver, $nam using $pro"); +$msg = "Gaim $ver:"; +foreach $id (@ids) { + $pro = GAIM::get_info(7, $id); + $nam = GAIM::get_info(3, $id); + $msg .= "\n$nam using $pro"; +} -GAIM::command("idle", 60000); +GAIM::print("Perl Says", $msg); -GAIM::add_event_handler("event_buddy_signon", "say_hello"); -GAIM::add_timeout_handler(600, "notify"); +GAIM::command("idle", 6000); +GAIM::add_event_handler("event_buddy_signon", "echo_reply"); +GAIM::add_timeout_handler(60, "notify"); + sub echo_reply { - $args = @_; - $args =~ s/\"//g; - GAIM::print_to_conv($args, "Hello"); + $args = $_[0]; + $args =~ s/(.+) \"(.+)\"//; + GAIM::print_to_conv($1, $2, "Hello", 0); } sub notify { - GAIM::print("10 minutes", "gaim test has been loaded for 10 minutes"); + GAIM::print("1 minute", "gaim test has been loaded for 1 minute"); } sub goodbye { |
From: Eric W. <war...@us...> - 2001-09-24 16:49:36
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv7176 Modified Files: ChangeLog Log Message: how did i miss this? Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.303 retrieving revision 1.304 diff -u -d -r1.303 -r1.304 --- ChangeLog 2001/09/22 11:35:00 1.303 +++ ChangeLog 2001/09/24 16:49:32 1.304 @@ -1,6 +1,7 @@ GAIM: The Pimpin' Penguin IM Clone thats good for the soul! version 0.45: + * New plugin event: event_chat_send_invite * Major updates to the perl system (reread PERL-HOWTO and SIGNALS) * Major updates to event_chat_* events for plugins (reread |
From: Eric W. <war...@us...> - 2001-09-24 16:35:30
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv3503 Modified Files: lagmeter.c Log Message: what the hell? Index: lagmeter.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/lagmeter.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- lagmeter.c 2001/09/23 20:32:16 1.14 +++ lagmeter.c 2001/09/24 16:35:27 1.15 @@ -87,11 +87,11 @@ char *m = g_strdup(MY_LAG_STRING); if (my_gc->protocol == PROTO_JABBER) { if (!strchr(my_gc->username, '@')) { - char buf = g_strconcat(my_gc->username, "@jabber.org/GAIM", NULL); + char *buf = g_strconcat(my_gc->username, "@jabber.org/GAIM", NULL); serv_send_im(my_gc, buf, m, 1); g_free(buf); } else if (!strchr(my_gc->username, '/')) { - char buf = g_strconcat(my_gc->username, "@jabber.org/GAIM", NULL); + char *buf = g_strconcat(my_gc->username, "@jabber.org/GAIM", NULL); serv_send_im(my_gc, buf, m, 1); g_free(buf); } else |
From: Eric W. <war...@us...> - 2001-09-23 20:32:33
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv13766 Modified Files: gaimrc.c Log Message: what the hell? Index: gaimrc.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaimrc.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- gaimrc.c 2001/09/20 04:50:50 1.78 +++ gaimrc.c 2001/09/23 20:32:30 1.79 @@ -731,6 +731,22 @@ } + if (conv_size.width == 0 && + conv_size.height == 0 && + conv_size.entry_height == 0) { + conv_size.width = 320; + conv_size.height = 175; + conv_size.entry_height = 50; + } + + if (buddy_chat_size.width == 0 && + buddy_chat_size.height == 0 && + buddy_chat_size.entry_height == 0) { + buddy_chat_size.width = 320; + buddy_chat_size.height = 160; + buddy_chat_size.entry_height = 50; + } + if (read_general) { if (!read_logging) { logging_options = 0; |
From: Eric W. <war...@us...> - 2001-09-23 20:32:19
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv13731 Modified Files: lagmeter.c Log Message: handle jabber better. sigh. Index: lagmeter.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/lagmeter.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- lagmeter.c 2001/06/02 02:58:03 1.13 +++ lagmeter.c 2001/09/23 20:32:16 1.14 @@ -1,5 +1,6 @@ #define GAIM_PLUGINS #include "gaim.h" +#include "prpl.h" #include <time.h> #include <sys/types.h> @@ -84,7 +85,19 @@ gettimeofday(&my_lag_tv, NULL); if (g_slist_find(connections, my_gc)) { char *m = g_strdup(MY_LAG_STRING); - serv_send_im(my_gc, my_gc->username, m, 1); + if (my_gc->protocol == PROTO_JABBER) { + if (!strchr(my_gc->username, '@')) { + char buf = g_strconcat(my_gc->username, "@jabber.org/GAIM", NULL); + serv_send_im(my_gc, buf, m, 1); + g_free(buf); + } else if (!strchr(my_gc->username, '/')) { + char buf = g_strconcat(my_gc->username, "@jabber.org/GAIM", NULL); + serv_send_im(my_gc, buf, m, 1); + g_free(buf); + } else + serv_send_im(my_gc, my_gc->username, m, 1); + } else + serv_send_im(my_gc, my_gc->username, m, 1); g_free(m); return TRUE; } else { |
From: Eric W. <war...@us...> - 2001-09-22 11:35:03
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv21348 Modified Files: ChangeLog Log Message: I have an Abba song stuck in my head but I don't know what it's called or what any of the words are, except "Take a chance on me". Just that one line, over and over and over and over. And all because my sound card driver doesn't work and I'm too lazy to switch the speakers from blue back to penguin. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.302 retrieving revision 1.303 diff -u -d -r1.302 -r1.303 --- ChangeLog 2001/09/22 09:14:27 1.302 +++ ChangeLog 2001/09/22 11:35:00 1.303 @@ -5,6 +5,8 @@ SIGNALS) * Major updates to event_chat_* events for plugins (reread SIGNALS) + * Some GtkIMHtml improvements + * Various bugfixes version 0.44 (09/20/2001): * More sane scaling of buddy icons (intelligently scale to |
From: Eric W. <war...@us...> - 2001-09-22 11:35:03
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv21348/src Modified Files: buddy_chat.c Log Message: I have an Abba song stuck in my head but I don't know what it's called or what any of the words are, except "Take a chance on me". Just that one line, over and over and over and over. And all because my sound card driver doesn't work and I'm too lazy to switch the speakers from blue back to penguin. Index: buddy_chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v retrieving revision 1.112 retrieving revision 1.113 diff -u -d -r1.112 -r1.113 --- buddy_chat.c 2001/09/22 09:25:11 1.112 +++ buddy_chat.c 2001/09/22 11:35:00 1.113 @@ -604,7 +604,10 @@ gtk_menu_append(GTK_MENU(menu), button); gtk_widget_show(button); - button = gtk_menu_item_new_with_label(_("Ignore")); + if (g_list_find_custom(b->ignored, gtk_object_get_user_data(obj), (GCompareFunc)strcmp)) + button = gtk_menu_item_new_with_label(_("Un-Ignore")); + else + button = gtk_menu_item_new_with_label(_("Ignore")); gtk_signal_connect(GTK_OBJECT(button), "activate", GTK_SIGNAL_FUNC(chat_press_ign), b); gtk_object_set_user_data(GTK_OBJECT(button), obj); gtk_menu_append(GTK_MENU(menu), button); @@ -834,6 +837,8 @@ gtk_list_insert_items(GTK_LIST(b->list), g_list_append(NULL, list_item), pos); gtk_widget_destroy(i->data); gtk_widget_show(list_item); + gtk_signal_connect(GTK_OBJECT(list_item), "button_press_event", + GTK_SIGNAL_FUNC(right_click_chat), b); } static gint delete_all_chats(GtkWidget *w, GdkEventAny *e, gpointer d) |
From: Eric W. <war...@us...> - 2001-09-22 11:23:02
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv19682 Modified Files: gtkimhtml.c gtkimhtml.h Log Message: (Names changed to protect the innocent.) blue:~/gaim/app/src $ ls -l ~/.gaim/logs/mid.log -rw-r--r-- 1 eric eric 607043 Sep 20 03:28 /home/eric/.gaim/logs/mid.log Previously on my 1.4GHz Athlon, displaying this 600k log file in the Log Viewer took 42 seconds: time start: 1001157353 time end : 1001157395 Now, with the new smiley checker, it takes 23: time start: 1001157199 time end : 1001157222 That's still horrible, but it's only a little more than half the time it previously took. Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- gtkimhtml.c 2001/09/22 10:36:29 1.51 +++ gtkimhtml.c 2001/09/22 11:22:59 1.52 @@ -73,6 +73,161 @@ typedef struct _GtkIMHtmlBit GtkIMHtmlBit; typedef struct _FontDetail FontDetail; +struct _GtkSmileyTree { + GString *values; + GtkSmileyTree **children; + gchar **image; +}; + +static GtkSmileyTree* +gtk_smiley_tree_new () +{ + return g_new0 (GtkSmileyTree, 1); +} + +static void +gtk_smiley_tree_insert (GtkSmileyTree *tree, + const gchar *text, + gchar **image) +{ + GtkSmileyTree *t = tree; + const gchar *x = text; + + if (!strlen (x)) + return; + + while (*x) { + gchar *pos; + gint index; + + if (!t->values) + t->values = g_string_new (""); + + pos = strchr (t->values->str, *x); + if (!pos) { + t->values = g_string_append_c (t->values, *x); + index = t->values->len - 1; + t->children = g_realloc (t->children, t->values->len * sizeof (GtkSmileyTree *)); + t->children [index] = g_new0 (GtkSmileyTree, 1); + } else + index = (int) pos - (int) t->values->str; + + t = t->children [index]; + + x++; + } + + t->image = image; +} + +static void +gtk_smiley_tree_remove (GtkSmileyTree *tree, + const gchar *text) +{ + GtkSmileyTree *t = tree; + const gchar *x = text; + gint len = 0; + + while (*x) { + gchar *pos; + + if (t->image) { + t->image = NULL; + return; + } + + if (!t->values) + return; + + pos = strchr (t->values->str, *x); + if (pos) + t = t->children [(int) pos - (int) t->values->str]; + else + return; + + x++; len++; + } + + if (t->image) + t->image = NULL; +} + +static gint +gtk_smiley_tree_lookup (GtkSmileyTree *tree, + const gchar *text) +{ + GtkSmileyTree *t = tree; + const gchar *x = text; + gint len = 0; + + while (*x) { + gchar *pos; + + if (t->image) + return len; + + if (!t->values) + return 0; + + pos = strchr (t->values->str, *x); + if (pos) + t = t->children [(int) pos - (int) t->values->str]; + else + return 0; + + x++; len++; + } + + if (t->image) + return len; + + return 0; +} + +static gchar** +gtk_smiley_tree_image (GtkSmileyTree *tree, + const gchar *text) +{ + GtkSmileyTree *t = tree; + const gchar *x = text; + + while (*x) { + gchar *pos; + + if (!t->values) + return NULL; + + pos = strchr (t->values->str, *x); + if (pos) { + t = t->children [(int) pos - (int) t->values->str]; + } else + return NULL; + + x++; + } + + return t->image; +} + +static void +gtk_smiley_tree_destroy (GtkSmileyTree *tree) +{ + GSList *list = g_slist_append (NULL, tree); + + while (list) { + GtkSmileyTree *t = list->data; + gint i; + list = g_slist_remove(list, t); + if (t->values) { + for (i = 0; i < t->values->len; i++) + list = g_slist_append (list, t->children [i]); + g_string_free (t->values, TRUE); + g_free (t->children); + } + g_free (t); + } +} + struct _GtkIMHtmlBit { gint type; @@ -200,9 +355,7 @@ gdk_cursor_destroy (imhtml->hand_cursor); gdk_cursor_destroy (imhtml->arrow_cursor); - g_hash_table_destroy (imhtml->smiley_hash); - if (imhtml->smiley_start) - g_string_free (imhtml->smiley_start, TRUE); + gtk_smiley_tree_destroy (imhtml->smiley_data); if (GTK_OBJECT_CLASS (parent_class)->destroy != NULL) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); @@ -1797,12 +1950,12 @@ } static void -gtk_imhtml_init_smiley_hash (GtkIMHtml *imhtml) +gtk_imhtml_init_smileys (GtkIMHtml *imhtml) { g_return_if_fail (imhtml != NULL); g_return_if_fail (GTK_IS_IMHTML (imhtml)); - imhtml->smiley_hash = g_hash_table_new (g_str_hash, g_str_equal); + imhtml->smiley_data = gtk_smiley_tree_new (); gtk_imhtml_associate_smiley (imhtml, ":)", smile_xpm); gtk_imhtml_associate_smiley (imhtml, ":-)", smile_xpm); @@ -1858,9 +2011,7 @@ imhtml->smileys = TRUE; imhtml->comments = FALSE; - imhtml->smin = G_MAXINT; - imhtml->smax = 0; - gtk_imhtml_init_smiley_hash (imhtml); + gtk_imhtml_init_smileys (imhtml); return GTK_WIDGET (imhtml); } @@ -1922,22 +2073,10 @@ g_return_if_fail (GTK_IS_IMHTML (imhtml)); g_return_if_fail (text != NULL); - if (strlen (text) < imhtml->smin) - imhtml->smin = strlen (text); - - if (strlen (text) > imhtml->smax) - imhtml->smax = strlen (text); - - if (!imhtml->smiley_start) - imhtml->smiley_start = g_string_new (""); - - if (!strchr (imhtml->smiley_start->str, text [0])) - imhtml->smiley_start = g_string_append_c (imhtml->smiley_start, text [0]); - if (xpm == NULL) - g_hash_table_remove (imhtml->smiley_hash, text); + gtk_smiley_tree_remove (imhtml->smiley_data, text); else - g_hash_table_insert (imhtml->smiley_hash, text, xpm); + gtk_smiley_tree_insert (imhtml->smiley_data, text, xpm); } static void @@ -2248,32 +2387,7 @@ gtk_imhtml_is_smiley (GtkIMHtml *imhtml, const gchar *text) { - gchar *tmp; - gint i; - - g_return_val_if_fail (imhtml != NULL, 0); - g_return_val_if_fail (GTK_IS_IMHTML (imhtml), 0); - g_return_val_if_fail (text != NULL, 0); - - if (!imhtml->smiley_start || !strchr (imhtml->smiley_start->str, text [0])) - return 0; - - tmp = g_malloc (imhtml->smax + 1); - - for (i = imhtml->smin; i <= imhtml->smax; i++) { - if (strlen (text) < i) { - g_free (tmp); - return 0; - } - g_snprintf (tmp, i + 1, "%s", text); - if (g_hash_table_lookup (imhtml->smiley_hash, tmp)) { - g_free (tmp); - return i; - } - } - - g_free (tmp); - return 0; + return gtk_smiley_tree_lookup (imhtml->smiley_data, text); } static GtkIMHtmlBit * @@ -2351,7 +2465,7 @@ bit->pm = gdk_pixmap_create_from_xpm_d (GTK_WIDGET (imhtml)->window, &bit->bm, clr, - g_hash_table_lookup (imhtml->smiley_hash, text)); + gtk_smiley_tree_image (imhtml->smiley_data, text)); } return bit; Index: gtkimhtml.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- gtkimhtml.h 2001/04/30 13:12:42 1.6 +++ gtkimhtml.h 2001/09/22 11:22:59 1.7 @@ -37,6 +37,8 @@ typedef gchar** (*GtkIMHtmlImage) (gchar *url); +typedef struct _GtkSmileyTree GtkSmileyTree; + typedef struct _GtkIMHtml GtkIMHtml; typedef struct _GtkIMHtmlClass GtkIMHtmlClass; @@ -74,9 +76,7 @@ gboolean smileys; gboolean comments; - GHashTable *smiley_hash; - GString *smiley_start; - gint smin, smax; + GtkSmileyTree *smiley_data; }; struct _GtkIMHtmlClass { |
From: Eric W. <war...@us...> - 2001-09-22 10:36:33
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv13960 Modified Files: gtkimhtml.c Log Message: this renders selection better. i still need to rewrite the parser though. parsing for smileys is currently the most expensive thing but the rest of the parser could use some work (parsing tags twice is not good). Index: gtkimhtml.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkimhtml.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- gtkimhtml.c 2001/09/21 01:58:44 1.50 +++ gtkimhtml.c 2001/09/22 10:36:29 1.51 @@ -771,7 +771,7 @@ draw_img (imhtml, chunk); else if ((bit->type == TYPE_SEP) && (bit->chunks->data == chunk)) draw_line (imhtml, chunk); - else + else if (chunk->width) draw_text (imhtml, chunk); } @@ -1017,7 +1017,7 @@ draw_img (imhtml, chunk); else if ((bit->type == TYPE_SEP) && (bit->chunks->data == chunk)) draw_line (imhtml, chunk); - else + else if (chunk->width) draw_text (imhtml, chunk); redraw = FALSE; } @@ -1059,7 +1059,7 @@ else if ((bit->type == TYPE_SEP) && (bit->chunks->data == chunk)) draw_line (imhtml, chunk); - else + else if (chunk->width) draw_text (imhtml, chunk); } } |
From: Eric W. <war...@us...> - 2001-09-22 10:08:23
|
Update of /cvsroot/gaim/gaim/src/protocols/oscar In directory usw-pr-cvs1:/tmp/cvs-serv10059/protocols/oscar Modified Files: oscar.c Log Message: Sorry rob. I just don't think that you should be committing what you know is half-complete code, and allow users to access it. We can't be recommending to people to be using CVS instead of releases and then add things that we know beforehand are buggy or incomplete. Also I don't think that you've implemented it properly: More than just Oscar have buddy icons (though Jabber is reworking their buddy icon stuff) and so it shouldn't be protocol-specific like this; also it should apply to the aim_user and not the gaim_connection, and you should be able to set it while you're not online, which means it should go in the Modify Account dialog and not the Protocol Actions dialog, with an OPT_PROTO_BUDDY_ICON flag so that the dialog knows whether or not the buddy icon can be set. Also, you broke -Wall. Index: oscar.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/oscar/oscar.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- oscar.c 2001/09/22 07:02:30 1.37 +++ oscar.c 2001/09/22 10:08:19 1.38 @@ -2634,8 +2634,6 @@ if (!strcmp(act, "Set User Info")) { show_set_info(gc); - } else if (!strcmp(act, "Set Buddy Icon")) { - show_set_icon(gc); } else if (!strcmp(act, "Change Password")) { show_change_passwd(gc); } else if (!strcmp(act, "Confirm Account")) { @@ -2661,7 +2659,6 @@ GList *m = NULL; m = g_list_append(m, "Set User Info"); - m = g_list_append(m, "Set Buddy Icon"); m = g_list_append(m, NULL); m = g_list_append(m, "Change Password"); m = g_list_append(m, "Confirm Account"); |
From: Eric W. <war...@us...> - 2001-09-22 09:25:14
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv4822 Modified Files: buddy_chat.c Log Message: this bothered me. Index: buddy_chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -r1.111 -r1.112 --- buddy_chat.c 2001/09/22 09:14:27 1.111 +++ buddy_chat.c 2001/09/22 09:25:11 1.112 @@ -141,13 +141,13 @@ gtk_object_set_user_data(GTK_OBJECT(spin), (void *)1); chatentries = g_list_append(chatentries, spin); gtk_widget_set_usize(spin, 50, -1); - gtk_box_pack_start(GTK_BOX(rowbox), spin, FALSE, FALSE, 0); + gtk_box_pack_end(GTK_BOX(rowbox), spin, FALSE, FALSE, 0); gtk_widget_show(spin); } else { GtkWidget *entry; entry = gtk_entry_new(); chatentries = g_list_append(chatentries, entry); - gtk_box_pack_start(GTK_BOX(rowbox), entry, TRUE, TRUE, 0); + gtk_box_pack_end(GTK_BOX(rowbox), entry, FALSE, FALSE, 0); if (pce->def) gtk_entry_set_text(GTK_ENTRY(entry), pce->def); if (focus) { |
From: Eric W. <war...@us...> - 2001-09-22 09:14:30
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv3080/src Modified Files: buddy_chat.c conversation.c gaim.h perl.c plugins.c server.c Log Message: you say potato, i say potato you say tomato, i say tomato potato, potato tomato, tomato let's call the whole thing off. *sigh*. it just doesn't work as well when it's typed. but you wouldn't want to hear me sing it. Index: buddy_chat.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/buddy_chat.c,v retrieving revision 1.110 retrieving revision 1.111 diff -u -d -r1.110 -r1.111 --- buddy_chat.c 2001/09/20 01:20:29 1.110 +++ buddy_chat.c 2001/09/22 09:14:27 1.111 @@ -633,7 +633,7 @@ int pos; GList *ignored; - plugin_event(event_chat_buddy_join, b->gc, b->name, name, 0); + plugin_event(event_chat_buddy_join, b->gc, (void *)b->id, name, 0); b->in_room = g_list_insert_sorted(b->in_room, name, insertname); pos = g_list_index(b->in_room, name); @@ -739,7 +739,7 @@ char tmp[BUF_LONG]; - plugin_event(event_chat_buddy_leave, b->gc, b->name, buddy, 0); + plugin_event(event_chat_buddy_leave, b->gc, (void *)b->id, buddy, 0); while (names) { if (!g_strcasecmp((char *)names->data, buddy)) { Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.262 retrieving revision 1.263 diff -u -d -r1.262 -r1.263 --- conversation.c 2001/09/21 17:51:13 1.262 +++ conversation.c 2001/09/22 09:14:27 1.263 @@ -847,7 +847,9 @@ { char *buffy = g_strdup(buf); enum gaim_event evnt = c->is_chat ? event_chat_send : event_im_send; - int plugin_return = plugin_event(evnt, c->gc, c->name, &buffy, 0); + int plugin_return = plugin_event(evnt, c->gc, + c->is_chat ? (void *)c->id : c->name, + &buffy, 0); if (!buffy) { g_free(buf2); g_free(buf); Index: gaim.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/gaim.h,v retrieving revision 1.260 retrieving revision 1.261 diff -u -d -r1.260 -r1.261 --- gaim.h 2001/09/21 00:14:12 1.260 +++ gaim.h 2001/09/22 09:14:27 1.261 @@ -212,6 +212,7 @@ event_draw_menu, event_im_displayed_sent, event_im_displayed_rcvd, + event_chat_send_invite, /* any others? it's easy to add... */ }; @@ -810,7 +811,6 @@ extern void gaim_signal_disconnect(GModule *, enum gaim_event, void *); extern void gaim_plugin_unload(GModule *); #endif -extern char *event_name(enum gaim_event); extern int plugin_event(enum gaim_event, void *, void *, void *, void *); extern void remove_all_plugins(); Index: perl.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/perl.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- perl.c 2001/09/20 19:09:42 1.55 +++ perl.c 2001/09/22 09:14:27 1.56 @@ -306,7 +306,7 @@ dXSARGS; items = 0; - switch(atoi(SvPV(ST(0), junk))) { + switch(SvIV(ST(0))) { case 0: XST_mPV(0, VERSION); i = 1; @@ -318,26 +318,57 @@ while (c) { gc = (struct gaim_connection *)c->data; - XST_mPV(i++, gc->username); + XST_mIV(i++, (guint)gc); c = c->next; } } break; case 2: { - GList *u = aim_users; - struct aim_user *a; - char *name = g_strdup(normalize(SvPV(ST(1), junk))); - - while (u) { - a = (struct aim_user *)u->data; - if (!strcasecmp(normalize(a->username), name)) - XST_mIV(i++, a->protocol); - u = u->next; + struct gaim_connection *gc = (struct gaim_connection *)SvPV(ST(1), junk); + if (g_slist_find(connections, gc)) + XST_mIV(i++, gc->protocol); + else + XST_mIV(i++, -1); + } + break; + case 3: + { + struct gaim_connection *gc = (struct gaim_connection *)SvPV(ST(1), junk); + if (g_slist_find(connections, gc)) + XST_mPV(i++, gc->username); + else + XST_mPV(i++, ""); + } + case 4: + { + struct gaim_connection *gc = (struct gaim_connection *)SvPV(ST(1), junk); + if (g_slist_find(connections, gc)) + XST_mIV(i++, g_list_index(aim_users, gc->user)); + else + XST_mIV(i++, -1); + } + break; + case 5: + { + GList *a = aim_users; + while (a) { + struct aim_user *u = a->data; + XST_mPV(i++, u->username); + a = a->next; } - g_free(name); } break; + case 6: + { + GList *a = aim_users; + while (a) { + struct aim_user *u = a->data; + XST_mIV(i++, u->protocol); + a = a->next; + } + } + break; default: XST_mPV(0, "Error2"); i = 1; @@ -362,20 +393,18 @@ XS (XS_GAIM_buddy_list) { - char *acct; struct gaim_connection *gc; struct buddy *buddy; struct group *g; GSList *list = NULL; GSList *mem; int i = 0; - unsigned int junk; dXSARGS; items = 0; - acct = SvPV(ST(0), junk); - gc = find_gaim_conn_by_name(acct); - if (gc) list = gc->groups; + gc = (struct gaim_connection *)SvIV(ST(0)); + if (g_slist_find(connections, gc)) + list = gc->groups; while (list) { g = (struct group *)list->data; @@ -392,20 +421,18 @@ XS (XS_GAIM_online_list) { - char *acct; struct gaim_connection *gc; struct buddy *b; struct group *g; GSList *list = NULL; GSList *mem; int i = 0; - unsigned int junk; dXSARGS; items = 0; - acct = SvPV(ST(0), junk); - gc = find_gaim_conn_by_name(acct); - if (gc) list = gc->groups; + gc = (struct gaim_connection *)SvIV(ST(0)); + if (g_slist_find(connections, gc)) + list = gc->groups; while (list) { g = (struct group *)list->data; @@ -430,22 +457,17 @@ command = SvPV(ST(0), junk); if (!command) XSRETURN(0); if (!strncasecmp(command, "signon", 6)) { - char *who = SvPV(ST(1), junk); - struct aim_user *u = find_user(who, -1); - if (u) serv_login(u); + int index = SvIV(ST(1)); + if (g_list_nth_data(aim_users, index)) + serv_login(g_list_nth_data(aim_users, index)); } else if (!strncasecmp(command, "signoff", 7)) { - char *who = SvPV(ST(1), junk); - struct gaim_connection *gc = find_gaim_conn_by_name(who); - if (gc) signoff(gc); + struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); + if (g_slist_find(connections, gc)) signoff(gc); else signoff_all(NULL, NULL); } else if (!strncasecmp(command, "info", 4)) { - GSList *c = connections; - struct gaim_connection *gc; - while (c) { - gc = (struct gaim_connection *)c->data; - serv_set_info(gc, SvPV(ST(1), junk)); - c = c->next; - } + struct gaim_connection *gc = (struct gaim_connection *)SvIV(ST(1)); + if (g_slist_find(connections, gc)) + serv_set_info(gc, SvPV(ST(2), junk)); } else if (!strncasecmp(command, "away", 4)) { char *message = SvPV(ST(1), junk); static struct away_message a; @@ -459,7 +481,7 @@ while (c) { gc = (struct gaim_connection *)c->data; - serv_set_idle(gc, atoi(SvPV(ST(1), junk))); + serv_set_idle(gc, SvIV(ST(1))); gc->is_idle = 1; c = c->next; } @@ -469,7 +491,7 @@ while (c) { gc = (struct gaim_connection *)c->data; - serv_warn(gc, SvPV(ST(1), junk), atoi(SvPV(ST(2), junk))); + serv_warn(gc, SvPV(ST(1), junk), SvIV(ST(2))); c = c->next; } } @@ -479,23 +501,16 @@ XS (XS_GAIM_user_info) { - GSList *c = connections; struct gaim_connection *gc; unsigned int junk; struct buddy *buddy = NULL; - char *nick; dXSARGS; items = 0; - nick = SvPV(ST(0), junk); - if (!nick[0]) - XSRETURN(0); - while (c) { - gc = (struct gaim_connection *)c->data; - buddy = find_buddy(gc, nick); - if (buddy) c = NULL; - else c = c->next; - } + gc = (struct gaim_connection *)SvIV(ST(0)); + if (g_slist_find(connections, gc)) + buddy = find_buddy(gc, SvPV(ST(1), junk)); + if (!buddy) XSRETURN(0); XST_mPV(0, buddy->name); @@ -519,7 +534,7 @@ items = 0; nick = SvPV(ST(0), junk); - send = atoi(SvPV(ST(1), junk)); + send = SvIV(ST(1)); what = SvPV(ST(2), junk); who = SvPV(ST(3), junk); @@ -537,69 +552,86 @@ c = new_conversation(nick); write_to_conv(c, what, wflags, who, time((time_t)NULL)); + XSRETURN(0); } XS (XS_GAIM_serv_send_im) { - char *nick, *what, *isauto; + struct gaim_connection *gc; + char *nick, *what; + int isauto; int junk; dXSARGS; items = 0; - nick = SvPV(ST(0), junk); - what = SvPV(ST(1), junk); - isauto = SvPV(ST(2), junk); + gc = (struct gaim_connection *)SvIV(ST(0)); + nick = SvPV(ST(1), junk); + what = SvPV(ST(2), junk); + isauto = SvIV(ST(3)); - if (!connections) + if (!g_slist_find(connections, gc)) { + XSRETURN(0); return; - serv_send_im(connections->data, nick, what, atoi(isauto)); + } + serv_send_im(connections->data, nick, what, isauto); + XSRETURN(0); } XS (XS_GAIM_print_to_conv) { - char *nick, *what, *isauto; + struct gaim_connection *gc; + char *nick, *what; + int isauto; struct conversation *c; unsigned int junk; dXSARGS; items = 0; - nick = SvPV(ST(0), junk); - what = SvPV(ST(1), junk); - isauto = SvPV(ST(2), junk); + gc = (struct gaim_connection *)SvIV(ST(0)); + nick = SvPV(ST(1), junk); + what = SvPV(ST(2), junk); + isauto = SvIV(ST(3)); + if (!g_slist_find(connections, gc)) { + XSRETURN(0); + return; + } c = find_conversation(nick); if (!c) c = new_conversation(nick); write_to_conv(c, what, WFLAG_SEND, NULL, time((time_t)NULL)); - serv_send_im(c->gc, nick, what, atoi(isauto) ? IM_FLAG_AWAY : 0); + serv_send_im(c->gc, nick, what, isauto ? IM_FLAG_AWAY : 0); + XSRETURN(0); } XS (XS_GAIM_print_to_chat) { - char *nick, *what, *tmp; - GSList *c = connections; struct gaim_connection *gc; + int id; + char *what; struct conversation *b = NULL; GSList *bcs; unsigned int junk; dXSARGS; items = 0; - nick = SvPV(ST(0), junk); - what = SvPV(ST(1), junk); - tmp = g_strdup(normalize(nick)); - while (c) { - gc = (struct gaim_connection *)c->data; - bcs = gc->buddy_chats; - while (bcs) { - b = (struct conversation *)bcs->data; - if (!strcmp(normalize(b->name), tmp)) - break; - bcs = bcs->next; - b = NULL; - } - serv_chat_send(b->gc, b->id, what); - c = c->next; + gc = (struct gaim_connection *)SvIV(ST(0)); + id = SvIV(ST(1)); + what = SvPV(ST(2), junk); + + if (!g_slist_find(connections, gc)) { + XSRETURN(0); + return; } + bcs = gc->buddy_chats; + while (bcs) { + b = (struct conversation *)bcs->data; + if (b->id == id) + break; + bcs = bcs->next; + b = NULL; + } + if (b) + serv_chat_send(gc, id, what); XSRETURN(0); } Index: plugins.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/plugins.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- plugins.c 2001/09/13 22:57:53 1.77 +++ plugins.c 2001/09/22 09:14:27 1.78 @@ -645,7 +645,7 @@ #endif /* GAIM_PLUGINS */ -char *event_name(enum gaim_event event) +static char *event_name(enum gaim_event event) { static char buf[128]; switch (event) { @@ -733,6 +733,9 @@ case event_im_displayed_rcvd: sprintf(buf, "event_im_displayed_rcvd"); break; + case event_chat_send_invite: + sprintf(buf, "event_chat_send_invite"); + break; default: sprintf(buf, "event_unknown"); break; @@ -744,134 +747,74 @@ { #ifdef USE_PERL char buf[BUF_LONG]; - char *tmp; #endif #ifdef GAIM_PLUGINS GList *c = callbacks; struct gaim_callback *g; while (c) { + void (*zero)(void *); + void (*one)(void *, void *); + void (*two)(void *, void *, void *); + void (*three)(void *, void *, void *, void *); + void (*four)(void *, void *, void *, void *, void *); + g = (struct gaim_callback *)c->data; if (g->event == event && g->function !=NULL) { switch (event) { - /* struct gaim_connection * */ - case event_signon: - case event_signoff: - { - void (*function) (struct gaim_connection *, void *) = - g->function; - (*function)(arg1, g->data); - } - break; - /* no args */ case event_blist_update: case event_quit: - { - void (*function)(void *) = g->function; - (*function)(g->data); - } - break; - - /* struct gaim_connection *, char **, char **, guint32 */ - case event_im_recv: - { - void (*function)(struct gaim_connection *, char **, char **, - guint32, void *) = g->function; - (*function)(arg1, arg2, arg3, (guint32)arg4, g->data); - } + zero = g->function; + (*zero)(g->data); break; - /* struct gaim_connection *, char *, char ** */ - case event_im_send: - case event_im_displayed_sent: - case event_chat_send: - { - void (*function)(struct gaim_connection *, char *, char **, - void *) = g->function; - (*function)(arg1, arg2, arg3, g->data); - } + /* one arg */ + case event_signon: + case event_signoff: + case event_new_conversation: + case event_error: + one = g->function; + (*one)(arg1, g->data); break; - /* struct gaim_connection *, char * */ - case event_chat_join: - case event_chat_leave: + /* two args */ case event_buddy_signon: case event_buddy_signoff: case event_buddy_away: case event_buddy_back: case event_buddy_idle: case event_buddy_unidle: + case event_chat_leave: case event_set_info: - { - void (*function)(struct gaim_connection *, char *, void *) = - g->function; - (*function)(arg1, arg2, g->data); - } - break; - - /* char * */ - case event_new_conversation: - { - void (*function)(char *, void *) = g->function; - (*function)(arg1, g->data); - } - break; - - /* struct gaim_connection *, char *, char *, char * */ - case event_chat_invited: - case event_chat_recv: - { - void (*function)(struct gaim_connection *, char *, char *, - char *, void *) = g->function; - (*function)(arg1, arg2, arg3, arg4, g->data); - } + case event_draw_menu: + two = g->function; + (*two)(arg1, arg2, g->data); break; - /* struct gaim_connection *, char *, char * */ + /* three args */ + case event_im_send: + case event_im_displayed_sent: + case event_chat_join: case event_chat_buddy_join: case event_chat_buddy_leave: + case event_chat_send: case event_away: case event_back: - { - void (*function)(struct gaim_connection *, char *, char *, - void *) = g->function; - (*function)(arg1, arg2, arg3, g->data); - } - break; - - /* struct gaim_connection *, char *, char *, guint32 */ - case event_im_displayed_rcvd: - { - void (*function)(struct gaim_connection *, char *, char *, - guint32, void *) = g->function; - (*function)(arg1, arg2, arg3, (guint32)arg4, g->data); - } - break; - - /* struct gaim_connection *, char *, int */ case event_warned: - { - void (*function)(struct gaim_connection *, char *, int, - void *) = g->function; - (*function)(arg1, arg2, (int)arg3, g->data); - } + three = g->function; + (*three)(arg1, arg2, arg3, g->data); break; - /* int */ - case event_error: - { - void (*function)(int, void *) = g->function; - (*function)((int)arg1, g->data); - } - break; - /* GtkWidget *, char * */ - case event_draw_menu: - { - void(*function)(GtkWidget *, char *) = g->function; - (*function)(arg1, arg2); - } + /* four args */ + case event_im_recv: + case event_chat_recv: + case event_im_displayed_rcvd: + case event_chat_send_invite: + case event_chat_invited: + four = g->function; + (*four)(arg1, arg2, arg3, arg4, g->data); break; default: @@ -885,83 +828,52 @@ #ifdef USE_PERL switch (event) { case event_signon: - g_snprintf(buf, sizeof buf, "\"%s\"", ((struct gaim_connection *)arg1)->username); - break; case event_signoff: - g_snprintf(buf, sizeof buf, "\"%s\"", ((struct gaim_connection *)arg1)->username); - break; case event_away: - g_snprintf(buf, sizeof buf, "\"%s\"", ((struct gaim_connection *)arg1)->username); - break; case event_back: - g_snprintf(buf, sizeof buf, "\"%s\"", ((struct gaim_connection *)arg1)->username); + g_snprintf(buf, sizeof buf, "%p", arg1); break; case event_im_recv: - g_snprintf(buf, sizeof buf, "\"%s\" \"%s\" %s", - ((struct gaim_connection *)arg1)->username, + g_snprintf(buf, sizeof buf, "%p \"%s\" %s", arg1, *(char **)arg2 ? *(char **)arg2 : "(null)", *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_im_send: - g_snprintf(buf, sizeof buf, "\"%s\" \"%s\" %s", - ((struct gaim_connection *)arg1)->username, (char *)arg2, - *(char **)arg3 ? *(char **)arg3 : "(null)"); + g_snprintf(buf, sizeof buf, "%p \"%s\" %s", arg1, + (char *)arg2, *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_buddy_signon: - g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); - break; case event_buddy_signoff: - g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); - break; case event_set_info: - g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); - break; case event_buddy_away: - g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); - break; case event_buddy_back: - g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); - break; case event_buddy_idle: - g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); - break; case event_buddy_unidle: - g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); - break; - case event_blist_update: - buf[0] = 0; + g_snprintf(buf, sizeof buf, "%p \"%s\"", arg1, (char *)arg2); break; case event_chat_invited: - g_snprintf(buf, sizeof buf, "\"%s\" \"%s\" %s", (char *)arg2, (char *)arg3, - arg4 ? (char *)arg4 : ""); + g_snprintf(buf, sizeof buf, "%p \"%s\" \"%s\" %s", arg1, + (char *)arg2, (char *)arg3, arg4 ? (char *)arg4 : ""); break; case event_chat_join: - g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); - break; - case event_chat_leave: - g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); - break; case event_chat_buddy_join: - g_snprintf(buf, sizeof buf, "\"%s\" \"%s\"", (char *)arg2, (char *)arg3); - break; case event_chat_buddy_leave: - g_snprintf(buf, sizeof buf, "\"%s\" \"%s\"", (char *)arg2, (char *)arg3); + g_snprintf(buf, sizeof buf, "%p %d \"%s\"", arg1, (int)arg2, (char *)arg3); + break; + case event_chat_leave: + g_snprintf(buf, sizeof buf, "%p %d", arg1, (int)arg2); break; case event_chat_recv: - g_snprintf(buf, sizeof buf, "\"%s\" \"%s\" %s", (char *)arg2, (char *)arg3, - (char *)arg4); + case event_chat_send_invite: + g_snprintf(buf, sizeof buf, "%p %d \"%s\" %s", arg1, + (int)arg2, (char *)arg3, (char *)arg4); break; case event_chat_send: - g_snprintf(buf, sizeof buf, "\"%s\" %s", (char *)arg2, + g_snprintf(buf, sizeof buf, "%p %d %s", arg1, (int)arg2, *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_warned: - g_snprintf(buf, sizeof buf, "\"%s\" \"%s\" %d", - ((struct gaim_connection *)arg1)->username, - arg2 ? (char *)arg2 : "", (int)arg3); - break; - case event_error: - g_snprintf(buf, sizeof buf, "%d", (int)arg1); + g_snprintf(buf, sizeof buf, "%p \"%s\" %d", arg1, arg2 ? (char *)arg2 : "", (int)arg3); break; case event_quit: buf[0] = 0; @@ -969,25 +881,18 @@ case event_new_conversation: g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg1); break; - case event_draw_menu: - g_snprintf(buf, sizeof buf, "\"%s\"", (char *)arg2); - break; case event_im_displayed_sent: - g_snprintf(buf, sizeof buf, "\"%s\" \"%s\" %s", - ((struct gaim_connection *)arg1)->username, (char *)arg2, - *(char **)arg3 ? *(char **)arg3 : "(null)"); + g_snprintf(buf, sizeof buf, "%p \"%s\" %s", arg1, + (char *)arg2, *(char **)arg3 ? *(char **)arg3 : "(null)"); break; case event_im_displayed_rcvd: - g_snprintf(buf, sizeof buf, "\"%s\" \"%s\" %s", - ((struct gaim_connection *)arg1)->username, (char *)arg2, - (char *)arg3 ? (char *)arg3 : "(null)"); + g_snprintf(buf, sizeof buf, "%p \"%s\" %s", arg1, + (char *)arg2, (char *)arg3 ? (char *)arg3 : "(null)"); break; default: - break; + return 0; } - tmp = event_name(event); - debug_printf("%s: %s\n", tmp, buf); - return perl_event(tmp, buf); + return perl_event(event_name(event), buf); #else return 0; #endif Index: server.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/server.c,v retrieving revision 1.190 retrieving revision 1.191 diff -u -d -r1.190 -r1.191 --- server.c 2001/09/21 00:14:12 1.190 +++ server.c 2001/09/22 09:14:27 1.191 @@ -302,6 +302,7 @@ void serv_chat_invite(struct gaim_connection *g, int id, char *message, char *name) { + plugin_event(event_chat_send_invite, g, (void *)id, name, message); if (g->prpl && g->prpl->chat_invite) (*g->prpl->chat_invite)(g, id, message, name); } @@ -836,7 +837,7 @@ { struct conversation *b; - plugin_event(event_chat_join, gc, name, 0, 0); + plugin_event(event_chat_join, gc, (void *)id, name, 0); b = (struct conversation *)g_new0(struct conversation, 1); gc->buddy_chats = g_slist_append(gc->buddy_chats, b); @@ -894,7 +895,7 @@ if (!b) return; - plugin_event(event_chat_leave, g, b->name, 0, 0); + plugin_event(event_chat_leave, g, (void *)b->id, 0, 0); debug_printf("Leaving room %s.\n", b->name); @@ -921,7 +922,7 @@ if (!b) return; - if (plugin_event(event_chat_recv, g, b->name, who, message)) + if (plugin_event(event_chat_recv, g, (void *)b->id, who, message)) return; buf = g_malloc(MAX(strlen(message) * 2, 8192)); |
From: Eric W. <war...@us...> - 2001-09-22 09:14:30
|
Update of /cvsroot/gaim/gaim/plugins In directory usw-pr-cvs1:/tmp/cvs-serv3080/plugins Modified Files: PERL-HOWTO SIGNALS Log Message: you say potato, i say potato you say tomato, i say tomato potato, potato tomato, tomato let's call the whole thing off. *sigh*. it just doesn't work as well when it's typed. but you wouldn't want to hear me sing it. Index: PERL-HOWTO =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/PERL-HOWTO,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- PERL-HOWTO 2001/09/10 22:27:47 1.8 +++ PERL-HOWTO 2001/09/22 09:14:27 1.9 @@ -19,6 +19,11 @@ There's a really quick simple perl script in this directory, gaim.pl, that should show most of the functions. Most things should be self-explanatory. +There's one thing you need to be aware of in perl scripts for gaim. Gaim +supports multiple connections, and perl deals with them by using a unique +identifier for each of them (that's a fancy way of saying that perl scripts +use the memory address of the connection). + Everything available in normal perl scripts should be available in gaim's perl interface, so I'm not going to bother describing that. The important things are the functions provided by gaim's internal GAIM module, which is @@ -34,27 +39,31 @@ This function returns different information based on the integer passed to it. 0 - the version of gaim you're running ("0.10.0" for example). - 1 - the list of currently online screennames - 2 - given a screenname, the protocol(s) it(/they) use(s) (as ints) + 1 - the list of connection ids + 2 - given a connection index, the protocol it uses (as an int) + 3 - given a connection index, the screenname of the person + 4 - given a connection index, the index in the users list + 5 - the list of names of users + 6 - the list of protocols of the users GAIM::print(title, message) This displays a nice little dialog window. -GAIM::buddy_list(name) +GAIM::buddy_list(index) This returns the buddy list (no groups, just the names of the buddies) - for the specified account + for the specified connection. -GAIM::online_list(name) - This returns the list of online buddies for the specified account. +GAIM::online_list(index) + This returns the list of online buddies for the specified connection. GAIM::command(command, ...) This sends commands to the server, and each command takes various arguments. The command should be self-explanatory: - "signon" - the second arg is the screenname to sign on - "signoff" - the optional second arg is who to sign off. if no args are - given, all names are signed off. + "signon" - the second arg is the index of the user to sign on + "signoff" - the optional second arg is the connection index to sign off. + if no args are given, all connections are signed off. "away" - the second arg is the away message "back" - no args. "idle" - the second arg is how long (in seconds) to set the idle time @@ -63,9 +72,10 @@ especially evil since it warns the person from every connection. The third argument is 1 if you want to warn anonymously. If 0 or ommitted, it will warn normally. - "info" - the second arg is what you want to set your profile to. + "info" - the second arg is the connection index whose info you want to set, + and the third arg is what you want to set your profile to. -GAIM::user_info(nick) +GAIM::user_info(index, nick) Returns 8 data items: the screenname of the buddy the alias of the buddy @@ -96,20 +106,14 @@ wflags==1: display message as if sent by <who> wflags==2: display system message -GAIM::print_to_conv(who, what, auto) - The question is not what does this do, it's who does this do it as. The - answer is "whatever the default is". It uses whichever connection is - selected in the conversation window's menu. If the conversation window - didn't exist beforehand, then it's the default (first) connection. If - auto is one, it will send as an auto (read: away) message. If 0 or - ommitted, it will send normally. +GAIM::serv_send_im(index, who, what, auto) + Sends what from the connection index to who. :) -GAIM::print_to_chat(room, what) - This goes through each connection. If it finds a room matching the name, - it'll print the message to that room. +GAIM::print_to_conv(index, who, what, auto) + Convenience function; combination of write_to_conv and serv_send_im. -GAIM::serv_send_im(who, what, auto) - Same as print_to_conv, but it does not display the message. +GAIM::print_to_chat(index, room, what) + Room is actually an int. Read SIGNALS to find out why. GAIM::add_event_handler(event, function) This is the most important of them all. This is basically exactly like Index: SIGNALS =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/SIGNALS,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- SIGNALS 2001/09/12 21:29:32 1.24 +++ SIGNALS 2001/09/22 09:14:27 1.25 @@ -20,13 +20,13 @@ event_chat_recv, event_chat_send, event_warned, - event_error, event_quit, event_new_conversation, event_set_info, event_draw_menu, event_im_displayed_sent, - event_im_displayed_rcvd + event_im_displayed_rcvd, + event_chat_send_invite }; To add a signal handler, call the fuction gaim_signal_connect with the @@ -171,22 +171,29 @@ an empty string. event_chat_join: - struct gaim_connection *gc, char *room + struct gaim_connection *gc, int id, char *room 'gc' is the connection that joined the room. + 'id' is the id of the room. See, each room is given an id unique + within the connection. The struct conversation*'s in gc->buddy_chats + have an 'id' field that's only used if it's is_chat member is TRUE. + 'id' is the *only* way to detect which chat room you actually mean, + because the name of the chat room is not always unique (for example, + MSN always uses "MSN Chat" as its name, since group chats in MSN + don't actually have names). 'room' is the chat room that you have just joined. event_chat_leave: - struct gaim_connection *gc, char *room + struct gaim_connection *gc, int 'gc' is the connection that joined the room. - 'room' is the chat room that you have just left. + 'id' is the id of the chat room that you have just left. event_chat_buddy_join: - struct gaim_connection *gc, char *room, char *who + struct gaim_connection *gc, int id, char *who 'gc' is the connection that the chat room is attached to. - 'room' is the room the person joined. + 'id' is the id of the room the person joined. 'who' is the screenname of the person who joined. This is also triggered upon entering the room for every person in the @@ -196,28 +203,29 @@ for though.) event_chat_buddy_leave: - struct gaim_connection *gc, char *room, char *who + struct gaim_connection *gc, int id, char *who 'gc' is the connection that the chat room is attached to. - 'room' is the room the person left. + 'id' is the id of the room the person left. 'who' is the screenname of the person who left. event_chat_recv: - struct gaim_connection *gc, char *room, char *who, char *text + struct gaim_connection *gc, int id, char *who, char *text 'gc' is the connection that received the message. - 'room' should be obvious by now. 'who' should be too. 'text' is the message that got sent. + 'id' is the id of the room that received the message (see + event_chat_join) Note that because of the bizarre way chat works, you also receive messages that you send. I didn't design it, AOL did. event_chat_send: - struct gaim_connection *gc, char *room, char **text + struct gaim_connection *gc, int id, char **text 'gc' is the connection that the message is about to be sent on. - 'room'. Need I say more. + 'id' is the id of the room to which you're sending the message. 'text' is what you're about to say, linkified/HTML-ized, but not TOC-escaped. @@ -234,15 +242,6 @@ an anonymous warning, or your warning level has dropped. 'level' is your new warning level. -event_error: - int error - - 'error' is the number of the error as defined by the TOC PROTOCOL - document, which can be found in the docs/ directory of the source - tree. Note that if the person is using Oscar, this number is often - plain wrong, and this event may not always be triggered on error. - Experiment to find what is reliable. - event_quit: (none) @@ -302,3 +301,15 @@ 'who' is who sent the message. 'what' is what was sent. 'flags' is flags on the message. + +event_chat_send_invite: + struct gaim_connection *gc, int id, char *who, char *msg + + This is called just before you're about to invite someone. It's + useful for if you want to pass someone a key so that they can + participate in a group encrypted chat (ahem). + + 'gc' is the connection the invite is sent on. + 'id' is the id of the room you're inviting them to. + 'who' is who you're inviting. + 'msg' is the message they'll receive when they're invited. |
From: Eric W. <war...@us...> - 2001-09-22 09:14:30
|
Update of /cvsroot/gaim/gaim In directory usw-pr-cvs1:/tmp/cvs-serv3080 Modified Files: ChangeLog Log Message: you say potato, i say potato you say tomato, i say tomato potato, potato tomato, tomato let's call the whole thing off. *sigh*. it just doesn't work as well when it's typed. but you wouldn't want to hear me sing it. Index: ChangeLog =================================================================== RCS file: /cvsroot/gaim/gaim/ChangeLog,v retrieving revision 1.301 retrieving revision 1.302 diff -u -d -r1.301 -r1.302 --- ChangeLog 2001/09/20 21:01:49 1.301 +++ ChangeLog 2001/09/22 09:14:27 1.302 @@ -1,6 +1,10 @@ GAIM: The Pimpin' Penguin IM Clone thats good for the soul! version 0.45: + * Major updates to the perl system (reread PERL-HOWTO and + SIGNALS) + * Major updates to event_chat_* events for plugins (reread + SIGNALS) version 0.44 (09/20/2001): * More sane scaling of buddy icons (intelligently scale to |