From 2e9252b2978e4f7b0bb916051c7b1f5c9c1975cf Mon Sep 17 00:00:00 2001 From: Theo Linkspfeifer Date: Sat, 18 Apr 2020 21:57:21 +0200 Subject: [PATCH] Hide disk usage in tooltip if not available --- thunar/thunar-shortcuts-model.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/thunar/thunar-shortcuts-model.c b/thunar/thunar-shortcuts-model.c index 0d669b2c..a3e4d35b 100644 --- a/thunar/thunar-shortcuts-model.c +++ b/thunar/thunar-shortcuts-model.c @@ -628,7 +628,10 @@ thunar_shortcuts_model_get_value (GtkTreeModel *tree_model, file_size_binary = THUNAR_SHORTCUTS_MODEL (tree_model)->file_size_binary; disk_usage = thunar_g_file_get_free_space_string (file, file_size_binary); - tooltip = g_strdup_printf ("%s\n%s", location, disk_usage); + if (disk_usage) + tooltip = g_strdup_printf ("%s\n%s", location, disk_usage); + else + tooltip = g_strdup_printf ("%s", location); g_value_take_string (value, tooltip); -- 2.26.0