diff pidgin/gtkconv.c @ 16062:07554cc5d090

Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades until someone comes up with something cleverererer
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 11 Apr 2007 13:38:05 +0000
parents d64602bb59d2
children f2a4b05407d7
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Wed Apr 11 13:35:46 2007 +0000
+++ b/pidgin/gtkconv.c	Wed Apr 11 13:38:05 2007 +0000
@@ -214,7 +214,7 @@
 static gboolean
 lbox_size_allocate_cb(GtkWidget *w, GtkAllocation *allocation, gpointer data)
 {
-	purple_prefs_set_int("/purple/gtk/conversations/chat/userlist_width", allocation->width == 1 ? 0 : allocation->width);
+	purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/chat/userlist_width", allocation->width == 1 ? 0 : allocation->width);
 
 	return FALSE;
 }
@@ -243,20 +243,20 @@
 	if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM)
 	{
 		if (w == gtkconv->imhtml) {
-			purple_prefs_set_int("/purple/gtk/conversations/im/default_width", allocation->width);
-			purple_prefs_set_int("/purple/gtk/conversations/im/default_height", allocation->height);
+			purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/im/default_width", allocation->width);
+			purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/im/default_height", allocation->height);
 		}
 		if (w == gtkconv->lower_hbox)
-			purple_prefs_set_int("/purple/gtk/conversations/im/entry_height", allocation->height);
+			purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/im/entry_height", allocation->height);
 	}
 	else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT)
 	{
 		if (w == gtkconv->imhtml) {
-			purple_prefs_set_int("/purple/gtk/conversations/chat/default_width", allocation->width);
-			purple_prefs_set_int("/purple/gtk/conversations/chat/default_height", allocation->height);
+			purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/chat/default_width", allocation->width);
+			purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/chat/default_height", allocation->height);
 		}
 		if (w == gtkconv->lower_hbox)
-			purple_prefs_set_int("/purple/gtk/conversations/chat/entry_height", allocation->height);
+			purple_prefs_set_int(PIDGIN_PREFS_ROOT "/conversations/chat/entry_height", allocation->height);
 	}
 
 	return FALSE;
@@ -272,30 +272,30 @@
 		char color[8];
 		GdkColor fg_color, bg_color;
 
-		if (purple_prefs_get_bool("/purple/gtk/conversations/send_bold") != GTK_IMHTML(c->entry)->edit.bold)
+		if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/send_bold") != GTK_IMHTML(c->entry)->edit.bold)
 			gtk_imhtml_toggle_bold(GTK_IMHTML(c->entry));
 
-		if (purple_prefs_get_bool("/purple/gtk/conversations/send_italic") != GTK_IMHTML(c->entry)->edit.italic)
+		if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/send_italic") != GTK_IMHTML(c->entry)->edit.italic)
 			gtk_imhtml_toggle_italic(GTK_IMHTML(c->entry));
 
-		if (purple_prefs_get_bool("/purple/gtk/conversations/send_underline") != GTK_IMHTML(c->entry)->edit.underline)
+		if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/send_underline") != GTK_IMHTML(c->entry)->edit.underline)
 			gtk_imhtml_toggle_underline(GTK_IMHTML(c->entry));
 
 		gtk_imhtml_toggle_fontface(GTK_IMHTML(c->entry),
-			purple_prefs_get_string("/purple/gtk/conversations/font_face"));
+			purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/font_face"));
 
 		if (!(conv->features & PURPLE_CONNECTION_NO_FONTSIZE))
 		{
-			int size = purple_prefs_get_int("/purple/gtk/conversations/font_size");
+			int size = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/font_size");
 
 			/* 3 is the default. */
 			if (size != 3)
 				gtk_imhtml_font_set_size(GTK_IMHTML(c->entry), size);
 		}
 
