RE: Can't redraw labels in gtk_dialog_new_with_buttons



You need to check for pending events while you are 
doing the large counting:


gtk_widget_show_all(chan_win);
 while (gtk_events_pending()) gtk_main_iteration();
 ...
 //large counting (start)
for(int i =0; i<999999999;i++)
{
    ....
    while (gtk_events_pending()) gtk_main_iteration();
    ....
}
//large counting (end)
 ...
 gtk_widget_destroy(chan_win);

  Pablo Armando

-- Mensaje Original --
Date: Sun, 30 Jan 2005 21:32:37 +0100
From: Vanko Eugen <vanko stonline sk>
To: gtk-app-devel-list gnome org
Subject: Can't redraw labels in gtk_dialog_new_with_buttons


Hi 2 all!

I have preferences widow in which after pressing OK I need to show modal
window  while long counting... 

I have this code:

chan_win=gtk_dialog_new_with_buttons("Channels Setup",GTK_WINDOW(main_win),GTK_DIALOG_MODAL,NULL);
label=gtk_label_new("Counting");
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(chan_win)->vbox),label);
label=gtk_label_new("Please wait...");
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(chan_win)->vbox),label);
gtk_dialog_set_has_separator(GTK_DIALOG(chan_win),FALSE);
gtk_widget_show_all(chan_win);
while (gtk_events_pending()) gtk_main_iteration();
...
//large counting
...
gtk_widget_destroy(chan_win);

The problem is: while (gtk_events_pending()) gtk_main_iteration(); redraw
only window, not labels...
Can somebody help me?

Thx, fuuzuu



---
E-mail y acceso a Internet UltraVeloz totalmente GRATIS en 25 ciudades,
Nro. de acceso 5500-5500   Usuario: Argentina Password: Argentina
http://www.Argentina.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]