modules/gimpinputdevicestore.[ch] improved error handling.
2007-02-13 Sven Neumann <sven@gimp.org> * modules/gimpinputdevicestore.[ch] * modules/controller_linux_input.c: improved error handling. svn path=/trunk/; revision=21911
This commit is contained in:

committed by
Sven Neumann

parent
345fe7b5bc
commit
4db2ed0b82
@ -598,9 +598,19 @@ linux_input_set_device (ControllerLinuxInput *controller,
|
||||
|
||||
g_free (filename);
|
||||
}
|
||||
else
|
||||
else if (controller->store)
|
||||
{
|
||||
g_object_set (controller, "state", _("Device not available"), NULL);
|
||||
GError *error = gimp_input_device_store_get_error (controller->store);
|
||||
|
||||
if (error)
|
||||
{
|
||||
g_object_set (controller, "state", error->message, NULL);
|
||||
g_error_free (error);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_object_set (controller, "state", _("Device not available"), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
Reference in New Issue
Block a user