-		if(strcmp(purple_prefs_get_string("/purple/gtk/conversations/fgcolor"), "") != 0)
+		if(strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/fgcolor"), "") != 0)
 		{
-			gdk_color_parse(purple_prefs_get_string("/purple/gtk/conversations/fgcolor"),
+			gdk_color_parse(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/fgcolor"),
 							&fg_color);
 			g_snprintf(color, sizeof(color), "#%02x%02x%02x",
 									fg_color.red   / 256,
@@ -307,9 +307,9 @@
 		gtk_imhtml_toggle_forecolor(GTK_IMHTML(c->entry), color);
 
 		if(!(conv->features & PURPLE_CONNECTION_NO_BGCOLOR) &&
-		   strcmp(purple_prefs_get_string("/purple/gtk/conversations/bgcolor"), "") != 0)
+		   strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/bgcolor"), "") != 0)
 		{
-			gdk_color_parse(purple_prefs_get_string("/purple/gtk/conversations/bgcolor"),
+			gdk_color_parse(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/bgcolor"),
 							&bg_color);
 			g_snprintf(color, sizeof(color), "#%02x%02x%02x",
 									bg_color.red   / 256,
@@ -459,10 +459,10 @@
 	PurpleConversation *conv = gtkconv->active_conv;
 	if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT)
 		gtk_widget_set_size_request(gtkconv->lower_hbox, -1,
-					    purple_prefs_get_int("/purple/gtk/conversations/chat/entry_height"));
+					    purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/entry_height"));
 	else
 		gtk_widget_set_size_request(gtkconv->lower_hbox, -1,
-					    purple_prefs_get_int("/purple/gtk/conversations/im/entry_height"));
+					    purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/entry_height"));
 }
 
 static gboolean
@@ -1356,7 +1356,7 @@
 static void
 menu_toolbar_cb(gpointer data, guint action, GtkWidget *widget)
 {
-	purple_prefs_set_bool("/purple/gtk/conversations/show_formatting_toolbar",
+	purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/show_formatting_toolbar",
 	                    gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)));
 }
 
@@ -1381,7 +1381,7 @@
 static void
 menu_timestamps_cb(gpointer data, guint action, GtkWidget *widget)
 {
-	purple_prefs_set_bool("/purple/gtk/conversations/show_timestamps",
+	purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/show_timestamps",
 		gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)));
 }
 
@@ -3031,14 +3031,14 @@
 	win->menu.sounds =
 		gtk_item_factory_get_widget(win->menu.item_factory,
 		                            N_("/Options/Enable Sounds"));
-	method = purple_prefs_get_string("/purple/gtk/sound/method");
-	if (!strcmp(method, "none"))
+	method = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/sound/method");
+	if (method != NULL && !strcmp(method, "none"))
 	{
 		gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(win->menu.sounds),
 		                               FALSE);
 		gtk_widget_set_sensitive(win->menu.sounds, FALSE);
 	}
-	purple_prefs_connect_callback(win, "/purple/gtk/sound/method",
+	purple_prefs_connect_callback(win, PIDGIN_PREFS_ROOT "/sound/method",
 				    sound_method_pref_changed_cb, win);
 
 	win->menu.show_formatting_toolbar =
@@ -3050,13 +3050,13 @@
 	win->menu.show_icon =
 		gtk_item_factory_get_widget(win->menu.item_factory,
 		                            N_("/Options/Show Buddy Icon"));
-	if (!purple_prefs_get_bool("/purple/gtk/conversations/im/show_buddy_icons"))
+	if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons"))
 	{
 		gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(win->menu.show_icon),
 		                               FALSE);
 		gtk_widget_set_sensitive(win->menu.show_icon, FALSE);
 	}
-	purple_prefs_connect_callback(win, "/purple/gtk/conversations/im/show_buddy_icons",
+	purple_prefs_connect_callback(win, PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons",
 				    show_buddy_icons_pref_changed_cb, win);
 
 	win->menu.tray = pidgin_menu_tray_new();
@@ -4192,8 +4192,8 @@
 	                               imhtml_sw_hscroll, GTK_POLICY_ALWAYS);
 
 	gtk_widget_set_size_request(gtkconv->imhtml,
-			purple_prefs_get_int("/purple/gtk/conversations/chat/default_width"),
-			purple_prefs_get_int("/purple/gtk/conversations/chat/default_height"));
+			purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/default_width"),
+			purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/default_height"));
 	g_signal_connect(G_OBJECT(gtkconv->imhtml), "size-allocate",
 					 G_CALLBACK(size_allocate_cb), gtkconv);
 
@@ -4237,7 +4237,7 @@
 	gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
 	gtk_tree_view_append_column(GTK_TREE_VIEW(list), col);
 	gtk_widget_set_size_request(lbox,
-	                            purple_prefs_get_int("/purple/gtk/conversations/chat/userlist_width"), -1);
+	                            purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/userlist_width"), -1);
 
 	g_signal_connect(G_OBJECT(list), "button_press_event",
 					 G_CALLBACK(right_click_chat_cb), gtkconv);
