Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/mamamedia_modules.py
diff options
context:
space:
mode:
authorC. Neves <cn@sueste.net>2007-10-30 18:35:24 (GMT)
committer C. Neves <cn@sueste.net>2007-10-30 18:35:24 (GMT)
commit394128551fdb03004846c75c3d5b0176dd9bd3a4 (patch)
tree2ba5c84e0703616b2a8087983515b36f55e88c7d /mamamedia_modules.py
parent9e312dd5f8feba861d2a5296809f2ef86b24f3f7 (diff)
Removed runtime dependency on MaMaMediaMenu (Creative Center).
New icon. Bumped version to 3.
Diffstat (limited to 'mamamedia_modules.py')
-rw-r--r--mamamedia_modules.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/mamamedia_modules.py b/mamamedia_modules.py
index 659cd91..abcc9cf 100644
--- a/mamamedia_modules.py
+++ b/mamamedia_modules.py
@@ -1,21 +1,31 @@
import os
import sys
-propfile = os.path.expanduser("~/.sugar/default/org.worldwideworkshop.olpc.MMMPath")
-if os.path.exists(propfile):
- mmmpath = file(propfile, 'rb').read()
+cwd = os.path.split(__file__)[0]
+
+import gtk
+theme = gtk.icon_theme_get_default()
+
+if os.path.exists(os.path.join(cwd, 'mmm_modules')):
+ # We are self contained
+ theme.append_search_path(os.path.join(cwd, 'mamamedia_icons'))
+ pass
else:
- mmmpath=os.path.normpath(os.path.join(os.path.split(__file__)[0], '..', 'MaMaMediaMenu.activity'))
+ # Working with shared code on MaMaMediaMenu
-print ("MMMPath", mmmpath)
+ propfile = os.path.expanduser("~/.sugar/default/org.worldwideworkshop.olpc.MMMPath")
+ if os.path.exists(propfile):
+ mmmpath = file(propfile, 'rb').read()
+ else:
+ mmmpath=os.path.normpath(os.path.join(cwd, '..', 'MaMaMediaMenu.activity'))
-sys.path.append(mmmpath)
+ #print ("MMMPath", mmmpath)
+
+ sys.path.append(mmmpath)
+ theme.append_search_path(os.path.join(mmmpath, 'icons'))
from mmm_modules import *
-import gtk
-theme = gtk.icon_theme_get_default()
-theme.append_search_path(os.path.join(mmmpath, 'icons'))
if __name__ == '__main__':
gather_other_translations()