pidgin: 4dcc20a7: Change the "Manual" browser command pref...

rekkanoryo at rekkanoryo at
Mon Sep 20 00:00:33 EDT 2010

Revision: 4dcc20a7e5c588d87cd629f143fd5d1118499f65
Parent:   d5ed660cac7c28849ae1f5213bff7df85fe8a3c9
Author:   rekkanoryo at
Date:     09/19/10 23:53:47
Branch:   im.pidgin.pidgin


Change the "Manual" browser command pref's name to allow for a relatively simple
migration of an existing value from the path pref to the new string pref.  As I
note in the comment in the migration code, I realize this will break things for
and confuse those users who use the same config directory for mutliple versions
of Pidgin, but I'm not inclined to devise a solution that will make that work.
The solution I've implemented fixes the most important case--users who upgrade.
The rest of the world will just have to move on.  Refs #12024.

Changes against parent d5ed660cac7c28849ae1f5213bff7df85fe8a3c9

  patched  pidgin/gtkprefs.c

-------------- next part --------------
--- pidgin/gtkprefs.c	d1946e5cf2c72b625a7a0c8864d8493f6ed1df83
+++ pidgin/gtkprefs.c	1f0a951300bc43ffc1f4db354bc2b5a857ac9292
@@ -2828,7 +2828,7 @@ pidgin_prefs_init(void)
 	/* Browsers */
 	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/browsers");
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/browsers/place", PIDGIN_BROWSER_DEFAULT);
-	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/browsers/command", "");
+	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/browsers/manual_command", "");
 	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/browsers/browser", "mozilla");
@@ -2859,7 +2859,7 @@ pidgin_prefs_update_old(void)
-	const char *str;
+	const char *str = NULL;
 	purple_prefs_rename("/gaim/gtk", PIDGIN_PREFS_ROOT);
@@ -2875,6 +2875,17 @@ pidgin_prefs_update_old(void)
 	purple_prefs_rename_boolean_toggle(PIDGIN_PREFS_ROOT "/conversations/ignore_colors",
 									 PIDGIN_PREFS_ROOT "/conversations/show_incoming_formatting");
+	/*
+	 * this path pref changed to a string, so migrate.  I know this will break
+	 * things for and confuse users that use multiple versions with the same
+	 * config directory, but I'm not inclined to want to deal with that at the
+	 * moment. -- rekkanoryo
+	 */
+	if((str = purple_prefs_get_path(PIDGIN_PREFS_ROOT "/browsers/command")) != NULL) {
+		purple_prefs_set_string(PIDGIN_PREFS_ROOT "/browsers/manual_command", str);
+		purple_prefs_remove(PIDGIN_PREFS_ROOT "/browsers/command");
+	}
 	/* this string pref moved into the core, try to be friendly */
 	purple_prefs_rename(PIDGIN_PREFS_ROOT "/idle/reporting_method", "/purple/away/idle_reporting");
 	if ((str = purple_prefs_get_string("/purple/away/idle_reporting")) &&

More information about the Commits mailing list