Re: Problem with filechooser (defined with Glade)
| From: | Malk0 | Date: | Wed, 25 Jul 2007 12:42:34 +0000 |
| Subject: | Re: Problem with filechooser (defined with Glade) | ||
| References: | 1 2 3 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-7988@lists.php.net to get a copy of this message | ||
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.-- -- le savoir ne vaut que s'il est partagé par tous --Bernardbob majdak jr wrote: 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:-- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpHi 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 hint welcome! Thanks! Bernard