Difference between revisions of "Features/Launch Limits"
Line 23: | Line 23: | ||
See [https://github.com/walterbender/sugar/commit/3fea62baf20a30e11015a014aeb94a16fba58554] and [https://github.com/walterbender/sugar-toolkit-gtk3/commit/1d550b33e9c083140e453cc19389d7966e888a14] | See [https://github.com/walterbender/sugar/commit/3fea62baf20a30e11015a014aeb94a16fba58554] and [https://github.com/walterbender/sugar-toolkit-gtk3/commit/1d550b33e9c083140e453cc19389d7966e888a14] | ||
− | |||
− | |||
− | |||
− | |||
== Detailed Description == | == Detailed Description == | ||
Line 98: | Line 94: | ||
== Comments and Discussion == | == Comments and Discussion == | ||
+ | * http://lists.sugarlabs.org/archive/sugar-devel/2013-November/045585.html | ||
* See [[{{TALKPAGENAME}}|discussion tab for this feature]] | * See [[{{TALKPAGENAME}}|discussion tab for this feature]] | ||
---- | ---- |
Revision as of 14:28, 5 November 2013
Summary
Provide limits to the number of open activities and number of open instances of an activity.
Owner
- Name: Walter Bender
- Email: <walter AT sl.o>
Current status
- Targeted release: (1.02)
- Last updated: (5 November 2013)
- Percentage of completion: 100%
Detailed Description
Set limit to open activities and open instances
At the request of OLPC AU (in an effort to reduce OOM freezes) this patch uses gconf to set a maximum number of open activities. An alert is shown if the user tries to launch more activities than the maximum asking them to close an activity before opening a new one. If maximum_number_of_open_activites is not set or == 0, then there is no maximum limit applied.
Further, Some activities don't behave well if more than one instance is open (e.g., SL #4554). This patch sets a limit on the number open instances of an activity based on a new field in activity.info: maximum_instances.
If and only if the maximum_instances field is present in activity.info, is it used to set the limit of open instances.
Benefit to Sugar
This is a feature that is already used in one major deployment. It seems to reduce OOM freezes and confusion about why activities such as Record fail when multiple copies are open.
Scope
In sugar: jarabe/desktop/homewindow.py jarabe/journal/journalactivity.py jarabe/journal/misc.py jarabe/view/launcher.py and jarabe/model/shell.py
In the toolkit: sugar3/bundle/activitybundle.py
Also impacts the activity.info file of any activity that wishes to set a limit to the number of open instances:
maximum_instances = 1
How To Test
Maximum instances:
- Add a maximum_instances field to the activity.info file of an activity
- Launch repeatedly and see if a limit is set
Maximum launches:
- From terminal gconftool-2 -t int -s /desktop/sugar/maximum_number_of_open_activities 4
- See if more than 4 activities can be launched
- From terminal gconftool-2 -u /desktop/sugar/maximum_number_of_open_activities
- See if there is any limit to the number of activities that can be launched
User Experience
The direct impact on the user who have the gconf limit set is to get feedback when too many activities are launched. Activity developers can set a limit to the number of instances that can be launched.
Dependencies
No new dependencies
Contingency Plan
None. The feature is complete pending code review.
Documentation
The gconf setting used by this feature is:
/desktop/sugar/maximum_number_of_open_activities
The new (optional) field in the activity.info file is:
maximum_instances
Release Notes
Comments and Discussion
- http://lists.sugarlabs.org/archive/sugar-devel/2013-November/045585.html
- See discussion tab for this feature