always return a non-NULL string (return "<invalid event id>" as fallback).

2004-06-16  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcontroller.c (gimp_controller_get_event_name)
	(gimp_controller_get_event_blurb): always return a non-NULL
	string (return "<invalid event id>" as fallback).

	* modules/controller_linux_input.c: reenabled button event
	dispatching.

	* app/widgets/gimpcontrollerinfo.c: fixed debugging output.
This commit is contained in:
Michael Natterer
2004-06-16 19:51:33 +00:00
committed by Michael Natterer
parent a1d67f0ecb
commit 004a9572cf
4 changed files with 33 additions and 7 deletions

View File

@ -394,11 +394,16 @@ linux_input_read_event (GIOChannel *io,
for (i = 0; i < G_N_ELEMENTS (key_events); i++)
if (ev.code == key_events[i].code)
{
GimpController *controller = GIMP_CONTROLLER (data);
GimpControllerEvent cevent;
cevent.any.type = GIMP_CONTROLLER_EVENT_TRIGGER;
cevent.any.source = GIMP_CONTROLLER (data);
cevent.any.event_id = i;
gimp_controller_event (controller, &cevent);
break;
}
break;