[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Verifying input data before gtk_dialog_run returns
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: gtk-app-devel-list gnome org
- Subject: Re: Verifying input data before gtk_dialog_run returns
- Date: Thu, 22 Mar 2007 00:14:01 +0100
On Wed, Mar 21, 2007 at 11:56:36PM +0100, Jaap Haitsma wrote:
> So the recommended way to do it is just do the following (in pseudo code)
>
> do {
> response = gtk_dialog_run (....)
> } while (response == OK && !validated )
>
> I thought of using this but it did not really seem like an elegant way
> to do it.
If the dialog is modal, then this clearly expresses what's
going on.
> I was thinking that there might be some signal handler which
> could do the checking and that gtk_dialog_run would only return if OK
> was pressed and the data was valid
If the dialog is not modal or you like it the hard^welegant
way, do not use gtk_dialog_run(), set up a "response"
handler and put all the logic there.
Whatever you did before, just continue doing it. Mixing
gtk_dialog_run() with a "response" handler is good only for
obfuscation...
Yeti
--
http://gwyddion.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]