changeset 2566:6d00c0f8bfc5

[gaim-migrate @ 2579] Add Opera Browser Support (Thanks Brian Enigma) committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Sun, 21 Oct 2001 19:01:03 +0000
parents f2a5ed215713
children f0e8cf09d8a3
files ChangeLog src/browser.c src/prefs.c src/ui.h
diffstat 4 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Oct 21 00:16:09 2001 +0000
+++ b/ChangeLog	Sun Oct 21 19:01:03 2001 +0000
@@ -11,6 +11,7 @@
 	* When creating a new buddy pounce, gaim now automagically
 	  selects "on away" or "on idle", if the user is away
 	  or idle.
+	* Add Opera to the available browsers (thanks Brian Enigma)
 
 version 0.46 (10/18/2001):
 	* New applet icons (courtesy David Raeman)
--- a/src/browser.c	Sun Oct 21 00:16:09 2001 +0000
+++ b/src/browser.c	Sun Oct 21 19:01:03 2001 +0000
@@ -589,6 +589,23 @@
 		} else {
 			gtk_timeout_add(1000, (GtkFunction)clean_pid, NULL);
 		}
+	} else if (web_browser == BROWSER_OPERA) {
+		pid_t pid;
+
+		pid = fork();
+
+		if (pid == 0) {
+			char *args[4];
+			args[0] = g_strdup("opera");
+			args[1] = g_strdup("-newwindow");
+			args[2] = url;
+			args[3] = NULL;
+
+			execvp(args[0], args);
+			_exit(0);
+		} else {
+			gtk_timeout_add(1000, (GtkFunction)clean_pid, NULL);
+		}
 #ifdef USE_GNOME
 	} else if (web_browser == BROWSER_GNOME) {
 		gnome_url_show(url);
--- a/src/prefs.c	Sun Oct 21 00:16:09 2001 +0000
+++ b/src/prefs.c	Sun Oct 21 19:01:03 2001 +0000
@@ -279,6 +279,7 @@
 	gtk_widget_show(vbox);
 
 	opt = browser_radio(_("KFM"), BROWSER_KFM, vbox, NULL);
+	opt = browser_radio(_("Opera"), BROWSER_OPERA, vbox, opt);
 	opt = browser_radio(_("Netscape"), BROWSER_NETSCAPE, vbox, opt);
 
 	new_window =
--- a/src/ui.h	Sun Oct 21 00:16:09 2001 +0000
+++ b/src/ui.h	Sun Oct 21 19:01:03 2001 +0000
@@ -42,6 +42,7 @@
 #define BROWSER_MANUAL                2
 /*#define BROWSER_INTERNAL              3*/
 #define BROWSER_GNOME                 4
+#define BROWSER_OPERA                 5	
 
 #define FACE_ANGEL 0
 #define FACE_BIGSMILE 1