Hide window while "busy"



I'm not too good with GTK yet, and need help with what probably is a simple problem.

When the user pushes a button in a window my program starts a pretty long process.
During this process I want the window to disappear, but when calling either
        gtk_widget_destroy(data);
or
        gtk_widget_hide(data);
the window becomes disabled, but is still there.
I think that's because gtk_main is waiting for the button-function to finish, and the button-function is 
waiting for the process.

With gtk_main_quit you can do like this:
   gtk_widget_destroy(GTK_WIDGET(data));
   while (g_main_iteration(FALSE)) 
   gtk_main_quit();
to close the window in the same situation, but that does not work with gtk_widget_destroy or hide.

Is there another way?

Thanks!



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