summaryrefslogtreecommitdiff
path: root/src/camera/CameraTable.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-07-09 12:10:38 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-07-09 12:10:38 +0200
commit709e2d6f5652ec90c194a4ec2b530bebc6f952cb (patch)
tree496b2f3899e1d5728ee9ae76095cc5056c317447 /src/camera/CameraTable.vala
parentf1353e9ffd34db5f755c7da0b3f9c10638fbfd38 (diff)
parent5c8be07095cc04a6d8a95204b0504fd7ab030154 (diff)
Merge branch 'release/0.28.3-1'0.28.3-1
Diffstat (limited to 'src/camera/CameraTable.vala')
-rw-r--r--src/camera/CameraTable.vala12
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));