RE: [PHP-GTK] Managing Dialogs - Newbie Needs Guidence!
| From: | rdp at talisman dot mv dot com | Date: | Thu, 18 Jul 2002 15:47:34 +0000 |
| Subject: | RE: [PHP-GTK] Managing Dialogs - Newbie Needs Guidence! | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-2264@lists.php.net to get a copy of this message | ||
On Thu, 18 Jul 2002, Mark Lopus wrote:
> Rich,
>
> Thx for your reply.
>
> My close_window function is this:
>
> function close_window($widget){
> $window = $widget->get_toplevel();
> $window->hide();
> }
is $window the dialog or the main window? It looks like you're hiding the
main window not the dialog.
> I think that I need to implement a nested gtk::main() (I had previously
> thunk you coulod only have 1.)
No, you can have multiples.
> I did find some examples in the archive, but appreciate any additional
> advice.
>
> Is using nested gtk::main() calls a common way to acheive this type of
> result?
The advantage is that it halts execution of the calling code until such
time as you run gtk::quit() in the dialog.
Have a look at this:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/teak/teak/dialogs/ResultDialog.php?rev=1.2&content-type=text/vnd.viewcvs-markup
This is dialog in Teak that gets extended for certain uses (not meant to
be instanciated itself). The idea being that the main application calls
the start_main function, gets the result from the dialog and then
ends the gtk::main loop and destroys the dialog. The advantage here being
that the dialog is fairly stupid and the logic is elsewhere.
--rdp
--
Rich Payne
http://talisman.mv.com