Merge branch '1.0-local' into trunk-local

* 1.0-local:
  - Make the local video disabled by default.
cusax-fix
scmerger 17 years ago
parent 5b096046d9
commit a060a4d6cc

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 366 B

@ -41,6 +41,8 @@ public class CallDialog
private final MuteButton muteButton;
private final LocalVideoButton videoButton;
/**
* Creates a <tt>CallDialog</tt> by specifying the underlying call panel.
*/
@ -69,6 +71,7 @@ public CallDialog(Call call, String callType)
holdButton = new HoldButton(call);
muteButton = new MuteButton(call);
videoButton = new LocalVideoButton(call);
dialButton.setName(DIAL_BUTTON);
dialButton.setToolTipText(
@ -88,7 +91,7 @@ public CallDialog(Call call, String callType)
settingsPanel.add(dialButton);
settingsPanel.add(holdButton);
settingsPanel.add(muteButton);
settingsPanel.add(new LocalVideoButton(getCall()));
settingsPanel.add(videoButton);
buttonsPanel.add(settingsPanel, BorderLayout.WEST);
buttonsPanel.add(hangupButton, BorderLayout.EAST);
@ -248,4 +251,26 @@ public void setMuteButtonSelected(boolean isSelected)
{
this.muteButton.setSelected(true);
}
/**
* Returns <code>true</code> if the video button is selected,
* <code>false</code> - otherwise.
*
* @return <code>true</code> if the video button is selected,
* <code>false</code> - otherwise.
*/
public boolean isVideoButtonSelected()
{
return videoButton.isSelected();
}
/**
* Selects or unselects the video button in this call dialog.
*
* @param isSelected indicates if the video button should be selected or not
*/
public void setVideoButtonSelected(boolean isSelected)
{
this.videoButton.setSelected(true);
}
}

@ -93,7 +93,8 @@ private CallParticipantPanel addCallParticipant(
if (participantPanel == null)
{
participantPanel = new CallParticipantPanel(participant);
participantPanel
= new CallParticipantPanel(callDialog, participant);
this.mainPanel.add(participantPanel);

@ -81,13 +81,17 @@ public class CallParticipantPanel
private SecurityPanel securityPanel = null;
private final CallDialog callDialog;
/**
* Creates a <tt>CallParticipantPanel</tt> for the given call participant.
*
* @param callParticipant a call participant
*/
public CallParticipantPanel(CallParticipant callParticipant)
public CallParticipantPanel(CallDialog callDialog,
CallParticipant callParticipant)
{
this.callDialog = callDialog;
this.callParticipant = callParticipant;
this.participantName = callParticipant.getDisplayName();
@ -560,7 +564,9 @@ private void handleVideoEvent(final VideoEvent event)
case VideoEvent.VIDEO_REMOVED:
if (this.localVideo == localVideo)
{
this.localVideo = null;
}
break;
}
}
@ -593,14 +599,23 @@ public void run()
// LOCAL
if (localVideo != null)
{
videoContainer.add(localVideo, VideoLayout.LOCAL, zOrder++);
// If the local video is turned on, we ensure that the
// button is selected.
if (!callDialog.isVideoButtonSelected())
callDialog.setVideoButtonSelected(true);
}
// REMOTE
Component[] videos =
videoTelephony.getVisualComponents(callParticipant);
Component video =
((videos == null) || (videos.length < 1)) ? null
: videos[0];
if (video != null)
videoContainer
.add(video, VideoLayout.CENTER_REMOTE, zOrder++);

@ -55,11 +55,6 @@ public LocalVideoButtonModel(Call call)
addActionListener(this);
}
public boolean isSelected()
{
return false;
}
public synchronized void actionPerformed(ActionEvent event)
{
if (runner == null)

@ -117,7 +117,7 @@ public class MediaControl
* expresses the desire of the user to have the local video streamed in the
* case the system is actually able to do so.
*/
private boolean localVideoAllowed = true;
private boolean localVideoAllowed = false;
/**
* The default constructor.

Loading…
Cancel
Save