Hi George,<br><br>Turns out the get_window() method is indeed missing in that older PyGTK. Instead, there is a property called "window".<br><br>So just replace:<br><br>self._socket.get_window()<br><br>with:<br><br>
self._socket.window<br><br>And it should work fine.<br><br>I'll release a new version with this change.<br><br>Thanks,<br>Wade<br><br><div class="gmail_quote">On Sat, Jun 26, 2010 at 4:27 PM, Wade Brainerd <span dir="ltr"><<a href="mailto:wadetb@gmail.com">wadetb@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div bgcolor="#FFFFFF"><div>Hi George,</div><div><br></div><div>Thanks! I'll take a look at it this weekend to see if I can find a workaround for the missing API.</div>
<div><br></div><div>Wade<div><div></div><div class="h5"><br><br>On Jun 26, 2010, at 12:02 PM, George Hunt <<a href="mailto:georgejhunt@gmail.com" target="_blank">georgejhunt@gmail.com</a>> wrote:<br><br></div></div>
</div><div><div></div><div class="h5"><div></div><blockquote type="cite"><div>Hi Wade,<br><br>Thanks for your offer. I've attached XoPhoto-2.xo. There is also a git repo at <a href="http://git.sugarlabs.org/projects/xophoto/repos/mainline" target="_blank"></a><a href="http://git.sugarlabs.org/projects/xophoto/repos/mainline" target="_blank">http://git.sugarlabs.org/projects/xophoto/repos/mainline</a> if that is more convenient.<br>
<br>On my test machine, I reflashed to build 802. For some reason, I had trouble getting the journal to recognize my USB stick. So I copied /media/KINGSTON/XoPhoto-2.xo to /home/olpc/Activities, and then unzipped it. I found that if I commented out line 50 of XoPhoto.activity/sugargame/canvas.py, my application would come up successfully.<br>
<br>Tomeo's hypothesis is that gtk. 2.14.2 (or pygtk) doesn't include _socket.get_window(). <br>Without the ability to set the pygame cursor to None, as you will see, I'm not able to use the gtk cursor resources.<br>
<br>I've tried a few things unsuccessfully to try to get a reference to the pygame window. I'd appreciate any ideas you might have<br><br>George<br><br><div class="gmail_quote">On Fri, Jun 25, 2010 at 10:39 PM, Wade Brainerd <span dir="ltr"><<a href="mailto:wadetb@gmail.com" target="_blank"></a><a href="mailto:wadetb@gmail.com" target="_blank">wadetb@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi George,<div><br></div><div>Can you send me a copy of your activity? I'll try it out on my XO (also running 802) and see what's wrong. </div>
<div><br></div><div>Thanks,</div><div>Wade<font color="#888888"><br><br></font><div class="gmail_quote"><div><div></div><div>
On Tue, Jun 15, 2010 at 9:40 PM, George Hunt <span dir="ltr"><<a href="mailto:georgejhunt@gmail.com" target="_blank"></a><a href="mailto:georgejhunt@gmail.com" target="_blank">georgejhunt@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div>
To: <a href="mailto:sugar-devel@lists.sugarlabs.org" target="_blank"></a><a href="mailto:sugar-devel@lists.sugarlabs.org" target="_blank">sugar-devel@lists.sugarlabs.org</a><br><div class="gmail_quote">Date: Sun, 6 Jun 2010 16:20:05 -0400<br>
Subject: Analysis help needed re: sugargame (pygame) on the 1.0XO (build 802)<br>
Hi everyone,<br><br>I've been developing a thumbnail slide sorting activity using pygame on my 1.5XO. I've been happy with the ease of laying out the screen using pygame. Now I'm checking it out on the 1.0, and having perplexing difficulty.<br>
<br>My guess is that it's something that I'm doing, because the test activity distributed with sugargame, and the Demoiselle demo program developed by Jim Simmons also fail in the same manner. (but I've redownloaded build 802, and reflashed my test machine, and also brought down the most recent git of sugargame)<br>
<br>As I understand it, Sugargame puts a gtk.socket into an eventbox, and the event box is loaded into the XO's VBox by the sugar.graphics.window.set_canvas function -- which is a super of sugar.activity.activity.<br>
<br>In sugargame/canvas.py<br>line 41 self._socket.get_window().set_cursor(None)<br><br>AttributeError: 'gtk.Socket' object has no attribute 'get_window'<br><br>This is after an environment variable "SDL_WINDOWID" has been passed to the pygame.init() routine, (I guess pygame uses this ID to create the gtk.Plug().<br>
<br>What works on the 1.5 (test.activity, and demoiselle.activity, and my application)<br>gtk.ver = 2.16.1<br>pygame.ver = 1.8.1<br><br>What doesn't work on 1.0XO build 802: (all three of these fail with the above AttributeError)<br>
gtk.ver = 2.14.2<br>pygame.ver = 1.8.0<br><br>I looked into putting the pygame 1.9.1 on Build 802, but there were dependencies more than just SDL-devel, and I've still got the nagging feeling that I'm missing something simple (the test.activity was probably tested on build 802)<br>
<br>Any insight, advice would be appreciated,<br><br>George<br>
<br></div><br>
<br></div></div><div>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank"></a><a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank"></a><a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></div></blockquote></div><br></div>
</blockquote></div><br>
</div></blockquote></div></div><blockquote type="cite"><div><XoPhoto-2.xo></div></blockquote></div></blockquote></div><br>