changeset 6371:8f94cce8faa5

[gaim-migrate @ 6876] I think I touched almost every file. Here's what happened. I started off fixing up the Makefile.am and configure.ac files to help with the core/UI split some. Then I got annoyed with the build_{allow,deny}_list() functions that everything used, and decided to core/UI split privacy. While doing that, I decided to redesign the dialog. So now, a lot has changed, but not really so much. Just that most files got affected. Oh yeah, and the UI stuff was taken out of internal.h and moved to gtkinternal.h. If you use this, please be aware of this change. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 05 Aug 2003 10:55:04 +0000
parents a4b83df2165b
children 9dd4bb3cf1df
files ChangeLog configure.ac plugins/Makefile.am plugins/autorecon.c plugins/docklet/Makefile.am plugins/docklet/docklet-x11.c plugins/docklet/docklet.c plugins/events.c plugins/filectl.c plugins/gaim-remote/remote.c plugins/gaiminc.c plugins/gestures/Makefile.am plugins/gestures/gestures.c plugins/gtik.c plugins/history.c plugins/iconaway.c plugins/idle.c plugins/mailchk.c plugins/notify.c plugins/perl/perl.c plugins/raw.c plugins/simple.c plugins/spellchk.c plugins/statenotify.c plugins/ticker/Makefile.am plugins/ticker/ticker.c plugins/timestamp.c src/Makefile.am src/about.c src/away.c src/blist.c src/browser.c src/conversation.c src/core.c src/dialogs.c src/gaimrc.c src/gtkaccount.c src/gtkconn.c src/gtkconv.c src/gtkdebug.c src/gtkft.c src/gtkinternal.h src/gtknotify.c src/gtkpounce.c src/gtkprefs.c src/gtkprivacy.c src/gtkprivacy.h src/gtkrequest.c src/gtksound.c src/gtkutils.c src/idle.c src/internal.h src/log.c src/main.c src/privacy.c src/privacy.h src/protocols/gg/Makefile.am src/protocols/gg/gg.c src/protocols/irc/Makefile.am src/protocols/irc/cmds.c src/protocols/irc/irc.c src/protocols/jabber/Makefile.am src/protocols/jabber/jabber.c src/protocols/msn/Makefile.am src/protocols/msn/msn.c src/protocols/msn/msn.h src/protocols/msn/notification.c src/protocols/napster/Makefile.am src/protocols/napster/napster.c src/protocols/oscar/Makefile.am src/protocols/oscar/oscar.c src/protocols/toc/Makefile.am src/protocols/toc/toc.c src/protocols/trepia/Makefile.am src/protocols/trepia/trepia.c src/protocols/yahoo/Makefile.am src/protocols/yahoo/yahoo.c src/protocols/zephyr/Makefile.am src/protocols/zephyr/zephyr.c src/prpl.c src/sound.c src/status.c src/stock.c src/themes.c src/ui.h
diffstat 85 files changed, 1141 insertions(+), 752 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Aug 05 03:21:40 2003 +0000
+++ b/ChangeLog	Tue Aug 05 10:55:04 2003 +0000
@@ -5,9 +5,10 @@
 	  You'll need to reconfigure your settings for this plugin
 	* IRC protocol plugin rewritten (Ethan Blanton)
 	* Various dialog rewrites (Jabber vCard, Add Group, Alias Chat,
-	  Rename Group)
+	  Rename Group, Privacy)
 	* Shows "hiptop" icon for AIM buddies using hiptop
 	  devices (Robey Pointer)
+	* Privacy core/UI split.
 	* Various bug fixes (larne from irc, Tim Ringenbach, Bjoern 
 	  Voigt, Paul A (darkrain))
 	* British English "translation" updated (Sam Halliday)
--- a/configure.ac	Tue Aug 05 03:21:40 2003 +0000
+++ b/configure.ac	Tue Aug 05 10:55:04 2003 +0000
@@ -147,6 +147,7 @@
 
 AC_PATH_PROG(gaimpath, gaim)
 AC_SUBST(GTK_CFLAGS)
+AC_SUBST(GLIB_CFLAGS)
 
 AC_PATH_XTRA
 # We can't assume that $x_libraries will be set, because autoconf does not
--- a/plugins/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -54,7 +54,6 @@
 AM_CPPFLAGS = \
 	-DDATADIR=\"$(datadir)\" \
 	-DVERSION=\"$(VERSION)\" \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
 	$(DEBUG_CFLAGS) \
 	$(GTK_CFLAGS) \
--- a/plugins/autorecon.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/autorecon.c	Tue Aug 05 10:55:04 2003 +0000
@@ -107,7 +107,7 @@
 	                                                  /**  description    */
 	N_("When you are kicked offline, this reconnects you."), 
 	"Eric Warmenhoven <eric@warmenhoven.org>",        /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                          /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	plugin_unload,                                    /**< unload         */
--- a/plugins/docklet/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/docklet/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -22,7 +22,6 @@
 AM_CPPFLAGS = \
 	-DDATADIR=\"$(datadir)\" \
 	-DVERSION=\"$(VERSION)\" \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
 	$(DEBUG_CFLAGS) \
 	$(GTK_CFLAGS)
--- a/plugins/docklet/docklet-x11.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/docklet/docklet-x11.c	Tue Aug 05 10:55:04 2003 +0000
@@ -23,6 +23,7 @@
  */
 
 #include "internal.h"
+#include "gtkinternal.h"
 #include "debug.h"
 #include "stock.h"
 
--- a/plugins/docklet/docklet.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/docklet/docklet.c	Tue Aug 05 10:55:04 2003 +0000
@@ -30,6 +30,7 @@
     - optional pop up notices when GNOME2's system-tray-applet supports it */
 
 #include "internal.h"
+#include "gtkinternal.h"
 
 #include "core.h"
 #include "debug.h"
@@ -502,7 +503,7 @@
 	   "window. Also allows messages to be queued until the icon is "
 	   "clicked, similar to ICQ."),
 	"Robert McQueen <robot101@debian.org>",           /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	plugin_unload,                                    /**< unload         */
--- a/plugins/events.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/events.c	Tue Aug 05 10:55:04 2003 +0000
@@ -240,7 +240,7 @@
 	                                                  /**  description    */
 	N_("Test to see that all events are working properly."),
 	"Eric Warmenhoven <eric@warmenhoven.org>",        /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                          /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	NULL,                                             /**< unload         */
--- a/plugins/filectl.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/filectl.c	Tue Aug 05 10:55:04 2003 +0000
@@ -205,7 +205,7 @@
 	                                                  /**  description    */
 	N_("Allows you to control Gaim by entering commands in a file."),
 	"Eric Warmenhoven <eric@warmenhoven.org>",        /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                          /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	plugin_unload,                                    /**< unload         */
--- a/plugins/gaim-remote/remote.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/gaim-remote/remote.c	Tue Aug 05 10:55:04 2003 +0000
@@ -1,4 +1,4 @@
-/*
+/**
  * Remote control plugin for Gaim
  *
  * Copyright (C) 2003 Christian Hammond.
@@ -22,6 +22,7 @@
  * @todo Make this a core plugin!
  */
 #include "internal.h"
+#include "gtkinternal.h"
 
 #ifndef _WIN32
 # include <sys/un.h>
@@ -718,7 +719,7 @@
 	N_("Gives Gaim the ability to be remote-controlled through third-party "
 	   "applications or through the gaim-remote tool."),
 	"Christian Hammond <chipx86@gnupdate.org>",       /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	plugin_unload,                                    /**< unload         */
--- a/plugins/gaiminc.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/gaiminc.c	Tue Aug 05 10:55:04 2003 +0000
@@ -80,7 +80,7 @@
 	   "- It sends a message to people on your list immediately"
 	   " when they sign on"),
 	"Eric Warmenhoven <eric@warmenhoven.org>",        /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                          /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	NULL,                                    /**< unload         */
--- a/plugins/gestures/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/gestures/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -18,7 +18,6 @@
 AM_CPPFLAGS = \
 	-DDATADIR=\"$(datadir)\" \
 	-DVERSION=\"$(VERSION)\" \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
 	$(DEBUG_CFLAGS) \
 	$(GTK_CFLAGS)
--- a/plugins/gestures/gestures.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/gestures/gestures.c	Tue Aug 05 10:55:04 2003 +0000
@@ -19,6 +19,7 @@
  * 02111-1307, USA.
  */
 #include "internal.h"
+#include "gtkinternal.h"
 
 #include "debug.h"
 #include "prefs.h"
@@ -29,7 +30,7 @@
 
 #include "gstroke.h"
 
-#define GESTURES_PLUGIN_ID "gtk-X11-gestures"
+#define GESTURES_PLUGIN_ID "gtk-x11-gestures"
 
 static void
 stroke_close(GtkWidget *widget, void *data)
@@ -283,7 +284,7 @@
 	   "Drag up and then to the right to switch to the next "
 	   "conversation."),
 	"Christian Hammond <chipx86@gnupdate.org>",       /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	plugin_unload,                                    /**< unload         */
--- a/plugins/gtik.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/gtik.c	Tue Aug 05 10:55:04 2003 +0000
@@ -609,7 +609,7 @@
 					    "Do not use the Gnome Stock Ticker for making investment decisions; it is for "
 					    "informational purposes only.");
 		desc.authors = g_strdup("Jayson Lorenzen, Jim Garrison, Rached Blili");
-		desc.url = g_strdup(WEBSITE);
+		desc.url = g_strdup(GAIM_WEBSITE);
 		return &desc;
 	}
 
--- a/plugins/history.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/history.c	Tue Aug 05 10:55:04 2003 +0000
@@ -1,7 +1,7 @@
 /* Puts last 4k of log in new conversations a la Everybuddy (and then
  * stolen by Trillian "Pro") */
 
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "conversation.h"
 #include "debug.h"
@@ -12,7 +12,7 @@
 #include "gtkimhtml.h"
 #include "gtkplugin.h"
 
-#define HISTORY_PLUGIN_ID "core-history"
+#define HISTORY_PLUGIN_ID "gtk-history"
 
 #define HISTORY_SIZE (4 * 1024)
 
@@ -89,7 +89,7 @@
 	N_("Shows recently logged conversations in new conversations."),
 	N_("When a new conversation is opened this plugin will insert the last XXX of the last conversation into the current conversation."),
 	"Sean Egan <bj91704@binghamton.edu>",
-	WEBSITE,
+	GAIM_WEBSITE,
 	plugin_load,
 	NULL,
 	NULL,
--- a/plugins/iconaway.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/iconaway.c	Tue Aug 05 10:55:04 2003 +0000
@@ -1,4 +1,4 @@
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "conversation.h"
 
@@ -78,7 +78,7 @@
 	                                                  /**  description    */
 	N_("Iconifies the buddy list and your conversations when you go away."),
 	"Eric Warmenhoven <eric@warmenhoven.org>",        /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                          /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	NULL,                                             /**< unload         */
--- a/plugins/idle.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/idle.c	Tue Aug 05 10:55:04 2003 +0000
@@ -121,7 +121,7 @@
 	N_("Allows you to hand-configure how long you've been idle for"),
 	N_("Allows you to hand-configure how long you've been idle for"),
 	"Eric Warmenhoven &lt;eric@warmenhoven.org>",
-	WEBSITE,
+	GAIM_WEBSITE,
 	NULL,
 	NULL,
 	NULL,
--- a/plugins/mailchk.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/mailchk.c	Tue Aug 05 10:55:04 2003 +0000
@@ -154,7 +154,7 @@
 	N_("Checks for new local mail."),
 	N_("Checks for new local mail."),
 	"Eric Warmenhoven <eric@warmenhoven.org>",
-	WEBSITE,
+	GAIM_WEBSITE,
 	plugin_load,
 	plugin_unload,
 	NULL,
