Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-08-21 14:59:32 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-08-21 14:59:32 (GMT)
commit544a400afca2493577909884881d87f4f4a10a10 (patch)
tree8831d58efed159997c175256b6d7ff3240bb13dd /sugar
parent3df75e4c6e05ef6d4b5663b6f2755407264355f8 (diff)
Updated to use application/vnd.olpc-sugar instead of application/vnd.olpc-x-sugar.
Diffstat (limited to 'sugar')
-rw-r--r--sugar/datastore/datastore.py3
-rw-r--r--sugar/graphics/objectchooser.py5
2 files changed, 3 insertions, 5 deletions
diff --git a/sugar/datastore/datastore.py b/sugar/datastore/datastore.py
index 0dbe35b..7af2e93 100644
--- a/sugar/datastore/datastore.py
+++ b/sugar/datastore/datastore.py
@@ -116,7 +116,8 @@ class DSObject(object):
return activities
def is_bundle(self):
- return self.metadata['mime_type'] == 'application/vnd.olpc-x-sugar'
+ return self.metadata['mime_type'] in ['application/vnd.olpc-x-sugar',
+ 'application/vnd.olpc-sugar']
def resume(self, service_name=None):
if self.is_bundle():
diff --git a/sugar/graphics/objectchooser.py b/sugar/graphics/objectchooser.py
index 46739f6..f929063 100644
--- a/sugar/graphics/objectchooser.py
+++ b/sugar/graphics/objectchooser.py
@@ -133,7 +133,7 @@ class CollapsedEntry(CanvasRoundBox):
if self._icon_name:
return self._icon_name
- if self._is_bundle():
+ if self.jobject.is_bundle():
bundle = Bundle(self.jobject.file_path)
self._icon_name = bundle.get_icon()
@@ -159,9 +159,6 @@ class CollapsedEntry(CanvasRoundBox):
ti = time.strptime(self.jobject.metadata['mtime'], "%Y-%m-%dT%H:%M:%S")
return str(Date(time.mktime(ti)))
- def _is_bundle(self):
- return self.jobject.metadata['mime_type'] == 'application/vnd.olpc-x-sugar'
-
def _format_title(self):
return '"%s"' % self.jobject.metadata['title']