The recommended way to destroy a Gtk::Dialog on response?



Just found myself in a situation where a Gtk::Dialog has to be

  1. Allocated using "new"
  2. Deleted as and when the user presses a button, i.e. on "response".

(I'm otherwise using Gtk::Dialog with local variables and the run() method most of the time.)

So, what's the best way of setting up for deletion of the object? I mean, I know how it may be done, of course, but is there any kind of built-in support, or any recommendations? Seems to me that the obvious solution, i.e. doing "delete this" inside a signal handler, is something that one would not necessarily recommend...

- Toralf




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