Updating branch refs/heads/jannis/port-to-udev
to 089375d4c53d5fd66c7587470aa1f712416a92a2 (commit)
from 3b3fe98c55aa4a9f3e349f25facc29da65799ab0 (commit)
commit 089375d4c53d5fd66c7587470aa1f712416a92a2
Author: Jannis Pohlmann <[email protected]>
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
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits