changeset 3802:9bcb42faccc0

[gaim-migrate @ 3945] Rewrote show_im_dialog and show_info_dialog. Ported to gtkspell2. Gtkspell2 is a library available from gtkspell.sf.net. It requires the pspell library. If you want the "highlight misspelled words" feature to work, you must have this library installed. If installed, configure will detect it and link against it. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 26 Oct 2002 06:41:13 +0000
parents 8cc3d7526043
children f894303cfede
files configure.ac configure.in plugins/autorecon.c src/Makefile.am src/aim.c src/buddy_chat.c src/conversation.c src/dialogs.c src/gaim.h src/gtkspell.c src/gtkspell.h src/util.c
diffstat 12 files changed, 202 insertions(+), 1058 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Fri Oct 25 11:50:40 2002 +0000
+++ b/configure.ac	Sat Oct 26 06:41:13 2002 +0000
@@ -119,7 +119,7 @@
 
 AC_ARG_ENABLE(plugins, [  --disable-plugins       compile without plugin support],,enable_plugins=yes)
 AC_ARG_ENABLE(perl,    [  --disable-perl          compile without perl scripting],,enable_perl=yes)
-
+AC_ARG_ENABLE(gtkspell, [  --disable-gtkspell      compile without GtkSpell automatic spell checking],,enable_gtkspell=yes)
 AC_ARG_ENABLE(debug,   [  --enable-debug          compile with debugging support],,enable_debug=no)
 AC_ARG_ENABLE(screensaver,   [  --disable-screensaver   compile without X screensaver extension],,enable_xss=yes)
 AC_ARG_WITH(krb4,      [  --with-krb4=PREFIX      Compile Zephyr plugin with Kerberos 4 support],kerberos="$withval",kerberos="no")
@@ -211,6 +211,16 @@
 	fi
 fi
 
+dnl Thanks, Evan.
+if test "$enable_gtkspell" = yes ; then
+	PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , enable_gtkspell=no)
+	if test "$enable_gtkspell" = "yes" ; then
+		AC_SUBST(GTKSPELL_CFLAGS)
+		AC_SUBST(GTKSPELL_LIBS)
+        	AC_DEFINE(USE_GTKSPELL,,[do we have gtkspell?])
+	fi
+fi
+
 if test "$enable_nas" = yes ; then
 	AC_DEFINE(NAS_SOUND, 1, [Define if we have NAS sound support.])
         SOUND_LIBS="-laudio -lXt"
@@ -382,6 +392,8 @@
 echo Build with Plugin support..... : $enable_plugins
 echo Build with Perl support....... : $enable_perl
 echo
+echo Build with GtkSpell............: $enable_gtkspell
+echo
 echo Use XScreenSaver Extension.... : $enable_xss
 echo
 echo Build with ESD................ : $enable_esd
--- a/configure.in	Fri Oct 25 11:50:40 2002 +0000
+++ b/configure.in	Sat Oct 26 06:41:13 2002 +0000
@@ -118,6 +118,7 @@
 
 AC_ARG_ENABLE(plugins, [  --disable-plugins       compile without plugin support],,enable_plugins=yes)
 AC_ARG_ENABLE(perl,    [  --disable-perl          compile without perl scripting],,enable_perl=yes)
+AC_ARG_ENABLE(gtkspell, [  --disable-gtkspell      compile without GtkSpell automatic spell checking],,enable_gtkspell=yes)
 
 AC_ARG_ENABLE(debug,   [  --enable-debug          compile with debugging support],,enable_debug=no)
 AC_ARG_ENABLE(screensaver,   [  --disable-screensaver   compile without X screensaver extension],,enable_xss=yes)
@@ -209,6 +210,16 @@
 	fi
 fi
 
+dnl Thanks, Evan.
+if test "$enable_gtkspell" = yes ; then
+	PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , enable_gtkspell=no)
+	if test "$enable_gtkspell" = "yes" ; then
+		AC_SUBST(GTKSPELL_CFLAGS)
+		AC_SUBST(GTKSPELL_LIBS)
+        	AC_DEFINE(USE_GTKSPELL,,[do we have gtkspell?])
+	fi
+fi
+
 if test "$enable_nas" = yes ; then
 	AC_DEFINE(NAS_SOUND, 1, [Define if we have NAS sound support.])
         SOUND_LIBS="-laudio -lXt"
@@ -380,6 +391,8 @@
 echo Build with Plugin support..... : $enable_plugins
 echo Build with Perl support....... : $enable_perl
 echo
+echo Build with GtkSpell............: $enable_gtkspell
+echo
 echo Use XScreenSaver Extension.... : $enable_xss
 echo
 echo Build with ESD................ : $enable_esd
--- a/plugins/autorecon.c	Fri Oct 25 11:50:40 2002 +0000
+++ b/plugins/autorecon.c	Sat Oct 26 06:41:13 2002 +0000
@@ -41,6 +41,17 @@
  *  EXPORTED FUNCTIONS
  */
 
+struct gaim_plugin_description desc; 
+G_MODULE_EXPORT struct gaim_plugin_description *gaim_plugin_desc() {
+	desc.api_version = PLUGIN_API_VERSION;
+	desc.name = g_strdup("Autoreconnect");
+	desc.version = g_strdup(VERSION);
+	desc.description = g_strdup("When you are kicked offline, this reconnects you.");
+	desc.authors = g_strdup("Eric Warmenhoven &lt;eric@warmenhoven.org>");
+	desc.url = g_strdup(WEBSITE);
+	return &desc;
+}
+
 G_MODULE_EXPORT char *name() {
 	return "Auto Reconnect";
 }
--- a/src/Makefile.am	Fri Oct 25 11:50:40 2002 +0000
+++ b/src/Makefile.am	Sat Oct 26 06:41:13 2002 +0000
@@ -13,7 +13,6 @@
 		ft.c \
 		gaimrc.c \
 		gtkimhtml.c \
-		gtkspell.c \
 		html.c \
 		idle.c \
 		list.c \
@@ -35,10 +34,10 @@
 gaim_remote_LDADD = @LDADD@ @LIBOBJS@
 gaim_remote_SOURCES = gaim-remote.c socket.c
 
-CFLAGS += $(PERL_CFLAGS)
+CFLAGS += $(PERL_CFLAGS) $(GTKSPELL_CFLAGS)
 CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\" -DLIBDIR=\"$(libdir)/gaim/\" $(DEBUG_CFLAGS) -DDATADIR=\"$(datadir)\"
 
-LIBS = @LIBS@ $(GTK_LIBS) $(SOUND_LIBS) $(STATIC_LINK_LIBS) $(PERL_LIBS) $(XSS_LIBS) $(INTLLIBS) $(DEBUG_LIBS)
+LIBS = @LIBS@ $(GTK_LIBS) $(SOUND_LIBS) $(STATIC_LINK_LIBS) $(PERL_LIBS) $(XSS_LIBS) $(INTLLIBS) $(DEBUG_LIBS) $(GTKSPELL_LIBS)
 
 EXTRA_DIST =	convo.h \
 		core.h \
@@ -48,7 +47,6 @@
 		getopt.h \
 		getopt1.c \
 		gtkimhtml.h \
-		gtkspell.h \
 		md5.h \
 		multi.h \
 		prpl.h \
