Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a custom NSActionTemplate image derived from the Cocotron project…

…, with thanks to Math Campbell (www.mathcampbell.co.uk), for pre 10.5 systems.
  • Loading branch information...
commit 0e28fe15bd93b3adcb9ef86c00a21e14b5e48b79 1 parent 909dbed
@mbaltaks mbaltaks authored
View
4 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 = "<group>"; };
0038DE230FC0CCF0007B54E9 /* MATrackingArea.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MATrackingArea.m; sourceTree = "<group>"; };
0038DE310FC0CE7B007B54E9 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+ 00FBE92E0FCD68CE00BC0995 /* NSActionTemplate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = NSActionTemplate.png; sourceTree = "<group>"; };
072189BB0F30D9C3008C8944 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Plugin/English.lproj/ContextualMenu.xib; sourceTree = "<group>"; };
072189BD0F30D9C3008C8944 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Plugin/English.lproj/WhitelistPanel.xib; sourceTree = "<group>"; };
55EB703C0E04A84F0016593D /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Plugin.h; path = Plugin/Plugin.h; sourceTree = "<group>"; };
@@ -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;
};
View
BIN  NSActionTemplate.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
6 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 ];
Please sign in to comment.
Something went wrong with that request. Please try again.