Skip to content
Snippets Groups Projects
Commit 2f6baccd authored by George Nachman's avatar George Nachman
Browse files

Improve send input to all sessions to support toggling individual sessions or...

Improve send input to all sessions to support toggling individual sessions or senidng to just panes in current tab.
parent 2148ace1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="803"/>
<integer value="29"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
Loading
Loading
@@ -344,14 +344,47 @@
<reference key="NSOnImage" ref="643967552"/>
<reference key="NSMixedImage" ref="326707852"/>
</object>
<object class="NSMenuItem" id="491492217">
<object class="NSMenuItem" id="393004483">
<reference key="NSMenu" ref="360861402"/>
<string key="NSTitle">Send Input to All Sessions</string>
<string key="NSKeyEquiv">I</string>
<int key="NSKeyEquivModMask">1048576</int>
<string key="NSTitle">Send Input To...</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="643967552"/>
<reference key="NSMixedImage" ref="326707852"/>
<string key="NSAction">submenuAction:</string>
<object class="NSMenu" key="NSSubmenu" id="536673199">
<string key="NSTitle">Send Input To...</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="592873546">
<reference key="NSMenu" ref="536673199"/>
<string key="NSTitle">Send Input to Current Session Only</string>
<string key="NSKeyEquiv">I</string>
<int key="NSKeyEquivModMask">1572864</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="643967552"/>
<reference key="NSMixedImage" ref="326707852"/>
</object>
<object class="NSMenuItem" id="181582496">
<reference key="NSMenu" ref="536673199"/>
<string key="NSTitle">Send Input to All Panes in All Tabs</string>
<string key="NSKeyEquiv">I</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="643967552"/>
<reference key="NSMixedImage" ref="326707852"/>
</object>
<object class="NSMenuItem" id="41827785">
<reference key="NSMenu" ref="536673199"/>
<string key="NSTitle">Send Input to All Panes in Current Tab</string>
<string key="NSKeyEquiv">i</string>
<int key="NSKeyEquivModMask">1572864</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="643967552"/>
<reference key="NSMixedImage" ref="326707852"/>
</object>
</object>
</object>
</object>
<object class="NSMenuItem" id="983811310">
<reference key="NSMenu" ref="360861402"/>
Loading
Loading
@@ -2379,22 +2412,6 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
</object>
<int key="connectionID">829</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">toggleInputToAllSessions:</string>
<reference key="source" ref="620772211"/>
<reference key="destination" ref="491492217"/>
</object>
<int key="connectionID">855</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">sendInputToAllSessions</string>
<reference key="source" ref="608955146"/>
<reference key="destination" ref="491492217"/>
</object>
<int key="connectionID">856</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">selectTab</string>
Loading
Loading
@@ -2795,6 +2812,54 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
</object>
<int key="connectionID">1260</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">enableSendInputToAllPanes:</string>
<reference key="source" ref="620772211"/>
<reference key="destination" ref="41827785"/>
</object>
<int key="connectionID">1273</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">enableSendInputToAllTabs:</string>
<reference key="source" ref="620772211"/>
<reference key="destination" ref="181582496"/>
</object>
<int key="connectionID">1274</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">disableBroadcasting:</string>
<reference key="source" ref="620772211"/>
<reference key="destination" ref="592873546"/>
</object>
<int key="connectionID">1275</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">sendInputNormally</string>
<reference key="source" ref="608955146"/>
<reference key="destination" ref="592873546"/>
</object>
<int key="connectionID">1276</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">sendInputToAllSessions</string>
<reference key="source" ref="608955146"/>
<reference key="destination" ref="181582496"/>
</object>
<int key="connectionID">1278</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">sendInputToAllPanes</string>
<reference key="source" ref="608955146"/>
<reference key="destination" ref="41827785"/>
</object>
<int key="connectionID">1279</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
Loading
Loading
@@ -3076,7 +3141,6 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<reference ref="850887095"/>
<reference ref="461490733"/>
<reference ref="419480288"/>
<reference ref="491492217"/>
<reference ref="983811310"/>
<reference ref="39047848"/>
<reference ref="205523462"/>
Loading
Loading
@@ -3085,6 +3149,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<reference ref="931862216"/>
<reference ref="619695518"/>
<reference ref="549350617"/>
<reference ref="393004483"/>
</object>
<reference key="parent" ref="1015666104"/>
</object>
Loading
Loading
@@ -3192,11 +3257,6 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<reference key="object" ref="333391578"/>
<reference key="parent" ref="604196418"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">854</int>
<reference key="object" ref="491492217"/>
<reference key="parent" ref="360861402"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">857</int>
<reference key="object" ref="983811310"/>
Loading
Loading
@@ -3906,6 +3966,41 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<reference key="object" ref="675837179"/>
<reference key="parent" ref="203853260"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1261</int>
<reference key="object" ref="393004483"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="536673199"/>
</object>
<reference key="parent" ref="360861402"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1262</int>
<reference key="object" ref="536673199"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="181582496"/>
<reference ref="41827785"/>
<reference ref="592873546"/>
</object>
<reference key="parent" ref="393004483"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1264</int>
<reference key="object" ref="181582496"/>
<reference key="parent" ref="536673199"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1266</int>
<reference key="object" ref="41827785"/>
<reference key="parent" ref="536673199"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">1268</int>
<reference key="object" ref="592873546"/>
<reference key="parent" ref="536673199"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
Loading
Loading
@@ -3929,6 +4024,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>1151.IBPluginDependency</string>
<string>1152.IBPluginDependency</string>
<string>1158.IBPluginDependency</string>
<string>1159.IBEditorWindowLastContentRect</string>
<string>1159.IBPluginDependency</string>
<string>1163.IBPluginDependency</string>
<string>1164.IBPluginDependency</string>
Loading
Loading
@@ -3946,6 +4042,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>1205.IBPluginDependency</string>
<string>1207.IBPluginDependency</string>
<string>1209.IBPluginDependency</string>
<string>1210.IBEditorWindowLastContentRect</string>
<string>1210.IBPluginDependency</string>
<string>1212.IBPluginDependency</string>
<string>1213.IBPluginDependency</string>
Loading
Loading
@@ -3966,6 +4063,12 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>1250.IBPluginDependency</string>
<string>1251.IBPluginDependency</string>
<string>1257.IBPluginDependency</string>
<string>1261.IBPluginDependency</string>
<string>1262.IBEditorWindowLastContentRect</string>
<string>1262.IBPluginDependency</string>
<string>1264.IBPluginDependency</string>
<string>1266.IBPluginDependency</string>
<string>1268.IBPluginDependency</string>
<string>129.IBPluginDependency</string>
<string>130.IBPluginDependency</string>
<string>131.IBPluginDependency</string>
Loading
Loading
@@ -3978,6 +4081,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>150.IBPluginDependency</string>
<string>157.IBPluginDependency</string>
<string>163.IBPluginDependency</string>
<string>169.IBEditorWindowLastContentRect</string>
<string>169.IBPluginDependency</string>
<string>172.IBPluginDependency</string>
<string>174.IBPluginDependency</string>
Loading
Loading
@@ -3993,6 +4097,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>23.IBPluginDependency</string>
<string>230.IBPluginDependency</string>
<string>233.IBPluginDependency</string>
<string>24.IBEditorWindowLastContentRect</string>
<string>24.IBPluginDependency</string>
<string>266.IBPluginDependency</string>
<string>29.IBEditorWindowLastContentRect</string>
Loading
Loading
@@ -4007,6 +4112,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>56.IBPluginDependency</string>
<string>57.IBPluginDependency</string>
<string>591.IBPluginDependency</string>
<string>592.IBEditorWindowLastContentRect</string>
<string>592.IBPluginDependency</string>
<string>598.IBPluginDependency</string>
<string>632.IBPluginDependency</string>
Loading
Loading
@@ -4020,6 +4126,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>755.IBPluginDependency</string>
<string>758.IBPluginDependency</string>
<string>759.IBPluginDependency</string>
<string>760.IBEditorWindowLastContentRect</string>
<string>760.IBPluginDependency</string>
<string>761.IBPluginDependency</string>
<string>762.IBPluginDependency</string>
Loading
Loading
@@ -4036,6 +4143,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>805.IBPluginDependency</string>
<string>806.IBPluginDependency</string>
<string>807.IBPluginDependency</string>
<string>81.IBEditorWindowLastContentRect</string>
<string>81.IBPluginDependency</string>
<string>822.IBPluginDependency</string>
<string>823.IBPluginDependency</string>
Loading
Loading
@@ -4046,9 +4154,9 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>843.IBPluginDependency</string>
<string>845.IBPluginDependency</string>
<string>847.IBPluginDependency</string>
<string>848.IBEditorWindowLastContentRect</string>
<string>848.IBPluginDependency</string>
<string>849.IBPluginDependency</string>
<string>854.IBPluginDependency</string>
<string>857.IBPluginDependency</string>
<string>867.IBPluginDependency</string>
<string>868.IBPluginDependency</string>
Loading
Loading
@@ -4104,6 +4212,10 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{378, 652}, {397, 83}}</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>
Loading
Loading
@@ -4118,6 +4230,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{594, 472}, {217, 133}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Loading
Loading
@@ -4139,6 +4252,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{332, 562}, {358, 63}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Loading
Loading
@@ -4155,6 +4269,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{133, 482}, {245, 343}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Loading
Loading
@@ -4170,6 +4285,9 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{296, 482}, {298, 343}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{0, 825}, {428, 20}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Loading
Loading
@@ -4182,6 +4300,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{227, 742}, {291, 83}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Loading
Loading
@@ -4195,6 +4314,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{378, 532}, {238, 103}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Loading
Loading
@@ -4211,6 +4331,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{82, 522}, {250, 303}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Loading
Loading
@@ -4221,7 +4342,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</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>{{594, 529}, {64, 6}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
Loading
Loading
@@ -4277,7 +4398,7 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">1260</int>
<int key="maxID">1279</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
Loading
Loading
@@ -4844,7 +4965,10 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>closeInstantReplay:</string>
<string>closeTabContextualMenuAction:</string>
<string>closeWindow:</string>
<string>disableBroadcasting:</string>
<string>editCurrentSession:</string>
<string>enableSendInputToAllPanes:</string>
<string>enableSendInputToAllTabs:</string>
<string>irButton:</string>
<string>irNext:</string>
<string>irPrev:</string>
Loading
Loading
@@ -4872,7 +4996,6 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>splitHorizontally:</string>
<string>splitVertically:</string>
<string>toggleFullScreenMode:</string>
<string>toggleInputToAllSessions:</string>
<string>toggleUseTransparency:</string>
<string>windowDeminiaturize:</string>
<string>windowDidToggleToolbarVisibility:</string>
Loading
Loading
@@ -4926,6 +5049,8 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
Loading
Loading
@@ -4939,7 +5064,10 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>closeInstantReplay:</string>
<string>closeTabContextualMenuAction:</string>
<string>closeWindow:</string>
<string>disableBroadcasting:</string>
<string>editCurrentSession:</string>
<string>enableSendInputToAllPanes:</string>
<string>enableSendInputToAllTabs:</string>
<string>irButton:</string>
<string>irNext:</string>
<string>irPrev:</string>
Loading
Loading
@@ -4967,7 +5095,6 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>splitHorizontally:</string>
<string>splitVertically:</string>
<string>toggleFullScreenMode:</string>
<string>toggleInputToAllSessions:</string>
<string>toggleUseTransparency:</string>
<string>windowDeminiaturize:</string>
<string>windowDidToggleToolbarVisibility:</string>
Loading
Loading
@@ -5006,10 +5133,22 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string key="name">closeWindow:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">disableBroadcasting:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">editCurrentSession:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">enableSendInputToAllPanes:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">enableSendInputToAllTabs:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">irButton:</string>
<string key="candidateClassName">id</string>
Loading
Loading
@@ -5118,10 +5257,6 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string key="name">toggleFullScreenMode:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleInputToAllSessions:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleUseTransparency:</string>
<string key="candidateClassName">id</string>
Loading
Loading
@@ -5461,6 +5596,8 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>previousTerminal</string>
<string>secureInput</string>
<string>selectTab</string>
<string>sendInputNormally</string>
<string>sendInputToAllPanes</string>
<string>sendInputToAllSessions</string>
<string>showFullScreenTabs</string>
<string>toggleBookmarksView</string>
Loading
Loading
@@ -5486,6 +5623,8 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
<string>NSMenuItem</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
Loading
Loading
@@ -5506,6 +5645,8 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string>previousTerminal</string>
<string>secureInput</string>
<string>selectTab</string>
<string>sendInputNormally</string>
<string>sendInputToAllPanes</string>
<string>sendInputToAllSessions</string>
<string>showFullScreenTabs</string>
<string>toggleBookmarksView</string>
Loading
Loading
@@ -5569,6 +5710,14 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string key="name">selectTab</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">sendInputNormally</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">sendInputToAllPanes</string>
<string key="candidateClassName">NSMenuItem</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">sendInputToAllSessions</string>
<string key="candidateClassName">NSMenuItem</string>
Loading
Loading
@@ -6065,28 +6214,28 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">ImageKit.framework/Headers/IKSaveOptions.h</string>
<string key="minorKey">ImageKit.framework/Headers/ImageKitDeprecated.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">ImageKit.framework/Headers/ImageKitDeprecated.h</string>
<string key="minorKey">PDFKit.framework/Headers/PDFDocument.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="331072972">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">PDFKit.framework/Headers/PDFDocument.h</string>
<string key="minorKey">PDFKit.framework/Headers/PDFView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="331072972">
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">PDFKit.framework/Headers/PDFView.h</string>
<string key="minorKey">Print.framework/Headers/PDEPluginInterface.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
Loading
Loading
@@ -6131,13 +6280,6 @@ dy5hbmR5bWF0dXNjaGFrLm9yZy9wYWdlcy9zcGFya2xlCgoKCgoKCgoKCgoKCgoKCg</bytes>
<string key="minorKey">QuartzFilters.framework/Headers/QuartzFilterManager.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">QuickLookUI.framework/Headers/QLPreviewPanel.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
Loading
Loading
Loading
Loading
@@ -49,7 +49,6 @@
- (void)sessionInitiatedResize:(PTYSession*)session width:(int)width height:(int)height;
- (BOOL)fullScreen;
- (BOOL)anyFullScreen;
- (BOOL)sendInputToAllSessions;
- (void)closeSession:(PTYSession*)aSession;
- (IBAction)nextTab:(id)sender;
- (IBAction)previousTab:(id)sender;
Loading
Loading
@@ -61,7 +60,6 @@
- (BOOL)tempTitle;
- (PTYTabView *)tabView;
- (PTYSession *)currentSession;
- (void)sendInputToAllSessions:(NSData *)data;
- (void)setWindowTitle;
- (void)resetTempTitle;
- (PTYTab*)currentTab;
Loading
Loading
Loading
Loading
@@ -117,13 +117,6 @@
return isLionFullScreen || isFullScreen;
}
 
