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 #2074 |
---|
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 | Signed-off-by: Martin Abente <mabente@paraguayeduca.org> |
---|
12 | --- |
---|
13 | src/jarabe/desktop/activitieslist.py | 2 +- |
---|
14 | src/jarabe/model/bundleregistry.py | 4 ++-- |
---|
15 | 2 files changed, 3 insertions(+), 3 deletions(-) |
---|
16 | |
---|
17 | diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py |
---|
18 | index e14d0f7..c14d31e 100644 |
---|
19 | --- a/src/jarabe/desktop/activitieslist.py |
---|
20 | +++ b/src/jarabe/desktop/activitieslist.py |
---|
21 | @@ -371,7 +371,7 @@ class ActivitiesList(gtk.VBox): |
---|
22 | if response_id == gtk.RESPONSE_OK: |
---|
23 | registry = bundleregistry.get_registry() |
---|
24 | bundle = registry.get_bundle(bundle_id) |
---|
25 | - registry.uninstall(bundle) |
---|
26 | + registry.uninstall(bundle, delete_profile=True) |
---|
27 | |
---|
28 | class ActivityListPalette(ActivityPalette): |
---|
29 | __gtype_name__ = 'SugarActivityListPalette' |
---|
30 | diff --git a/src/jarabe/model/bundleregistry.py b/src/jarabe/model/bundleregistry.py |
---|
31 | index 858655f..b96de86 100644 |
---|
32 | --- a/src/jarabe/model/bundleregistry.py |
---|
33 | +++ b/src/jarabe/model/bundleregistry.py |
---|
34 | @@ -386,7 +386,7 @@ class BundleRegistry(gobject.GObject): |
---|
35 | elif not self.add_bundle(install_path): |
---|
36 | raise RegistrationException |
---|
37 | |
---|
38 | - def uninstall(self, bundle, force=False): |
---|
39 | + def uninstall(self, bundle, force=False, delete_profile=False): |
---|
40 | # TODO treat ContentBundle in special way |
---|
41 | # needs rethinking while fixing ContentBundle support |
---|
42 | if isinstance(bundle, ContentBundle) or \ |
---|
43 | @@ -409,7 +409,7 @@ class BundleRegistry(gobject.GObject): |
---|
44 | |
---|
45 | install_path = act.get_path() |
---|
46 | |
---|
47 | - bundle.uninstall(install_path, force) |
---|
48 | + bundle.uninstall(install_path, force, delete_profile) |
---|
49 | |
---|
50 | if not self.remove_bundle(install_path): |
---|
51 | raise RegistrationException |
---|
52 | -- |
---|
53 | 1.6.0.4 |
---|
54 | |
---|