Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added buttons in settings panel to allow for manual update checking

Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information...
commit 194f2dc1a8da91298d2e79fb426b60ecf4205d2a 1 parent 59edd69
Simone Manganelli authored committed
View
3  Plugin/CTFWhitelistWindowController.h
@@ -1,9 +1,12 @@
#import <Cocoa/Cocoa.h>
+extern NSString* kCTFCheckForUpdates;
@interface CTFWhitelistWindowController : NSWindowController {
IBOutlet NSArrayController *_controller;
}
+- (IBAction)checkForUpdates:(id)sender;
+
@end
View
16 Plugin/CTFWhitelistWindowController.m
@@ -1,4 +1,7 @@
#import "CTFWhitelistWindowController.h"
+#import <Sparkle/Sparkle.h>
+
+NSString *kCTFCheckForUpdates = @"CTFCheckForUpdates";
@implementation CTFWhitelistWindowController
@@ -16,4 +19,17 @@ - (id)init
return self;
}
+- (IBAction)checkForUpdates:(id)sender;
+{
+ // this code is put here, because if it's code that's owned by the plugin object, then initiating
+ // an update will silently fail when no ClickToFlash view is loaded; putting it in the whitelist window
+ // object allows Sparkle to always check for updates
+
+ NSBundle *clickToFlashBundle = [NSBundle bundleWithIdentifier:@"com.github.rentzsch.clicktoflash"];
+ NSAssert(clickToFlashBundle, nil);
+ SUUpdater *updater = [SUUpdater updaterForBundle:clickToFlashBundle];
+ NSAssert(updater, nil);
+ [updater checkForUpdates:self];
+}
+
@end
View
303 Plugin/English.lproj/WhitelistPanel.xib
@@ -8,7 +8,6 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="2"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -38,13 +37,13 @@
<object class="NSWindowTemplate" id="1005">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{80, 343}, {527, 360}}</string>
+ <string key="NSWindowRect">{{80, 276}, {527, 427}}</string>
<int key="NSWTFlags">-534248448</int>
<string type="base64-UTF8" key="NSWindowTitle">Q2xpY2sgdG8gRmxhc2gg4oCUIFNldHRpbmdzA</string>
<string key="NSWindowClass">NSPanel</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
- <string key="NSWindowContentMinSize">{420, 250}</string>
+ <string key="NSWindowContentMinSize">{420, 350}</string>
<object class="NSView" key="NSWindowView" id="1006">
<reference key="NSNextResponder"/>
<int key="NSvFlags">274</int>
@@ -65,12 +64,14 @@
<int key="NSvFlags">4352</int>
<string key="NSFrameSize">{485, 151}</string>
<reference key="NSSuperview" ref="769633510"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTableHeaderView" key="NSHeaderView" id="936086174">
<reference key="NSNextResponder" ref="981752289"/>
<int key="NSvFlags">256</int>
<string key="NSFrameSize">{485, 17}</string>
<reference key="NSSuperview" ref="981752289"/>
+ <reference key="NSWindow"/>
<reference key="NSTableView" ref="863640153"/>
</object>
<object class="_NSCornerView" key="NSCornerView" id="929019191">
@@ -78,6 +79,7 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-26, 0}, {16, 17}}</string>
<reference key="NSSuperview" ref="510641939"/>
+ <reference key="NSWindow"/>
</object>
<object class="NSMutableArray" key="NSTableColumns">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -89,7 +91,7 @@
<int key="NSCellFlags">75628032</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Whitelisted Sites</string>
- <object class="NSFont" key="NSSupport">
+ <object class="NSFont" key="NSSupport" id="26">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">1.100000e+01</double>
<int key="NSfFlags">3100</int>
@@ -163,6 +165,7 @@
</object>
<string key="NSFrame">{{1, 17}, {485, 151}}</string>
<reference key="NSSuperview" ref="510641939"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="863640153"/>
<reference key="NSDocView" ref="863640153"/>
<reference key="NSBGColor" ref="293857357"/>
@@ -173,6 +176,7 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{471, 17}, {15, 152}}</string>
<reference key="NSSuperview" ref="510641939"/>
+ <reference key="NSWindow"/>
<reference key="NSTarget" ref="510641939"/>
<string key="NSAction">_doScroller:</string>
<double key="NSCurValue">3.700000e+01</double>
@@ -183,6 +187,7 @@
<int key="NSvFlags">256</int>
<string key="NSFrame">{{-100, -100}, {450, 15}}</string>
<reference key="NSSuperview" ref="510641939"/>
+ <reference key="NSWindow"/>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="510641939"/>
<string key="NSAction">_doScroller:</string>
@@ -197,6 +202,7 @@
</object>
<string key="NSFrame">{{1, 0}, {485, 17}}</string>
<reference key="NSSuperview" ref="510641939"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="936086174"/>
<reference key="NSDocView" ref="936086174"/>
<reference key="NSBGColor" ref="293857357"/>
@@ -204,8 +210,9 @@
</object>
<reference ref="929019191"/>
</object>
- <string key="NSFrame">{{20, 41}, {487, 169}}</string>
+ <string key="NSFrame">{{20, 47}, {487, 169}}</string>
<reference key="NSSuperview" ref="1006"/>
+ <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="769633510"/>
<int key="NSsFlags">530</int>
<reference key="NSVScroller" ref="839140272"/>
@@ -218,8 +225,9 @@
<object class="NSButton" id="43744226">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{48, 13}, {29, 26}}</string>
+ <string key="NSFrame">{{48, 19}, {29, 26}}</string>
<reference key="NSSuperview" ref="1006"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="13544439">
<int key="NSCellFlags">67239424</int>
@@ -242,8 +250,9 @@
<object class="NSButton" id="241393621">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">292</int>
- <string key="NSFrame">{{20, 13}, {29, 26}}</string>
+ <string key="NSFrame">{{20, 19}, {29, 26}}</string>
<reference key="NSSuperview" ref="1006"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="811527510">
<int key="NSCellFlags">67239424</int>
@@ -262,8 +271,9 @@
<object class="NSTextField" id="513114676">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">289</int>
- <string key="NSFrame">{{227, 14}, {283, 17}}</string>
+ <string key="NSFrame">{{227, 20}, {283, 17}}</string>
<reference key="NSSuperview" ref="1006"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="363160467">
<int key="NSCellFlags">67239424</int>
@@ -288,8 +298,9 @@
<object class="NSButton" id="619486495">
<reference key="NSNextResponder" ref="235344690"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{93, 104}, {236, 18}}</string>
+ <string key="NSFrame">{{93, 169}, {286, 18}}</string>
<reference key="NSSuperview" ref="235344690"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="356052318">
<int key="NSCellFlags">-2080244224</int>
@@ -319,8 +330,9 @@
<object class="NSButton" id="90714319">
<reference key="NSNextResponder" ref="235344690"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{93, 84}, {271, 18}}</string>
+ <string key="NSFrame">{{93, 149}, {286, 18}}</string>
<reference key="NSSuperview" ref="235344690"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="688316371">
<int key="NSCellFlags">-2080244224</int>
@@ -341,8 +353,9 @@
<object class="NSTextField" id="972818591">
<reference key="NSNextResponder" ref="235344690"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{26, 105}, {58, 17}}</string>
+ <string key="NSFrame">{{17, 170}, {67, 17}}</string>
<reference key="NSSuperview" ref="235344690"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1061234246">
<int key="NSCellFlags">68288064</int>
@@ -357,8 +370,9 @@
<object class="NSMatrix" id="211748724">
<reference key="NSNextResponder" ref="235344690"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{93, 9}, {285, 58}}</string>
+ <string key="NSFrame">{{93, 74}, {285, 58}}</string>
<reference key="NSSuperview" ref="235344690"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<int key="NSNumRows">3</int>
<int key="NSNumCols">1</int>
@@ -628,8 +642,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="1020124743">
<reference key="NSNextResponder" ref="235344690"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 50}, {67, 17}}</string>
+ <string key="NSFrame">{{17, 115}, {67, 17}}</string>
<reference key="NSSuperview" ref="235344690"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="393278813">
<int key="NSCellFlags">68288064</int>
@@ -641,21 +656,88 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="NSTextColor" ref="205706440"/>
</object>
</object>
+ <object class="NSTextField" id="800069556">
+ <reference key="NSNextResponder" ref="235344690"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{17, 44}, {67, 17}}</string>
+ <reference key="NSSuperview" ref="235344690"/>
+ <reference key="NSWindow"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="345893571">
+ <int key="NSCellFlags">68288064</int>
+ <int key="NSCellFlags2">71304192</int>
+ <string key="NSContents">Updates:</string>
+ <reference key="NSSupport" ref="906693409"/>
+ <reference key="NSControlView" ref="800069556"/>
+ <reference key="NSBackgroundColor" ref="416396323"/>
+ <reference key="NSTextColor" ref="205706440"/>
+ </object>
+ </object>
+ <object class="NSButton" id="124868638">
+ <reference key="NSNextResponder" ref="235344690"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{93, 43}, {218, 18}}</string>
+ <reference key="NSSuperview" ref="235344690"/>
+ <reference key="NSWindow"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="548281549">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Check for updates on first load</string>
+ <reference key="NSSupport" ref="906693409"/>
+ <reference key="NSControlView" ref="124868638"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">130</int>
+ <reference key="NSNormalImage" ref="1064838318"/>
+ <reference key="NSAlternateImage" ref="664243181"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSButton" id="912083957">
+ <reference key="NSNextResponder" ref="235344690"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{117, 13}, {86, 28}}</string>
+ <reference key="NSSuperview" ref="235344690"/>
+ <reference key="NSWindow"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="613643996">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134348800</int>
+ <string key="NSContents">Check Now</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="912083957"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">129</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
</object>
- <string key="NSFrame">{{65, 222}, {397, 142}}</string>
+ <string key="NSFrame">{{65, 224}, {397, 207}}</string>
<reference key="NSSuperview" ref="1006"/>
+ <reference key="NSWindow"/>
<string key="NSClassName">NSView</string>
</object>
</object>
- <string key="NSFrameSize">{527, 360}</string>
+ <string key="NSFrameSize">{527, 427}</string>
<reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
- <string key="NSMinSize">{420, 272}</string>
+ <string key="NSMinSize">{420, 372}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSFrameAutosaveName">ClickToFlash_settingsWindow</string>
</object>
<object class="NSUserDefaultsController" id="913882380">
+ <object class="NSMutableArray" key="NSDeclaredKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>ClickToFlash_checkForUpdatesOnLoad</string>
+ </object>
<bool key="NSSharedInstance">YES</bool>
</object>
<object class="NSArrayController" id="258102979">
@@ -814,6 +896,30 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<int key="connectionID">136</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: values.ClickToFlash_checkForUpdatesOnLoad</string>
+ <reference key="source" ref="124868638"/>
+ <reference key="destination" ref="913882380"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="124868638"/>
+ <reference key="NSDestination" ref="913882380"/>
+ <string key="NSLabel">value: values.ClickToFlash_checkForUpdatesOnLoad</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">values.ClickToFlash_checkForUpdatesOnLoad</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">145</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">checkForUpdates:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="912083957"/>
+ </object>
+ <int key="connectionID">146</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -858,11 +964,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="object" ref="1006"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="510641939"/>
<reference ref="235344690"/>
+ <reference ref="43744226"/>
<reference ref="241393621"/>
<reference ref="513114676"/>
- <reference ref="43744226"/>
+ <reference ref="510641939"/>
</object>
<reference key="parent" ref="1005"/>
</object>
@@ -956,61 +1062,83 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="parent" ref="513114676"/>
</object>
<object class="IBObjectRecord">
+ <int key="objectID">113</int>
+ <reference key="object" ref="241393621"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="811527510"/>
+ </object>
+ <reference key="parent" ref="1006"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">114</int>
+ <reference key="object" ref="811527510"/>
+ <reference key="parent" ref="241393621"/>
+ </object>
+ <object class="IBObjectRecord">
<int key="objectID">42</int>
<reference key="object" ref="235344690"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="619486495"/>
- <reference ref="972818591"/>
- <reference ref="211748724"/>
- <reference ref="1020124743"/>
<reference ref="90714319"/>
+ <reference ref="1020124743"/>
+ <reference ref="211748724"/>
+ <reference ref="972818591"/>
+ <reference ref="619486495"/>
+ <reference ref="800069556"/>
+ <reference ref="912083957"/>
+ <reference ref="124868638"/>
</object>
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">36</int>
- <reference key="object" ref="619486495"/>
+ <int key="objectID">131</int>
+ <reference key="object" ref="90714319"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="356052318"/>
+ <reference ref="688316371"/>
</object>
<reference key="parent" ref="235344690"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">41</int>
- <reference key="object" ref="356052318"/>
- <reference key="parent" ref="619486495"/>
+ <int key="objectID">132</int>
+ <reference key="object" ref="688316371"/>
+ <reference key="parent" ref="90714319"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">38</int>
- <reference key="object" ref="972818591"/>
+ <int key="objectID">106</int>
+ <reference key="object" ref="1020124743"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1061234246"/>
+ <reference ref="393278813"/>
</object>
<reference key="parent" ref="235344690"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">39</int>
- <reference key="object" ref="1061234246"/>
- <reference key="parent" ref="972818591"/>
+ <int key="objectID">107</int>
+ <reference key="object" ref="393278813"/>
+ <reference key="parent" ref="1020124743"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">101</int>
<reference key="object" ref="211748724"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="416393888"/>
- <reference ref="280616188"/>
- <reference ref="258595923"/>
<reference ref="185312215"/>
+ <reference ref="258595923"/>
+ <reference ref="280616188"/>
+ <reference ref="416393888"/>
</object>
<reference key="parent" ref="235344690"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">102</int>
- <reference key="object" ref="416393888"/>
+ <int key="objectID">105</int>
+ <reference key="object" ref="185312215"/>
+ <reference key="parent" ref="211748724"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">104</int>
+ <reference key="object" ref="258595923"/>
<reference key="parent" ref="211748724"/>
</object>
<object class="IBObjectRecord">
@@ -1019,56 +1147,79 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="parent" ref="211748724"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">104</int>
- <reference key="object" ref="258595923"/>
+ <int key="objectID">102</int>
+ <reference key="object" ref="416393888"/>
<reference key="parent" ref="211748724"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">105</int>
- <reference key="object" ref="185312215"/>
- <reference key="parent" ref="211748724"/>
+ <int key="objectID">38</int>
+ <reference key="object" ref="972818591"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1061234246"/>
+ </object>
+ <reference key="parent" ref="235344690"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">106</int>
- <reference key="object" ref="1020124743"/>
+ <int key="objectID">39</int>
+ <reference key="object" ref="1061234246"/>
+ <reference key="parent" ref="972818591"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">36</int>
+ <reference key="object" ref="619486495"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="393278813"/>
+ <reference ref="356052318"/>
</object>
<reference key="parent" ref="235344690"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">107</int>
- <reference key="object" ref="393278813"/>
- <reference key="parent" ref="1020124743"/>
+ <int key="objectID">41</int>
+ <reference key="object" ref="356052318"/>
+ <reference key="parent" ref="619486495"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">113</int>
- <reference key="object" ref="241393621"/>
+ <int key="objectID">139</int>
+ <reference key="object" ref="800069556"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="811527510"/>
+ <reference ref="345893571"/>
</object>
- <reference key="parent" ref="1006"/>
+ <reference key="parent" ref="235344690"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">114</int>
- <reference key="object" ref="811527510"/>
- <reference key="parent" ref="241393621"/>
+ <int key="objectID">140</int>
+ <reference key="object" ref="345893571"/>
+ <reference key="parent" ref="800069556"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">131</int>
- <reference key="object" ref="90714319"/>
+ <int key="objectID">141</int>
+ <reference key="object" ref="124868638"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="688316371"/>
+ <reference ref="548281549"/>
</object>
<reference key="parent" ref="235344690"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">132</int>
- <reference key="object" ref="688316371"/>
- <reference key="parent" ref="90714319"/>
+ <int key="objectID">142</int>
+ <reference key="object" ref="548281549"/>
+ <reference key="parent" ref="124868638"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">143</int>
+ <reference key="object" ref="912083957"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="613643996"/>
+ </object>
+ <reference key="parent" ref="235344690"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">144</int>
+ <reference key="object" ref="613643996"/>
+ <reference key="parent" ref="912083957"/>
</object>
</object>
</object>
@@ -1081,6 +1232,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>-3.IBPluginDependency</string>
<string>1.IBEditorWindowLastContentRect</string>
<string>1.IBPluginDependency</string>
+ <string>1.IBViewEditorWindowController.showingLayoutRectangles</string>
<string>1.IBWindowTemplateEditedContentRect</string>
<string>1.NSWindowTemplate.visibleAtLaunch</string>
<string>1.WindowOrigin</string>
@@ -1104,7 +1256,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>131.IBAttributePlaceholdersKey</string>
<string>131.IBPluginDependency</string>
<string>132.IBPluginDependency</string>
+ <string>139.IBPluginDependency</string>
<string>14.IBPluginDependency</string>
+ <string>140.IBPluginDependency</string>
+ <string>141.IBPluginDependency</string>
+ <string>142.IBPluginDependency</string>
+ <string>143.IBPluginDependency</string>
+ <string>144.IBPluginDependency</string>
<string>17.IBPluginDependency</string>
<string>2.IBPluginDependency</string>
<string>20.IBPluginDependency</string>
@@ -1124,14 +1282,15 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilderKit</string>
<string>com.apple.InterfaceBuilderKit</string>
- <string>{{46, 1154}, {527, 360}}</string>
+ <string>{{65, 235}, {527, 427}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{46, 1154}, {527, 360}}</string>
+ <reference ref="5"/>
+ <string>{{65, 235}, {527, 427}}</string>
<integer value="1"/>
<string>{196, 240}</string>
<string>{{202, 428}, {480, 270}}</string>
<reference ref="5"/>
- <string>{420, 250}</string>
+ <string>{420, 350}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary">
<string key="NS.key.0">ToolTip</string>
@@ -1177,6 +1336,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<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>
+ <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">
@@ -1213,7 +1378,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">136</int>
+ <int key="maxID">146</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -1221,6 +1386,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="IBPartialClassDescription">
<string key="className">CTFWhitelistWindowController</string>
<string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">checkForUpdates:</string>
+ <string key="NS.object.0">id</string>
+ </object>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">_controller</string>
<string key="NS.object.0">NSArrayController</string>
View
21 Plugin/Plugin.m
@@ -42,6 +42,7 @@ of this software and associated documentation files (the "Software"), to deal
// NSUserDefaults keys
static NSString *sUseYouTubeH264DefaultsKey = @"ClickToFlash_useYouTubeH264";
static NSString *sAutoLoadInvisibleFlashViewsKey = @"ClickToFlash_autoLoadInvisibleViews";
+static NSString *sCheckForUpdatesOnFirstLoadKey = @"ClickToFlash_checkForUpdatesOnFirstLoad";
@interface CTFClickToFlashPlugin (Internal)
@@ -86,15 +87,17 @@ - (id) initWithArguments:(NSDictionary *)arguments
self = [super init];
if (self) {
{
- static BOOL checkedForUpdate = NO;
- if (!checkedForUpdate) {
- checkedForUpdate = YES; NSBundle *clickToFlashBundle = [NSBundle bundleWithIdentifier:@"com.github.rentzsch.clicktoflash"];
- NSAssert(clickToFlashBundle, nil);
- SUUpdater *updater = [SUUpdater updaterForBundle:clickToFlashBundle];
- NSAssert(updater, nil);
- [updater setAutomaticallyChecksForUpdates:YES];
- [updater resetUpdateCycle];
- }
+ if ([ [ NSUserDefaults standardUserDefaults ] boolForKey: sCheckForUpdatesOnFirstLoadKey ]) {
+ static BOOL checkedForUpdate = NO;
+ if (!checkedForUpdate) {
+ checkedForUpdate = YES; NSBundle *clickToFlashBundle = [NSBundle bundleWithIdentifier:@"com.github.rentzsch.clicktoflash"];
+ NSAssert(clickToFlashBundle, nil);
+ SUUpdater *updater = [SUUpdater updaterForBundle:clickToFlashBundle];
+ NSAssert(updater, nil);
+ [updater setAutomaticallyChecksForUpdates:YES];
+ [updater resetUpdateCycle];
+ }
+ }
}
self.webView = [[[arguments objectForKey:WebPlugInContainerKey] webFrame] webView];
Please sign in to comment.
Something went wrong with that request. Please try again.