Updating a statusbar widget
- From: Nicholas <mcmxc freemail gr>
- To: Gtk <gtk-list gnome org>
- Subject: Updating a statusbar widget
- Date: Sun, 23 Jul 2000 17:49:56 +0300
hi people
imagine the following lines:
-----------------------------------
int
main(arg--etc) {
gtk_init (&argc, &argv);
window --bla-bla--
/* i create a statusbar */
status_bar = gtk_statusbar_new();
gtk_box_pack_start (GTK_BOX (vbox), status_bar, TRUE, TRUE, 0);
gtk_widget_show (status_bar);
context_id = gtk_statusbar_get_context_id(
GTK_STATUSBAR(status_bar), "Statusbar example");
sub_rout1(); // i call a subroutine
gtk_widget_show (window);
gtk_main ();
return(0)
}
void sub_rout1 {
/* here is a loop */
for (bla bla) {
do smth;
sub_rout2();
}
}
void sub_rout2 {
/* in here i'm trying to update the text in 'statusbar' widget */
gtk_statusbar_push( GTK_STATUSBAR(status_bar), GPOINTER_TO_INT(data),
buff)
return;
}
--------------------------------------
Well it doesn't work... exept when it exits from the loop the
statusbar gets the last value.
Any way how to make the updated contents of the statusbar
visible while in the loop?
thanks
N
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]