changeset 16567:9e8883a33365

merge of '1ec321a889d16061991c01453333e23ab1a2c528' and '85368b03fda7528f3a74de0d53faeaa59a92d349'
author Richard Laager <rlaager@wiktel.com>
date Sat, 28 Apr 2007 03:23:51 +0000
parents 26fb9b308cc1 (current diff) dccdd9cbe095 (diff)
children 8cd67084833c 8f02e8b1c838
files
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/prefs.c	Sat Apr 28 03:20:29 2007 +0000
+++ b/libpurple/prefs.c	Sat Apr 28 03:23:51 2007 +0000
@@ -1328,6 +1328,8 @@
 void
 purple_prefs_update_old()
 {
+	purple_prefs_rename("/core", "/purple");
+
 	/* Remove some no-longer-used prefs */
 	purple_prefs_remove("/purple/away/auto_response/enabled");
 	purple_prefs_remove("/purple/away/auto_response/idle_only");
@@ -1361,7 +1363,6 @@
 		purple_prefs_set_int("/purple/sound/while_status", 3);
 	}
 	purple_prefs_remove("/purple/sound/while_away");
-	purple_prefs_rename("/core", "/purple");
 }
 
 void *
--- a/pidgin/gtkprefs.c	Sat Apr 28 03:20:29 2007 +0000
+++ b/pidgin/gtkprefs.c	Sat Apr 28 03:23:51 2007 +0000
@@ -2029,8 +2029,6 @@
 void
 pidgin_prefs_init(void)
 {
-	/* only change this when we have a sane prefs migration path */
-	purple_prefs_add_none("/gaim");
 	purple_prefs_add_none(PIDGIN_PREFS_ROOT "");
 	purple_prefs_add_none("/plugins/gtk");
 
@@ -2061,7 +2059,12 @@
 								smiley_theme_pref_cb, NULL);
 }
 
-void pidgin_prefs_update_old() {
+void pidgin_prefs_update_old()
+{
+	const char *str;
+
+	purple_prefs_rename("/gaim/gtk", PIDGIN_PREFS_ROOT);
+
 	/* Rename some old prefs */
 	purple_prefs_rename(PIDGIN_PREFS_ROOT "/logging/log_ims", "/purple/logging/log_ims");
 	purple_prefs_rename(PIDGIN_PREFS_ROOT "/logging/log_chats", "/purple/logging/log_chats");
@@ -2076,6 +2079,9 @@
 
 	/* this string pref moved into the core, try to be friendly */
 	purple_prefs_rename(PIDGIN_PREFS_ROOT "/idle/reporting_method", "/purple/away/idle_reporting");
+	if ((str = purple_prefs_get_string("/purple/away/idle_reporting")) &&
+			strcmp(str, "gaim") == 0)
+		purple_prefs_set_string("/purple/away/idle_reporting", "purple");
 
 	/* Remove some no-longer-used prefs */
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/blist/auto_expand_contacts");
@@ -2125,5 +2131,4 @@
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/away/queue_messages");
 	purple_prefs_remove(PIDGIN_PREFS_ROOT "/away");
 	purple_prefs_remove("/plugins/gtk/docklet/queue_messages");
-	purple_prefs_rename("/gaim/gtk", "/pidgin");
 }