@@ -4304,7 +4304,7 @@
 	gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->entry),
 								 purple_account_get_protocol_name(conv->account));
 	gtk_widget_set_size_request(gtkconv->lower_hbox, -1,
-			purple_prefs_get_int("/purple/gtk/conversations/chat/entry_height"));
+			purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/entry_height"));
 	gtkconv->entry_buffer =
 		gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry));
 	g_object_set_data(G_OBJECT(gtkconv->entry_buffer), "user_data", gtkconv);
@@ -4366,8 +4366,8 @@
 	                               imhtml_sw_hscroll, GTK_POLICY_ALWAYS);
 
 	gtk_widget_set_size_request(gtkconv->imhtml,
-			purple_prefs_get_int("/purple/gtk/conversations/im/default_width"),
-			purple_prefs_get_int("/purple/gtk/conversations/im/default_height"));
+			purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/default_width"),
+			purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/default_height"));
 	g_signal_connect(G_OBJECT(gtkconv->imhtml), "size-allocate",
 	                 G_CALLBACK(size_allocate_cb), gtkconv);
 
@@ -4403,7 +4403,7 @@
 	gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->entry),
 								 purple_account_get_protocol_name(conv->account));
 	gtk_widget_set_size_request(gtkconv->lower_hbox, -1,
-			purple_prefs_get_int("/purple/gtk/conversations/im/entry_height"));
+			purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/entry_height"));
 	gtkconv->entry_buffer =
 		gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry));
 	g_object_set_data(G_OBJECT(gtkconv->entry_buffer), "user_data", gtkconv);
@@ -4432,7 +4432,7 @@
 	g_signal_connect_after(G_OBJECT(gtkconv->entry), "format_function_clear",
 						   G_CALLBACK(clear_formatting_cb), gtkconv);
 
-	gtkconv->u.im->animate = purple_prefs_get_bool("/purple/gtk/conversations/im/animate_buddy_icons");
+	gtkconv->u.im->animate = purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/im/animate_buddy_icons");
 	gtkconv->u.im->show_icon = TRUE;
 
 	/*
@@ -4682,13 +4682,13 @@
 
 	gtkconv->make_sound = TRUE;
 
-	if (purple_prefs_get_bool("/purple/gtk/conversations/show_formatting_toolbar"))
+	if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/show_formatting_toolbar"))
 		gtk_widget_show(gtkconv->toolbar);
 	else
 		gtk_widget_hide(gtkconv->toolbar);
 
 	gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml),
-		purple_prefs_get_bool("/purple/gtk/conversations/show_timestamps"));
+		purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/show_timestamps"));
 	gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->imhtml),
 								 purple_account_get_protocol_name(conv->account));
 
@@ -4728,7 +4728,7 @@
 		return;
 
 	/* create hidden conv if hide_new pref is always */
-	if (strcmp(purple_prefs_get_string("/purple/gtk/conversations/im/hide_new"), "always") == 0)
+	if (strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "always") == 0)
 	{
 		ui_ops->create_conversation = pidgin_conv_new_hidden;
 		purple_conversation_new(PURPLE_CONV_TYPE_IM, account, sender);
@@ -4737,7 +4737,7 @@
 	}
 
 	/* create hidden conv if hide_new pref is away and account is away */
-	if (strcmp(purple_prefs_get_string("/purple/gtk/conversations/im/hide_new"), "away") == 0 &&
+	if (strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "away") == 0 &&
 	    !purple_status_is_available(purple_account_get_active_status(account)))
 	{
 		ui_ops->create_conversation = pidgin_conv_new_hidden;
@@ -4986,7 +4986,7 @@
 				gtkconv->imhtml)));
 
 	max_scrollback_lines = purple_prefs_get_int(
-		"/purple/gtk/conversations/scrollback_lines");
+		PIDGIN_PREFS_ROOT "/conversations/scrollback_lines");
 	/* If we're sitting at more than 100 lines more than the
 	   max scrollback, trim down to max scrollback */
 	if (max_scrollback_lines > 0
@@ -5013,7 +5013,7 @@
 		g_free(tmp);
 	}
 
-	if (purple_prefs_get_bool("/purple/gtk/conversations/use_smooth_scrolling"))
+	if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/use_smooth_scrolling"))
 		gtk_font_options_all |= GTK_IMHTML_USE_SMOOTHSCROLLING;
 
 	if (gtk_text_buffer_get_char_count(gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->imhtml))))
