According to dsd's wisdom, without being
included, strerror is undeclared.
Fixes#4600 sugar crashing when copying
journal entries to documents folder.
Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
There is a fatal crash in Sugar when retrieving mimetypes for some Journal
entries when contructing the icon palette (for both the Journal list view
and detail view). We isolated the problem to xdgmime.c, the call to
xdg_get_mime_parents. Dnarvaez observed that the annotation for the
return argument was missing and that the annotation for the return for
mime_list_parents was wrong. This patch fixes these annotations.
Fixes#4530
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.