summaryrefslogtreecommitdiff
path: root/src/camera/CameraTable.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-01 14:34:32 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-05-01 14:34:32 +0200
commit49120f48474fc8fdc2448c75d961bc238213cfac (patch)
tree05bcdb95d65a807cf0f1ffffd066c09074b5cf56 /src/camera/CameraTable.vala
parent2492891f112caac6076ce49721d9d5d78a152c3a (diff)
New upstream version 0.28.2upstream/0.28.2
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));