From 2be31e14fb4593a82a52219e534a61a2613ead34 Mon Sep 17 00:00:00 2001 From: Chip Black Date: Sun, 14 Jun 2009 21:45:08 -0500 Subject: [PATCH] Add default size configuration --- WebThing.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/WebThing.cs b/WebThing.cs index 5e2000b..8bc589a 100644 --- 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 -- 2.25.1