Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Saldivar Galli <jorgesaldivar@gmail.com>2010-05-20 18:56:58 (GMT)
committer Jorge Saldivar Galli <jorgesaldivar@gmail.com>2010-05-20 18:56:58 (GMT)
commit31d12f2ca21cce580443c01483760bca54881fa2 (patch)
tree529757d15dd5565cfe99acc44940e0744a7d308e
parent2b5521b666f2e39ef096fd53fd333f8cef314d1f (diff)
Some code changed to works with sugar 0.82
-rw-r--r--poll.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/poll.py b/poll.py
index d5485f6..be311e7 100644
--- a/poll.py
+++ b/poll.py
@@ -790,10 +790,15 @@ class PollBuilder(activity.Activity):
self.show_all()
def _button_choose_image_cb(self, button, data=None, data2=None):
- chooser = ObjectChooser(_('Choose image'), self,
- gtk.DIALOG_MODAL |
- gtk.DIALOG_DESTROY_WITH_PARENT, \
- what_filter=mime.GENERIC_TYPE_IMAGE)
+ if hasattr(mime, 'GENERIC_TYPE_IMAGE'):
+ chooser = ObjectChooser(_('Choose image'), self,
+ gtk.DIALOG_MODAL |
+ gtk.DIALOG_DESTROY_WITH_PARENT, \
+ what_filter=mime.GENERIC_TYPE_IMAGE)
+ else:
+ chooser = ObjectChooser(_('Choose image'), self,
+ gtk.DIALOG_MODAL |
+ gtk.DIALOG_DESTROY_WITH_PARENT)
try:
result = chooser.run()
if result == gtk.RESPONSE_ACCEPT: