Permalink
Browse files

Additional fix for MR-392.

  • Loading branch information...
1 parent 7f36b79 commit 9d3beaffbb6408003617ac675d0c0f6078b38749 @rmcardle rmcardle committed Mar 23, 2013
Showing with 20 additions and 5 deletions.
  1. +20 −5 mRemoteV1/UI/UI.Window.Sessions.vb
@@ -217,16 +217,31 @@ Namespace UI
End Sub
Private Sub menuSession_Opening(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
- If _retrieved Then
- sessionMenuRetrieve.Text = Language.strRefresh
- Else
+ Dim connectionInfo As mRemoteNG.Connection.Info = TryCast(mRemoteNG.Tree.Node.SelectedNode.Tag, mRemoteNG.Connection.Info)
+ If connectionInfo Is Nothing Then
+ sessionMenuLogoff.Enabled = False
+ sessionMenuRetrieve.Enabled = False
sessionMenuRetrieve.Text = Language.strMenuSessionRetrieve
+ Return
End If
- If sessionList.SelectedItems.Count = 0 Then
+ If connectionInfo.Protocol = mRemoteNG.Connection.Protocol.Protocols.RDP And sessionList.SelectedItems.Count > 0 Then
+ sessionMenuLogoff.Enabled = True
+ Else
sessionMenuLogoff.Enabled = False
+ End If
+
+ If connectionInfo.Protocol = mRemoteNG.Connection.Protocol.Protocols.RDP Or _
+ connectionInfo.Protocol = mRemoteNG.Connection.Protocol.Protocols.ICA Then
+ sessionMenuRetrieve.Enabled = True
Else
- sessionMenuLogoff.Enabled = True
+ sessionMenuRetrieve.Enabled = False
+ End If
+
+ If Not _retrieved Then
+ sessionMenuRetrieve.Text = Language.strMenuSessionRetrieve
+ Else
+ sessionMenuRetrieve.Text = Language.strRefresh
End If
End Sub

0 comments on commit 9d3beaf

Please sign in to comment.