Skip to content

Commit d193a72

Browse files
bengottliebrentzsch
authored andcommitted
committed all modified files, not just new ones
Signed-off-by: Jonathan 'Wolf' Rentzsch <[email protected]>
1 parent 4e01368 commit d193a72

File tree

5 files changed

+366
-122
lines changed

5 files changed

+366
-122
lines changed

ClickToFlash.xcodeproj/project.pbxproj

+126
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
6953E43C0F3EDEB50014ECF7 /* MenubarMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6953E43A0F3EDEB50014ECF7 /* MenubarMenu.xib */; };
5050
69A26D0C0F302C10006648BC /* NSBezierPath-RoundedRectangle.m in Sources */ = {isa = PBXBuildFile; fileRef = 69A26D0B0F302C10006648BC /* NSBezierPath-RoundedRectangle.m */; };
5151
79A21C4D0F30B735009424B8 /* CTFWhitelistWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */; };
52+
B5028E930F413553004886D7 /* HarnessAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B5028E910F413553004886D7 /* HarnessAppDelegate.m */; };
53+
B5CFF17A0F40EEF1005DB9CC /* WhitelistPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 072189BC0F30D9C3008C8944 /* WhitelistPanel.xib */; };
54+
B5CFF1870F40F000005DB9CC /* HarnessMain.xib in Resources */ = {isa = PBXBuildFile; fileRef = B5CFF1860F40F000005DB9CC /* HarnessMain.xib */; };
55+
B5CFF18A0F40F013005DB9CC /* CTFWhitelistWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */; };
56+
B5CFF1AE0F40F070005DB9CC /* HarnessMain.m in Sources */ = {isa = PBXBuildFile; fileRef = B5CFF1AD0F40F070005DB9CC /* HarnessMain.m */; };
5257
/* End PBXBuildFile section */
5358

5459
/* Begin PBXContainerItemProxy section */
@@ -104,6 +109,12 @@
104109
69A26D0B0F302C10006648BC /* NSBezierPath-RoundedRectangle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSBezierPath-RoundedRectangle.m"; path = "Plugin/NSBezierPath-RoundedRectangle.m"; sourceTree = "<group>"; };
105110
79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CTFWhitelistWindowController.m; path = Plugin/CTFWhitelistWindowController.m; sourceTree = "<group>"; };
106111
79A21C4A0F30B735009424B8 /* CTFWhitelistWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CTFWhitelistWindowController.h; path = Plugin/CTFWhitelistWindowController.h; sourceTree = "<group>"; };
112+
B5028E910F413553004886D7 /* HarnessAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HarnessAppDelegate.m; path = "TestFiles/Debugging Harness/HarnessAppDelegate.m"; sourceTree = "<group>"; };
113+
B5028E920F413553004886D7 /* HarnessAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HarnessAppDelegate.h; path = "TestFiles/Debugging Harness/HarnessAppDelegate.h"; sourceTree = "<group>"; };
114+
B5CFF1740F40EEDB005DB9CC /* Whitelist Panel Harness.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Whitelist Panel Harness.app"; sourceTree = BUILT_PRODUCTS_DIR; };
115+
B5CFF1860F40F000005DB9CC /* HarnessMain.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = HarnessMain.xib; path = "TestFiles/Debugging Harness/HarnessMain.xib"; sourceTree = "<group>"; };
116+
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>"; };
117+
B5CFF1AD0F40F070005DB9CC /* HarnessMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HarnessMain.m; path = "TestFiles/Debugging Harness/HarnessMain.m"; sourceTree = "<group>"; };
107118
/* End PBXFileReference section */
108119

109120
/* Begin PBXFrameworksBuildPhase section */
@@ -124,6 +135,13 @@
124135
);
125136
runOnlyForDeploymentPostprocessing = 0;
126137
};
138+
B5CFF1720F40EEDB005DB9CC /* Frameworks */ = {
139+
isa = PBXFrameworksBuildPhase;
140+
buildActionMask = 2147483647;
141+
files = (
142+
);
143+
runOnlyForDeploymentPostprocessing = 0;
144+
};
127145
/* End PBXFrameworksBuildPhase section */
128146

