diff --git a/lib/installer-exclude/libjitsi.jar b/lib/installer-exclude/libjitsi.jar index 32d87d12c..987766e07 100644 Binary files a/lib/installer-exclude/libjitsi.jar and b/lib/installer-exclude/libjitsi.jar differ diff --git a/src/net/java/sip/communicator/impl/neomedia/AbstractDeviceConfigurationListener.java b/src/net/java/sip/communicator/impl/neomedia/AbstractDeviceConfigurationListener.java index 4823ad8bc..2d841f435 100644 --- a/src/net/java/sip/communicator/impl/neomedia/AbstractDeviceConfigurationListener.java +++ b/src/net/java/sip/communicator/impl/neomedia/AbstractDeviceConfigurationListener.java @@ -102,18 +102,17 @@ public void managePopupMessageListenerRegistration(boolean enable) * change. * * @param title The title of the pop-up notification. - * @param device The device which has been connected, disconnected or - * selected as default device. + * @param body A body text describing the device modifications. * @param popUpEvent The event for a device which has fired this * notification: connected, disconnected or selected. */ public void showPopUpNotification( String title, - CaptureDeviceInfo device, + String body, String popUpEvent) { // Shows the pop-up notification. - if(title != null && device != null && popUpEvent != null) + if(title != null && body != null && popUpEvent != null) { NotificationService notificationService = NeomediaActivator.getNotificationService(); @@ -140,8 +139,8 @@ public void showPopUpNotification( notificationService.fireNotification( popUpEvent, title, - device.getName() - + "\r\n" + body + + "\r\n\r\n" + resources.getI18NString( "impl.media.configform" + ".AUDIO_DEVICE_CONFIG_MANAGMENT_CLICK"), diff --git a/src/net/java/sip/communicator/impl/neomedia/AudioDeviceConfigurationListener.java b/src/net/java/sip/communicator/impl/neomedia/AudioDeviceConfigurationListener.java index c8ed33f0d..735c2068d 100644 --- a/src/net/java/sip/communicator/impl/neomedia/AudioDeviceConfigurationListener.java +++ b/src/net/java/sip/communicator/impl/neomedia/AudioDeviceConfigurationListener.java @@ -27,6 +27,22 @@ public class AudioDeviceConfigurationListener extends AbstractDeviceConfigurationListener { + /** + * The last selected capture device for which we have received an event. + */ + private CaptureDeviceInfo captureDevice = null; + + /** + * The last selected playback device for which we have received an event. + */ + private CaptureDeviceInfo playbackDevice = null; + + /** + * The last selected notification device for which we have received an + * event. + */ + private CaptureDeviceInfo notificationDevice = null; + /** * Creates a listener to the click on the popup message concerning audio * device configuration changes. @@ -81,11 +97,7 @@ else if(CaptureDevices.PROP_DEVICE.equals(event.getPropertyName())) { if(event.getNewValue() != null) { - popUpEvent = NeomediaActivator.NEW_SELECTED_DEVICE; - title = resources.getI18NString( - "impl.media.configform" - + ".AUDIO_DEVICE_SELECTED_AUDIO_IN"); - device = (CaptureDeviceInfo) event.getNewValue(); + captureDevice = (CaptureDeviceInfo) event.getNewValue(); } } // If a new playback device has been selected. @@ -93,11 +105,7 @@ else if(PlaybackDevices.PROP_DEVICE.equals(event.getPropertyName())) { if(event.getNewValue() != null) { - popUpEvent = NeomediaActivator.NEW_SELECTED_DEVICE; - title = resources.getI18NString( - "impl.media.configform" - + ".AUDIO_DEVICE_SELECTED_AUDIO_OUT"); - device = (CaptureDeviceInfo) event.getNewValue(); + playbackDevice = (CaptureDeviceInfo) event.getNewValue(); } } // If a new notify device has been selected. @@ -105,15 +113,53 @@ else if(NotifyDevices.PROP_DEVICE.equals(event.getPropertyName())) { if(event.getNewValue() != null) { - popUpEvent = NeomediaActivator.NEW_SELECTED_DEVICE; - title = resources.getI18NString( - "impl.media.configform" - + ".AUDIO_DEVICE_SELECTED_AUDIO_NOTIFICATIONS"); - device = (CaptureDeviceInfo) event.getNewValue(); + notificationDevice = (CaptureDeviceInfo) event.getNewValue(); + } + } + + String body = null; + if(device != null) + { + body = device.getName(); + if(captureDevice != null + || playbackDevice != null + || notificationDevice != null) + { + body += "\r\n"; + if(captureDevice != null) + { + body += "\r\n" + + resources.getI18NString( + "impl.media.configform" + + ".AUDIO_DEVICE_SELECTED_AUDIO_IN") + + "\r\n\t" + + captureDevice.getName(); + captureDevice = null; + } + if(playbackDevice != null) + { + body += "\r\n" + + resources.getI18NString( + "impl.media.configform" + + ".AUDIO_DEVICE_SELECTED_AUDIO_OUT") + + "\r\n\t" + + playbackDevice.getName(); + playbackDevice = null; + } + if(notificationDevice != null) + { + body += "\r\n" + + resources.getI18NString( + "impl.media.configform" + + ".AUDIO_DEVICE_SELECTED_AUDIO_NOTIFICATIONS") + + "\r\n\t" + + notificationDevice.getName(); + notificationDevice = null; + } } } // Shows the pop-up notification. - super.showPopUpNotification(title, device, popUpEvent); + super.showPopUpNotification(title, body, popUpEvent); } } diff --git a/src/net/java/sip/communicator/impl/neomedia/VideoDeviceConfigurationListener.java b/src/net/java/sip/communicator/impl/neomedia/VideoDeviceConfigurationListener.java index f315717cb..46bdcb1b5 100644 --- a/src/net/java/sip/communicator/impl/neomedia/VideoDeviceConfigurationListener.java +++ b/src/net/java/sip/communicator/impl/neomedia/VideoDeviceConfigurationListener.java @@ -67,7 +67,13 @@ public void propertyChange(PropertyChangeEvent event) } } + String body = null; + if(device != null) + { + body = device.getName(); + } + // Shows the pop-up notification. - this.showPopUpNotification(title, device, popUpEvent); + this.showPopUpNotification(title, body, popUpEvent); } }