Re: Gtk::Dialog::on_delete_event() is never called
- From: John Spray <spray lyx org>
- To: gtkmm-list gnome org
- Subject: Re: Gtk::Dialog::on_delete_event() is never called
- Date: Wed, 03 Aug 2005 17:48:47 +0100
On Mon, 2005-08-01 at 13:43 +0200, Tobias Eberle wrote:
> Hallo,
>
> > > I want to prevent that the user can close a dialog (derived from
> > > Gtk::Dialog) by clicking on the X. I tried to override
> > > on_delete_event():
> > This shold work. Try a simple test case. It certainly works with
> > Gtk::Window. You might also investigate on_response().
>
> It works with Gtk::Window, but it doesn't with Gtk::Dialog. Try the
> following test program:
When you use GtkDialog::run(), clicking the X doesn't result in a delete
event, it causes the response signal to be emitted with
RESPONSE_DELETE_EVENT.
What you want is probably something like
int result = Gtk::RESPONSE_NONE;
while (result != Gtk::RESPONSE_DELETE_EVENT) {result = mydialog.run()}
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]