--- a/plugins/notify.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/notify.c	Tue Aug 05 10:55:04 2003 +0000
@@ -51,7 +51,7 @@
  *  -Other random fixes and cleanups
  */
 
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "conversation.h"
 #include "debug.h"
@@ -850,7 +850,7 @@
 	N_("Provides a variety of ways of notifying you of unread messages."),
 	"Etan Reisner <deryni@eden.rutgers.edu>\n\t\t\tBrian Tarricone <bjt23@cornell.edu",
 	                                                  /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                          /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	plugin_unload,                                    /**< unload         */
--- a/plugins/perl/perl.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/perl/perl.c	Tue Aug 05 10:55:04 2003 +0000
@@ -93,6 +93,8 @@
 #include "server.h"
 #include "sound.h"
 
+/* XXX CORE/UI */
+#include "gtkinternal.h"
 #include "ui.h"
 
 #ifndef call_pv
@@ -1399,7 +1401,7 @@
 	N_("Provides support for loading perl plugins."), /**< summary        */
 	N_("Provides support for loading perl plugins."), /**< description    */
 	"Christian Hammond <chipx86@gnupdate.org>",       /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	NULL,                                             /**< load           */
 	plugin_unload,                                    /**< unload         */
--- a/plugins/raw.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/raw.c	Tue Aug 05 10:55:04 2003 +0000
@@ -155,7 +155,7 @@
 	N_("Lets you send raw input to text-based protocols (Jabber, MSN, IRC, "
 	   "TOC). Hit 'Enter' in the entry box to send. Watch the debug window."),
 	"Eric Warmenhoven <eric@warmenhoven.org>",
-	WEBSITE,
+	GAIM_WEBSITE,
 	plugin_load,
 	plugin_unload,
 	NULL,
--- a/plugins/simple.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/simple.c	Tue Aug 05 10:55:04 2003 +0000
@@ -34,7 +34,7 @@
 	                                                  /**  description    */
 	N_("Tests to see that most things are working."),
 	"Eric Warmenhoven <eric@warmenhoven.org>",        /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                          /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	plugin_unload,                                    /**< unload         */
--- a/plugins/spellchk.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/spellchk.c	Tue Aug 05 10:55:04 2003 +0000
@@ -519,7 +519,7 @@
 	N_("Replaces text in outgoing messages according to user-defined rules."),
 	N_("Replaces text in outgoing messages according to user-defined rules."),
 	"Eric Warmnenhoven <eric@warmenhoven.org>",
-	WEBSITE,
+	GAIM_WEBSITE,
 	plugin_load,
 	NULL,
 	NULL,
--- a/plugins/statenotify.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/statenotify.c	Tue Aug 05 10:55:04 2003 +0000
@@ -78,7 +78,7 @@
 	N_("Notifies in a conversation window when a buddy goes or returns from "
 	   "away or idle."),
 	"Christian Hammond <chipx86@gnupdate.org>",       /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                          /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	NULL,                                             /**< unload         */
--- a/plugins/ticker/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/ticker/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -19,7 +19,6 @@
 AM_CPPFLAGS = \
 	-DDATADIR=\"$(datadir)\" \
 	-DVERSION=\"$(VERSION)\" \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
 	$(DEBUG_CFLAGS) \
 	$(GTK_CFLAGS)
--- a/plugins/ticker/ticker.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/ticker/ticker.c	Tue Aug 05 10:55:04 2003 +0000
@@ -25,6 +25,7 @@
  * pluginized- Sean Egan, Summer 2002
  */
 #include "internal.h"
+#include "gtkinternal.h"
 
 #include "blist.h"
 #include "conversation.h"
@@ -316,7 +317,7 @@
 	                                                  /**  description    */
 	N_("A horizontal scrolling version of the buddy list."),
 	"Syd Logan",                                      /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	plugin_unload,                                    /**< unload         */
--- a/plugins/timestamp.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/plugins/timestamp.c	Tue Aug 05 10:55:04 2003 +0000
@@ -152,7 +152,7 @@
 	                                                  /**  description    */
 	N_("Adds iChat-style timestamps to conversations every N minutes."),
 	"Sean Egan <bj91704@binghamton.edu>",             /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                          /**< homepage       */
 
 	plugin_load,                                      /**< load           */
 	plugin_unload,                                    /**< unload         */
--- a/src/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -62,6 +62,7 @@
 	plugin.h \
 	pounce.c \
 	pounce.h \
+	privacy.c \
 	privacy.h \
 	proxy.c \
 	proxy.h \
@@ -116,6 +117,8 @@
 	gtkplugin.h \
 	gtkprefs.c \
 	gtkprefs.h \
+	gtkprivacy.c \
+	gtkprivacy.h \
 	gtkpounce.c \
 	gtkpounce.h \
 	gtkrequest.c \
@@ -159,7 +162,6 @@
 	-DDATADIR=\"$(datadir)\" \
 	-DLIBDIR=\"$(libdir)/gaim/\" \
 	-DLOCALEDIR=\"$(datadir)/locale\" \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/plugins \
 	$(AUDIOFILE_CFLAGS) \
 	$(AO_CFLAGS) \
--- a/src/about.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/about.c	Tue Aug 05 10:55:04 2003 +0000
@@ -91,8 +91,8 @@
 					  "Gtk+ and is licensed under the GPL.<BR><BR>"), -1, GTK_IMHTML_NO_SCROLL);
 
 		gtk_imhtml_append_text(GTK_IMHTML(text),
-				"<FONT SIZE=\"3\">URL:</FONT> <A HREF=\"" WEBSITE "\">"
-				WEBSITE "</A><BR><BR>", -1, GTK_IMHTML_NO_SCROLL);
+				"<FONT SIZE=\"3\">URL:</FONT> <A HREF=\"" GAIM_WEBSITE "\">"
+				GAIM_WEBSITE "</A><BR><BR>", -1, GTK_IMHTML_NO_SCROLL);
 
 		gtk_imhtml_append_text(GTK_IMHTML(text),
 				_("<FONT SIZE=\"3\">IRC:</FONT> #gaim on irc.freenode.net"
--- a/src/away.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/away.c	Tue Aug 05 10:55:04 2003 +0000
@@ -27,9 +27,9 @@
 #include "prpl.h"
 #include "util.h"
 
-/* XXX Until we can get rid of the message queue stuff... */
+/* XXX CORE/UI: Until we can get rid of the message queue stuff... */
 #include "gaim.h"
-
+#include "gtkinternal.h"
 #include "gtkblist.h"
 #include "gtkimhtml.h"
 #include "gtkprefs.h"
--- a/src/blist.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/blist.c	Tue Aug 05 10:55:04 2003 +0000
@@ -1959,74 +1959,6 @@
 	g_free(filename_real);
 }
 
-gboolean gaim_privacy_permit_add(GaimAccount *account, const char *who) {
-	GSList *d = account->permit;
-	char *n = g_strdup(normalize(who));
-	while(d) {
-		if(!gaim_utf8_strcasecmp(n, normalize(d->data)))
-			break;
-		d = d->next;
-	}
-	g_free(n);
-	if(!d) {
-		account->permit = g_slist_append(account->permit, g_strdup(who));
-		return TRUE;
-	}
-
-	return FALSE;
-}
-
-gboolean gaim_privacy_permit_remove(GaimAccount *account, const char *who) {
-	GSList *d = account->permit;
-	char *n = g_strdup(normalize(who));
-	while(d) {
-		if(!gaim_utf8_strcasecmp(n, normalize(d->data)))
-			break;
-		d = d->next;
-	}
-	g_free(n);
-	if(d) {
-		account->permit = g_slist_remove(account->permit, d->data);
-		g_free(d->data);
-		return TRUE;
-	}
-	return FALSE;
-}
-
-gboolean gaim_privacy_deny_add(GaimAccount *account, const char *who) {
-	GSList *d = account->deny;
-	char *n = g_strdup(normalize(who));
-	while(d) {
-		if(!gaim_utf8_strcasecmp(n, normalize(d->data)))
-			break;
-		d = d->next;
-	}
-	g_free(n);
-	if(!d) {
-		account->deny = g_slist_append(account->deny, g_strdup(who));
-		return TRUE;
-	}
-
-	return FALSE;
-}
-
-gboolean gaim_privacy_deny_remove(GaimAccount *account, const char *who) {
-	GSList *d = account->deny;
-	char *n = g_strdup(normalize(who));
-	while(d) {
-		if(!gaim_utf8_strcasecmp(n, normalize(d->data)))
-			break;
-		d = d->next;
-	}
-	g_free(n);
-	if(d) {
-		account->deny = g_slist_remove(account->deny, d->data);
-		g_free(d->data);
-		return TRUE;
-	}
-	return FALSE;
-}
-
 void gaim_group_set_setting(struct group *g, const char *key,
 		const char *value) {
 	if(!g)
--- a/src/browser.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/browser.c	Tue Aug 05 10:55:04 2003 +0000
@@ -25,7 +25,7 @@
  * their protocol.  Nifty.
  *
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include <gdk/gdkprivate.h>
 
--- a/src/conversation.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/conversation.c	Tue Aug 05 10:55:04 2003 +0000
@@ -27,7 +27,8 @@
 #include "prpl.h"
 #include "util.h"
 
-/* XXX */
+/* XXX CORE/UI */
+#include "gtkinternal.h"
 #include "ui.h"
 
 typedef struct
--- a/src/core.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/core.c	Tue Aug 05 10:55:04 2003 +0000
@@ -29,6 +29,7 @@
 #include "plugin.h"
 #include "pounce.h"
 #include "prefs.h"
+#include "privacy.h"
 #include "proxy.h"
 #include "sound.h"
 
@@ -73,9 +74,10 @@
 	}
 
 	gaim_conversation_init();
+	gaim_privacy_init();
+	gaim_pounces_init();
 	gaim_proxy_init();
 	gaim_sound_init();
-	gaim_pounces_init();
 	gaim_xfers_init();
 
 	if (ops != NULL && ops->ui_init != NULL)
--- a/src/dialogs.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/dialogs.c	Tue Aug 05 10:55:04 2003 +0000
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "debug.h"
 #include "log.h"
@@ -597,8 +597,9 @@
 	gtk_widget_show_all(window);
 }
 
-void show_info_select_account(GObject *w, GaimAccount *account,
-							  struct getuserinfo *info)
+static void
+show_info_select_account(GObject *w, GaimAccount *account,
+						 struct getuserinfo *info)
 {
 	info->gc = gaim_account_get_connection(account);
 }
@@ -1359,481 +1360,6 @@
 }
 
 
