Gtk execution question

How do I make a sort of "wait" which test a variable value,
for continuing normal gtk execution ?

For example :


void HANDLER_file_select_button_ok( GtkWidget  *w,
                                    GtkFileSelection *fs )
      my_test_variable= 0;


/* create a file selection dialog */
wfs= gtk_file_selection_new("Open existing file");

/* connect handler "HANDLER_select_file_button_ok" to the
   "OK button" of the file selection dialog*/
g_signal_connect( G_OBJECT( GTK_FILE_SELECTION(wfs)->ok_button ),
                  G_CALLBACK( HANDLER_file_select_button_ok), wfs );

/* show the file selection dialog */

/* HERE I would like to stop gtk execution while the OK button */
/* of the file selection dialog is not pressed,                */
/* but GTK execution go on and makes the                       */
/* following 'window widget'  :(                               */

/* follow code which make and show another widget */
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);


I am looking for "a sort" of :

my_test_variable= 1;
wait( my_test_variable );

which should wait while 'my_test_variable' change value,
(e.g. in the handler function I will change 'my_test_variable' into 0
when the "ok button" is pressed).
When 'my_test_variable' changes value GTK should go on and making 'window'

How can obtain this kind of behavior ?

Thank you :)

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