Gui Freezes When Clicking A Button In Pygtk
I know this may be a recurring question, but I don't get the point in the other answers to that problem. First of all, here is my code (if you want syntax highlighting) : http://pa
Solution 1:
The reason this is happening is because the UI only gets updated when you let control return to the main loop. When your test
callback is called, the main loop runs the callback and only when it completes does control return to the main loop and the UI can continue to update. You should only do short running things in callbacks. There are a few ways to make long running functions work:
If Mega has an async versions of the functions you should use those and update details in a callback. Otherwise you'll need to do the Mega functions in a thread. If you do use a thread, you should be careful that you only update the UI on the main thread. Like many UI toolkits, GTK+ UI functions can only be called from the main thread or they will break.
Post a Comment for "Gui Freezes When Clicking A Button In Pygtk"