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 @@ Browse with caret + + /schemas/apps/epiphany/web/user_agent_vendor + /apps/epiphany/web/user_agent_vendor + epiphany + string + GNOME.org + + Vendor to include in the user agent + String that will be appended to the user agent, containing vendor-specific information. + + /schemas/apps/epiphany/general/managed_network /apps/epiphany/general/managed_network 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"