Commits work in progress on improving, stabalising audio and video telephony conferencing.

cusax-fix
Lyubomir Marinov 14 years ago
parent b75a83f406
commit 1ee98bdf07

@ -9,6 +9,7 @@
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
import javax.swing.Timer;
@ -29,20 +30,20 @@
*/
public class SingleWindowContainer
extends TransparentPanel
implements ChatContainer,
CallContainer,
CallTitleListener,
ChangeListener
implements ChatContainer,
CallContainer,
CallTitleListener,
ChangeListener
{
/**
* The logger for this class.
* The <tt>Logger</tt> used by this instance for logging output.
*/
private final Logger logger = Logger.getLogger(SingleWindowContainer.class);
/**
* The tabbed pane, containing all conversations.
*/
private ConversationTabbedPane tabbedPane = null;
private final ConversationTabbedPane tabbedPane;
/**
* The count of current conversations.
@ -52,8 +53,8 @@ public class SingleWindowContainer
/**
* Chat change listeners.
*/
private final java.util.List<ChatChangeListener> chatChangeListeners =
new Vector<ChatChangeListener>();
private final List<ChatChangeListener> chatChangeListeners
= new Vector<ChatChangeListener>();
/**
* The contact photo panel.
@ -377,19 +378,15 @@ private void addConversationTab(String name,
{
Component currentConversation = getCurrentConversation();
tabbedPane.addTab(
name,
icon,
conversation);
tabbedPane.addTab(name, icon, conversation);
tabbedPane.getParent().validate();
// If not specified explicitly, when added to the tabbed pane,
// the first chat panel should rest the selected component.
if (currentConversation != null && !isSelected)
tabbedPane.setSelectedComponent(currentConversation);
else
tabbedPane.setSelectedComponent(conversation);
// If not specified explicitly, when added to the tabbed pane, the first
// chat panel should rest the selected component.
tabbedPane.setSelectedComponent(
(currentConversation != null && !isSelected)
? currentConversation
: conversation);
}
/**
@ -408,22 +405,19 @@ private void highlightTab(ChatPanel chatPanel)
private Component createToolbar()
{
JPanel northPanel = new TransparentPanel(new BorderLayout());
mainToolBar = new MainToolBar(this);
// The toolbar would be only visible when a chat is opened.
mainToolBar.setVisible(false);
boolean chatToolbarVisible = ConfigurationManager.isChatToolbarVisible();
northPanel.setVisible(chatToolbarVisible);
JPanel northPanel = new TransparentPanel(new BorderLayout());
northPanel.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 0));
northPanel.setPreferredSize(new Dimension(500, 35));
northPanel.setVisible(ConfigurationManager.isChatToolbarVisible());
northPanel.add(mainToolBar, BorderLayout.EAST);
northPanel.add(contactPhotoPanel, BorderLayout.WEST);
northPanel.setPreferredSize(new Dimension(500, 35));
return northPanel;
}

@ -181,14 +181,10 @@ private class CallToggleButtonModel
implements ActionListener,
Runnable
{
private final Call call;
private Thread runner;
public CallToggleButtonModel(Call call)
{
this.call = call;
addActionListener(this);
}

@ -53,13 +53,13 @@ public CallDialog()
public Dimension getMinimumSize()
{
Dimension minSize = super.getMinimumSize();
if(callPanel != null)
{
int minButtonWidth = callPanel.getMinimumButtonWidth();
if(minButtonWidth > minSize.getWidth())
{
return new Dimension(minButtonWidth, 300);
}
minSize = new Dimension(minButtonWidth, 300);
}
return minSize;
@ -108,19 +108,19 @@ public void close(CallPanel callPanel)
public void closeWait(CallPanel callPanel)
{
if (this.callPanel.equals(callPanel))
{
disposeWait();
}
}
/**
* Hang ups the current call on close.
* @param isEscaped indicates if the window was close by pressing the escape
* button
* {@inheritDoc}
*
* Hang ups the call/telephony conference depicted by this
* <tt>CallDialog</tt> on close.
*/
protected void close(boolean isEscaped)
@Override
protected void close(boolean escape)
{
callPanel.actionPerformedOnHangupButton(isEscaped);
callPanel.actionPerformedOnHangupButton(escape);
}
/**
@ -132,10 +132,7 @@ protected void close(boolean isEscaped)
*/
public boolean isCallVisible(CallPanel callPanel)
{
if (this.callPanel.equals(callPanel))
return isVisible();
return false;
return this.callPanel.equals(callPanel) ? isVisible() : false;
}
/**

@ -36,11 +36,6 @@ public class InputVolumeControlButton
implements VolumeChangeListener,
Runnable
{
/**
* The <tt>Call</tt> that this button controls.
*/
private final Call call;
/**
* Mutes the call in other thread.
*/
@ -134,7 +129,6 @@ public InputVolumeControlButton(Call call,
pressedIconImageID,
"service.gui.MUTE_BUTTON_TOOL_TIP");
this.call = call;
this.fullScreen = fullScreen;
this.mute = selected;

@ -29,8 +29,8 @@
* @author Yana Stamcheva
*/
public abstract class PreCallDialog
implements ActionListener,
Skinnable
implements ActionListener,
Skinnable
{
/**
* The call button name.
@ -101,20 +101,20 @@ public abstract class PreCallDialog
/**
* The window handling received calls.
*/
private Window preCallWindow;
private final Window preCallWindow;
/**
* If it is a video call.
*/
private boolean video = false;
private final boolean video;
/**
* If the call should be answered in an existing call.
*/
private boolean mergeCall = false;
private final boolean mergeCall;
/**
* Creates an instanceof <tt>PreCallDialog</tt> by specifying the dialog
* Creates an instance of <tt>PreCallDialog</tt> by specifying the dialog
* title.
*
* @param title the title of the dialog
@ -127,7 +127,7 @@ public PreCallDialog(String title, boolean video, boolean existingCall)
}
/**
* Creates an instanceof <tt>PreCallDialog</tt> by specifying the dialog
* Creates an instance of <tt>PreCallDialog</tt> by specifying the dialog
* title and the text to show.
*
* @param title the title of the dialog
@ -140,7 +140,7 @@ public PreCallDialog(String title, String text, Object[] accounts)
}
/**
* Creates an instanceof <tt>PreCallDialog</tt> by specifying the dialog
* Creates an instance of <tt>PreCallDialog</tt> by specifying the dialog
* title and the text to show.
*
* @param title the title of the dialog
@ -154,18 +154,24 @@ public PreCallDialog(String title, String text, Object[] accounts,
{
preCallWindow = createPreCallWindow(title, text, accounts);
if (video)
{
// Make sure there is a VIDEO MediaDevice and it is capable of
// capture/sending
MediaDevice mediaDevice
= GuiActivator.getMediaService().getDefaultDevice(
MediaType.VIDEO,
MediaUseCase.CALL);
if ((mediaDevice == null)
|| !mediaDevice.getDirection().allowsSending())
video = false;
}
this.video = video;
this.mergeCall = existingCall;
MediaDevice mediaDevice
= GuiActivator.getMediaService().getDefaultDevice(
MediaType.VIDEO, MediaUseCase.CALL);
// check whether we have device enabled for capturing(sending)
if (mediaDevice != null)
this.video = video && mediaDevice.getDirection().allowsSending();
this.initComponents();
initComponents();
}
/**
@ -199,8 +205,9 @@ private Window createPreCallWindow( String title,
if (accounts != null)
{
accountsCombo = HudWidgetFactory
.createHudComboBox(new DefaultComboBoxModel(accounts));
accountsCombo
= HudWidgetFactory.createHudComboBox(
new DefaultComboBoxModel(accounts));
}
}
else
@ -216,9 +223,7 @@ private Window createPreCallWindow( String title,
callLabelImage = new JLabel();
if (accounts != null)
{
accountsCombo = new JComboBox(accounts);
}
}
if (text != null)

@ -29,9 +29,9 @@
*/
public class ReceivedCallDialog
extends PreCallDialog
implements ActionListener,
CallListener,
Skinnable
implements ActionListener,
CallListener,
Skinnable
{
/**
* The incoming call to render.
@ -57,11 +57,11 @@ public ReceivedCallDialog(Call call, boolean video, boolean existingCall)
this.incomingCall = call;
OperationSetBasicTelephony<?> telephonyOpSet
= call.getProtocolProvider()
.getOperationSet(OperationSetBasicTelephony.class);
OperationSetBasicTelephony<?> basicTelephony
= call.getProtocolProvider().getOperationSet(
OperationSetBasicTelephony.class);
telephonyOpSet.addCallListener(this);
basicTelephony.addCallListener(this);
initCallLabel(getCallLabels());
}
@ -150,16 +150,34 @@ public void run()
}
/**
* When call is remotely ended we close this dialog.
* @param event the <tt>CallEvent</tt> that has been triggered
* {@inheritDoc}
*
* When the <tt>Call</tt> depicted by this dialog is (remotely) ended,
* close/dispose of this dialog.
*
* @param event a <tt>CallEvent</tt> which specifies the <tt>Call</tt> that
* has ended
*/
public void callEnded(CallEvent event)
{
Call sourceCall = event.getSourceCall();
if (event.getSourceCall().equals(incomingCall))
dispose();
}
if (sourceCall.equals(incomingCall))
@Override
public void dispose()
{
try
{
dispose();
OperationSetBasicTelephony<?> basicTelephony
= incomingCall.getProtocolProvider().getOperationSet(
OperationSetBasicTelephony.class);
basicTelephony.removeCallListener(this);
}
finally
{
super.dispose();
}
}
@ -227,12 +245,11 @@ public void hangupButtonPressed()
private String getPeerDisplayName(CallPeer peer)
{
String displayName = peer.getDisplayName();
String peerAddress = peer.getAddress();
if(StringUtils.isNullOrEmpty(displayName, true))
return peerAddress;
return displayName;
return
StringUtils.isNullOrEmpty(displayName, true)
? peer.getAddress()
: displayName;
}
/**
@ -243,15 +260,16 @@ private String getPeerDisplayName(CallPeer peer)
*/
private String getPeerDisplayAddress(CallPeer peer)
{
String displayName = peer.getDisplayName();
String peerAddress = peer.getAddress();
if(StringUtils.isNullOrEmpty(peerAddress, true))
return null;
if(peerAddress.equalsIgnoreCase(displayName))
return null;
return peerAddress;
else
{
return
peerAddress.equalsIgnoreCase(peer.getDisplayName())
? null
: peerAddress;
}
}
}

@ -94,13 +94,14 @@ public RecordButton(Call call)
*/
public RecordButton(Call call, boolean fullScreen, boolean selected)
{
super( call,
fullScreen,
true,
selected,
ImageLoader.RECORD_BUTTON,
ImageLoader.RECORD_BUTTON_PRESSED,
null);
super(
call,
fullScreen,
true,
selected,
ImageLoader.RECORD_BUTTON,
ImageLoader.RECORD_BUTTON_PRESSED,
null);
String toolTip
= resources.getI18NString("service.gui.RECORD_BUTTON_TOOL_TIP");

@ -47,7 +47,7 @@ public class ConferenceCallPanel
/**
* The conference call.
*/
private final Call call;
protected final Call call;
/**
* The scroll pane.

@ -23,16 +23,12 @@
public class VideoConferenceCallPanel
extends ConferenceCallPanel
{
/**
* The contained call.
*/
private final Call call;
/**
* Maps a <tt>CallPeer</tt> to its renderer.
*/
protected final Hashtable<CallPeer, ConferenceCallPeerRenderer>
callPeerPanels = new Hashtable<CallPeer, ConferenceCallPeerRenderer>();
callPeerPanels
= new Hashtable<CallPeer, ConferenceCallPeerRenderer>();
/**
* A mapping of a member and its renderer.
@ -41,8 +37,7 @@ public class VideoConferenceCallPanel
conferenceMembersPanels
= new Hashtable<ConferenceMember, ConferenceMemberPanel>();
public VideoConferenceCallPanel(CallPanel callPanel,
Call call)
public VideoConferenceCallPanel(CallPanel callPanel, Call call)
{
this(callPanel, call, null);
}
@ -59,8 +54,6 @@ public VideoConferenceCallPanel(CallPanel callPanel,
{
super(callPanel, call, videoHandler, true);
this.call = call;
addVideoContainer();
getVideoHandler().setLocalVideoToolbar(createLocalVideoToolBar());
@ -103,13 +96,13 @@ public CallPeerRenderer getCallPeerRenderer(CallPeer callPeer)
public void conferenceMemberAdded( CallPeer callPeer,
ConferenceMember member)
{
// It's already there.
if (conferenceMembersPanels.containsKey(member))
return;
conferenceMemberAdded(callPeer, member, false);
// Only if it isn't there yet.
if (!conferenceMembersPanels.containsKey(member))
{
conferenceMemberAdded(callPeer, member, false);
getVideoHandler().handleVideoEvent(call, null);
getVideoHandler().handleVideoEvent(call, null);
}
}
/**
@ -124,7 +117,7 @@ public void conferenceMemberAdded( CallPeer callPeer,
return;
if (CallManager.addressesAreEqual(
member.getAddress(), callPeer.getAddress()))
member.getAddress(), callPeer.getAddress()))
{
return;
}

@ -1830,7 +1830,6 @@ private void replaceMessageDivID( Element messageDivElement,
document.getLength());
String msgDivString = msgDivWriter.toString();
String newMsgDivString
= msgDivString.replaceFirst(
ChatHtmlUtils.MESSAGE_DIV_ID + lastMessageUID,
@ -1855,10 +1854,9 @@ private void replaceMessageDivID( Element messageDivElement,
else
msgEndIndex = newMsgDivString.lastIndexOf("</div>");
document.setOuterHTML(messageDivElement,
newMsgDivString.substring(
msgStartIndex,
msgEndIndex + 6));
document.setOuterHTML(
messageDivElement,
newMsgDivString.substring(msgStartIndex, msgEndIndex + 6));
}
catch (IOException e)
{

@ -106,7 +106,7 @@ private class ProtocolCQuery
{
private int contactCount;
private String queryString;
private final String queryString;
public ProtocolCQuery(String queryString, int contactCount)
{
@ -118,11 +118,12 @@ public ProtocolCQuery(String queryString, int contactCount)
this.contactCount = contactCount;
}
protected String normalizePhoneNumber(String phoneNumber)
{
return phoneNumber;
}
/**
* {@inheritDoc}
*
* Always returns <tt>false</tt>.
*/
@Override
protected boolean phoneNumberMatches(String phoneNumber)
{
return false;
@ -130,8 +131,9 @@ protected boolean phoneNumberMatches(String phoneNumber)
public void run()
{
Iterator<MetaContact> contactListIter = metaContactListService
.findAllMetaContactsForProvider(protocolProvider);
Iterator<MetaContact> contactListIter
= metaContactListService.findAllMetaContactsForProvider(
protocolProvider);
while (contactListIter.hasNext())
{
@ -166,39 +168,40 @@ private void addResultContact(MetaContact metaContact)
break;
Contact contact = contacts.next();
String contactAddress = contact.getAddress();
String contactDisplayName = contact.getDisplayName();
if (queryString == null
|| queryString.length() <= 0
|| metaContact.getDisplayName().startsWith(queryString)
|| contact.getAddress().startsWith(queryString)
|| contact.getDisplayName().startsWith(queryString))
|| contactAddress.startsWith(queryString)
|| contactDisplayName.startsWith(queryString))
{
ArrayList<ContactDetail> contactDetails
= new ArrayList<ContactDetail>();
ContactDetail contactDetail
= new ContactDetail(contact.getAddress());
ArrayList<Class<? extends OperationSet>>
supportedOpSets
= new ContactDetail(contactAddress);
List<Class<? extends OperationSet>> supportedOpSets
= new ArrayList<Class<? extends OperationSet>>();
supportedOpSets.add(opSetClass);
contactDetail.setSupportedOpSets(supportedOpSets);
List<ContactDetail> contactDetails
= new ArrayList<ContactDetail>();
contactDetails.add(contactDetail);
GenericSourceContact sourceContact
= new GenericSourceContact(
ProtocolContactSourceServiceImpl.this,
contact.getDisplayName(),
contactDetails);
ProtocolContactSourceServiceImpl.this,
contactDisplayName,
contactDetails);
if (!contact.getAddress().equals(contact.getDisplayName()))
sourceContact.setDisplayDetails(contact.getAddress());
if (!contactAddress.equals(contactDisplayName))
sourceContact.setDisplayDetails(contactAddress);
sourceContact.setImage(metaContact.getAvatar());
sourceContact
.setPresenceStatus(contact.getPresenceStatus());
sourceContact.setPresenceStatus(
contact.getPresenceStatus());
addQueryResult(sourceContact);
}

@ -6,6 +6,8 @@
*/
package net.java.sip.communicator.impl.libjitsi;
import java.lang.reflect.*;
import org.jitsi.service.libjitsi.*;
import org.osgi.framework.*;
@ -15,7 +17,39 @@ public class LibJitsiActivator
public void start(BundleContext bundleContext)
throws Exception
{
LibJitsi.start();
/*
* XXX To start/initialize the libjitsi library, simply call
* LibJitsi#start(). The following is a temporary workaround for the
* benefit of the Jitsi VideoBridge project (which uses Jitsi's libjitsi
* bundle and runs on an incomplete OSGi implementation) and not the
* Jitsi project.
*/
Method start;
try
{
start = LibJitsi.class.getDeclaredMethod("start", Object.class);
if (Modifier.isStatic(start.getModifiers()))
{
start.setAccessible(true);
if (!start.isAccessible())
start = null;
}
else
start = null;
}
catch (NoSuchMethodException nsme)
{
start = null;
}
catch (SecurityException se)
{
start = null;
}
if (start == null)
LibJitsi.start();
else
start.invoke(null, bundleContext);
}
public void stop(BundleContext bundleContext)

@ -26,8 +26,8 @@ public class PacketLoggingActivator
/**
* Our logging.
*/
private static Logger logger =
Logger.getLogger(PacketLoggingActivator.class);
private static Logger logger
= Logger.getLogger(PacketLoggingActivator.class);
/**
* The OSGI bundle context.
@ -62,20 +62,32 @@ public class PacketLoggingActivator
* @throws Exception if starting the PacketLoggingServiceImpl.
*/
public void start(BundleContext bundleContext)
throws
Exception
throws Exception
{
PacketLoggingActivator.bundleContext = bundleContext;
packetLoggingService = new PacketLoggingServiceImpl();
/*
* PacketLoggingServiceImpl requires a FileAccessService implementation.
* Ideally, we'd be listening to the bundleContext and will be making
* the PacketLoggingService implementation available in accord with the
* availability of a FileAccessService implementation. Unfortunately,
* the real world is far from ideal.
*/
fileAccessService
= ServiceUtils.getService(bundleContext, FileAccessService.class);
if (fileAccessService != null)
{
PacketLoggingActivator.bundleContext = bundleContext;
packetLoggingService.start();
packetLoggingService = new PacketLoggingServiceImpl();
packetLoggingService.start();
bundleContext.registerService(PacketLoggingService.class.getName(),
packetLoggingService, null);
bundleContext.registerService(
PacketLoggingService.class.getName(),
packetLoggingService,
null);
if (logger.isInfoEnabled())
logger.info("Packet Logging Service ...[REGISTERED]");
if (logger.isInfoEnabled())
logger.info("Packet Logging Service ...[REGISTERED]");
}
}
/**
@ -84,12 +96,15 @@ public void start(BundleContext bundleContext)
* @param bundleContext the OSGI bundle context
*/
public void stop(BundleContext bundleContext)
throws
Exception
throws Exception
{
if(packetLoggingService != null)
packetLoggingService.stop();
configurationService = null;
fileAccessService = null;
packetLoggingService = null;
if (logger.isInfoEnabled())
logger.info("Packet Logging Service ...[STOPPED]");
}
@ -121,13 +136,6 @@ public static ConfigurationService getConfigurationService()
*/
public static FileAccessService getFileAccessService()
{
if (fileAccessService == null)
{
fileAccessService
= ServiceUtils.getService(
bundleContext,
FileAccessService.class);
}
return fileAccessService;
}
}

@ -159,13 +159,18 @@ public void start()
private void getFileNames()
throws Exception
{
files = new File[getConfiguration().getLogfileCount()];
for(int i = 0; i < getConfiguration().getLogfileCount(); i++)
int fileCount = getConfiguration().getLogfileCount();
files = new File[fileCount];
for(int i = 0; i < fileCount; i++)
{
files[i] = PacketLoggingActivator.getFileAccessService()
.getPrivatePersistentFile(
PacketLoggingActivator.LOGGING_DIR_NAME
+ File.separator + "jitsi" + i + ".pcap");
files[i]
= PacketLoggingActivator.getFileAccessService().getPrivatePersistentFile(
PacketLoggingActivator.LOGGING_DIR_NAME
+ File.separator
+ "jitsi"
+ i
+ ".pcap");
}
}
@ -183,16 +188,15 @@ private void rotateFiles()
outputStream.close();
}
for (int i = getConfiguration().getLogfileCount() -2; i >= 0; i--)
for (int i = getConfiguration().getLogfileCount() - 2; i >= 0; i--)
{
File f1 = files[i];
File f2 = files[i+1];
if (f1.exists())
{
if (f2.exists())
{
f2.delete();
}
f1.renameTo(f2);
}
}
@ -220,7 +224,10 @@ public void stop()
{
e.printStackTrace();
}
outputStream = null;
finally
{
outputStream = null;
}
}
}
@ -281,31 +288,40 @@ public boolean isLoggingEnabled()
}
/**
* Checks is logging globally enabled for and is it currently
* available fo the given service.
* Checks is logging globally enabled for and is it currently available for
* the given service.
*
* @param protocol that is checked.
* @return is logging enabled.
*/
public boolean isLoggingEnabled(ProtocolName protocol)
{
switch(protocol)
PacketLoggingConfiguration cfg = getConfiguration();
if (cfg.isGlobalLoggingEnabled())
{
case SIP:
return getConfiguration().isGlobalLoggingEnabled()
&& getConfiguration().isSipLoggingEnabled();
case JABBER:
return getConfiguration().isGlobalLoggingEnabled()
&& getConfiguration().isJabberLoggingEnabled();
case RTP:
return getConfiguration().isGlobalLoggingEnabled()
&& getConfiguration().isRTPLoggingEnabled();
case ICE4J:
return getConfiguration().isGlobalLoggingEnabled()
&& getConfiguration().isIce4JLoggingEnabled();
default:
return false;
switch(protocol)
{
case SIP:
return cfg.isSipLoggingEnabled();
case JABBER:
return cfg.isJabberLoggingEnabled();
case RTP:
return cfg.isRTPLoggingEnabled();
case ICE4J:
return cfg.isIce4JLoggingEnabled();
default:
/*
* It may seem like it was unnecessary to invoke
* getConfiguration and isGlobalLoggingEnabled prior to
* checking that the specified protocol is supported but,
* actually, there are no other ProtocolName values.
*/
return false;
}
}
else
return false;
}
/**
@ -539,8 +555,9 @@ private void savePacket(Packet packet)
rotateFiles();// this one opens the file for write
}
if(getConfiguration().getLimit() > 0
&& written > getConfiguration().getLimit())
long limit = getConfiguration().getLimit();
if((limit > 0) && (written > limit))
rotateFiles();
addInt(tsSec);
@ -739,7 +756,7 @@ private class SaverThread
/**
* List of packets queued to be written in the file.
*/
private List<Packet> packetsToDump = new ArrayList<Packet>();
private final List<Packet> pktsToSave = new ArrayList<Packet>();
/**
* Sends instant messages in separate thread so we don't block
@ -748,14 +765,13 @@ private class SaverThread
public void run()
{
stopped = false;
while(!stopped)
{
Packet pktToSave = null;
Packet pktToSave;
synchronized(this)
{
if(packetsToDump.isEmpty())
if(pktsToSave.isEmpty())
{
try
{
@ -764,10 +780,10 @@ public void run()
catch (InterruptedException iex)
{
}
continue;
}
if(!packetsToDump.isEmpty())
pktToSave = packetsToDump.remove(0);
pktToSave = pktsToSave.remove(0);
}
if(pktToSave != null)
@ -778,7 +794,14 @@ public void run()
}
catch(Throwable t)
{
logger.error("Error writing packet to file", t);
/*
* XXX ThreadDeath must be rethrown; otherwise, the
* related Thread will not die.
*/
if (t instanceof ThreadDeath)
throw (ThreadDeath) t;
else
logger.error("Error writing packet to file", t);
}
}
}
@ -799,7 +822,7 @@ public synchronized void stopRunning()
*/
public synchronized void queuePacket(Packet packet)
{
packetsToDump.add(packet);
pktsToSave.add(packet);
notifyAll();
}
}

