Re: Pygobject memory leak in set_property?

2015-01-02 Thread Simon Feltman
On Fri, Jan 2, 2015 at 1:29 PM, Colin Myers wrote: > Yes, the memory increase is in proportion with the size of the text. > > > > But it is more likely to be an error in my understanding than a pygobject or > gtk bug – this is usually the case… This is a memory leak in pygobject. Lots leaks were

Re: Gdk 3.4.1

2013-07-23 Thread Simon Feltman
Hi, The migration guide should help you along if you have not already found it: https://developer.gnome.org/gtk3/3.4/gtk-migrating-2-to-3.html Specifically the expose-event signal has been replace with GtkWidget::draw. -Simon On Sat, Jul 20, 2013 at 10:52 PM, Chris Sparks wrote: > Hello, >

Re: How to call WebKit.DOMDocument.evaluate function in python

2013-07-02 Thread Simon Feltman
nter. I noticed that I made a stupid mistake and was > sending document as a first parameter. > > Your example opened my eyes and now it looks like its running ok. > > Thanks, > > Niranjan > > > On 07/02/2013 02:37 PM, Simon Feltman wrote: > > > On Tue, Jul

Re: How to call WebKit.DOMDocument.evaluate function in python

2013-07-02 Thread Simon Feltman
On Tue, Jul 2, 2013 at 10:35 AM, Niranjan Rao wrote: > > And yes, I had tried creating empty WebKit.DOMXPathResult object and > passing it. Did not work. > It would be helpful to know the details of what didn't work. Code examples of what you have tried, or steps to reproduce the problems you are

Re: How to call WebKit.DOMDocument.evaluate function in python

2013-07-02 Thread Simon Feltman
Hi, On Mon, Jul 1, 2013 at 11:48 PM, Niranjan Rao wrote: > I need to perform some DOM operations once the document is loaded. Webkit > DOMDocument provides evaluate method which can allow me to reach to element > using xpath, if it works. The parameter DOMXPathResult of the evaluate > method ha

Re: style_get_property giving wrong answer?

2013-06-29 Thread Simon Feltman
Hi, Are you using C or Python? If this is specific to Python, there is a bug logged for it here: https://bugzilla.gnome.org/show_bug.cgi?id=701058. Is your mention of "gtk_widget_get_property" a mistake? as it should be "gtk_widget_style_get_property" in the C API. -Simon On Fri, Jun 28, 2013 a

Re: Updating GUI during long operation

2013-04-26 Thread Simon Feltman
On Fri, Apr 26, 2013 at 6:16 AM, Colomban Wendling < lists@herbesfolles.org> wrote: > That's weird. However, although I don't know much about Python > threading (and another guy in this thread suggests it's not really > good), I'm wondering whether your thread couldn't be simply locking > stu

Re: Updating GUI during long operation

2013-04-25 Thread Simon Feltman
On Sat, Apr 20, 2013 at 4:25 PM, Kip Warner wrote: > A brief look at the source and it seems there is nothing calling Gdk.threads_init which I think is needed. Similarly, use Gdk.threads_add_idle instead of GObject.idle_add for scheduling GUI updates from worker threads. T

Re: Best way to busy-wait in Python 3 / Gtk+ 3?

2012-10-08 Thread Simon Feltman
On Sun, Oct 7, 2012 at 9:10 PM, Michael Torrie wrote: > Maybe the best way is to avoid processes or threads altogether. Since > downloading this thumbnail is io-bound, not cpu-bound, once you send off > your request, just use io watches to trigger the main loop when > something has come in. Agre

Re: Best way to busy-wait in Python 3 / Gtk+ 3?

2012-10-07 Thread Simon Feltman
On Sun, Oct 7, 2012 at 12:29 PM, Filip Lamparski wrote: > On 7 October 2012 12:58, wrote: > >> To have the load in another process, use a pipe to send worker results >> back to the main process, and add the pipe to your gtk main loop as an >> event source. >> > > Is there any way I could do that?

Re: Implementing a custom signal with PyGObject

2012-07-06 Thread Simon Feltman
Hi Moritz, A good thing to do would be to pair your example down into something runnable from a console without any dependencies except GObject and Gtk if possible. Anyone helping will have to do this anyway in order to observe the problem. However, something that immediately stuck out in the code,

Re: problems understanding gtk3/gdk/cairo interaction

2012-04-12 Thread Simon Feltman
You should be able to just fill the delta regions between the cursor position changes right? Basically a backwards "L" shape if you're dragging upper-left to lower-right. You would need to do two rect copies (or two calls to gtk_widget_queue_draw_area for each part of the L) as opposed to one. If i

Re: problems understanding gtk3/gdk/cairo interaction

2012-04-06 Thread Simon Feltman
In Gtk3, "draw" is used instead of the expose signal and gives you a cairo context (at least for external api users). This document may also answer some of the questions: http://developer.gnome.org/gtk3/3.4/chap-drawing-model.html I wouldn't expect being able to use the cairo context you are passe