Title: [170516] trunk/Tools
Revision
170516
Author
beid...@apple.com
Date
2014-06-26 19:43:21 -0700 (Thu, 26 Jun 2014)

Log Message

MiniBrowser should support a preference to override the default URL
https://bugs.webkit.org/show_bug.cgi?id=134373

Reviewed by Darin Adler.

* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate applicationDidFinishLaunching:]): See if there’s a pref
  overriding the default URL, and use it if there is.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (170515 => 170516)


--- trunk/Tools/ChangeLog	2014-06-27 02:11:00 UTC (rev 170515)
+++ trunk/Tools/ChangeLog	2014-06-27 02:43:21 UTC (rev 170516)
@@ -1,3 +1,14 @@
+2014-06-26  Brady Eidson  <beid...@apple.com>
+
+        MiniBrowser should support a preference to override the default URL
+        https://bugs.webkit.org/show_bug.cgi?id=134373
+
+        Reviewed by Darin Adler.
+
+        * MiniBrowser/mac/AppDelegate.m:
+        (-[BrowserAppDelegate applicationDidFinishLaunching:]): See if there’s a pref
+          overriding the default URL, and use it if there is.
+
 2014-06-26  Brent Fulgham  <bfulg...@apple.com>
 
         [Win] Fix potential buffer overrun in DLLLauncher

Modified: trunk/Tools/MiniBrowser/mac/AppDelegate.m (170515 => 170516)


--- trunk/Tools/MiniBrowser/mac/AppDelegate.m	2014-06-27 02:11:00 UTC (rev 170515)
+++ trunk/Tools/MiniBrowser/mac/AppDelegate.m	2014-06-27 02:43:21 UTC (rev 170516)
@@ -32,6 +32,7 @@
 
 static NSString *defaultURL = @"http://www.webkit.org/";
 static NSString *useWebKit2ByDefaultPreferenceKey = @"UseWebKit2ByDefault";
+static NSString *defaultURLPreferenceKey = @"DefaultURL";
 
 enum {
     WebKit1NewWindowTag = 1,
@@ -90,6 +91,10 @@
     [self _updateNewWindowKeyEquivalents];
     
     [[NSUserDefaults standardUserDefaults] setBool:@YES forKey:@"WebKitDeveloperExtrasEnabled"];
+    NSString *newDefaultURL = [[NSUserDefaults standardUserDefaults] stringForKey:defaultURLPreferenceKey];
+    if (newDefaultURL)
+        defaultURL = [newDefaultURL retain];
+
     [self newWindow:self];
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to