On 12 September 2011 03:06, colombanw@users.sourceforge.net wrote:
Revision: 5909 http://geany.svn.sourceforge.net/geany/?rev=5909&view=rev Author: colombanw Date: 2011-09-11 17:06:11 +0000 (Sun, 11 Sep 2011) Log Message:
Cleanup code in utils_open_browser()
Modified Paths:
trunk/src/utils.c
Modified: trunk/src/utils.c
--- trunk/src/utils.c 2011-09-02 21:45:20 UTC (rev 5908) +++ trunk/src/utils.c 2011-09-11 17:06:11 UTC (rev 5909) @@ -81,37 +81,28 @@ cmdline = g_strconcat(tool_prefs.browser_cmd, " "", uri, """, NULL); if (! g_spawn_command_line_async(cmdline, NULL)) {
- static const gchar *browsers[] =
- {
- "xdg-open",
- "firefox",
- "mozilla",
- "opera",
- "konqueror",
- "netscape"
Hi Colomban,
What about adding chrome?
Cheers Lex
Le 11/09/2011 23:32, Lex Trotman a écrit :
[...]
What about adding chrome?
Yeah, why not (though this list is a fallback one), it's very easy now :)
We might then also want to add also Safari, Epihpany (GNOME) and Midori (Xfce)... does anybody knows if "safari" runs Safari under MacOSX, or what is the command name?
Cheers, Colomban
On 09/11/2011 02:53 PM, Colomban Wendling wrote:
Le 11/09/2011 23:32, Lex Trotman a écrit :
[...]
What about adding chrome?
And `chromium` I guess too :)
Yeah, why not (though this list is a fallback one), it's very easy now :)
We might then also want to add also Safari, Epihpany (GNOME) and Midori (Xfce)... does anybody knows if "safari" runs Safari under MacOSX, or what is the command name?
From a quick search, it's `open -a Safari THE_URL`.
Cheers, Matthew Brush
On 12 September 2011 12:30, Matthew Brush mbrush@codebrainz.ca wrote:
On 09/11/2011 02:53 PM, Colomban Wendling wrote:
Le 11/09/2011 23:32, Lex Trotman a écrit :
[...]
What about adding chrome?
And `chromium` I guess too :)
Oh well better have hot and cold running ferals then...
firefox, iceweasel, icecat
Cheers Lex
PS anyone want to start a re-brand "tepid rabbit" :)
Le 12/09/2011 04:49, Lex Trotman a écrit :
On 12 September 2011 12:30, Matthew Brush mbrush@codebrainz.ca wrote:
On 09/11/2011 02:53 PM, Colomban Wendling wrote:
Le 11/09/2011 23:32, Lex Trotman a écrit :
[...]
What about adding chrome?
And `chromium` I guess too :)
Oh well better have hot and cold running ferals then...
I think I better add chromium than chrome if I'd have to add only one. chromium is the OSS part of chrome, and the only one I have on my Debian box so... :-'
firefox, iceweasel, icecat
Well, I guess we'd have to make a clever compromise between having all possible browsers and the wide spread ones...
Cheers, Colomban
Am 11.09.2011 23:53, schrieb Colomban Wendling:
Le 11/09/2011 23:32, Lex Trotman a écrit :
[...]
What about adding chrome?
Yeah, why not (though this list is a fallback one), it's very easy now :)
We might then also want to add also Safari, Epihpany (GNOME) and Midori (Xfce)... does anybody knows if "safari" runs Safari under MacOSX, or what is the command name?
I disagree to add all known browsers to this list as they might appear. Its still a fall back which means something didn't work before this list has been called.
Cheers, Frank
On 12 September 2011 18:16, Frank Lanitz frank@frank.uvena.de wrote:
Am 11.09.2011 23:53, schrieb Colomban Wendling:
Le 11/09/2011 23:32, Lex Trotman a écrit :
[...]
What about adding chrome?
Yeah, why not (though this list is a fallback one), it's very easy now :)
We might then also want to add also Safari, Epihpany (GNOME) and Midori (Xfce)... does anybody knows if "safari" runs Safari under MacOSX, or what is the command name?
I disagree to add all known browsers to this list as they might appear. Its still a fall back which means something didn't work before this list has been called.
The thing that didn't work is the tool setting which defaults to firefox.
If we have any fallback at all then we should hake a reasonable job of it, eg IIUC iceweasel is the debian project default browser not firefox and debian is the basis of many more distros.
Otherwise the whole fallback should be removed since it is confusing and may not run the browser the user expected (depending on the order in the list). At least when there is only the tools pref you know when its wrong, the browser won't go, with the fallback something unexpected may happen.
Given the rate bugs get found in browsers I wouldn't want to unexpectedly run an old un-updated browser, thats a real risk.
Cheers Lex
Otherwise the whole fallback should be removed since it is confusing and may not run the browser the user expected (depending on the order in the list). At least when there is only the tools pref you know when its wrong, the browser won't go, with the fallback something unexpected may happen.
In fact thinking about it some more Geany should tell the user that browser command "xxx" did not work (xxx=tools pref command) and ask do you want to try the following in order and print the list. We should not fail to inform the user that the command did not work.
Cheers Lex
Le 12/09/2011 11:16, Lex Trotman a écrit :
Otherwise the whole fallback should be removed since it is confusing and may not run the browser the user expected (depending on the order in the list). At least when there is only the tools pref you know when its wrong, the browser won't go, with the fallback something unexpected may happen.
In fact thinking about it some more Geany should tell the user that browser command "xxx" did not work (xxx=tools pref command) and ask do you want to try the following in order and print the list. We should not fail to inform the user that the command did not work.
Right. Now you say this, I think the better may perhaps to tell the user the browser failed to spawn, and ask her to provide the command to run in place (maybe with a few suggestions), and fill the pref with that new value (if working). What do you think?
Cheers, Colomban
Am 12.09.2011 15:28, schrieb Colomban Wendling:
Le 12/09/2011 11:16, Lex Trotman a écrit :
Otherwise the whole fallback should be removed since it is confusing and may not run the browser the user expected (depending on the order in the list). At least when there is only the tools pref you know when its wrong, the browser won't go, with the fallback something unexpected may happen.
In fact thinking about it some more Geany should tell the user that browser command "xxx" did not work (xxx=tools pref command) and ask do you want to try the following in order and print the list. We should not fail to inform the user that the command did not work.
Right. Now you say this, I think the better may perhaps to tell the user the browser failed to spawn, and ask her to provide the command to run in place (maybe with a few suggestions), and fill the pref with that new value (if working). What do you think?
I like that approach.
Cheers, Frank
Le 12/09/2011 15:33, Frank Lanitz a écrit :
Am 12.09.2011 15:28, schrieb Colomban Wendling:
Le 12/09/2011 11:16, Lex Trotman a écrit :
Otherwise the whole fallback should be removed since it is confusing and may not run the browser the user expected (depending on the order in the list). At least when there is only the tools pref you know when its wrong, the browser won't go, with the fallback something unexpected may happen.
In fact thinking about it some more Geany should tell the user that browser command "xxx" did not work (xxx=tools pref command) and ask do you want to try the following in order and print the list. We should not fail to inform the user that the command did not work.
Right. Now you say this, I think the better may perhaps to tell the user the browser failed to spawn, and ask her to provide the command to run in place (maybe with a few suggestions), and fill the pref with that new value (if working). What do you think?
I like that approach.
What about the attached implementation?
I'm not really fund of the dialog text I've used, if anybody has a better idea, please tell me ^^
Cheers, Colomban
Le 12/09/2011 16:21, Colomban Wendling a écrit :
Le 12/09/2011 15:33, Frank Lanitz a écrit :
Am 12.09.2011 15:28, schrieb Colomban Wendling:
Le 12/09/2011 11:16, Lex Trotman a écrit :
Otherwise the whole fallback should be removed since it is confusing and may not run the browser the user expected (depending on the order in the list). At least when there is only the tools pref you know when its wrong, the browser won't go, with the fallback something unexpected may happen.
In fact thinking about it some more Geany should tell the user that browser command "xxx" did not work (xxx=tools pref command) and ask do you want to try the following in order and print the list. We should not fail to inform the user that the command did not work.
Right. Now you say this, I think the better may perhaps to tell the user the browser failed to spawn, and ask her to provide the command to run in place (maybe with a few suggestions), and fill the pref with that new value (if working). What do you think?
I like that approach.
What about the attached implementation?
I'm not really fund of the dialog text I've used, if anybody has a better idea, please tell me ^^
Committed with a slightly updated label, but feel free to still comment on it.
Cheers, Colomban
Hi Colomban,
[...]
Committed with a slightly updated label, but feel free to still comment on it.
Very minor suggestion, I'd say "...or enter another one" instead of select. Select implies select from a list.
Cheers Lex
Le 15/09/2011 04:14, Lex Trotman a écrit :
Hi Colomban,
[...]
Committed with a slightly updated label, but feel free to still comment on it.
Very minor suggestion, I'd say "...or enter another one" instead of select. Select implies select from a list.
Right, fixed. Tanks :)
Cheers, Colomban
Am 12.09.2011 11:09, schrieb Lex Trotman:
On 12 September 2011 18:16, Frank Lanitzfrank@frank.uvena.de wrote:
Am 11.09.2011 23:53, schrieb Colomban Wendling:
Le 11/09/2011 23:32, Lex Trotman a écrit :
[...]
What about adding chrome?
Yeah, why not (though this list is a fallback one), it's very easy now :)
We might then also want to add also Safari, Epihpany (GNOME) and Midori (Xfce)... does anybody knows if "safari" runs Safari under MacOSX, or what is the command name?
I disagree to add all known browsers to this list as they might appear. Its still a fall back which means something didn't work before this list has been called.
The thing that didn't work is the tool setting which defaults to firefox.
If we have any fallback at all then we should hake a reasonable job of it, eg IIUC iceweasel is the debian project default browser not firefox and debian is the basis of many more distros.
Yes, and calling Firefox Firefox is one of the reasons for those distros to fork debian :)
Since iceweasel is a pure debian thing, it should perhaps the responsibility of the debian package maintainer to add iceweasel.
Given the rate bugs get found in browsers I wouldn't want to unexpectedly run an old un-updated browser, thats a real risk.
I think that's a bit exaggerated.
Best regards.
Am 12.09.2011 11:16, schrieb Thomas Martitz:
Am 12.09.2011 11:09, schrieb Lex Trotman:
On 12 September 2011 18:16, Frank Lanitzfrank@frank.uvena.de wrote:
Am 11.09.2011 23:53, schrieb Colomban Wendling:
Le 11/09/2011 23:32, Lex Trotman a écrit :
[...]
What about adding chrome?
Yeah, why not (though this list is a fallback one), it's very easy now :)
We might then also want to add also Safari, Epihpany (GNOME) and Midori (Xfce)... does anybody knows if "safari" runs Safari under MacOSX, or what is the command name?
I disagree to add all known browsers to this list as they might appear. Its still a fall back which means something didn't work before this list has been called.
The thing that didn't work is the tool setting which defaults to firefox.
If we have any fallback at all then we should hake a reasonable job of it, eg IIUC iceweasel is the debian project default browser not firefox and debian is the basis of many more distros.
Yes, and calling Firefox Firefox is one of the reasons for those distros to fork debian :)
Since iceweasel is a pure debian thing, it should perhaps the responsibility of the debian package maintainer to add iceweasel.
Even I am a heavy Debian user I agree. Its the same for the different diff types for distri's packaging system.
Cheers, Frank
Le 12/09/2011 11:09, Lex Trotman a écrit :
On 12 September 2011 18:16, Frank Lanitz frank@frank.uvena.de wrote:
Am 11.09.2011 23:53, schrieb Colomban Wendling:
Le 11/09/2011 23:32, Lex Trotman a écrit :
[...]
What about adding chrome?
Yeah, why not (though this list is a fallback one), it's very easy now :)
We might then also want to add also Safari, Epihpany (GNOME) and Midori (Xfce)... does anybody knows if "safari" runs Safari under MacOSX, or what is the command name?
I disagree to add all known browsers to this list as they might appear. Its still a fall back which means something didn't work before this list has been called.
The thing that didn't work is the tool setting which defaults to firefox.
If we have any fallback at all then we should hake a reasonable job of it, eg IIUC iceweasel is the debian project default browser not firefox and debian is the basis of many more distros.
Actually "firefox" on Debian (at least mine?) runs Iceweasel, so it's not a concern from our POV.
[...]
Given the rate bugs get found in browsers I wouldn't want to unexpectedly run an old un-updated browser, thats a real risk.
Well... It's not Geany's concern if somebody keeps a broken browser installed on her machine IMHO.
Cheers, Colomban
On Mon, 12 Sep 2011 15:27:07 +0200 Colomban Wendling lists.ban@herbesfolles.org wrote:
Actually "firefox" on Debian (at least mine?) runs Iceweasel, so it's not a concern from our POV.
debian$ cat /usr/bin/firefox
#!/bin/sh
FIREFOX="$(which $0)" [ -x "$FIREFOX.real" ] && exec "$FIREFOX.real" "$@"
exec iceweasel "$@"
Le 12/09/2011 10:16, Frank Lanitz a écrit :
Am 11.09.2011 23:53, schrieb Colomban Wendling:
Le 11/09/2011 23:32, Lex Trotman a écrit :
[...]
What about adding chrome?
Yeah, why not (though this list is a fallback one), it's very easy now :)
We might then also want to add also Safari, Epihpany (GNOME) and Midori (Xfce)... does anybody knows if "safari" runs Safari under MacOSX, or what is the command name?
I disagree to add all known browsers to this list as they might appear. Its still a fall back which means something didn't work before this list has been called.
I didn't meant to add all existing browsers to the list, but only to have "good" fallback. My reasoning was then to add the default browsers of the common setups, so Epiphany for GNOME, Midori for Xfce, Konqueror for KDE (we have this one already), and Safari for MacOS -- OK I didn't wanted to add Internet Explorer for Windows... :-'
IMHO a list with
firefox chromium / chrome opera epiphany konqueror midori safari
is quite sensible, since it covers the most common user-chosen browsers (first 3) and the most common default browsers (last 4, but maybe Midori, I'm not sure).
OTOH, I don't really either mind nor find fallbacks that good anyway.
Cheers, Colomban