Skip to content

Commit

Permalink
committed all modified files, not just new ones
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan 'Wolf' Rentzsch <[email protected]>
  • Loading branch information
bengottlieb authored and rentzsch committed Feb 10, 2009
1 parent 4e01368 commit d193a72
Show file tree
Hide file tree
Showing 5 changed files with 366 additions and 122 deletions.
126 changes: 126 additions & 0 deletions ClickToFlash.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
6953E43C0F3EDEB50014ECF7 /* MenubarMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6953E43A0F3EDEB50014ECF7 /* MenubarMenu.xib */; };
69A26D0C0F302C10006648BC /* NSBezierPath-RoundedRectangle.m in Sources */ = {isa = PBXBuildFile; fileRef = 69A26D0B0F302C10006648BC /* NSBezierPath-RoundedRectangle.m */; };
79A21C4D0F30B735009424B8 /* CTFWhitelistWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */; };
B5028E930F413553004886D7 /* HarnessAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B5028E910F413553004886D7 /* HarnessAppDelegate.m */; };
B5CFF17A0F40EEF1005DB9CC /* WhitelistPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 072189BC0F30D9C3008C8944 /* WhitelistPanel.xib */; };
B5CFF1870F40F000005DB9CC /* HarnessMain.xib in Resources */ = {isa = PBXBuildFile; fileRef = B5CFF1860F40F000005DB9CC /* HarnessMain.xib */; };
B5CFF18A0F40F013005DB9CC /* CTFWhitelistWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */; };
B5CFF1AE0F40F070005DB9CC /* HarnessMain.m in Sources */ = {isa = PBXBuildFile; fileRef = B5CFF1AD0F40F070005DB9CC /* HarnessMain.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -104,6 +109,12 @@
69A26D0B0F302C10006648BC /* NSBezierPath-RoundedRectangle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSBezierPath-RoundedRectangle.m"; path = "Plugin/NSBezierPath-RoundedRectangle.m"; 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>"; };
B5028E910F413553004886D7 /* HarnessAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HarnessAppDelegate.m; path = "TestFiles/Debugging Harness/HarnessAppDelegate.m"; sourceTree = "<group>"; };
B5028E920F413553004886D7 /* HarnessAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HarnessAppDelegate.h; path = "TestFiles/Debugging Harness/HarnessAppDelegate.h"; sourceTree = "<group>"; };
B5CFF1740F40EEDB005DB9CC /* Whitelist Panel Harness.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Whitelist Panel Harness.app"; sourceTree = BUILT_PRODUCTS_DIR; };
B5CFF1860F40F000005DB9CC /* HarnessMain.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = HarnessMain.xib; path = "TestFiles/Debugging Harness/HarnessMain.xib"; sourceTree = "<group>"; };
B5CFF1AB0F40F064005DB9CC /* Harness-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Harness-Info.plist"; path = "TestFiles/Debugging Harness/Harness-Info.plist"; sourceTree = "<group>"; };
B5CFF1AD0F40F070005DB9CC /* HarnessMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HarnessMain.m; path = "TestFiles/Debugging Harness/HarnessMain.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -124,6 +135,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
B5CFF1720F40EEDB005DB9CC /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -142,6 +160,7 @@
55EB70300E04A8410016593D = {
isa = PBXGroup;
children = (
B5CFF1810F40EF98005DB9CC /* Debugging Harness */,
55EB70540E04A89C0016593D /* Plugin */,
558405520E0F2C2200EA991B /* Installer */,
55EB70550E04A8A40016593D /* Frameworks */,
Expand All @@ -154,6 +173,7 @@
children = (
55EB70420E04A8640016593D /* ClickToFlash.plugin */,
558405610E0F2DE900EA991B /* Install ClickToFlash.app */,
B5CFF1740F40EEDB005DB9CC /* Whitelist Panel Harness.app */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -186,6 +206,18 @@
name = Frameworks;
sourceTree = "<group>";
};
B5CFF1810F40EF98005DB9CC /* Debugging Harness */ = {
isa = PBXGroup;
children = (
B5CFF1AD0F40F070005DB9CC /* HarnessMain.m */,
B5CFF1AB0F40F064005DB9CC /* Harness-Info.plist */,
B5CFF1860F40F000005DB9CC /* HarnessMain.xib */,
B5028E910F413553004886D7 /* HarnessAppDelegate.m */,
B5028E920F413553004886D7 /* HarnessAppDelegate.h */,
);
name = "Debugging Harness";
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -224,6 +256,23 @@
productReference = 55EB70420E04A8640016593D /* ClickToFlash.plugin */;
productType = "com.apple.product-type.bundle";
};
B5CFF1730F40EEDB005DB9CC /* Whitelist Panel Harness */ = {
isa = PBXNativeTarget;
buildConfigurationList = B5CFF1790F40EEDC005DB9CC /* Build configuration list for PBXNativeTarget "Whitelist Panel Harness" */;
buildPhases = (
B5CFF1700F40EEDB005DB9CC /* Resources */,
B5CFF1710F40EEDB005DB9CC /* Sources */,
B5CFF1720F40EEDB005DB9CC /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = "Whitelist Panel Harness";
productName = "Whitelist Panel Harness";
productReference = B5CFF1740F40EEDB005DB9CC /* Whitelist Panel Harness.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand All @@ -241,6 +290,7 @@
558405600E0F2DE900EA991B /* Install ClickToFlash */,
5584067D0E0F371E00EA991B /* Create Zip */,
2B9260570F36854B000F1583 /* Install plugin for user */,
B5CFF1730F40EEDB005DB9CC /* Whitelist Panel Harness */,
);
};
/* End PBXProject section */
Expand All @@ -266,6 +316,15 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
B5CFF1700F40EEDB005DB9CC /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B5CFF17A0F40EEF1005DB9CC /* WhitelistPanel.xib in Resources */,
B5CFF1870F40F000005DB9CC /* HarnessMain.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -317,6 +376,16 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
B5CFF1710F40EEDB005DB9CC /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B5CFF18A0F40F013005DB9CC /* CTFWhitelistWindowController.m in Sources */,
B5CFF1AE0F40F070005DB9CC /* HarnessMain.m in Sources */,
B5028E930F413553004886D7 /* HarnessAppDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
Expand Down Expand Up @@ -550,6 +619,54 @@
};
name = Release;
};
B5CFF1770F40EEDC005DB9CC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
INFOPLIST_FILE = "TestFiles/Debugging Harness/Harness-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
OTHER_LDFLAGS = (
"-framework",
Foundation,
"-framework",
AppKit,
);
PREBINDING = NO;
PRODUCT_NAME = "Whitelist Panel Harness";
};
name = Debug;
};
B5CFF1780F40EEDC005DB9CC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
INFOPLIST_FILE = "Whitelist Panel Harness-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
OTHER_LDFLAGS = (
"-framework",
Foundation,
"-framework",
AppKit,
);
PREBINDING = NO;
PRODUCT_NAME = "Whitelist Panel Harness";
ZERO_LINK = NO;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand Down Expand Up @@ -598,6 +715,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B5CFF1790F40EEDC005DB9CC /* Build configuration list for PBXNativeTarget "Whitelist Panel Harness" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B5CFF1770F40EEDC005DB9CC /* Debug */,
B5CFF1780F40EEDC005DB9CC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 55EB70320E04A8410016593D /* Project object */;
Expand Down
9 changes: 8 additions & 1 deletion Plugin/CTFWhitelistWindowController.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@


@interface CTFWhitelistWindowController : NSWindowController {

IBOutlet NSArrayController *_controller;
NSMutableArray *_sites;
}

- (IBAction) addWhitelistSite: (id) sender;
- (IBAction) removeWhitelistSite: (id) sender;

- (void) saveWhitelist: (id) sender;
- (void) whitelistChanged: (NSNotification *) note;
@end

57 changes: 56 additions & 1 deletion Plugin/CTFWhitelistWindowController.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#import "CTFWhitelistWindowController.h"

extern NSString *sHostWhitelistDefaultsKey;
extern NSString *sCTFWhitelistAdditionMade;

@implementation CTFWhitelistWindowController

Expand All @@ -13,8 +15,61 @@ - (id)init
return nil;
}

self = [super initWithWindowNibPath:nibPath owner:self];
self = [super initWithWindowNibPath: nibPath owner: self];

[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(whitelistChanged:) name: sCTFWhitelistAdditionMade object: nil];
_sites = [[NSMutableArray array] retain];

[self whitelistChanged: nil];

return self;
}

- (void) dealloc {
[_sites release];
[super dealloc];
}

- (void) whitelistChanged: (NSNotification *) note {
NSArray *currentSites = [[NSUserDefaults standardUserDefaults] valueForKey: sHostWhitelistDefaultsKey];
NSEnumerator *enumerator = [currentSites objectEnumerator];
NSString *site;

[_sites removeAllObjects];

while (site = [enumerator nextObject]) {
[_sites addObject: [NSMutableDictionary dictionaryWithObject: site forKey: @"description"]];
}
[_controller setContent: _sites];
}

- (IBAction) removeWhitelistSite: (id) sender {
[_controller remove: nil];
[self saveWhitelist: nil];
}

- (IBAction) addWhitelistSite: (id) sender {
[_controller insertObject: [NSMutableDictionary dictionaryWithObject: @"" forKey: @"description"] atArrangedObjectIndex: _sites.count];
[_controller setSelectionIndex: _sites.count - 1];
[self saveWhitelist: nil];
}

- (void) saveWhitelist: (id) sender {
NSMutableArray *sites = [NSMutableArray array];
NSEnumerator *enumerator = [_sites objectEnumerator];
NSDictionary *site;

while (site = [enumerator nextObject]) {
[sites addObject: [site valueForKey: @"description"]];
}

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

[defaults setValue: sites forKey: sHostWhitelistDefaultsKey];
}

- (void) windowWillClose: (NSNotification *) notification {
[self saveWhitelist: nil];
}

@end
Loading

0 comments on commit d193a72

Please sign in to comment.