[gnome-control-center] sound: show a different icon for different input/output ports
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] sound: show a different icon for different input/output ports
- Date: Mon, 18 Feb 2013 13:44:00 +0000 (UTC)
commit 3e71962f10fe6abad34437ec8629cc0fbe2cbd6d
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sun Feb 3 18:36:04 2013 +0100
sound: show a different icon for different input/output ports
Use the new API in libgnome-volume-control to create the icon shown
next to the port name in the selector. This avoids ugly audio-card icons,
and shows a speaker, microphone or headphones as appropriate.
https://bugzilla.gnome.org/show_bug.cgi?id=689931
panels/sound/gvc | 2 +-
panels/sound/gvc-mixer-dialog.c | 19 ++++++++-----------
2 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/panels/sound/gvc b/panels/sound/gvc
index 03894ef..74c0862 160000
--- a/panels/sound/gvc
+++ b/panels/sound/gvc
@@ -1 +1 @@
-Subproject commit 03894efbcd010faf53bbc6e27256d27485f721b8
+Subproject commit 74c08620b45a806df7531a434449f612c87c5ea4
diff --git a/panels/sound/gvc-mixer-dialog.c b/panels/sound/gvc-mixer-dialog.c
index 92ec38b..be5251e 100644
--- a/panels/sound/gvc-mixer-dialog.c
+++ b/panels/sound/gvc-mixer-dialog.c
@@ -1115,14 +1115,12 @@ add_input_ui_entry (GvcMixerDialog *dialog,
GtkTreeModel *model;
GtkTreeIter iter;
GIcon *icon;
- GvcMixerCard *card;
g_debug ("Add input ui entry with id :%u",
gvc_mixer_ui_device_get_id (input));
g_object_get (G_OBJECT (input),
"stream-id", &stream_id,
- "card", &card,
"origin", &origin,
"description", &description,
"port-name", &port_name,
@@ -1138,7 +1136,9 @@ add_input_ui_entry (GvcMixerDialog *dialog,
g_free (origin);
g_free (description);
- if (card == NULL) {
+ icon = gvc_mixer_ui_device_get_gicon (input);
+
+ if (icon == NULL) {
GvcMixerStream *stream;
g_debug ("just detected a network source");
stream = gvc_mixer_control_get_stream_from_device (dialog->priv->mixer_control, input);
@@ -1148,9 +1148,7 @@ add_input_ui_entry (GvcMixerDialog *dialog,
return;
}
icon = gvc_mixer_stream_get_gicon (stream);
- } else
- icon = gvc_mixer_card_get_gicon (card);
-
+ }
model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->priv->input_treeview));
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
@@ -1182,14 +1180,12 @@ add_output_ui_entry (GvcMixerDialog *dialog,
GtkTreeModel *model;
GtkTreeIter iter;
GIcon *icon;
- GvcMixerCard *card;
g_debug ("Add output ui entry with id :%u",
gvc_mixer_ui_device_get_id (output));
g_object_get (G_OBJECT (output),
"stream-id", &sink_stream_id,
- "card", &card,
"origin", &origin,
"description", &description,
"port-name", &sink_port_name,
@@ -1205,7 +1201,9 @@ add_output_ui_entry (GvcMixerDialog *dialog,
g_free (origin);
g_free (description);
- if (card == NULL) {
+ icon = gvc_mixer_ui_device_get_gicon (output);
+
+ if (icon == NULL) {
GvcMixerStream *stream;
g_debug ("just detected a network sink");
@@ -1217,8 +1215,7 @@ add_output_ui_entry (GvcMixerDialog *dialog,
return;
}
icon = gvc_mixer_stream_get_gicon (stream);
- } else
- icon = gvc_mixer_card_get_gicon (card);
+ }
model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->priv->output_treeview));
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]