changeset 9150:05532ad61ed5

[gaim-migrate @ 9934] recommit sean's prefs changes as promised, i'll look at the underscores tomorrow committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 31 May 2004 03:38:47 +0000
parents 108a0300135d
children e672ee8a12ec
files src/conversation.c src/gtkconv.c src/gtkprefs.c src/gtkutils.c
diffstat 4 files changed, 402 insertions(+), 497 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Mon May 31 01:39:09 2004 +0000
+++ b/src/conversation.c	Mon May 31 03:38:47 2004 +0000
@@ -2263,10 +2263,14 @@
 {
 	GaimConvWindow *win;
 
+#if 0 /* Last-minute prefslash */
 	if (gaim_prefs_get_bool("/core/conversations/combine_chat_im"))
 		win = g_list_last(gaim_get_windows())->data;
 	else
 		win = gaim_get_last_window_with_type(gaim_conversation_get_type(conv));
+#else
+	win = g_list_last(gaim_get_windows())->data;
+#endif
 
 	if (win == NULL) {
 		win = gaim_conv_window_new();
@@ -2354,9 +2358,7 @@
 
 			group2 = conv_get_group(conv2);
 
-			if ((gaim_prefs_get_bool("/core/conversations/combine_chat_im") ||
-				 type == gaim_conversation_get_type(conv2)) &&
-				group == group2)
+			if (group == group2)
 			{
 				gaim_conv_window_add_conversation(win2, conv);
 
@@ -2394,9 +2396,7 @@
 		{
 			conv2 = (GaimConversation *)convs->data;
 
-			if ((gaim_prefs_get_bool("/core/conversations/combine_chat_im") ||
-				 type == gaim_conversation_get_type(conv2)) &&
-				account == gaim_conversation_get_account(conv2))
+			if (account == gaim_conversation_get_account(conv2))
 			{
 				gaim_conv_window_add_conversation(win2, conv);
 				return;
@@ -2408,6 +2408,8 @@
 	conv_placement_new_window(conv);
 }
 
+#if 0 /* I don't like this */
+
 static void
 conv_placement_by_number(GaimConversation *conv)
 {
@@ -2449,6 +2451,8 @@
 	}
 }
 
+#endif
+
 static ConvPlacementData *
 get_conv_placement_data(const char *id)
 {
@@ -2492,8 +2496,6 @@
 							   conv_placement_by_group);
 		add_conv_placement_fnc("account", _("By account"),
 							   conv_placement_by_account);
-		add_conv_placement_fnc("number", _("By conversation count"),
-		                       conv_placement_by_number);
 	}
 }
 
--- a/src/gtkconv.c	Mon May 31 01:39:09 2004 +0000
+++ b/src/gtkconv.c	Mon May 31 03:38:47 2004 +0000
@@ -3449,7 +3449,7 @@
 	gaim_gtkconv_update_buttons_by_protocol(conv);
 
 	/* Check if the buttons should be visible or not */
-	button_type = gaim_prefs_get_int("/gaim/gtk/conversations/im/button_type");
+	button_type = gaim_prefs_get_int("/gaim/gtk/conversations/button_type");
 	if (button_type == GAIM_BUTTON_NONE)
 		gtk_widget_hide(gtkconv->bbox);
 	else
@@ -3536,7 +3536,7 @@
 	gaim_gtkconv_update_buttons_by_protocol(conv);
 
 	/* Check if the buttons should be visible or not */
-	button_type = gaim_prefs_get_int("/gaim/gtk/conversations/chat/button_type");
+	button_type = gaim_prefs_get_int("/gaim/gtk/conversations/button_type");
 	if (button_type == GAIM_BUTTON_NONE)
 		gtk_widget_hide(gtkconv->bbox);
 	else
@@ -4544,7 +4544,7 @@
 	g_object_get(G_OBJECT(gtkwin->window), "has-toplevel-focus", &has_focus, NULL);
 
 	if (!(flags & GAIM_MESSAGE_NO_LOG) &&
-		gaim_prefs_get_bool("/gaim/gtk/conversations/im/raise_on_events")) {
+		gaim_prefs_get_bool("/gaim/gtk/conversations/raise_on_events")) {
 
 		gaim_conv_window_raise(gaim_conversation_get_window(conv));
 	}
@@ -4608,7 +4608,8 @@
 
 	/* Raise the window, if specified in prefs. */
 	if (!(flags & GAIM_MESSAGE_NO_LOG) &&
-		gaim_prefs_get_bool("/gaim/gtk/conversations/chat/raise_on_events")) {
+	    /* we may want to change this */
+		gaim_prefs_get_bool("/gaim/gtk/conversations/raise_on_events")) {
 
 		gaim_conv_window_raise(gaim_conversation_get_window(conv));
 	}
@@ -4639,12 +4640,7 @@
 
 	win = gaim_conversation_get_window(conv);
 
-	if (!(flags & GAIM_MESSAGE_NO_LOG) &&
-	    ((gaim_conversation_get_type(conv) == GAIM_CONV_CHAT &&
-	      gaim_prefs_get_bool("/gaim/gtk/conversations/chat/raise_on_events")) ||
-	     (gaim_conversation_get_type(conv) == GAIM_CONV_IM &&
-	      gaim_prefs_get_bool("/gaim/gtk/conversations/im/raise_on_events")))) {
-
+	if (!(flags & GAIM_MESSAGE_NO_LOG) && gaim_prefs_get_bool("/gaim/gtk/conversations/raise_on_events")) {
 		gaim_conv_window_show(win);
 	}
 
@@ -5359,7 +5355,7 @@
 
 
 	vbox = gtk_vbox_new(FALSE, 0);
-	button_type = gaim_prefs_get_int("/gaim/gtk/conversations/im/button_type");
+	button_type = gaim_prefs_get_int("/gaim/gtk/conversations/button_type");
 	if(button_type == GAIM_BUTTON_NONE) {
 		gtk_box_pack_start(GTK_BOX(gtkconv->entrybox), vbox, FALSE, FALSE, 0);
 		gtk_box_reorder_child(GTK_BOX(gtkconv->entrybox), vbox, 0);
@@ -5752,19 +5748,27 @@
 }
 
 static void
-im_button_type_pref_cb(const char *name, GaimPrefType type,
+button_type_pref_cb(const char *name, GaimPrefType type,
 					   gpointer value, gpointer data)
 {
 	GList *l;
 	GaimConversation *conv;
 	GaimGtkConversation *gtkconv;
 
-	for (l = gaim_get_ims(); l != NULL; l = l->next) {
+	for (l = gaim_get_conversations(); l != NULL; l = l->next) {
 		conv = (GaimConversation *)l->data;
 		gtkconv = GAIM_GTK_CONVERSATION(conv);
-
-		setup_im_buttons(conv, gtk_widget_get_parent(gtkconv->send));
-		gaim_gtkconv_update_buddy_icon(conv);
+		switch (conv->type) {
+		case GAIM_CONV_IM:
+			setup_im_buttons(conv, gtk_widget_get_parent(gtkconv->send));
+			gaim_gtkconv_update_buddy_icon(conv);
+			break;
+		case GAIM_CONV_CHAT:
+			setup_chat_buttons(conv, gtk_widget_get_parent(gtkconv->send));
+			break;
+		default:
+			break;
+		}
 	}
 }
 
@@ -5810,22 +5814,6 @@
 }
 
 static void
-chat_button_type_pref_cb(const char *name, GaimPrefType type,
-						 gpointer value, gpointer data)
-{
-	GList *l;
-	GaimConversation *conv;
-	GaimGtkConversation *gtkconv;
-
-	for (l = gaim_get_chats(); l != NULL; l = l->next) {
-		conv = (GaimConversation *)l->data;
-		gtkconv = GAIM_GTK_CONVERSATION(conv);
-
-		setup_chat_buttons(conv, gtk_widget_get_parent(gtkconv->send));
-	}
-}
-
-static void
 conv_placement_pref_cb(const char *name, GaimPrefType type,
 					   gpointer value, gpointer data)
 {
@@ -5887,23 +5875,23 @@
 	gaim_prefs_add_int("/gaim/gtk/conversations/font_size", 3);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/tabs", TRUE);
 	gaim_prefs_add_int("/gaim/gtk/conversations/tab_side", GTK_POS_TOP);
+	gaim_prefs_add_int("/gaim/gtk/conversations/button_type",
+					   GAIM_BUTTON_TEXT_IMAGE);
+	gaim_prefs_add_bool("/gaim/gtk/conversations/raise_on_events", FALSE);
+
 
 	/* Conversations -> Chat */
 	gaim_prefs_add_none("/gaim/gtk/conversations/chat");
-	gaim_prefs_add_int("/gaim/gtk/conversations/chat/button_type",
-					   GAIM_BUTTON_TEXT_IMAGE);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/chat/color_nicks", TRUE);
-	gaim_prefs_add_bool("/gaim/gtk/conversations/chat/raise_on_events", FALSE);
 	gaim_prefs_add_int("/gaim/gtk/conversations/chat/default_width", 410);
 	gaim_prefs_add_int("/gaim/gtk/conversations/chat/default_height", 160);
 	gaim_prefs_add_int("/gaim/gtk/conversations/chat/entry_height", 50);
 
 	/* Conversations -> IM */
 	gaim_prefs_add_none("/gaim/gtk/conversations/im");
-	gaim_prefs_add_int("/gaim/gtk/conversations/im/button_type",
-					   GAIM_BUTTON_TEXT_IMAGE);
+
 	gaim_prefs_add_bool("/gaim/gtk/conversations/im/animate_buddy_icons", TRUE);
-	gaim_prefs_add_bool("/gaim/gtk/conversations/im/raise_on_events", FALSE);
+
 	gaim_prefs_add_bool("/gaim/gtk/conversations/im/show_buddy_icons", TRUE);
 	gaim_prefs_add_int("/gaim/gtk/conversations/im/default_width", 410);
 	gaim_prefs_add_int("/gaim/gtk/conversations/im/default_height", 160);
@@ -5931,21 +5919,16 @@
 			conv_placement_pref_cb, NULL);
 	gaim_prefs_trigger_callback("/gaim/gtk/conversations/placement");
 
-
+	gaim_prefs_connect_callback("/gaim/gtk/conversations/button_type",
+								button_type_pref_cb, NULL);
 
 	/* IM callbacks */
-	gaim_prefs_connect_callback("/gaim/gtk/conversations/im/button_type",
-								im_button_type_pref_cb, NULL);
 	gaim_prefs_connect_callback("/gaim/gtk/conversations/im/animate_buddy_icons",
 								animate_buddy_icons_pref_cb, NULL);
 	gaim_prefs_connect_callback("/gaim/gtk/conversations/im/show_buddy_icons",
 								show_buddy_icons_pref_cb, NULL);
 
 
-	/* Chat callbacks */
-	gaim_prefs_connect_callback("/gaim/gtk/conversations/chat/button_type",
-								chat_button_type_pref_cb, NULL);
-
 	/**********************************************************************
 	 * Register signals
 	 **********************************************************************/
--- a/src/gtkprefs.c	Mon May 31 01:39:09 2004 +0000
+++ b/src/gtkprefs.c	Mon May 31 03:38:47 2004 +0000
@@ -943,7 +943,7 @@
 {
 	const char *placement = value;
 
-	if (strcmp(placement, "number"))
+	if (strcmp(placement, "new"))
 		gtk_widget_set_sensitive(GTK_WIDGET(data), FALSE);
 	else
 		gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE);
@@ -953,8 +953,9 @@
 	GtkWidget *ret;
 	GtkWidget *vbox;
 	GtkWidget *label;
-	GtkWidget *close_checkbox;/*, *icons_checkbox;*/
-	GtkWidget *tabs_checkbox, *same_checkbox, *tab_placement;
+	GtkWidget *close_checkbox;
+	GtkWidget *tabs_checkbox, *tab_placement;
+	/* GtkWidget *same_checkbox, *icons_checkbox; */
 	GtkSizeGroup *sg;
 	GList *names = NULL;
 
@@ -972,21 +973,28 @@
 
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
 	gtk_size_group_add_widget(sg, label);
-
-	label = gaim_gtk_prefs_labeled_spin_button(vbox, _("Number of conversations per window"),
+#if 1 /* PREFSLASH04 */
+	label = gaim_gtk_prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT,
+					"/gaim/gtk/conversations/button_type",
+					_("Pictures"), GAIM_BUTTON_IMAGE,
+					_("Text"), GAIM_BUTTON_TEXT,
+					_("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE,
+					_("None"), GAIM_BUTTON_NONE,
+					NULL);
+
+	gtk_size_group_add_widget(sg, label);
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
+#endif /* PREFSLASH04 */
+
+ 	label = gaim_gtk_prefs_labeled_spin_button(vbox, _("Number of conversations per window"),
 	                                           "/gaim/gtk/conversations/placement_number",
 	                                           1, 50, sg);
-
 	if (strcmp("number",
-				gaim_prefs_get_string("/gaim/gtk/conversations/placement")))
+		   gaim_prefs_get_string("/gaim/gtk/conversations/placement")))
 		gtk_widget_set_sensitive(label, FALSE);
 	else
 		gtk_widget_set_sensitive(label, TRUE);
 
-	placement_pref_id = gaim_prefs_connect_callback("/gaim/gtk/conversations/placement",
-	                                                conversation_placement_cb,
-	                                                label);
-
 	gaim_gtk_prefs_checkbox(_("Show _formatting toolbar"),
 				  "/gaim/gtk/conversations/show_formatting_toolbar", vbox);
 
@@ -996,20 +1004,40 @@
 	gaim_gtk_prefs_checkbox(_("Enable _Commands"),
 			"/gaim/gtk/conversations/enable_commands", vbox);
 
+	gaim_gtk_prefs_checkbox(_("_Raise window on events"),
+			"/gaim/gtk/conversations/raise_on_events", vbox);
+
+	/* XXX This caption totally sucks but I can't break the string freeze. */
+	gaim_gtk_prefs_checkbox(_("Co_lorize screen names"),
+			"/gaim/gtk/conversations/chat/color_nicks", vbox);
+	gaim_gtk_prefs_checkbox(_("Show buddy _icons"),
+			"/gaim/gtk/conversations/im/show_buddy_icons", vbox);
+	gaim_gtk_prefs_checkbox(_("Enable buddy icon a_nimation"),
+			"/gaim/gtk/conversations/im/animate_buddy_icons", vbox);
+	gaim_gtk_prefs_checkbox(_("Notify buddies that you are _typing to them"),
+			"/core/conversations/im/send_typing", vbox);
+
 	vbox = gaim_gtk_make_frame (ret, _("Tab Options"));
 
 	tabs_checkbox = gaim_gtk_prefs_checkbox(_("Show IMs and chats in _tabbed windows"),
 							"/gaim/gtk/conversations/tabs", vbox);
-
+	if (strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/placement"), "new"))
+		gtk_widget_set_sensitive(tabs_checkbox, FALSE);
+	
+#if 0 /* Overzealous last-minute prefslashing */
 	same_checkbox = gaim_gtk_prefs_checkbox(_("Show IMs and chats in _same tabbed window"),
-							"/core/conversations/combine_chat_im", vbox);
-
+						"/core/conversations/combine_chat_im", vbox);
 	if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) {
 		gtk_widget_set_sensitive(GTK_WIDGET(same_checkbox), FALSE);
 	}
 
 	g_signal_connect(G_OBJECT(tabs_checkbox), "clicked",
-					 G_CALLBACK(gaim_gtk_toggle_sensitive), same_checkbox);
+			 G_CALLBACK(gaim_gtk_toggle_sensitive), same_checkbox);
+#endif
+
+	placement_pref_id = gaim_prefs_connect_callback("/gaim/gtk/conversations/placement",
+	                                                conversation_placement_cb,
+	                                                tabs_checkbox);
 
 	close_checkbox = gaim_gtk_prefs_checkbox(_("Show _close button on tabs"),
 									"/gaim/gtk/conversations/close_on_tabs",
@@ -1049,94 +1077,42 @@
 	return ret;
 }
 