@@ -5048,7 +5048,7 @@
 	gtk_font_options |= GTK_IMHTML_NO_COMMENTS;
 
 	if ((flags & PURPLE_MESSAGE_RECV) &&
-			!purple_prefs_get_bool("/purple/gtk/conversations/show_incoming_formatting"))
+			!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting"))
 		gtk_font_options |= GTK_IMHTML_NO_COLOURS | GTK_IMHTML_NO_FONTS | GTK_IMHTML_NO_SIZES | GTK_IMHTML_NO_FORMATTING;
 
 	/* this is gonna crash one day, I can feel it. */
@@ -6166,7 +6166,7 @@
 
 	gtkconv->u.im->iter = NULL;
 
-	if (!purple_prefs_get_bool("/purple/gtk/conversations/im/show_buddy_icons"))
+	if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons"))
 		return;
 
 	if (purple_conversation_get_gc(conv) == NULL)
@@ -6496,7 +6496,7 @@
 	PidginConversation *gtkconv;
 	PidginWindow *win;
 
-	if (!purple_prefs_get_bool("/purple/gtk/conversations/im/show_buddy_icons"))
+	if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons"))
 		return;
 
 	/* Set the "animate" flag for each icon based on the new preference */
@@ -6532,7 +6532,7 @@
 conv_placement_usetabs_cb(const char *name, PurplePrefType type,
 						  gconstpointer value, gpointer data)
 {
-	purple_prefs_trigger_callback("/purple/gtk/conversations/placement");
+	purple_prefs_trigger_callback(PIDGIN_PREFS_ROOT "/conversations/placement");
 }
 
 static void
@@ -6543,7 +6543,7 @@
 	PurpleConversation *conv = NULL;
 	PidginConversation *gtkconv;
 
-	if(strcmp(purple_prefs_get_string("/purple/gtk/conversations/im/hide_new"), "away")!=0)
+	if(strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "away")!=0)
 		return;
 
 	if(purple_status_is_available(oldstatus) || !purple_status_is_available(newstatus))
@@ -6583,10 +6583,10 @@
 	if(!hidden_convwin)
 		return;
 
-	if(strcmp(purple_prefs_get_string("/purple/gtk/conversations/im/hide_new"), "always")==0)
+	if(strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "always")==0)
 		return;
 
-	if(strcmp(purple_prefs_get_string("/purple/gtk/conversations/im/hide_new"), "away")==0)
+	if(strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new"), "away")==0)
 		when_away = TRUE;
 
 	while ((l = hidden_convwin->gtkconvs) != NULL)
@@ -6612,7 +6612,7 @@
 {
 	PidginConvPlacementFunc func;
 
-	if (strcmp(name, "/purple/gtk/conversations/placement"))
+	if (strcmp(name, PIDGIN_PREFS_ROOT "/conversations/placement"))
 		return;
 
 	func = pidgin_conv_placement_get_fnc(value);
@@ -6793,71 +6793,71 @@
 	void *blist_handle = purple_blist_get_handle();
 
 	/* Conversations */
-	purple_prefs_add_none("/purple/gtk/conversations");
-	purple_prefs_add_bool("/purple/gtk/conversations/use_smooth_scrolling", TRUE);
-	purple_prefs_add_bool("/purple/gtk/conversations/close_on_tabs", TRUE);
-	purple_prefs_add_bool("/purple/gtk/conversations/send_bold", FALSE);
-	purple_prefs_add_bool("/purple/gtk/conversations/send_italic", FALSE);
-	purple_prefs_add_bool("/purple/gtk/conversations/send_underline", FALSE);
-	purple_prefs_add_bool("/purple/gtk/conversations/spellcheck", TRUE);
-	purple_prefs_add_bool("/purple/gtk/conversations/show_incoming_formatting", TRUE);
-
-	purple_prefs_add_bool("/purple/gtk/conversations/show_timestamps", TRUE);
-	purple_prefs_add_bool("/purple/gtk/conversations/show_formatting_toolbar", TRUE);
-
-	purple_prefs_add_string("/purple/gtk/conversations/placement", "last");
-	purple_prefs_add_int("/purple/gtk/conversations/placement_number", 1);
-	purple_prefs_add_string("/purple/gtk/conversations/bgcolor", "");
-	purple_prefs_add_string("/purple/gtk/conversations/fgcolor", "");
-	purple_prefs_add_string("/purple/gtk/conversations/font_face", "");
-	purple_prefs_add_int("/purple/gtk/conversations/font_size", 3);
-	purple_prefs_add_bool("/purple/gtk/conversations/tabs", TRUE);
-	purple_prefs_add_int("/purple/gtk/conversations/tab_side", GTK_POS_TOP);
-	purple_prefs_add_int("/purple/gtk/conversations/scrollback_lines", 4000);
+	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/conversations");
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/use_smooth_scrolling", TRUE);
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/close_on_tabs", TRUE);
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/send_bold", FALSE);
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/send_italic", FALSE);
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/send_underline", FALSE);
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/spellcheck", TRUE);
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting", TRUE);
+
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/show_timestamps", TRUE);
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/show_formatting_toolbar", TRUE);
+
+	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/placement", "last");
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/placement_number", 1);
+	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/bgcolor", "");
+	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/fgcolor", "");
+	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/font_face", "");
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/font_size", 3);
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/tabs", TRUE);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/tab_side", GTK_POS_TOP);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/scrollback_lines", 4000);
 
 	/* Conversations -> Chat */
-	purple_prefs_add_none("/purple/gtk/conversations/chat");
-	purple_prefs_add_int("/purple/gtk/conversations/chat/default_width", 410);
-	purple_prefs_add_int("/purple/gtk/conversations/chat/default_height", 160);
-	purple_prefs_add_int("/purple/gtk/conversations/chat/entry_height", 50);
-	purple_prefs_add_int("/purple/gtk/conversations/chat/userlist_width", 80);
+	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/conversations/chat");
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/default_width", 410);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/default_height", 160);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/entry_height", 50);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/userlist_width", 80);
 	/* Conversations -> IM */
