Mercurial > pidgin.yaz
changeset 597:3a24fd19ff5f
[gaim-migrate @ 607]
print_to_conv in perl.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 03 Aug 2000 19:27:42 +0000 |
parents | 2838c9ca0823 |
children | c763eeec336f |
files | src/perl.c src/prefs.c |
diffstat | 2 files changed, 23 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/perl.c Thu Aug 03 18:57:01 2000 +0000 +++ b/src/perl.c Thu Aug 03 19:27:42 2000 +0000 @@ -20,6 +20,7 @@ * This was taken almost exactly from X-Chat. The power of the GPL. * Translated from X-Chat to Gaim by Eric Warmenhoven. * Originally by Erik Scrafford <eriks@chilisoft.com>. + * X-Chat Copyright (C) 1998 Peter Zelezny. * */ @@ -61,7 +62,7 @@ gint iotag; }; -static GList *perl_list = NULL; +static GList *perl_list = NULL; /* should probably extern this at some point */ static GList *perl_timeout_handlers = NULL; static PerlInterpreter *my_perl = NULL; @@ -78,15 +79,13 @@ /* server stuff */ XS(XS_AIM_command); /* send command to server */ XS(XS_AIM_user_info); /* given name, return struct buddy members */ +XS(XS_AIM_print_to_conv); /* send message to someone */ /* handler commands */ XS(XS_AIM_add_message_handler); /* when people talk */ XS(XS_AIM_add_command_handler); /* when servers talk */ XS(XS_AIM_add_timeout_handler); /* figure it out */ -/* cool stuff */ -XS(XS_AIM_print_to_conv); /* send message to someone */ - void xs_init() { char *file = __FILE__; @@ -169,6 +168,7 @@ newXS ("AIM::command", XS_AIM_command, "AIM"); newXS ("AIM::user_info", XS_AIM_user_info, "AIM"); + newXS ("AIM::print_to_conv", XS_AIM_print_to_conv, "AIM"); newXS ("AIM::add_message_handler", XS_AIM_add_message_handler, "AIM"); newXS ("AIM::add_command_handler", XS_AIM_add_command_handler, "AIM"); @@ -360,7 +360,24 @@ XST_mIV(4, buddy->idle); XST_mIV(5, buddy->uc); XST_mIV(6, buddy->caps); - XSRETURN(6); + XSRETURN(7); +} + +XS (XS_AIM_print_to_conv) +{ + char *nick, *what; + struct conversation *c; + int junk; + dXSARGS; + items = 0; + + nick = SvPV(ST(0), junk); + what = SvPV(ST(1), junk); + c = find_conversation(nick); + if (!c) + c = new_conversation(nick); + write_to_conv(c, what, WFLAG_SEND, NULL); + serv_send_im(nick, what, 0); } XS (XS_AIM_add_message_handler) @@ -399,9 +416,4 @@ XSRETURN_EMPTY; } -XS (XS_AIM_print_to_conv) -{ - /* FIXME */ -} - #endif /* USE_PERL */
--- a/src/prefs.c Thu Aug 03 18:57:01 2000 +0000 +++ b/src/prefs.c Thu Aug 03 19:27:42 2000 +0000 @@ -358,7 +358,7 @@ pd = g_new0(struct prefs_data, 1); pd->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_widget_realize(pd->window); + gtk_widget_realize(pd->window); aol_icon(pd->window->window); gtk_container_border_width(GTK_CONTAINER(pd->window), 10); gtk_window_set_title(GTK_WINDOW(pd->window), _("Gaim - Preferences"));