diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-05-19 11:38:19 -0400 |
---|---|---|
committer | Bazaar Package Importer <james.westby@ubuntu.com> | 2011-05-19 11:38:19 -0400 |
commit | 7a20a205c496bed5d7c779ff60a5730b55b60060 (patch) | |
tree | 4566d0f4c0ca9cc196a22acc3253e49b964fe43a /src/device.c | |
parent | ddeb07d1ed4e438e97ada86f94dca47ddd251b4f (diff) | |
parent | 306604f2426f7a1b7a4516566cb68e1d6c982998 (diff) | |
download | ayatana-indicator-sound-7a20a205c496bed5d7c779ff60a5730b55b60060.tar.gz ayatana-indicator-sound-7a20a205c496bed5d7c779ff60a5730b55b60060.tar.bz2 ayatana-indicator-sound-7a20a205c496bed5d7c779ff60a5730b55b60060.zip |
* New upstream release.
- Displayed cover don't keep the original ratio (LP: #654196)
- show record level control PULSE_PROP_media.role=production (LP: #736049)
- Volume notification is based on previous volume; should be based on
the new volume (LP: #748831)
- [gnome3] Sound Preferences link doesn't work (LP: #759390)
* debian/patches/lp_759390.patch
- dropped, merged upstream
* debian/control
- renamed the libnotify4-dev build depends to libnotify-dev
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/device.c b/src/device.c index 79b7b50..84db596 100644 --- a/src/device.c +++ b/src/device.c @@ -23,6 +23,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "mute-menu-item.h" #include "voip-input-menu-item.h" #include "pulseaudio-mgr.h" +#include "sound-state.h" typedef struct _DevicePrivate DevicePrivate; @@ -123,10 +124,10 @@ device_sink_update (Device* self, } gint -device_get_current_sink_input_index (Device* self) +device_get_voip_source_output_index (Device* self) { DevicePrivate* priv = DEVICE_GET_PRIVATE (self); - return voip_input_menu_item_get_sink_input_index (priv->voip_input_menu_item); + return voip_input_menu_item_get_source_output_index (priv->voip_input_menu_item); } static void @@ -164,21 +165,7 @@ device_get_state_from_volume (Device* self) DBUSMENU_VOLUME_MENUITEM_LEVEL); gdouble volume_percent = g_variant_get_double (v); - SoundState state = LOW_LEVEL; - - if (volume_percent < 30.0 && volume_percent > 0) { - state = LOW_LEVEL; - } - else if (volume_percent < 70.0 && volume_percent >= 30.0) { - state = MEDIUM_LEVEL; - } - else if (volume_percent >= 70.0) { - state = HIGH_LEVEL; - } - else if (volume_percent == 0.0) { - state = ZERO_LEVEL; - } - return state; + return sound_state_get_from_volume ((int)volume_percent); } void @@ -211,11 +198,11 @@ device_is_sink_populated (Device* self) } void -device_activate_voip_item (Device* self, gint sink_input_index, gint client_index) +device_activate_voip_item (Device* self, gint source_output_index, gint client_index) { DevicePrivate* priv = DEVICE_GET_PRIVATE (self); if (voip_input_menu_item_is_interested (priv->voip_input_menu_item, - sink_input_index, + source_output_index, client_index)){ voip_input_menu_item_enable (priv->voip_input_menu_item, TRUE); } |