-GtkWidget *im_page() {
-	GtkWidget *ret;
-	GtkWidget *vbox;
-#if 1 /* PREFSLASH04 */
-	GtkWidget *widge;
-#endif /* PREFSLASH04 */
-	GtkSizeGroup *sg;
-
-	ret = gtk_vbox_new(FALSE, 18);
-	gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
-
-	sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
-
-	vbox = gaim_gtk_make_frame (ret, _("Window"));
-#if 1 /* PREFSLASH04 */
-	widge = gaim_gtk_prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT,
-			"/gaim/gtk/conversations/im/button_type",
-			_("Pictures"), GAIM_BUTTON_IMAGE,
-			_("Text"), GAIM_BUTTON_TEXT,
-			_("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE,
-			_("None"), GAIM_BUTTON_NONE,
-			NULL);
-
-	gtk_size_group_add_widget(sg, widge);
-	gtk_misc_set_alignment(GTK_MISC(widge), 0, 0);
-#endif /* PREFSLASH04 */
-	gaim_gtk_prefs_checkbox(_("_Raise window on events"),
-			"/gaim/gtk/conversations/im/raise_on_events", vbox);
-	gtk_widget_show (vbox);
-	vbox = gaim_gtk_make_frame (ret, _("Buddy Icons"));
-	gaim_gtk_prefs_checkbox(_("Show buddy _icons"),
-			"/gaim/gtk/conversations/im/show_buddy_icons", vbox);
-	gaim_gtk_prefs_checkbox(_("Enable buddy icon a_nimation"),
-			"/gaim/gtk/conversations/im/animate_buddy_icons", vbox);
-
-	vbox = gaim_gtk_make_frame (ret, _("Typing Notification"));
-	gaim_gtk_prefs_checkbox(_("Notify buddies that you are _typing to them"),
-			"/core/conversations/im/send_typing", vbox);
-
-	gtk_widget_show_all(ret);
-	return ret;
-}
-
-GtkWidget *chat_page() {
-	GtkWidget *ret;
-	GtkWidget *vbox;
-#if 1 /* PREFSLASH04 */
-	GtkWidget *dd;
-#endif /* PREFSLASH04 */
-	GtkSizeGroup *sg;
-
-	ret = gtk_vbox_new(FALSE, 18);
-	gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
-
-	sg = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
-	vbox = gaim_gtk_make_frame (ret, _("Window"));
-#if 1 /* PREFSLASH04 */
-	dd = gaim_gtk_prefs_dropdown(vbox, _("Show _buttons as:"), GAIM_PREF_INT,
-			"/gaim/gtk/conversations/chat/button_type",
-			_("Pictures"), GAIM_BUTTON_IMAGE,
-			_("Text"), GAIM_BUTTON_TEXT,
-			_("Pictures and text"), GAIM_BUTTON_TEXT_IMAGE,
-			_("None"), GAIM_BUTTON_NONE,
-			NULL);
-
-	gtk_size_group_add_widget(sg, dd);
-	gtk_misc_set_alignment(GTK_MISC(dd), 0, 0);
-#endif /* PREFSLASH04 */
-	gaim_gtk_prefs_checkbox(_("_Raise window on events"),
-			"/gaim/gtk/conversations/chat/raise_on_events", vbox);
-	vbox = gaim_gtk_make_frame (ret, _("Display"));
-	gaim_gtk_prefs_checkbox(_("Co_lorize screen names"),
-			"/gaim/gtk/conversations/chat/color_nicks", vbox);
-
-	gtk_widget_show_all(ret);
-	return ret;
-}
-
 static void network_ip_changed(GtkEntry *entry, gpointer data)
 {
 	gaim_network_set_public_ip(gtk_entry_get_text(entry));
 }
 
