[nautilus/269-nautilus-shows-size-null-on-file-transfer: 2/3] operations-ui-manager: Use better default labels
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/269-nautilus-shows-size-null-on-file-transfer: 2/3] operations-ui-manager: Use better default labels
- Date: Mon, 7 May 2018 07:33:42 +0000 (UTC)
commit 328cec78c169eca3b3adf9dc848341ffd474ea86
Author: António Fernandes <antoniof gnome org>
Date: Tue Apr 24 20:07:21 2018 +0100
operations-ui-manager: Use better default labels
We are showing "(null)" in the conflict dialog.
Example: https://gitlab.gnome.org/GNOME/nautilus/issues/269
Exposes the programming concept of NULL is wrong in itself, and in this
context it may lead a person to think it means the folder is empty.
Instead, get the strings with good default fallbacks.
src/nautilus-operations-ui-manager.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/nautilus-operations-ui-manager.c b/src/nautilus-operations-ui-manager.c
index 33266830a..f13e3d391 100644
--- a/src/nautilus-operations-ui-manager.c
+++ b/src/nautilus-operations-ui-manager.c
@@ -258,15 +258,15 @@ set_file_labels (FileConflictDialogData *data)
should_show_type = !nautilus_file_is_mime_type (data->source,
destination_mime_type);
- destination_date = nautilus_file_get_string_attribute (data->destination,
- "date_modified");
- destination_size = nautilus_file_get_string_attribute (data->destination,
- "size");
+ destination_date = nautilus_file_get_string_attribute_with_default (data->destination,
+ "date_modified");
+ destination_size = nautilus_file_get_string_attribute_with_default (data->destination,
+ "size");
if (should_show_type)
{
- destination_type = nautilus_file_get_string_attribute (data->destination,
- "type");
+ destination_type = nautilus_file_get_string_attribute_with_default (data->destination,
+ "type");
}
destination_label = g_string_new (NULL);
@@ -288,15 +288,15 @@ set_file_labels (FileConflictDialogData *data)
g_string_append_printf (destination_label, "%s %s", _("Last modified:"), destination_date);
- source_date = nautilus_file_get_string_attribute (data->source,
- "date_modified");
- source_size = nautilus_file_get_string_attribute (data->source,
- "size");
+ source_date = nautilus_file_get_string_attribute_with_default (data->source,
+ "date_modified");
+ source_size = nautilus_file_get_string_attribute_with_default (data->source,
+ "size");
if (should_show_type)
{
- source_type = nautilus_file_get_string_attribute (data->source,
- "type");
+ source_type = nautilus_file_get_string_attribute_with_default (data->source,
+ "type");
}
source_label = g_string_new (NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]