diff --git a/.gitignore b/.gitignore index 0c796f4..c7050d5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ build *.mode1v3 *.pbxuser +.DS_Store WebSaver.xcodeproj/project.xcworkspace WebSaver.xcodeproj/xcuserdata diff --git a/README.md b/README.md index e2750fa..150eccb 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Notes ----- * Change the "Product Name" in the "Web" target if you are distributing a screensaver to prevent conflicts with others. +* thumbnail.png – 90 x 58 pixels | thumbnail@2x.png – 180 x 116 pixels License ------- diff --git a/WebSaver.xcodeproj/project.pbxproj b/WebSaver.xcodeproj/project.pbxproj index 4ffa524..969c3b0 100644 --- a/WebSaver.xcodeproj/project.pbxproj +++ b/WebSaver.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 113E8AA9187EC7740093F272 /* thumbnail@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 113E8AA7187EC7740093F272 /* thumbnail@2x.png */; }; + 113E8AAA187EC7740093F272 /* thumbnail.png in Resources */ = {isa = PBXBuildFile; fileRef = 113E8AA8187EC7740093F272 /* thumbnail.png */; }; 4D856DCE10845D98006C781A /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D856DCD10845D98006C781A /* WebKit.framework */; }; 8D255AC70486D3F9007BF209 /* WebSaver_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32DBCFA80370C50100C91783 /* WebSaver_Prefix.pch */; }; 8D255AC80486D3F9007BF209 /* WebSaverView.h in Headers */ = {isa = PBXBuildFile; fileRef = F50079790118B23001CA0E54 /* WebSaverView.h */; }; @@ -23,6 +25,8 @@ 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 113E8AA7187EC7740093F272 /* thumbnail@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "thumbnail@2x.png"; sourceTree = ""; }; + 113E8AA8187EC7740093F272 /* thumbnail.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = thumbnail.png; sourceTree = ""; }; 32DBCFA80370C50100C91783 /* WebSaver_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSaver_Prefix.pch; sourceTree = ""; }; 4D856DCD10845D98006C781A /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = ""; }; 8D255AD20486D3F9007BF209 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; @@ -70,6 +74,8 @@ 089C167CFE841241C02AAC07 /* Resources */ = { isa = PBXGroup; children = ( + 113E8AA7187EC7740093F272 /* thumbnail@2x.png */, + 113E8AA8187EC7740093F272 /* thumbnail.png */, EA4A502A1563C91F005E4CCA /* ConfigureSheet.nib */, 8D255AD20486D3F9007BF209 /* Info.plist */, 089C167DFE841241C02AAC07 /* InfoPlist.strings */, @@ -185,8 +191,10 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 113E8AAA187EC7740093F272 /* thumbnail.png in Resources */, 8D255ACA0486D3F9007BF209 /* InfoPlist.strings in Resources */, EA4A502B1563C91F005E4CCA /* ConfigureSheet.nib in Resources */, + 113E8AA9187EC7740093F272 /* thumbnail@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -237,6 +245,7 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Library/Screen Savers"; PRODUCT_NAME = WebSaver; + SDKROOT = macosx; WRAPPER_EXTENSION = saver; ZERO_LINK = YES; }; @@ -253,6 +262,7 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "$(HOME)/Library/Screen Savers"; PRODUCT_NAME = WebSaver; + SDKROOT = macosx; WRAPPER_EXTENSION = saver; }; name = Release; diff --git a/WebSaverView.m b/WebSaverView.m index 9cd6206..18d8fbf 100644 --- a/WebSaverView.m +++ b/WebSaverView.m @@ -26,8 +26,8 @@ @implementation WebSaverView static NSString * const REFRESH_INTERVAL_KEY = @"RefreshInterval"; static NSString * const REFRESH_UNITS_KEY = @"RefreshUnits"; -static NSString * const DEFAULT_URL = @"https://github.com/tlrobinson/WebSaver"; -static NSString * const DEFAULT_USERSCRIPT = @"document.body.style.backgroundColor = 'green';"; +static NSString * const DEFAULT_URL = @"http://webglsamples.googlecode.com/hg/aquarium/aquarium.html"; +static NSString * const DEFAULT_USERSCRIPT = @"/*document.body.style.backgroundColor = 'green';*/"; static double const DEFAULT_REFRESH_INTERVAL = 1.0; static long const DEFAULT_REFRESH_UNITS = REFRESH_MINUTES; @@ -47,6 +47,10 @@ - (id)initWithFrame:(NSRect)frame isPreview:(BOOL)isPreview nil]]; webView = [[WebView alloc] initWithFrame:[self bounds] frameName:nil groupName:nil]; + WebPreferences *p = [webView preferences]; + if ([p respondsToSelector:@selector(setWebGLEnabled:)]) { + [p setWebGLEnabled:YES]; + } [webView setFrameLoadDelegate:self]; [self addSubview:webView]; diff --git a/build/Release/Web.saver/Contents/Info.plist b/build/Release/Web.saver/Contents/Info.plist deleted file mode 100644 index badf820..0000000 --- a/build/Release/Web.saver/Contents/Info.plist +++ /dev/null @@ -1,42 +0,0 @@ - - - - - BuildMachineOSBuild - 12C3012 - CFBundleDevelopmentRegion - English - CFBundleExecutable - Web - CFBundleIdentifier - com.yourcompany.Web - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Web - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - DTCompiler - - DTPlatformBuild - 4G2008a - DTPlatformVersion - GM - DTSDKBuild - 12C37 - DTSDKName - macosx10.8 - DTXcode - 0452 - DTXcodeBuild - 4G2008a - NSPrincipalClass - WebSaverView - - diff --git a/build/Release/Web.saver/Contents/MacOS/Web b/build/Release/Web.saver/Contents/MacOS/Web deleted file mode 100755 index b1c6499..0000000 Binary files a/build/Release/Web.saver/Contents/MacOS/Web and /dev/null differ diff --git a/thumbnail.png b/thumbnail.png new file mode 100644 index 0000000..d3dbba7 Binary files /dev/null and b/thumbnail.png differ diff --git a/thumbnail@2x.png b/thumbnail@2x.png new file mode 100644 index 0000000..65ce3e9 Binary files /dev/null and b/thumbnail@2x.png differ