From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: response on OK button
Date: Sat, 9 Jul 2011 14:14:42 +0200
Date: 2011-07-09T14:14:42+02:00 [thread overview]
Message-ID: <wo75xb7mq2eq$.1ehqghgzzsg19.dlg@40tude.net> (raw)
In-Reply-To: 4e182fbc$0$2558$703f8584@news.kpn.nl
On Sat, 9 Jul 2011 12:37:58 +0200, ldries46 wrote:
> I created a dialog with an OK and a cancel button.
> When I call the dialog using Run(dialog) only the quit button of the window
> gives a response. The OK and the Cancel button do not even give any
> response. I found this by using the Debug facility of GPS.
>
> What do I do wrong.
1. You didn't post the complete code
2. You were running GTK under the debugger, which might lead to
unpredictable results.
> I expected the buttons to react with giving the
> gtk_response_OK or _Cancel value retuirned by Run
As a general note, when adding buttons to the dialog you have to use
Add_Button, which specifies the response for the button being added.
If you don't do that, simply placing a button into the dialog as a
container, you have to catch the signal emitted by the button and close the
dialog manually from the handler.
Either method works.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2011-07-09 12:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-09 10:37 response on OK button ldries46
2011-07-09 12:14 ` Dmitry A. Kazakov [this message]
2011-07-12 10:10 ` ldries46
2011-07-12 15:15 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox