A topic probably interesting to hackers working in sugar-toolkit:<br><br>If I start Read without selecting a file, will try to open a ObjectChooser to select the file:<br>But after the port crash with a error:<br><br>1320441958.125536 ERROR dbus.connection: Unable to set arguments (<ReadActivity object at 0x282f960 (readactivity+ReadActivity at 0x28bd020)>, 'Text') according to signature u'is': <type 'exceptions.TypeError'>: an integer is required<br>
Traceback (most recent call last):<br>  File "/home/gonzalo/sugar-jhbuild/install/bin/sugar-activity", line 147, in <module><br>    main()<br>  File "/home/gonzalo/sugar-jhbuild/install/bin/sugar-activity", line 142, in main<br>
    instance = create_activity_instance(activity_constructor, activity_handle)<br>  File "/home/gonzalo/sugar-jhbuild/install/bin/sugar-activity", line 35, in create_activity_instance<br>    activity = constructor(handle)<br>
  File "/home/gonzalo/Activities/Read.activity/readactivity.py", line 335, in __init__<br>    self._show_journal_object_picker()<br>  File "/home/gonzalo/Activities/Read.activity/readactivity.py", line 569, in _show_journal_object_picker<br>
    result = chooser.run()<br>  File "/home/gonzalo/sugar-jhbuild/install/lib/python2.7/site-packages/sugar3/graphics/objectchooser.py", line 86, in run<br>    self._chooser_id = journal.ChooseObject(self._parent_xid, what_filter)<br>
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 68, in __call__<br>    return self._proxy_method(*args, **keywords)<br>  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 140, in __call__<br>
    **keywords)<br>  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 620, in call_blocking<br>    message.append(signature=signature, *args)<br>TypeError: an integer is required<br><br>The code in Read is:<br>
<br>        chooser = ObjectChooser(_('Choose document'), self,<br>                                Gtk.DialogFlags.MODAL |<br>                                Gtk.DialogFlags.DESTROY_WITH_PARENT,<br>                                what_filter=mime.GENERIC_TYPE_TEXT)<br>
        try:<br>            result = chooser.run()<br><br>and apparently the problem is with the parameter "parent".<br><br>I can put:<br>        chooser = ObjectChooser(_('Choose document'), None,<br>                                Gtk.DialogFlags.MODAL |<br>
                                Gtk.DialogFlags.DESTROY_WITH_PARENT,<br>                                what_filter=mime.GENERIC_TYPE_TEXT)<br><br>and the activity will start, but with gtk2 sugar-toolkit we had a problem <br>
when the activities do not set the parent, and the dialog was over any activity,<br>if the user change the activity.<br><br>In the code of ObjectChooser in the gtk3 branch of sugar toolkit there is the following code:<br>
<br>        if parent is None:<br>            parent_xid = 0<br>        elif hasattr(parent, 'window') and hasattr(parent.window, 'xid'):<br>            parent_xid = parent.window.xid<br>        else:<br>            parent_xid = parent<br>
<br>but the activity do not have a window and if I replace with get_window, I couldn't find xdi.<br><br>Any idea about what to do with this issue?<br><br>Gonzalo<br><br><br><br><br><div class="gmail_quote">On Fri, Nov 4, 2011 at 5:42 PM, Gonzalo Odiard <span dir="ltr"><<a href="mailto:gonzalo@laptop.org">gonzalo@laptop.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">And the patch is here :P<span class="HOEnZb"><font color="#888888"><br><br>Gonzalo<br>
</font></span></blockquote></div><br>