--- a/src/aim.c	Fri Oct 25 11:50:40 2002 +0000
+++ b/src/aim.c	Sat Oct 26 06:41:13 2002 +0000
@@ -52,7 +52,6 @@
 #include <signal.h>
 #endif
 #include "locale.h"
-#include "gtkspell.h"
 #include <getopt.h>
 
 #ifdef _WIN32
@@ -396,15 +395,8 @@
 #endif
 		abort();
 		break;
-	case SIGCHLD:
-		clean_pid();
-#if HAVE_SIGNAL_H
-		signal(SIGCHLD, sighandler);	/* restore signal catching on this one! */
-#endif
-		break;
 	default:
 		debug_printf("caught signal %d\n", sig);
-		gtkspell_stop();
 		signoff_all(NULL, NULL);
 #ifdef GAIM_PLUGINS
 		remove_all_plugins();
@@ -799,21 +791,7 @@
 
 	if (misc_options & OPT_MISC_DEBUG)
 		show_debug();
-#ifndef _WIN32
-	/*If ispell fails to start, try using aspell in ispell compatibitity mode.
-	  Gabber does this the same way -- lorien420@myrealbox.com*/
-	if (convo_options & OPT_CONVO_CHECK_SPELLING){
-		if (gtkspell_start(NULL, ispell_cmd)<0){
-			debug_printf("gtkspell failed to start when using ispell\n");
-			if (gtkspell_start(NULL, aspell_cmd)<0){
-				debug_printf("gtkspell failed to start when using aspell\n");
-			} else
-				debug_printf("gtkspell started with aspell\n");
-		} else {
-			debug_printf("gtkspell started with ispell\n");
-		}
-	}
-#endif
+
 	static_proto_init();
 
 	/* deal with --login */
@@ -838,10 +816,6 @@
 #endif
 
 	gtk_main();
-#ifndef _WIN32
-	if (convo_options & OPT_CONVO_CHECK_SPELLING)
-		gtkspell_stop();
-#endif
 	core_quit();
 	/* don't need ui_quit here because ui doesn't create anything */
 
--- a/src/buddy_chat.c	Fri Oct 25 11:50:40 2002 +0000
+++ b/src/buddy_chat.c	Sat Oct 26 06:41:13 2002 +0000
@@ -30,7 +30,9 @@
 #include <stdlib.h>
 #include <gtk/gtk.h>
 #include "gtkimhtml.h"
-#include "gtkspell.h"
+#ifdef USE_GTKSPELL
+#include <gtkspell/gtkspell.h>
+#endif
 #include <gdk/gdkkeysyms.h>
 
 #include "convo.h"
@@ -1410,9 +1412,10 @@
 	gtk_widget_set_usize(chatentry, buddy_chat_size.width, MAX(buddy_chat_size.entry_height, 25));
 	gtk_window_set_focus(GTK_WINDOW(win), chatentry);
 	gtk_widget_show(chatentry);
-	/*if (convo_options & OPT_CONVO_CHECK_SPELLING)
-		gtkspell_attach(GTK_TEXT(chatentry));*/
-
+#ifdef USE_GTKSPELL
+	if (convo_options & OPT_CONVO_CHECK_SPELLING)
+		gtkspell_attach(GTK_TEXT(chatentry));
+#endif
 	bbox = gtk_hbox_new(FALSE, 5);
 	gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
 	gtk_widget_show(bbox);
--- a/src/conversation.c	Fri Oct 25 11:50:40 2002 +0000
+++ b/src/conversation.c	Sat Oct 26 06:41:13 2002 +0000
@@ -40,10 +40,12 @@
 #include <errno.h>
 #include <ctype.h>
 #include <gtk/gtk.h>
+#ifdef USE_GTKSPELL
+#include <gtkspell/gtkspell.h>
+#endif
 #include "gtkimhtml.h"
 #include <gdk/gdkkeysyms.h>
 #include "convo.h"
-#include "gtkspell.h"
 #include "prpl.h"
 
 #ifdef _WIN32
@@ -512,9 +514,6 @@
 
 	debug_printf("conversation close callback\n");
 
-/*	if (convo_options & OPT_CONVO_CHECK_SPELLING)
-		gtkspell_detach(GTK_TEXT(c->entry));*/
-
 	if (!c->is_chat) {
 		GSList *cn = connections;
 		if (!(misc_options & OPT_MISC_STEALTH_TYPING))
@@ -1511,10 +1510,6 @@
 	GtkTextIter start, end;
 	GtkTextMark *mark_start, *mark_end;
 
-/*	if (convo_options & OPT_CONVO_CHECK_SPELLING) {
-		gtkspell_detach(GTK_TEXT(entry));
-	}*/
-
 	if (gtk_text_buffer_get_selection_bounds(c->entry_buffer, &start, &end)) {
 		remove_tags(c, pre);
 		remove_tags(c, post);
@@ -1535,10 +1530,6 @@
 		gtk_text_buffer_place_cursor(c->entry_buffer, &start);
 	}
 
-/*	if (convo_options & OPT_CONVO_CHECK_SPELLING) {
-		gtkspell_attach(GTK_TEXT(entry));
-	}*/
-
 	gtk_widget_grab_focus(c->entry);
 }
 
@@ -2902,8 +2893,11 @@
 	g_signal_connect(G_OBJECT(c->entry_buffer), "delete_range",
 			   G_CALLBACK(delete_text_callback), c);
 
-/*	if (convo_options & OPT_CONVO_CHECK_SPELLING)
-		gtkspell_attach(GTK_TEXT(c->entry));*/
+#ifdef USE_GTKSPELL
+	if (convo_options & OPT_CONVO_CHECK_SPELLING)
+		gtkspell_new_attach(GTK_TEXT_VIEW(c->entry), NULL, NULL);
+#endif
+
 	gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(entry));
 	gtk_widget_show(entry);
 
@@ -3001,32 +2995,22 @@
 
 void toggle_spellchk()
 {
+#ifdef USE_GTKSPELL
 	GList *cnv = conversations;
 	GSList *cht;
 	struct conversation *c;
 	GSList *con = connections;
 	struct gaim_connection *gc;
-
-	if (convo_options & OPT_CONVO_CHECK_SPELLING){
-		/*If ispell fails to start, start aspell. This is the way that
-		  Gabber does it. -- lorien420@myrealbox.com */
-		if (gtkspell_start(NULL, ispell_cmd)<0){
-			debug_printf("gtkspell failed to start when using ispell\n");
-			if (gtkspell_start(NULL, aspell_cmd)<0){
-				debug_printf("gtkspell failed to start when using aspell\n");
-			} else
-				debug_printf("gtkspell started with aspell\n");
-		} else {
-			debug_printf("gtkspell started with ispell\n");
-		}
-	}
-
+	GtkSpell *spell;
+	
 	while (cnv) {
 		c = (struct conversation *)cnv->data;
-/*		if (convo_options & OPT_CONVO_CHECK_SPELLING)
-			gtkspell_attach(GTK_TEXT(c->entry));
-		else
-			gtkspell_detach(GTK_TEXT(c->entry));*/
+		if (convo_options & OPT_CONVO_CHECK_SPELLING) {
+			gtkspell_new_attach(GTK_TEXT_VIEW(c->entry), NULL, NULL);
+		} else {
+			spell = gtkspell_get_from_text_view(GTK_TEXT_VIEW(c->entry));
+			gtkspell_detach(spell);
+		}
 		cnv = cnv->next;
 	}
 
@@ -3035,17 +3019,17 @@
 		cht = gc->buddy_chats;
 		while (cht) {
 			c = (struct conversation *)cht->data;
-/*			if (convo_options & OPT_CONVO_CHECK_SPELLING)
-				gtkspell_attach(GTK_TEXT(c->entry));
-			else
-				gtkspell_detach(GTK_TEXT(c->entry));*/
+			if (convo_options & OPT_CONVO_CHECK_SPELLING) {
+				gtkspell_new_attach(GTK_TEXT_VIEW(c->entry), NULL, NULL);
+			} else {
+				spell = gtkspell_get_from_text_view(GTK_TEXT_VIEW(c->entry));
+				gtkspell_detach(spell);
+			}
 			cht = cht->next;
 		}
 		con = con->next;
 	}
