GTK cursor and insensitive containes in middle of a function

Hi Im trying to update the cursor of the app and also make a container insensitive in the start and end of a Glade event function. I want to on start the cursor change to watch and normal in end, but I couldent find a easy way to do. Most of them needs threads but I want to use this in most function calls (to a external server can be long and want advertice to my user)

By the moment the most convincing method is add 3 calls in the glade file per event, but maybe there is more beter options…

Take a look at this SO post: https://stackoverflow.com/a/45865956/12126234

Thanks so much I add this to my loading/unloading function at the end and works very well, thanks!!!
while Gtk.events_pending():
Gtk.main_iteration()

This is usually the indication that something is wrong in your code—a “code smell”, if you will.

There’s no reason whatsoever to spin the GTK main loop manually, unless you’re in the middle of a blocking section and you want your application to limp along instead of rewriting your code to not block.

Hi @ebassi, thanks for join into, my only goal is show a wath cursor when main loop is busy. If there is a simplest and better approach to do I’ m very happy to remove this code (I supose if main loop is busy no UI interation allowed). I want advert to my user his last click need more time to finish…

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.