-
-/*------------------------------------------------------------------------*
- *  Privacy Settings                                                      *
- *------------------------------------------------------------------------*/
-static GtkWidget *privacy_win;
-static GtkWidget *privacy_sensbox;
-
-static GtkWidget *deny_type = NULL;
-static GtkWidget *deny_conn_hbox = NULL;
-static GtkWidget *deny_opt_menu = NULL;
-static GaimConnection *current_deny_gc = NULL;
-static gboolean current_is_deny = FALSE;
-static GtkWidget *allow_list = NULL;
-static GtkWidget *block_list = NULL;
-
-static GtkListStore *block_store = NULL;
-static GtkListStore *allow_store = NULL;
-
-static void set_deny_mode(GtkWidget *w, int data)
-{
-	if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
-		return;
-
-	gaim_debug(GAIM_DEBUG_INFO, "privacy", "Setting deny mode %d\n", data);
-	current_deny_gc->account->perm_deny = data;
-	serv_set_permit_deny(current_deny_gc);
-	gaim_blist_save();
-}
-
-static GtkWidget *deny_opt(char *label, int which, GtkWidget *set)
-{
-	GtkWidget *opt;
-
-	if (!set)
-		opt = gtk_radio_button_new_with_label(NULL, label);
-	else
-		opt =
-		    gtk_radio_button_new_with_label(gtk_radio_button_get_group(
-						GTK_RADIO_BUTTON(set)),
-						    label);
-
-	g_signal_connect(G_OBJECT(opt), "toggled", G_CALLBACK(set_deny_mode), (void *)which);
-	gtk_widget_show(opt);
-	if (current_deny_gc->account->perm_deny == which)
-		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(opt), TRUE);
-
-	return opt;
-}
-
-static void des_deny_opt(GtkWidget *d, gpointer e)
-{
-	gtk_widget_destroy(d);
-	current_deny_gc = NULL;
-	deny_conn_hbox = NULL;
-	deny_type = NULL;
-	deny_opt_menu = NULL;
-	current_is_deny = FALSE;
-	allow_list = NULL;
-	allow_store = NULL;
-
-	block_list = NULL;
-	block_store = NULL;
-}
-
-static void set_deny_type()
-{
-	GSList *bg = gtk_radio_button_get_group(GTK_RADIO_BUTTON(deny_type));
-
-	switch (current_deny_gc->account->perm_deny) {
-	case 5:
-		bg = bg->next->next;
-		break;
-	case 4:
-		break;
-	case 3:
-		bg = bg->next->next->next;
-		break;
-	case 2:
-		bg = bg->next;
-		break;
-	case 1:
-		bg = bg->next->next->next->next;
-		break;
-	}
-
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(bg->data), TRUE);
-}
-
-void build_allow_list()
-{
-	GSList *p;
-	GtkListStore *ls;
-	GtkTreeIter iter;
-
-	if (!current_is_deny)
-		return;
-
-	p = current_deny_gc->account->permit;
-
-	gtk_list_store_clear(GTK_LIST_STORE(allow_store));
-
-	while (p) {
-		ls = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(allow_list)));
-
-		gtk_list_store_append(ls, &iter);
-		gtk_list_store_set(ls, &iter, 0, p->data, -1);
-
-		p = p->next;
-	}
-}
-
-
-void build_block_list()
-{
-	GSList *d;
-	GtkListStore *ls;
-	GtkTreeIter iter;
-
-	if (!current_is_deny)
-		return;
-
-	d = current_deny_gc->account->deny;
-
-	gtk_list_store_clear(GTK_LIST_STORE(block_store));
-
-	while (d) {
-		ls = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(block_list)));
-
-		gtk_list_store_append(ls, &iter);
-		gtk_list_store_set(ls, &iter, 0, d->data, -1);
-
-		d = d->next;
-	}
-}
-
-static void deny_gc_opt(GtkWidget *opt, GaimConnection *gc)
-{
-	current_deny_gc = gc;
-	set_deny_type();
-	build_allow_list();
-	build_block_list();
-}
-
-static void build_deny_menu()
-{
-	GtkWidget *menu;
-	GtkWidget *opt;
-	GList *c = gaim_connections_get_all();
-	GaimConnection *gc;
-	GaimAccount *account;
-	int count = 0;
-	gboolean found = FALSE;
-	char buf[2048];
-
-	if (g_list_length(gaim_connections_get_all()) == 1) {
-		gtk_widget_hide(deny_conn_hbox);
-		return;
-	} else
-		gtk_widget_show(deny_conn_hbox);
-
-	menu = gtk_menu_new();
-
-	while (c) {
-		gc = (GaimConnection *)c->data;
-		c = c->next;
-
-		if (!GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->set_permit_deny)
-			continue;
-
-		account = gaim_connection_get_account(gc);
-
-		g_snprintf(buf, sizeof buf, "%s (%s)",
-				   gaim_account_get_username(account), gc->prpl->info->name);
-		opt = gtk_menu_item_new_with_label(buf);
-		g_signal_connect(G_OBJECT(opt), "activate", G_CALLBACK(deny_gc_opt), gc);
-		gtk_widget_show(opt);
-		gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt);
-		if (gc == current_deny_gc)
-			found = TRUE;
-		else if (!found)
-			count++;
-	}
-
-	if (!found) {
-		current_deny_gc = gaim_connections_get_all()->data;
-		count = 0;
-	}
-
-	gtk_option_menu_remove_menu(GTK_OPTION_MENU(deny_opt_menu));
-	gtk_option_menu_set_menu(GTK_OPTION_MENU(deny_opt_menu), menu);
-	gtk_option_menu_set_history(GTK_OPTION_MENU(deny_opt_menu), count);
-
-	gtk_widget_show(menu);
-	gtk_widget_show(deny_opt_menu);
-}
-
-static void pref_deny_add(GtkWidget *button, gboolean permit)
-{
-	show_add_perm(current_deny_gc, NULL, permit);
-}
-
-
-gchar *find_permdeny_by_name(GSList *l, char *who) {
-	gchar *name;
-	
-	while (l) {
-		name = (gchar *)l->data;
-		if (!strcmp(name, who)) {
-			return name;
-		}
-		
-		l = l->next;
-	}
-
-	return NULL;
-}
-
-static void pref_deny_rem(GtkWidget *button, gboolean permit)
-{
-	gchar *who;
-	GtkTreeIter iter;
-	GtkTreeModel *mod;
-	GtkTreeSelection *sel;
-
-	if (permit) {
-		mod = gtk_tree_view_get_model(GTK_TREE_VIEW(allow_list));
-		sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(allow_list));
-	} else {
-		mod = gtk_tree_view_get_model(GTK_TREE_VIEW(block_list));
-		sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(block_list));
-	}
-
-	if (gtk_tree_selection_get_selected(sel, NULL, &iter))
-		gtk_tree_model_get(GTK_TREE_MODEL(mod), &iter, 0, &who, -1);
-	else {
-		return;
-	}
-
-	if (permit && !allow_list)
-		return;
-
-	if (!permit && !block_list)
-		return;
-
-	if (permit) {
-		char *name = find_permdeny_by_name(current_deny_gc->account->permit, who);
-
-		if (name) {
-			gaim_privacy_permit_remove(current_deny_gc->account, name);
-			serv_rem_permit(current_deny_gc, who);
-			build_allow_list();
-		}
-	} else {
-		char *name = find_permdeny_by_name(current_deny_gc->account->deny, who);
-
-		if (name) {
-			gaim_privacy_deny_remove(current_deny_gc->account, name);
-			serv_rem_deny(current_deny_gc, who);
-			build_block_list();
-		}
-	}
-
-	gaim_blist_save();
-}
-
-void update_privacy_connections() { /* This is a slightly better name */
-	gboolean needdeny = FALSE;
-	GList *c = gaim_connections_get_all();
-	GaimConnection *gc = NULL;
-
-	if (!privacy_win)
-		return;
-
-	while (c) {
-		gc = c->data;
-		if (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->set_permit_deny)
-			break;
-		gc = NULL;
-		c = c->next;
-	}
-	needdeny = (gc != NULL);
-	
-
-	if (needdeny) {
-		gtk_widget_set_sensitive(privacy_sensbox, TRUE);
-		build_deny_menu();
-		build_allow_list();
-		build_block_list();
-	} else {
-		gtk_widget_set_sensitive(privacy_sensbox, FALSE);
-	}
-}
-static void destroy_privacy() {
-	current_deny_gc = NULL;
-	privacy_win = NULL;
-	privacy_sensbox = NULL;
-}
-
-void show_privacy_options() {
-	GtkWidget *pwin;
-	GtkWidget *box;
-	GtkWidget *box2;
-	GtkWidget *hbox;
-	GtkWidget *label;
-	GtkWidget *sw;
-	GtkWidget *bbox;
-	GtkWidget *button;
-	GtkWidget *sep;
-	GtkWidget *close_button;
-	GtkSizeGroup *sg1 = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
-	GtkSizeGroup *sg2 = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
-	GtkCellRenderer *rend;
-	GtkTreeViewColumn *col;
-	GtkWidget *table;
-
-	if (privacy_win != NULL) {
-		gtk_widget_show(privacy_win);
-		gdk_window_raise(privacy_win->window);
-		return;
-	}
-
-	current_deny_gc = gaim_connections_get_all()->data;	/* this is safe because this screen will only be
-						   available when there are gaim_connections_get_all() */
-	current_is_deny = TRUE;
-
-	privacy_win = pwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-	gtk_window_set_resizable(GTK_WINDOW(pwin), FALSE);
-	gtk_window_set_role(GTK_WINDOW(pwin), "privacy");
-	gtk_window_set_title(GTK_WINDOW(pwin), _("Privacy"));
-	g_signal_connect(G_OBJECT(pwin), "destroy", G_CALLBACK(destroy_privacy), NULL);
-	gtk_widget_realize(pwin);
-
-	gtk_widget_set_size_request(pwin, -1, 400);
-
-	box = gtk_vbox_new(FALSE, 5);
-	gtk_container_set_border_width(GTK_CONTAINER(box), 5);
-	gtk_container_add(GTK_CONTAINER(pwin), box);
-	gtk_widget_show(box);
-
-	privacy_sensbox = box2 = gtk_vbox_new(FALSE, 5);
-	gtk_container_set_border_width(GTK_CONTAINER(box2), 5);
-	gtk_box_pack_start(GTK_BOX(box), box2, TRUE, TRUE, 0);
-	gtk_widget_show(box2);
-
-	label = gtk_label_new(_("Changes to privacy settings take effect immediately."));
-	gtk_box_pack_start(GTK_BOX(box2), label, FALSE, FALSE, 0);
-	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-	gtk_widget_show(label);
-
-	deny_conn_hbox = gtk_hbox_new(FALSE, 5);
-	gtk_box_pack_start(GTK_BOX(box2), deny_conn_hbox, FALSE, FALSE, 5);
-	gtk_widget_show(deny_conn_hbox);
-
-	label = gtk_label_new(_("Set privacy for:"));
-	gtk_box_pack_start(GTK_BOX(deny_conn_hbox), label, FALSE, FALSE, 5);
-	gtk_widget_show(label);
-
-	deny_opt_menu = gtk_option_menu_new();
-	gtk_box_pack_start(GTK_BOX(deny_conn_hbox), deny_opt_menu, FALSE, FALSE, 5);
-	g_signal_connect(G_OBJECT(deny_opt_menu), "destroy", G_CALLBACK(des_deny_opt), NULL);
-	gtk_widget_show(deny_opt_menu);
-
-	build_deny_menu();
-
-	table = gtk_table_new(5, 2, FALSE);
-	gtk_box_pack_start(GTK_BOX(box2), table, TRUE, TRUE, 0);
-	gtk_table_set_row_spacings(GTK_TABLE(table), 7);
-	gtk_table_set_col_spacings(GTK_TABLE(table), 5);
-	gtk_widget_show(table);
-
-	deny_type = deny_opt(_("Allow all users to contact me"), 1, NULL);
-	gtk_size_group_add_widget(sg1, deny_type);
-	gtk_table_attach(GTK_TABLE(table), deny_type, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
-	
-	deny_type = deny_opt(_("Allow only users on my buddy list"), 5, deny_type);
-	gtk_size_group_add_widget(sg1, deny_type);
-	gtk_table_attach(GTK_TABLE(table), deny_type, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
-
-	deny_type = deny_opt(_("Allow only the users below"), 3, deny_type);
-	gtk_size_group_add_widget(sg1, deny_type);
-	gtk_table_attach(GTK_TABLE(table), deny_type, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
-
-	sw = gtk_scrolled_window_new(NULL, NULL);
-	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-	gtk_table_attach(GTK_TABLE(table), sw, 0, 1, 3, 4, GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_widget_show(sw);
-
-	allow_store = gtk_list_store_new(1, G_TYPE_STRING);
-	allow_list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(allow_store));
-
-	rend = gtk_cell_renderer_text_new();
-	col = gtk_tree_view_column_new_with_attributes(NULL, rend, "text", 0, NULL);
-	gtk_tree_view_column_set_clickable(GTK_TREE_VIEW_COLUMN(col), TRUE);
-	gtk_tree_view_append_column(GTK_TREE_VIEW(allow_list), col);
-	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(allow_list), FALSE);
-	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), allow_list);
-	gtk_widget_show(allow_list);
-
-	build_allow_list();
-
-	bbox = gtk_hbox_new(TRUE, 0);
-	gtk_widget_show(bbox);
-	gtk_table_attach(GTK_TABLE(table), bbox, 0, 1, 4, 5, GTK_FILL, 0, 0, 0);
-
-	button = gtk_button_new_from_stock(GTK_STOCK_ADD);
-	gtk_size_group_add_widget(sg2, button);
-	gtk_widget_show(button);
-	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(pref_deny_add), (void *)TRUE);
-	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
-
-	button = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
-	gtk_size_group_add_widget(sg2, button);
-	gtk_widget_show(button);
-	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(pref_deny_rem), (void *)TRUE);
-	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
-
-	deny_type = deny_opt(_("Deny all users"), 2, deny_type);
-	gtk_size_group_add_widget(sg1, deny_type);
-	gtk_table_attach(GTK_TABLE(table), deny_type, 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
-
-	deny_type = deny_opt(_("Block the users below"), 4, deny_type);
-	gtk_size_group_add_widget(sg1, deny_type);
-	gtk_table_attach(GTK_TABLE(table), deny_type, 1, 2, 2, 3, GTK_FILL, 0, 0, 0);
-
-	sw = gtk_scrolled_window_new(NULL, NULL);
-	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-	gtk_table_attach(GTK_TABLE(table), sw, 1, 2, 3, 4, GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_widget_show(sw);
-
-	block_store = gtk_list_store_new(1, G_TYPE_STRING);
-	block_list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(block_store));
-
-	rend = gtk_cell_renderer_text_new();
-	col = gtk_tree_view_column_new_with_attributes(NULL, rend, "text", 0, NULL);
-	gtk_tree_view_column_set_clickable(GTK_TREE_VIEW_COLUMN(col), TRUE);
-	gtk_tree_view_append_column(GTK_TREE_VIEW(block_list), col);
-	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(block_list), FALSE);
-	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), block_list);
-	gtk_widget_show(block_list);
-
-	build_block_list();
-
-	bbox = gtk_hbox_new(TRUE, 0);
-	gtk_table_attach(GTK_TABLE(table), bbox, 1, 2, 4, 5, GTK_FILL, 0, 0, 0);
-	gtk_widget_show(bbox);
-
-	button = gtk_button_new_from_stock(GTK_STOCK_ADD);
-	gtk_size_group_add_widget(sg2, button);
-	gtk_widget_show(button);
-	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(pref_deny_add), FALSE);	
-	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
-
-	button = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
-	gtk_size_group_add_widget(sg2, button);
-	gtk_widget_show(button);
-	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(pref_deny_rem), FALSE);
-	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
-
-	sep = gtk_hseparator_new();
-	gtk_box_pack_start(GTK_BOX(box), sep, FALSE, FALSE, 5);
-	gtk_widget_show(sep);
-
-	hbox = gtk_hbox_new(FALSE, 0);
-	gtk_box_pack_start(GTK_BOX(box), hbox, FALSE, FALSE, 0);
-	gtk_widget_show(hbox);
-
-	close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
-	gtk_box_pack_end(GTK_BOX(hbox), close_button, FALSE, FALSE, 0);
-	g_signal_connect_swapped(G_OBJECT(close_button), "clicked", G_CALLBACK(gtk_widget_destroy), pwin);
-	gtk_widget_show(close_button);
-
-	gtk_widget_show(pwin);
-}
-
-
 /*------------------------------------------------------------------------*/
 /*  The dialog for SET INFO / SET DIR INFO                                */
 /*------------------------------------------------------------------------*/
