Re: GUI freeze and long blocking operation

2013-06-14 Thread Tristan Van Berkom
On Fri, Jun 14, 2013 at 8:28 AM, Kip Warner k...@thevertigo.com wrote: On Thu, 2013-06-13 at 08:59 +0100, jcup...@gmail.com wrote: Hi Kip, Hey John, There are two easy ways to do a long operation in Python. First, with idle_add(). Your callback should run for no more than 50ms or so

Re: GUI freeze and long blocking operation

2013-06-14 Thread Kip Warner
On Fri, 2013-06-14 at 15:08 +0900, Tristan Van Berkom wrote: On Fri, Jun 14, 2013 at 8:28 AM, Kip Warner k...@thevertigo.com wrote: On Thu, 2013-06-13 at 08:59 +0100, jcup...@gmail.com wrote: Hi Kip, Hey John, There are two easy ways to do a long operation in Python. First, with

Re: Invisible GtkImage

2013-06-14 Thread Andrew Potter
On Thu, Jun 13, 2013 at 9:54 PM, Kip Warner k...@thevertigo.com wrote: What you can do to (try to) prevent that situation is to set the widget to do height for width allocation, and override get_preferred_height_for_width() to honor your aspect ratio. In some situations of course the

GTK free function doesn't appear to have any affect.

