diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:43:08 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:43:08 +0200 |
commit | 2b3f22361da0c1d8e6ce70d71352821758186db7 (patch) | |
tree | 5d10633b47369b3aa52a05bf889ede0dbe5ee108 /src/camera/CameraTable.vala | |
parent | 211da5fc3048ca2b6ccee2166b0aaaade55cb84f (diff) | |
parent | dc6c76eb04dfe3d4262a1806808f0bc0bf523238 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/camera/CameraTable.vala')
-rw-r--r-- | src/camera/CameraTable.vala | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/camera/CameraTable.vala b/src/camera/CameraTable.vala index 7eb7ae2..1636816 100644 --- a/src/camera/CameraTable.vala +++ b/src/camera/CameraTable.vala @@ -342,11 +342,21 @@ public class CameraTable { display_name = device.get_property("ID_MODEL"); } } + + if (port.has_prefix("disk:")) { + try { + var mount = File.new_for_path (port.substring(5)).find_enclosing_mount(); + var volume = mount.get_volume(); + // Translators: First %s is the name of camera as gotten from GPhoto, second is the GVolume name, e.g. Mass storage camera (510MB volume) + display_name = _("%s (%s)").printf (name, volume.get_name ()); + icon = volume.get_icon().to_string(); + + } catch (Error e) { } + } if (null == display_name) { // Default to GPhoto detected name. display_name = name; } - int index = port_info_list.lookup_path(port); if (index < 0) do_op((GPhoto.Result) index, "lookup port %s".printf(port)); |