From ad3c1630234d82660c9bbb5a303af323f4c60080 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Mon, 24 Jun 2013 02:14:57 -0300 Subject: [PATCH] Fix ObjectChooser backwards compatibility The last change brak compatibility with the use in activities without set the filter_type parameter, because None is not a allowed value in the dbus call. Signed-off-by: Gonzalo Odiard --- src/sugar3/graphics/objectchooser.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sugar3/graphics/objectchooser.py b/src/sugar3/graphics/objectchooser.py index f025363c..3f74c5cd 100644 --- a/src/sugar3/graphics/objectchooser.py +++ b/src/sugar3/graphics/objectchooser.py @@ -125,8 +125,12 @@ class ObjectChooser(object): else: what_filter = self._what_filter - self._chooser_id = journal.ChooseObjectWithFilter( - self._parent_xid, what_filter, self._filter_type) + if self._filter_type is None: + self._chooser_id = journal.ChooseObject( + self._parent_xid, what_filter) + else: + self._chooser_id = journal.ChooseObjectWithFilter( + self._parent_xid, what_filter, self._filter_type) Gdk.threads_leave() try: