65f5b0a6d6
Copy from home:vuntz:branches:GNOME:Factory/epiphany via accept of submit request 27505 revision 2. Request was accepted with message: accept OBS-URL: https://build.opensuse.org/request/show/27505 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/epiphany?expand=0&rev=50
90 lines
3.3 KiB
Diff
90 lines
3.3 KiB
Diff
Index: epiphany-2.29.3/data/epiphany.schemas.in
|
|
===================================================================
|
|
--- epiphany-2.29.3.orig/data/epiphany.schemas.in
|
|
+++ epiphany-2.29.3/data/epiphany.schemas.in
|
|
@@ -478,6 +478,17 @@
|
|
<short>Browse with caret</short>
|
|
</locale>
|
|
</schema>
|
|
+ <schema>
|
|
+ <key>/schemas/apps/epiphany/web/user_agent_vendor</key>
|
|
+ <applyto>/apps/epiphany/web/user_agent_vendor</applyto>
|
|
+ <owner>epiphany</owner>
|
|
+ <type>string</type>
|
|
+ <default>GNOME.org</default>
|
|
+ <locale name="C">
|
|
+ <short>Vendor to include in the user agent</short>
|
|
+ <long>String that will be appended to the user agent, containing vendor-specific information.</long>
|
|
+ </locale>
|
|
+ </schema>
|
|
<schema>
|
|
<key>/schemas/apps/epiphany/general/managed_network</key>
|
|
<applyto>/apps/epiphany/general/managed_network</applyto>
|
|
Index: epiphany-2.29.3/embed/ephy-embed-prefs.c
|
|
===================================================================
|
|
--- epiphany-2.29.3.orig/embed/ephy-embed-prefs.c
|
|
+++ epiphany-2.29.3/embed/ephy-embed-prefs.c
|
|
@@ -134,6 +134,38 @@ webkit_pref_callback_user_stylesheet (GC
|
|
}
|
|
|
|
static void
|
|
+webkit_pref_callback_user_agent_vendor (GConfClient *client,
|
|
+ guint cnxn_id,
|
|
+ GConfEntry *entry,
|
|
+ gpointer data)
|
|
+{
|
|
+ GConfValue *gcvalue;
|
|
+ const char *value = NULL;
|
|
+ static char *webkit_user_agent = NULL;
|
|
+ char *user_agent = NULL;
|
|
+ char *webkit_pref = data;
|
|
+
|
|
+ gcvalue = gconf_entry_get_value (entry);
|
|
+
|
|
+ /* happens on initial notify if the key doesn't exist */
|
|
+ if (gcvalue != NULL &&
|
|
+ gcvalue->type == GCONF_VALUE_STRING) {
|
|
+ value = gconf_value_get_string (gcvalue);
|
|
+ }
|
|
+
|
|
+ if (webkit_user_agent == NULL) {
|
|
+ g_object_get (G_OBJECT(settings), "user-agent", &webkit_user_agent, NULL);
|
|
+ }
|
|
+
|
|
+ user_agent = g_strconcat (webkit_user_agent, " ",
|
|
+ "Epiphany/"VERSION, value ? " " : NULL,
|
|
+ value, NULL);
|
|
+
|
|
+ g_object_set (settings, webkit_pref, user_agent, NULL);
|
|
+ g_free (user_agent);
|
|
+}
|
|
+
|
|
+static void
|
|
webkit_pref_callback_font_size (GConfClient *client,
|
|
guint cnxn_id,
|
|
GConfEntry *entry,
|
|
@@ -231,7 +263,10 @@ static const PrefData webkit_pref_entrie
|
|
webkit_pref_callback_boolean },
|
|
{ CONF_SECURITY_ALLOW_POPUPS,
|
|
"javascript-can-open-windows-automatically",
|
|
- webkit_pref_callback_boolean }
|
|
+ webkit_pref_callback_boolean },
|
|
+ { CONF_USER_AGENT_VENDOR,
|
|
+ "user-agent",
|
|
+ webkit_pref_callback_user_agent_vendor }
|
|
};
|
|
|
|
static void
|
|
Index: epiphany-2.29.3/embed/ephy-embed-prefs.h
|
|
===================================================================
|
|
--- epiphany-2.29.3.orig/embed/ephy-embed-prefs.h
|
|
+++ epiphany-2.29.3/embed/ephy-embed-prefs.h
|
|
@@ -41,6 +41,7 @@
|
|
#define CONF_DISPLAY_SMOOTHSCROLL "/apps/epiphany/web/smooth_scroll"
|
|
#define CONF_WEB_INSPECTOR_ENABLED "/apps/epiphany/web/inspector_enabled"
|
|
#define CONF_CARET_BROWSING_ENABLED "/apps/epiphany/web/browse_with_caret"
|
|
+#define CONF_USER_AGENT_VENDOR "/apps/epiphany/web/user_agent_vendor"
|
|
|
|
/* These are defined gnome wide now */
|
|
#define CONF_NETWORK_PROXY_MODE "/system/proxy/mode"
|