@@ -2318,84 +1844,6 @@
 		serv_get_away(gc, who);
 }
 
-/*------------------------------------------------------------------------*/
-/*  The dialog for adding to permit/deny                                  */
-/*------------------------------------------------------------------------*/
-
-static void
-destroy_block_data_cb(GaimGtkBlockData *data)
-{
-	g_free(data->username);
-	g_free(data);
-}
-
-static void
-block_unblock_cb(GaimGtkBlockData *data)
-{
-	GaimAccount *account;
-
-	account = gaim_connection_get_account(data->gc);
-
-	if (data->block) {
-		if (gaim_privacy_deny_add(account, data->username)) {
-			serv_add_deny(data->gc, data->username);
-			build_block_list();
-			gaim_blist_save();
-		}
-	}
-	else {
-		if (gaim_privacy_permit_add(account, data->username)) {
-			serv_add_permit(data->gc, data->username);
-			build_allow_list();
-			gaim_blist_save();
-		}
-	}
-
-	destroy_block_data_cb(data);
-}
-
-void
-show_add_perm(GaimConnection *gc, char *who, gboolean permit)
-{
-	char *primary, *secondary;
-	GaimGtkBlockData *data;
-
-	data = g_new0(GaimGtkBlockData, 1);
-
-	data->gc       = gc;
-	data->block    = !permit;
-	data->username = g_strdup(who);
-
-	if (permit) {
-		primary = g_strdup_printf(_("Unblock %s?"), who);
-		secondary = g_strdup_printf(
-				_("You are about to unblock %s. This will allow %s "
-				  "to speak to you again. Do you want to continue?"),
-				who, who);
-
-		gaim_request_action(gc, _("Unblock User"), primary, secondary,
-							0, data, 2,
-							_("Unblock"), G_CALLBACK(block_unblock_cb),
-							_("Cancel"), G_CALLBACK(destroy_block_data_cb));
-	}
-	else
-	{
-		primary = g_strdup_printf(_("Block %s?"), who);
-		secondary = g_strdup_printf(
-				_("You are about to block %s. This will prevent %s "
-				  "from speaking to you again. Do you want to continue?"),
-				who, who);
-
-		gaim_request_action(gc, _("Unblock User"), primary, secondary,
-							0, data, 2,
-							_("Block"), G_CALLBACK(block_unblock_cb),
-							_("Cancel"), G_CALLBACK(destroy_block_data_cb));
-	}
-
-	g_free(primary);
-	g_free(secondary);
-}
-
 
 /*------------------------------------------------------------------------*/
 /*  Functions Called To Add A Log                                          */
--- a/src/gaimrc.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gaimrc.c	Tue Aug 05 10:55:04 2003 +0000
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "account.h"
 #include "debug.h"
--- a/src/gtkaccount.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gtkaccount.c	Tue Aug 05 10:55:04 2003 +0000
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "account.h"
 #include "accountopt.h"
@@ -1741,8 +1741,10 @@
 	GtkWidget *button;
 	int width, height;
 
-	if (accounts_window != NULL)
+	if (accounts_window != NULL) {
+		gdk_window_raise(accounts_window->window->window);
 		return;
+	}
 
 	accounts_window = dialog = g_new0(AccountsWindow, 1);
 
--- a/src/gtkconn.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gtkconn.c	Tue Aug 05 10:55:04 2003 +0000
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "account.h"
 #include "debug.h"
@@ -234,7 +234,6 @@
 
 	gaim_setup(gc);
 
-	update_privacy_connections();
 	do_away_menu();
 	gaim_gtk_blist_update_protocol_actions();
 
@@ -247,7 +246,6 @@
 {
 	struct signon_meter *meter = find_signon_meter(gc);
 
-	update_privacy_connections();
 	do_away_menu();
 	gaim_gtk_blist_update_protocol_actions();
 
--- a/src/gtkconv.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gtkconv.c	Tue Aug 05 10:55:04 2003 +0000
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #ifndef _WIN32
 # include <X11/Xlib.h>
@@ -47,6 +47,7 @@
 #include "gtkconv.h"
 #include "gtkimhtml.h"
 #include "gtkpounce.h"
+#include "gtkprivacy.h"
 #include "gtkutils.h"
 #include "stock.h"
 
@@ -515,12 +516,12 @@
 static void
 block_cb(GtkWidget *widget, GaimConversation *conv)
 {
-	GaimConnection *gc;
-
-	gc = gaim_conversation_get_gc(conv);
-
-	if (gc != NULL)
-		show_add_perm(gc, (char *)gaim_conversation_get_name(conv), FALSE);
+	GaimAccount *account;
+
+	account = gaim_conversation_get_account(conv);
+
+	if (account != NULL && gaim_account_is_connected(account))
+		gaim_gtk_request_add_permit(account, gaim_conversation_get_name(conv));
 
 	gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry);
 }
--- a/src/gtkdebug.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gtkdebug.c	Tue Aug 05 10:55:04 2003 +0000
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "prefs.h"
 #include "util.h"
--- a/src/gtkft.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gtkft.c	Tue Aug 05 10:55:04 2003 +0000
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "debug.h"
 #include "notify.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gtkinternal.h	Tue Aug 05 10:55:04 2003 +0000
@@ -0,0 +1,34 @@
+/**
+ * @file internal.h Internal UI definitions and includes
+ * @ingroup gtkui
+ *
+ * gaim
+ *
+ * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#ifndef _GAIM_GTK_INTERNAL_H_
+#define _GAIM_GTK_INTERNAL_H_
+
+#include "internal.h"
+
+#ifndef _WIN32
+# include <gdk/gdkx.h>
+#endif
+
+#include <gtk/gtk.h>
+
+#endif /* _GAIM_GTK_INTERNAL_H_ */
--- a/src/gtknotify.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gtknotify.c	Tue Aug 05 10:55:04 2003 +0000
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "debug.h"
 #include "connection.h"
--- a/src/gtkpounce.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gtkpounce.c	Tue Aug 05 10:55:04 2003 +0000
@@ -21,7 +21,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "conversation.h"
 #include "debug.h"
--- a/src/gtkprefs.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gtkprefs.c	Tue Aug 05 10:55:04 2003 +0000
@@ -21,7 +21,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "debug.h"
 #include "html.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gtkprivacy.c	Tue Aug 05 10:55:04 2003 +0000