// TODO(georgen): disable send input to all sessions when you transition to
// dvr mode; or else make it work.
- (BOOL)sendInputToAllSessions
{
return NO;
}
- (PTYSession *)currentSession
{
return session;
Loading
Loading
@@ -214,10 +207,6 @@
}
 
 
- (void)sendInputToAllSessions:(NSData *)data
{
}
- (void)windowSetFrameTopLeftPoint:(NSPoint)point
{
}
Loading
Loading
Loading
Loading
@@ -37,6 +37,13 @@
 
@class PTYSession, iTermController, PTToolbarController, PSMTabBarControl;
 
typedef enum {
BROADCAST_OFF,
BROADCAST_TO_ALL_PANES,
BROADCAST_TO_ALL_TABS,
BROADCAST_CUSTOM
} BroadcastMode;
// The BottomBar's view is of this class. It overrides drawing the background.
@interface BottomBarView : NSView
{
Loading
Loading
@@ -127,8 +134,8 @@
// True if an [init...] method was called.
BOOL windowInited;
 
// True if input is being redirected to all sessions.
BOOL sendInputToAllSessions;
// How input should be broadcast (or not).
BroadcastMode broadcastMode_;
 
// True if the window title is showing transient information (such as the
// size during resizing).
Loading
Loading
@@ -197,6 +204,8 @@
double lastResizeTime_;
 
BOOL temporarilyShowingTabs_;
NSMutableSet *broadcastViewIds_;
}
 
