Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-04-09 12:24:05 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-04-09 12:24:05 (GMT)
commitd5b257c1b05b9d2eccfe8d452f55e0e7dd0dfef5 (patch)
tree49e267a966f121f4ab8c39e219b6c1618fc7e9c2
parent2694bbd3e72f7b790bcfa97ecd093e07420126b6 (diff)
Add filter to object chooser
-rw-r--r--readactivity.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/readactivity.py b/readactivity.py
index e1dbc42..e2afab5 100644
--- a/readactivity.py
+++ b/readactivity.py
@@ -29,6 +29,7 @@ import telepathy
from sugar.activity import activity
from sugar import network
+from sugar import mime
from sugar.datastore import datastore
from sugar.graphics.objectchooser import ObjectChooser
@@ -220,7 +221,8 @@ class ReadActivity(activity.Activity):
return
chooser = ObjectChooser(_('Choose document'), self,
gtk.DIALOG_MODAL |
- gtk.DIALOG_DESTROY_WITH_PARENT)
+ gtk.DIALOG_DESTROY_WITH_PARENT,
+ what_filter=mime.GENERIC_TYPE_TEXT)
try:
result = chooser.run()
if result == gtk.RESPONSE_ACCEPT: