sound: Prefer symbolic icons for audio streams
This commit is contained in:
parent
180e723503
commit
dfd4d42fd0
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue