[devhelp/ebassi/gidocgen: 7/8] Set the User-Agent
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp/ebassi/gidocgen: 7/8] Set the User-Agent
- Date: Mon, 3 May 2021 14:59:01 +0000 (UTC)
commit 9c1a9c89374a1a0e2fb7c03db48c0230be454224
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Apr 7 13:22:37 2021 +0100
Set the User-Agent
We should allow modern API references to detect when running under
DevHelp, and update their style in ways that improve integration.
See: #28
devhelp/dh-web-view.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/devhelp/dh-web-view.c b/devhelp/dh-web-view.c
index 9563b700..782a8ba8 100644
--- a/devhelp/dh-web-view.c
+++ b/devhelp/dh-web-view.c
@@ -488,6 +488,12 @@ dh_web_view_constructed (GObject *object)
/* Plugins are always disabled with WebKit >= 2.32 */
webkit_settings_set_enable_plugins (webkit_settings, FALSE);
#endif
+
+ /* Set the User-Agent to something tools can match */
+ webkit_settings_set_user_agent_with_application_details (webkit_settings,
+ "DevHelp",
+ LIBDEVHELP_API_VERSION);
+
if (view->priv->profile == NULL)
set_profile (view, dh_profile_get_default ());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]