Updating branch refs/heads/master to 1a6787121c8fe4cb15f87b6be066d07721aee66f (commit) from ab265b25f13f70b35f3a2ceb2538053507af1883 (commit)
commit 1a6787121c8fe4cb15f87b6be066d07721aee66f Author: Jannis Pohlmann <jan...@xfce.org> Date: Wed Jul 21 11:29:21 2010 +0200 Add support for detecting PTP/gphoto2 cameras. thunar-volman/tvm-usb-device.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/thunar-volman/tvm-usb-device.c b/thunar-volman/tvm-usb-device.c index 8db2c2c..943f362 100644 --- a/thunar-volman/tvm-usb-device.c +++ b/thunar-volman/tvm-usb-device.c @@ -40,14 +40,21 @@ tvm_usb_device_added (TvmContext *context) const gchar *enabled_property = NULL; const gchar *command_property = NULL; gboolean enabled; + gboolean is_camera; gchar *command; g_return_if_fail (context != NULL); /* collect device information */ driver = g_udev_device_get_property (context->device, "DRIVER"); + is_camera = g_udev_device_get_property_as_boolean (context->device, "ID_GPHOTO2"); - if (g_strcmp0 (driver, "usblp") == 0) + if (is_camera) + { + enabled_property = "/autophoto/enabled"; + command_property = "/autophoto/command"; + } + else if (g_strcmp0 (driver, "usblp") == 0) { enabled_property = "/autoprinter/enabled"; command_property = "/autoprinter/command"; _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits