Turn popover activation button 'on' when the popover is up.
authorJoe Wreschnig <joe.wreschnig@gmail.com>
Mon, 4 Mar 2013 15:17:59 +0000 (16:17 +0100)
committerJoe Wreschnig <joe.wreschnig@gmail.com>
Mon, 4 Mar 2013 15:17:59 +0000 (16:17 +0100)
English.lproj/MainMenu.xib
NJMappingsController.h
NJMappingsController.m

index e30e9827bcdd21dc68e7c226d0f3a560268a9cf1..353e9051bf24d9782efc669c25db8deca3101e73 100644 (file)
                                                        <object class="NSMutableString" key="NSToolbarItemIdentifier">
                                                                <characters key="NS.bytes">4AC66688-76E8-47ED-AC0A-7462220A4019</characters>
                                                        </object>
-                                                       <string key="NSToolbarItemLabel">Custom View</string>
-                                                       <string key="NSToolbarItemPaletteLabel">Custom View</string>
+                                                       <string key="NSToolbarItemLabel">Mapping Selector</string>
+                                                       <string key="NSToolbarItemPaletteLabel">Mapping Selector</string>
                                                        <nil key="NSToolbarItemToolTip"/>
                                                        <object class="NSButton" key="NSToolbarItemView" id="227597319">
                                                                <reference key="NSNextResponder"/>
                                                                <int key="NSvFlags">268</int>
                                                                <string key="NSFrame">{{0, 14}, {140, 25}}</string>
                                                                <reference key="NSSuperview"/>
-                                                               <reference key="NSNextKeyView"/>
+                                                               <reference key="NSWindow"/>
                                                                <string key="NSReuseIdentifierKey">_NS:9</string>
                                                                <bool key="NSEnabled">YES</bool>
                                                                <object class="NSButtonCell" key="NSCell" id="850080795">
-                                                                       <int key="NSCellFlags">-2080374784</int>
+                                                                       <int key="NSCellFlags">67108864</int>
                                                                        <int key="NSCellFlags2">134217728</int>
                                                                        <string key="NSContents">(default)</string>
                                                                        <object class="NSFont" key="NSSupport" id="45863614">
                                                                        </object>
                                                                        <string key="NSCellIdentifier">_NS:9</string>
                                                                        <reference key="NSControlView" ref="227597319"/>
-                                                                       <int key="NSButtonFlags">-2034483200</int>
+                                                                       <int key="NSButtonFlags">918306816</int>
                                                                        <int key="NSButtonFlags2">163</int>
                                                                        <object class="NSCustomResource" key="NSNormalImage" id="13197350">
                                                                                <string key="NSClassName">NSImage</string>
                                                        <object class="NSMutableString" key="NSToolbarItemIdentifier">
                                                                <characters key="NS.bytes">94389EFE-310F-4DB5-95F6-D4AEE8839979</characters>
                                                        </object>
-                                                       <string key="NSToolbarItemLabel">Custom View</string>
-                                                       <string key="NSToolbarItemPaletteLabel">Custom View</string>
+                                                       <string key="NSToolbarItemLabel">Translation Enabled</string>
+                                                       <string key="NSToolbarItemPaletteLabel">Translation Enabled</string>
                                                        <nil key="NSToolbarItemToolTip"/>
                                                        <object class="NSSegmentedControl" key="NSToolbarItemView" id="679083346">
                                                                <reference key="NSNextResponder"/>
                                                                <int key="NSvFlags">268</int>
-                                                               <string key="NSFrame">{{5, 14}, {67, 25}}</string>
+                                                               <string key="NSFrame">{{23, 14}, {67, 25}}</string>
                                                                <reference key="NSSuperview"/>
-                                                               <reference key="NSNextKeyView"/>
+                                                               <reference key="NSWindow"/>
                                                                <string key="NSReuseIdentifierKey">_NS:9</string>
                                                                <bool key="NSEnabled">YES</bool>
                                                                <object class="NSSegmentedCell" key="NSCell" id="594076765">
index 4867943928ed3688bf96456b7396b1f59dc4a6be..f0dab4f709c86e7e494ce9b426bc0f33f0571a6e 100644 (file)
@@ -12,6 +12,7 @@
 @interface NJMappingsController : NSObject <NSTableViewDataSource,
                                             NSTableViewDelegate,
                                             NSOpenSavePanelDelegate,
+                                            NSPopoverDelegate,
                                             NSFastEnumeration>
 {
     IBOutlet NSButton *removeButton;
index 193edfe670d073dd36d8ccbc613c5225c6d1f80c..f1e068ee23ef35fdaf6f2b1de59f7b10ac8d2336 100644 (file)
     [popover showRelativeToRect:popoverActivate.bounds ofView:popoverActivate preferredEdge:NSMinXEdge];
 }
 
+- (void)popoverWillShow:(NSNotification *)notification {
+    popoverActivate.state = NSOnState;
+}
+
+- (void)popoverWillClose:(NSNotification *)notification {
+    popoverActivate.state = NSOffState;
+}
+
 @end