// Initialize a new PseudoTerminal.
Loading
Loading
@@ -549,9 +558,6 @@
// Update irBar.
- (void)updateInstantReplay;
 
// accessor
- (BOOL)sendInputToAllSessions;
-(void)replaySession:(PTYSession *)session;
 
// WindowControllerInterface protocol
Loading
Loading
@@ -617,6 +623,12 @@
- (void)setIsOrderedOut:(BOOL)value;
- (void)screenParametersDidChange;
 
// setter
- (void)setBroadcastMode:(BroadcastMode)mode;
- (void)toggleBroadcastingInputToSession:(PTYSession *)session;
- (BroadcastMode)broadcastMode;
- (BOOL)broadcastInputToSession:(PTYSession *)session;
@end
 
@interface PseudoTerminal (KeyValueCoding)
Loading
Loading
@@ -780,12 +792,11 @@
// Returns true if the given menu item is selectable.
- (BOOL)validateMenuItem:(NSMenuItem *)item;
 
// setter
- (void)setSendInputToAllSessions:(BOOL)flag;
// Turn on/off sending of input to all sessions. This causes a bunch of UI
// to update in addition to flipping the flag.
- (IBAction)toggleInputToAllSessions:(id)sender;
- (IBAction)enableSendInputToAllTabs:(id)sender;
- (IBAction)enableSendInputToAllPanes:(id)sender;
- (IBAction)disableBroadcasting:(id)sender;
 
// Show a dialog confirming close. Returns YES if the window should be closed.
- (BOOL)showCloseWindow;
Loading
Loading
Loading
Loading
@@ -581,8 +581,8 @@ static NSString* SESSION_ARRANGEMENT_WORKING_DIRECTORY = @"Working Directory";
- (void)writeTask:(NSData*)data
{
// check if we want to send this input to all the sessions
id<WindowControllerInterface> parent = [[self tab] parentWindow];
if ([parent sendInputToAllSessions] == NO) {
if (![[[self tab] realParentWindow] broadcastInputToSession:self]) {
// Send to only this session
if (!EXIT) {
[self setBell:NO];
PTYScroller* ptys = (PTYScroller*)[SCROLLVIEW verticalScroller];
Loading
Loading
@@ -591,7 +591,7 @@ static NSString* SESSION_ARRANGEMENT_WORKING_DIRECTORY = @"Working Directory";
}
} else {
// send to all sessions
[parent sendInputToAllSessions:data];
[[[self tab] realParentWindow] sendInputToAllSessions:data];
}
}
 
Loading
Loading
@@ -2881,7 +2881,9 @@ static long long timeInTenthsOfSeconds(struct timeval t)
}
 
if (contentsOfFile != nil) {
aString = [NSString stringWithContentsOfFile:contentsOfFile];
aString = [NSString stringWithContentsOfFile:contentsOfFile
encoding:NSUTF8StringEncoding
error:nil];
data = [aString dataUsingEncoding:[TERMINAL encoding]];
}
 
Loading
Loading
Loading
Loading
@@ -2570,7 +2570,7 @@ static void SetAgainstGrainDim(BOOL isVertical, NSSize* dest, CGFloat value)
}
 
