Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/bundle/activitybundle.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2007-10-04 20:46:32 (GMT)
committer Simon Schampijer <simon@schampijer.de>2007-10-04 20:46:32 (GMT)
commit32ecdd8ad628edd6affa6a0d4496a121b5a67a53 (patch)
treecfd8621c09d5e4db6f6d29a70028c921ae13ac4c /sugar/bundle/activitybundle.py
parent5ca3b9081a32cc9e947700107ee26ccce06ede88 (diff)
parent2bcbde6e441ee5ab5743f6b45b5f85e85bbb644f (diff)
Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
Diffstat (limited to 'sugar/bundle/activitybundle.py')
-rw-r--r--sugar/bundle/activitybundle.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/sugar/bundle/activitybundle.py b/sugar/bundle/activitybundle.py
index f77bdb7..0d5a5b4 100644
--- a/sugar/bundle/activitybundle.py
+++ b/sugar/bundle/activitybundle.py
@@ -252,8 +252,13 @@ class ActivityBundle(Bundle):
raise RegistrationException
def uninstall(self):
- if not self.is_installed():
- raise NotInstalledException
+ if self._unpacked:
+ install_path = self._path
+ else:
+ if not self.is_installed():
+ raise NotInstalledException
+ install_path = os.path.join(env.get_user_activities_path(),
+ self._zip_root_dir)
xdg_data_home = os.getenv('XDG_DATA_HOME', os.path.expanduser('~/.local/share'))
@@ -271,10 +276,11 @@ class ActivityBundle(Bundle):
for file in os.listdir(installed_icons_dir):
path = os.path.join(installed_icons_dir, file)
if os.path.islink(path) and \
- os.readlink(path).startswith(self._path):
+ os.readlink(path).startswith(install_path):
os.remove(path)
- self._uninstall()
-
- # FIXME: notify shell
+ self._uninstall(install_path)
+
+ if not activity.get_registry().remove_bundle(install_path):
+ raise RegistrationException