[gnome-shell] status/volume: Include origin in device names
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] status/volume: Include origin in device names
- Date: Tue, 4 Oct 2022 22:10:13 +0000 (UTC)
commit 0ce2bc343b024142dddfe6e6bb57b51bfa407df9
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Oct 3 18:30:13 2022 +0200
status/volume: Include origin in device names
The description alone may not be descriptive enough, so include
the origin (if available) to disambiguate the name.
This is consistent with the Sound Settings panel.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5829
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2502>
js/ui/status/volume.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js
index 71a91cb049..bd49cc3ae8 100644
--- a/js/ui/status/volume.js
+++ b/js/ui/status/volume.js
@@ -113,8 +113,11 @@ const StreamSlider = GObject.registerClass({
if (!device)
return;
- const item = new PopupMenu.PopupImageMenuItem(
- device.get_description(), device.get_gicon());
+ const {description, origin} = device;
+ const name = origin
+ ? `${description} – ${origin}`
+ : description;
+ const item = new PopupMenu.PopupImageMenuItem(name, device.get_gicon());
item.connect('activate', () => this._activateDevice(device));
this._deviceSection.addMenuItem(item);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]