Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
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
parent3df75e4c6e05ef6d4b5663b6f2755407264355f8 (diff)
Updated to use application/vnd.olpc-sugar instead of application/vnd.olpc-x-sugar.
-rw-r--r--shell/view/clipboardicon.py6
-rw-r--r--sugar/datastore/datastore.py3
-rw-r--r--sugar/graphics/objectchooser.py5
3 files changed, 6 insertions, 8 deletions
diff --git a/shell/view/clipboardicon.py b/shell/view/clipboardicon.py
index c9d910a..5f4c47e 100644
--- a/shell/view/clipboardicon.py
+++ b/shell/view/clipboardicon.py
@@ -54,7 +54,7 @@ class ClipboardIcon(CanvasIcon):
self.palette = ClipboardMenu(self._object_id, self._name, self._percent,
self._preview, self._activity,
- formats and formats[0] == 'application/vnd.olpc-x-sugar')
+ formats and formats[0] == 'application/vnd.olpc-sugar')
def do_set_property(self, pspec, value):
if pspec.name == 'selected':
@@ -80,7 +80,7 @@ class ClipboardIcon(CanvasIcon):
def set_state(self, name, percent, icon_name, preview, activity):
cb_service = clipboardservice.get_instance()
obj = cb_service.get_object(self._object_id)
- if obj['FORMATS'] and obj['FORMATS'][0] == 'application/vnd.olpc-x-sugar':
+ if obj['FORMATS'] and obj['FORMATS'][0] == 'application/vnd.olpc-sugar':
installable = True
else:
installable = False
@@ -88,7 +88,7 @@ class ClipboardIcon(CanvasIcon):
if icon_name:
self.props.icon_name = icon_name
else:
- self.props.icon_name = 'theme:unknown-object'
+ self.props.icon_name = 'theme:application-octet-stream'
self._name = name
self._percent = percent
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']