commit:2be31e14fb4593a82a52219e534a61a2613ead34
author:Chip Black
committer:Chip Black
date:Sun Jun 14 21:45:08 2009 -0500
parents:9ae762f9fa6d0ee2789818d19adfd6e938975240
Add default size configuration
diff --git a/WebThing.cs b/WebThing.cs
line changes: +15/-0
index 5e2000b..8bc589a
--- a/WebThing.cs
+++ b/WebThing.cs
@@ -65,6 +65,21 @@ namespace bytex64.WebThing {
             // based on the executable name, which I don't like.
             _Window.SetWmclass("webthing", "WebThing");  
             _Window.Role = "browser";
+            {
+                int w, h;
+
+                if (Config.Options.ContainsKey("Width"))
+                    w = Convert.ToInt32(Config.Options["Width"]);
+                else
+                    w = 640;
+
+                if (Config.Options.ContainsKey("Height"))
+                    h = Convert.ToInt32(Config.Options["Height"]);
+                else
+                    h = 480;
+
+                _Window.DefaultSize = new Gdk.Size(w, h);
+            }
             _Window.Destroyed += delegate { Quit(); };
 
             // Initialize WidgetGrid