RE: [PHP-GTK] Open multiple windows-dialog
| From: | Nghia | Date: | Wed, 26 Jan 2005 21:11:27 +0000 |
| Subject: | RE: [PHP-GTK] Open multiple windows-dialog | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5491@lists.php.net to get a copy of this message | ||
How do you close the dialog in the function 'shutdown' ?
If you use the "destroy" method to close the dialog it should do what you
want.
-----Original Message-----
From: difenza2003@libero.it [mailto:difenza2003@libero.it]
Sent: Wednesday, 26 January 2005 10:27 PM
To: GTk GTk
Subject: [PHP-GTK] Open multiple windows-dialog
Hi all there is a workaround to not allow to open the same window
for every time that the user click on the same button ?
I have a button that call a method that open a GTkFileSelection
This a piece of code:
var $file;
function open_dialog() {
//if (!$this->file) {
$this->file = &new GTkFileSelection("Seleziona un cartella per i dati");
$this->file->set_filename('C:\\');
$this->file->connect_object('destroy', array(&$this, 'shutdown'));
//Ok button
$ok_button = $this->file->ok_button;
//Cancel button
$cancel = $this->file->cancel_button;
//Add a callback on event clicked
$ok_button->connect_object('clicked', array(&$this, 'shutdown'));
$cancel->connect_object('clicked', array(&$this, 'shutdown'));
$this->file->show();
//}
}
At the line code if(!this->file) i have added a comment beacuse
when i try with this solution i have opened only for the first
time the dialog but when i close the window there is not possible
to open again the dialog.
I hope that i this message it's simple to understand for you.
Thanks so much and good work to all community's members.
____________________________________________________________
6X velocizzare la tua navigazione a 56k? 6X Web Accelerator di Libero!
Scaricalo su INTERNET GRATIS 6X http://www.libero.it
--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php