Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2013-02-02 02:43:33 (GMT)
committer Walter Bender <walter.bender@gmail.com>2013-02-02 02:43:33 (GMT)
commit06af33d37f5668e22a7d7a4fd89142a5fea735c2 (patch)
tree9193597e7c5c1eedd7fc0b8a1e6c639b73e20a9d
parent2b19b6cc8751f0977f1d21741f5f43ac5f53e9e9 (diff)
clean up bundle_path code
-rw-r--r--IKnowMyABCs.py17
1 files changed, 2 insertions, 15 deletions
diff --git a/IKnowMyABCs.py b/IKnowMyABCs.py
index 2598771..ba4b564 100644
--- a/IKnowMyABCs.py
+++ b/IKnowMyABCs.py
@@ -1,4 +1,4 @@
-#Copyright (c) 2012 Walter Bender
+#Copyright (c) 2012,13 Walter Bender
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,10 +25,6 @@ if _HAVE_TOOLBOX:
from sugar.activity.widgets import StopButton
from sugar.graphics.toolbutton import ToolButton
-from sugar.graphics.combobox import ComboBox
-from sugar.graphics.toolcombobox import ToolComboBox
-from sugar.datastore import datastore
-from sugar import profile
from gettext import gettext as _
import os.path
@@ -57,8 +53,6 @@ class IKnowMyABCs(activity.Activity):
''' Initialize the toolbars and the reading board '''
super(IKnowMyABCs, self).__init__(handle)
- self.datapath = get_path(activity, 'instance')
-
if 'LANG' in os.environ:
language = os.environ['LANG'][0:2]
elif 'LANGUAGE' in os.environ:
@@ -69,14 +63,7 @@ class IKnowMyABCs(activity.Activity):
# FIXME: find some reasonable default situation
language = 'es'
- home_path = os.path.expanduser('~')
- if os.path.exists(os.path.join(home_path, 'Activities',
- 'IKnowMyABCs.activity')):
- self.activity_path = os.path.join(home_path, 'Activities',
- 'IKnowMyABCs.activity')
- else:
- self.activity_path = os.path.abspath('.')
-
+ self.activity_path = activity.get_bundle_path()
self._lessons_path = os.path.join(self.activity_path,
'lessons', language)
self._images_path = os.path.join(self.activity_path,