changeset 4551:f61fb41fd1c4

[gaim-migrate @ 4831] fix URLs with spaces hopefully make galeon and opera respect the "Open new window by default" pref committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 07 Feb 2003 19:00:47 +0000
parents 972af41f277c
children a2f2a717fdf2
files src/browser.c
diffstat 1 files changed, 19 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/browser.c	Fri Feb 07 08:46:08 2003 +0000
+++ b/src/browser.c	Fri Feb 07 19:00:47 2003 +0000
@@ -336,11 +336,10 @@
 	return lock_data;
 }
 
-static gboolean mozilla_remote_obtain_lock(GdkWindow * window)
+static void mozilla_remote_obtain_lock(GdkWindow * window)
 {
 	gboolean locked = False;
 	const char *lock_data = get_lock_data();
-		int result;
 		GdkAtom actual_type;
 		gint actual_format;
 		gint nitems;
@@ -409,7 +408,6 @@
 	int actual_format;
 	unsigned long nitems, bytes_after;
 	unsigned char *data = 0;
-	char *error = NULL;
 
 	if (window == NULL || GDK_WINDOW_OBJECT(window)->destroyed) {
 		do_error_dialog(_("Communication with the browser failed.  Please close all "
@@ -461,8 +459,6 @@
 
 static void mozilla_remote_command(GdkWindow * window, const char *command, Bool raise_p)
 {
-	int result = 0;
-	Bool done = False;
 	char *new_command = 0;
 
 	/* The -noraise option is implemented by passing a "noraise" argument
@@ -520,43 +516,48 @@
 {
 	char *command = NULL;
 	GError *error = NULL;
- 
+
 	switch (web_browser) {
 		case BROWSER_NETSCAPE: {
 			char *args = NULL;
- 
+
 			if (misc_options & OPT_MISC_BROWSER_POPUP)
 				args = g_strdup_printf("OpenURL(%s, new-window)", url);
 			else
 				args = g_strdup_printf("OpenURL(%s)", url);
- 
-			if (netscape_command(args)) { 
+
+			if (netscape_command(args)) {
 				g_free(args);
 				return;
 			}
 
-			/* if netscape is running ... 
+			/* if netscape is running ...
 			command = g_strdup_printf("netscape -remote %s", args); */
 
-			command = g_strdup_printf("netscape %s", url);
+			command = g_strdup_printf("netscape \"%s\"", url);
 			g_free(args);
 			} break;
 
 		case BROWSER_OPERA:
-			command = g_strdup_printf("opera -newwindow %s", url);
+			if (misc_options & OPT_MISC_BROWSER_POPUP)
+				command = g_strdup_printf("opera -newwindow \"%s\"", url);
+			else
+				command = g_strdup_printf("opera \"%s\"", url);
 			break;
- 
+
 		case BROWSER_KONQ:
-			command = g_strdup_printf("kfmclient openURL %s", url);
+			command = g_strdup_printf("kfmclient openURL \"%s\"", url);
 			break;
- 
+
 		case BROWSER_GALEON:
-			command = g_strdup_printf("galeon -w %s", url);
-			command = g_strdup_printf("galeon %s", url);
+			if (misc_options & OPT_MISC_BROWSER_POPUP)
+				command = g_strdup_printf("galeon -w \"%s\"", url);
+			else
+				command = g_strdup_printf("galeon \"%s\"", url);
 			break;
 
 		case BROWSER_MOZILLA:
-			command = g_strdup_printf("mozilla %s", url);
+			command = g_strdup_printf("mozilla \"%s\"", url);
 			break;
 
 		case BROWSER_MANUAL: {