Gtk ProgressBar problem
- From: christophe meyer <christophe data-tools com>
- To: gtk-app-devel-list gnome org
- Subject: Gtk ProgressBar problem
- Date: Wed, 23 Jun 2004 17:19:32 +0200
Hi all,
In my glade designed project i need to update a progressbar when a callback
function is called like in this short example:
void on_button_clicked (GtkButton * button, gpointer user_data)
{
GtkWidget *Progress_Bar = lookup_widget (GTK_WIDGET (button),
"progressbar");
action_function1();
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (Progress_Bar), 0.2);
action_function2();
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (Progress_Bar), 0.4);
action_function3();
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (Progress_Bar), 0.6);
action_function4();
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (Progress_Bar), 0.8);
action_function5();
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (Progress_Bar), 1.0);
}
Each action_function() takes 2 or 3 seconds to finish.
The matter is that when the callback function is called, nothing happens
between the action_functions() with the bar, and at the end, once
action_function5() is finished the progressbar updates directly to 100%.
Home can i gradualy update my progressbar while executing my callback
function ?
Thanks for your help,
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]