Re: ProgressBar update howto
- From: Jason Burchfield <jason burchfield cas-inc com>
- To: Aurélien KAMEL <aurelien kamel gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: ProgressBar update howto
- Date: Wed, 26 Apr 2006 11:03:16 -0500
Aurélien KAMEL wrote:
> I've found a way to do that, with thread. Anything easier ?
>
> Le 26 avr. 06 à 17:08, Aurélien KAMEL a écrit :
>
>> Hello everyone,
>>
>> I would like to do something but I don't know how. What I want to do
>> in one of my function is:
>>
>> some_code;
>> open_a_dialog_with_a_progressbar;
>> while (condition)
>> compute_something;
>> update_progressbar;
>> done;
>> close_dialog;
>> some_code;
>>
>> Could someone give me a piece of code to show me how to do this ? All
>> my attempts have failed...
>>
>> Thanks a lot!
>> Aurélien
>>
>> ps: sorry for my english... still learning.
>>
>> _______________________________________________
>> gtkmm-list mailing list
>> gtkmm-list gnome org
>> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
You should not have to use a thread.
some_code;
open_a_dialog_with_a_progressbar;
while (condition)
compute_something;
update_progressbar;
//you may not want to do this every loop progression
//you could put an if(counter % 500 == 0) or something
//like that around it
while(Gtk::Main::events_pending())
Gtk::Main::iteration(false);
done;
close_dialog;
some_code;
begin:vcard
fn:Jason Burchfield
n:Burchfield;Jason
email;internet:jason burchfield cas-inc com
tel;work:256-971-6096
x-mozilla-html:FALSE
version:2.1
end:vcard
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]