Re: Gtk execution question



My idea was the same, but I supposed there was a different way as in
Tcl/Tk scripting language (tk_wait) :)

Ok. Thank you


                                                                                                         
                      Jamie Guinan                                                                       
                      <guinan bluebutto        To:       Lorenzo Zampese/Electrolux Professional         
                      n.com>                    S.P.A./Italy/Electrolux Group Electrolux                 
                      Sent by:                 cc:       <gtk-list gnome org>                            
                      gtk-list-admin gn        Subject:  Re: Gtk execution question                      
                      ome.org                                                                            
                                                                                                         
                                                                                                         
                      12/11/2002 17:41                                                                   
                      Please respond to                                                                  
                      guinan                                                                             
                                                                                                         
                                                                                                         




On Tue, 12 Nov 2002 lorenzo zampese electrolux it wrote:

> 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 ),
>                   "clicked",
>                   G_CALLBACK( HANDLER_file_select_button_ok), wfs );
>
> /* show the file selection dialog */
> gtk_widget_show(wfs);
>
> /***************************************************************/
> /* 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);
> gtk_widget_show(window);

How about putting that "gtk_widget_show(window);" into your callback?

Also, I assume you're calling into gtk_main() even though you didn't
show it.  You never really want to "stop" GTK execution, since it
has to be running in gtk_main() (or a custom loop) even for your
dialog to work.

-Jamie

_______________________________________________
gtk-list mailing list
gtk-list gnome org
 http://mail.gnome.org/mailman/listinfo/gtk-list







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