Bug#668197: (no subject)

2012-12-15 Thread David Smith
Upstream has accepted a slight modification to this patch here:

http://sourceforge.net/p/liferea/code/ci/408a99b39535c4eb79983ebd2936a8eda5fff8b7/tree/src/browser.c?diff=17d567de43aef87eca93014caa6f782ab7b1ff91


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#668197: (no subject)

2012-11-07 Thread David Smith
Set x-www-browser as fallback.
Make sure to launch the gnome default browser only when that option is selected 
and set x-www-browser as fallback for all situations.

It's better than the above patches because:
1. Don't need to remove browser options
2. All browser options now even if you don't have a gnome/gtk default browser 
configured.
3. x-www-browser fallback so you're always guaranteed a browser is launched so 
long as your package manager isn't broken and you have a web browser installed.
--- a/src/browser.c
+++ b/src/browser.c
@@ -137,7 +137,7 @@
 		}
 
 		if (fallback  !cmd)	/* Last fallback: first browser default */
-			cmd = browsers[0].defaultplace;
+			cmd = browsers[6].defaultplace;
 	}
 	g_free (libname);
 		
@@ -244,6 +244,7 @@
 	struct browser	*browser;
 	gchar		*cmd = NULL;
 	gboolean	done = FALSE;	
+	gchar	*libname;
 	
 	g_assert (uri != NULL);
 	
@@ -256,7 +257,9 @@
 			g_free (cmd);
 		} else {
 			/* the default browser has no command to use the GTK launch mechanism */
-			done = gtk_show_uri (NULL, uri, 0, NULL);
+			conf_get_str_value (BROWSER_ID, libname);
+			if (g_str_equal (libname, default))
+			  done = gtk_show_uri (NULL, uri, 0, NULL);
 		}
 	}
 	


Bug#668197: (no subject)

2012-11-06 Thread David Smith
Ah, that patch doesn't work on Gnome because all the browser settings in 
liferea other than manual get ignored in Gnome.  Setting the browser default to 
manual doesn't seem to work either.

Purging all the browser options other than manual (x-www-browser) works for 
Gnome and works for a vanilla KDE install as well.  It's not pretty, but it 
fixes all 4 problems listed above.

New patch attached.

--- a/src/browser.c
+++ b/src/browser.c
@@ -28,50 +28,6 @@
 #include ui/liferea_shell.h
 
 static struct browser browsers[] = {
-	{
-		default, N_(Default Browser), NULL, /* triggering gtk_show_uri() */
-		NULL, NULL,
-		NULL, NULL,
-		NULL, NULL
-	},
-	{
-		/* tested with SeaMonkey 1.0.6 */
-		mozilla, Mozilla, mozilla %s,
-		NULL, mozilla -remote openURL(%s),
-		NULL, mozilla -remote 'openURL(%s,new-window)',
-		NULL, mozilla -remote 'openURL(%s,new-tab)'
-	},
-	{
-		/* tested with Firefox 1.5 and 2.0 */
-		firefox, Firefox,firefox \%s\,
-		NULL, firefox -a firefox -remote \openURL(%s)\,
-		NULL, firefox -a firefox -remote 'openURL(%s,new-window)',
-		NULL, firefox -a firefox -remote 'openURL(%s,new-tab)'
-	},
-	{
-		opera, Opera,opera \%s\,
-		opera \%s\, opera -remote \openURL(%s)\,
-		opera -newwindow \%s\, NULL,
-		opera -newpage \%s\, NULL
-	},
-	{
-		epiphany, Epiphany,epiphany \%s\,
-		NULL, NULL,
-		epiphany \%s\, NULL,
-		epiphany -n \%s\, NULL
-	},
-	{
-		konqueror, Konqueror, kfmclient openURL \%s\,
-		NULL, NULL,
-		NULL, NULL,
-		NULL, NULL
-	},
-	{
-		x-www-browser, x-www-browser, x-www-browser \%s\,
-		NULL, NULL,
-		NULL, NULL,
-		NULL, NULL
-	},
 	{	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
 };