Here is a new revision of the earlier patch, without the g_absolute_path check in it and using gboolean instead of int.
Here is a new revision of the earlier patch, without the g_absolute_path check in it and using gboolean instead of int.