diff options
author | António Fernandes <antoniof@gnome.org> | 2018-04-24 20:07:21 +0100 |
---|---|---|
committer | Carlos Soriano <csoriano1618@gmail.com> | 2018-05-07 07:32:35 +0000 |
commit | 328cec78c169eca3b3adf9dc848341ffd474ea86 (patch) | |
tree | d8f8c760d987cb98d852d3d466565c2b234cb6d8 /src/nautilus-operations-ui-manager.c | |
parent | c3346dec62489710c085a1b8b223ce354fd5c234 (diff) | |
download | nautilus-328cec78c169eca3b3adf9dc848341ffd474ea86.tar.gz |
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.
Diffstat (limited to 'src/nautilus-operations-ui-manager.c')
-rw-r--r-- | src/nautilus-operations-ui-manager.c | 24 |
1 files 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); |