mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
dont try to connect to folders in quick connect menu. resolves #924
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Themes;
|
||||
using mRemoteNG.Tools;
|
||||
|
||||
@@ -232,10 +233,19 @@ namespace mRemoteNG.UI.Controls
|
||||
private void ConnectionsMenuItem_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button != MouseButtons.Left) return;
|
||||
var tag = ((ToolStripMenuItem)sender).Tag as ConnectionInfo;
|
||||
if (tag != null)
|
||||
var menuItem = (ToolStripMenuItem) sender;
|
||||
|
||||
// While we can connect to a whole folder at once, it is
|
||||
// probably not the expected behavior when navigating through
|
||||
// a nested menu. Just return
|
||||
var containerInfo = menuItem.Tag as ContainerInfo;
|
||||
if (containerInfo != null)
|
||||
return;
|
||||
|
||||
var connectionInfo = menuItem.Tag as ConnectionInfo;
|
||||
if (connectionInfo != null)
|
||||
{
|
||||
ConnectionInitiator.OpenConnection(tag);
|
||||
ConnectionInitiator.OpenConnection(connectionInfo);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user