+static void
+proxy_changed_cb(const char *name, GaimPrefType type, gpointer value,
+		gpointer data)
+{
+	GtkWidget *frame = data;
+	const char *proxy = value;
+
+	if (strcmp(proxy, "none") && strcmp(proxy, "envvar"))
+		gtk_widget_set_sensitive(frame, TRUE);
+	else
+		gtk_widget_set_sensitive(frame, FALSE);
+}
+
+static void proxy_print_option(GtkEntry *entry, int entrynum)
+{
+	if (entrynum == PROXYHOST)
+		gaim_prefs_set_string("/core/proxy/host", gtk_entry_get_text(entry));
+	else if (entrynum == PROXYPORT)
+		gaim_prefs_set_int("/core/proxy/port", atoi(gtk_entry_get_text(entry)));
+	else if (entrynum == PROXYUSER)
+		gaim_prefs_set_string("/core/proxy/username", gtk_entry_get_text(entry));
+	else if (entrynum == PROXYPASS)
+		gaim_prefs_set_string("/core/proxy/password", gtk_entry_get_text(entry));
+}
+
 GtkWidget *network_page() {
 	GtkWidget *ret;
-	GtkWidget *vbox, *entry;
+	GtkWidget *vbox, *hbox, *entry;
 	GtkWidget *table, *label, *auto_ip_checkbox, *ports_checkbox, *spin_button;
 	GtkSizeGroup *sg;
+	GaimProxyInfo *proxy_info;
 
 	ret = gtk_vbox_new(FALSE, 18);
 	gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
@@ -1196,60 +1172,17 @@
 	g_signal_connect(G_OBJECT(ports_checkbox), "clicked",
 					 G_CALLBACK(gaim_gtk_toggle_sensitive), spin_button);
 
-	gtk_widget_show_all(ret);
-	return ret;
-}
-
-static void
-proxy_changed_cb(const char *name, GaimPrefType type, gpointer value,
-		gpointer data)
-{
-	GtkWidget *frame = data;
-	const char *proxy = value;
-
-	if (strcmp(proxy, "none") && strcmp(proxy, "envvar"))
-		gtk_widget_set_sensitive(frame, TRUE);
-	else
-		gtk_widget_set_sensitive(frame, FALSE);
-}
-
-static void proxy_print_option(GtkEntry *entry, int entrynum)
-{
-	if (entrynum == PROXYHOST)
-		gaim_prefs_set_string("/core/proxy/host", gtk_entry_get_text(entry));
-	else if (entrynum == PROXYPORT)
-		gaim_prefs_set_int("/core/proxy/port", atoi(gtk_entry_get_text(entry)));
-	else if (entrynum == PROXYUSER)
-		gaim_prefs_set_string("/core/proxy/username", gtk_entry_get_text(entry));
-	else if (entrynum == PROXYPASS)
-		gaim_prefs_set_string("/core/proxy/password", gtk_entry_get_text(entry));
-}
-
-GtkWidget *proxy_page() {
-	GtkWidget *ret;
-	GtkWidget *vbox;
-	GtkWidget *entry;
-	GtkWidget *label;
-	GtkWidget *hbox;
-	GtkWidget *table;
-	GaimProxyInfo *proxy_info;
-
-	ret = gtk_vbox_new(FALSE, 18);
-	gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
-
-	vbox = gaim_gtk_make_frame (ret, _("Proxy Type"));
+	vbox = gaim_gtk_make_frame(ret, _("Proxy Server"));
+	prefs_proxy_frame = gtk_vbox_new(FALSE, 0);
 	gaim_gtk_prefs_dropdown(vbox, _("Proxy _type:"), GAIM_PREF_STRING,
-			"/core/proxy/type",
-			_("No proxy"), "none",
-			"SOCKS 4", "socks4",
-			"SOCKS 5", "socks5",
-			"HTTP", "http",
-			_("Use Environmental Settings"), "envvar",
-			NULL);
-
-	vbox = gaim_gtk_make_frame(ret, _("Proxy Server"));
-	prefs_proxy_frame = vbox;
-
+				"/core/proxy/type",
+				_("No proxy"), "none",
+				"SOCKS 4", "socks4",
+				"SOCKS 5", "socks5",
+				"HTTP", "http",
+				_("Use Environmental Settings"), "envvar",
+				NULL);
+	gtk_box_pack_start(GTK_BOX(vbox), prefs_proxy_frame, 0, 0, 0);
 	proxy_info = gaim_global_proxy_get_info();
 
 	if (proxy_info == NULL ||
@@ -1259,13 +1192,13 @@
 		gtk_widget_set_sensitive(GTK_WIDGET(prefs_proxy_frame), FALSE);
 	}
 	proxy_pref_id = gaim_prefs_connect_callback("/core/proxy/type",
-												  proxy_changed_cb, prefs_proxy_frame);
-
-	table = gtk_table_new(2, 4, FALSE);
+						    proxy_changed_cb, prefs_proxy_frame);
+
+	table = gtk_table_new(4, 2, FALSE);
 	gtk_container_set_border_width(GTK_CONTAINER(table), 5);
 	gtk_table_set_col_spacings(GTK_TABLE(table), 5);
 	gtk_table_set_row_spacings(GTK_TABLE(table), 10);
