Fix ZRTP security status notification when video gets disabled

ice4sip 5074
Ingo Bauersachs 12 years ago
parent c32aec02fa
commit 68bd828427

@ -616,13 +616,10 @@ private void initSecurityStatusLabel()
@Override
public void mousePressed(MouseEvent e)
{
CallPeerSecurityStatusEvent securityEvt
= callPeer.getCurrentSecuritySettings();
// Only show the security details if the security is on.
if (securityEvt instanceof CallPeerSecurityOnEvent
&& ((CallPeerSecurityOnEvent) securityEvt)
.getSecurityController() instanceof ZrtpControl)
SrtpControl ctrl = securityPanel.getSecurityControl();
if (ctrl instanceof ZrtpControl
&& ctrl.getSecureCommunicationStatus())
{
setSecurityPanelVisible(!callRenderer.getCallContainer()
.getCallWindow().getFrame().getGlassPane().isVisible());
@ -803,11 +800,14 @@ public void run()
return;
}
securityStatusLabel.setText("");
securityStatusLabel.setSecurityOff();
if (securityStatusLabel.getBorder() == null)
securityStatusLabel.setBorder(
BorderFactory.createEmptyBorder(2, 5, 2, 3));
if (evt.getSessionType() == CallPeerSecurityOffEvent.AUDIO_SESSION)
{
securityStatusLabel.setText("");
securityStatusLabel.setSecurityOff();
if (securityStatusLabel.getBorder() == null)
securityStatusLabel.setBorder(
BorderFactory.createEmptyBorder(2, 5, 2, 3));
}
securityPanel.securityOff(evt);
}

@ -664,7 +664,7 @@ public void run()
if (!videoSecurityLabel.isVisible())
videoSecurityLabel.setVisible(true);
}
else if (visible)
else
videoSecurityLabel.setVisible(visible);
revalidate();

@ -19,6 +19,7 @@
import net.java.sip.communicator.util.skin.*;
import org.jitsi.service.neomedia.*;
import org.jitsi.service.protocol.event.*;
/**
* The basic panel used to render any conference participant. Meant to be
@ -455,11 +456,14 @@ public void securityOff(CallPeerSecurityOffEvent evt)
{
if(securityStatusLabel == null)
return;
securityStatusLabel.setText("");
securityStatusLabel.setSecurityOff();
if (securityStatusLabel.getBorder() == null)
securityStatusLabel.setBorder(
BorderFactory.createEmptyBorder(2, 5, 2, 3));
if (evt.getSessionType() == CallPeerSecurityStatusEvent.AUDIO_SESSION)
{
securityStatusLabel.setText("");
securityStatusLabel.setSecurityOff();
if (securityStatusLabel.getBorder() == null)
securityStatusLabel.setBorder(
BorderFactory.createEmptyBorder(2, 5, 2, 3));
}
}
/**

Loading…
Cancel
Save