1 | From 716ce8473ab38edf47eb681925c42d6f24779092 Mon Sep 17 00:00:00 2001 |
---|
2 | From: Martin Abente <mabente@paraguayeduca.org> |
---|
3 | Date: Tue, 6 Jul 2010 15:39:48 -0400 |
---|
4 | Subject: [PATCH] Delete profile data only when erased |
---|
5 | Organization: Paraguay Educa |
---|
6 | |
---|
7 | Profile data should be deleted _only_ when the |
---|
8 | user explicitly erases the activity from the |
---|
9 | activities list. |
---|
10 | |
---|
11 | More information at http://bugs.sugarlabs.org/ticket/2074 |
---|
12 | |
---|
13 | Signed-off-by: Martin Abente <mabente@paraguayeduca.org> |
---|
14 | --- |
---|
15 | src/jarabe/desktop/activitieslist.py | 2 +- |
---|
16 | src/jarabe/model/bundleregistry.py | 4 ++-- |
---|
17 | 2 files changed, 3 insertions(+), 3 deletions(-) |
---|
18 | |
---|
19 | diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py |
---|
20 | index e14d0f7..c14d31e 100644 |
---|
21 | --- a/src/jarabe/desktop/activitieslist.py |
---|
22 | +++ b/src/jarabe/desktop/activitieslist.py |
---|
23 | @@ -371,7 +371,7 @@ class ActivitiesList(gtk.VBox): |
---|
24 | if response_id == gtk.RESPONSE_OK: |
---|
25 | registry = bundleregistry.get_registry() |
---|
26 | bundle = registry.get_bundle(bundle_id) |
---|
27 | - registry.uninstall(bundle) |
---|
28 | + registry.uninstall(bundle, delete_profile=True) |
---|
29 | |
---|
30 | class ActivityListPalette(ActivityPalette): |
---|
31 | __gtype_name__ = 'SugarActivityListPalette' |
---|
32 | diff --git a/src/jarabe/model/bundleregistry.py b/src/jarabe/model/bundleregistry.py |
---|
33 | index 858655f..b96de86 100644 |
---|
34 | --- a/src/jarabe/model/bundleregistry.py |
---|
35 | +++ b/src/jarabe/model/bundleregistry.py |
---|
36 | @@ -386,7 +386,7 @@ class BundleRegistry(gobject.GObject): |
---|
37 | elif not self.add_bundle(install_path): |
---|
38 | raise RegistrationException |
---|
39 | |
---|
40 | - def uninstall(self, bundle, force=False): |
---|
41 | + def uninstall(self, bundle, force=False, delete_profile=False): |
---|
42 | # TODO treat ContentBundle in special way |
---|
43 | # needs rethinking while fixing ContentBundle support |
---|
44 | if isinstance(bundle, ContentBundle) or \ |
---|
45 | @@ -409,7 +409,7 @@ class BundleRegistry(gobject.GObject): |
---|
46 | |
---|
47 | install_path = act.get_path() |
---|
48 | |
---|
49 | - bundle.uninstall(install_path, force) |
---|
50 | + bundle.uninstall(install_path, force, delete_profile) |
---|
51 | |
---|
52 | if not self.remove_bundle(install_path): |
---|
53 | raise RegistrationException |
---|
54 | -- |
---|
55 | 1.6.0.4 |
---|
56 | |
---|