mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-11 14:20:07 +02:00
python: patched webbrowser module for Haiku (#4199)
This commit is contained in:
committed by
Jérôme Duval
parent
76596f6c9c
commit
e3fdb45984
@@ -696,3 +696,32 @@ index 97973bc..b2e4095 100644
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From f55317a2a10d85c3240225d3c22f76e155cbe911 Mon Sep 17 00:00:00 2001
|
||||
From: Philipp Wolfer <phil@parolu.io>
|
||||
Date: Mon, 23 Sep 2019 09:14:58 +0200
|
||||
Subject: [PATCH] webbrowser: Support for default browsers on Haiku
|
||||
|
||||
---
|
||||
Lib/webbrowser.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
|
||||
index 0af36c4301..0a39655ab9 100755
|
||||
--- a/Lib/webbrowser.py
|
||||
+++ b/Lib/webbrowser.py
|
||||
@@ -527,6 +527,11 @@ def register_standard_browsers():
|
||||
"netscape", "opera", iexplore):
|
||||
if shutil.which(browser):
|
||||
register(browser, None, BackgroundBrowser(browser))
|
||||
+ elif sys.platform[:5] == "haiku":
|
||||
+ # First try to use the default configured browser
|
||||
+ register("haiku-default", None, GenericBrowser("open"))
|
||||
+ # Fall back to WebPositive as the standard browser of Haiku
|
||||
+ register("webpositive", None, BackgroundBrowser("WebPositive"))
|
||||
else:
|
||||
# Prefer X browsers if present
|
||||
if os.environ.get("DISPLAY"):
|
||||
--
|
||||
2.23.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user