Re: Dialog Problem



On Wed, 12 Feb 2003, Miguel Mendez wrote:

On Wed, 12 Feb 2003 14:59:29 +0530
Saravanan Somu <saran zygox com> wrote:

Howdy,
 
I am new to the GTK. I created one dialog window and openining in my 
code. The execution should not go to the next line unitl the user
close the Dialog. Is it possible in C?

Assuming you're using GTK 2.x, the dialogs can be modal or non-modal.

As explained in the API
(http://developer.gnome.org/doc/API/2.0/gtk/GtkDialog.html)

A 'modal' dialog (that is, one which freezes the rest of the application
from user input), can be created by calling gtk_window_set_modal() on
the dialog. Use the GTK_WINDOW() macro to cast the widget returned from
gtk_dialog_new() into a GtkWindow. When using
gtk_dialog_new_with_buttons() you can also pass the GTK_DIALOG_MODAL
flag to make a dialog modal.

Looks like a modal dialog is what you're looking for.

Cheers,


Hello,

  even if the dialog is modal, the code will "go to the next line". You
should call a function which executes your code when the user clicks on
the correct button, or when the dialog is destroyed or something else.
  That is, i think that you should use signals :
  
tutorial:
http://www.gtk.org/tutorial/sec-theoryofsignalsandcallbacks.html

API:  
http://developer.gnome.org/doc/API/2.0/gobject/gobject-Signals.html
api of all the widgets you use (dialogs and buttons, for now).
  
regards

  Vincent TORRI


-- 
TORRI Vincent
Mathematiques Appliquees Bordeaux                                                
Institut de Mathematiques                                                       
Universite Bordeaux 1                                                           
351 cours de la liberation                                                      
33 405 Talence cedex - France                                                   
                                                                                
Tel : 33 (0)5 57 96 21 42                                                       
Fax : 33 (0)5 56 84 26 26                                                       
--




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