And about this problem "(Also the icon is not correct, which show a speaker instead of a mic)", it seems this is a unity-settings-daemon's bug. After apply the patch below, the problem disappeared.
Index: unity-settings-daemon-14.04.0+14.04.20140606/plugins/media-keys/gsd-media-keys-manager.c =================================================================== --- unity-settings-daemon-14.04.0+14.04.20140606.orig/plugins/media-keys/gsd-media-keys-manager.c 2014-06-06 22:38:57.000000000 +0800 +++ unity-settings-daemon-14.04.0+14.04.20140606/plugins/media-keys/gsd-media-keys-manager.c 2014-11-04 17:49:37.189722571 +0800 @@ -257,6 +257,14 @@ NULL };
+static const char *mic_volume_icons[] = { + "microphone-sensitivity-muted-symbolic", + "microphone-sensitivity-low-symbolic", + "microphone-sensitivity-medium-symbolic", + "microphone-sensitivity-high-symbolic", + NULL +}; + static const char *brightness_icons[] = { "notification-display-brightness-off", "notification-display-brightness-low", @@ -343,10 +351,13 @@ static gboolean ubuntu_osd_notification_show_volume (GsdMediaKeysManager *manager, gint value, - gboolean muted) + gboolean muted, + gboolean is_mic) { + const char **icons_name = is_mic ? mic_volume_icons : volume_icons; + return ubuntu_osd_do_notification (&manager->priv->volume_notification, - "volume", value, muted, volume_icons); + "volume", value, muted, icons_name); }
static gboolean @@ -1337,7 +1348,7 @@ const GvcMixerStreamPort *port; const char *icon;
- if (ubuntu_osd_notification_show_volume (manager, vol, muted)) + if (ubuntu_osd_notification_show_volume (manager, vol, muted, !GVC_IS_MIXER_SINK (stream))) goto done;
vol = CLAMP (vol, 0, 100);
And about this problem "(Also the icon is not correct, which show a speaker instead of a mic)", it seems this is a unity-settings- daemon' s bug. After apply the patch below, the problem disappeared.
Index: unity-settings- daemon- 14.04.0+ 14.04.20140606/ plugins/ media-keys/ gsd-media- keys-manager. c ======= ======= ======= ======= ======= ======= ======= ======= ==== daemon- 14.04.0+ 14.04.20140606. orig/plugins/ media-keys/ gsd-media- keys-manager. c 2014-06-06 22:38:57.000000000 +0800 daemon- 14.04.0+ 14.04.20140606/ plugins/ media-keys/ gsd-media- keys-manager. c 2014-11-04 17:49:37.189722571 +0800
=======
--- unity-settings-
+++ unity-settings-
@@ -257,6 +257,14 @@
NULL
};
+static const char *mic_volume_icons[] = { sensitivity- muted-symbolic" , sensitivity- low-symbolic" , sensitivity- medium- symbolic" , sensitivity- high-symbolic" ,
"notification -display- brightness- off", -display- brightness- low", osd_notificatio n_show_ volume (GsdMediaKeysMa nager *manager,
gint value, osd_do_ notification (&manager- >priv-> volume_ notification,
+ "microphone-
+ "microphone-
+ "microphone-
+ "microphone-
+ NULL
+};
+
static const char *brightness_icons[] = {
"notification
@@ -343,10 +351,13 @@
static gboolean
ubuntu_
- gboolean muted)
+ gboolean muted,
+ gboolean is_mic)
{
+ const char **icons_name = is_mic ? mic_volume_icons : volume_icons;
+
return ubuntu_
- "volume", value, muted, volume_icons);
+ "volume", value, muted, icons_name);
}
static gboolean
@@ -1337,7 +1348,7 @@
const GvcMixerStreamPort *port;
const char *icon;
- if (ubuntu_ osd_notificatio n_show_ volume (manager, vol, muted)) osd_notificatio n_show_ volume (manager, vol, muted, !GVC_IS_MIXER_SINK (stream)))
goto done;
+ if (ubuntu_
vol = CLAMP (vol, 0, 100);