-	gtk_container_add(GTK_CONTAINER(vbox), table);
+	gtk_container_add(GTK_CONTAINER(prefs_proxy_frame), table);
 
 
 	label = gtk_label_new_with_mnemonic(_("_Host:"));
@@ -1288,11 +1221,11 @@
 
 	label = gtk_label_new_with_mnemonic(_("_Port:"));
 	gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-	gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
+	gtk_table_attach(GTK_TABLE(table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
 
 	entry = gtk_entry_new();
 	gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
-	gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
+	gtk_table_attach(GTK_TABLE(table), entry, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
 	g_signal_connect(G_OBJECT(entry), "changed",
 					 G_CALLBACK(proxy_print_option), (void *)PROXYPORT);
 
@@ -1307,11 +1240,11 @@
 
 	label = gtk_label_new_with_mnemonic(_("_User:"));
 	gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-	gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
+	gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
 
 	entry = gtk_entry_new();
 	gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
-	gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 2, 3, GTK_FILL, 0, 0, 0);
+	gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
 	g_signal_connect(G_OBJECT(entry), "changed",
 					 G_CALLBACK(proxy_print_option), (void *)PROXYUSER);
 
@@ -1325,11 +1258,11 @@
 
 	label = gtk_label_new_with_mnemonic(_("Pa_ssword:"));
 	gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-	gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4, GTK_FILL, 0, 0, 0);
+	gtk_table_attach(GTK_TABLE(table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
 
 	entry = gtk_entry_new();
 	gtk_label_set_mnemonic_widget(GTK_LABEL(label), entry);
-	gtk_table_attach(GTK_TABLE(table), entry, 1, 2, 3, 4, GTK_FILL , 0, 0, 0);
+	gtk_table_attach(GTK_TABLE(table), entry, 3, 4, 1, 2, GTK_FILL , 0, 0, 0);
 	gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
 	g_signal_connect(G_OBJECT(entry), "changed",
 					 G_CALLBACK(proxy_print_option), (void *)PROXYPASS);
@@ -1558,13 +1491,180 @@
 }
 #endif
 
+
+static void
+event_toggled(GtkCellRendererToggle *cell, gchar *pth, gpointer data)
+{
+	GtkTreeModel *model = (GtkTreeModel *)data;
+	GtkTreeIter iter;
+	GtkTreePath *path = gtk_tree_path_new_from_string(pth);
+	const char *pref;
+
+	gtk_tree_model_get_iter (model, &iter, path);
+	gtk_tree_model_get (model, &iter,
+						2, &pref,
+						-1);
+
+	gaim_prefs_set_bool(pref, !gtk_cell_renderer_toggle_get_active(cell));
+
+	gtk_list_store_set(GTK_LIST_STORE (model), &iter,
+					   0, !gtk_cell_renderer_toggle_get_active(cell),
+					   -1);
+
+	gtk_tree_path_free(path);
+}
+
+static void
+test_sound(GtkWidget *button, gpointer i_am_NULL)
+{
+	char *pref;
+	gboolean temp_value1, temp_value2;
+
+	pref = g_strdup_printf("/gaim/gtk/sound/enabled/%s",
+			gaim_gtk_sound_get_event_option(sound_row_sel));
+
+	temp_value1 = gaim_prefs_get_bool("/core/sound/while_away");
+	temp_value2 = gaim_prefs_get_bool(pref);
+
+	if (!temp_value1) gaim_prefs_set_bool("/core/sound/while_away", TRUE);
+	if (!temp_value2) gaim_prefs_set_bool(pref, TRUE);
+
+	gaim_sound_play_event(sound_row_sel);
+
+	if (!temp_value1) gaim_prefs_set_bool("/core/sound/while_away", FALSE);
+	if (!temp_value2) gaim_prefs_set_bool(pref, FALSE);
+
+	g_free(pref);
+}
+
+static void
+reset_sound(GtkWidget *button, gpointer i_am_also_NULL)
+{
+	char *pref = g_strdup_printf("/gaim/gtk/sound/file/%s",
+			gaim_gtk_sound_get_event_option(sound_row_sel));
+
+	/* This just resets a sound file back to default */
+	gaim_prefs_set_string(pref, "");
+	g_free(pref);
+
+	gtk_entry_set_text(GTK_ENTRY(sound_entry), "(default)");
+}
+
+void close_sounddialog(GtkWidget *w, GtkWidget *w2)
+{
+
+	GtkWidget *dest;
+
+	if (!GTK_IS_WIDGET(w2))
+		dest = w;
+	else
+		dest = w2;
+
+	sounddialog = NULL;
+
+	gtk_widget_destroy(dest);
+}
+
+void do_select_sound(GtkWidget *w, gpointer data)
+{
+	const char *file;
+	char *pref;
+	int snd;
+
+	file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(sounddialog));
+	snd = GPOINTER_TO_INT(data);
+
+	/* If they type in a directory, change there */
+	if (gaim_gtk_check_if_dir(file, GTK_FILE_SELECTION(sounddialog)))
+		return;
+
+	/* Set it -- and forget it */
+	pref = g_strdup_printf("/gaim/gtk/sound/file/%s",
+			gaim_gtk_sound_get_event_option(snd));
+	gaim_prefs_set_string(pref, file);
+	g_free(pref);
+
+	/* Set our text entry */
+	gtk_entry_set_text(GTK_ENTRY(sound_entry), file);
+
+	/* Close the window! It's getting cold in here! */
+	close_sounddialog(NULL, sounddialog);
+
+	if (last_sound_dir)
+		g_free(last_sound_dir);
+	last_sound_dir = g_path_get_dirname(file);
+}
+
+static void sel_sound(GtkWidget *button, gpointer being_NULL_is_fun)
+{
+	char *buf = g_malloc(BUF_LEN);
+
+	if (!sounddialog) {
+		sounddialog = gtk_file_selection_new(_("Sound Selection"));
+
+		gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(sounddialog));
+
+		g_snprintf(buf, BUF_LEN - 1, "%s" G_DIR_SEPARATOR_S, last_sound_dir ? last_sound_dir : gaim_home_dir());
+
+		gtk_file_selection_set_filename(GTK_FILE_SELECTION(sounddialog), buf);
+
+		g_signal_connect(G_OBJECT(sounddialog), "destroy",
+						 G_CALLBACK(close_sounddialog), sounddialog);
+
+		g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(sounddialog)->ok_button),
+						 "clicked",
+						 G_CALLBACK(do_select_sound), GINT_TO_POINTER(sound_row_sel));
+
+		g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(sounddialog)->cancel_button),
+						 "clicked",
+						 G_CALLBACK(close_sounddialog), sounddialog);
+	}
+
+	g_free(buf);
+	gtk_widget_show(sounddialog);
+	gdk_window_raise(sounddialog->window);
+}
+
+
+static void prefs_sound_sel (GtkTreeSelection *sel, GtkTreeModel *model) {
+	GtkTreeIter  iter;
+	GValue val = { 0, };
+	const char *file;
+	char *pref;
+
+	if (! gtk_tree_selection_get_selected (sel, &model, &iter))
+		return;
+	gtk_tree_model_get_value (model, &iter, 3, &val);
+	sound_row_sel = g_value_get_uint(&val);
+
+	pref = g_strdup_printf("/gaim/gtk/sound/file/%s",
+			gaim_gtk_sound_get_event_option(sound_row_sel));
+	file = gaim_prefs_get_string(pref);
+	g_free(pref);
+	if (sound_entry)
+		gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : "(default)");
+	g_value_unset (&val);
+	if (sounddialog)
+		gtk_widget_destroy(sounddialog);
+}
+
 GtkWidget *sound_page() {
 	GtkWidget *ret;
-	GtkWidget *vbox;
+	GtkWidget *vbox, *sw, *button;
 	GtkSizeGroup *sg;
+	GtkTreeIter iter;
+	GtkWidget *event_view;
+	GtkListStore *event_store;
+	GtkCellRenderer *rend;
+	GtkTreeViewColumn *col;
+	GtkTreeSelection *sel;
+	GtkTreePath *path;
+	GtkWidget *hbox;
+	int j;
+	const char *file;
+	char *pref;	
 #ifndef _WIN32
 	GtkWidget *dd;
-	GtkWidget *hbox;
 	GtkWidget *label;
 	GtkWidget *entry;
 	const char *cmd;
@@ -1602,8 +1702,6 @@
 	hbox = gtk_hbox_new(FALSE, 5);
 	gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
 
-	hbox = gtk_hbox_new(FALSE, 5);
-	gtk_container_add(GTK_CONTAINER(vbox), hbox);
 	label = gtk_label_new_with_mnemonic(_("Sound c_ommand:\n(%s for filename)"));
 	gtk_size_group_add_widget(sg, label);
 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
@@ -1630,6 +1728,95 @@
 
 	gaim_set_accessible_label (entry, label);
 #endif /* _WIN32 */
+
+	vbox = gaim_gtk_make_frame(ret, _("Sound Events"));
+
+	/* The following is an ugly hack to make the frame expand so the
+	 * sound events list is big enough to be usable */
+	gtk_box_set_child_packing(GTK_BOX(vbox->parent), vbox, TRUE, TRUE, 0,
+			GTK_PACK_START);
+	gtk_box_set_child_packing(GTK_BOX(vbox->parent->parent), vbox->parent, TRUE,
+			TRUE, 0, GTK_PACK_START);
+	gtk_box_set_child_packing(GTK_BOX(vbox->parent->parent->parent),
+			vbox->parent->parent, TRUE, TRUE, 0, GTK_PACK_START);
+
+	sw = gtk_scrolled_window_new(NULL,NULL);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
+
+	gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0);
+	event_store = gtk_list_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT);
+
+	for (j=0; j < GAIM_NUM_SOUNDS; j++) {
+		char *pref = g_strdup_printf("/gaim/gtk/sound/enabled/%s",
+					     gaim_gtk_sound_get_event_option(j));
+		const char *label = gaim_gtk_sound_get_event_label(j);
+
+		if (label == NULL) {
+			g_free(pref);
+			continue;
+		}
+
+		gtk_list_store_append (event_store, &iter);
+		gtk_list_store_set(event_store, &iter,
+				   0, gaim_prefs_get_bool(pref),
+				   1, _(label),
+				   2, pref,
+				   3, j,
+				   -1);
+		g_free(pref);
+	}
+
+	event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(event_store));
+
+	rend = gtk_cell_renderer_toggle_new();
+	sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view));
+	g_signal_connect (G_OBJECT (sel), "changed",
+			  G_CALLBACK (prefs_sound_sel),
+			  NULL);
+	g_signal_connect (G_OBJECT(rend), "toggled",
+			  G_CALLBACK(event_toggled), event_store);
+	path = gtk_tree_path_new_first();
+	gtk_tree_selection_select_path(sel, path);
+	gtk_tree_path_free(path);
+
+	col = gtk_tree_view_column_new_with_attributes (_("Play"),
+							rend,
+							"active", 0,
+							NULL);
+	gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col);
+
+	rend = gtk_cell_renderer_text_new();
+	col = gtk_tree_view_column_new_with_attributes (_("Event"),
+							rend,
+							"text", 1,
+							NULL);
+	gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col);
+	g_object_unref(G_OBJECT(event_store));
+	gtk_container_add(GTK_CONTAINER(sw), event_view);
+
+	hbox = gtk_hbox_new(FALSE, 6);
+	gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
+	sound_entry = gtk_entry_new();
+	pref = g_strdup_printf("/gaim/gtk/sound/file/%s",
+			       gaim_gtk_sound_get_event_option(0));
+	file = gaim_prefs_get_string(pref);
+	g_free(pref);
+	gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : "(default)");
+	gtk_editable_set_editable(GTK_EDITABLE(sound_entry), FALSE);
+	gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, 5);
+
+	button = gtk_button_new_with_label(_("Test"));
+	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(test_sound), NULL);
+	gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
+
+	button = gtk_button_new_with_label(_("Reset"));
+	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(reset_sound), NULL);
+	gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
+
+	button = gtk_button_new_with_label(_("Choose..."));
+	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(sel_sound), NULL);
+	gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
 	gtk_widget_show_all(ret);
 
 	return ret;
