This code was moved from sugar expandedentry.py to be available to use
in other places. Some activities like Portfolio or JournalShare
have this code copied.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
If the icon can't be found, fall back on showing a generic icon.
Useful when activity/content bundles specify a bad icon, which is
unfortunately true for most content bundles in current existance
(because the icon field was previously unused).
Share get_installation_time() between all bundle types so that it works
with content bundles.
Add get_tags() stub, this is called by Sugar.
Remove unused fields: l10n, category, subcategory, etc.
We remove support for running OLPC's content bundle indexer.
This is assumed to go away now that Sugar will support content bundles
as first-class objects.
Some minor behavioural fixes and cleanups.
This now implements http://wiki.sugarlabs.org/go/Content_bundles
and when care is taken to include all the fields required by old
Sugar versions, there is no change in compatibility of existing or
new content bundles.
Required for http://wiki.sugarlabs.org/go/Features/Content_support
Upon import of uuid, that module uses ctypes.util to find libuuid/libc,
which involves forking a shell process which then forks and runs ldconfig.
ldconfig performs a whole bunch of disk accesses. This is a slowdown.
uuid.getnode() is also documented to be slow. Lets avoid using it in
the activity launch path; we don't need such a high degree of
randomness.
This makes activities launch 1-2 seconds faster on XO-1.
The new bundle helpers were being auto-loaded with sugar3.bundle due
to their placement in __init__.py. This was causing Gi to be imported,
breaking GTK2 activity launches.
Move the helpers to a dedicated module.
At the moment our tests requires to be run inside a clean
dbus/xvfb session, which is not always available where the
check target is used (for example in distcheck). Also when
running distcheck in buildbot we don't really want to run
tests again, since we just run them in the check step.
We might revisit this in the future but using a non standard
target is the easiest solution for now.
The bundle API is a bit confusing and inconsistent. Fix up the
ActivityBundle and ContentBundle classes to be more consistent and to
work with the ongoing improvements being made in bundleregistry.
The last change brak compatibility with the use in activities
without set the filter_type parameter, because None is not
a allowed value in the dbus call.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>