Set WM bits and user agent
authorChip Black <bytex64@bytex64.net>
Tue, 2 Jun 2009 19:33:28 +0000 (14:33 -0500)
committerChip Black <bytex64@bytex64.net>
Tue, 2 Jun 2009 19:33:28 +0000 (14:33 -0500)
WebThing.cs
plugins/SoupSettings/SoupSettings.c

index f36a8fa..f325ec3 100644 (file)
@@ -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);
index 66778bf..882b574 100644 (file)
@@ -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);
 }