[jitsi~svn:10205] Adds a message in the audio configuration dialog, to inform the user that

vincent_lucas at java.net vincent_lucas at java.net
Wed Dec 19 15:17:16 CET 2012


Project:    jitsi
Repository: svn
Revision:   10205
Author:     vincent_lucas
Date:       2012-12-19 14:17:14 UTC
Link:       

Log Message:
------------
Adds a message in the audio configuration dialog, to inform the user that the none audio system is currently selected, only because there is no available audio device.


Revisions:
----------
10205


Modified Paths:
---------------
trunk/resources/languages/resources.properties
trunk/src/net/java/sip/communicator/impl/neomedia/MediaConfigurationImpl.java


Diffs:
------
Index: trunk/src/net/java/sip/communicator/impl/neomedia/MediaConfigurationImpl.java
===================================================================
--- trunk/src/net/java/sip/communicator/impl/neomedia/MediaConfigurationImpl.java	(revision 10204)
+++ trunk/src/net/java/sip/communicator/impl/neomedia/MediaConfigurationImpl.java	(revision 10205)
@@ -780,6 +780,29 @@
                 preview = new TransparentPanel(new GridBagLayout());
                 createAudioSystemControls(audioSystem, preview);
             }
+            else
+            {
+                AudioSystem[] availableAudioSystems
+                    = AudioSystem.getAudioSystems();
+                AudioSystem[] activeAudioSystems = mediaService
+                    .getDeviceConfiguration().getAvailableAudioSystems();
+
+                // If the only one active audio system which is "None" and there
+                // is(are) other(s) available audio system(s), then it means
+                // that the other(s) audio system(s) do(es) not have detected
+                // any device.
+                if(availableAudioSystems != null
+                        && availableAudioSystems.length > 1
+                        && activeAudioSystems != null
+                        && activeAudioSystems.length == 1)
+                {
+                    String noAvailableAudioDevice
+                        = NeomediaActivator.getResources().getI18NString(
+                            "impl.media.configform.NO_AVAILABLE_AUDIO_DEVICE");
+                    preview = new TransparentPanel(new GridBagLayout());
+                    preview.add(new JLabel(noAvailableAudioDevice));
+                }
+            }
         }
         else if (type == DeviceConfigurationComboBoxModel.VIDEO)
         {
Index: trunk/resources/languages/resources.properties
===================================================================
--- trunk/resources/languages/resources.properties	(revision 10204)
+++ trunk/resources/languages/resources.properties	(revision 10205)
@@ -1360,6 +1360,7 @@
 impl.media.configform.DOWN=&Down
 impl.media.configform.ECHOCANCEL=Enable echo cancellation
 impl.media.configform.ENCODINGS=Encodings
+impl.media.configform.NO_AVAILABLE_AUDIO_DEVICE=No available audio device. Please connect one.
 impl.media.configform.NO_DEVICE=<No Device>
 impl.media.configform.NO_PREVIEW=Preview
 impl.media.configform.UP=&Up







More information about the commits mailing list