gears.object.properties: Support 'obj.is_something'

Used when there a property is set by mutators instead of accessors.
This commit is contained in:
Emmanuel Lepage Vallee 2016-03-31 01:20:04 -04:00
parent 5655521ec3
commit 828543c838
1 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,8 @@ function object.capi_index_fallback(class, args)
-- Look for a getter method
if args.getter_class and args.getter_class[getter_prefix..prop] then
return args.getter_class[getter_prefix..prop](cobj)
elseif args.getter_class and args.getter_class["is_"..prop] then
return args.getter_class["is_"..prop](cobj)
end
-- Make sure something like c:a_mutator() works