Permalink
Browse files

add developer mode

  • Loading branch information...
1 parent f615c3c commit aed75f91bf9ee717a2372334dd48286453c46329 @maccman maccman committed Jan 29, 2012
@@ -93,11 +93,11 @@
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "MacGap/Classes/ContentView.m"
- timestampString = "349550636.708075"
+ timestampString = "349562075.296308"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "56"
- endingLineNumber = "56"
+ startingLineNumber = "63"
+ endingLineNumber = "63"
landmarkName = "-triggerEvent:"
landmarkType = "5">
</FileBreakpoint>
@@ -6,6 +6,9 @@ @interface WebPreferences (WebPreferencesPrivate)
- (void)_setLocalStorageDatabasePath:(NSString *)path;
- (void) setLocalStorageEnabled: (BOOL) localStorageEnabled;
- (void) setDatabasesEnabled:(BOOL)databasesEnabled;
+ - (void) setDeveloperExtrasEnabled:(BOOL)developerExtrasEnabled;
+ - (void) setWebGLEnabled:(BOOL)webGLEnabled;
+ - (void) setOfflineWebApplicationCacheEnabled:(BOOL)offlineWebApplicationCacheEnabled;
@end
@implementation ContentView
@@ -15,12 +18,17 @@ @implementation ContentView
- (void) awakeFromNib
{
WebPreferences *webPrefs = [WebPreferences standardPreferences];
+
NSString *cappBundleName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
NSString *applicationSupportFile = [@"~/Library/Application Support/" stringByExpandingTildeInPath];
NSString *savePath = [NSString pathWithComponents:[NSArray arrayWithObjects:applicationSupportFile, cappBundleName, @"LocalStorage", nil]];
[webPrefs _setLocalStorageDatabasePath:savePath];
[webPrefs setLocalStorageEnabled:YES];
[webPrefs setDatabasesEnabled:YES];
+ [webPrefs setDeveloperExtrasEnabled:[[NSUserDefaults standardUserDefaults] boolForKey: @"developer"]];
+ [webPrefs setOfflineWebApplicationCacheEnabled:YES];
+ [webPrefs setWebGLEnabled:YES];
+
[self.webView setPreferences:webPrefs];
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage
@@ -29,7 +37,6 @@ - (void) awakeFromNib
[self.webView setApplicationNameForUserAgent: @"MacGap"];
-
self.delegate = [[WebViewDelegate alloc] init];
[self.webView setFrameLoadDelegate:self.delegate];
[self.webView setUIDelegate:self.delegate];
View
@@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string>application.icns</string>
<key>CFBundleIdentifier</key>
- <string>maccman.${PRODUCT_NAME:rfc1034identifier}</string>
+ <string>com.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>

0 comments on commit aed75f9

Please sign in to comment.