changeset 8900:7a67c459ab8f

[gaim-migrate @ 9669] Move the preference renameing/removing stuff to prefs.c... It's pretty ugly... but it was ugly before... So now we remove the eradicated prefs. I think. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 07 May 2004 03:25:00 +0000
parents d484f23cd92b
children c430e99bb147
files src/conversation.c src/gtkprefs.c src/gtkprefs.h src/main.c src/prefs.c src/prefs.h
diffstat 6 files changed, 23 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Fri May 07 02:52:32 2004 +0000
+++ b/src/conversation.c	Fri May 07 03:25:00 2004 +0000
@@ -2622,6 +2622,7 @@
 	gaim_prefs_add_none("/core/conversations/im");
 	gaim_prefs_add_bool("/core/conversations/im/send_typing", TRUE);
 
+	/* Connect callbacks for changed preferences */
 	gaim_prefs_connect_callback("/core/conversations/use_alias_for_title",
 			update_titles_pref_cb, NULL);
 	gaim_prefs_connect_callback("/core/buddies/use_server_alias",
--- a/src/gtkprefs.c	Fri May 07 02:52:32 2004 +0000
+++ b/src/gtkprefs.c	Fri May 07 03:25:00 2004 +0000
@@ -2968,12 +2968,3 @@
 	gaim_prefs_connect_callback("/gaim/gtk/smileys/theme",
 								smiley_theme_pref_cb, NULL);
 }
-
-void gaim_gtk_prefs_rename_old() {
-	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");
-}
--- a/src/gtkprefs.h	Fri May 07 02:52:32 2004 +0000
+++ b/src/gtkprefs.h	Fri May 07 03:25:00 2004 +0000
@@ -107,9 +107,4 @@
 		const gchar * title, GaimPrefType type, const char *key,
 		GList *menuitems);
 
-/**
- * Rename legacy prefs
- */
-void gaim_gtk_prefs_rename_old();
-
 #endif /* _GAIM_GTK_PREFS_H_ */
--- a/src/main.c	Fri May 07 02:52:32 2004 +0000
+++ b/src/main.c	Fri May 07 03:25:00 2004 +0000
@@ -853,7 +853,7 @@
 
 	gaim_prefs_load();
 
-	gaim_gtk_prefs_rename_old();
+	gaim_prefs_update_old();
 
 	/* load plugins we had when we quit */
 	gaim_plugins_load_saved("/gaim/gtk/plugins/loaded");
--- a/src/prefs.c	Fri May 07 02:52:32 2004 +0000
+++ b/src/prefs.c	Fri May 07 03:25:00 2004 +0000
@@ -982,3 +982,19 @@
 	return TRUE;
 }
 
+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");
+}
--- a/src/prefs.h	Fri May 07 02:52:32 2004 +0000
+++ b/src/prefs.h	Fri May 07 03:25:00 2004 +0000
@@ -240,6 +240,11 @@
  */
 void gaim_prefs_sync();
 
+/**
+ * Rename legacy prefs and delete some that no longer exist.
+ */
+void gaim_prefs_update_old();
+
 /*@}*/
 
 #ifdef __cplusplus