First part of automatic audio system change: only if the "none" audio system is currently selected and another audio sytem becomes available (a new device has been detected).

cusax-fix
Vincent Lucas 13 years ago
parent a45f6edbb1
commit 40798eafc4

@ -29,8 +29,7 @@
*/
public class DeviceConfigurationComboBoxModel
implements ComboBoxModel,
PropertyChangeListener,
HierarchyListener
PropertyChangeListener
{
/**
* Encapsulates a <tt>CaptureDeviceInfo</tt> for the purposes of its display
@ -186,8 +185,6 @@ public DeviceConfigurationComboBoxModel(
|| type == AUDIO_PLAYBACK)
{
deviceConfiguration.addPropertyChangeListener(this);
parent.addHierarchyListener(this);
}
}
@ -466,18 +463,4 @@ public void run()
fireContentsChanged(0, getSize() - 1);
}
}
/**
* We listen when the component was hidden in order to release resources,
* remove listener to clean this instance.
* @param e the event.
*/
public void hierarchyChanged(HierarchyEvent e)
{
if (((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0)
&& !parent.isShowing())
{
deviceConfiguration.removePropertyChangeListener(this);
}
}
}

Loading…
Cancel
Save