Fix: Focus startup WebView
authorChip Black <bytex64@bytex64.net>
Mon, 8 Jun 2009 07:43:05 +0000 (02:43 -0500)
committerChip Black <bytex64@bytex64.net>
Mon, 8 Jun 2009 08:16:43 +0000 (03:16 -0500)
WebThing.cs
plugins/DefaultPage.cs

index 9429099..fd2eb99 100644 (file)
@@ -97,10 +97,9 @@ namespace bytex64.WebThing {
 
             // Create a new, default WebThingView if one has not already
             // been created.
-            if (Tabs.NPages == 0) {
-                WebThingView default_tab = NewTab();
-                default_tab.WebView.GrabFocus();
-            }
+            if (Tabs.NPages == 0)
+                OpenUriTab("http://dominionofawesome.com/");
+            WebView.GrabFocus();
 
             Application.Run();
         }
index 5ec5bdd..3e99bb1 100644 (file)
@@ -11,8 +11,6 @@ public class DefaultPage : WebThingPlugin {
             string[] pages = Regex.Split(Config.Options["DefaultPage"], @"\s+");
             foreach (string page in pages)
                 wt.OpenUriTab(page);
-        } else {
-            wt.OpenUriTab("http://dominionofawesome.com/");
         }
     }
 }