Skip to content

Commit 3f1d9bb

Browse files
committed
nemo-file-utilities.c: Match mounts, volumes and drives with xsi
icons.
1 parent 6001bad commit 3f1d9bb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

libnemo-private/nemo-file-utilities.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,13 +1533,17 @@ get_best_name (GtkIconTheme *icon_theme,
15331533
const gchar * const *names;
15341534
gint i;
15351535

1536-
// TODO: We should just use what gicon Gio gives us and let the theme deal with it.
1537-
// but currently everywhere nemo needs this is looking for icon names, so this function
1538-
// emulates using fallbacks to avoid a lot of refactoring elsewhere.
1539-
15401536
names = g_themed_icon_get_names (G_THEMED_ICON (gicon));
15411537
for (i = 0; i != g_strv_length ((gchar **) names); i++) {
15421538
const gchar *name = names[i];
1539+
1540+
icon_name = g_strconcat ("xsi-", name, NULL);
1541+
if (gtk_icon_theme_has_icon (icon_theme, icon_name)) {
1542+
break;
1543+
}
1544+
1545+
g_clear_pointer (&icon_name, g_free);
1546+
15431547
if (gtk_icon_theme_has_icon (icon_theme, name)) {
15441548
icon_name = g_strdup (name);
15451549
break;

0 commit comments

Comments
 (0)