[gvfs] udisks2: Change display name for crypto_unknown devices



commit 258e2344cbade4d259b4ff9912ba455a6873cf03
Author: segfault <segfault riseup net>
Date:   Sun Jul 21 14:56:30 2019 +0200

    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".

 monitor/udisks2/gvfsudisks2volume.c | 18 ++++++++++++++----
 1 file 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]