diff --git a/ClickToFlash.xcodeproj/project.pbxproj b/ClickToFlash.xcodeproj/project.pbxproj index d40fa754..298c3776 100755 --- a/ClickToFlash.xcodeproj/project.pbxproj +++ b/ClickToFlash.xcodeproj/project.pbxproj @@ -36,6 +36,7 @@ /* Begin PBXBuildFile section */ 0038DE240FC0CCF0007B54E9 /* MATrackingArea.m in Sources */ = {isa = PBXBuildFile; fileRef = 0038DE230FC0CCF0007B54E9 /* MATrackingArea.m */; }; 0038DE320FC0CE7B007B54E9 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0038DE310FC0CE7B007B54E9 /* Carbon.framework */; }; + 00FBE92F0FCD68CE00BC0995 /* NSActionTemplate.png in Resources */ = {isa = PBXBuildFile; fileRef = 00FBE92E0FCD68CE00BC0995 /* NSActionTemplate.png */; }; 072189BE0F30D9C3008C8944 /* ContextualMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 072189BA0F30D9C3008C8944 /* ContextualMenu.xib */; }; 072189BF0F30D9C3008C8944 /* WhitelistPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 072189BC0F30D9C3008C8944 /* WhitelistPanel.xib */; }; 55EB70480E04A8850016593D /* Plugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 55EB703D0E04A84F0016593D /* Plugin.m */; }; @@ -129,6 +130,7 @@ 0038DE220FC0CCF0007B54E9 /* MATrackingArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MATrackingArea.h; sourceTree = ""; }; 0038DE230FC0CCF0007B54E9 /* MATrackingArea.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MATrackingArea.m; sourceTree = ""; }; 0038DE310FC0CE7B007B54E9 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + 00FBE92E0FCD68CE00BC0995 /* NSActionTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = NSActionTemplate.png; sourceTree = ""; }; 072189BB0F30D9C3008C8944 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Plugin/English.lproj/ContextualMenu.xib; sourceTree = ""; }; 072189BD0F30D9C3008C8944 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Plugin/English.lproj/WhitelistPanel.xib; sourceTree = ""; }; 55EB703C0E04A84F0016593D /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Plugin.h; path = Plugin/Plugin.h; sourceTree = ""; }; @@ -239,6 +241,7 @@ 072189BC0F30D9C3008C8944 /* WhitelistPanel.xib */, D9FFA7650F3941C1008A8708 /* ClickToFlash_Prefix.pch */, A494CC2B0F9F2446007D5EEB /* ctf.icns */, + 00FBE92E0FCD68CE00BC0995 /* NSActionTemplate.png */, D9566C2B0F37EA0800358646 /* deSIFR Resources */, 79E2EB910F86AAD3005CF170 /* SparkleManager.h */, 79E2EB920F86AAD3005CF170 /* SparkleManager.m */, @@ -397,6 +400,7 @@ 072189BF0F30D9C3008C8944 /* WhitelistPanel.xib in Resources */, 6953E43C0F3EDEB50014ECF7 /* MenubarMenu.xib in Resources */, A494CC2C0F9F2446007D5EEB /* ctf.icns in Resources */, + 00FBE92F0FCD68CE00BC0995 /* NSActionTemplate.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/NSActionTemplate.png b/NSActionTemplate.png new file mode 100644 index 00000000..3e8071f5 Binary files /dev/null and b/NSActionTemplate.png differ diff --git a/Plugin/Plugin.m b/Plugin/Plugin.m index 639579b3..8b3cbc79 100755 --- a/Plugin/Plugin.m +++ b/Plugin/Plugin.m @@ -690,6 +690,12 @@ - (void) _drawGearIcon float margin = 5.0; NSImage *gearImage = [NSImage imageNamed:@"NSActionTemplate"]; + // On systems older than 10.5 we need to supply our own image. + if (gearImage == nil) + { + NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"NSActionTemplate" ofType:@"png"]; + gearImage = [[[NSImage alloc] initWithContentsOfFile:path] autorelease]; + } if( gearImage ) { CGContextRef context = [ [ NSGraphicsContext currentContext ] graphicsPort ];