Pygtk progress bar not updating dating uncircumcised forums

If you looked at the article mentioned at the top of this article, you'll notice that I used the Nothing too difficult about that.Here I will explain how to build a progress bar that behaves like a simple countdown timer.

pygtk progress bar not updating-40

Restart function at line 24 is used to start the thread or restart the counter if the thread is already running.

In this case it's used to update the progress bar in GUI.

Timer is set to daemon thread using Daemon(True) which means the main thread doesn't need to wait for the timer to quit.

Function main() is used to start the gtk main loop.

Important thing is to initialize the threads with gdk.threads_init() before gtk.main() is called.

Leave a Reply