|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-12-18 20:06 UTC] auroraeosrose@php.net
[2009-12-18 20:15 UTC] chezmmd at gmail dot com
[2009-12-18 20:37 UTC] auroraeosrose@php.net
[2009-12-26 01:00 UTC] php-gtk-dev at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 21:00:01 2025 UTC |
Description: ------------ Cannot get GtkFileSelection->complete to work, using current release. Took online Manual example of object construction, and added a complete stmt. Results invalid. Reproduce code: --------------- <?php //Creating and initialising the file selection prompt $filePrompt = new GtkFileSelection('GtkFileSelection Demo'); $filePrompt->connect_simple( 'destroy', array('Gtk', 'main_quit') ); $filePrompt->complete("*.txt"); //Adding a quit button that destroys the prompt $filePrompt->cancel_button->set_label('Quit'); $filePrompt->cancel_button->connect_simple( 'clicked', array($filePrompt, 'destroy') ); //Add an OK button that displays the file selected on click $filePrompt->ok_button->set_label('Show the file'); $filePrompt->ok_button->connect('clicked', 'showFile'); //Callback function that displays the file name function showFile($okbutton) { $filePrompt = $okbutton->get_toplevel(); $fileName = $filePrompt->get_filename(); $message = new GtkMessageDialog( null, 0, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK, 'You selected: ' . $fileName ); $message->run(); $message->destroy(); } //Show the prompt and start the main loop $filePrompt->show(); Gtk::main(); ?> Expected result: ---------------- You should see only txt extension files in results window. Actual result: -------------- You get all files listed