diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:35:32 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-05-01 14:35:32 +0200 |
commit | e230b6f78546827521107be23797048482c8b193 (patch) | |
tree | 948c1e77382c484819ea399bba4edcdc19cc6bf0 /src/camera/CameraTable.vala | |
parent | 211da5fc3048ca2b6ccee2166b0aaaade55cb84f (diff) | |
parent | 49120f48474fc8fdc2448c75d961bc238213cfac (diff) |
Update upstream source from tag 'upstream/0.28.2'
Update to upstream version '0.28.2'
with Debian dir 811236a8e9a1308bf427065dcb6270419ff4f965
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)); |