2013-06-14 Thread dE
I was monitoring the memory usage before and after execution of g_object_unref and gtk_list_store_clear, and it didnt change the memory usage by a bit. Is this normal (am I doing it right?)? e.g. -- gtk_list_store_clear (store); g_object_unref( G_OBJECT (store) ); g_object_unref ( G_OBJECT (

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread Andrew Potter
On Fri, Jun 14, 2013 at 12:27 AM, dE de.tec...@gmail.com wrote: I was monitoring the memory usage before and after execution of g_object_unref and gtk_list_store_clear, and it didnt change the memory usage by a bit. Is this normal (am I doing it right?)? e.g. -- gtk_list_store_clear

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread dE
On 06/14/13 13:24, Andrew Potter wrote: On Fri, Jun 14, 2013 at 12:27 AM, dE de.tec...@gmail.com wrote: I was monitoring the memory usage before and after execution of g_object_unref and gtk_list_store_clear, and it didnt change the memory usage by a bit. Is this normal (am I doing it right?)?

Re: GUI freeze and long blocking operation

2013-06-14 Thread jcupitt
On 14 June 2013 07:29, Kip Warner k...@thevertigo.com wrote: Hey Tristan. I see what you mean, but I think I should have provided more code to show that what I was actually doing I think was what your followup suggestion was. Namely do some short work, update the GUI, do some more short work,

eclipse problem

2013-06-14 Thread Thomas A. Moulton
I this is the wrong list, but I am active here... so why not start here While editing the project C/C++ Build settings I somehow got the window to shrink horizontally to be a single vertical bar. If I hit ESC the window closes. The edges won't drag Anyone seen this before? Tom

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread Matthias Clasen
On Fri, Jun 14, 2013 at 3:27 AM, dE de.tec...@gmail.com wrote: I was monitoring the memory usage before and after execution of g_object_unref and gtk_list_store_clear, and it didnt change the memory usage by a bit. Is this normal (am I doing it right?)? What are you monitoring, and how ? It

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread dE
On 06/14/13 17:02, Matthias Clasen wrote: On Fri, Jun 14, 2013 at 3:27 AM, dE de.tec...@gmail.com wrote: I was monitoring the memory usage before and after execution of g_object_unref and gtk_list_store_clear, and it didnt change the memory usage by a bit. Is this normal (am I doing it

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread Tristan Van Berkom
On Sat, Jun 15, 2013 at 12:23 AM, dE de.tec...@gmail.com wrote: On 06/14/13 17:02, Matthias Clasen wrote: On Fri, Jun 14, 2013 at 3:27 AM, dE de.tec...@gmail.com wrote: I was monitoring the memory usage before and after execution of g_object_unref and gtk_list_store_clear, and it didnt

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread dE
On 06/14/13 17:02, Matthias Clasen wrote: On Fri, Jun 14, 2013 at 3:27 AM, dE de.tec...@gmail.com wrote: I was monitoring the memory usage before and after execution of g_object_unref and gtk_list_store_clear, and it didnt change the memory usage by a bit. Is this normal (am I doing it

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread dE
On 06/14/13 21:14, Tristan Van Berkom wrote: On Sat, Jun 15, 2013 at 12:23 AM, dE de.tec...@gmail.com wrote: On 06/14/13 17:02, Matthias Clasen wrote: On Fri, Jun 14, 2013 at 3:27 AM, dE de.tec...@gmail.com wrote: I was monitoring the memory usage before and after execution of g_object_unref

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread Chris Vine
On Fri, 14 Jun 2013 21:41:05 +0530 dE de.tec...@gmail.com wrote: On 06/14/13 17:02, Matthias Clasen wrote: On Fri, Jun 14, 2013 at 3:27 AM, dE de.tec...@gmail.com wrote: I was monitoring the memory usage before and after execution of g_object_unref and gtk_list_store_clear, and it didnt

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread dE
On 06/14/13 22:09, Chris Vine wrote: On Fri, 14 Jun 2013 21:41:05 +0530 dEde.tec...@gmail.com wrote: On 06/14/13 17:02, Matthias Clasen wrote: On Fri, Jun 14, 2013 at 3:27 AM, dEde.tec...@gmail.com wrote: I was monitoring the memory usage before and after execution of g_object_unref and

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread Tristan Van Berkom
On Sat, Jun 15, 2013 at 2:33 AM, dE de.tec...@gmail.com wrote: On 06/14/13 22:09, Chris Vine wrote: On Fri, 14 Jun 2013 21:41:05 +0530 dEde.tec...@gmail.com wrote: On 06/14/13 17:02, Matthias Clasen wrote: On Fri, Jun 14, 2013 at 3:27 AM, dEde.tec...@gmail.com wrote: I was monitoring

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread Chris Vine
On Fri, 14 Jun 2013 23:03:55 +0530 dE de.tec...@gmail.com wrote: On 06/14/13 22:09, Chris Vine wrote: On Fri, 14 Jun 2013 21:41:05 +0530 dEde.tec...@gmail.com wrote: On 06/14/13 17:02, Matthias Clasen wrote: On Fri, Jun 14, 2013 at 3:27 AM, dEde.tec...@gmail.com wrote: I was

Re: Invisible GtkImage

2013-06-14 Thread Kip Warner
On Fri, 2013-06-14 at 00:17 -0700, Andrew Potter wrote: I suspect something weird is happening because you have the wrong function signature. I can't find any reference to the basic widget methods on the python gtk documentation website, but the C signature is: void

Re: GUI freeze and long blocking operation

2013-06-14 Thread Kip Warner
On Fri, 2013-06-14 at 10:22 +0100, jcup...@gmail.com wrote: From a quick look your code ought to work. I've written stuff very like this which works fine. Hey John. Yeah, I'm stumped too. I think you'll need to make a complete example I can try running, sorry. Coming up with a minimal for

Re: Invisible GtkImage

2013-06-14 Thread Andrew Potter
On Fri, Jun 14, 2013 at 5:20 PM, Kip Warner k...@thevertigo.com wrote: I have three concerns. The first is that sometimes the incoming allocation has some very strange width and height values in it, but are usually valid the rest of the time. Sometimes I see values like width of -408563232 and

Re: Invisible GtkImage

2013-06-14 Thread Kip Warner
On Fri, 2013-06-14 at 18:17 -0700, Andrew Potter wrote: That's unusual. Quick testing of my own image resizing does not seem to have that occur. If you're sure that your requests are always absolutely sane, you might want to put together a small test case as it could indicate a pygtk bug, or

Re: GTK free function doesn't appear to have any affect.

2013-06-14 Thread dE
On 06/14/13 23:14, Tristan Van Berkom wrote: On Sat, Jun 15, 2013 at 2:33 AM, dE de.tec...@gmail.com wrote: On 06/14/13 22:09, Chris Vine wrote: On Fri, 14 Jun 2013 21:41:05 +0530 dEde.tec...@gmail.com wrote: On 06/14/13 17:02, Matthias Clasen wrote: On Fri, Jun 14, 2013 at 3:27 AM,