mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 13:50:08 +02:00
python: patched webbrowser module for Haiku (#4199)
This commit is contained in:
committed by
Jérôme Duval
parent
76596f6c9c
commit
e3fdb45984
@@ -647,3 +647,37 @@ index 339ae8a..d537963 100644
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From 4e03cd18f7d7305f8c3adb4e308f68af1959d5db Mon Sep 17 00:00:00 2001
|
||||
From: Philipp Wolfer <phil@parolu.io>
|
||||
Date: Mon, 23 Sep 2019 09:53:39 +0200
|
||||
Subject: [PATCH] webbrowser: Support for default browsers on Haiku
|
||||
|
||||
---
|
||||
Lib/webbrowser.py | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py
|
||||
index 1a553f0e65..074898b62d 100755
|
||||
--- a/Lib/webbrowser.py
|
||||
+++ b/Lib/webbrowser.py
|
||||
@@ -614,6 +614,16 @@ if sys.platform == 'darwin':
|
||||
register("chrome", None, MacOSXOSAScript('chrome'), -1)
|
||||
register("MacOSX", None, MacOSXOSAScript('default'), -1)
|
||||
|
||||
+#
|
||||
+# Platform support for Haiku
|
||||
+#
|
||||
+
|
||||
+if 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"))
|
||||
+
|
||||
|
||||
# OK, now that we know what the default preference orders for each
|
||||
# platform are, allow user to override them with the BROWSER variable.
|
||||
--
|
||||
2.23.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user