changeset 31528:40e5d8c3acca

Migrate the pref the previous commit dropped. Refs #11459.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Thu, 30 Dec 2010 00:58:17 +0000
parents 5f4329c3eafe
children e023b0378887
files libpurple/plugins/autoaccept.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/autoaccept.c	Thu Dec 30 00:42:24 2010 +0000
+++ b/libpurple/plugins/autoaccept.c	Thu Dec 30 00:58:17 2010 +0000
@@ -48,6 +48,8 @@
 #define PREF_NEWDIR     PREF_PREFIX "/newdir"
 #define PREF_ESCAPE     PREF_PREFIX "/escape"
 
+#define PREF_STRANGER_OLD PREF_PREFIX "/reject_stranger"
+
 typedef enum
 {
 	FT_ASK,
@@ -228,6 +230,12 @@
 static gboolean
 plugin_load(PurplePlugin *plugin)
 {
+	/* migrate the old pref (we should only care if the plugin is actually *used*) */
+	if(purple_prefs_get_bool(PREF_STRANGER_OLD)) {
+		purple_prefs_set_int(PREF_STRANGER, FT_REJECT);
+		purple_prefs_remove(PREF_STRANGER_OLD);
+	}
+
 	purple_signal_connect(purple_xfers_get_handle(), "file-recv-request", plugin,
 						PURPLE_CALLBACK(file_recv_request_cb), plugin);
 	purple_signal_connect(purple_blist_get_handle(), "blist-node-extended-menu", plugin,