commit:7bcb5185ed09b9c691bd86d9666733723c1dc203
author:Chip Black
committer:Chip Black
date:Tue Jun 2 14:33:28 2009 -0500
parents:9ecd1220fabdcf210aab46afc46c6d6627a4fe21
Set WM bits and user agent
diff --git a/WebThing.cs b/WebThing.cs
line changes: +2/-0
index f36a8fa..f325ec3
--- a/WebThing.cs
+++ b/WebThing.cs
@@ -53,6 +53,8 @@ namespace bytex64.WebThing {
 			ParseArgs();
 
 			_Window = new Gtk.Window("WebThing");
+			_Window.SetWmclass("WebThing", "webthing");
+			_Window.Role = "browser";
 			_Window.Destroyed += delegate { Quit(); };
 
 			WidgetGrid = new Gtk.Table(3, 3, false);

diff --git a/plugins/SoupSettings/SoupSettings.c b/plugins/SoupSettings/SoupSettings.c
line changes: +5/-0
index 66778bf..882b574
--- a/plugins/SoupSettings/SoupSettings.c
+++ b/plugins/SoupSettings/SoupSettings.c
@@ -9,4 +9,9 @@ void soup_settings() {
 	/* Set up persistent cookies */
 	SoupCookieJar *jar = (SoupCookieJar *) soup_cookie_jar_text_new("cookies.txt", FALSE);
 	soup_session_add_feature(soup_session, SOUP_SESSION_FEATURE(jar));
+
+	GValue user_agent = {0,};
+	g_value_init(&user_agent, G_TYPE_STRING);
+	g_value_set_string(&user_agent, "WebThing 0.1");
+	g_object_set_property(G_OBJECT(soup_session), SOUP_SESSION_USER_AGENT, &user_agent);
 }