GNOME Bugzilla – Bug 592364
Use GUdev rather than deprecated HAL for GIMP
Last modified: 2011-06-23 14:36:11 UTC
Please support devicekit, because hal is no longer in development and is deprecated in favor of devicekit.
Confirming and setting milestone Future.
DeiceKit home page: http://www.freedesktop.org/wiki/Software/DeviceKit
Feel free to attach a patch that ports the module to devicekit.
For the record: $ git grep libhal modules/gimpinputdevicestore-dx.c: GimpInputDeviceStore *store = libhal_ctx_get_user_data (ctx); modules/gimpinputdevicestore-dx.c: GimpInputDeviceStore *store = libhal_ctx_get_user_data (ctx); modules/gimpinputdevicestore-hal.c:#include <hal/libhal.h> modules/gimpinputdevicestore-hal.c: store->context = libhal_ctx_new (); modules/gimpinputdevicestore-hal.c: libhal_ctx_set_dbus_connection (store->context, modules/gimpinputdevicestore-hal.c: if (libhal_ctx_init (store->context, &dbus_error)) modules/gimpinputdevicestore-hal.c: devices = libhal_find_device_by_capability (store->context, "input", modules/gimpinputdevicestore-hal.c: libhal_free_string_array (devices); modules/gimpinputdevicestore-hal.c: libhal_ctx_set_user_data (store->context, store); modules/gimpinputdevicestore-hal.c: libhal_ctx_set_device_added (store->context, modules/gimpinputdevicestore-hal.c: libhal_ctx_set_device_removed (store->context, modules/gimpinputdevicestore-hal.c: libhal_ctx_free (store->context); modules/gimpinputdevicestore-hal.c: libhal_ctx_shutdown (store->context, NULL); modules/gimpinputdevicestore-hal.c: libhal_ctx_free (store->context); modules/gimpinputdevicestore-hal.c: caps = libhal_device_get_property_strlist (store->context, modules/gimpinputdevicestore-hal.c: str = libhal_device_get_property_string (store->context, modules/gimpinputdevicestore-hal.c: libhal_free_string (str); modules/gimpinputdevicestore-hal.c: str = libhal_device_get_property_string (store->context, modules/gimpinputdevicestore-hal.c: libhal_free_string (str); modules/gimpinputdevicestore-hal.c: libhal_free_string_array (caps); modules/gimpinputdevicestore-hal.c: GimpInputDeviceStore *store = libhal_ctx_get_user_data (ctx); modules/gimpinputdevicestore-hal.c: GimpInputDeviceStore *store = libhal_ctx_get_user_data (ctx); modules/gimpinputdevicestore-hal.c: char *str = libhal_device_get_property_string (store->context, modules/gimpinputdevicestore-hal.c: libhal_free_string (str);
We know where we use hal :) Why don't you attach a patch that ports the code to devicekit?
Wouldn't this be completely obsoleted by a GTK+ using XI2 (thus allowing hotplug devices, device enumeration and access to all the keys on devices)?
Yes, probably. The linux-input module in GIMP is really just a hack. But it's a nice hack for people who would like to play with fancy input devices. However ff someone wants to improve this, feel free to send your patches.
CC'ing Garnacho as he should have some good overview here.
If libhal is just used for input devices, it should be definitely replaceable by my XI2 work, in the xi2 branch there is a GdkDeviceManager object, with device-added and device-removed signals, so keeping track of changes in the device hierarchy should be quite easy.
DeviceKit is now obsolete too, so -> GUdev
Fixed in master: commit f1bb40166b1061f630fab615f658310c25abf423 Author: Michael Natterer <mitch@gimp.org> Date: Thu Jun 23 16:30:58 2011 +0200 Bug 592364 - Use GUdev rather than deprecated HAL for GIMP GIMP was probably the only user of libhal on most systems, this had to stop. Ported the linux-input module to GUdev. configure.ac | 30 ++-- modules/Makefile.am | 6 +- modules/controller-linux-input.c | 8 +- modules/gimpinputdevicestore-gudev.c | 433 ++++++++++++++++++++++++++++++++ modules/gimpinputdevicestore-hal.c | 459 ---------------------------------- 5 files changed, 455 insertions(+), 481 deletions(-)