-
-	if (!(convo_options & OPT_CONVO_CHECK_SPELLING))
-		gtkspell_stop();
+#endif
 }
 
 void toggle_timestamps()
--- a/src/dialogs.c	Fri Oct 25 11:50:40 2002 +0000
+++ b/src/dialogs.c	Sat Oct 26 06:41:13 2002 +0000
@@ -559,47 +559,52 @@
 
 
 
-static void do_im(GtkWidget *widget, GtkWidget *imentry)
+static void do_im(GtkWidget *widget, int resp, GtkWidget *imentry)
 {
 	char *who;
 	struct conversation *c;
 
-	who = g_strdup(gtk_entry_get_text(GTK_ENTRY(imentry)));
-	destroy_dialog(NULL, imdialog);
-	imdialog = NULL;
-
-	if (!g_strcasecmp(who, "")) {
+	if (resp == GTK_RESPONSE_OK) {
+		who = g_strdup(gtk_entry_get_text(GTK_ENTRY(imentry)));
+		destroy_dialog(NULL, imdialog);
+		imdialog = NULL;
+		
+		if (!g_strcasecmp(who, "")) {
+			g_free(who);
+			return;
+		}
+		
+		c = find_conversation(who);
+		
+		if (c == NULL) {
+			c = new_conversation(who);
+		} else {
+			gdk_window_raise(c->window->window);
+			}
 		g_free(who);
-		return;
 	}
-
-	c = find_conversation(who);
-
-	if (c == NULL) {
-		c = new_conversation(who);
-	} else {
-		gdk_window_raise(c->window->window);
-	}
-	g_free(who);
+	
+	destroy_dialog(NULL, widget);
 }
 
-static void do_info(GtkWidget *widget, struct getuserinfo *info)
+static void do_info(GtkWidget *widget, int resp, struct getuserinfo *info)
 {
 	char *who;
 
-	who = g_strdup(normalize(gtk_entry_get_text(GTK_ENTRY(info->entry))));
-	destroy_dialog(NULL, info->window);
-
-	if (!g_strcasecmp(who, "")) {
+	if (resp == GTK_RESPONSE_OK) {
+		who = g_strdup(normalize(gtk_entry_get_text(GTK_ENTRY(info->entry))));
+
+		if (!g_strcasecmp(who, "")) {
+			g_free(who);
+			return;
+		}
+	
+		/* what do we want to do about this case? */
+		if (info->gc)
+			serv_get_info(info->gc, who);
 		g_free(who);
-		return;
 	}
-
-	/* what do we want to do about this case? */
-	if (info->gc)
-		serv_get_info(info->gc, who);
-
-	g_free(who);
+	gtk_widget_destroy(GTK_WIDGET(widget));
 }
 
 void show_ee_dialog(int ee)
@@ -663,56 +668,55 @@
 
 void show_im_dialog()
 {
-	GtkWidget *mainbox;
-	GtkWidget *frame;
-	GtkWidget *fbox;
-	GtkWidget *bbox;
-	GtkWidget *button;
-	GtkWidget *imentry;
+	GtkWidget *hbox, *vbox;
 	GtkWidget *label;
+	char *filename = g_build_filename(DATADIR, "pixmaps", "gaim", "dialogs", "gaim_question.png", NULL);
+	GtkWidget *img = gtk_image_new_from_file(filename);
+	GtkWidget *entry;
 
 	if (!imdialog) {
-		GAIM_DIALOG(imdialog);
-		gtk_window_set_wmclass(GTK_WINDOW(imdialog), "imdialog", "Gaim");
-		gtk_window_set_policy(GTK_WINDOW(imdialog), FALSE, TRUE, TRUE);
-		gtk_window_set_title(GTK_WINDOW(imdialog), _("Gaim - IM user"));
-		gtk_signal_connect(GTK_OBJECT(imdialog), "destroy",
-				   GTK_SIGNAL_FUNC(destroy_dialog), imdialog);
-		gtk_widget_realize(imdialog);
-
-		mainbox = gtk_vbox_new(FALSE, 5);
-		gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5);
-		gtk_container_add(GTK_CONTAINER(imdialog), mainbox);
-
-		frame = gtk_frame_new(_("Send Instant Message"));
-		gtk_box_pack_start(GTK_BOX(mainbox), frame, TRUE, TRUE, 0);
-
-		fbox = gtk_hbox_new(FALSE, 5);
-		gtk_container_set_border_width(GTK_CONTAINER(fbox), 5);
-		gtk_container_add(GTK_CONTAINER(frame), fbox);
-
-		label = gtk_label_new(_("IM who:"));
-		gtk_box_pack_start(GTK_BOX(fbox), label, FALSE, FALSE, 0);
-
-		imentry = gtk_entry_new();
-		gtk_box_pack_start(GTK_BOX(fbox), imentry, TRUE, TRUE, 0);
-		gtk_signal_connect(GTK_OBJECT(imentry), "activate", GTK_SIGNAL_FUNC(do_im), imentry);
-		gtk_widget_grab_focus(imentry);
-
-		bbox = gtk_hbox_new(FALSE, 5);
-		gtk_box_pack_start(GTK_BOX(mainbox), bbox, FALSE, FALSE, 0);
-
-		button = picture_button(imdialog, _("Cancel"), cancel_xpm);
-		gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0);
-		gtk_signal_connect(GTK_OBJECT(button), "clicked",
-				   GTK_SIGNAL_FUNC(destroy_dialog), imdialog);
-
-		button = picture_button(imdialog, _("OK"), ok_xpm);
-		gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0);
-		gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(do_im), imentry);
+		imdialog = gtk_dialog_new_with_buttons("", NULL, GTK_DIALOG_MODAL, 
+						       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
+		gtk_dialog_set_default_response (GTK_DIALOG(imdialog), GTK_RESPONSE_OK);
+		gtk_container_set_border_width (GTK_CONTAINER(imdialog), 6);
+		gtk_window_set_resizable(GTK_WINDOW(imdialog), FALSE);
+		gtk_dialog_set_has_separator(GTK_DIALOG(imdialog), FALSE);
+		gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(imdialog)->vbox), 12);
+		gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(imdialog)->vbox), 6);
+		
+		hbox = gtk_hbox_new(FALSE, 12);
+		gtk_container_add(GTK_CONTAINER(GTK_DIALOG(imdialog)->vbox), hbox);
+		gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
+		gtk_misc_set_alignment(GTK_MISC(img), 0, 0);
+
+		vbox = gtk_vbox_new(FALSE, 0);
+		gtk_container_add(GTK_CONTAINER(hbox), vbox);
+		
+		label = gtk_label_new(_("Please enter the screenname of the person you would like to IM.\n"));
+		gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
+		gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
+		gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+		
+		hbox = gtk_hbox_new(FALSE, 6);
+		gtk_container_add(GTK_CONTAINER(vbox), hbox);
+		
+		label = gtk_label_new(NULL);
+		gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Screenname"));
+		gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+		
+		entry = gtk_entry_new();
+		gtk_entry_set_activates_default (GTK_ENTRY(entry), TRUE);
+		gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 0);
+		gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(entry));
+
+		g_signal_connect(G_OBJECT(imdialog), "response", G_CALLBACK(do_info), entry);
+
+		dialogwindows = g_list_prepend(dialogwindows, imdialog->window);
 	}
 
 	gtk_widget_show_all(imdialog);
+	if (entry)
+		gtk_widget_grab_focus(GTK_WIDGET(entry));
 }
 
 void show_info_select_account(GtkObject *w, struct gaim_connection *gc)
@@ -723,58 +727,75 @@
 
 void show_info_dialog()
 {
-	GtkWidget *mainbox;
-	GtkWidget *frame;
-	GtkWidget *table;
-	GtkWidget *bbox;
-	GtkWidget *button;
+	GtkWidget *window, *hbox, *vbox;
 	GtkWidget *label;
-	GtkWidget *menu, *opt;
-	char buf[2048];
+	char *filename = g_build_filename(DATADIR, "pixmaps", "gaim", "dialogs", "gaim_question.png", NULL);
+	GtkWidget *img = gtk_image_new_from_file(filename);
+	GtkWidget *table, *menu, *opt;
 	GSList *g = connections;
 	struct gaim_connection *c;
-
 	struct getuserinfo *info = g_new0(struct getuserinfo, 1);
+	char buf[256];
+
 	info->gc = connections->data;
 
-	GAIM_DIALOG(info->window);
-	gtk_window_set_wmclass(GTK_WINDOW(info->window), "infodialog", "Gaim");
-	gtk_window_set_policy(GTK_WINDOW(info->window), FALSE, TRUE, TRUE);
-	gtk_widget_realize(info->window);
-
-	mainbox = gtk_vbox_new(FALSE, 5);
-	gtk_container_set_border_width(GTK_CONTAINER(mainbox), 5);
-	gtk_container_add(GTK_CONTAINER(info->window), mainbox);
-
-	frame = gtk_frame_new(_("Get User Info"));
-	gtk_box_pack_start(GTK_BOX(mainbox), frame, TRUE, TRUE, 0);
-
+	window = gtk_dialog_new_with_buttons("", blist ? GTK_WINDOW(blist) : NULL, GTK_DIALOG_MODAL, 
+					     GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
+	gtk_dialog_set_default_response (GTK_DIALOG(window), GTK_RESPONSE_OK);
+	gtk_container_set_border_width (GTK_CONTAINER(window), 6);
+	gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
+	gtk_dialog_set_has_separator(GTK_DIALOG(window), FALSE);
+	gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(window)->vbox), 12);
+	gtk_container_set_border_width (GTK_CONTAINER(GTK_DIALOG(window)->vbox), 6);
+		
+	hbox = gtk_hbox_new(FALSE, 12);
+	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(window)->vbox), hbox);
+	gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0);
+	gtk_misc_set_alignment(GTK_MISC(img), 0, 0);
+	
+	vbox = gtk_vbox_new(FALSE, 0);
+	gtk_container_add(GTK_CONTAINER(hbox), vbox);
+		
+	label = gtk_label_new(_("Please enter the screenname of the person whose info you would like to view.\n"));
+	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+	
 	table = gtk_table_new(2, 2, FALSE);
-	gtk_table_set_row_spacings(GTK_TABLE(table), 5);
-	gtk_table_set_col_spacings(GTK_TABLE(table), 5);
-	gtk_container_set_border_width(GTK_CONTAINER(table), 5);
-	gtk_container_add(GTK_CONTAINER(frame), table);
-
-	label = gtk_label_new(_("User:"));
+	gtk_table_set_row_spacings(GTK_TABLE(table), 6);
+	gtk_table_set_col_spacings(GTK_TABLE(table), 6);
+	gtk_container_set_border_width(GTK_CONTAINER(table), 12);
+	gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
+	
+	label = gtk_label_new(NULL);
+	gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Screenname:"));
+	gtk_misc_set_alignment(GTK_LABEL(img), 0, 0);
 	gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1);
-	gtk_widget_show(label);
 
 	info->entry = gtk_entry_new();
 	gtk_table_attach_defaults(GTK_TABLE(table), info->entry, 1, 2, 0, 1);
-
+	gtk_entry_set_activates_default (GTK_ENTRY(info->entry), TRUE);
+	gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(info->entry));
+	
 	if (connections->next) {
 
-		label = gtk_label_new(_("Account:"));
+		label = gtk_label_new(NULL);
 		gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
-		gtk_widget_show(label);
+		gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), _("_Account:"));
+		gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
 
 		info->account = gtk_option_menu_new();
 		gtk_table_attach_defaults(GTK_TABLE(table), info->account, 1, 2, 1, 2);
-
+		gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(info->account));
+		
 		menu = gtk_menu_new();
 
 		while (g) {
 			c = (struct gaim_connection *)g->data;
+			if (!c->prpl->get_info) {
+				g = g->next;
+				continue;
+			}
 			g_snprintf(buf, sizeof(buf), "%s (%s)", c->username, c->prpl->name);
 			opt = gtk_menu_item_new_with_label(buf);
 			gtk_object_set_user_data(GTK_OBJECT(opt), info);
@@ -783,40 +804,18 @@
 					   GTK_SIGNAL_FUNC(show_info_select_account), c);
 
 			gtk_menu_append(GTK_MENU(menu), opt);
-			gtk_widget_show(opt);
-
 			g = g->next;
 		}
-
-		gtk_widget_show(menu);
+		
 		gtk_option_menu_set_menu(GTK_OPTION_MENU(info->account), menu);
-		gtk_widget_show(info->account);
 	}
 
-	/* Handle closes right */
-	gtk_signal_connect(GTK_OBJECT(info->entry), "activate",
-			   GTK_SIGNAL_FUNC(do_info), info);
-	gtk_signal_connect(GTK_OBJECT(info->window), "destroy",
-			   GTK_SIGNAL_FUNC(destroy_dialog), info->window);
-
-	/* Buttons */
-	bbox = gtk_hbox_new(FALSE, 5);
-	gtk_box_pack_start(GTK_BOX(mainbox), bbox, FALSE, FALSE, 0);
-
-	button = picture_button(info->window, _("Cancel"), cancel_xpm);
-	gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0);
-	gtk_signal_connect(GTK_OBJECT(button), "clicked",
-			   GTK_SIGNAL_FUNC(destroy_dialog), info->window);
-
-	button = picture_button(info->window, _("OK"), ok_xpm);
-	gtk_box_pack_end(GTK_BOX(bbox), button, FALSE, FALSE, 0);
-	gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(do_info), info);
-
-	/* Finish up */
-	gtk_window_set_title(GTK_WINDOW(info->window), _("Gaim - Get User Info"));
-	gtk_widget_grab_focus(info->entry);
-
-	gtk_widget_show_all(info->window);
+	g_signal_connect(G_OBJECT(window), "response", G_CALLBACK(do_info), info);
+	
+	
+	gtk_widget_show_all(window);
+	if (info->entry)
+		gtk_widget_grab_focus(GTK_WIDGET(info->entry));
 }
 
 
--- a/src/gaim.h	Fri Oct 25 11:50:40 2002 +0000
+++ b/src/gaim.h	Sat Oct 26 06:41:13 2002 +0000
@@ -445,7 +445,6 @@
 extern char *normalize(const char *);
 extern char *tobase64(const char *);
 extern void frombase64(const char *, char **, int *);
-extern void clean_pid();
 extern char *date();
 extern gint linkify_text(char *);
 extern FILE *open_log_file (char *, int);
--- a/src/gtkspell.c	Fri Oct 25 11:50:40 2002 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,714 +0,0 @@
-/* gtkspell - a spell-checking addon for GtkText
- * Copyright (c) 2000 Evan Martin.
- * vim: ts=4 sw=4
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#include <gtk/gtk.h>
-
-#include <sys/types.h>
-
-#ifndef _WIN32
-#include <sys/wait.h>
-#include <sys/time.h>
-#include <unistd.h>
-#else
-#include <io.h>
-#endif   
-
-#include <stdio.h>    
-#include <signal.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-
-/* TODO:
- * handle dictionary changes
- * asynchronous lookups
- */
-
-/* size of the text buffer used in various word-processing routines. */
-/* #define BUFSIZE 1024 */
-/* number of suggestions to display on each menu. */
-#define MENUCOUNT 10
-#define BUGEMAIL "gtkspell-devel@lists.sourceforge.net"
-
-/* because we keep only one copy of the spell program running, 
- * all ispell-related variables can be static.  
- */
-static pid_t spell_pid = -1;
-static int fd_write[2] = {0}, fd_read[2] = {0};
-
-/* FIXME? */
-static GdkColor highlight = { 0, 255*256, 0, 0 };
-
-static void entry_insert_cb(GtkText *gtktext, 
-		gchar *newtext, guint len, guint *ppos, gpointer d);
-
-int gtkspell_running() {
-	return (spell_pid > 0? spell_pid : 0);
-}
-
-/*
- * Set to "gtkspell not running" status
- *
- * May seem a bit silly, but it allows us to keep the file-global
- * variable from going program-global.  And if we need to do
- * something else additional later, well...
- */
-void gtkspell_notrunning() {
-    spell_pid = 0;
-}
-
-/*
-static void error_print(const char *fmt, ...) {
-	va_list ap;
-	va_start(ap, fmt);
-	fprintf(stderr, "gtkspell: ");
-	vfprintf(stderr, fmt, ap);
-	va_end(ap);
-}
-*/
-extern void debug_printf(char *, ...);
-#define error_print debug_printf
-
-/* functions to interface with pipe */
-static void writetext(char *text) {
-	write(fd_write[1], text, strlen(text));
-}
-
-static char *readline() {
-	static gchar *buf = NULL;
-	char *end;
-	char *ret;
-	char *tmp;
-
-	/* read until we get a newline */
-	while (!buf || (end = strchr(buf, '\n')) == NULL) {
-		char space[1024];
-		int ret = read(fd_read[0], space, 1023);
-		if (ret <= 0) {
-			error_print("read: %s\n", strerror(errno));
-			return NULL;
-		}
-		space[ret] = 0;
-		if (buf) {
-			tmp = buf;
-			buf = g_strconcat(tmp, space, NULL);
-			g_free(tmp);
-		} else
-			buf = g_strdup(space);
-	}
-
-	/* we got a newline, and end points to it.
-	 * copy out the data, reset buf, return */
-
-	if (end[1] == 0) {
-		/* only one line is in the buffer */
-		ret = buf;
-		buf = NULL;
-		return ret;
-	}
-
-	ret = g_strndup(buf, end - buf + 1);
-	tmp = buf;
-	buf = g_strdup(end + 1);
-	g_free(tmp);
-
-	return ret;
-}
-
-static char *readresponse() {
-	char *r1, *r2, *result;
-
-	r1 = readline();
-	if (!r1)
-		return NULL;
-	if (*r1 == '\n') {
-		g_strchomp(r1);
-		return r1;
-	}
-	r2 = readline();
-	if (!r2) {
-		g_free(r1);
-		return NULL;
-	}
-
-	while (r2 && *r2 != '\n') {
-		char *tmp = r1;
-		r1 = g_strconcat(tmp, r2, NULL);
-		g_free(tmp);
-		g_free(r2);
-		r2 = readline();
-	}
-
-	if (!r2) {
-		g_free(r1);
-		return NULL;
-	}
-
-	result = g_strconcat(r1, r2, NULL);
-	g_free(r1);
-	g_free(r2);
-	g_strchomp(result);
-	return result;
-}
-
-
-void gtkspell_stop() {
-#ifndef _WIN32
-	if (gtkspell_running()) {
-		kill(spell_pid, SIGHUP); 
-		spell_pid = 0;
-		close(fd_read[0]);
-		close(fd_write[1]);
-	}
-#endif
-}
-
-int gtkspell_start(char *path, char * args[]) {
-#ifndef _WIN32
-	int fd_error[2];
-
-	if (gtkspell_running()) {
-		error_print("gtkspell_start called while already running.\n");
-		gtkspell_stop();
-	}
-
-	pipe(fd_write);
-	pipe(fd_read);
-	pipe(fd_error);
-
-	spell_pid = fork();
-	if (spell_pid < 0) {
-		error_print("fork: %s\n", strerror(errno));
-		return -1;
-	} else if (spell_pid == 0) {
-		dup2(fd_write[0], 0);
-		close(fd_write[0]);
-		close(fd_write[1]);
-
-		dup2(fd_read[1], 1);
-		close(fd_read[0]);
-		close(fd_read[1]);
-
-		dup2(fd_error[1], 2);
-		close(fd_error[0]);
-		close(fd_error[1]);
-
-		if (path == NULL) {
-			if (execvp(args[0], args) < 0) 
-				error_print("execvp('%s'): %s\n", args[0], strerror(errno));
-		} else {
-			if (execv(path, args) < 0) 
-				error_print("execv('%s'): %s\n", path, strerror(errno));
-		}
-		/* if we get here, we failed.
-		 * send some text on the pipe to indicate status.
-		 */
-		write(0, "!", 1); /* stdout _is_ the pipe. */
-
-		_exit(0);
-	} else {
-		/* there are at least two ways to fail:
-		 * - the exec() can fail
-		 * - the exec() can succeed, but the program can dump the help screen
-		 * we must check for both.
-		 */
-		fd_set rfds;
-		struct timeval tv;
-		char *buf;
-		
-		close(fd_write[0]);
-		close(fd_read[1]);
-
-		FD_ZERO(&rfds);
-		FD_SET(fd_error[0], &rfds);
-		FD_SET(fd_read[0], &rfds);
-		tv.tv_sec = 2;
-		tv.tv_usec = 0;
-
-		if (select(MAX(fd_error[0], fd_read[0])+1, 
-					&rfds, NULL, NULL, &tv) < 0) {
-			/* FIXME: is this needed? */
-			error_print("Timed out waiting for spell command.\n");
-			gtkspell_stop();
-			return -1;
-		}
-
-		if (FD_ISSET(fd_error[0], &rfds)) { /* stderr readable? */
-			error_print("Spell command printed on stderr -- probably failed.\n");
-			gtkspell_stop();
-			return -1;
-		}
-
-		/* we're done with stderr, now. */
-		close(fd_error[0]);
-		close(fd_error[1]);
-
-		/* otherwise, fd_read[0] is set. */
-		buf = readline();
-
-		/* ispell should print something like this:
-		 * @(#) International Ispell Version 3.1.20 10/10/95
-		 * if it doesn't, it's an error. */
-		if (!buf || buf[0] != '@') {
-			if (buf)
-				g_free(buf);
-			gtkspell_stop();
-			return -1;
-		}
-		g_free(buf);
-	}
-
-	/* put ispell into terse mode.  
-	 * this makes it not respond on correctly spelled words. */
-	writetext("!\n");
-#endif /*!_WIN32*/
-	return 0;
-}
-
-static GList* misspelled_suggest(char *word) {
-	char *buf;
-	char *newword;
-	GList *l = NULL;
-	int count;
-
-	if (!word)
-		return NULL;
-
-	buf = g_strdup_printf("^%s\n", word); /* guard against ispell control chars */
-	writetext(buf);
-	g_free(buf);
-	buf = readresponse();
-
-	if (!buf)
-		return NULL;
-
-	switch (buf[0]) { /* first char is ispell command. */
-		case 0: /* no response: word is ok. */
-			g_free(buf);
-			return NULL;
-		case '&': /* misspelled, with suggestions */
-			/* & <orig> <count> <ofs>: <miss>, <miss>, <guess>, ... */
-			strtok(buf, " "); /* & */
-			newword = strtok(NULL, " "); /* orig */
-			l = g_list_append(l, g_strdup(newword));
-			newword = strtok(NULL, " "); /* count */
-			count = atoi(newword);
-			strtok(NULL, " "); /* ofs: */
-
-			while ((newword = strtok(NULL, ",")) != NULL) {
-				int len = strlen(newword);
-				if (newword[len-1] == ' ' || newword[len-1] == '\n') 
-					newword[len-1] = 0;
-				if (count == 0) {
-					g_list_append(l, NULL); /* signal the "suggestions" */
-				}
-				/* add it to the list, skipping the initial space. */
-				l = g_list_append(l, 
-						g_strdup(newword[0] == ' ' ? newword+1 : newword));
-
-				count--;
-			}
-			g_free(buf);
-			return l;
-
-		case '#': /* misspelled, no suggestions */
-		case '?': /* ispell is guessing. */
-			/* # <orig> <ofs> */
-			strtok(buf, " "); /* & */
-			newword = strtok(NULL, " "); /* orig */
-			l = g_list_append(l, g_strdup(newword));
-			g_free(buf);
-			return l;
-		default:
-			error_print("Unsupported spell command '%c'.\n"
-					"This is a bug; mail " BUGEMAIL " about it.\n", buf[0]);
-			error_print("Input [%s]\nOutput [%s]\n", word, buf);
-
-	}
-	g_free(buf);
-	return NULL;
-}
-
-static int misspelled_test(char *word) {
-	char *buf;
-
-	if (word == NULL)
-		return 0;
-
-	buf = g_strdup_printf("^%s\n", word); /* guard against ispell control chars */
-	writetext(buf);
-	g_free(buf);
-	buf = readresponse();
-
-	if (!buf)
-		return 0;
-
-	if (buf[0] == 0) {
-		g_free(buf);
-		return 0;
-	} else if (buf[0] == '&' || buf[0] == '#' || buf[0] == '?') {
-		g_free(buf);
-		return 1;
-	}
-	
-	error_print("Unsupported spell command '%c'.\n"
-			"This is a bug; mail " BUGEMAIL " about it.\n", buf[0]);
-	error_print("Input [%s]\nOutput [%s]\n", word, buf);
-	g_free(buf);
-	return -1;
-}
-
-static gboolean iswordsep(char c) {
-	return !isalpha(c) && c != '\'';
-}
-
-static gboolean get_word_from_pos(GtkText* gtktext, int pos, char** buf, 
-		int *pstart, int *pend) {
-	gint start, end;
-
-	if (iswordsep(GTK_TEXT_INDEX(gtktext, pos))) return FALSE;
-
-	for (start = pos; start >= 0; --start) {
-		if (iswordsep(GTK_TEXT_INDEX(gtktext, start))) break;
-	}
-	start++;
-
-	for (end = pos; end <= gtk_text_get_length(gtktext); end++) {
-		if (iswordsep(GTK_TEXT_INDEX(gtktext, end))) break;
-	}
-
-	if (buf && (end - start + 1 > 0)) {
-		*buf = g_malloc(end - start + 1);
-		for (pos = start; pos < end; pos++) 
-			(*buf)[pos-start] = GTK_TEXT_INDEX(gtktext, pos);
-		(*buf)[pos-start] = 0;
-	}
-
-	if (pstart) *pstart = start;
-	if (pend) *pend = end;
-
-	return TRUE;
-}
-
-static gboolean get_curword(GtkText* gtktext, char** buf, 
-		int *pstart, int *pend) {
-	int pos = gtk_editable_get_position(GTK_EDITABLE(gtktext));
-	return get_word_from_pos(gtktext, pos, buf, pstart, pend);
-}
-
-static void change_color(GtkText *gtktext, 
-		int start, int end, GdkColor *color) {
-	char *newtext = gtk_editable_get_chars(GTK_EDITABLE(gtktext), start, end);
-	gtk_text_freeze(gtktext);
-	gtk_signal_handler_block_by_func(GTK_OBJECT(gtktext), 
-			GTK_SIGNAL_FUNC(entry_insert_cb), NULL);
-	
-	gtk_text_set_point(gtktext, start);
-	gtk_text_forward_delete(gtktext, end-start);
-
-	if (newtext && end-start > 0)
-		gtk_text_insert(gtktext, NULL, color, NULL, newtext, end-start);
-
-	gtk_signal_handler_unblock_by_func(GTK_OBJECT(gtktext), 
-			GTK_SIGNAL_FUNC(entry_insert_cb), NULL);
-	gtk_text_thaw(gtktext);
-	g_free(newtext);
-}
-
-static gboolean check_at(GtkText *gtktext, int from_pos) {
-	int start, end;
-	char *buf = NULL;
-
-	if (!get_word_from_pos(gtktext, from_pos, &buf, &start, &end)) {
-		if (buf)
-			g_free(buf);
-		return FALSE;
-	}
-
-	if (misspelled_test(buf)) {
-		if (highlight.pixel == 0) {
-			/* add an entry for the highlight in the color map. */
-			GdkColormap *gc = gtk_widget_get_colormap(GTK_WIDGET(gtktext));
-			gdk_colormap_alloc_color(gc, &highlight, FALSE, TRUE);
-		}
-		change_color(gtktext, start, end, &highlight);
-		if (buf)
-			g_free(buf);
-		return TRUE;
-	} else { 
-		change_color(gtktext, start, end, 
-				&(GTK_WIDGET(gtktext)->style->fg[0]));
-		if (buf)
-			g_free(buf);
-		return FALSE;
-	}
-}
-
-void gtkspell_check_all(GtkText *gtktext) {
-	guint origpos;
-	guint pos = 0;
-	guint len;
-	float adj_value;
-	
-	if (!gtkspell_running()) return;
-	
-	len = gtk_text_get_length(gtktext);
-
-	adj_value = gtktext->vadj->value;
-	gtk_text_freeze(gtktext);
-	origpos = gtk_editable_get_position(GTK_EDITABLE(gtktext));
-	while (pos < len) {
-		while (pos < len && iswordsep(GTK_TEXT_INDEX(gtktext, pos)))
-			pos++;
-		while (pos < len && !iswordsep(GTK_TEXT_INDEX(gtktext, pos)))
-			pos++;
-		if (pos > 0)
-			check_at(gtktext, pos-1);
-	}
-	gtk_text_thaw(gtktext);
-	gtk_editable_set_position(GTK_EDITABLE(gtktext), origpos);
-}
-
-static void entry_insert_cb(GtkText *gtktext, 
-		gchar *newtext, guint len, guint *ppos, gpointer d) {
-	int origpos;
-
-	if (!gtkspell_running()) return;
-
-	gtk_signal_handler_block_by_func(GTK_OBJECT(gtktext),
-									 GTK_SIGNAL_FUNC(entry_insert_cb),
-									 NULL);
-	gtk_text_insert(GTK_TEXT(gtktext), NULL,
-			&(GTK_WIDGET(gtktext)->style->fg[0]), NULL, newtext, len);
-	gtk_signal_handler_unblock_by_func(GTK_OBJECT(gtktext),
-									 GTK_SIGNAL_FUNC(entry_insert_cb),
-									 NULL);
-	gtk_signal_emit_stop_by_name(GTK_OBJECT(gtktext), "insert-text");
-	*ppos += len;
-
-	origpos = gtk_editable_get_position(GTK_EDITABLE(gtktext));
-
-	if (iswordsep(newtext[0])) {
-		/* did we just end a word? */
-		if (*ppos >= 2) check_at(gtktext, *ppos-2);
-
-		/* did we just split a word? */
-		if (*ppos < gtk_text_get_length(gtktext))
-			check_at(gtktext, *ppos+1);
-	} else {
-		/* check as they type, *except* if they're typing at the end (the most
-		 * common case.
-		 */
-		if (*ppos < gtk_text_get_length(gtktext) && 
-				!iswordsep(GTK_TEXT_INDEX(gtktext, *ppos)))
-			check_at(gtktext, *ppos-1);
-	}
-
-	gtk_editable_set_position(GTK_EDITABLE(gtktext), origpos);
-	gtk_editable_select_region(GTK_EDITABLE(gtktext), origpos, origpos);
-}
-
-static void entry_delete_cb(GtkText *gtktext,
-		gint start, gint end, gpointer d) {
-	int origpos;
-
-	if (!gtkspell_running()) return;
-
-	origpos = gtk_editable_get_position(GTK_EDITABLE(gtktext));
-	check_at(gtktext, start-1);
-	gtk_editable_set_position(GTK_EDITABLE(gtktext), origpos);
-	gtk_editable_select_region(GTK_EDITABLE(gtktext), origpos, origpos);
-	/* this is to *UNDO* the selection, in case they were holding shift
-	 * while hitting backspace. */
-}
-
-static void replace_word(GtkWidget *w, gpointer d) {
-	int start, end;
-	char *newword;
-
-	/* we don't save their position, 
-	 * because the cursor is moved by the click. */
-
-	gtk_text_freeze(GTK_TEXT(d));
-
-	gtk_label_get(GTK_LABEL(GTK_BIN(w)->child), &newword);
-	get_curword(GTK_TEXT(d), NULL, &start, &end);
-
-	gtk_text_set_point(GTK_TEXT(d), end);
-	gtk_text_backward_delete(GTK_TEXT(d), end-start);
-	gtk_text_insert(GTK_TEXT(d), NULL, NULL, NULL, newword, strlen(newword));
-
-	gtk_text_thaw(GTK_TEXT(d));
-}
-
-static GtkMenu *make_menu(GList *l, GtkText *gtktext) {
-	static GtkWidget *menu = NULL;
-	GtkWidget *item;
-	char *caption;
-
-	/*
-	 * If a menu already exists, destroy it before creating a new one,
-	 * thus freeing-up the memory it occupied.
-	 */
-	if(menu)
-		gtk_widget_destroy(menu);
-
-	menu = gtk_menu_new(); {
-		caption = g_strdup_printf("Not in dictionary: %s", (char*)l->data);
-		item = gtk_menu_item_new_with_label(caption);
-		g_free(caption);
-		/* I'd like to make it so this item is never selectable, like
-		 * the menu titles in the GNOME panel... unfortunately, the GNOME
-		 * panel creates their own custom widget to do this! */
-		gtk_widget_show(item);
-		gtk_menu_append(GTK_MENU(menu), item);
-
-		item = gtk_menu_item_new();
-		gtk_widget_show(item);
-		gtk_menu_append(GTK_MENU(menu), item);
-
-		l = l->next;
-		if (l == NULL) {
-			item = gtk_menu_item_new_with_label("(no suggestions)");
-			gtk_widget_show(item);
-			gtk_menu_append(GTK_MENU(menu), item);
-		} else {
-			GtkWidget *curmenu = menu;
-			int count = 0;
-			do {
-				if (l->data == NULL && l->next != NULL) {
-					count = 0;
-					curmenu = gtk_menu_new();
-					item = gtk_menu_item_new_with_label("Other Possibilities...");
-					gtk_widget_show(item);
-					gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), curmenu);
-					gtk_menu_append(GTK_MENU(curmenu), item);
-					l = l->next;
-				} else if (count > MENUCOUNT) {
-					count -= MENUCOUNT;
-					item = gtk_menu_item_new_with_label("More...");
-					gtk_widget_show(item);
-					gtk_menu_append(GTK_MENU(curmenu), item);
-					curmenu = gtk_menu_new();
-					gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), curmenu);
-				}
-				item = gtk_menu_item_new_with_label((char*)l->data);
-				gtk_signal_connect(GTK_OBJECT(item), "activate",
-						GTK_SIGNAL_FUNC(replace_word), gtktext);
-				gtk_widget_show(item);
-				gtk_menu_append(GTK_MENU(curmenu), item);
-				count++;
-			} while ((l = l->next) != NULL);
-		}
-	}
-	return GTK_MENU(menu);
-}
-
-static void popup_menu(GtkText *gtktext, GdkEventButton *eb) {
-	char *buf = NULL;
-	GList *list, *l;
-
-	get_curword(gtktext, &buf, NULL, NULL);
-
-	list = misspelled_suggest(buf);
-	if (buf)
-		g_free(buf);
-	if (list != NULL) {
-		gtk_menu_popup(make_menu(list, gtktext), NULL, NULL, NULL, NULL,
-				eb->button, eb->time);
-		for (l = list; l != NULL; l = l->next)
-			g_free(l->data);
-		g_list_free(list);
-	}
-}
-
-/* ok, this is pretty wacky:
- * we need to let the right-mouse-click go through, so it moves the cursor, 
- * but we *can't* let it go through, because GtkText interprets rightclicks as
- * weird selection modifiers.
- *
- * so what do we do?  forge rightclicks as leftclicks, then popup the menu. 
- * HACK HACK HACK. 
- */
-static gint button_press_intercept_cb(GtkText *gtktext, GdkEvent *e, gpointer d) {
-	GdkEventButton *eb;
-	gboolean retval;
-
-	if (!gtkspell_running()) return FALSE;
-
-	if (e->type != GDK_BUTTON_PRESS) return FALSE;
-	eb = (GdkEventButton*) e;
-
-	if (eb->button != 3) return FALSE;
-
-	/* forge the leftclick */
-	eb->button = 1;
-
-	gtk_signal_handler_block_by_func(GTK_OBJECT(gtktext), 
-			GTK_SIGNAL_FUNC(button_press_intercept_cb), d);
-	gtk_signal_emit_by_name(GTK_OBJECT(gtktext), "button-press-event",
-			e, &retval);
-	gtk_signal_handler_unblock_by_func(GTK_OBJECT(gtktext), 
-			GTK_SIGNAL_FUNC(button_press_intercept_cb), d);
-	gtk_signal_emit_stop_by_name(GTK_OBJECT(gtktext), "button-press-event");
-
-	/* now do the menu wackiness */
-	popup_menu(gtktext, eb);
-	return TRUE;
-}
-
-void gtkspell_uncheck_all(GtkText *gtktext) {
-	int origpos;
-	char *text;
-	float adj_value;
-
-	adj_value = gtktext->vadj->value;
-	gtk_text_freeze(gtktext);
-	origpos = gtk_editable_get_position(GTK_EDITABLE(gtktext));
-	text = gtk_editable_get_chars(GTK_EDITABLE(gtktext), 0, -1);
-	gtk_text_set_point(gtktext, 0);
-	gtk_text_forward_delete(gtktext, gtk_text_get_length(gtktext));
-	gtk_text_insert(gtktext, NULL, NULL, NULL, text, strlen(text));
-	gtk_text_thaw(gtktext);
-	g_free(text);
-
-	gtk_editable_set_position(GTK_EDITABLE(gtktext), origpos);
-	gtk_adjustment_set_value(gtktext->vadj, adj_value);
-}
-
-void gtkspell_attach(GtkText *gtktext) {
-	gtk_signal_connect(GTK_OBJECT(gtktext), "insert-text",
-		GTK_SIGNAL_FUNC(entry_insert_cb), NULL);
-	gtk_signal_connect_after(GTK_OBJECT(gtktext), "delete-text",
-		GTK_SIGNAL_FUNC(entry_delete_cb), NULL);
-	gtk_signal_connect(GTK_OBJECT(gtktext), "button-press-event",
-			GTK_SIGNAL_FUNC(button_press_intercept_cb), NULL);
-}
-
-void gtkspell_detach(GtkText *gtktext) {
-	gtk_signal_disconnect_by_func(GTK_OBJECT(gtktext),
-		GTK_SIGNAL_FUNC(entry_insert_cb), NULL);
-	gtk_signal_disconnect_by_func(GTK_OBJECT(gtktext),
-		GTK_SIGNAL_FUNC(entry_delete_cb), NULL);
-	gtk_signal_disconnect_by_func(GTK_OBJECT(gtktext), 
-			GTK_SIGNAL_FUNC(button_press_intercept_cb), NULL);
-
-	gtkspell_uncheck_all(gtktext);
-}
-
--- a/src/gtkspell.h	Fri Oct 25 11:50:40 2002 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/* gtkspell - a spell-checking addon for GtkText
- * Copyright (c) 2000 Evan Martin.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * 
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
- */
-
-#ifndef __gtkspell_h__
-#define __gtkspell_h__
-
-/* PLEASE NOTE that this API is unstable and subject to change. */
-#define GTKSPELL_VERSION "0.3.2"
-
-extern int gtkspell_start(char *path, char *args[]);
-/* Spawns the spell checking program.
- *
- * Arguments:
- *  - "path" should be the full path to the spell checking program, or NULL
- *    if you want to search the PATH for args[0].
- *  - "args" should be a array of arguments to the spell checking program.
- *    The first element should be the name of the program.
- *    You should give the argument to run the spell checking program in the
- *    "embedded" mode.  for ispell, this is "-a".
- *    The last element should be NULL.
- * Return:
- *  0 on success, and -1 on error.
- *
- * Example:
- *  char *args[] = { "ispell", "-a", NULL };
- *  if (gtkspell_start(NULL, args) < 0) {
- *  	fprintf(stderr, "Unable to start GtkSpell.\n");
- *  	return -1;
- *  }
- *
- */
-
-
-extern void gtkspell_stop();
-/* Stop the spellchecking program.
- * This kills the spell checker's process and frees memory.
- */
-
-extern int gtkspell_running();
-/* Is gtkspell running?
- *
- * Return:
- * 	nonzero, positive pid if it's running
- * 	zero if is not running
- *
- * Example:
- *  if (gtkspell_running())
- *  	printf("gtkspell is running.\n");
- */
-
-extern void gtkspell_notrunning(void);
-/*
- * Set gtkspell status to "not running"
- * Intended to be used only by signal-catcher
- * when the SIGCHLD signal it catches matches
- * the gtkspell process i.d.
- *
- * Example:
- *	gtkspell_notrunning();
- */
-
-extern void gtkspell_attach(GtkText *text);
-/* Attach GtkSpell to a GtkText Widget.
- * This enables checking as you type and the popup menu.
- *
- * Arguments:
- *  - "text" is the widget to which GtkSpell should attach.
- *
- * Example:
- *  GtkWidget *text;
- *  text = gtk_text_new(NULL, NULL); 
- *  gtk_text_set_editable(GTK_TEXT(text), TRUE);
- *  gtkspell_attach(GTK_TEXT(text));
- */  
-
-void gtkspell_detach(GtkText *gtktext);
-/* Detach GtkSpell from a GtkText widget.
- * 
- * Arguments:
- *  - "text" is the widget from which GtkSpell should detach.
- * 
- */ 
-
-void gtkspell_check_all(GtkText *gtktext);
-/* Check and highlight the misspelled words.
- * Note that the popup menu will not work unless you gtkspell_attach().
- *
- * Arguments:
- *  - "text" is the widget to check.
- */
-
-void gtkspell_uncheck_all(GtkText *gtktext);
-/* Remove all of the highlighting from the widget.
- *
- * Arguments:
- *  - "text" is the widget to check.
- */
-
-#endif /* __gtkspell_h__ */
--- a/src/util.c	Fri Oct 25 11:50:40 2002 +0000
+++ b/src/util.c	Sat Oct 26 06:41:13 2002 +0000
@@ -45,7 +45,6 @@
 #include <math.h>
 #include "gaim.h"
 #include "prpl.h"
-#include "gtkspell.h"
 
 #ifdef _WIN32
 #include "win32dep.h"
@@ -643,26 +642,6 @@
 	return date;
 }
 
-
-void clean_pid(void)
-{
-#ifndef _WIN32
-	int status;
-	pid_t pid, spell_pid;
-
-	while((pid = waitpid(-1, &status, WNOHANG)) > 0) {
-		if((spell_pid = gtkspell_running()) != 0 && pid == spell_pid) {
-			gtkspell_notrunning();
-		}
-	}
-	if(pid < 0 && errno != ECHILD) {
-		char errmsg[BUFSIZ];
-		sprintf(errmsg, "Warning: waitpid() returned %d", pid);
-		perror(errmsg);
-	}
-#endif
-}
-
 struct aim_user *find_user(const char *name, int protocol)
 {
 	char *who = g_strdup(normalize(name));