Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.2:Test
epiphany
epiphany-user-agent.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File epiphany-user-agent.patch of Package epiphany
Index: epiphany-2.28.2/data/epiphany.schemas.in =================================================================== --- epiphany-2.28.2.orig/data/epiphany.schemas.in +++ epiphany-2.28.2/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.28.2/embed/ephy-embed-prefs.c =================================================================== --- epiphany-2.28.2.orig/embed/ephy-embed-prefs.c +++ epiphany-2.28.2/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.28.2/embed/ephy-embed-prefs.h =================================================================== --- epiphany-2.28.2.orig/embed/ephy-embed-prefs.h +++ epiphany-2.28.2/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"
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor