[gnome-control-center] sound: Prefer symbolic icons for audio streams
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] sound: Prefer symbolic icons for audio streams
- Date: Thu, 13 Feb 2020 21:16:09 +0000 (UTC)
commit dfd4d42fd03ba46193df6508a3b18a12a9f52009
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Tue Dec 31 14:42:07 2019 +0530
sound: Prefer symbolic icons for audio streams
panels/sound/cc-stream-row.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/panels/sound/cc-stream-row.c b/panels/sound/cc-stream-row.c
index 4a465fdd5..f0277d1de 100644
--- a/panels/sound/cc-stream-row.c
+++ b/panels/sound/cc-stream-row.c
@@ -84,6 +84,7 @@ cc_stream_row_new (GtkSizeGroup *size_group,
g_autoptr(GIcon) gicon = NULL;
const gchar *stream_name;
const gchar *icon_name;
+ g_autofree gchar *symbolic_icon_name = NULL;
self = g_object_new (CC_TYPE_STREAM_ROW, NULL);
self->stream = g_object_ref (stream);
@@ -92,6 +93,11 @@ cc_stream_row_new (GtkSizeGroup *size_group,
icon_name = gvc_mixer_stream_get_icon_name (stream);
stream_name = gvc_mixer_stream_get_name (stream);
+ if (g_str_has_suffix (icon_name, "-symbolic"))
+ symbolic_icon_name = strdup (icon_name);
+ else
+ symbolic_icon_name = g_strconcat (icon_name, "-symbolic", NULL);
+
/* Explicitly lookup for the icon, since some streams may give us an
* icon name (e.g. "audio") that doesn't really exist in the theme.
*/
@@ -101,7 +107,7 @@ cc_stream_row_new (GtkSizeGroup *size_group,
GTK_ICON_LOOKUP_GENERIC_FALLBACK);
if (icon_info)
- gicon = g_themed_icon_new_with_default_fallbacks (icon_name);
+ gicon = g_themed_icon_new_with_default_fallbacks (symbolic_icon_name);
else if (g_str_has_prefix (stream_name, SPEECH_DISPATCHER_PREFIX))
gicon = g_themed_icon_new_with_default_fallbacks ("preferences-desktop-accessibility-symbolic");
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]