You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-overlay/net-print/hplip/files/hplip-3.9.10-browser.patch

39 lines
1.4 KiB

--- base/utils.py.old 2009-11-14 15:23:29.000000000 +0100
+++ base/utils.py 2009-11-14 15:37:53.000000000 +0100
@@ -812,13 +812,15 @@
return True
-BROWSERS = ['firefox', 'mozilla', 'konqueror', 'galeon', 'skipstone'] # in preferred order
-BROWSER_OPTS = {'firefox': '-new-window', 'mozilla' : '', 'konqueror': '', 'galeon': '-w', 'skipstone': ''}
+BROWSERS = ['firefox', 'mozilla', 'konqueror', 'epiphany', 'skipstone'] # in preferred order
+BROWSER_OPTS = {'firefox': '-new-tab', 'mozilla': '', 'konqueror': '', 'epiphany': '--new-tab', 'skipstone': ''}
def find_browser():
if platform_avail and platform.system() == 'Darwin':
return "open"
+ if platform_avail and platform.system() == 'Linux' and which("xdg-open"):
+ return "xdg-open"
else:
for b in BROWSERS:
if which(b):
@@ -832,11 +834,14 @@
cmd = 'open "%s"' % url
log.debug(cmd)
os.system(cmd)
+ if platform_avail and platform.system() == 'Linux' and which("xdg-open"):
+ cmd = 'xdg-open "%s"' % url
+ log.debug(cmd)
+ os.system(cmd)
else:
for b in BROWSERS:
- bb = which(b)
- if bb:
- bb = os.path.join(bb, b)
+ if b:
+ bb = which(b, return_full_path='True')
if use_browser_opts:
cmd = """%s %s "%s" &""" % (bb, BROWSER_OPTS[b], url)
else: