summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorsegfault <segfault@riseup.net>2019-07-21 14:56:30 +0200
committerOndrej Holy <oholy@redhat.com>2019-07-25 12:41:57 +0000
commit258e2344cbade4d259b4ff9912ba455a6873cf03 (patch)
tree71d93ce2a3f5b3f5e4e27b361f94f8e875b93d40 /monitor
parent98d3ca9751ce9589f83ca240f7eda7d6f088457c (diff)
downloadgvfs-258e2344cbade4d259b4ff9912ba455a6873cf03.tar.gz
udisks2: Change display name for crypto_unknown devices
The udisks id_type crypto_unknown is used for devices which are possibly encrypted. In udisks, this uncertainty is conveyed to the user by using the long name "Possibly encrypted", and the short name "Encrypted?". GVfs used to display all devices with id_usage == "crypto" as "Encrypted". This commit instead uses the string "Possibly Encrypted" if id_type == "crypto_unknown".
Diffstat (limited to 'monitor')
-rw-r--r--monitor/udisks2/gvfsudisks2volume.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/monitor/udisks2/gvfsudisks2volume.c b/monitor/udisks2/gvfsudisks2volume.c
index b2545058..89a9f29d 100644
--- a/monitor/udisks2/gvfsudisks2volume.c
+++ b/monitor/udisks2/gvfsudisks2volume.c
@@ -296,10 +296,20 @@ update_volume (GVfsUDisks2Volume *volume)
else if (g_strcmp0 (udisks_block_get_id_usage (block), "crypto") == 0)
{
s = udisks_client_get_size_for_display (udisks_client, udisks_block_get_size (volume->block), FALSE, FALSE);
- /* Translators: This is used for encrypted volumes.
- * The first %s is the formatted size (e.g. "42.0 MB").
- */
- volume->name = g_strdup_printf (_("%s Encrypted"), s);
+ if (g_strcmp0 (udisks_block_get_id_type (block), "crypto_unknown") == 0)
+ {
+ /* Translators: This is used for possibly encrypted volumes.
+ * The first %s is the formatted size (e.g. "42.0 MB").
+ */
+ volume->name = g_strdup_printf (_("%s Possibly Encrypted"), s);
+ }
+ else
+ {
+ /* Translators: This is used for encrypted volumes.
+ * The first %s is the formatted size (e.g. "42.0 MB").
+ */
+ volume->name = g_strdup_printf (_("%s Encrypted"), s);
+ }
g_free (s);
}
else