[webkit-gtk] How to change the user-agent string ? How to use properties ?

Mesny Jonathan mesny.jo at gmail.com
Wed Jun 16 07:58:03 PDT 2010


Hi,
	I can see that there is a function called webkit_web_settings_get_user_agent() which returns 

> 	"Mozilla/5.0 (X11; U; Linux x86_64; fr-fr) AppleWebKit/531.2+ (KHTML, like Gecko) Safari/531.2+"


	But it seems there is no setter to change the value of the user-agent string.

	I know it exists a read/write property called "user-agent" but I don't succeed to change its content...
	I try this below, but it fails:

> 	web_view = WEBKIT_WEB_VIEW(webkit_web_view_new());
>     	WebKitWebSettings * settings = webkit_web_view_get_settings(web_view);
> 	g_object_set_property((GObject*)settings, "user-agent", (GValue*)"My super crawler");

	Could someone help me to solve this please ?

Thanks by advance,


---------------------------------------------------------------------------------------

Jonathan MESNY.
Élève-Ingénieur en 4ème année d'informatique à l'INSA de Lyon

Téléphone portable :  06 77 27 99 55
@personnelle :        mesny.jo at gmail.com
@étudiante :          jonathan.mesny at insa-lyon.fr
@web :                http://jonathanmesny.fr

---------------------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20100616/b6fefb91/attachment.html>


More information about the webkit-gtk mailing list