changeset 8905:438e8d857554

[gaim-migrate @ 9674] "It would have been nice to remove the prefs in, say, conversation.c's init function. But it can't be done in the init function, because the prefs aren't read in yet. What about if the _init function somehow registers preferences to be removed, and then once all the init functions have been called, the core can call gaim_prefs_remove_and_rename(GSList *stuff_to_remove_and_rename)?" committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 08 May 2004 17:43:21 +0000
parents 9a25d7f66d9c
children 0d3a68e36132
files src/gtkprefs.c src/gtkprefs.h src/main.c src/prefs.c
diffstat 4 files changed, 20 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkprefs.c	Sat May 08 14:28:10 2004 +0000
+++ b/src/gtkprefs.c	Sat May 08 17:43:21 2004 +0000
@@ -2968,3 +2968,17 @@
 	gaim_prefs_connect_callback("/gaim/gtk/smileys/theme",
 								smiley_theme_pref_cb, NULL);
 }
+
+void gaim_gtk_prefs_update_old() {
+	/* Rename some old prefs */
+	gaim_prefs_rename("/gaim/gtk/logging/log_ims", "/core/logging/log_ims");
+	gaim_prefs_rename("/gaim/gtk/logging/log_chats", "/core/logging/log_chats");
+	gaim_prefs_rename("/core/conversations/placement",
+					  "/gaim/gtk/conversations/placement");  
+	gaim_prefs_rename_boolean_toggle("/gaim/gtk/sound/silent_signon",
+									 "/gaim/gtk/sound/signon");
+
+	/* Remove some no-longer-used prefs */
+	gaim_prefs_remove("/gaim/gtk/conversations/show_urls_as_links");
+	gaim_prefs_remove("/gaim/gtk/conversations/show_smileys");
+}
--- a/src/gtkprefs.h	Sat May 08 14:28:10 2004 +0000
+++ b/src/gtkprefs.h	Sat May 08 17:43:21 2004 +0000
@@ -107,4 +107,9 @@
 		const gchar * title, GaimPrefType type, const char *key,
 		GList *menuitems);
 
+/**
+ * Rename legacy prefs and delete some that no longer exist.
+ */
+void gaim_gtk_prefs_update_old();
+
 #endif /* _GAIM_GTK_PREFS_H_ */
--- a/src/main.c	Sat May 08 14:28:10 2004 +0000
+++ b/src/main.c	Sat May 08 17:43:21 2004 +0000
@@ -854,6 +854,7 @@
 	gaim_prefs_load();
 
 	gaim_prefs_update_old();
+	gaim_gtk_prefs_update_old();
 
 	/* load plugins we had when we quit */
 	gaim_plugins_load_saved("/gaim/gtk/plugins/loaded");
--- a/src/prefs.c	Sat May 08 14:28:10 2004 +0000
+++ b/src/prefs.c	Sat May 08 17:43:21 2004 +0000
@@ -983,18 +983,7 @@
 }
 
 void gaim_prefs_update_old() {
-	/* Rename some old prefs */
-	gaim_prefs_rename("/gaim/gtk/logging/log_ims", "/core/logging/log_ims");
-	gaim_prefs_rename("/gaim/gtk/logging/log_chats", "/core/logging/log_chats");
-	gaim_prefs_rename("/core/conversations/placement",
-					  "/gaim/gtk/conversations/placement");  
-	gaim_prefs_rename_boolean_toggle("/gaim/gtk/sound/silent_signon",
-									 "/gaim/gtk/sound/signon");
-
 	/* Remove some no-longer-used prefs */
 	gaim_prefs_remove("/core/conversations/im/show_login");
 	gaim_prefs_remove("/core/conversations/send_urls_as_links");
-	gaim_prefs_remove("/gaim/gtk/conversations/im/hide_on_send");
-	gaim_prefs_remove("/gaim/gtk/conversations/show_urls_as_links");
-	gaim_prefs_remove("/gaim/gtk/conversations/show_smileys");
 }