@@ -0,0 +1,654 @@
+/**
+ * @file gtkprivacy.c GTK+ Privacy UI
+ * @ingroup gtkui
+ *
+ * gaim
+ *
+ * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
+ * Copyright (C) 2002-2003 Rob Flynn <rob@marko.net>
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#include "gtkinternal.h"
+
+#include "connection.h"
+#include "debug.h"
+#include "privacy.h"
+#include "request.h"
+#include "util.h"
+
+#include "gtkprivacy.h"
+#include "gtkutils.h"
+
+typedef enum
+{
+	GAIM_GTK_PRIVACY_ALLOW_ALL = 0,
+	GAIM_GTK_PRIVACY_ALLOW_BUDDYLIST,
+	GAIM_GTK_PRIVACY_ALLOW_USERS,
+	GAIM_GTK_PRIVACY_DENY_ALL,
+	GAIM_GTK_PRIVACY_DENY_USERS
+
+} GaimGtkPrivacyType;
+
+typedef struct
+{
+	GtkWidget *win;
+
+	GtkWidget *type_menu;
+
+	GtkWidget *add_button;
+	GtkWidget *remove_button;
+	GtkWidget *clear_button;
+
+	GtkWidget *button_box;
+	GtkWidget *allow_widget;
+	GtkWidget *block_widget;
+
+	GtkListStore *allow_store;
+	GtkListStore *block_store;
+
+	GtkWidget *allow_list;
+	GtkWidget *block_list;
+
+	gboolean in_allow_list;
+
+	GaimAccount *account;
+
+} GaimGtkPrivacyDialog;
+
+typedef struct
+{
+	GaimAccount *account;
+	char *name;
+	gboolean block;
+
+} GaimGtkPrivacyRequestData;
+
+static struct
+{
+	const char *text;
+	int num;
+
+} menu_entries[] =
+{
+	{ N_("Allow all users to contact me"),         1 },
+	{ N_("Allow only the users on my buddy list"), 5 },
+	{ N_("Allow only the users below"),            3 },
+	{ N_("Block all users"),                       2 },
+	{ N_("Block the users below"),                 4 }
+};
+
+static size_t menu_entry_count = sizeof(menu_entries) / sizeof(*menu_entries);
+
+static GaimGtkPrivacyDialog *privacy_dialog = NULL;
+
+static void
+rebuild_allow_list(GaimGtkPrivacyDialog *dialog)
+{
+	GSList *l;
+	GtkTreeIter iter;
+
+	gtk_list_store_clear(dialog->allow_store);
+
+	for (l = dialog->account->permit; l != NULL; l = l->next) {
+		gtk_list_store_append(dialog->allow_store, &iter);
+		gtk_list_store_set(dialog->allow_store, &iter, 0, l->data, -1);
+	}
+}
+
+static void
+rebuild_block_list(GaimGtkPrivacyDialog *dialog)
+{
+	GSList *l;
+	GtkTreeIter iter;
+
+	gtk_list_store_clear(dialog->block_store);
+
+	for (l = dialog->account->deny; l != NULL; l = l->next) {
+		gtk_list_store_append(dialog->block_store, &iter);
+		gtk_list_store_set(dialog->block_store, &iter, 0, l->data, -1);
+	}
+}
+
+static const char *
+find_permit_block_by_name(GSList *list, const char *name)
+{
+	const char *temp_name;
+	GSList *l;
+
+	for (l = list; l != NULL; l = l->next) {
+		temp_name = (const char *)l->data;
+
+		if (!gaim_utf8_strcasecmp(name, temp_name))
+			return temp_name;
+	}
+
+	return NULL;
+}
+
+static void
+user_selected_cb(GtkTreeSelection *sel, GaimGtkPrivacyDialog *dialog)
+{
+	gtk_widget_set_sensitive(dialog->remove_button, TRUE);
+}
+
+static GtkWidget *
+build_list(GaimGtkPrivacyDialog *dialog, GtkListStore *model,
+		   GtkWidget **ret_treeview)
+{
+	GtkWidget *sw;
+	GtkWidget *treeview;
+	GtkCellRenderer *rend;
+	GtkTreeViewColumn *column;
+	GtkTreeSelection *sel;
+
+	sw = gtk_scrolled_window_new(NULL, NULL);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
+								   GTK_POLICY_NEVER,
+								   GTK_POLICY_AUTOMATIC);
+
+	treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(model));
+	*ret_treeview = treeview;
+
+	rend = gtk_cell_renderer_text_new();
+
+	column = gtk_tree_view_column_new_with_attributes(NULL, rend,
+													  "text", 0,
+													  NULL);
+	gtk_tree_view_column_set_clickable(GTK_TREE_VIEW_COLUMN(column), TRUE);
+	gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
+	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE);
+	gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), treeview);
+	gtk_widget_show(treeview);
+
+	sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
+
+	g_signal_connect(G_OBJECT(sel), "changed",
+					 G_CALLBACK(user_selected_cb), dialog);
+
+	return sw;
+}
+
+static GtkWidget *
+build_allow_list(GaimGtkPrivacyDialog *dialog)
+{
+	GtkWidget *widget;
+	GtkWidget *list;
+
+	dialog->allow_store = gtk_list_store_new(1, G_TYPE_STRING);
+
+	widget = build_list(dialog, dialog->allow_store, &list);
+
+	dialog->allow_list = list;
+
+	rebuild_allow_list(dialog);
+
+	return widget;
+}
+
+static GtkWidget *
+build_block_list(GaimGtkPrivacyDialog *dialog)
+{
+	GtkWidget *widget;
+	GtkWidget *list;
+
+	dialog->block_store = gtk_list_store_new(1, G_TYPE_STRING);
+
+	widget = build_list(dialog, dialog->block_store, &list);
+
+	dialog->block_list = list;
+
+	rebuild_block_list(dialog);
+
+	return widget;
+}
+
+static gint
+destroy_cb(GtkWidget *w, GdkEvent *event, GaimGtkPrivacyDialog *dialog)
+{
+	g_free(dialog);
+
+	privacy_dialog = NULL;
+
+	return 0;
+}
+
+static void
+select_account_cb(GtkWidget *dropdown, GaimAccount *account,
+				  GaimGtkPrivacyDialog *dialog)
+{
+	int i;
+
+	dialog->account = account;
+
+	gaim_debug(GAIM_DEBUG_MISC, "select_account_cb",
+			   "dialog = %p\n", dialog);
+	gaim_debug(GAIM_DEBUG_MISC, "select_account_cb",
+			   "menu_entry_count = %d\n", menu_entry_count);
+
+	for (i = 0; i < menu_entry_count; i++) {
+		if (menu_entries[i].num == account->perm_deny) {
+			gtk_option_menu_set_history(GTK_OPTION_MENU(dialog->type_menu), i);
+			break;
+		}
+	}
+
+	rebuild_allow_list(dialog);
+	rebuild_block_list(dialog);
+}
+
+static void
+type_changed_cb(GtkOptionMenu *optmenu, GaimGtkPrivacyDialog *dialog)
+{
+	int new_type = gtk_option_menu_get_history(optmenu);
+
+	dialog->account->perm_deny = menu_entries[new_type].num;
+	serv_set_permit_deny(gaim_account_get_connection(dialog->account));
+	gaim_blist_save();
+
+	gtk_widget_hide(dialog->allow_widget);
+	gtk_widget_hide(dialog->block_widget);
+	gtk_widget_hide(dialog->button_box);
+
+	if (new_type == 2) {
+		gtk_widget_show(dialog->allow_widget);
+		gtk_widget_show(dialog->button_box);
+		dialog->in_allow_list = TRUE;
+	}
+	else if (new_type == 4) {
+		gtk_widget_show(dialog->block_widget);
+		gtk_widget_show(dialog->button_box);
+		dialog->in_allow_list = FALSE;
+	}
+}
+
+static void
+add_cb(GtkWidget *button, GaimGtkPrivacyDialog *dialog)
+{
+	if (dialog->in_allow_list)
+		gaim_gtk_request_add_permit(dialog->account, NULL);
+	else
+		gaim_gtk_request_add_block(dialog->account, NULL);
+}
+
+static void
+remove_cb(GtkWidget *button, GaimGtkPrivacyDialog *dialog)
+{
+	GtkTreeIter iter;
+	GtkTreeModel *model;
+	GtkTreeSelection *sel;
+	char *name;
+
+	if (dialog->in_allow_list && dialog->allow_store == NULL)
+		return;
+
+	if (!dialog->in_allow_list && dialog->block_store == NULL)
+		return;
+
+	if (dialog->in_allow_list) {
+		model = GTK_TREE_MODEL(dialog->allow_store);
+		sel   = gtk_tree_view_get_selection(GTK_TREE_VIEW(dialog->allow_list));
+	}
+	else {
+		model = GTK_TREE_MODEL(dialog->block_store);
+		sel   = gtk_tree_view_get_selection(GTK_TREE_VIEW(dialog->block_list));
+	}
+
+	if (gtk_tree_selection_get_selected(sel, NULL, &iter))
+		gtk_tree_model_get(model, &iter, 0, &name, -1);
+	else
+		return;
+
+	if (dialog->in_allow_list) {
+		const char *new_name;
+
+		new_name = find_permit_block_by_name(dialog->account->permit, name);
+
+		if (new_name != NULL)
+			gaim_privacy_permit_remove(dialog->account, new_name);
+	}
+	else {
+		const char *new_name;
+
+		new_name = find_permit_block_by_name(dialog->account->deny, name);
+
+		if (new_name != NULL)
+			gaim_privacy_deny_remove(dialog->account, new_name);
+	}
+}
+
+static void
+clear_cb(GtkWidget *button, GaimGtkPrivacyDialog *dialog)
+{
+}
+
+static void
+close_cb(GtkWidget *button, void *user_data)
+{
+	gaim_gtk_privacy_dialog_hide();
+}
+
+static GaimGtkPrivacyDialog *
+privacy_dialog_new(void)
+{
+	GaimGtkPrivacyDialog *dialog;
+	GaimConnection *gc;
+	GtkWidget *bbox;
+	GtkWidget *hbox;
+	GtkWidget *vbox;
+	GtkWidget *button;
+	GtkWidget *dropdown;
+	GtkWidget *label;
+	GtkWidget *menu;
+	GtkWidget *sep;
+	int selected = 0;
+	int i;
+
+	dialog = g_new0(GaimGtkPrivacyDialog, 1);
+
+	gc = (GaimConnection *)gaim_connections_get_all()->data;
+	dialog->account = gaim_connection_get_account(gc);
+
+	dialog->win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+	gtk_window_set_resizable(GTK_WINDOW(dialog->win), FALSE);
+	gtk_window_set_role(GTK_WINDOW(dialog->win), "privacy");
+	gtk_window_set_title(GTK_WINDOW(dialog->win), _("Privacy"));
+	gtk_container_set_border_width(GTK_CONTAINER(dialog->win), 12);
+
+	g_signal_connect(G_OBJECT(dialog->win), "delete_event",
+					 G_CALLBACK(destroy_cb), dialog);
+
+	gtk_widget_realize(dialog->win);
+
+	/* Main vbox */
+	vbox = gtk_vbox_new(FALSE, 12);
+	gtk_container_add(GTK_CONTAINER(dialog->win), vbox);
+	gtk_widget_show(vbox);
+
+	/* Description label */
+	label = gtk_label_new(
+		_("Changes to privacy settings take effect immediately."));
+
+	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+	gtk_widget_show(label);
+
+	/* Hbox for the accounts drop-down and label. */
+	hbox = gtk_hbox_new(FALSE, 12);
+	gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
+	gtk_widget_show(hbox);
+
+	/* "Set privacy for:" label */
+	label = gtk_label_new(_("Set privacy for:"));
+	gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+	gtk_widget_show(label);
+
+	/* Accounts drop-down */
+	dropdown = gaim_gtk_account_option_menu_new(dialog->account, FALSE,
+												G_CALLBACK(select_account_cb),
+												dialog);
+	gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0);
+	gtk_widget_show(dropdown);
+
+	/* Add the drop-down list with the allow/block types. */
+	dialog->type_menu = gtk_option_menu_new();
+	gtk_box_pack_start(GTK_BOX(vbox), dialog->type_menu, FALSE, FALSE, 0);
+	gtk_widget_show(dialog->type_menu);
+
+	/* Build the menu for that. */
+	menu = gtk_menu_new();
+
+	for (i = 0; i < menu_entry_count; i++) {
+		gaim_new_item(menu, _(menu_entries[i].text));
+
+		if (menu_entries[i].num == dialog->account->perm_deny)
+			selected = i;
+	}
+
+	gtk_option_menu_set_menu(GTK_OPTION_MENU(dialog->type_menu), menu);
+	gtk_option_menu_set_history(GTK_OPTION_MENU(dialog->type_menu), selected);
+
+	g_signal_connect(G_OBJECT(dialog->type_menu), "changed",
+					 G_CALLBACK(type_changed_cb), dialog);
+
+	/* Build the treeview for the allow list. */
+	dialog->allow_widget = build_allow_list(dialog);
+	gtk_box_pack_start(GTK_BOX(vbox), dialog->allow_widget, TRUE, TRUE, 0);
+
+	/* Build the treeview for the block list. */
+	dialog->block_widget = build_block_list(dialog);
+	gtk_box_pack_start(GTK_BOX(vbox), dialog->block_widget, TRUE, TRUE, 0);
+
+	/* Add the button box for Add, Remove, Clear */
+	dialog->button_box = bbox = gtk_hbutton_box_new();
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_SPREAD);
+	gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
+
+	/* Add button */
+	button = gtk_button_new_from_stock(GTK_STOCK_ADD);
+	dialog->add_button = button;
+	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
+	gtk_widget_show(button);
+
+	g_signal_connect(G_OBJECT(button), "clicked",
+					 G_CALLBACK(add_cb), dialog);
+
+	/* Remove button */
+	button = gtk_button_new_from_stock(GTK_STOCK_REMOVE);
+	dialog->remove_button = button;
+	gtk_widget_set_sensitive(button, FALSE);
+	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
+	gtk_widget_show(button);
+
+	g_signal_connect(G_OBJECT(button), "clicked",
+					 G_CALLBACK(remove_cb), dialog);
+
+	/* Clear button */
+	button = gtk_button_new_from_stock(GTK_STOCK_CLEAR);
+	dialog->clear_button = button;
+	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
+	gtk_widget_show(button);
+
+	g_signal_connect(G_OBJECT(button), "clicked",
+					 G_CALLBACK(clear_cb), dialog);
+
+	/* Separator */
+	sep = gtk_hseparator_new();
+	gtk_box_pack_start(GTK_BOX(vbox), sep, FALSE, FALSE, 0);
+	gtk_widget_show(sep);
+
+	/* Another button box. */
+	bbox = gtk_hbutton_box_new();
+	gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
+	gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
+	gtk_widget_show(bbox);
+
+	/* Close button */
+	button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+	gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
+	gtk_widget_show(button);
+
+	g_signal_connect(G_OBJECT(button), "clicked",
+					 G_CALLBACK(close_cb), dialog);
+
+	if (dialog->account->perm_deny == 2) {
+		gtk_widget_show(dialog->allow_widget);
+		gtk_widget_show(dialog->button_box);
+		dialog->in_allow_list = TRUE;
+	}
+	else if (dialog->account->perm_deny == 4) {
+		gtk_widget_show(dialog->block_widget);
+		gtk_widget_show(dialog->button_box);
+		dialog->in_allow_list = FALSE;
+	}
+
+	return dialog;
+}
+
+void
+gaim_gtk_privacy_dialog_show(void)
+{
+	if (privacy_dialog == NULL)
+		privacy_dialog = privacy_dialog_new();
+
+	gtk_widget_show(privacy_dialog->win);
+	gdk_window_raise(privacy_dialog->win->window);
+}
+
+void
+gaim_gtk_privacy_dialog_hide(void)
+{
+	if (privacy_dialog == NULL)
+		return;
+
+	gtk_widget_destroy(privacy_dialog->win);
+	privacy_dialog = NULL;
+}
+
+static void
+destroy_request_data(GaimGtkPrivacyRequestData *data)
+{
+	if (data->name != NULL)
+		g_free(data->name);
+
+	g_free(data);
+}
+
+static void
+confirm_permit_block_cb(GaimGtkPrivacyRequestData *data, int option)
+{
+	if (data->block)
+		gaim_privacy_deny_add(data->account, data->name);
+	else
+		gaim_privacy_permit_add(data->account, data->name);
+
+	destroy_request_data(data);
+}
+
+static void
+add_permit_block_cb(GaimGtkPrivacyRequestData *data, const char *name)
+{
+	data->name = g_strdup(name);
+
+	confirm_permit_block_cb(data, 0);
+}
+
+void
+gaim_gtk_request_add_permit(GaimAccount *account, const char *name)
+{
+	GaimGtkPrivacyRequestData *data;
+
+	g_return_if_fail(account != NULL);
+
+	data = g_new0(GaimGtkPrivacyRequestData, 1);
+	data->account = account;
+	data->name    = g_strdup(name);
+	data->block   = FALSE;
+
+	if (name == NULL) {
+		gaim_request_input(account, _("Permit User"),
+			_("Type a user you permit to contact you."),
+			_("Please enter the name of the user you wish to be "
+			  "able to contact you."),
+			NULL, FALSE, FALSE,
+			_("Permit"), G_CALLBACK(add_permit_block_cb),
+			_("Cancel"), G_CALLBACK(destroy_request_data),
+			data);
+	}
+	else {
+		char *primary = g_strdup_printf(_("Allow %s to contact you?"), name);
+		char *secondary =
+			g_strdup_printf(_("Are you sure you wish to allow "
+							  "%s to contact you?"), name);
+
+
+		gaim_request_action(account, _("Permit User"), primary, secondary,
+							0, data, 2,
+							_("Permit"), G_CALLBACK(confirm_permit_block_cb),
+							_("Cancel"), G_CALLBACK(destroy_request_data));
+
+		g_free(primary);
+		g_free(secondary);
+	}
+}
+
+void
+gaim_gtk_request_add_block(GaimAccount *account, const char *name)
+{
+	GaimGtkPrivacyRequestData *data;
+
+	g_return_if_fail(account != NULL);
+
+	data = g_new0(GaimGtkPrivacyRequestData, 1);
+	data->account = account;
+	data->name    = g_strdup(name);
+	data->block   = TRUE;
+
+	if (name == NULL) {
+		gaim_request_input(account, _("Block User"),
+			_("Type a user to block."),
+			_("Please enter the name of the user you wish to block."),
+			NULL, FALSE, FALSE,
+			_("Block"), G_CALLBACK(add_permit_block_cb),
+			_("Cancel"), G_CALLBACK(destroy_request_data),
+			data);
+	}
+	else {
+		char *primary = g_strdup_printf(_("Block %s?"), name);
+		char *secondary =
+			g_strdup_printf(_("Are you sure you want to block %s?"), name);
+
+		gaim_request_action(account, _("Block User"), primary, secondary,
+							0, data, 2,
+							_("Block"), G_CALLBACK(confirm_permit_block_cb),
+							_("Cancel"), G_CALLBACK(destroy_request_data));
+
+		g_free(primary);
+		g_free(secondary);
+	}
+}
+
+static void
+gaim_gtk_permit_added_removed(GaimAccount *account, const char *name)
+{
+	if (privacy_dialog != NULL)
+		rebuild_allow_list(privacy_dialog);
+}
+
+static void
+gaim_gtk_deny_added_removed(GaimAccount *account, const char *name)
+{
+	if (privacy_dialog != NULL)
+		rebuild_block_list(privacy_dialog);
+}
+
+static GaimPrivacyUiOps privacy_ops =
+{
+	gaim_gtk_permit_added_removed,
+	gaim_gtk_permit_added_removed,
+	gaim_gtk_deny_added_removed,
+	gaim_gtk_deny_added_removed
+};
+
+GaimPrivacyUiOps *
+gaim_gtk_privacy_get_ui_ops(void)
+{
+	return &privacy_ops;
+}
+
+void
+gaim_gtk_privacy_init(void)
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gtkprivacy.h	Tue Aug 05 10:55:04 2003 +0000
@@ -0,0 +1,72 @@
+/**
+ * @file gtkprivacy.h GTK+ Privacy UI
+ * @ingroup gtkui
+ *
+ * gaim
+ *
+ * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#ifndef _GAIM_GTK_PRIVACY_H_
+#define _GAIM_GTK_PRIVACY_H_
+
+#include "privacy.h"
+
+/**
+ * Initializes the GTK+ privacy subsystem.
+ */
+void gaim_gtk_privacy_init(void);
+
+/**
+ * Shows the privacy dialog.
+ */
+void gaim_gtk_privacy_dialog_show(void);
+
+/**
+ * Hides the privacy dialog.
+ */
+void gaim_gtk_privacy_dialog_hide(void);
+
+/**
+ * Requests confirmation to add a user to the allow list for an account,
+ * and then adds it.
+ *
+ * If @a name is not specified, an input dialog will be presented.
+ *
+ * @param account The account.
+ * @param name    The name of the user to add.
+ */
+void gaim_gtk_request_add_permit(GaimAccount *account, const char *name);
+
+/**
+ * Requests confirmation to add a user to the block list for an account,
+ * and then adds it.
+ *
+ * If @a name is not specified, an input dialog will be presented.
+ *
+ * @param account The account.
+ * @param name    The name of the user to add.
+ */
+void gaim_gtk_request_add_block(GaimAccount *account, const char *name);
+
+/**
+ * Returns the UI operations structure for the GTK+ privacy subsystem.
+ *
+ * @return The GTK+ UI privacy operations structure.
+ */
+GaimPrivacyUiOps *gaim_gtk_privacy_get_ui_ops(void);
+
+#endif /* _GAIM_GTK_PRIVACY_H_ */
--- a/src/gtkrequest.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gtkrequest.c	Tue Aug 05 10:55:04 2003 +0000
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "debug.h"
 
