[Glade-users] Modal Screens



Thanks John, However this gtk_dialog_run() only works for dialogs and
not for "normal" windows. The warning I get is "invalid cast from
GtkWindow to GtkDialog". (which makes sense obviously).

So what I need is a "gtk_window_run()". Any other suggestions how I can
stay into a loop (wait with processing further statements) until a
window is destroyed?

Thanks,
Bas.

-----Original Message-----
From: johnp martianrock com [mailto:johnp martianrock com] 
Sent: Friday, 14 February 2003 01:06
To: Bas Driessen
Subject: Re: [Glade-users] Modal Screens


 
On Thu, 2003-02-13 at 02:25, Bas Driessen wrote:
G'Day,
 
Question regarding "modal" screens in Glade. My understanding is that 
when you display a "modal" screen, your application basically should 
freeze, until this "modal" screen has been processed by the user 
(pressing OK or Cancel button for instance).  So how can I cater for 
this in my code. The structure I need is the following:

Modal dialogs in GTK+/GNOME do not block.  They simply disable input to
any other dialog in the application.  This is so the application can
still do things in the background while the dialog is displayed.  There
is however a way to achive the results you desire in code:

gint response = gtk_dialog_run (GTK_DIALOG (dialog));

I have yet to use this for a custom dialog (only stock ones like file
selector) and am not sure how to get it to return a value based on the
button clicked.

Hope this helps.

--
J5






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