Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAgustin Zubiaga <aguz@sugarlabs.org>2012-02-10 13:49:36 (GMT)
committer Rafael Ortiz <rafael@activitycentral.com>2012-02-10 16:50:28 (GMT)
commit6f5683780a501e07498914a5049c39bd15f61650 (patch)
treecd8edaa945684d5cc267a8cce77d22e3d0db04bd
parent7bb9c3554e2069211a99cfbf17373576eb71ad98 (diff)
Add mime type when save in the journal
This enable to other activities to identify the data Signed-off-by: Agustin Zubiaga <aguz@sugarlabs.org> Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org> Signed-off-by: Rafael Ortiz <rafael@activitycentral.com>
-rw-r--r--activity.py1
-rw-r--r--activity/activity.info1
-rw-r--r--activity/mimetypes.xml7
3 files changed, 9 insertions, 0 deletions
diff --git a/activity.py b/activity.py
index 88313e2..306b081 100644
--- a/activity.py
+++ b/activity.py
@@ -166,6 +166,7 @@ class StopWatchActivity(Activity):
self.gui.set_all(q)
def write_file(self, file_path):
+ self.metadata['mime_type'] = 'application/x-stopwatch-activity'
q = self.gui.get_all()
f = open(file_path, 'w')
cPickle.dump(q, f)
diff --git a/activity/activity.info b/activity/activity.info
index c8fd3da..5ccabfa 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -6,3 +6,4 @@ icon = activity-stopwatch
activity_version = 13
show_launcher = yes
license = GPLv3+
+mime_types = application/x-stopwatch-activity;
diff --git a/activity/mimetypes.xml b/activity/mimetypes.xml
new file mode 100644
index 0000000..2426820
--- /dev/null
+++ b/activity/mimetypes.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-stopwatch-activity">
+ <comment xml:lang="en">StopWatch Activity</comment>
+ <glob pattern="*.stopwatch"/>
+ </mime-type>
+</mime-info>