summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-03-04 18:37:14 +0100
committerLennart Poettering <lennart@poettering.net>2009-03-04 18:37:14 +0100
commit6427c70a851709ac12489808159a89e8498c8230 (patch)
tree4d013b372e6ba2d83bee9f7a7f1ba76c6324dff0
parent656fc6660fac6ad4524fd2b679cbd35c69033d3b (diff)
try more things to get a proper icon for sinks/sources
-rw-r--r--src/pulsecore/sink.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 667ae761..ff8700c7 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1902,7 +1902,7 @@ size_t pa_sink_get_max_request(pa_sink *s) {
/* Called from main context */
pa_bool_t pa_device_init_icon(pa_proplist *p, pa_bool_t is_sink) {
- const char *ff, *t = NULL, *s = "", *profile, *bus;
+ const char *ff, *c, *t = NULL, *s = "", *profile, *bus;
pa_assert(p);
@@ -1919,8 +1919,15 @@ pa_bool_t pa_device_init_icon(pa_proplist *p, pa_bool_t is_sink) {
t = "computer";
else if (pa_streq(ff, "handset"))
t = "phone";
+ else if (pa_streq(ff, "portable"))
+ t = "multimedia-player";
}
+ if (!t)
+ if ((c = pa_proplist_gets(p, PA_PROP_DEVICE_CLASS)))
+ if (pa_streq(c, "modem"))
+ t = "modem";
+
if (!t) {
if (is_sink)
t = "audio-card";
@@ -1957,6 +1964,12 @@ pa_bool_t pa_device_init_description(pa_proplist *p) {
return TRUE;
}
+ if ((s = pa_proplist_gets(p, PA_PROP_DEVICE_CLASS)))
+ if (pa_streq(s, "modem")) {
+ pa_proplist_sets(p, PA_PROP_DEVICE_DESCRIPTION, _("Modem"));
+ return TRUE;
+ }
+
if ((s = pa_proplist_gets(p, PA_PROP_DEVICE_PRODUCT_NAME))) {
pa_proplist_sets(p, PA_PROP_DEVICE_DESCRIPTION, s);
return TRUE;