[pygtk] progressbar not progressing

John Finlay finlay at moeraki.com
Tue Aug 14 15:58:16 WST 2007


Alexandre Abadie wrote:
> Pascal Duchatelle a écrit :
>> Hi,
>>
>> I used the progressbar example as a basis to try this widget out.
>> Basically I have a main window with a pbar and a statusbar.
>> Like in the example given in the pygtk doc, I created a timer and a
>> function (F1, called by the timer) to "update" the pbar and sbar. Also I
>> incorporated a print action in F1 so that I could see that it is
>> called/launched.
>> I also have a button with a call_back connected.
>> Basically this call_back is a loop over a textfile that is split in
>> say 50 parts (2% increments) and some printing to check the process as
>> well as slowing it down. This is the process of which I want to follow
>> the progress.
>> when I start the main, everything goes well, meaning the F1 function is
>> called and I can see a recurrent printing included in this function.
>> Then, when I press the button the loop goes well, but no update of
>> neither the pbar nor the sbar. And when this loop is finished. the
>> F1 printing resumes, and of course the pbar is shown at 100% and the
>> sbar with the appropriate (complete) text. It looks like it there is no
>> update of the main window including pbar and sbar during the loop.
>> I tried to "update" the set_fraction of the pbar within the loop. It
>> does not work either.
>> What did I miss ? Does the pbar need to be .show()n ? It does not seem
>>  like it from the example.
>> By the way where is the gobject.timeout described ? I did not find it
>> in the pygtk reference. Should I rather look in the gtk doc ?
>> Thanx for your help.
>> Pascal
>>
>> P.S. may be you need to know that the window and its widgets are built
>> from a glade file. the pbar as well as the sbar are in a hbox that is
>> in a vbox that is in the mainwindow.all these widgets are retrieved in
>> the __init.
>>   
> Hi,
>
> I have the same problem and I am interested if someone have a solution.
Check the FAQ:

http://faq.pygtk.org/index.py?req=show&file=faq23.020.htp 
<http://faq.pygtk.org/index.py?req=show&file=faq23.020.htp>


More information about the pygtk mailing list