[Xfce4-commits] <thunar-volman:jannis/port-to-udev> Add support for detecting PTP/gphoto2 cameras.
Jannis Pohlmann
noreply at xfce.org
Sun Jul 25 19:44:18 CEST 2010
Updating branch refs/heads/jannis/port-to-udev
to 1a6787121c8fe4cb15f87b6be066d07721aee66f (commit)
from ab265b25f13f70b35f3a2ceb2538053507af1883 (commit)
commit 1a6787121c8fe4cb15f87b6be066d07721aee66f
Author: Jannis Pohlmann <jannis at 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";
More information about the Xfce4-commits
mailing list