-	purple_prefs_add_none("/purple/gtk/conversations/im");
-
-	purple_prefs_add_bool("/purple/gtk/conversations/im/animate_buddy_icons", TRUE);
-
-	purple_prefs_add_int("/purple/gtk/conversations/im/default_width", 410);
-	purple_prefs_add_int("/purple/gtk/conversations/im/default_height", 160);
-	purple_prefs_add_int("/purple/gtk/conversations/im/entry_height", 50);
-	purple_prefs_add_bool("/purple/gtk/conversations/im/show_buddy_icons", TRUE);
-
-	purple_prefs_add_string("/purple/gtk/conversations/im/hide_new", "never");
+	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/conversations/im");
+
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/im/animate_buddy_icons", TRUE);
+
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/default_width", 410);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/default_height", 160);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/entry_height", 50);
+	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons", TRUE);
+
+	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new", "never");
 
 	/* Connect callbacks. */
-	purple_prefs_connect_callback(handle, "/purple/gtk/conversations/close_on_tabs",
+	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/close_on_tabs",
 								close_on_tabs_pref_cb, NULL);
-	purple_prefs_connect_callback(handle, "/purple/gtk/conversations/show_timestamps",
+	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/show_timestamps",
 								show_timestamps_pref_cb, NULL);
-	purple_prefs_connect_callback(handle, "/purple/gtk/conversations/show_formatting_toolbar",
+	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/show_formatting_toolbar",
 								show_formatting_toolbar_pref_cb, NULL);
-	purple_prefs_connect_callback(handle, "/purple/gtk/conversations/spellcheck",
+	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/spellcheck",
 								spellcheck_pref_cb, NULL);
-	purple_prefs_connect_callback(handle, "/purple/gtk/conversations/tab_side",
+	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/tab_side",
 								tab_side_pref_cb, NULL);
 
-	purple_prefs_connect_callback(handle, "/purple/gtk/conversations/tabs",
+	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/tabs",
 								conv_placement_usetabs_cb, NULL);
 
-	purple_prefs_connect_callback(handle, "/purple/gtk/conversations/placement",
+	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/placement",
 								conv_placement_pref_cb, NULL);
-	purple_prefs_trigger_callback("/purple/gtk/conversations/placement");
+	purple_prefs_trigger_callback(PIDGIN_PREFS_ROOT "/conversations/placement");
 
 	/* IM callbacks */
-	purple_prefs_connect_callback(handle, "/purple/gtk/conversations/im/animate_buddy_icons",
+	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/im/animate_buddy_icons",
 								animate_buddy_icons_pref_cb, NULL);
-	purple_prefs_connect_callback(handle, "/purple/gtk/conversations/im/show_buddy_icons",
+	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons",
 								show_buddy_icons_pref_cb, NULL);