@@ -193,8 +193,6 @@
 	STOCK_ITEMIZE(_("Add"),     GTK_STOCK_ADD);
 	STOCK_ITEMIZE(_("Remove"),  GTK_STOCK_REMOVE);
 	STOCK_ITEMIZE(_("Save"),    GTK_STOCK_SAVE);
-	STOCK_ITEMIZE(_("Block"),   GAIM_STOCK_BLOCK);
-	STOCK_ITEMIZE(_("Unblock"), GTK_STOCK_REMOVE);
 
 	return text;
 }
@@ -365,6 +363,7 @@
 
 	/* Create the dialog. */
 	data->dialog = dialog = gtk_dialog_new();
+
 	if (title != NULL)
 		gtk_window_set_title(GTK_WINDOW(dialog), title);
 
--- a/src/gtksound.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gtksound.c	Tue Aug 05 10:55:04 2003 +0000
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #ifdef _WIN32
 #include <windows.h>
--- a/src/gtkutils.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/gtkutils.c	Tue Aug 05 10:55:04 2003 +0000
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #ifndef _WIN32
 # include <X11/Xlib.h>
@@ -434,6 +434,7 @@
 	gtk_widget_show(menuitem);
 
 	label = gtk_label_new(str);
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
 	gtk_label_set_pattern(GTK_LABEL(label), "_");
 	gtk_container_add(GTK_CONTAINER(menuitem), label);
 	gtk_widget_show(label);
--- a/src/idle.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/idle.c	Tue Aug 05 10:55:04 2003 +0000
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #ifdef USE_SCREENSAVER
 # ifndef _WIN32
--- a/src/internal.h	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/internal.h	Tue Aug 05 10:55:04 2003 +0000
@@ -1,6 +1,6 @@
 /**
  * @file internal.h Internal definitions and includes
- * @ingroup gtkui
+ * @ingroup core
  *
  * gaim
  *
@@ -24,7 +24,7 @@
 #define _GAIM_INTERNAL_H_
 
 #ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
 #endif
 
 #ifdef ENABLE_NLS
@@ -93,7 +93,6 @@
 # include <arpa/inet.h>
 # include <sys/un.h>
 # include <sys/utsname.h>
-# include <gdk/gdkx.h>
 # include <netdb.h>
 # include <signal.h>
 # include <unistd.h>
@@ -109,7 +108,6 @@
 
 #define PATHSIZE 1024
 
-#include <gtk/gtk.h>
 #include <glib.h>
 
 #ifdef _WIN32
@@ -117,6 +115,6 @@
 #endif
 
 
-#define WEBSITE "http://gaim.sourceforge.net/"
+#define GAIM_WEBSITE "http://gaim.sourceforge.net/"
 
 #endif /* _GAIM_INTERNAL_H_ */
--- a/src/log.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/log.c	Tue Aug 05 10:55:04 2003 +0000
@@ -13,8 +13,9 @@
 #include "prpl.h"
 #include "util.h"
 
+/* XXX CORE/UI */
+#include "gtkinternal.h"
 #include "gtkconv.h"
-
 #include "ui.h"
 
 GList *log_conversations = NULL;
--- a/src/main.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/main.c	Tue Aug 05 10:55:04 2003 +0000
@@ -19,7 +19,7 @@
  *
  */
 
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "account.h"
 #include "conversation.h"
@@ -44,6 +44,7 @@
 #include "gtknotify.h"
 #include "gtkpounce.h"
 #include "gtkprefs.h"
+#include "gtkprivacy.h"
 #include "gtkrequest.h"
 #include "gtksound.h"
 #include "gtkutils.h"
@@ -499,6 +500,7 @@
 	gaim_set_xfer_ui_ops(gaim_get_gtk_xfer_ui_ops());
 	gaim_set_blist_ui_ops(gaim_get_gtk_blist_ui_ops());
 	gaim_set_notify_ui_ops(gaim_get_gtk_notify_ui_ops());
+	gaim_set_privacy_ui_ops(gaim_gtk_privacy_get_ui_ops());
 	gaim_set_request_ui_ops(gaim_get_gtk_request_ui_ops());
 	gaim_set_sound_ui_ops(gaim_get_gtk_sound_ui_ops());
 	gaim_set_connection_ui_ops(gaim_get_gtk_connection_ui_ops());
@@ -507,6 +509,7 @@
 	gaim_gtk_blist_init();
 	gaim_gtk_conversation_init();
 	gaim_gtk_pounces_init();
+	gaim_gtk_privacy_init();
 	gaim_gtk_xfers_init();
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/privacy.c	Tue Aug 05 10:55:04 2003 +0000
@@ -0,0 +1,178 @@
+/**
+ * gaim
+ *
+ * Copyright (C) 2003, Christian Hammond <chipx86@gnupdate.org>
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#include "internal.h"
+
+#include "account.h"
+#include "privacy.h"
+#include "server.h"
+#include "util.h"
+
+static GaimPrivacyUiOps *privacy_ops = NULL;
+
+gboolean
+gaim_privacy_permit_add(GaimAccount *account, const char *who)
+{
+	GSList *l;
+	char *name;
+
+	g_return_val_if_fail(account != NULL, FALSE);
+	g_return_val_if_fail(who     != NULL, FALSE);
+	g_return_val_if_fail(gaim_account_is_connected(account), FALSE);
+
+	name = g_strdup(normalize(who));
+
+	for (l = account->permit; l != NULL; l = l->next) {
+		if (!gaim_utf8_strcasecmp(name, normalize((char *)l->data)))
+			break;
+	}
+
+	g_free(name);
+
+	if (l != NULL)
+		return FALSE;
+
+	account->permit = g_slist_append(account->permit, g_strdup(who));
+
+	serv_add_permit(gaim_account_get_connection(account), who);
+	gaim_blist_save();
+
+	if (privacy_ops != NULL && privacy_ops->permit_added != NULL)
+		privacy_ops->permit_added(account, who);
+
+	return TRUE;
+}
+
+gboolean
+gaim_privacy_permit_remove(GaimAccount *account, const char *who)
+{
+	GSList *l;
+	char *name;
+
+	g_return_val_if_fail(account != NULL, FALSE);
+	g_return_val_if_fail(who     != NULL, FALSE);
+	g_return_val_if_fail(gaim_account_is_connected(account), FALSE);
+
+	name = g_strdup(normalize(who));
+
+	for (l = account->permit; l != NULL; l = l->next) {
+		if (!gaim_utf8_strcasecmp(name, normalize((char *)l->data)))
+			break;
+	}
+
+	g_free(name);
+
+	if (l == NULL)
+		return FALSE;
+
+	account->permit = g_slist_remove(account->permit, l->data);
+	g_free(l->data);
+
+	serv_rem_deny(gaim_account_get_connection(account), who);
+	gaim_blist_save();
+
+	if (privacy_ops != NULL && privacy_ops->permit_removed != NULL)
+		privacy_ops->permit_removed(account, who);
+
+	return TRUE;
+}
+
+gboolean
+gaim_privacy_deny_add(GaimAccount *account, const char *who)
+{
+	GSList *l;
+	char *name;
+
+	g_return_val_if_fail(account != NULL, FALSE);
+	g_return_val_if_fail(who     != NULL, FALSE);
+	g_return_val_if_fail(gaim_account_is_connected(account), FALSE);
+
+	name = g_strdup(normalize(who));
+
+	for (l = account->deny; l != NULL; l = l->next) {
+		if (!gaim_utf8_strcasecmp(name, normalize((char *)l->data)))
+			break;
+	}
+
+	g_free(name);
+
+	if (l != NULL)
+		return FALSE;
+
+	account->deny = g_slist_append(account->deny, g_strdup(who));
+
+	serv_add_deny(gaim_account_get_connection(account), who);
+	gaim_blist_save();
+
+	if (privacy_ops != NULL && privacy_ops->deny_added != NULL)
+		privacy_ops->deny_added(account, who);
+
+	return TRUE;
+}
+
+gboolean
+gaim_privacy_deny_remove(GaimAccount *account, const char *who)
+{
+	GSList *l;
+	char *name;
+
+	g_return_val_if_fail(account != NULL, FALSE);
+	g_return_val_if_fail(who     != NULL, FALSE);
+	g_return_val_if_fail(gaim_account_is_connected(account), FALSE);
+
+	name = g_strdup(normalize(who));
+
+	for (l = account->deny; l != NULL; l = l->next) {
+		if (!gaim_utf8_strcasecmp(name, normalize((char *)l->data)))
+			break;
+	}
+
+	g_free(name);
+
+	if (l == NULL)
+		return FALSE;
+
+	account->deny = g_slist_remove(account->deny, l->data);
+	g_free(l->data);
+
+	serv_rem_deny(gaim_account_get_connection(account), who);
+	gaim_blist_save();
+
+	if (privacy_ops != NULL && privacy_ops->deny_removed != NULL)
+		privacy_ops->deny_removed(account, who);
+
+	return TRUE;
+}
+
+void
+gaim_set_privacy_ui_ops(GaimPrivacyUiOps *ops)
+{
+	privacy_ops = ops;
+}
+
+GaimPrivacyUiOps *
+gaim_get_privacy_ui_ops(void)
+{
+	return privacy_ops;
+}
+
+void
+gaim_privacy_init(void)
+{
+}
--- a/src/privacy.h	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/privacy.h	Tue Aug 05 10:55:04 2003 +0000
@@ -1,7 +1,10 @@
-/*
+/**
+ * @file privacy.h Privacy API
+ * @ingroup core
+ *
  * gaim
  *
- * Copyright (C) 2003, Christian Hammond <chipx86@gnupdate.org>
+ * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -16,19 +19,86 @@
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
  */
 #ifndef _GAIM_PRIVACY_H_
 #define _GAIM_PRIVACY_H_
 
+#include "account.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+/**
+ * Privacy core/UI operations.
+ */
+typedef struct
+{
+	void (*permit_added)(GaimAccount *account, const char *name);
+	void (*permit_removed)(GaimAccount *account, const char *name);
+	void (*deny_added)(GaimAccount *account, const char *name);
+	void (*deny_removed)(GaimAccount *account, const char *name);
+
+} GaimPrivacyUiOps;
+
+/**
+ * Adds a user to the account's permit list.
+ *
+ * @param account The account.
+ * @Param name    The name of the user to add to the list.
+ *
+ * @return TRUE if the user was added successfully, or @c FALSE otherwise.
+ */
 gboolean gaim_privacy_permit_add(GaimAccount *account, const char *name);
+
+/**
+ * Removes a user from the account's permit list.
+ *
+ * @param account The account.
+ * @Param name    The name of the user to add to the list.
+ *
+ * @return TRUE if the user was removed successfully, or @c FALSE otherwise.
+ */
+gboolean gaim_privacy_permit_remove(GaimAccount *account, const char *name);
+
+/**
+ * Adds a user to the account's deny list.
+ *
+ * @param account The account.
+ * @Param name    The name of the user to add to the list.
+ *
+ * @return TRUE if the user was added successfully, or @c FALSE otherwise.
+ */
 gboolean gaim_privacy_deny_add(GaimAccount *account, const char *name);
+
+/**
+ * Removes a user from the account's deny list.
+ *
+ * @param account The account.
+ * @Param name    The name of the user to add to the list.
+ *
+ * @return TRUE if the user was removed successfully, or @c FALSE otherwise.
+ */
 gboolean gaim_privacy_deny_remove(GaimAccount *account, const char *name);
-gboolean gaim_privacy_permit_remove(GaimAccount *account, const char *name);
+
+/**
+ * Sets the UI operations structure for the privacy subsystem.
+ *
+ * @param ops The UI operations structure.
+ */
+void gaim_set_privacy_ui_ops(GaimPrivacyUiOps *ops);
+
+/**
+ * Returns the UI operations structure for the privacy subsystem.
+ *
+ * @return The UI operations structure.
+ */
+GaimPrivacyUiOps *gaim_get_privacy_ui_ops(void);
+
+/**
+ * Initializes the privacy subsystem.
+ */
+void gaim_privacy_init(void);
 
 #ifdef __cplusplus
 }
--- a/src/protocols/gg/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/gg/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -35,4 +35,4 @@
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
 	$(DEBUG_CFLAGS) \
-	$(GTK_CFLAGS)
+	$(GLIB_CFLAGS)
--- a/src/protocols/gg/gg.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/gg/gg.c	Tue Aug 05 10:55:04 2003 +0000
@@ -1,6 +1,6 @@
 /*
  * gaim - Gadu-Gadu Protocol Plugin
- * $Id: gg.c 6820 2003-07-29 02:27:33Z lschiere $
+ * $Id: gg.c 6876 2003-08-05 10:55:04Z chipx86 $
  *
  * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
  * 
@@ -1362,7 +1362,7 @@
 	                                                  /**  description    */
 	N_("Gadu-Gadu Protocol Plugin"),
 	"Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>",       /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	NULL,                                             /**< load           */
 	NULL,                                             /**< unload         */
--- a/src/protocols/irc/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/irc/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -28,7 +28,6 @@
 endif
 
 AM_CPPFLAGS = \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
-	$(GTK_CFLAGS) \
+	$(GLIB_CFLAGS) \
 	$(DEBUG_CFLAGS)
--- a/src/protocols/irc/cmds.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/irc/cmds.c	Tue Aug 05 10:55:04 2003 +0000
@@ -349,7 +349,7 @@
 {
 	char *buf;
 
-	buf = irc_format(irc, "v:", "QUIT", (args && args[0]) ? args[0] : "Download Gaim: " WEBSITE);
+	buf = irc_format(irc, "v:", "QUIT", (args && args[0]) ? args[0] : "Download Gaim: " GAIM_WEBSITE);
 	irc_send(irc, buf);
 	g_free(buf);
 
--- a/src/protocols/irc/irc.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/irc/irc.c	Tue Aug 05 10:55:04 2003 +0000
@@ -486,7 +486,7 @@
 	N_("IRC Protocol Plugin"),                        /**  summary        */
 	N_("The IRC Protocol Plugin that Sucks Less"),    /**  description    */
 	NULL,                                             /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	NULL,                                             /**< load           */
 	NULL,                                             /**< unload         */
--- a/src/protocols/jabber/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/jabber/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -71,7 +71,6 @@
 endif
 
 AM_CPPFLAGS = \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
 	$(DEBUG_CFLAGS) \
-	$(GTK_CFLAGS)
+	$(GLIB_CFLAGS)
--- a/src/protocols/jabber/jabber.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/jabber/jabber.c	Tue Aug 05 10:55:04 2003 +0000
@@ -4400,7 +4400,7 @@
 	                                                  /**  description    */
 	N_("Jabber Protocol Plugin"),
 	NULL,                                             /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	NULL,                                             /**< load           */
 	NULL,                                             /**< unload         */
--- a/src/protocols/msn/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/msn/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -56,7 +56,6 @@
 endif
 
 AM_CPPFLAGS = \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
-	$(GTK_CFLAGS) \
+	$(GLIB_CFLAGS) \
 	$(DEBUG_CFLAGS)
--- a/src/protocols/msn/msn.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/msn/msn.c	Tue Aug 05 10:55:04 2003 +0000
@@ -1237,7 +1237,7 @@
 	                                                  /**  description    */
 	N_("MSN Protocol Plugin"),
 	"Christian Hammond <chipx86@gnupdate.org>",       /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	NULL,                                             /**< load           */
 	NULL,                                             /**< unload         */
--- a/src/protocols/msn/msn.h	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/msn/msn.h	Tue Aug 05 10:55:04 2003 +0000
@@ -39,8 +39,6 @@
 #include "server.h"
 #include "util.h"
 
-#include "ui.h"
-
 /* XXX */
 #include "gaim.h"
 
--- a/src/protocols/msn/notification.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/msn/notification.c	Tue Aug 05 10:55:04 2003 +0000
@@ -130,8 +130,6 @@
 
 		gaim_privacy_permit_add(pa->gc->account,
 								msn_user_get_passport(pa->user));
-		build_allow_list();
-
 		show_got_added(pa->gc, NULL, msn_user_get_passport(pa->user),
 					   msn_user_get_name(pa->user), NULL);
 	}
