Re: [pygtk] How to use GDK locking with pygtk3 ?

2013-12-27 Thread Petr Kubanek
Hi,

you are performing some GTK ops in the thread, aren't you? Consider
calling that with gobject.idle_add, so they will run in main thread.

Please see pygtk threading/FAQ for details.

Petr

On Čt, 2013-12-26 at 22:45 +0200, Ronald Sayers wrote:
 Hello,
 
 I just added a infobar into my application -
 https://github.com/wifiextender/pshot and the uploading processes is
 started in a new thread -
 thread.start_new_thread(self.on_upload_clicked,
 (start_in_new_thread, )) . Once it reaches the point - if
 resp_json['success']: , I get the following message, not every time
 but it happens and closes the whole application:
 
 (pshot.py:5016): Gdk-WARNING **: pshot.py: Fatal IO error 11 (Resource
 temporarily unavailable) on X server :0.
 ___
 pygtk mailing list   pygtk@daa.com.au
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] How to use GDK locking with pygtk3 ?

2013-12-27 Thread Ronald Sayers
Solved it, it was caused by infobar which seems have some bugs
combined with threaded function. Parent- start new function in a
thread and show the infobar - process completes - hide the infobar
- spawn a new dialog window.

On 26/12/2013, Ronald Sayers sayers...@gmail.com wrote:
 Hello,

 I just added a infobar into my application -
 https://github.com/wifiextender/pshot and the uploading processes is
 started in a new thread -
 thread.start_new_thread(self.on_upload_clicked,
 (start_in_new_thread, )) . Once it reaches the point - if
 resp_json['success']: , I get the following message, not every time
 but it happens and closes the whole application:

 (pshot.py:5016): Gdk-WARNING **: pshot.py: Fatal IO error 11 (Resource
 temporarily unavailable) on X server :0.

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How to use GDK locking with pygtk3 ?

2013-12-27 Thread John Stowers
No gtk functions can be called from outside the gtk thread (unless you take
the lock - although that doesnt work on windows)

This is not specific to infobar.


On Fri, Dec 27, 2013 at 4:21 PM, Ronald Sayers sayers...@gmail.com wrote:

 Solved it, it was caused by infobar which seems have some bugs
 combined with threaded function. Parent- start new function in a
 thread and show the infobar - process completes - hide the infobar
 - spawn a new dialog window.

 On 26/12/2013, Ronald Sayers sayers...@gmail.com wrote:
  Hello,
 
  I just added a infobar into my application -
  https://github.com/wifiextender/pshot and the uploading processes is
  started in a new thread -
  thread.start_new_thread(self.on_upload_clicked,
  (start_in_new_thread, )) . Once it reaches the point - if
  resp_json['success']: , I get the following message, not every time
  but it happens and closes the whole application:
 
  (pshot.py:5016): Gdk-WARNING **: pshot.py: Fatal IO error 11 (Resource
  temporarily unavailable) on X server :0.
 
 ___
 pygtk mailing list   pygtk@daa.com.au
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://faq.pygtk.org/

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/