Permalink
Browse files

Updated rentzch's <7c9b8dc3719e8ba2d9d5f5014c04f9b4cc879ef2> w/ chang…

…es from the latest deSIFR <eb78a852e9c403f50ca5a00683a77d0b6d046ab1>

Also, restored tgaul's tooltip for the sIFR label.
  • Loading branch information...
1 parent 7c9b8dc commit 376ed0c90dce18a0eb8673b336e03b51539af8d0 Ian Wessman committed Feb 10, 2009
Showing with 36 additions and 11 deletions.
  1. +0 −2 Plugin/ClickToFlash_Prefix.pch
  2. +28 −5 Plugin/English.lproj/WhitelistPanel.xib
  3. +8 −4 Plugin/Plugin.m
@@ -2,5 +2,3 @@
// Prefix header for all source files of the 'ClickToFlash' target in the 'ClickToFlash' project
//
-// enable/disable DE_SIFR
-#define DE_SIFR 1
@@ -407,11 +407,6 @@
<string key="NSFrameAutosaveName">ClickToFlash_settingsWindow</string>
</object>
<object class="NSUserDefaultsController" id="913882380">
- <object class="NSMutableArray" key="NSDeclaredKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>ClickToFlash_sifrMode</string>
- <string>ClickToFlash_sifrSupport</string>
- </object>
<bool key="NSSharedInstance">YES</bool>
</object>
<object class="NSArrayController" id="258102979">
@@ -826,6 +821,7 @@
<string>39.IBPluginDependency</string>
<string>4.IBPluginDependency</string>
<string>41.IBPluginDependency</string>
+ <string>86.IBAttributePlaceholdersKey</string>
<string>86.IBPluginDependency</string>
<string>87.IBPluginDependency</string>
<string>88.IBPluginDependency</string>
@@ -873,6 +869,14 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <object class="NSMutableDictionary">
+ <string key="NS.key.0">ToolTip</string>
+ <object class="IBToolTipAttribute" key="NS.object.0">
+ <string key="name">ToolTip</string>
+ <reference key="object" ref="44695623"/>
+ <string key="toolTip">sIFR (Scalable Inman Flash Replacement) replaces text on HTML pages with Flash equivalents to provide better typography.</string>
+ </object>
+ </object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -912,6 +916,25 @@
<object class="IBPartialClassDescription">
<string key="className">CTFWhitelistWindowController</string>
<string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addWhitelistSite:</string>
+ <string>removeWhitelistSite:</string>
+ <string>saveWhitelist:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">_controller</string>
+ <string key="NS.object.0">NSArrayController</string>
+ </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">Plugin/CTFWhitelistWindowController.h</string>
View
@@ -43,6 +43,7 @@ of this software and associated documentation files (the "Software"), to deal
// NSNotification names
NSString *sCTFWhitelistAdditionMade = @"CTFWhitelistAdditionMade";
+static NSString *sSifrSupportDefaultsKey = @"ClickToFlash_sifrSupport";
static NSString *sSifrModeDefaultsKey = @"ClickToFlash_sifrMode";
static NSString *sSifr2Test = @"sIFR != null && typeof sIFR == \"function\"";
static NSString *sSifr3Test = @"sIFR != null && typeof sIFR == \"object\"";
@@ -53,7 +54,6 @@ of this software and associated documentation files (the "Software"), to deal
typedef enum
{
- CTFSifrModeDoNothing = 0,
CTFSifrModeAllowSifr = 1,
CTFSifrModeDeSifr = 2
} CTFSifrMode;
@@ -125,7 +125,7 @@ - (id) initWithArguments:(NSDictionary *)arguments
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
// out-of-the-box, ignore sIFR
- NSDictionary *baseDefaults = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:CTFSifrModeDoNothing] forKey:sSifrModeDefaultsKey];
+ NSDictionary *baseDefaults = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:false] forKey:sSifrSupportDefaultsKey];
self.webView = [[[arguments objectForKey:WebPlugInContainerKey] webFrame] webView];
@@ -151,13 +151,13 @@ - (id) initWithArguments:(NSDictionary *)arguments
NSString* classValue = [[arguments objectForKey: WebPlugInAttributesKey] objectForKey: @"class"];
NSString* sifrValue = [[arguments objectForKey: WebPlugInAttributesKey] objectForKey: @"sifr"];
if ([classValue isEqualToString: @"sIFR-flash"] || (sifrValue && [sifrValue boolValue])) {
- if([userDefaults integerForKey: sSifrModeDefaultsKey] == CTFSifrModeAllowSifr)
+ if([userDefaults boolForKey:sSifrSupportDefaultsKey] && [userDefaults integerForKey: sSifrModeDefaultsKey] == CTFSifrModeAllowSifr)
loadFromWhiteList = true;
else
_isSifr = true;
}
- if( !loadFromWhiteList && _isSifr && [userDefaults integerForKey: sSifrModeDefaultsKey] == CTFSifrModeDeSifr )
+ if( !loadFromWhiteList && _isSifr && [userDefaults boolForKey:sSifrSupportDefaultsKey] && [userDefaults integerForKey: sSifrModeDefaultsKey] == CTFSifrModeDeSifr )
{
_sifrVersion = [self _sifrVersionInstalled];
@@ -253,6 +253,10 @@ - (void) dealloc
[_flashVars release];
[[NSNotificationCenter defaultCenter] removeObserver: self];
+#if LOGGING_ENABLED
+ NSLog(@"ClickToFlash:\tdealloc");
+#endif
+
[super dealloc];
}

0 comments on commit 376ed0c

Please sign in to comment.