@@ -159,7 +157,6 @@
 
 		gaim_privacy_deny_add(pa->gc->account,
 							  msn_user_get_passport(pa->user));
-		build_block_list();
 	}
 
 	msn_user_destroy(pa->user);
--- a/src/protocols/napster/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/napster/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -22,7 +22,6 @@
 endif
 
 AM_CPPFLAGS = \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
-	$(GTK_CFLAGS) \
+	$(GLIB_CFLAGS) \
 	$(DEBUG_CFLAGS)
--- a/src/protocols/napster/napster.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/napster/napster.c	Tue Aug 05 10:55:04 2003 +0000
@@ -622,7 +622,7 @@
 	                                                  /**  description    */
 	N_("NAPSTER Protocol Plugin"),
 	NULL,                                             /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	NULL,                                             /**< load           */
 	NULL,                                             /**< unload         */
--- a/src/protocols/oscar/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/oscar/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -67,7 +67,7 @@
 endif
 
 AM_CPPFLAGS = \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
+	$(GLIB_CFLAGS) \
 	$(GTK_CFLAGS) \
 	$(DEBUG_CFLAGS)
--- a/src/protocols/oscar/oscar.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Tue Aug 05 10:55:04 2003 +0000
@@ -43,7 +43,8 @@
 #include "aim.h"
 #include "md5.h"
 
-/* XXX */
+/* XXX CORE/UI */
+#include "gtkinternal.h"
 #include "gaim.h"
 #include "ui.h"
 
@@ -1073,7 +1074,7 @@
 			break;
 		case 0x1c:
 			/* client too old */
-			g_snprintf(buf, sizeof(buf), _("The client version you are using is too old. Please upgrade at %s"), WEBSITE);
+			g_snprintf(buf, sizeof(buf), _("The client version you are using is too old. Please upgrade at %s"), GAIM_WEBSITE);
 			gaim_connection_error(gc, buf);
 			break;
 		default:
@@ -1208,7 +1209,7 @@
 	if (in != '\n') {
 		char buf[256];
 		g_snprintf(buf, sizeof(buf), _("You may be disconnected shortly.  You may want to use TOC until "
-			"this is fixed.  Check %s for updates."), WEBSITE);
+			"this is fixed.  Check %s for updates."), GAIM_WEBSITE);
 		gaim_notify_warning(pos->gc, NULL,
 							_("Gaim was Unable to get a valid AIM login hash."),
 							buf);
@@ -1238,7 +1239,7 @@
 
 	if (source < 0) {
 		buf = g_strdup_printf(_("You may be disconnected shortly.  You may want to use TOC until "
-			"this is fixed.  Check %s for updates."), WEBSITE);
+			"this is fixed.  Check %s for updates."), GAIM_WEBSITE);
 		gaim_notify_warning(pos->gc, NULL,
 							_("Gaim was Unable to get a valid AIM login hash."),
 							buf);
@@ -1326,7 +1327,7 @@
 			g_free(pos->modname);
 		g_free(pos);
 		g_snprintf(buf, sizeof(buf), _("You may be disconnected shortly.  You may want to use TOC until "
-			"this is fixed.  Check %s for updates."), WEBSITE);
+			"this is fixed.  Check %s for updates."), GAIM_WEBSITE);
 		gaim_notify_warning(pos->gc, NULL,
 							_("Gaim was Unable to get a valid login hash."),
 							buf);
@@ -4261,7 +4262,7 @@
 	int ret = 0;
 	GError *err = NULL;
 	const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc));
-	char *tmpmsg;
+	char *tmpmsg = NULL;
 
 	if (dim && dim->connected) {
 		/* If we're directly connected, send a direct IM */
@@ -4887,7 +4888,6 @@
 						gaim_debug(GAIM_DEBUG_INFO, "oscar",
 								   "ssi: adding permit buddy %s to local list\n", curitem->name);
 						gaim_privacy_permit_add(account, curitem->name);
-						build_allow_list();
 						export = TRUE;
 					}
 				}
@@ -4901,7 +4901,6 @@
 						gaim_debug(GAIM_DEBUG_INFO, "oscar",
 								   "ssi: adding deny buddy %s to local list\n", curitem->name);
 						gaim_privacy_deny_add(account, curitem->name);
-						build_block_list();
 						export = TRUE;
 					}
 				}
@@ -6319,7 +6318,7 @@
 	                                                  /**  description    */
 	N_("AIM/ICQ Protocol Plugin"),
 	NULL,                                             /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	NULL,                                             /**< load           */
 	NULL,                                             /**< unload         */
--- a/src/protocols/toc/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/toc/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -26,7 +26,7 @@
 endif
 
 AM_CPPFLAGS = \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
 	$(GTK_CFLAGS) \
+	$(GLIB_CFLAGS) \
 	$(DEBUG_CFLAGS)
--- a/src/protocols/toc/toc.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/toc/toc.c	Tue Aug 05 10:55:04 2003 +0000
@@ -33,6 +33,7 @@
 #include "html.h"
 
 /* XXX */
+#include "gtkinternal.h"
 #include "gaim.h"
 #include "ui.h"
 #include "gtkutils.h"
@@ -2100,7 +2101,7 @@
 	                                                  /**  description    */
 	N_("TOC Protocol Plugin"),
 	NULL,                                             /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	NULL,                                             /**< load           */
 	NULL,                                             /**< unload         */
--- a/src/protocols/trepia/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/trepia/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -26,7 +26,6 @@
 endif
 
 AM_CPPFLAGS = \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
-	$(GTK_CFLAGS) \
+	$(GLIB_CFLAGS) \
 	$(DEBUG_CFLAGS)
--- a/src/protocols/trepia/trepia.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/trepia/trepia.c	Tue Aug 05 10:55:04 2003 +0000
@@ -1354,7 +1354,7 @@
 	                                                  /**  description    */
 	N_("Trepia Protocol Plugin"),
 	"Christian Hammond <chipx86@gnupdate.org>",       /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	NULL,                                             /**< load           */
 	NULL,                                             /**< unload         */
--- a/src/protocols/yahoo/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/yahoo/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -28,7 +28,7 @@
 endif
 
 AM_CPPFLAGS = \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
 	$(GTK_CFLAGS) \
+	$(GLIB_CFLAGS) \
 	$(DEBUG_CFLAGS)
--- a/src/protocols/yahoo/yahoo.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/yahoo/yahoo.c	Tue Aug 05 10:55:04 2003 +0000
@@ -36,7 +36,7 @@
 #include "md5.h"
 
 /* XXX */
-#include "gaim.h"
+#include "gtkinternal.h"
 #include "ui.h"
 
 extern char *yahoo_crypt(const char *, const char *);
@@ -1466,7 +1466,7 @@
 	                                                  /**  description    */
 	N_("Yahoo Protocol Plugin"),
 	NULL,                                             /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	NULL,                                             /**< load           */
 	NULL,                                             /**< unload         */
--- a/src/protocols/zephyr/Makefile.am	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/zephyr/Makefile.am	Tue Aug 05 10:55:04 2003 +0000
@@ -89,10 +89,9 @@
 endif
 
 AM_CPPFLAGS = \
-	-I$(top_srcdir) \
 	-I$(top_srcdir)/src \
 	-I$(top_srcdir)/src/protocols \
 	-DCONFDIR=\"$(confdir)\" \
-	$(GTK_CFLAGS) \
+	$(GLIB_CFLAGS) \
 	$(KRB4_CFLAGS) \
 	$(DEBUG_CFLAGS)
--- a/src/protocols/zephyr/zephyr.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/protocols/zephyr/zephyr.c	Tue Aug 05 10:55:04 2003 +0000
@@ -1031,7 +1031,7 @@
 	                                                  /**  description    */
 	N_("Zephyr Protocol Plugin"),
 	NULL,                                             /**< author         */
-	WEBSITE,                                          /**< homepage       */
+	GAIM_WEBSITE,                                     /**< homepage       */
 
 	NULL,                                             /**< load           */
 	NULL,                                             /**< unload         */
--- a/src/prpl.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/prpl.c	Tue Aug 05 10:55:04 2003 +0000
@@ -25,11 +25,12 @@
 #include "notify.h"
 #include "prpl.h"
 #include "request.h"
-#include "ui.h"
 #include "util.h"
 
 /* XXX */
+#include "gtkinternal.h"
 #include "gtkconv.h"
+#include "ui.h"
 
 const char *
 gaim_prpl_num_to_id(GaimProtocol protocol)
--- a/src/sound.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/sound.c	Tue Aug 05 10:55:04 2003 +0000
@@ -23,7 +23,8 @@
 #include "sound.h"
 #include "prefs.h"
 
-/* XXX: this goes away when away messages become sane */
+/* XXX CORE/UI: this goes away when away messages become sane */
+#include "gtkinternal.h"
 #include "ui.h"
 
 
--- a/src/status.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/status.c	Tue Aug 05 10:55:04 2003 +0000
@@ -21,10 +21,14 @@
 
 #include "status.h"
 #include "internal.h"
-#include "ui.h"
 #include "debug.h"
 #include "util.h"
 
+/* XXX CORE/UI */
+#include "gtkinternal.h"
+#include "ui.h"
+
+
 /* for people like myself who are too lazy to add an away msg :) */
 /* I don't know who "myself" is in this context.  The exclamation point
  * makes it slightly less boring ;) */
--- a/src/stock.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/stock.c	Tue Aug 05 10:55:04 2003 +0000
@@ -20,7 +20,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "stock.h"
 
--- a/src/themes.c	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/themes.c	Tue Aug 05 10:55:04 2003 +0000
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-#include "internal.h"
+#include "gtkinternal.h"
 
 #include "conversation.h"
 #include "debug.h"
--- a/src/ui.h	Tue Aug 05 03:21:40 2003 +0000
+++ b/src/ui.h	Tue Aug 05 10:55:04 2003 +0000
@@ -156,8 +156,6 @@
 extern int smiley_array[FACE_TOTAL];
 extern GtkWidget *fgcseld;
 extern GtkWidget *bgcseld;
-void build_allow_list();
-void build_block_list();
 
 /* Globals in session.c */
 extern gboolean session_managed;
@@ -198,7 +196,6 @@
 extern void show_add_buddy(GaimConnection *, char *, char *, char *);
 extern void show_add_chat(GaimAccount *, struct group *);
 extern void show_add_group(GaimConnection *);
-extern void show_add_perm(GaimConnection *, char *, gboolean);
 extern void destroy_all_dialogs();
 extern void show_import_dialog();
 extern void show_export_dialog();
@@ -226,10 +223,6 @@
 extern GtkWidget *gaim_pixbuf_button(char *, char *, GaimButtonOrientation);
 extern GtkWidget *gaim_pixbuf_button_from_stock(const char *, const char *, GaimButtonOrientation);
 extern GtkWidget *gaim_pixbuf_toolbar_button_from_stock(char *);
-extern void update_privacy_connections();
-extern void show_privacy_options();
-extern void build_allow_list();
-extern void build_block_list();
 extern void destroy_fontsel(GtkWidget *w, gpointer d);
 extern void join_chat();