@@ -1718,6 +1905,7 @@
 	return ret;
 }
 
+#if 0
 static GtkWidget *
 protocol_page() {
 	GtkWidget *ret;
@@ -1727,6 +1915,7 @@
 
 	return ret;
 }
+#endif
 
 static GtkWidget *plugin_description=NULL, *plugin_details=NULL;
 
@@ -2084,264 +2273,6 @@
 	return ret;
 }
 
-static void
-event_toggled(GtkCellRendererToggle *cell, gchar *pth, gpointer data)
-{
-	GtkTreeModel *model = (GtkTreeModel *)data;
-	GtkTreeIter iter;
-	GtkTreePath *path = gtk_tree_path_new_from_string(pth);
-	const char *pref;
-
-	gtk_tree_model_get_iter (model, &iter, path);
-	gtk_tree_model_get (model, &iter,
-						2, &pref,
-						-1);
-
-	gaim_prefs_set_bool(pref, !gtk_cell_renderer_toggle_get_active(cell));
-
-	gtk_list_store_set(GTK_LIST_STORE (model), &iter,
-					   0, !gtk_cell_renderer_toggle_get_active(cell),
-					   -1);
-
-	gtk_tree_path_free(path);
-}
-
-static void
-test_sound(GtkWidget *button, gpointer i_am_NULL)
-{
-	char *pref;
-	gboolean temp_value1, temp_value2;
-
-	pref = g_strdup_printf("/gaim/gtk/sound/enabled/%s",
-			gaim_gtk_sound_get_event_option(sound_row_sel));
-
-	temp_value1 = gaim_prefs_get_bool("/core/sound/while_away");
-	temp_value2 = gaim_prefs_get_bool(pref);
-
-	if (!temp_value1) gaim_prefs_set_bool("/core/sound/while_away", TRUE);
-	if (!temp_value2) gaim_prefs_set_bool(pref, TRUE);
-
-	gaim_sound_play_event(sound_row_sel);
-
-	if (!temp_value1) gaim_prefs_set_bool("/core/sound/while_away", FALSE);
-	if (!temp_value2) gaim_prefs_set_bool(pref, FALSE);
-
-	g_free(pref);
-}
-
-static void
-reset_sound(GtkWidget *button, gpointer i_am_also_NULL)
-{
-	char *pref = g_strdup_printf("/gaim/gtk/sound/file/%s",
-			gaim_gtk_sound_get_event_option(sound_row_sel));
-
-	/* This just resets a sound file back to default */
-	gaim_prefs_set_string(pref, "");
-	g_free(pref);
-
-	gtk_entry_set_text(GTK_ENTRY(sound_entry), "(default)");
-}
-
-void close_sounddialog(GtkWidget *w, GtkWidget *w2)
-{
-
-	GtkWidget *dest;
-
-	if (!GTK_IS_WIDGET(w2))
-		dest = w;
-	else
-		dest = w2;
-
-	sounddialog = NULL;
-
-	gtk_widget_destroy(dest);
-}
-
-void do_select_sound(GtkWidget *w, gpointer data)
-{
-	const char *file;
-	char *pref;
-	int snd;
-
-	file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(sounddialog));
-	snd = GPOINTER_TO_INT(data);
-
-	/* If they type in a directory, change there */
-	if (gaim_gtk_check_if_dir(file, GTK_FILE_SELECTION(sounddialog)))
-		return;
-
-	/* Set it -- and forget it */
-	pref = g_strdup_printf("/gaim/gtk/sound/file/%s",
-			gaim_gtk_sound_get_event_option(snd));
-	gaim_prefs_set_string(pref, file);
-	g_free(pref);
-
-	/* Set our text entry */
-	gtk_entry_set_text(GTK_ENTRY(sound_entry), file);
-
-	/* Close the window! It's getting cold in here! */
-	close_sounddialog(NULL, sounddialog);
-
-	if (last_sound_dir)
-		g_free(last_sound_dir);
-	last_sound_dir = g_path_get_dirname(file);
-}
-
-static void sel_sound(GtkWidget *button, gpointer being_NULL_is_fun)
-{
-	char *buf = g_malloc(BUF_LEN);
-
-	if (!sounddialog) {
-		sounddialog = gtk_file_selection_new(_("Sound Selection"));
-
-		gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(sounddialog));
-
-		g_snprintf(buf, BUF_LEN - 1, "%s" G_DIR_SEPARATOR_S, last_sound_dir ? last_sound_dir : gaim_home_dir());
-
-		gtk_file_selection_set_filename(GTK_FILE_SELECTION(sounddialog), buf);
-
-		g_signal_connect(G_OBJECT(sounddialog), "destroy",
-						 G_CALLBACK(close_sounddialog), sounddialog);
-
-		g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(sounddialog)->ok_button),
-						 "clicked",
-						 G_CALLBACK(do_select_sound), GINT_TO_POINTER(sound_row_sel));
-
-		g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(sounddialog)->cancel_button),
-						 "clicked",
-						 G_CALLBACK(close_sounddialog), sounddialog);
-	}
-
-	g_free(buf);
-	gtk_widget_show(sounddialog);
-	gdk_window_raise(sounddialog->window);
-}
-
-
-static void prefs_sound_sel (GtkTreeSelection *sel, GtkTreeModel *model) {
-	GtkTreeIter  iter;
-	GValue val = { 0, };
-	const char *file;
-	char *pref;
-
-	if (! gtk_tree_selection_get_selected (sel, &model, &iter))
-		return;
-	gtk_tree_model_get_value (model, &iter, 3, &val);
-	sound_row_sel = g_value_get_uint(&val);
-
-	pref = g_strdup_printf("/gaim/gtk/sound/file/%s",
-			gaim_gtk_sound_get_event_option(sound_row_sel));
-	file = gaim_prefs_get_string(pref);
-	g_free(pref);
-	if (sound_entry)
-		gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : "(default)");
-	g_value_unset (&val);
-	if (sounddialog)
-		gtk_widget_destroy(sounddialog);
-}
-
-GtkWidget *sound_events_page() {
-
-	GtkWidget *ret;
-	GtkWidget *sw;
-	GtkWidget *button, *hbox;
-	GtkTreeIter iter;
-	GtkWidget *event_view;
-	GtkListStore *event_store;
-	GtkCellRenderer *rend;
-	GtkTreeViewColumn *col;
-	GtkTreeSelection *sel;
-	GtkTreePath *path;
-	int j;
-	const char *file;
-	char *pref;
-
-	ret = gtk_vbox_new(FALSE, 18);
-	gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
-
-	sw = gtk_scrolled_window_new(NULL,NULL);
-	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
-
-	gtk_box_pack_start(GTK_BOX(ret), sw, TRUE, TRUE, 0);
-	event_store = gtk_list_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT);
-
-	for (j=0; j < GAIM_NUM_SOUNDS; j++) {
-		char *pref = g_strdup_printf("/gaim/gtk/sound/enabled/%s",
-				gaim_gtk_sound_get_event_option(j));
-		const char *label = gaim_gtk_sound_get_event_label(j);
-
-		if (label == NULL) {
-			g_free(pref);
-			continue;
-		}
-
-		gtk_list_store_append (event_store, &iter);
-		gtk_list_store_set(event_store, &iter,
-				   0, gaim_prefs_get_bool(pref),
-				   1, _(label),
-				   2, pref,
-				   3, j,
-				   -1);
-		g_free(pref);
-	}
-
-	event_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(event_store));
-
-	rend = gtk_cell_renderer_toggle_new();
-	sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (event_view));
-	g_signal_connect (G_OBJECT (sel), "changed",
-			  G_CALLBACK (prefs_sound_sel),
-			  NULL);
-	g_signal_connect (G_OBJECT(rend), "toggled",
-			  G_CALLBACK(event_toggled), event_store);
-	path = gtk_tree_path_new_first();
-	gtk_tree_selection_select_path(sel, path);
-	gtk_tree_path_free(path);
-
-	col = gtk_tree_view_column_new_with_attributes (_("Play"),
-							rend,
-							"active", 0,
-							NULL);
-	gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col);
-
-	rend = gtk_cell_renderer_text_new();
-	col = gtk_tree_view_column_new_with_attributes (_("Event"),
-							rend,
-							"text", 1,
-							NULL);
-	gtk_tree_view_append_column (GTK_TREE_VIEW(event_view), col);
-	g_object_unref(G_OBJECT(event_store));
-	gtk_container_add(GTK_CONTAINER(sw), event_view);
-
-	hbox = gtk_hbox_new(FALSE, 6);
-	gtk_box_pack_start(GTK_BOX(ret), hbox, FALSE, FALSE, 0);
-	sound_entry = gtk_entry_new();
-	pref = g_strdup_printf("/gaim/gtk/sound/file/%s",
-			gaim_gtk_sound_get_event_option(0));
-	file = gaim_prefs_get_string(pref);
-	g_free(pref);
-	gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : "(default)");
-	gtk_editable_set_editable(GTK_EDITABLE(sound_entry), FALSE);
-	gtk_box_pack_start(GTK_BOX(hbox), sound_entry, FALSE, FALSE, 5);
-
-	button = gtk_button_new_with_label(_("Test"));
-	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(test_sound), NULL);
-	gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
-
-	button = gtk_button_new_with_label(_("Reset"));
-	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(reset_sound), NULL);
-	gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
-
-	button = gtk_button_new_with_label(_("Choose..."));
-	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(sel_sound), NULL);
-	gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1);
-
-	gtk_widget_show_all (ret);
-
-	return ret;
-}
-
 static void away_message_sel_cb(GtkTreeSelection *sel, GtkTreeModel *model)
 {
 	GtkTreeIter  iter;
@@ -2501,7 +2432,7 @@
 }
 
 void prefs_notebook_init() {
-	GtkTreeIter p, p2, c;
+	GtkTreeIter p, c;
 	GList *l;
 	GaimPlugin *plug;
 	prefs_notebook_add_page(_("Interface"), NULL, interface_page(), &p, NULL, notebook_page++);
@@ -2509,23 +2440,18 @@
 	prefs_notebook_add_page(_("Message Text"), NULL, messages_page(), &c, &p, notebook_page++);
 	prefs_notebook_add_page(_("Shortcuts"), NULL, hotkeys_page(), &c, &p, notebook_page++);
 	prefs_notebook_add_page(_("Buddy List"), NULL, list_page(), &c, &p, notebook_page++);
-	prefs_notebook_add_page(_("Conversations"), NULL, conv_page(), &p2, NULL, notebook_page++);
-	prefs_notebook_add_page(_("IMs"), NULL, im_page(), &c, &p2, notebook_page++);
-	prefs_notebook_add_page(_("Chats"), NULL, chat_page(), &c, &p2, notebook_page++);
+	prefs_notebook_add_page(_("Conversations"), NULL, conv_page(), &c, &p, notebook_page++);
+	prefs_notebook_add_page(_("Sounds"), NULL, sound_page(), &c, &p, notebook_page++);
 	prefs_notebook_add_page(_("Network"), NULL, network_page(), &p, NULL, notebook_page++);
-	prefs_notebook_add_page(_("Proxy"), NULL, proxy_page(), &p, NULL, notebook_page++);
 #ifndef _WIN32
 	/* We use the registered default browser in windows */
 	prefs_notebook_add_page(_("Browser"), NULL, browser_page(), &p, NULL, notebook_page++);
 #endif
 	prefs_notebook_add_page(_("Logging"), NULL, logging_page(), &p, NULL, notebook_page++);
-	prefs_notebook_add_page(_("Sounds"), NULL, sound_page(), &p, NULL, notebook_page++);
-	prefs_notebook_add_page(_("Sound Events"), NULL, sound_events_page(), &c, &p, notebook_page++);
 	prefs_notebook_add_page(_("Away / Idle"), NULL, away_page(), &p, NULL, notebook_page++);
 	prefs_notebook_add_page(_("Away Messages"), NULL, away_message_page(), &c, &p, notebook_page++);
 
 	if (gaim_plugins_enabled()) {
-		prefs_notebook_add_page(_("Protocols"), NULL, protocol_page(), &proto_iter, NULL, notebook_page++);
 		prefs_notebook_add_page(_("Plugins"), NULL, plugin_page(), &plugin_iter, NULL, notebook_page++);
 
 		for (l = gaim_plugins_get_loaded(); l != NULL; l = l->next) {
@@ -2558,7 +2484,7 @@
 					prefs_info->iter = g_new0(GtkTreeIter, 1);
 					prefs_notebook_add_page(_(plug->info->name), NULL,
 										gtk_frame, prefs_info->iter,
-										(plug->info->type == GAIM_PLUGIN_PROTOCOL) ? &proto_iter : &plugin_iter,
+										(plug->info->type == GAIM_PLUGIN_PROTOCOL) ?  NULL : &plugin_iter,
 										notebook_page++);
 				} else if(prefs_info->frame) {
 					/* in the event that there is a pref frame and we can
@@ -2845,6 +2771,11 @@
 	gaim_prefs_rename("/gaim/gtk/conversations/use_custom_font",
 					  "/gaim/gtk/conversations/send_formatting");
 
+	gaim_prefs_rename("/gaim/gtk/conversations/im/button_type",
+			"/gaim/gtk/conversations/button_type");
+	gaim_prefs_rename("/gaim/gtk/conversations/im/raise_on_events",
+			"/gaim/gtk/conversations/raise_on_events");
+
 	/* Remove some no-longer-used prefs */
 	gaim_prefs_remove("/gaim/gtk/blist/show_group_count");
 	gaim_prefs_remove("/gaim/gtk/conversations/icons_on_tabs");
--- a/src/gtkutils.c	Mon May 31 01:39:09 2004 +0000
+++ b/src/gtkutils.c	Mon May 31 03:38:47 2004 +0000
@@ -209,23 +209,12 @@
 	int dispstyle = 2;
 	int value;
 
-	if (type == GAIM_CONV_CHAT) {
-		value = gaim_prefs_get_int("/gaim/gtk/conversations/chat/button_type");
+	value = gaim_prefs_get_int("/gaim/gtk/conversations/button_type");
 
-		switch (value) {
-			case GAIM_BUTTON_TEXT:  dispstyle = 1; break;
-			case GAIM_BUTTON_IMAGE: dispstyle = 0; break;
-			default:                dispstyle = 2; break; /* both/neither */
-		}
-	}
-	else if (type == GAIM_CONV_IM) {
-		value = gaim_prefs_get_int("/gaim/gtk/conversations/im/button_type");
-
-		switch (value) {
-			case GAIM_BUTTON_TEXT:  dispstyle = 1; break;
-			case GAIM_BUTTON_IMAGE: dispstyle = 0; break;
-			default:                dispstyle = 2; break; /* both/neither */
-		}
+	switch (value) {
+	case GAIM_BUTTON_TEXT:  dispstyle = 1; break;
+	case GAIM_BUTTON_IMAGE: dispstyle = 0; break;
+	default:                dispstyle = 2; break; /* both/neither */
 	}
 
 	return dispstyle;