This is used by the GUI and by kete and it's just an abstraction of the handling anyway with little actual logic. Let's make this sharable. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>