diff options
author | David Henningsson <david.henningsson@canonical.com> | 2013-02-14 08:22:14 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2013-03-26 18:13:10 +0100 |
commit | ed0ec4240125ac9f0a6d7502aa29644d37b2eac2 (patch) | |
tree | 5795d665bf83a4265f928faf124e0fd477eb22cd | |
parent | 3d6aac673b88fff548db57a75b82e8f14723c1fe (diff) | |
download | libgnome-volume-control-ed0ec4240125ac9f0a6d7502aa29644d37b2eac2.tar.gz |
ui-device: Don't add off profiles
Right now, makes sure "Off" profiles are not added, because when selected,
the item will disappear and there's no way to get it back (because it
disappeared). In the long term, handling the "off" profile correctly
would be better.
https://bugzilla.gnome.org/show_bug.cgi?id=693654
-rw-r--r-- | gvc-mixer-ui-device.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gvc-mixer-ui-device.c b/gvc-mixer-ui-device.c index af84442..a108310 100644 --- a/gvc-mixer-ui-device.c +++ b/gvc-mixer-ui-device.c @@ -389,6 +389,11 @@ add_canonical_names_of_profiles (GvcMixerUIDevice *device, g_free (canonical_name); + /* https://bugzilla.gnome.org/show_bug.cgi?id=693654 + * Don't add a profile that will make the UI device completely disappear */ + if (p->n_sinks == 0 && p->n_sources == 0) + continue; + g_debug ("Adding profile to combobox: '%s' - '%s'", p->profile, p->human_profile); g_hash_table_insert (added_profiles, g_strdup (p->profile), p); device->priv->profiles = g_list_append (device->priv->profiles, p); |