Skip to content

Commit

Permalink
Added "Load All on This Page" item to the context menu. Changed from …
Browse files Browse the repository at this point in the history
…saying "Front Window" to "Frontmost Page". Removed hyphens from "Click-to-Flash" (I've become unhappy with the inconsistency). Removed CtF from the main menu's Settings item's name (it's redundant given that its the CtF submenu).

Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information
Troy Gaul authored and rentzsch committed Feb 9, 2009
1 parent 8fdb786 commit 44ce73f
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Plugin/CTFMenubarMenuController.h
Expand Up @@ -40,6 +40,8 @@ extern NSString* kCTFLoadFlashViewsForWindow;

+ (CTFMenubarMenuController*) sharedController;

- (void) loadFlashForWindow: (NSWindow*) window;

- (IBAction) loadAllFlash: (id) sender;
- (IBAction) loadKeyWindowFlash: (id) sender;
- (IBAction) showSettingsWindow: (id) sender;
Expand Down
10 changes: 8 additions & 2 deletions Plugin/CTFMenubarMenuController.m
Expand Up @@ -130,6 +130,13 @@ + (CTFMenubarMenuController*) sharedController
#pragma mark Actions


- (void) loadFlashForWindow: (NSWindow*) window
{
[ [ NSNotificationCenter defaultCenter ] postNotificationName: kCTFLoadFlashViewsForWindow
object: window ];
}


- (IBAction) loadAllFlash: (id) sender
{
[ [ NSNotificationCenter defaultCenter ] postNotificationName: kCTFLoadAllFlashViews
Expand All @@ -141,8 +148,7 @@ - (IBAction) loadKeyWindowFlash: (id) sender
{
NSWindow* window = [ NSApp keyWindow ];
if( window )
[ [ NSNotificationCenter defaultCenter ] postNotificationName: kCTFLoadFlashViewsForWindow
object: window ];
[ self loadFlashForWindow: window ];
}


Expand Down
36 changes: 32 additions & 4 deletions Plugin/English.lproj/ContextualMenu.xib
Expand Up @@ -8,7 +8,7 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="12"/>
<integer value="21"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
Expand Down Expand Up @@ -53,6 +53,14 @@
<string key="NSResourceName">NSMenuMixedState</string>
</object>
</object>
<object class="NSMenuItem" id="1012796156">
<reference key="NSMenu" ref="93442052"/>
<string key="NSTitle">Load All on This Page</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="121969399"/>
<reference key="NSMixedImage" ref="575759592"/>
</object>
<object class="NSMenuItem" id="688689086">
<reference key="NSMenu" ref="93442052"/>
<bool key="NSIsDisabled">YES</bool>
Expand Down Expand Up @@ -91,7 +99,7 @@
</object>
<object class="NSMenuItem" id="831790790">
<reference key="NSMenu" ref="93442052"/>
<string key="NSTitle">Click-to-Flash Settings...</string>
<string key="NSTitle">Click to Flash Settings...</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="121969399"/>
Expand Down Expand Up @@ -159,6 +167,14 @@
</object>
<int key="connectionID">18</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">loadAllOnPage:</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="1012796156"/>
</object>
<int key="connectionID">22</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
Expand Down Expand Up @@ -200,6 +216,7 @@
<reference ref="1001518375"/>
<reference ref="688689086"/>
<reference ref="380486120"/>
<reference ref="1012796156"/>
</object>
<reference key="parent" ref="1002"/>
</object>
Expand Down Expand Up @@ -233,6 +250,11 @@
<reference key="object" ref="380486120"/>
<reference key="parent" ref="93442052"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">21</int>
<reference key="object" ref="1012796156"/>
<reference key="parent" ref="93442052"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
Expand All @@ -249,14 +271,16 @@
<string>14.IBPluginDependency</string>
<string>16.IBPluginDependency</string>
<string>19.IBPluginDependency</string>
<string>21.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>{{371, 335}, {226, 103}}</string>
<string>{{371, 315}, {222, 123}}</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>
Expand Down Expand Up @@ -286,7 +310,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">19</int>
<int key="maxID">22</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
Expand All @@ -300,7 +324,9 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>addToWhitelist:</string>
<string>editWhitelist:</string>
<string>loadAllOnPage:</string>
<string>loadFlash:</string>
<string>loadH264:</string>
<string>removeFromWhitelist:</string>
</object>
<object class="NSMutableArray" key="dict.values">
Expand All @@ -309,6 +335,8 @@
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
Expand Down
8 changes: 4 additions & 4 deletions Plugin/English.lproj/MenubarMenu.xib
Expand Up @@ -41,7 +41,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="275181830">
<reference key="NSMenu" ref="93442052"/>
<string key="NSTitle">Load Flash for Front Window</string>
<string key="NSTitle">Load Flash for Frontmost Page</string>
<string key="NSKeyEquiv">f</string>
<int key="NSKeyEquivModMask">1310720</int>
<int key="NSMnemonicLoc">2147483647</int>
Expand All @@ -56,7 +56,7 @@
</object>
<object class="NSMenuItem" id="975793511">
<reference key="NSMenu" ref="93442052"/>
<string key="NSTitle">Load Flash for All Windows</string>
<string key="NSTitle">Load Flash for All Pages</string>
<string key="NSKeyEquiv">F</string>
<int key="NSKeyEquivModMask">1310720</int>
<int key="NSMnemonicLoc">2147483647</int>
Expand All @@ -75,7 +75,7 @@
</object>
<object class="NSMenuItem" id="831790790">
<reference key="NSMenu" ref="93442052"/>
<string key="NSTitle">Click-to-Flash Settings...</string>
<string key="NSTitle">Settings...</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="280454698"/>
Expand Down Expand Up @@ -202,7 +202,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilderKit</string>
<string>com.apple.InterfaceBuilderKit</string>
<string>{{367, 783}, {298, 73}}</string>
<string>{{367, 783}, {311, 73}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Expand Down
1 change: 1 addition & 0 deletions Plugin/Plugin.h
Expand Up @@ -54,5 +54,6 @@ THE SOFTWARE.
- (IBAction)editWhitelist:(id)sender;
- (IBAction)loadFlash:(id)sender;
- (IBAction)loadH264:(id)sender;
- (IBAction)loadAllOnPage:(id)sender;

@end
5 changes: 5 additions & 0 deletions Plugin/Plugin.m
Expand Up @@ -437,6 +437,11 @@ - (IBAction)loadH264:(id)sender;
[self _convertToMP4Container];
}

- (IBAction)loadAllOnPage:(id)sender
{
[[CTFMenubarMenuController sharedController] loadFlashForWindow: [self window]];
}

- (void) _loadContent: (NSNotification*) notification
{
[self _convertTypesForContainer];
Expand Down

0 comments on commit 44ce73f

Please sign in to comment.