[gnome-color-manager] Add support for GPhoto supported digital cameras
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Add support for GPhoto supported digital cameras
- Date: Tue, 10 Nov 2009 12:00:24 +0000 (UTC)
commit df468abf12de137ddfd23f1bce4471756f69d8a3
Author: Richard Hughes <richard hughsie com>
Date: Tue Nov 10 10:54:36 2009 +0000
Add support for GPhoto supported digital cameras
src/gcm-client.c | 7 +++++++
src/gcm-prefs.c | 3 ++-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/gcm-client.c b/src/gcm-client.c
index a3c5fc1..75011e6 100644
--- a/src/gcm-client.c
+++ b/src/gcm-client.c
@@ -241,6 +241,13 @@ gcm_client_gudev_add (GcmClient *client, GUdevDevice *udev_device)
egg_debug ("found scanner device: %s", g_udev_device_get_sysfs_path (udev_device));
gcm_client_gudev_add_type (client, udev_device, GCM_DEVICE_TYPE_SCANNER);
}
+
+ /* only matches cameras with gphoto drivers */
+ value = g_udev_device_get_property (udev_device, "ID_GPHOTO2");
+ if (value != NULL) {
+ egg_debug ("found camera device: %s", g_udev_device_get_sysfs_path (udev_device));
+ gcm_client_gudev_add_type (client, udev_device, GCM_DEVICE_TYPE_CAMERA);
+ }
}
/**
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index e10b0fc..cc74611 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -579,7 +579,8 @@ gcm_prefs_set_calibrate_button_sensitivity (void)
egg_debug ("overriding device presence %i with TRUE", ret);
ret = TRUE;
#endif
- } else if (type == GCM_DEVICE_TYPE_SCANNER) {
+ } else if (type == GCM_DEVICE_TYPE_SCANNER ||
+ type == GCM_DEVICE_TYPE_CAMERA) {
/* find if ArgyllCMS is installed */
ret = gcm_prefs_has_argyllcms_installed ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]