129147
/* Begin PBXGroup section */
@@ -142,6 +160,7 @@
142160
55EB70300E04A8410016593D = {
143161
isa = PBXGroup;
144162
children = (
163+
B5CFF1810F40EF98005DB9CC /* Debugging Harness */,
145164
55EB70540E04A89C0016593D /* Plugin */,
146165
558405520E0F2C2200EA991B /* Installer */,
147166
55EB70550E04A8A40016593D /* Frameworks */,
@@ -154,6 +173,7 @@
154173
children = (
155174
55EB70420E04A8640016593D /* ClickToFlash.plugin */,
156175
558405610E0F2DE900EA991B /* Install ClickToFlash.app */,
176+
B5CFF1740F40EEDB005DB9CC /* Whitelist Panel Harness.app */,
157177
);
158178
name = Products;
159179
sourceTree = "<group>";
@@ -186,6 +206,18 @@
186206
name = Frameworks;
187207
sourceTree = "<group>";
188208
};
209+
B5CFF1810F40EF98005DB9CC /* Debugging Harness */ = {
210+
isa = PBXGroup;
211+
children = (
212+
B5CFF1AD0F40F070005DB9CC /* HarnessMain.m */,
213+
B5CFF1AB0F40F064005DB9CC /* Harness-Info.plist */,
214+
B5CFF1860F40F000005DB9CC /* HarnessMain.xib */,
215+
B5028E910F413553004886D7 /* HarnessAppDelegate.m */,
216+
B5028E920F413553004886D7 /* HarnessAppDelegate.h */,
217+
);
218+
name = "Debugging Harness";
219+
sourceTree = "<group>";
220+
};
189221
/* End PBXGroup section */
190222

191223
/* Begin PBXNativeTarget section */
@@ -224,6 +256,23 @@
224256
productReference = 55EB70420E04A8640016593D /* ClickToFlash.plugin */;
225257
productType = "com.apple.product-type.bundle";
226258
};
259+
B5CFF1730F40EEDB005DB9CC /* Whitelist Panel Harness */ = {
260+
isa = PBXNativeTarget;
261+
buildConfigurationList = B5CFF1790F40EEDC005DB9CC /* Build configuration list for PBXNativeTarget "Whitelist Panel Harness" */;
262+
buildPhases = (
263+
B5CFF1700F40EEDB005DB9CC /* Resources */,
264+
B5CFF1710F40EEDB005DB9CC /* Sources */,
265+
B5CFF1720F40EEDB005DB9CC /* Frameworks */,
266+
);
267+
buildRules = (
268+
);
269+
dependencies = (
270+
);
271+
name = "Whitelist Panel Harness";
272+
productName = "Whitelist Panel Harness";
273+
productReference = B5CFF1740F40EEDB005DB9CC /* Whitelist Panel Harness.app */;
274+
productType = "com.apple.product-type.application";
275+
};
227276
/* End PBXNativeTarget section */
228277

229278
/* Begin PBXProject section */
@@ -241,6 +290,7 @@
241290
558405600E0F2DE900EA991B /* Install ClickToFlash */,
242291
5584067D0E0F371E00EA991B /* Create Zip */,
243292
2B9260570F36854B000F1583 /* Install plugin for user */,
293+
B5CFF1730F40EEDB005DB9CC /* Whitelist Panel Harness */,
244294
);
245295
};
246296
/* End PBXProject section */
@@ -266,6 +316,15 @@
266316
);
267317
runOnlyForDeploymentPostprocessing = 0;
268318
};
319+
B5CFF1700F40EEDB005DB9CC /* Resources */ = {
320+
isa = PBXResourcesBuildPhase;
321+
buildActionMask = 2147483647;
322+
files = (
323+
B5CFF17A0F40EEF1005DB9CC /* WhitelistPanel.xib in Resources */,
324+
B5CFF1870F40F000005DB9CC /* HarnessMain.xib in Resources */,
325+
);
326+
runOnlyForDeploymentPostprocessing = 0;
327+
};
269328
/* End PBXResourcesBuildPhase section */
270329

271330
/* Begin PBXShellScriptBuildPhase section */
@@ -317,6 +376,16 @@
317376
);
318377
runOnlyForDeploymentPostprocessing = 0;
319378
};
379+
B5CFF1710F40EEDB005DB9CC /* Sources */ = {
380+
isa = PBXSourcesBuildPhase;
381+
buildActionMask = 2147483647;
382+
files = (
383+
B5CFF18A0F40F013005DB9CC /* CTFWhitelistWindowController.m in Sources */,
384+
B5CFF1AE0F40F070005DB9CC /* HarnessMain.m in Sources */,
385+
B5028E930F413553004886D7 /* HarnessAppDelegate.m in Sources */,
386+
);
387+
runOnlyForDeploymentPostprocessing = 0;
388+
};
320389
/* End PBXSourcesBuildPhase section */
321390

322391
/* Begin PBXTargetDependency section */
@@ -550,6 +619,54 @@
550619
};
551620
name = Release;
552621
};
622+
B5CFF1770F40EEDC005DB9CC /* Debug */ = {
623+
isa = XCBuildConfiguration;
624+
buildSettings = {
625+
ALWAYS_SEARCH_USER_PATHS = NO;
626+
COPY_PHASE_STRIP = NO;
627+
GCC_DYNAMIC_NO_PIC = NO;
628+
GCC_ENABLE_FIX_AND_CONTINUE = YES;
629+
GCC_MODEL_TUNING = G5;
630+
GCC_OPTIMIZATION_LEVEL = 0;
631+
GCC_PRECOMPILE_PREFIX_HEADER = YES;
632+
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
633+
INFOPLIST_FILE = "TestFiles/Debugging Harness/Harness-Info.plist";
634+
INSTALL_PATH = "$(HOME)/Applications";
635+
OTHER_LDFLAGS = (
636+
"-framework",
637+
Foundation,
638+
"-framework",
639+
AppKit,
640+
);
641+
PREBINDING = NO;
642+
PRODUCT_NAME = "Whitelist Panel Harness";
643+
};
644+
name = Debug;
645+
};
646+
B5CFF1780F40EEDC005DB9CC /* Release */ = {
647+
isa = XCBuildConfiguration;
648+
buildSettings = {
649+
ALWAYS_SEARCH_USER_PATHS = NO;
650+
COPY_PHASE_STRIP = YES;
651+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
652+
GCC_ENABLE_FIX_AND_CONTINUE = NO;
653+
GCC_MODEL_TUNING = G5;
654+
GCC_PRECOMPILE_PREFIX_HEADER = YES;
655+
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
656+
INFOPLIST_FILE = "Whitelist Panel Harness-Info.plist";
657+
INSTALL_PATH = "$(HOME)/Applications";
658+
OTHER_LDFLAGS = (
659+
"-framework",
660+
Foundation,
661+
"-framework",
662+
AppKit,
663+
);
664+
PREBINDING = NO;
665+
PRODUCT_NAME = "Whitelist Panel Harness";
666+
ZERO_LINK = NO;
667+
};
668+
name = Release;
669+
};
553670
/* End XCBuildConfiguration section */
554671