@ -250,16 +250,16 @@ public static void loadGuiConfigurations()
"impl.gui.NORMALIZE_PHONE_NUMBER";
isNormalizePhoneNumber
= GeneralConfigPluginActivator.getConfigurationService()
.getBoolean(normalizePhoneNumberProperty, true);
= configService.getBoolean(normalizePhoneNumberProperty, true);
// Load the "ACCEPT_PHONE_NUMBER_WITH_ALPHA_CHARS" property.
String acceptPhoneNumberWithAlphaCharsProperty =
"impl.gui.ACCEPT_PHONE_NUMBER_WITH_ALPHA_CHARS";
acceptPhoneNumberWithAlphaChars
= GeneralConfigPluginActivator.getConfigurationService()
.getBoolean(acceptPhoneNumberWithAlphaCharsProperty, true);
= configService.getBoolean(
acceptPhoneNumberWithAlphaCharsProperty,
true);
}
/**

@ -273,24 +273,18 @@ static String getUploadLocation()
*/
private void loadValues()
{
PacketLoggingService packetLogging =
LoggingUtilsActivator.getPacketLoggingService();
enableCheckBox.setSelected(
packetLogging.getConfiguration().isGlobalLoggingEnabled());
sipProtocolCheckBox.setSelected(
packetLogging.getConfiguration().isSipLoggingEnabled());
jabberProtocolCheckBox.setSelected(
packetLogging.getConfiguration().isJabberLoggingEnabled());
rtpProtocolCheckBox.setSelected(
packetLogging.getConfiguration().isRTPLoggingEnabled());
ice4jProtocolCheckBox.setSelected(
packetLogging.getConfiguration().isIce4JLoggingEnabled());
fileCountField.setText(String.valueOf(
packetLogging.getConfiguration().getLogfileCount()));
fileSizeField.setText(String.valueOf(
packetLogging.getConfiguration().getLimit()/1000));
PacketLoggingService packetLogging
= LoggingUtilsActivator.getPacketLoggingService();
PacketLoggingConfiguration cfg = packetLogging.getConfiguration();
enableCheckBox.setSelected(cfg.isGlobalLoggingEnabled());
sipProtocolCheckBox.setSelected(cfg.isSipLoggingEnabled());
jabberProtocolCheckBox.setSelected(cfg.isJabberLoggingEnabled());
rtpProtocolCheckBox.setSelected(cfg.isRTPLoggingEnabled());
ice4jProtocolCheckBox.setSelected(cfg.isIce4JLoggingEnabled());
fileCountField.setText(String.valueOf(cfg.getLogfileCount()));
fileSizeField.setText(String.valueOf(cfg.getLimit() / 1000));
updateButtonsState();
}

@ -811,13 +811,13 @@ private void internalPaintComponent(Graphics g)
}
/**
* All functions implemented in this method will be invoked when user
* presses the Escape key.
* @param isEscaped indicates if this frame has been closed by pressing the
* Esc key
* Notifies this instance that it has been requested to close. The default
* <tt>SIPCommFrame</tt> implementation does nothing.
*
* @param escape <tt>true</tt> if the request to close this instance is in
* response of a press on the Escape key; otherwise, <tt>false</tt>
*/
protected void close(boolean isEscaped)
protected void close(boolean escape)
{
}
}

Loading…
Cancel
Save