/pidgin/main: ed127ccd9b9f: Remove the "existing window" option ...

Mark Doliner mark at kingant.net
Fri Dec 6 04:06:53 EST 2013


Changeset: ed127ccd9b9fb4234e58534cced3643f30b46128
Author:	 Mark Doliner <mark at kingant.net>
Date:	 2013-12-06 01:06 -0800
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/ed127ccd9b9f

Description:

Remove the "existing window" option for where to open URLs.

This was kind of a dumb option. I mean, who would want that?
We didn't support it in Chrome. We attempted to support it in
Firefox, Netscape and Opera.

It actually caused my Pidgin to hang when I tested it with Firefox.
I'm sure it's fixable, but who cares? Here's the stacktrace, for the
curious:
#0  0x00007f5c461a8fbd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f5c470be1dc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5c470be6ba in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5c470ffe41 in g_spawn_sync () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f5c471002b8 in g_spawn_command_line_sync () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00000000004ae804 in uri_command (command=0x203e760 "firefox -a firefox -remote openURL('http://www.yahoo.com/')",
    sync=1) at gtknotify.c:1270

diffstat:

 pidgin/gtknotify.c |  15 ---------------
 pidgin/gtkprefs.c  |  11 ++++++++++-
 pidgin/gtkutils.h  |   4 ++--
 3 files changed, 12 insertions(+), 18 deletions(-)

diffs (80 lines):

diff --git a/pidgin/gtknotify.c b/pidgin/gtknotify.c
--- a/pidgin/gtknotify.c
+++ b/pidgin/gtknotify.c
@@ -1376,10 +1376,6 @@ pidgin_notify_uri(const char *uri)
 			remote_command = g_strdup_printf("%s %s -remote "
 											 "openURL(%s,new-tab)",
 											 web_browser, args, escaped);
-		else if (place == PIDGIN_BROWSER_CURRENT)
-			remote_command = g_strdup_printf("%s %s -remote "
-											 "openURL(%s)",
-											 web_browser, args, escaped);
 	}
 	else if (!strcmp(web_browser, "netscape"))
 	{
@@ -1391,11 +1387,6 @@ pidgin_notify_uri(const char *uri)
 											 "openURL(%s,new-window)",
 											 escaped);
 		}
-		else if (place == PIDGIN_BROWSER_CURRENT)
-		{
-			remote_command = g_strdup_printf("netscape -remote "
-											 "openURL(%s)", escaped);
-		}
 	}
 	else if (!strcmp(web_browser, "opera"))
 	{
@@ -1403,12 +1394,6 @@ pidgin_notify_uri(const char *uri)
 			command = g_strdup_printf("opera -newwindow %s", escaped);
 		else if (place == PIDGIN_BROWSER_NEW_TAB)
 			command = g_strdup_printf("opera -newpage %s", escaped);
-		else if (place == PIDGIN_BROWSER_CURRENT)
-		{
-			remote_command = g_strdup_printf("opera -remote "
-											 "openURL(%s)", escaped);
-			command = g_strdup_printf("opera %s", escaped);
-		}
 		else
 			command = g_strdup_printf("opera %s", escaped);
 
diff --git a/pidgin/gtkprefs.c b/pidgin/gtkprefs.c
--- a/pidgin/gtkprefs.c
+++ b/pidgin/gtkprefs.c
@@ -2434,7 +2434,6 @@ browser_page(void)
 			label = pidgin_prefs_dropdown(hbox, _("_Open link in:"), PURPLE_PREF_INT,
 				PIDGIN_PREFS_ROOT "/browsers/place",
 				_("Browser default"), PIDGIN_BROWSER_DEFAULT,
-				_("Existing window"), PIDGIN_BROWSER_CURRENT,
 				_("New window"), PIDGIN_BROWSER_NEW_WINDOW,
 				_("New tab"), PIDGIN_BROWSER_NEW_TAB,
 				NULL);
@@ -4408,5 +4407,15 @@ pidgin_prefs_update_old(void)
 
 	purple_prefs_remove("/plugins/core/vvconfig");
 	purple_prefs_remove("/plugins/gtk/vvconfig");
+
+#ifndef _WIN32
+	/* Added in 3.0.0. */
+	if (purple_prefs_get_int(PIDGIN_PREFS_ROOT "/browsers/place") == 1) {
+		/* If the "open link in" pref is set to the old value for "existing
+		   window" then change it to "default." */
+		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/browsers/place",
+				PIDGIN_BROWSER_DEFAULT);
+	}
+#endif /* !_WIN32 */
 }
 
diff --git a/pidgin/gtkutils.h b/pidgin/gtkutils.h
--- a/pidgin/gtkutils.h
+++ b/pidgin/gtkutils.h
@@ -58,8 +58,8 @@ typedef enum
 typedef enum
 {
 	PIDGIN_BROWSER_DEFAULT = 0,
-	PIDGIN_BROWSER_CURRENT,
-	PIDGIN_BROWSER_NEW_WINDOW,
+	/* value '1' was used by PIDGIN_BROWSER_CURRENT, which no longer exists */
+	PIDGIN_BROWSER_NEW_WINDOW = 2,
 	PIDGIN_BROWSER_NEW_TAB
 
 } PidginBrowserPlace;



More information about the Commits mailing list