From ef3a35b7595c543f6d8b6a54e60e6c21e2a37f8f Mon Sep 17 00:00:00 2001 From: Martin Abente Date: Tue, 06 Jul 2010 19:39:48 +0000 Subject: Delete profile data only when erased #2074 Profile data should be deleted _only_ when the user explicitly erases the activity from the activities list. Signed-off-by: Martin Abente --- diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py index e14d0f7..c14d31e 100644 --- a/src/jarabe/desktop/activitieslist.py +++ b/src/jarabe/desktop/activitieslist.py @@ -371,7 +371,7 @@ class ActivitiesList(gtk.VBox): if response_id == gtk.RESPONSE_OK: registry = bundleregistry.get_registry() bundle = registry.get_bundle(bundle_id) - registry.uninstall(bundle) + registry.uninstall(bundle, delete_profile=True) class ActivityListPalette(ActivityPalette): __gtype_name__ = 'SugarActivityListPalette' diff --git a/src/jarabe/model/bundleregistry.py b/src/jarabe/model/bundleregistry.py index 858655f..b96de86 100644 --- a/src/jarabe/model/bundleregistry.py +++ b/src/jarabe/model/bundleregistry.py @@ -386,7 +386,7 @@ class BundleRegistry(gobject.GObject): elif not self.add_bundle(install_path): raise RegistrationException - def uninstall(self, bundle, force=False): + def uninstall(self, bundle, force=False, delete_profile=False): # TODO treat ContentBundle in special way # needs rethinking while fixing ContentBundle support if isinstance(bundle, ContentBundle) or \ @@ -409,7 +409,7 @@ class BundleRegistry(gobject.GObject): install_path = act.get_path() - bundle.uninstall(install_path, force) + bundle.uninstall(install_path, force, delete_profile) if not self.remove_bundle(install_path): raise RegistrationException -- cgit v0.9.1