pidgin: 8102ace3: Don't migrate the old autoaccept pref if...

qulogic at pidgin.im qulogic at pidgin.im
Mon Feb 27 18:12:07 EST 2012


----------------------------------------------------------------------
Revision: 8102ace3c8e8bec9e456d927dd7c923afbb582a6
Parent:   1ab42f75b3d1022595b53902af96d6f964622521
Author:   qulogic at pidgin.im
Date:     02/27/12 18:07:49
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/8102ace3c8e8bec9e456d927dd7c923afbb582a6

Changelog: 

Don't migrate the old autoaccept pref if the new one already exists.
Otherwise, we would clobber the existing pref if it doesn't match
the old pref.

Fixes #14964.

Changes against parent 1ab42f75b3d1022595b53902af96d6f964622521

  patched  ChangeLog
  patched  libpurple/plugins/autoaccept.c

-------------- next part --------------
============================================================
--- ChangeLog	e039a0ec0a410e7a85bceeda39cb635830c44642
+++ ChangeLog	e028fe6101d189e5f3a480b68fb5fd1c9d2446aa
@@ -74,6 +74,10 @@ version 2.10.2 (02/22/2012):
 	Windows-Specific Changes:
 	* Fix compilation of the Bonjour protocol plugin. (#14802)
 
+	Plugins:
+	* The autoaccept plugin will no longer reset the preference for unknown
+	  buddies to "Auto Reject" in certain cases. (#14964)
+
 version 2.10.1 (12/06/2011):
 	Finch:
 	* Fix compilation on OpenBSD.
============================================================
--- libpurple/plugins/autoaccept.c	e334ca7184fb6a9d14510a1639456cb53272d369
+++ libpurple/plugins/autoaccept.c	dc75a3f3e43eee4144d0a8ce1bcbfff13bd3a415
@@ -238,8 +238,12 @@ plugin_load(PurplePlugin *plugin)
 	 *       between old libpurple clients and new libpurple clients.
 	 *                                             --Mark Doliner, 2011-01-03
 	 */
-	if(purple_prefs_get_bool(PREF_STRANGER_OLD))
-		purple_prefs_set_int(PREF_STRANGER, FT_REJECT);
+	if (!purple_prefs_exists(PREF_STRANGER)) {
+		if (purple_prefs_get_bool(PREF_STRANGER_OLD))
+			purple_prefs_add_int(PREF_STRANGER, FT_REJECT);
+		else
+			purple_prefs_set_int(PREF_STRANGER, FT_ASK);
+	}
 
 	purple_signal_connect(purple_xfers_get_handle(), "file-recv-request", plugin,
 						PURPLE_CALLBACK(file_recv_request_cb), plugin);
@@ -345,7 +349,6 @@ init_plugin(PurplePlugin *plugin) {
 	dirname = g_build_filename(purple_user_dir(), "autoaccept", NULL);
 	purple_prefs_add_none(PREF_PREFIX);
 	purple_prefs_add_string(PREF_PATH, dirname);
-	purple_prefs_add_int(PREF_STRANGER, FT_ASK);
 	purple_prefs_add_bool(PREF_NOTIFY, TRUE);
 	purple_prefs_add_bool(PREF_NEWDIR, TRUE);
 	purple_prefs_add_bool(PREF_ESCAPE, TRUE);


More information about the Commits mailing list