[gnome-boxes/downloads-discoverability: 2/2] wizard-source: Make it easier to tell download rows apart



commit f9ae9554e3ad8933c835d8b108f7040cbde5127b
Author: Felipe Borges <felipeborges gnome org>
Date:   Mon Feb 24 12:06:03 2020 +0100

    wizard-source: Make it easier to tell download rows apart
    
    Unfortunately we are still doing a bad job at differentiating the
    "Download an OS" entries. The reason is the lack of standartization
    in the media filenames and variant classification.
    
    There's a ongoing discussion in Libosinfo to classify the "purpose"
    of a Osinfo.Media.
    
    https://www.redhat.com/archives/libosinfo/2018-November/msg00146.html
    
    For now, let's add a tooltip to the rows containing the media
    filenames.
    
    Fixes #471

 src/wizard-source.vala | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/wizard-source.vala b/src/wizard-source.vala
index 33a29108..b596741e 100644
--- a/src/wizard-source.vala
+++ b/src/wizard-source.vala
@@ -90,6 +90,9 @@ public WizardDownloadableEntry (Osinfo.Media media) {
         details = media.os.vendor;
 
         url = media.url;
+
+        var media_file = GLib.File.new_for_uri (media.url);
+        set_tooltip_text (media_file.get_basename ());
     }
 
     public WizardDownloadableEntry.from_os (Osinfo.Os os) {
@@ -121,7 +124,12 @@ public WizardMediaEntry (InstallerMedia media) {
             // Translators: We show 'Live' tag next or below the name of live OS media or box based on such 
media.
             //              http://en.wikipedia.org/wiki/Live_CD
             title_label.label += " (" +  _("Live") + ")";
-        set_tooltip_text (title_label.label);
+        if (media.device_file != null) {
+            var media_file = GLib.File.new_for_path (media.device_file);
+            set_tooltip_text (media_file.get_basename ());
+        } else {
+            set_tooltip_text (title_label.label);
+        }
 
         if (media.os_media != null) {
             var architecture = (media.os_media.architecture == "i386" || media.os_media.architecture == 
"i686") ?


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