555672
/* Begin XCConfigurationList section */
@@ -598,6 +715,15 @@
598715
defaultConfigurationIsVisible = 0;
599716
defaultConfigurationName = Release;
600717
};
718+
B5CFF1790F40EEDC005DB9CC /* Build configuration list for PBXNativeTarget "Whitelist Panel Harness" */ = {
719+
isa = XCConfigurationList;
720+
buildConfigurations = (
721+
B5CFF1770F40EEDC005DB9CC /* Debug */,
722+
B5CFF1780F40EEDC005DB9CC /* Release */,
723+
);
724+
defaultConfigurationIsVisible = 0;
725+
defaultConfigurationName = Release;
726+
};
601727
/* End XCConfigurationList section */
602728
};
603729
rootObject = 55EB70320E04A8410016593D /* Project object */;

Plugin/CTFWhitelistWindowController.h

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22

33

44
@interface CTFWhitelistWindowController : NSWindowController {
5-
5+
IBOutlet NSArrayController *_controller;
6+
NSMutableArray *_sites;
67
}
78

9+
- (IBAction) addWhitelistSite: (id) sender;
10+
- (IBAction) removeWhitelistSite: (id) sender;
11+
12+
- (void) saveWhitelist: (id) sender;
13+
- (void) whitelistChanged: (NSNotification *) note;
814
@end
15+

Plugin/CTFWhitelistWindowController.m

+56-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#import "CTFWhitelistWindowController.h"
22

3+
extern NSString *sHostWhitelistDefaultsKey;
4+
extern NSString *sCTFWhitelistAdditionMade;
35

46
@implementation CTFWhitelistWindowController
57

@@ -13,8 +15,61 @@ - (id)init
1315
return nil;
1416
}
1517

16-
self = [super initWithWindowNibPath:nibPath owner:self];
18+
self = [super initWithWindowNibPath: nibPath owner: self];
19+
20+
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(whitelistChanged:) name: sCTFWhitelistAdditionMade object: nil];
21+
_sites = [[NSMutableArray array] retain];
22+
23+
[self whitelistChanged: nil];
24+
1725
return self;
1826
}
1927

28+
- (void) dealloc {
29+
[_sites release];
30+
[super dealloc];
31+
}
32+
33+
- (void) whitelistChanged: (NSNotification *) note {
34+
NSArray *currentSites = [[NSUserDefaults standardUserDefaults] valueForKey: sHostWhitelistDefaultsKey];
35+
NSEnumerator *enumerator = [currentSites objectEnumerator];
36+
NSString *site;
37+
38+
[_sites removeAllObjects];
39+
40+
while (site = [enumerator nextObject]) {
41+
[_sites addObject: [NSMutableDictionary dictionaryWithObject: site forKey: @"description"]];
42+
}
43+
[_controller setContent: _sites];
44+
}
45+
46+
- (IBAction) removeWhitelistSite: (id) sender {
47+
[_controller remove: nil];
48+
[self saveWhitelist: nil];
49+
}
50+
51+
- (IBAction) addWhitelistSite: (id) sender {
52+
[_controller insertObject: [NSMutableDictionary dictionaryWithObject: @"" forKey: @"description"] atArrangedObjectIndex: _sites.count];
53+
[_controller setSelectionIndex: _sites.count - 1];
54+
[self saveWhitelist: nil];
55+
}
56+
57+
- (void) saveWhitelist: (id) sender {
58+
NSMutableArray *sites = [NSMutableArray array];
59+
NSEnumerator *enumerator = [_sites objectEnumerator];
60+
NSDictionary *site;
61+
62+
while (site = [enumerator nextObject]) {
63+
[sites addObject: [site valueForKey: @"description"]];
64+
}
65+
66+
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
67+
68+
[defaults setValue: sites forKey: sHostWhitelistDefaultsKey];
69+
}
70+
71+
- (void) windowWillClose: (NSNotification *) notification {
72+
[self saveWhitelist: nil];
73+
}
74+
2075
@end

0 commit comments

Comments
 (0)