Update jingle.

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@7817 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Derek DeMoro
2007-03-29 23:11:10 +00:00
committed by derek
parent 5ecd3f1cc6
commit c78e379502
2 changed files with 22 additions and 20 deletions

Binary file not shown.

View File

@ -92,27 +92,31 @@ public class IncomingCall implements JingleSessionListener, ChatRoomClosingListe
* Appends the JingleRoom to the ChatRoom.
*/
private void showCallAnsweredState() {
final SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy h:mm a");
notificationUI.setTitle("Voice chat started on " + formatter.format(new Date()));
notificationUI.showAlert(false);
notificationUI.setIcon(null);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
final SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy h:mm a");
notificationUI.setTitle("Voice chat started on " + formatter.format(new Date()));
notificationUI.showAlert(false);
notificationUI.setIcon(null);
if (ringing != null) {
ringing.stop();
}
if (ringing != null) {
ringing.stop();
}
final JingleRoom roomUI = new JingleRoom(session, chatRoom);
chatRoom.getChatPanel().add(roomUI, new GridBagConstraints(1, 1, 1, 1, 0.05, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0));
chatRoom.getChatPanel().invalidate();
chatRoom.getChatPanel().validate();
chatRoom.getChatPanel().repaint();
callMap.put(chatRoom, roomUI);
final JingleRoom roomUI = new JingleRoom(session, chatRoom);
chatRoom.getChatPanel().add(roomUI, new GridBagConstraints(1, 1, 1, 1, 0.05, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0));
chatRoom.getChatPanel().invalidate();
chatRoom.getChatPanel().validate();
chatRoom.getChatPanel().repaint();
callMap.put(chatRoom, roomUI);
// Add state
JingleStateManager.getInstance().addJingleSession(chatRoom, JingleStateManager.JingleRoomState.inJingleCall);
// Add state
JingleStateManager.getInstance().addJingleSession(chatRoom, JingleStateManager.JingleRoomState.inJingleCall);
// Notify state change
SparkManager.getChatManager().notifySparkTabHandlers(chatRoom);
// Notify state change
SparkManager.getChatManager().notifySparkTabHandlers(chatRoom);
}
});
}
/**
@ -267,13 +271,11 @@ public class IncomingCall implements JingleSessionListener, ChatRoomClosingListe
SparkManager.getChatManager().getChatContainer().getChatFrame().toFront();
notifyRoom();
}
showCallAnsweredState();
}
public void sessionEstablished(PayloadType payloadType, TransportCandidate transportCandidate, TransportCandidate transportCandidate1, JingleSession jingleSession) {
showCallAnsweredState();
}
public void sessionDeclined(String string, JingleSession jingleSession) {