if (![[self activeSession] growlNewOutput] &&
![[self parentWindow] sendInputToAllSessions] &&
[[self realParentWindow] broadcastMode] == BROADCAST_OFF &&
[[[self activeSession] SCREEN] growl] &&
[[NSDate date] timeIntervalSinceDate:[SessionView lastResizeDate]] > POST_WINDOW_RESIZE_SILENCE_SEC) {
[[iTermGrowlDelegate sharedInstance] growlNotify:NSLocalizedStringFromTableInBundle(@"New Output",
Loading
Loading
Loading
Loading
@@ -67,7 +67,7 @@ static const int MAX_WORKING_DIR_COUNT = 50;
// recognized as a drag.
static const int kDragThreshold = 3;
static const double kBackgroundConsideredDarkThreshold = 0.5;
static const int kBroadcastMargin = 4;
// When drawing lines, we use this structure to represent a run of cells of
// the same font, color, and attributes.
typedef enum {
Loading
Loading
@@ -113,6 +113,7 @@ static NSCursor* textViewCursor = nil;
static NSImage* bellImage = nil;
static NSImage* wrapToTopImage = nil;
static NSImage* wrapToBottomImage = nil;
static NSImage* broadcastInputImage = nil;
 
static CGFloat PerceivedBrightness(CGFloat r, CGFloat g, CGFloat b) {
return (RED_COEFFICIENT * r) + (GREEN_COEFFICIENT * g) + (BLUE_COEFFICIENT * b);
Loading
Loading
@@ -181,16 +182,21 @@ static CGFloat PerceivedBrightness(CGFloat r, CGFloat g, CGFloat b) {
[bellImage setFlipped:YES];
 
NSString* wrapToTopFile = [bundle
pathForResource:@"wrap_to_top"
ofType:@"png"];
pathForResource:@"wrap_to_top"
ofType:@"png"];
wrapToTopImage = [[NSImage alloc] initWithContentsOfFile:wrapToTopFile];
[wrapToTopImage setFlipped:YES];
 
NSString* wrapToBottomFile = [bundle
pathForResource:@"wrap_to_bottom"
ofType:@"png"];
pathForResource:@"wrap_to_bottom"
ofType:@"png"];
wrapToBottomImage = [[NSImage alloc] initWithContentsOfFile:wrapToBottomFile];
[wrapToBottomImage setFlipped:YES];
NSString* broadcastInputFile = [bundle pathForResource:@"BroadcastInput"
ofType:@"png"];
broadcastInputImage = [[NSImage alloc] initWithContentsOfFile:broadcastInputFile];
[broadcastInputImage setFlipped:YES];
}
 
+ (NSCursor *)textViewCursor
Loading
Loading
@@ -1483,6 +1489,16 @@ static BOOL RectsEqual(NSRect* a, NSRect* b) {
{
[self drawRect:rect to:nil];
 
if ([[[[dataSource session] tab] realParentWindow] broadcastInputToSession:[dataSource session]]) {
NSRect frame = [self visibleRect];
NSSize size = [broadcastInputImage size];
[broadcastInputImage drawAtPoint:NSMakePoint(frame.origin.x + frame.size.width - size.width - kBroadcastMargin,
frame.origin.y + kBroadcastMargin)
fromRect:NSMakeRect(0, 0, size.width, size.height)
operation:NSCompositeSourceOver
fraction:0.5];
}
if (flashing_ > 0) {
NSRect frame = [self visibleRect];
NSImage* image = nil;
Loading
Loading
@@ -1606,7 +1622,7 @@ static BOOL RectsEqual(NSRect* a, NSRect* b) {
dl[i] = theLine[i].code;
}
}
DebugLog([NSString stringWithCString:dl]);
DebugLog([NSString stringWithUTF8String:dl]);
}
 
#ifdef DEBUG_DRAWING
Loading
Loading
@@ -3042,6 +3058,11 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
[[[[dataSource session] tab] realParentWindow] editSession:[dataSource session]];
}
 
- (void)toggleBroadcastingInput:(id)sender
{
[[[[dataSource session] tab] realParentWindow] toggleBroadcastingInputToSession:[dataSource session]];
}
- (void)closeTextViewSession:(id)sender
{
[[[[dataSource session] tab] realParentWindow] closeSessionWithConfirmation:[dataSource session]];
Loading
Loading
@@ -3081,6 +3102,15 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
}
}
 
- (BOOL)_broadcastToggleable
{
PseudoTerminal *pty = [[[dataSource session] tab] realParentWindow];
if ([pty broadcastMode] == BROADCAST_OFF && [[pty currentSession] TEXTVIEW] == self) {
return NO;
}
return YES;
}
- (BOOL)validateMenuItem:(NSMenuItem *)item
{
if ([item action] == @selector(paste:)) {
Loading
Loading
@@ -3092,6 +3122,10 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
// Never allow cut.
return NO;
}
if ([item action]==@selector(toggleBroadcastingInput:) &&
[self _broadcastToggleable]) {
return YES;
}
if ([item action]==@selector(saveDocumentAs:)) {
return [self isAnyCharSelected];
} else if ([item action] == @selector(selectAll:) ||
Loading
Loading
@@ -3193,6 +3227,14 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
// Separator
[theMenu addItem:[NSMenuItem separatorItem]];
 
// Toggle broadcast
[theMenu addItemWithTitle:@"Toggle Broadcasting Input"
action:@selector(toggleBroadcastingInput:)
keyEquivalent:@""];
// Separator
[theMenu addItem:[NSMenuItem separatorItem]];
// Close current pane
[theMenu addItemWithTitle:@"Close"
action:@selector(closeTextViewSession:)
Loading
Loading
@@ -5042,35 +5084,6 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
[self _drawRuns:initialPoint runs:runs numRuns:numRuns];
}
 
- (void)_drawStripesInRect:(NSRect)rect
{
[NSGraphicsContext saveGraphicsState];
NSRectClip(rect);
[[NSGraphicsContext currentContext] setCompositingOperation:NSCompositeSourceOver];
const CGFloat kStripeWidth = 40;
const double kSlope = 1;
for (CGFloat x = kSlope * -fmod(rect.origin.y, kStripeWidth * 2) -2 * kStripeWidth ;
x < rect.origin.x + rect.size.width;
x += kStripeWidth * 2) {
if (x + 2 * kStripeWidth + rect.size.height * kSlope < rect.origin.x) {
continue;
}
NSBezierPath* thePath = [NSBezierPath bezierPath];
[thePath moveToPoint:NSMakePoint(x, rect.origin.y + rect.size.height)];
[thePath lineToPoint:NSMakePoint(x + kSlope * rect.size.height, rect.origin.y)];
[thePath lineToPoint:NSMakePoint(x + kSlope * rect.size.height + kStripeWidth, rect.origin.y)];
[thePath lineToPoint:NSMakePoint(x + kStripeWidth, rect.origin.y + rect.size.height)];
[thePath closePath];
[[[NSColor redColor] colorWithAlphaComponent:0.15] set];
[thePath fill];
}
[NSGraphicsContext restoreGraphicsState];
}
- (BOOL)_drawLine:(int)line AtY:(double)curY toPoint:(NSPoint*)toPoint
{
BOOL anyBlinking = NO;
Loading
Loading
@@ -5274,10 +5287,6 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
}
 
// Draw red stripes in the background if sending input to all sessions
if ([[[[dataSource session] tab] realParentWindow] sendInputToAllSessions]) {
[self _drawStripesInRect:bgRect];
}
NSPoint textOrigin;
if (toPoint) {
textOrigin = NSMakePoint(toPoint->x + MARGIN + bgstart * charWidth,
Loading
Loading
Loading
Loading
@@ -208,6 +208,7 @@ NSString *sessionsKey = @"sessions";
[commandField setDelegate:self];
[bottomBar retain];
windowType_ = windowType;
broadcastViewIds_ = [[NSMutableSet alloc] init];
pbHistoryView = [[PasteboardHistoryView alloc] init];
autocompleteView = [[AutocompleteView alloc] init];
 
Loading
Loading
@@ -736,6 +737,7 @@ NSString *sessionsKey = @"sessions";
[TABVIEW removeTabViewItem:aTabViewItem];
}
 
[broadcastViewIds_ release];
[commandField release];
[bottomBar release];
[_toolbarController release];
Loading
Loading
@@ -794,15 +796,75 @@ NSString *sessionsKey = @"sessions";
int i;
 
int n = [TABVIEW numberOfTabViewItems];
for (i = 0; i < n; ++i) {
for (PTYSession* aSession in [[[TABVIEW tabViewItemAtIndex:i] identifier] sessions]) {
if (![aSession exited]) {
[[aSession SHELL] writeTask:data];
switch (broadcastMode_) {
case BROADCAST_OFF:
return;
case BROADCAST_TO_ALL_PANES:
for (PTYSession* aSession in [[self currentTab] sessions]) {
if (![aSession exited]) {
[[aSession SHELL] writeTask:data];
}
}
break;
case BROADCAST_TO_ALL_TABS:
for (i = 0; i < n; ++i) {
for (PTYSession* aSession in [[[TABVIEW tabViewItemAtIndex:i] identifier] sessions]) {
if (![aSession exited]) {
[[aSession SHELL] writeTask:data];
}
}
}
break;
case BROADCAST_CUSTOM: {
for (PTYTab *aTab in [self tabs]) {
for (PTYSession *aSession in [aTab sessions]) {
if ([broadcastViewIds_ containsObject:[NSNumber numberWithInt:[[aSession view] viewId]]]) {
if (![aSession exited]) {
[[aSession SHELL] writeTask:data];
}
}
}
}
break;
}
}
}
 
- (BOOL)broadcastInputToSession:(PTYSession *)session
{
switch (broadcastMode_) {
case BROADCAST_OFF:
return NO;
case BROADCAST_TO_ALL_PANES:
for (PTYSession* aSession in [[self currentTab] sessions]) {
if (aSession == session) {
return YES;
}
}
return NO;
case BROADCAST_TO_ALL_TABS:
for (PTYTab *aTab in [self tabs]) {
for (PTYSession* aSession in [aTab sessions]) {
if (aSession == session) {
return YES;
}
}
}
return NO;
case BROADCAST_CUSTOM:
return [broadcastViewIds_ containsObject:[NSNumber numberWithInt:[[session view] viewId]]];
default:
return NO;
}
}
+ (PseudoTerminal*)terminalWithArrangement:(NSDictionary*)arrangement
{
PseudoTerminal* term;
Loading
Loading
@@ -1036,7 +1098,7 @@ NSString *sessionsKey = @"sessions";
- (void)windowDidBecomeKey:(NSNotification *)aNotification
{
isOrderedOut_ = NO;
#if DEBUG_METHOD_TRACE
NSLog(@"%s(%d):-[PseudoTerminal windowDidBecomeKey:%@]",
__FILE__, __LINE__, aNotification);
Loading
Loading
@@ -1047,6 +1109,7 @@ NSString *sessionsKey = @"sessions";
[[iTermController sharedInstance] setCurrentTerminal:self];
[[[NSApplication sharedApplication] delegate] updateMaximizePaneMenuItem];
[[[NSApplication sharedApplication] delegate] updateUseTransparencyMenuItem];
[[[NSApplication sharedApplication] delegate] updateBroadcastMenuState];
if (_fullScreen && [[self window] alphaValue] > 0) {
// Is a fullscreen window and is not a hidden hotkey window.
[self hideMenuBar];
Loading
Loading
@@ -1428,6 +1491,7 @@ NSString *sessionsKey = @"sessions";
PtyLog(@"toggleFullScreenMode - set new frame to old frame: %fx%f", oldFrame_.size.width, oldFrame_.size.height);
[[newTerminal window] setFrame:oldFrame_ display:YES];
}
newTerminal->broadcastMode_ = broadcastMode_;
 
// Ensure that fullscreen windows (often hotkey windows) don't lose their collection behavior.
[[newTerminal window] setCollectionBehavior:[[self window] collectionBehavior]];
Loading
Loading
@@ -2439,7 +2503,7 @@ NSString *sessionsKey = @"sessions";
 
- (BOOL)sendInputToAllSessions
{
return (sendInputToAllSessions);
return broadcastMode_ != BROADCAST_OFF;
}
 
-(void)replaySession:(PTYSession *)oldSession
Loading
Loading
@@ -3000,6 +3064,93 @@ NSString *sessionsKey = @"sessions";
return [NSDate dateWithTimeIntervalSince1970:lastResizeTime_];
}
 
- (BroadcastMode)broadcastMode
{
return broadcastMode_;
}
- (void)setBroadcastMode:(BroadcastMode)mode
{
if (mode != BROADCAST_OFF && broadcastMode_ == BROADCAST_OFF) {
if (NSRunAlertPanel(@"Warning!",
@"Keyboard input will be sent to multiple sessions.",
@"OK",
@"Cancel",
nil) != NSAlertDefaultReturn) {
return;
}
}
broadcastMode_ = mode;
PTYSession *activeSession = [[self currentTab] activeSession];
for (PTYSession *aSession in [[self currentTab] sessions]) {
if (aSession != activeSession) {
[[aSession view] setDimmed:(mode == BROADCAST_OFF)];
}
[[aSession view] setNeedsDisplay:YES];
}
[[[NSApplication sharedApplication] delegate] updateBroadcastMenuState];
}
- (void)toggleBroadcastingInputToSession:(PTYSession *)session
{
NSNumber *n = [NSNumber numberWithInt:[[session view] viewId]];
switch (broadcastMode_) {
case BROADCAST_TO_ALL_PANES:
[broadcastViewIds_ removeAllObjects];
for (PTYSession *aSession in [[self currentTab] sessions]) {
[broadcastViewIds_ addObject:[NSNumber numberWithInt:[[aSession view] viewId]]];
}
break;
case BROADCAST_TO_ALL_TABS:
[broadcastViewIds_ removeAllObjects];
for (PTYTab *aTab in [self tabs]) {
for (PTYSession *aSession in [aTab sessions]) {
[broadcastViewIds_ addObject:[NSNumber numberWithInt:[[aSession view] viewId]]];
}
}
break;
case BROADCAST_OFF:
[broadcastViewIds_ removeAllObjects];
break;
case BROADCAST_CUSTOM:
break;
}
broadcastMode_ = BROADCAST_CUSTOM;
int prevCount = [broadcastViewIds_ count];
if ([broadcastViewIds_ containsObject:n]) {
[broadcastViewIds_ removeObject:n];
} else {
[broadcastViewIds_ addObject:n];
}
if ([broadcastViewIds_ count] == 0) {
// Untoggled the last session.
broadcastMode_ = BROADCAST_OFF;
} else if ([broadcastViewIds_ count] == 1 &&
prevCount == 2) {
// Untoggled a session and got down to 1. Disable broadcast because you can't broadcast with
// fewer than 2 sessions.
broadcastMode_ = BROADCAST_OFF;
[broadcastViewIds_ removeAllObjects];
} else if ([broadcastViewIds_ count] == 1) {
// Turned on one session so add the current session.
[broadcastViewIds_ addObject:[NSNumber numberWithInt:[[[self currentSession] view] viewId]]];
if ([broadcastViewIds_ count] == 1) {
// The client did a bad thing by allowing you to toggle the current session! Abort!
broadcastMode_ = BROADCAST_OFF;
[broadcastViewIds_ removeAllObjects];
}
}
for (PTYTab *aTab in [self tabs]) {
for (PTYSession *aSession in [aTab sessions]) {
[[aSession view] setNeedsDisplay:YES];
}
}
[[[NSApplication sharedApplication] delegate] updateBroadcastMenuState];
}
@end
 
@implementation PseudoTerminal (Private)
Loading
Loading
@@ -3954,42 +4105,31 @@ NSString *sessionsKey = @"sessions";
return result;
}
 
- (void)setSendInputToAllSessions:(BOOL)flag
- (IBAction)enableSendInputToAllPanes:(id)sender
{
#if DEBUG_METHOD_TRACE
NSLog(@"%s", __PRETTY_FUNCTION__);
#endif
[self setBroadcastMode:BROADCAST_TO_ALL_PANES];
 
sendInputToAllSessions = flag;
if (flag) {
sendInputToAllSessions = (NSRunAlertPanel(NSLocalizedStringFromTableInBundle(@"Warning!",@"iTerm", [NSBundle bundleForClass: [self class]], @"Warning"),
NSLocalizedStringFromTableInBundle(@"Keyboard input will be sent to all sessions in this terminal.",@"iTerm", [NSBundle bundleForClass: [self class]], @"Keyboard Input"),
NSLocalizedStringFromTableInBundle(@"OK",@"iTerm", [NSBundle bundleForClass: [self class]], @"Profile"),
NSLocalizedStringFromTableInBundle(@"Cancel",@"iTerm", [NSBundle bundleForClass: [self class]], @"Cancel"), nil) == NSAlertDefaultReturn);
}
NSColor* tabColor = [tabBarControl tabColorForTabViewItem:[TABVIEW selectedTabViewItem]];
if (tabColor) {
[[self window] setBackgroundColor:tabColor];
[background_ setColor:tabColor];
} else {
[[self window] setBackgroundColor:nil];
[background_ setColor:normalBackgroundColor];
}
PTYSession *activeSession = [[self currentTab] activeSession];
for (PTYSession *aSession in [[self currentTab] sessions]) {
if (aSession != activeSession) {
[[aSession view] setDimmed:!flag];
}
}
// Post a notification to reload menus
[[NSNotificationCenter defaultCenter] postNotificationName:@"iTermWindowBecameKey"
object:self
userInfo:nil];
[self setWindowTitle];
}
 
- (IBAction)toggleInputToAllSessions:(id)sender
- (IBAction)disableBroadcasting:(id)sender
{
#if DEBUG_METHOD_TRACE
NSLog(@"%s(%d):-[PseudoTerminal toggleInputToAllSessions:%@]",
__FILE__, __LINE__, sender);
#endif
[self setSendInputToAllSessions:![self sendInputToAllSessions]];
[self setBroadcastMode:BROADCAST_OFF];
// Post a notification to reload menus
[[NSNotificationCenter defaultCenter] postNotificationName:@"iTermWindowBecameKey"
object:self
userInfo:nil];
[self setWindowTitle];
}
- (IBAction)enableSendInputToAllTabs:(id)sender
{
[self setBroadcastMode:BROADCAST_TO_ALL_TABS];
 
// Post a notification to reload menus
[[NSNotificationCenter defaultCenter] postNotificationName:@"iTermWindowBecameKey"
Loading
Loading
Loading
Loading
@@ -29,6 +29,7 @@
#import "PTYSession.h"
#import "PTYTab.h"
#import "PTYTextView.h"
#import "PseudoTerminal.h"
 
static const float kTargetFrameRate = 1.0/60.0;
static int nextViewId;
Loading
Loading
@@ -182,7 +183,7 @@ static NSDate* lastResizeDate_;
if (isDimmed == dim_) {
return;
}
if ([[[session_ tab] realParentWindow] sendInputToAllSessions]) {
if ([[[session_ tab] realParentWindow] broadcastInputToSession:session_]) {
dim_ = NO;
} else {
dim_ = isDimmed;
Loading
Loading
Loading
Loading
@@ -770,7 +770,7 @@ static VT100TCC decode_xterm(unsigned char *datap,
}
}
else {
*datap++;
datap++;
datalen--;
(*rmlen)++;
}
Loading
Loading
Loading
Loading
@@ -35,7 +35,6 @@
- (void)sessionInitiatedResize:(PTYSession*)session width:(int)width height:(int)height;
- (BOOL)fullScreen;
- (BOOL)anyFullScreen;
- (BOOL)sendInputToAllSessions;
- (void)closeSession:(PTYSession*)aSession;
- (IBAction)nextTab:(id)sender;
- (IBAction)previousTab:(id)sender;
Loading
Loading
@@ -48,7 +47,6 @@
- (void)fitWindowToTab:(PTYTab*)tab;
- (PTYTabView *)tabView;
- (PTYSession *)currentSession;
- (void)sendInputToAllSessions:(NSData *)data;
- (void)setWindowTitle;
- (void)resetTempTitle;
- (PTYTab*)currentTab;
Loading
Loading
Loading
Loading
@@ -166,6 +166,7 @@
1D85D1ED1306687700A3E998 /* RegexKitLite.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D85D1D81306687700A3E998 /* RegexKitLite.h */; };
1D85D1EF1306687700A3E998 /* RegexKitLite.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D85D1DA1306687700A3E998 /* RegexKitLite.m */; };
1D8C6BF5126592DF00E2744E /* EncodingsWithLowerCase.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1D8C6BF4126592DF00E2744E /* EncodingsWithLowerCase.plist */; };
1D8F396B13EB7A2C0025B80B /* BroadcastInput.png in Resources */ = {isa = PBXBuildFile; fileRef = 1D8F396A13EB7A2C0025B80B /* BroadcastInput.png */; };
1D93D33512695442007F741B /* DVR.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D93D33312695442007F741B /* DVR.h */; };
1D93D33612695442007F741B /* DVR.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D93D33412695442007F741B /* DVR.m */; };
1D93D3471269741B007F741B /* DVRBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D93D3451269741B007F741B /* DVRBuffer.h */; };
Loading
Loading
@@ -339,6 +340,7 @@
1D85D1D81306687700A3E998 /* RegexKitLite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegexKitLite.h; sourceTree = "<group>"; };
1D85D1DA1306687700A3E998 /* RegexKitLite.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegexKitLite.m; sourceTree = "<group>"; };
1D8C6BF4126592DF00E2744E /* EncodingsWithLowerCase.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = EncodingsWithLowerCase.plist; sourceTree = "<group>"; };
1D8F396A13EB7A2C0025B80B /* BroadcastInput.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = BroadcastInput.png; path = images/BroadcastInput.png; sourceTree = "<group>"; };
1D93D33312695442007F741B /* DVR.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVR.h; sourceTree = "<group>"; };
1D93D33412695442007F741B /* DVR.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DVR.m; sourceTree = "<group>"; };
1D93D3451269741B007F741B /* DVRBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DVRBuffer.h; sourceTree = "<group>"; };
Loading
Loading
@@ -811,6 +813,7 @@
1D093C131217412B0029F9AD /* Resources */ = {
isa = PBXGroup;
children = (
1D8F396A13EB7A2C0025B80B /* BroadcastInput.png */,
1D395912134E75B5005A8021 /* SmartSelectionRules.plist */,
1DA02CFA1327612600D7E7DB /* bell.png */,
1DA030F71328BD7C00D7E7DB /* wrap_to_bottom.png */,
Loading
Loading
@@ -1295,6 +1298,7 @@
1D1158CE13444D29009B366F /* iTerm2 Help in Resources */,
1D395913134E75B5005A8021 /* SmartSelectionRules.plist in Resources */,
1DB72CF61396059200EB1005 /* xterm-terminfo.txt in Resources */,
1D8F396B13EB7A2C0025B80B /* BroadcastInput.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Loading
Loading
Loading
Loading
@@ -71,6 +71,8 @@ void DebugLog(NSString* value);
IBOutlet NSMenuItem *closeTab;
IBOutlet NSMenuItem *closeWindow;
IBOutlet NSMenuItem *sendInputToAllSessions;
IBOutlet NSMenuItem *sendInputToAllPanes;
IBOutlet NSMenuItem *sendInputNormally;
IBOutlet NSMenuItem *toggleBookmarksView;
IBOutlet NSMenuItem *irNext;
IBOutlet NSMenuItem *irPrev;
Loading
Loading
@@ -155,6 +157,7 @@ void DebugLog(NSString* value);
// some subset of the flags.
- (void)setFutureApplicationPresentationOptions:(int)flags unset:(int)antiflags;
 
- (void)updateBroadcastMenuState;
 
@end
 
Loading
Loading
Loading
Loading
@@ -783,18 +783,39 @@ void DebugLog(NSString* value)
// set some menu item states
if (frontTerminal && [[frontTerminal tabView] numberOfTabViewItems]) {
[toggleBookmarksView setEnabled:YES];
[sendInputToAllSessions setEnabled:YES];
if ([frontTerminal sendInputToAllSessions] == YES) {
[sendInputToAllSessions setState: NSOnState];
} else {
[sendInputToAllSessions setState: NSOffState];
}
} else {
[toggleBookmarksView setEnabled:NO];
[sendInputToAllSessions setEnabled:NO];
}
}
 
- (void)updateBroadcastMenuState
{
BOOL sessions = NO;
BOOL panes = NO;
BOOL normal = NO;
PseudoTerminal *frontTerminal;
frontTerminal = [[iTermController sharedInstance] currentTerminal];
switch ([frontTerminal broadcastMode]) {
case BROADCAST_OFF:
normal = YES;
break;
case BROADCAST_TO_ALL_TABS:
sessions = YES;
break;
case BROADCAST_TO_ALL_PANES:
panes = YES;
break;
case BROADCAST_CUSTOM:
break;
}
[sendInputToAllSessions setState:sessions];
[sendInputToAllPanes setState:panes];
[sendInputNormally setState:normal];
}
- (void) nonTerminalWindowBecameKey: (NSNotification *) aNotification
{
[closeTab setAction:nil];
Loading
Loading
@@ -1048,6 +1069,7 @@ void DebugLog(NSString* value)
{
//NSLog(@"iTermApplicationDelegate: setCurrentTerminal '0x%x'", aTerminal);
[[iTermController sharedInstance] setCurrentTerminal: aTerminal];
[[[NSApplication sharedApplication] delegate] updateBroadcastMenuState];
}
 
 
Loading
Loading
images/BroadcastInput.png

2.3 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment