pidgin: 322ea5e3: Migrate the pref the previous commit dro...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Wed Dec 29 20:31:18 EST 2010


----------------------------------------------------------------------
Revision: 322ea5e330b2ce8591329c42931c0ad8dbbbf2cf
Parent:   baa654e872c8567c315bbf44cc88345faa9a8ac8
Author:   rekkanoryo at pidgin.im
Date:     12/29/10 19:58:17
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/322ea5e330b2ce8591329c42931c0ad8dbbbf2cf

Changelog: 

Migrate the pref the previous commit dropped.  Refs #11459.

Changes against parent baa654e872c8567c315bbf44cc88345faa9a8ac8

  patched  libpurple/plugins/autoaccept.c

-------------- next part --------------
============================================================
--- libpurple/plugins/autoaccept.c	7772d3305f0c097bfa4bc082c0a9a828522ed4c5
+++ libpurple/plugins/autoaccept.c	09da15f31615c3a35282f42f8ba8d7452f8e2c87
@@ -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 @@ plugin_load(PurplePlugin *plugin)
 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,


More information about the Commits mailing list