-	purple_prefs_connect_callback(handle, "/purple/gtk/conversations/im/hide_new",
+	purple_prefs_connect_callback(handle, PIDGIN_PREFS_ROOT "/conversations/im/hide_new",
                                 hide_new_pref_cb, NULL);
 
 
@@ -7745,19 +7745,19 @@
 
 	pidgin_conv_switch_active_conversation(conv);
 
-	sound_method = purple_prefs_get_string("/purple/gtk/sound/method");
+	sound_method = purple_prefs_get_string(PIDGIN_PREFS_ROOT "/sound/method");
 	if (strcmp(sound_method, "none") != 0)
 		gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(win->menu.sounds),
 		                               gtkconv->make_sound);
 
 	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(win->menu.show_formatting_toolbar),
-	                               purple_prefs_get_bool("/purple/gtk/conversations/show_formatting_toolbar"));
+	                               purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/show_formatting_toolbar"));
 
 	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(win->menu.show_timestamps),
-	                               purple_prefs_get_bool("/purple/gtk/conversations/show_timestamps"));
+	                               purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/show_timestamps"));
 
 	if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM &&
-	    purple_prefs_get_bool("/purple/gtk/conversations/im/show_buddy_icons"))
+	    purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons"))
 	{
 		gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(win->menu.show_icon),
 		                               gtkconv->u.im->show_icon);
@@ -7844,7 +7844,7 @@
 	/* Create the notebook. */
 	win->notebook = gtk_notebook_new();
 
-	pos = purple_prefs_get_int("/purple/gtk/conversations/tab_side");
+	pos = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/tab_side");
 
 #if 0
 	gtk_notebook_set_tab_hborder(GTK_NOTEBOOK(win->notebook), 0);
@@ -7975,12 +7975,12 @@
 	win->gtkconvs = g_list_append(win->gtkconvs, gtkconv);
 	gtkconv->win = win;
 
-	if (purple_prefs_get_int("/purple/gtk/conversations/tab_side") == GTK_POS_LEFT ||
-	    purple_prefs_get_int("/purple/gtk/conversations/tab_side") == GTK_POS_RIGHT)
+	if (purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/tab_side") == GTK_POS_LEFT ||
+	    purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/tab_side") == GTK_POS_RIGHT)
 		tabs_side = TRUE;
-	else if (purple_prefs_get_int("/purple/gtk/conversations/tab_side") == (GTK_POS_LEFT|8))
+	else if (purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/tab_side") == (GTK_POS_LEFT|8))
 		angle = 90;
-	else if (purple_prefs_get_int("/purple/gtk/conversations/tab_side") == (GTK_POS_RIGHT|8))
+	else if (purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/tab_side") == (GTK_POS_RIGHT|8))
 		angle = 270;
 
 	if (angle)
@@ -8069,7 +8069,7 @@
 		gtk_box_pack_start(GTK_BOX(tabby), gtkconv->icon, FALSE, FALSE, 0);
 	else
 		gtk_box_pack_start(GTK_BOX(tabby), gtkconv->close, FALSE, FALSE, 0);
-	if (purple_prefs_get_bool("/purple/gtk/conversations/close_on_tabs"))
+	if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/close_on_tabs"))
 		gtk_widget_show(gtkconv->close);
 
 	gtk_widget_show(tabby);
@@ -8090,7 +8090,7 @@
 		gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), 0);
 
 		gtk_notebook_set_show_tabs(GTK_NOTEBOOK(win->notebook),
-		                           purple_prefs_get_bool("/purple/gtk/conversations/tabs"));
+		                           purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/tabs"));
 	} else
 		gtk_notebook_set_show_tabs(GTK_NOTEBOOK(win->notebook), TRUE);
 
@@ -8119,7 +8119,7 @@
 	/* go back to tabless if need be */
 	if (pidgin_conv_window_get_gtkconv_count(win) <= 2) {
 		gtk_notebook_set_show_tabs(GTK_NOTEBOOK(win->notebook),
-		                           purple_prefs_get_bool("/purple/gtk/conversations/tabs"));
+		                           purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/tabs"));
 	}
 
 	win->gtkconvs = g_list_remove(win->gtkconvs, gtkconv);
@@ -8568,7 +8568,7 @@
 	g_return_if_fail(func != NULL);
 
 	/* If tabs are enabled, set the function, otherwise, NULL it out. */
-	if (purple_prefs_get_bool("/purple/gtk/conversations/tabs"))
+	if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/conversations/tabs"))
 		place_conv = func;
 	else
 		place_conv = NULL;