Re: Some more questions about hide/show all/now

From: Date: Thu, 26 Jul 2007 10:05:57 +0000
Subject: Re: Some more questions about hide/show all/now
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-7995@lists.php.net to get a copy of this message
Thanks again Malk0, it is fine now! I still have a few quirks now but my application is on its way.. Regards, Bernard Malk0 wrote:
right after the FileChooser->hide_all() try this: while (Gtk::events_pending()) { Gtk::main_iteration(); } then load your file and it should be fine. In fact what happen is that your file loading is too time consuming so it avoid gtk to refresh properly because of it's "high" activity. using the previous code sample will forced the GUI to be redrawn before you start to load the file. see http://gtk.php.net/manual/en/gtk.method.main_iteration.php On 7/25/07, Bernard Fouché <bernard.fouche@kuantic.com> wrote:
Hi again, List. So now my filechooser defined in Glade appears when I want to open a file. The user select the file, the file is loaded and I call FileChooser->hide_all() and it's fine but.. The file being loaded is big and slow to process. So I'd like, when the file is selected by the user, to have the file chooser to be hidden, display in a window 'please wait', and when loading is finished, have this information window be hidden also. I hit the following problem: - Gtk::main runs the application. - The user wants to open a file, the file chooser comes in, the file is selected and my method 'FileChooser::FileOk()' is called. In this method I call FileChooser->hide_all(). But that is not enough to have the filechooser to be hidden immediately: I guess that calls to hide/show set flags that are processed when Gtk::main() gets back control. - So I tried FileChooser->hide_all() and then FileChooser->show_now() (in my method FileChooser::FileOk()). But the result is strange: the inner part of the FileChooser is cleared (I see no more files/folders), the font of the title bar for the file chooser changes and the filechooser itself stays that way on the screen! I have to destroy it manually, by clicking on the 'X'. If I call it again, it reappear the same way. Again all hints welcome! (probably processing things completely differently? Have to load my file after FileChooser::FileOk() is called? But how since Gtk::main() has total control? By manually generating a signal that will be sent later by Gtk::main() to the correct object?) I apologize for these newbie questions! Thanks! Bernard -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.gtk.general (#7995) next »