Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tawindow.py
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-02-23 21:39:28 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-02-23 21:39:28 (GMT)
commit8bb0d5595ca12fe322d0177c6da70469a2b3cfee (patch)
tree7c15fdd1c8f6a49f64297663af6844b343531984 /TurtleArt/tawindow.py
parentc27eefea32788673e00d630c06da64a2dcc7d552 (diff)
initial consolidation of plugin path code
Diffstat (limited to 'TurtleArt/tawindow.py')
-rw-r--r--TurtleArt/tawindow.py22
1 files changed, 4 insertions, 18 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 6111a07..32fb638 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -92,9 +92,6 @@ if GST_AVAILABLE:
class TurtleArtWindow():
""" TurtleArt Window class abstraction """
timeout_tag = [0]
- _INSTALL_PATH = '/usr/share/sugar/activities/TurtleArt.activity'
- _ALTERNATE_INSTALL_PATH = \
- '/usr/local/share/sugar/activities/TurtleArt.activity'
_PLUGIN_SUBPATH = 'plugins'
def __init__(self, win, path, parent=None, mycolors=None, mynick=None):
@@ -270,23 +267,12 @@ class TurtleArtWindow():
self.block_operation = ''
def _get_plugin_home(self):
- """ Look in current directory first, then usual places """
- path = os.path.join(os.getcwd(), self._PLUGIN_SUBPATH)
+ """ Look in the execution directory """
+ path = os.path.join(self.path, self._PLUGIN_SUBPATH)
if os.path.exists(path):
return path
- path = os.path.expanduser(os.path.join('~', 'Activities',
- 'TurtleArt.activity',
- self._PLUGIN_SUBPATH))
- if os.path.exists(path):
- return path
- path = os.path.join(self._INSTALL_PATH, self._PLUGIN_SUBPATH)
- if os.path.exists(path):
- return path
- path = os.path.join(self._ALTERNATE_INSTALL_PATH,
- self._PLUGIN_SUBPATH)
- if os.path.exists(path):
- return path
- return None
+ else:
+ return None
def _get_plugin_candidates(self, path):
""" Look for plugin files in plugin directory. """