Can't setup filters for lense using python and libunity-4.0
Hello,
I'm trying to create a new lens using libunity-4.0 and I'm currently stuck adding filters and categories to the lens.
Here is a short piece of code to create a lens and add a category and a filter:
------
from gi.repository import Unity
<.... class stuff and daemon declaring .... >
scope = Unity.Scope.new ("/com/
lens = Unity.Lens.new ("/com/
# Creating a category
category = Unity.Category.new ("Category", Gio.ThemedIcon.new ("group-
scope.props.
#Creating a filter
filter = Unity.RadioOpti
scope.props.
---------
This compiles perfectly, but filters and categories are not added.
'props.sources' and 'props.filters' variables are empty after append() calls. These variables are read-only, so 'props.filters = [filter]' also fails.
Is this an issue - or there is a correct way to add filters and categories in the scope?
Full code is available at lp:unity-gdata-lens
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Ubuntu libunity Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: