28 Commits (aa8a5e70c415e6c2acf4ff373d9b366ac4692bb1)

Author SHA1 Message Date
Pro-Panda aa8a5e70c4 Port from Python 2 to six
Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago
James Cameron cc2357c787 Add warnings for missing activity metadata
- report a warning if either activity_version, icon, or license are
  missing,

- fix typo in missing bundle_id exception message.

Fixes #378

Co-authored-by: Rahul Bothra <f2016015@pilani.bits-pilani.ac.in>
6 years ago
James Cameron ab7e9a8247 Fix service_name deprecated whitespace 6 years ago
Sam Parkinson 61bc42f2c2
Merge branch 'bundlebuilder' of https://github.com/samdroid-apps/sugar-toolkit-gtk3 8 years ago
James Cameron 1f93659c95 Avoid private member access to Bundle
ActivityBundle was making reference to _path private in Bundle, change
to use get_path public method.
8 years ago
Sam Parkinson 9b5ed7e80c
Bundlebuilder: Translate AppData files 8 years ago
Sam Parkinson 7779c74f44
Bundlebuilder: Use installed icon path in .desktop file
Previously, the bundle builder referenced the icon path in the
source directory - which was obviously not installed in the package.
8 years ago
Gonzalo Odiard a43b972d1b Don't break activity startup if .info have 'class' instead of 'exec'
When we ported sugar to Gtk3 we removed the support of the fields
exec and service_name due they were deprecated for a long time [1].
But this is still a problem in deployments, and we already added
compatibility for the service_name field.
Here [3] there is a long thred were we discussed this issue.

[1] ae85dd62d4
[2] 32f97b48c3
[3] http://lists.sugarlabs.org/archive/sugar-devel/2013-October/045404.html
9 years ago
Gonzalo Odiard 3c4ac98baf Fix import of exception from ConfigParser
In the commit f0927c364c
the ParsingError is not properly imported.
10 years ago
Gonzalo Odiard f0927c364c Don't break if translation can't be parsed
If the .linfo file can't be parsed, use the untranslated name/summary,
but don't  break activity load.
10 years ago
Gonzalo Odiard 2456465d79 Enable collaboration by default on activities
When we implemented read max_participants from activity.info [1]
we changed the default value of max_participants, from 0 to 1.
Before, was responsability of the activities set max_participants == 1,
when the activity not implemented collaboration.
This change make the default backwards compatible.

[1] d0cca91fe8
10 years ago
Walter Bender d0cca91fe8 Assign max_participants in activity.info
As part of an effort to "honor" max_participants, this patch supports setting
max_participants in activity.info, thus making it available in the bundle.

By default, if it is not set in the bundle, the previous behavior persists.

In support of this change, a cache of Activity bundles is
maintained. The goal is to eliminate unnecessary calls to the file
system.
10 years ago
akskumarnot 81b388c554 Use proper formatting syntax, fixes #2170 11 years ago
Sam f43d5f8d24 Fixes #4634, issue where spaces in bundle ids crashed sugar 11 years ago
Walter Bender cd5292881e Add single_instance field to activity bundle
This field can be used by activities that need to be restricted to a
single open instance. Usage is:

single_instance = yes

jarabe/model/shell.py has been modified look for this field in a
separate patch to Sugar.

Together these two patches constitute the implementation of Sugar
feature Launch Limits [1]

[1] http://wiki.sugarlabs.org/go/Features/Launch_Limits
11 years ago
Gonzalo Odiard 32f97b48c3 Workaround to enable start of activities still using service_name
While we deprecated service_name a long time ago, still there are activities
using it, and is a source of frequent problems.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
11 years ago
Daniel Drake f46ac7ba6a ContentBundle cleanups
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
11 years ago
Daniel Drake 12476caa12 Improve bundle API for bundleregistry changes
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.
11 years ago
William Orr 9e4454a2ed pep8'd sugar3.bundle 11 years ago
Gonzalo Odiard 58bab9cf6a Do not use the translated summary to get the value from gettext in the bundle builder
This patch is a rebased push from pull request #31

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
11 years ago
Walter Bender b4c0b2258f Use gettext algorithm to determine locale for activity.linfo
When activity bundles are loaded, the activity name and summary are
pulled from an activity.linfo file that is associated with
locale. However, sometimes locale, which uses $LANG has been
superceded by $LANGUAGE as set in
extensions/cpsection/languages/model.py. This patch uses the same
algorithm as gettext.py to find activity.linfo

This problem is seen on the .AU systems which use en_AU for locale and
en_GB for LANGUAGE.
11 years ago
Daniel Narvaez db448c4eea Remove a lot of unused imports
Signed-off-by: Daniel Narvaez <dwnarvaez@gmail.com>
11 years ago
Manuel Quiñones b6152b023a ActivityBundle: don't wrap the temporal icon path in a TempFilePath - SL #4276
In the Journal, CellRendererActivityIcon is calling its do_render
method after the temporal file is removed.  This is because we wrap
the icon path in a TempFilePath to control its deletion, but as we
don't maintain any reference to it, its __del__ method deletes the
temporal file.

Note that returning the path directly has one disadventage: the
temporal file is left in /tmp .

As a comment in the get_icon method of ActivityBundle say, ideally we
should return the icon data.  But that implies a major change in the
Journal model and views, and in the CellRendererIcon class.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Gonzalo Odiard 3a30d3f84e Add management of summary property to the activity.info file
This summary is translatable as the Activity name and will be displayed
in the Activity list in the Home View.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Simon Schampijer ae85dd62d4 ActivityBundle: clean from deprecated code
- removed deprecated mime type 'application/vnd.olpc-x-sugar'
- activity.info file: removed deprecated field 'service_name' use 'bundle_id' instead
- activity.info file: removed deprecated field 'class' use 'exec' instead

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Daniel Drake <dsd@laptop.org>
12 years ago
Simon Schampijer 89ef6304a1 Fix broken imports
8f1a821d68 only changed imports starting with
"import", but not those using "from ... import ...".

[replaced description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 8f1a821d68 Rename imports from sugar to sugar3
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 000ed75cbe Rename the module to sugar3
The old gtk-2 based module will be present in
the 0.94 branch in the sugar-toolkit.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago