Re: Problem with filechooser (defined with Glade)
| From: | Bernard Fouché | Date: | Wed, 25 Jul 2007 12:56:56 +0000 |
| Subject: | Re: Problem with filechooser (defined with Glade) | ||
| References: | 1 2 3 4 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-7989@lists.php.net to get a copy of this message | ||
Thanks Malk0, it now works!
However for a GTK newbie like me all these signal names are so close one to each other (delete, delete-event, destroy) that I've trouble to figure what signal to use! Also where can I read that I should have used hide/show instead of set_visible?
Bernard
Malk0 wrote:
have you try to use the 'delete-event' instead of just 'delete' On 7/25/07, Bernard Fouché <bernard.fouche@kuantic.com> wrote:Thanks Bob for your answer. Using show() and hide() fix the problem when I use the 'Cancel' button or select a file, but not for the delete event: I can't 'connect_simple' on 'delete' for the FileChooser, Php reports that this signal is unknown. However I can connect_simple() to the 'destroy' signal and my called method calls hide() and then returns 'true'. In that case I have the same problem I had with set_visible() but in a slightly different way: when I call show() again, the file chooser window will appear and then disappear very fast, showing only the title bar for this window.grr. reposting to the list. grr. What if you use hide() and show() instead of set_visible()? Also, are you returning true from the callback for the delete-event (clicking the X)? If you do not dominos keep toppling over and smashes the insides to bits, creating the effect of losing your innards when you try and reshow the window. - bob. Bernard Fouch wrote:Bernardbob majdak jr wrote:welcome!Hi list. I'm new to PHP-GTK and try to use it with Glade-2. (PHP version is 5.2.2 and PHP-GTK module is 2.0.0beta). I run Linux F7. In Glade, I define a main window with some children and a FileChooser set to be invisible until I need it. When the user chooses 'Open' in the menu bar of the main window, I call $FileChooser->set_visible(true) and it works. When the FileChooser is closed, I call $FileChooser->set_visible(false) and it works also. However the next call to $FileChooser->set_visible(true) won't correctly redraw the file chooser widget: only the background of the widget is drawn. If I do a pair of set_visible(false)/(true) again on it, only the title of the file chooser window is drawn. I'm new to GUI and PHP-GTK so I probably miss something obvious, or my way of using Glade and the filechooser is wrong.. Any hintThanks! Bernard-- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php