aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Interfaces/English.lproj/BundleEditor.xib712
-rw-r--r--Source/SPAppController.m2
-rw-r--r--Source/SPBundleEditorController.h29
-rw-r--r--Source/SPBundleEditorController.m172
4 files changed, 720 insertions, 195 deletions
diff --git a/Interfaces/English.lproj/BundleEditor.xib b/Interfaces/English.lproj/BundleEditor.xib
index 782f517c..2be4302a 100644
--- a/Interfaces/English.lproj/BundleEditor.xib
+++ b/Interfaces/English.lproj/BundleEditor.xib
@@ -23,7 +23,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="729"/>
+ <integer value="686"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -448,7 +448,7 @@
<int key="NSTCFlags">1</int>
</object>
<object class="NSTextViewSharedData" key="NSSharedData">
- <int key="NSFlags">12263</int>
+ <int key="NSFlags">11555</int>
<int key="NSTextCheckingTypes">0</int>
<nil key="NSMarkedAttributes"/>
<object class="NSColor" key="NSBackgroundColor" id="856229010">
@@ -549,22 +549,43 @@
<reference key="NSHScroller" ref="724741922"/>
<reference key="NSContentView" ref="971406968"/>
</object>
+ <object class="NSButton" id="61845604">
+ <reference key="NSNextResponder" ref="338542681"/>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{399, 58}, {96, 28}}</string>
+ <reference key="NSSuperview" ref="338542681"/>
+ <int key="NSTag">1</int>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="311351911">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134348800</int>
+ <string key="NSContents">Save</string>
+ <reference key="NSSupport" ref="26"/>
+ <reference key="NSControlView" ref="61845604"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">268435585</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent">s</string>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
<object class="NSButton" id="679408795">
<reference key="NSNextResponder" ref="338542681"/>
- <int key="NSvFlags">292</int>
+ <int key="NSvFlags">289</int>
<string key="NSFrame">{{399, 16}, {96, 28}}</string>
<reference key="NSSuperview" ref="338542681"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="697434956">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134348800</int>
- <string key="NSContents">Close</string>
+ <string key="NSContents">Cancel</string>
<reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="679408795"/>
<int key="NSButtonFlags">-2038284033</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
+ <string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
@@ -575,7 +596,7 @@
<string key="NSFrame">{{20, 20}, {161, 22}}</string>
<reference key="NSSuperview" ref="338542681"/>
<bool key="NSEnabled">YES</bool>
- <object class="SRRecorderCell" key="NSCell">
+ <object class="SRRecorderCell" key="NSCell" id="793672064">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">131072</int>
<reference key="NSSupport" ref="26"/>
@@ -583,7 +604,7 @@
<nil key="autosaveName"/>
<integer value="-1" key="keyComboCode"/>
<integer value="0" key="keyComboFlags"/>
- <integer value="1966080" key="allowedFlags"/>
+ <integer value="10354688" key="allowedFlags"/>
<integer value="0" key="requiredFlags"/>
<boolean value="NO" key="allowsKeyOnly"/>
<boolean value="NO" key="escapeKeysRecord"/>
@@ -635,49 +656,16 @@
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
- <object class="NSMenuItem" key="NSMenuItem" id="995057166">
- <reference key="NSMenu" ref="730171686"/>
- <string key="NSTitle">Item 1</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <int key="NSState">1</int>
- <reference key="NSOnImage" ref="545549031"/>
- <reference key="NSMixedImage" ref="20147930"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="4363123"/>
- </object>
+ <nil key="NSMenuItem"/>
<bool key="NSMenuItemRespectAlignment">YES</bool>
<object class="NSMenu" key="NSMenu" id="730171686">
<string key="NSTitle">OtherViews</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="995057166"/>
- <object class="NSMenuItem" id="1003933208">
- <reference key="NSMenu" ref="730171686"/>
- <string key="NSTitle">Item 2</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="545549031"/>
- <reference key="NSMixedImage" ref="20147930"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="4363123"/>
- </object>
- <object class="NSMenuItem" id="1067061063">
- <reference key="NSMenu" ref="730171686"/>
- <string key="NSTitle">Item 3</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="545549031"/>
- <reference key="NSMixedImage" ref="20147930"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="4363123"/>
- </object>
</object>
<reference key="NSMenuFont" ref="604392898"/>
</object>
+ <int key="NSSelectedIndex">-1</int>
<int key="NSPreferredEdge">1</int>
<bool key="NSUsesItemFromMenu">YES</bool>
<bool key="NSAltersState">YES</bool>
@@ -701,49 +689,16 @@
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
- <object class="NSMenuItem" key="NSMenuItem" id="929077357">
- <reference key="NSMenu" ref="47835238"/>
- <string key="NSTitle">Item 1</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <int key="NSState">1</int>
- <reference key="NSOnImage" ref="545549031"/>
- <reference key="NSMixedImage" ref="20147930"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="299353121"/>
- </object>
+ <nil key="NSMenuItem"/>
<bool key="NSMenuItemRespectAlignment">YES</bool>
<object class="NSMenu" key="NSMenu" id="47835238">
<string key="NSTitle">OtherViews</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="929077357"/>
- <object class="NSMenuItem" id="998241570">
- <reference key="NSMenu" ref="47835238"/>
- <string key="NSTitle">Item 2</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="545549031"/>
- <reference key="NSMixedImage" ref="20147930"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="299353121"/>
- </object>
- <object class="NSMenuItem" id="854519976">
- <reference key="NSMenu" ref="47835238"/>
- <string key="NSTitle">Item 3</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="545549031"/>
- <reference key="NSMixedImage" ref="20147930"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="299353121"/>
- </object>
</object>
<reference key="NSMenuFont" ref="604392898"/>
</object>
+ <int key="NSSelectedIndex">-1</int>
<int key="NSPreferredEdge">1</int>
<bool key="NSUsesItemFromMenu">YES</bool>
<bool key="NSAltersState">YES</bool>
@@ -767,49 +722,16 @@
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
- <object class="NSMenuItem" key="NSMenuItem" id="486937638">
- <reference key="NSMenu" ref="378188111"/>
- <string key="NSTitle">Item 1</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <int key="NSState">1</int>
- <reference key="NSOnImage" ref="545549031"/>
- <reference key="NSMixedImage" ref="20147930"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="131002945"/>
- </object>
+ <nil key="NSMenuItem"/>
<bool key="NSMenuItemRespectAlignment">YES</bool>
<object class="NSMenu" key="NSMenu" id="378188111">
<string key="NSTitle">OtherViews</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="486937638"/>
- <object class="NSMenuItem" id="589248387">
- <reference key="NSMenu" ref="378188111"/>
- <string key="NSTitle">Item 2</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="545549031"/>
- <reference key="NSMixedImage" ref="20147930"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="131002945"/>
- </object>
- <object class="NSMenuItem" id="215193177">
- <reference key="NSMenu" ref="378188111"/>
- <string key="NSTitle">Item 3</string>
- <string key="NSKeyEquiv"/>
- <int key="NSKeyEquivModMask">1048576</int>
- <int key="NSMnemonicLoc">2147483647</int>
- <reference key="NSOnImage" ref="545549031"/>
- <reference key="NSMixedImage" ref="20147930"/>
- <string key="NSAction">_popUpItemAction:</string>
- <reference key="NSTarget" ref="131002945"/>
- </object>
</object>
<reference key="NSMenuFont" ref="604392898"/>
</object>
+ <int key="NSSelectedIndex">-1</int>
<int key="NSPreferredEdge">1</int>
<bool key="NSUsesItemFromMenu">YES</bool>
<bool key="NSAltersState">YES</bool>
@@ -818,8 +740,8 @@
</object>
<object class="NSButton" id="277233496">
<reference key="NSNextResponder" ref="338542681"/>
- <int key="NSvFlags">292</int>
- <string key="NSFrame">{{401, 58}, {25, 25}}</string>
+ <int key="NSvFlags">265</int>
+ <string key="NSFrame">{{468, 345}, {25, 25}}</string>
<reference key="NSSuperview" ref="338542681"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1021110085">
@@ -868,6 +790,7 @@
<int key="NSCellFlags2">272761856</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="26"/>
+ <string key="NSPlaceholderString">[sub menu category]</string>
<reference key="NSControlView" ref="233794614"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor" id="957408670">
@@ -959,7 +882,7 @@
<int key="NSCellFlags2">272761856</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString">[no selection]</string>
+ <string key="NSPlaceholderString">[menu label tooltip]</string>
<reference key="NSControlView" ref="70452502"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="957408670"/>
@@ -993,7 +916,7 @@
<int key="NSCellFlags2">272761856</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="26"/>
- <string key="NSPlaceholderString">[no selection]</string>
+ <string key="NSPlaceholderString">[menu label name]</string>
<reference key="NSControlView" ref="209604501"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="957408670"/>
@@ -1179,6 +1102,15 @@
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSFrameAutosaveName">SPBundleEditor</string>
</object>
+ <object class="NSArrayController" id="973686842">
+ <bool key="NSEditable">YES</bool>
+ <object class="_NSManagedProxy" key="_NSManagedProxy"/>
+ <bool key="NSAvoidsEmptySelection">YES</bool>
+ <bool key="NSPreservesSelection">YES</bool>
+ <bool key="NSSelectsInsertedObjects">YES</bool>
+ <bool key="NSFilterRestrictsInsertion">YES</bool>
+ <bool key="NSClearsFilterPredicateOnInsertion">YES</bool>
+ </object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
@@ -1207,6 +1139,238 @@
</object>
<int key="connectionID">819</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">commandBundleArrayController</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="973686842"/>
+ </object>
+ <int key="connectionID">826</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">addCommandBundle:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="275669410"/>
+ </object>
+ <int key="connectionID">827</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">removeCommandBundle:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="369890801"/>
+ </object>
+ <int key="connectionID">828</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">duplicateCommandBundle:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="204686633"/>
+ </object>
+ <int key="connectionID">829</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dataSource</string>
+ <reference key="source" ref="586526060"/>
+ <reference key="destination" ref="1001"/>
+ </object>
+ <int key="connectionID">830</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="586526060"/>
+ <reference key="destination" ref="1001"/>
+ </object>
+ <int key="connectionID">831</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">commandsTableView</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="586526060"/>
+ </object>
+ <int key="connectionID">832</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="209604501"/>
+ <reference key="destination" ref="1001"/>
+ </object>
+ <int key="connectionID">833</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">nameTextField</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="209604501"/>
+ </object>
+ <int key="connectionID">834</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">disableCheckBox</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="892755176"/>
+ </object>
+ <int key="connectionID">835</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">inputPopupButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="117047836"/>
+ </object>
+ <int key="connectionID">836</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">fallbackLabelField</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="411989314"/>
+ </object>
+ <int key="connectionID">837</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">inputFallbackPopupButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="1013555552"/>
+ </object>
+ <int key="connectionID">838</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">editorScopeButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="799580933"/>
+ </object>
+ <int key="connectionID">839</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">inputFieldScopeButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="126436931"/>
+ </object>
+ <int key="connectionID">840</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">dataTableScopeButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="594438970"/>
+ </object>
+ <int key="connectionID">841</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">scopeButtonChanged:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="594438970"/>
+ </object>
+ <int key="connectionID">842</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">scopeButtonChanged:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="126436931"/>
+ </object>
+ <int key="connectionID">843</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">scopeButtonChanged:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="799580933"/>
+ </object>
+ <int key="connectionID">844</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">inputPopuButtonChanged:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="117047836"/>
+ </object>
+ <int key="connectionID">845</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="965862131"/>
+ <reference key="destination" ref="1001"/>
+ </object>
+ <int key="connectionID">846</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">commandTextView</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="965862131"/>
+ </object>
+ <int key="connectionID">847</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">outputPopupButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="570587248"/>
+ </object>
+ <int key="connectionID">848</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">categoryTextField</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="233794614"/>
+ </object>
+ <int key="connectionID">849</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">tootlipTextField</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="70452502"/>
+ </object>
+ <int key="connectionID">850</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="62695080"/>
+ <reference key="destination" ref="1001"/>
+ </object>
+ <int key="connectionID">851</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">keyEquivalentField</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="62695080"/>
+ </object>
+ <int key="connectionID">852</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">showHelp:</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="277233496"/>
+ </object>
+ <int key="connectionID">853</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">performClose:</string>
+ <reference key="source" ref="600836447"/>
+ <reference key="destination" ref="61845604"/>
+ </object>
+ <int key="connectionID">861</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -1422,8 +1586,9 @@
<reference ref="62695080"/>
<reference ref="892755176"/>
<reference ref="679408795"/>
- <reference ref="277233496"/>
<reference ref="179792134"/>
+ <reference ref="277233496"/>
+ <reference ref="61845604"/>
</object>
<reference key="parent" ref="358491109"/>
</object>
@@ -1450,28 +1615,10 @@
<reference key="object" ref="47835238"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="854519976"/>
- <reference ref="998241570"/>
- <reference ref="929077357"/>
</object>
<reference key="parent" ref="299353121"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">777</int>
- <reference key="object" ref="854519976"/>
- <reference key="parent" ref="47835238"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">778</int>
- <reference key="object" ref="998241570"/>
- <reference key="parent" ref="47835238"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">779</int>
- <reference key="object" ref="929077357"/>
- <reference key="parent" ref="47835238"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">788</int>
<reference key="object" ref="994416682"/>
<object class="NSMutableArray" key="children">
@@ -1544,6 +1691,10 @@
<object class="IBObjectRecord">
<int key="objectID">804</int>
<reference key="object" ref="62695080"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="793672064"/>
+ </object>
<reference key="parent" ref="338542681"/>
</object>
<object class="IBObjectRecord">
@@ -1569,28 +1720,10 @@
<reference key="object" ref="730171686"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1067061063"/>
- <reference ref="1003933208"/>
- <reference ref="995057166"/>
</object>
<reference key="parent" ref="4363123"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">783</int>
- <reference key="object" ref="1067061063"/>
- <reference key="parent" ref="730171686"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">784</int>
- <reference key="object" ref="1003933208"/>
- <reference key="parent" ref="730171686"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">785</int>
- <reference key="object" ref="995057166"/>
- <reference key="parent" ref="730171686"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">691</int>
<reference key="object" ref="233794614"/>
<object class="NSMutableArray" key="children">
@@ -1697,28 +1830,10 @@
<reference key="object" ref="378188111"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="486937638"/>
- <reference ref="589248387"/>
- <reference ref="215193177"/>
</object>
<reference key="parent" ref="131002945"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">771</int>
- <reference key="object" ref="486937638"/>
- <reference key="parent" ref="378188111"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">772</int>
- <reference key="object" ref="589248387"/>
- <reference key="parent" ref="378188111"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">773</int>
- <reference key="object" ref="215193177"/>
- <reference key="parent" ref="378188111"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">816</int>
<reference key="object" ref="477430580"/>
<object class="NSMutableArray" key="children">
@@ -1811,6 +1926,31 @@
<reference key="object" ref="965862131"/>
<reference key="parent" ref="179792134"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">824</int>
+ <reference key="object" ref="793672064"/>
+ <reference key="parent" ref="62695080"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">825</int>
+ <reference key="object" ref="973686842"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">Bundle Commands</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">859</int>
+ <reference key="object" ref="61845604"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="311351911"/>
+ </object>
+ <reference key="parent" ref="338542681"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">860</int>
+ <reference key="object" ref="311351911"/>
+ <reference key="parent" ref="61845604"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -1870,22 +2010,16 @@
<string>754.ImportedFromIB2</string>
<string>768.IBPluginDependency</string>
<string>769.IBPluginDependency</string>
+ <string>770.IBEditorWindowLastContentRect</string>
<string>770.IBPluginDependency</string>
- <string>771.IBPluginDependency</string>
- <string>772.IBPluginDependency</string>
- <string>773.IBPluginDependency</string>
<string>774.IBPluginDependency</string>
<string>775.IBPluginDependency</string>
+ <string>776.IBEditorWindowLastContentRect</string>
<string>776.IBPluginDependency</string>
- <string>777.IBPluginDependency</string>
- <string>778.IBPluginDependency</string>
- <string>779.IBPluginDependency</string>
<string>780.IBPluginDependency</string>
<string>781.IBPluginDependency</string>
+ <string>782.IBEditorWindowLastContentRect</string>
<string>782.IBPluginDependency</string>
- <string>783.IBPluginDependency</string>
- <string>784.IBPluginDependency</string>
- <string>785.IBPluginDependency</string>
<string>786.IBPluginDependency</string>
<string>787.IBPluginDependency</string>
<string>788.IBAttributePlaceholdersKey</string>
@@ -1907,19 +2041,23 @@
<string>808.IBPluginDependency</string>
<string>809.IBPluginDependency</string>
<string>810.IBPluginDependency</string>
+ <string>816.IBPluginDependency</string>
<string>817.IBPluginDependency</string>
<string>818.IBPluginDependency</string>
<string>820.IBPluginDependency</string>
<string>821.IBPluginDependency</string>
<string>822.IBPluginDependency</string>
<string>823.IBPluginDependency</string>
+ <string>825.IBPluginDependency</string>
+ <string>859.IBPluginDependency</string>
+ <string>860.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{144, 278}, {655, 444}}</string>
+ <string>{{109, 228}, {655, 444}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{144, 278}, {655, 444}}</string>
+ <string>{{109, 228}, {655, 444}}</string>
<boolean value="NO"/>
<boolean value="YES"/>
<string>{726, 444}</string>
@@ -1978,7 +2116,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.brandonwalkin.BWToolkit</string>
- <string>{{159, 166}, {238, 37}}</string>
+ <string>{{198, 54}, {119, 37}}</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1997,21 +2135,15 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{211, 598}, {167, 4}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{211, 312}, {167, 4}}</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>
- <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>{{430, 598}, {167, 4}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -2054,6 +2186,10 @@
<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>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -2072,7 +2208,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">823</int>
+ <int key="maxID">861</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -2209,6 +2345,196 @@
<object class="IBPartialClassDescription">
<string key="className">SPBundleEditorController</string>
<string key="superclassName">NSWindowController</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addCommandBundle:</string>
+ <string>duplicateCommandBundle:</string>
+ <string>inputPopuButtonChanged:</string>
+ <string>removeCommandBundle:</string>
+ <string>revealCommandBundleInFinder:</string>
+ <string>scopeButtonChanged:</string>
+ <string>showHelp:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>addCommandBundle:</string>
+ <string>duplicateCommandBundle:</string>
+ <string>inputPopuButtonChanged:</string>
+ <string>removeCommandBundle:</string>
+ <string>revealCommandBundleInFinder:</string>
+ <string>scopeButtonChanged:</string>
+ <string>showHelp:</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">addCommandBundle:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">duplicateCommandBundle:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">inputPopuButtonChanged:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">removeCommandBundle:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">revealCommandBundleInFinder:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">scopeButtonChanged:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">showHelp:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>categoryTextField</string>
+ <string>commandBundleArrayController</string>
+ <string>commandTextView</string>
+ <string>commandsTableView</string>
+ <string>dataTableScopeButton</string>
+ <string>disableCheckBox</string>
+ <string>editorScopeButton</string>
+ <string>fallbackLabelField</string>
+ <string>inputFallbackPopupButton</string>
+ <string>inputFieldScopeButton</string>
+ <string>inputPopupButton</string>
+ <string>keyEquivalentField</string>
+ <string>nameTextField</string>
+ <string>outputPopupButton</string>
+ <string>tootlipTextField</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSTextField</string>
+ <string>NSArrayController</string>
+ <string>NSTextView</string>
+ <string>NSTableView</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
+ <string>NSButton</string>
+ <string>NSTextField</string>
+ <string>NSPopUpButton</string>
+ <string>NSButton</string>
+ <string>NSPopUpButton</string>
+ <string>SRRecorderControl</string>
+ <string>NSTextField</string>
+ <string>NSPopUpButton</string>
+ <string>NSTextField</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="toOneOutletInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>categoryTextField</string>
+ <string>commandBundleArrayController</string>
+ <string>commandTextView</string>
+ <string>commandsTableView</string>
+ <string>dataTableScopeButton</string>
+ <string>disableCheckBox</string>
+ <string>editorScopeButton</string>
+ <string>fallbackLabelField</string>
+ <string>inputFallbackPopupButton</string>
+ <string>inputFieldScopeButton</string>
+ <string>inputPopupButton</string>
+ <string>keyEquivalentField</string>
+ <string>nameTextField</string>
+ <string>outputPopupButton</string>
+ <string>tootlipTextField</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">categoryTextField</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">commandBundleArrayController</string>
+ <string key="candidateClassName">NSArrayController</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">commandTextView</string>
+ <string key="candidateClassName">NSTextView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">commandsTableView</string>
+ <string key="candidateClassName">NSTableView</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">dataTableScopeButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">disableCheckBox</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">editorScopeButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">fallbackLabelField</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">inputFallbackPopupButton</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">inputFieldScopeButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">inputPopupButton</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">keyEquivalentField</string>
+ <string key="candidateClassName">SRRecorderControl</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">nameTextField</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">outputPopupButton</string>
+ <string key="candidateClassName">NSPopUpButton</string>
+ </object>
+ <object class="IBToOneOutletInfo">
+ <string key="name">tootlipTextField</string>
+ <string key="candidateClassName">NSTextField</string>
+ </object>
+ </object>
+ </object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBDocumentRelativeSource</string>
<string key="minorKey">../../Source/SPBundleEditorController.h</string>
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index c3698db0..430587a0 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -872,7 +872,7 @@
if(bundlePath) {
NSError *error = nil;
NSArray *foundBundles = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:bundlePath error:&error];
- if (foundBundles && [foundBundles count]) {
+ if (foundBundles && [foundBundles count] && error == nil) {
for(NSString* bundle in foundBundles) {
if(![[[bundle pathExtension] lowercaseString] isEqualToString:[SPUserBundleFileExtension lowercaseString]]) continue;
diff --git a/Source/SPBundleEditorController.h b/Source/SPBundleEditorController.h
index 4512cd56..8a2db321 100644
--- a/Source/SPBundleEditorController.h
+++ b/Source/SPBundleEditorController.h
@@ -24,9 +24,38 @@
#import <Cocoa/Cocoa.h>
+@class SRRecorderControl;
@interface SPBundleEditorController : NSWindowController {
+ IBOutlet NSTextView* commandTextView;
+ IBOutlet NSTableView* commandsTableView;
+ IBOutlet NSTextField* nameTextField;
+ IBOutlet NSTextField* tootlipTextField;
+ IBOutlet NSTextField* categoryTextField;
+ IBOutlet NSTextField* fallbackLabelField;
+ IBOutlet NSPopUpButton* inputPopupButton;
+ IBOutlet NSPopUpButton* inputFallbackPopupButton;
+ IBOutlet NSPopUpButton* outputPopupButton;
+ IBOutlet NSButton *editorScopeButton;
+ IBOutlet NSButton *inputFieldScopeButton;
+ IBOutlet NSButton *dataTableScopeButton;
+ IBOutlet NSButton *disableCheckBox;
+ IBOutlet SRRecorderControl *keyEquivalentField;
+
+ IBOutlet NSArrayController *commandBundleArrayController;
+ NSMutableArray *commandBundleArray;
+
+
}
+- (IBAction)scopeButtonChanged:(id)sender;
+- (IBAction)inputPopuButtonChanged:(id)sender;
+- (IBAction)duplicateCommandBundle:(id)sender;
+- (IBAction)addCommandBundle:(id)sender;
+- (IBAction)removeCommandBundle:(id)sender;
+- (IBAction)revealCommandBundleInFinder:(id)sender;
+- (IBAction)showHelp:(id)sender;
+
+
@end
diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m
index 15cd58c2..cd5de5f9 100644
--- a/Source/SPBundleEditorController.m
+++ b/Source/SPBundleEditorController.m
@@ -32,7 +32,177 @@
*/
- (id)init
{
- return [super initWithWindowNibName:@"BundleEditor"];
+
+ if ((self = [super initWithWindowNibName:@"BundleEditor"])) {
+
+ commandBundleArray = [[NSMutableArray alloc] init];
+
+ }
+
+ return self;
+
+}
+
+- (void)dealloc
+{
+ [commandBundleArray release];
+ [super dealloc];
+}
+
+- (void)awakeFromNib
+{
+ NSString *bundlePath = [[NSFileManager defaultManager] applicationSupportDirectoryForSubDirectory:SPBundleSupportFolder createIfNotExists:NO error:nil];
+
+ if(bundlePath) {
+ NSError *error = nil;
+ NSArray *foundBundles = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:bundlePath error:&error];
+ if (foundBundles && [foundBundles count]) {
+ for(NSString* bundle in foundBundles) {
+ if(![[[bundle pathExtension] lowercaseString] isEqualToString:[SPUserBundleFileExtension lowercaseString]]) continue;
+
+ NSError *readError = nil;
+ NSString *convError = nil;
+ NSPropertyListFormat format;
+ NSDictionary *cmdData = nil;
+ NSString *infoPath = [NSString stringWithFormat:@"%@/%@/%@", bundlePath, bundle, SPBundleFileName];
+ NSData *pData = [NSData dataWithContentsOfFile:infoPath options:NSUncachedRead error:&readError];
+
+ cmdData = [[NSPropertyListSerialization propertyListFromData:pData
+ mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&convError] retain];
+
+ if(!cmdData || readError != nil || [convError length] || !(format == NSPropertyListXMLFormat_v1_0 || format == NSPropertyListBinaryFormat_v1_0)) {
+ NSLog(@"“%@/%@” file couldn't be read.", bundle, SPBundleFileName);
+ NSBeep();
+ if (cmdData) [cmdData release];
+ } else {
+ if([cmdData objectForKey:SPBundleFileNameKey] && [[cmdData objectForKey:SPBundleFileNameKey] length] && [cmdData objectForKey:SPBundleFileScopeKey])
+ {
+ NSMutableDictionary *bundleCommand = [NSMutableDictionary dictionary];
+ [bundleCommand addEntriesFromDictionary:cmdData];
+ [bundleCommand setObject:[bundle stringByDeletingPathExtension] forKey:@"bundleName"];
+ [commandBundleArray addObject:bundleCommand];
+ }
+ if (cmdData) [cmdData release];
+ }
+ }
+ }
+ }
+}
+
+- (IBAction)scopeButtonChanged:(id)sender
+{
+
+}
+
+- (IBAction)inputPopuButtonChanged:(id)sender
+{
+
+}
+
+- (IBAction)duplicateCommandBundle:(id)sender
+{
+
+}
+
+- (IBAction)addCommandBundle:(id)sender
+{
+
+}
+
+- (IBAction)removeCommandBundle:(id)sender
+{
+
+}
+
+- (IBAction)revealCommandBundleInFinder:(id)sender
+{
+
+}
+
+- (IBAction)showHelp:(id)sender
+{
+
+}
+
+- (BOOL)windowShouldClose:(id)sender
+{
+ return YES;
+}
+
+#pragma mark -
+#pragma mark TableView datasource methods
+
+/**
+ * Returns the number of query commandBundleArray.
+ */
+- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView
+{
+ return [commandBundleArray count];
+}
+
+- (BOOL)tableView:(NSTableView *)aTableView shouldEditTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
+{
+ return YES;
+}
+
+/**
+ * Returns the value for the requested table column and row index.
+ */
+- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
+{
+
+ if([[aTableColumn identifier] isEqualToString:@"name"]) {
+ if(![[commandBundleArray objectAtIndex:rowIndex] objectForKey:@"name"]) return @"...";
+ return [[commandBundleArray objectAtIndex:rowIndex] objectForKey:@"bundleName"];
+ }
+ return @"";
+}
+
+/*
+ * Save favorite names if inline edited (suppress empty names)
+ */
+- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
+{
+
+ if([[aTableColumn identifier] isEqualToString:@"name"]) {
+ if([anObject isKindOfClass:[NSString class]] && [(NSString *)anObject length]) {
+ [[commandBundleArray objectAtIndex:rowIndex] setObject:anObject forKey:@"bundleName"];
+ }
+ }
+
+ [commandsTableView reloadData];
+}
+
+/*
+ * Changes in the name text field will be saved in data source directly
+ * to update the table view accordingly
+ */
+- (void)controlTextDidChange:(NSNotification *)notification
+{
+
+ // Do nothing if no favorite is selected
+ if([commandsTableView numberOfSelectedRows] < 1) return;
+
+ id object = [notification object];
+
+ if(object == nameTextField) {
+ [[commandBundleArray objectAtIndex:[commandsTableView selectedRow]] setObject:[nameTextField stringValue] forKey:@"name"];
+ [commandsTableView reloadData];
+ }
+
+}
+
+#pragma mark -
+#pragma mark Menu validation
+
+/**
+ * Menu item validation.
+ */
+- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
+{
+
+ return YES;
+
}
@end