Permalink
Browse files

[NEW] Contextual menu and basic whitelist editor. (Dave Dribin)

  • Loading branch information...
rentzsch committed Jan 28, 2009
1 parent da72348 commit 048ed1f3f344f94b080fdd06802ed53b727d6ef5
@@ -24,14 +24,16 @@
/* Begin PBXBuildFile section */
558405550E0F2C2B00EA991B /* CTFInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 558405540E0F2C2B00EA991B /* CTFInstaller.m */; };
- 558405570E0F2C4900EA991B /* Installer.xib in Resources */ = {isa = PBXBuildFile; fileRef = 558405560E0F2C4900EA991B /* Installer.xib */; };
558405690E0F2DFA00EA991B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EB70560E04A8B80016593D /* Cocoa.framework */; };
5584056B0E0F2DFE00EA991B /* CTFInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 558405540E0F2C2B00EA991B /* CTFInstaller.m */; };
5584056C0E0F2E0100EA991B /* Installer.xib in Resources */ = {isa = PBXBuildFile; fileRef = 558405560E0F2C4900EA991B /* Installer.xib */; };
5584064B0E0F35A000EA991B /* ClickToFlash.plugin in Resources */ = {isa = PBXBuildFile; fileRef = 55EB70420E04A8640016593D /* ClickToFlash.plugin */; };
55EB70480E04A8850016593D /* Plugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 55EB703D0E04A84F0016593D /* Plugin.m */; };
55EB70580E04A8B80016593D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EB70560E04A8B80016593D /* Cocoa.framework */; };
55EB70590E04A8B80016593D /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EB70570E04A8B80016593D /* WebKit.framework */; };
+ 79A21C4B0F30B735009424B8 /* ContextualMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 79A21C470F30B735009424B8 /* ContextualMenu.xib */; };
+ 79A21C4C0F30B735009424B8 /* WhitelistPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 79A21C480F30B735009424B8 /* WhitelistPanel.xib */; };
+ 79A21C4D0F30B735009424B8 /* CTFWhitelistWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */; };
D0FB700F0F2FE35000DCB854 /* ContainerImage.png in Resources */ = {isa = PBXBuildFile; fileRef = D0FB700E0F2FE35000DCB854 /* ContainerImage.png */; };
D0FB70100F2FE35000DCB854 /* ContainerImage.png in Resources */ = {isa = PBXBuildFile; fileRef = D0FB700E0F2FE35000DCB854 /* ContainerImage.png */; };
/* End PBXBuildFile section */
@@ -72,6 +74,10 @@
55EB70560E04A8B80016593D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
55EB70570E04A8B80016593D /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
55EB70610E04A8D00016593D /* Info-Plugin.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Info-Plugin.plist"; path = "Plugin/Info-Plugin.plist"; sourceTree = "<group>"; };
+ 79A21C470F30B735009424B8 /* ContextualMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ContextualMenu.xib; path = Plugin/ContextualMenu.xib; sourceTree = "<group>"; };
+ 79A21C480F30B735009424B8 /* WhitelistPanel.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = WhitelistPanel.xib; path = Plugin/WhitelistPanel.xib; sourceTree = "<group>"; };
+ 79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CTFWhitelistWindowController.m; path = Plugin/CTFWhitelistWindowController.m; sourceTree = "<group>"; };
+ 79A21C4A0F30B735009424B8 /* CTFWhitelistWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CTFWhitelistWindowController.h; path = Plugin/CTFWhitelistWindowController.h; sourceTree = "<group>"; };
D0FB700E0F2FE35000DCB854 /* ContainerImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ContainerImage.png; path = Images/ContainerImage.png; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -133,6 +139,10 @@
55EB703C0E04A84F0016593D /* Plugin.h */,
55EB703D0E04A84F0016593D /* Plugin.m */,
55EB70610E04A8D00016593D /* Info-Plugin.plist */,
+ 79A21C470F30B735009424B8 /* ContextualMenu.xib */,
+ 79A21C480F30B735009424B8 /* WhitelistPanel.xib */,
+ 79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */,
+ 79A21C4A0F30B735009424B8 /* CTFWhitelistWindowController.h */,
);
name = "Plug-in";
sourceTree = "<group>";
@@ -219,8 +229,9 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 558405570E0F2C4900EA991B /* Installer.xib in Resources */,
D0FB700F0F2FE35000DCB854 /* ContainerImage.png in Resources */,
+ 79A21C4B0F30B735009424B8 /* ContextualMenu.xib in Resources */,
+ 79A21C4C0F30B735009424B8 /* WhitelistPanel.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -257,6 +268,7 @@
files = (
55EB70480E04A8850016593D /* Plugin.m in Sources */,
558405550E0F2C2B00EA991B /* CTFInstaller.m in Sources */,
+ 79A21C4D0F30B735009424B8 /* CTFWhitelistWindowController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -0,0 +1,8 @@
+#import <Cocoa/Cocoa.h>
+
+
+@interface CTFWhitelistWindowController : NSWindowController {
+
+}
+
+@end
@@ -0,0 +1,20 @@
+#import "CTFWhitelistWindowController.h"
+
+
+@implementation CTFWhitelistWindowController
+
+- (id)init
+{
+ NSBundle * myBundle = [NSBundle bundleForClass:[self class]];
+ NSString * nibPath = [myBundle pathForResource:@"WhitelistPanel" ofType:@"nib"];
+ if (nibPath == nil)
+ {
+ [self dealloc];
+ return nil;
+ }
+
+ self = [super initWithWindowNibPath:nibPath owner:self];
+ return self;
+}
+
+@end
View
@@ -0,0 +1,290 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.02">
+ <data>
+ <int key="IBDocument.SystemTarget">1050</int>
+ <string key="IBDocument.SystemVersion">9G55</string>
+ <string key="IBDocument.InterfaceBuilderVersion">672</string>
+ <string key="IBDocument.AppKitVersion">949.43</string>
+ <string key="IBDocument.HIToolboxVersion">353.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="14"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilderKit</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="1001">
+ <string key="NSClassName">CTFClickToFlashPlugin</string>
+ </object>
+ <object class="NSCustomObject" id="1003">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="1004">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSMenu" id="93442052">
+ <string key="NSTitle"/>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="975793511">
+ <reference key="NSMenu" ref="93442052"/>
+ <string key="NSTitle">Load Flash</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <object class="NSCustomResource" key="NSOnImage" id="121969399">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuCheckmark</string>
+ </object>
+ <object class="NSCustomResource" key="NSMixedImage" id="575759592">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuMixedState</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="1047744293">
+ <reference key="NSMenu" ref="93442052"/>
+ <string key="NSTitle">Add to whitelist...</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="121969399"/>
+ <reference key="NSMixedImage" ref="575759592"/>
+ </object>
+ <object class="NSMenuItem" id="1001518375">
+ <reference key="NSMenu" ref="93442052"/>
+ <bool key="NSIsAlternate">YES</bool>
+ <string key="NSTitle">Add to whitelist</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">524288</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="121969399"/>
+ <reference key="NSMixedImage" ref="575759592"/>
+ </object>
+ <object class="NSMenuItem" id="660793203">
+ <reference key="NSMenu" ref="93442052"/>
+ <string key="NSTitle">Remove from whitelist...</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="121969399"/>
+ <reference key="NSMixedImage" ref="575759592"/>
+ </object>
+ <object class="NSMenuItem" id="831790790">
+ <reference key="NSMenu" ref="93442052"/>
+ <string key="NSTitle">Edit whitelist...</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="121969399"/>
+ <reference key="NSMixedImage" ref="575759592"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">addToWhitelist:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1047744293"/>
+ </object>
+ <int key="connectionID">5</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">editWhitelist:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="831790790"/>
+ </object>
+ <int key="connectionID">6</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">menu</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="93442052"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">loadFlash:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="975793511"/>
+ </object>
+ <int key="connectionID">11</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">removeFromWhitelist:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="660793203"/>
+ </object>
+ <int key="connectionID">13</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">addToWhitelist:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1001518375"/>
+ </object>
+ <int key="connectionID">15</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="1002">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="1001"/>
+ <reference key="parent" ref="1002"/>
+ <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="1003"/>
+ <reference key="parent" ref="1002"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="1004"/>
+ <reference key="parent" ref="1002"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="93442052"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1047744293"/>
+ <reference ref="831790790"/>
+ <reference ref="975793511"/>
+ <reference ref="660793203"/>
+ <reference ref="1001518375"/>
+ </object>
+ <reference key="parent" ref="1002"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="1047744293"/>
+ <reference key="parent" ref="93442052"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="831790790"/>
+ <reference key="parent" ref="93442052"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="975793511"/>
+ <reference key="parent" ref="93442052"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="660793203"/>
+ <reference key="parent" ref="93442052"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">14</int>
+ <reference key="object" ref="1001518375"/>
+ <reference key="parent" ref="93442052"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.IBPluginDependency</string>
+ <string>-2.IBPluginDependency</string>
+ <string>-3.IBPluginDependency</string>
+ <string>1.IBEditorWindowLastContentRect</string>
+ <string>1.IBPluginDependency</string>
+ <string>10.IBPluginDependency</string>
+ <string>12.IBPluginDependency</string>
+ <string>14.IBPluginDependency</string>
+ <string>2.IBPluginDependency</string>
+ <string>3.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilderKit</string>
+ <string>com.apple.InterfaceBuilderKit</string>
+ <string>{{389, 403}, {234, 103}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">15</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">CTFClickToFlashPlugin</string>
+ <string key="superclassName">NSView</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addToWhitelist:</string>
+ <string>editWhitelist:</string>
+ <string>loadFlash:</string>
+ <string>removeFromWhitelist:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Plugin/Plugin.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../ClickToFlash.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>
Oops, something went wrong.

0 comments on commit 048ed1f

Please sign in to comment.