[nautilus/wip/corey/properties: 34/36] properties: Use Operating System name for root filesystem
- From: Corey Berla <coreyberla src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/corey/properties: 34/36] properties: Use Operating System name for root filesystem
- Date: Wed, 31 Aug 2022 23:58:09 +0000 (UTC)
commit 58156766cb32fef0b85d3eeb8da503a4ef82d0a4
Author: Corey Berla <corey berla me>
Date: Tue Aug 23 11:12:07 2022 -0700
properties: Use Operating System name for root filesystem
For consistency with what we do in Places, use the operating system
name or "Operating System" instead of "/"
src/nautilus-properties-window.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 1e03b4bda..dd4ed5e3e 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -855,6 +855,8 @@ static void
update_name_field (NautilusPropertiesWindow *self)
{
g_autoptr (GString) name_str = g_string_new ("");
+ g_autofree gchar *os_name = NULL;
+ gchar *name_value;
guint file_counter = 0;
for (GList *l = self->target_files; l != NULL; l = l->next)
@@ -876,7 +878,17 @@ update_name_field (NautilusPropertiesWindow *self)
}
}
- gtk_label_set_text (self->name_value_label, name_str->str);
+ if (!is_multi_file_window (self) && is_root_directory (get_original_file (self)))
+ {
+ os_name = g_get_os_info (G_OS_INFO_KEY_NAME);
+ name_value = (os_name != NULL) ? os_name : _("Operating System");
+ }
+ else
+ {
+ name_value = name_str->str;
+ }
+
+ gtk_label_set_text (self->name_value_label, name_value);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]