[simple-scan/cherry-pick-824c90c8] Fix replacing underscore with space




commit 24acc14baf4039ea4dd0a7fef1f34a11b1c50112
Author: Bartosz Kosiorek <gang65 poczta onet pl>
Date:   Tue Nov 30 13:27:28 2021 +0100

    Fix replacing underscore with space
    
    
    (cherry picked from commit 824c90c8fd3e215d2ce850a64a34761c79341576)

 src/scanner.vala | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/scanner.vala b/src/scanner.vala
index bf72bb3a..809ba6c0 100644
--- a/src/scanner.vala
+++ b/src/scanner.vala
@@ -384,12 +384,13 @@ public class Scanner : Object
             else
                 scan_device.label = "%s %s".printf (vendor, device_list[i].model);
             
+            /* Replace underscores in name */
+            scan_device.label = scan_device.label.replace ("_", " ");
+            
             /* Additionally add the device name to the label if there are several identical models. */
             if (seen.get(device_list[i].model) > 1)
                 scan_device.label = "%s on %s".printf (scan_device.label, device_list[i].name);
 
-            /* Replace underscores in name */
-            scan_device.label.replace ("_", " ");
 
             devices.append (scan_device);
         }


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