Re: Fw: [PHP-GTK-DEV] Re: [php-gtk-cvs] cvs: php-gtk /test bug_gtkfilechooserbutton_actionselectfolder.phpw

From: Date: Wed, 05 Apr 2006 17:14:28 +0000
Subject: Re: Fw: [PHP-GTK-DEV] Re: [php-gtk-cvs] cvs: php-gtk /test bug_gtkfilechooserbutton_actionselectfolder.phpw
References: 1 2  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-2713@lists.php.net to get a copy of this message
Thanks for that Scott, it's helpful. It just came to me in a blinding flash of light that the only thing I'm getting and you're not is that wretched filepath. I'm missing a title and - on the first run through - I'm also missing icon data. That arrives the second time I reach that function for me though, i.e. it _becomes_ populated. But I get the warning because I don't have an icon on the first pass, and I also don't have the fallback option (a GTK theme) installed. OK, I'll fix it over the weekend. It needs thinking about though, it's not straightforward like most of the widgets, thanks to the interface structure and the fact that it was only half-created in GTK 2.6. It'll probably be a lot better if we ever get around to upgrading :) I just realized what you were saying about GtkFileChooserDialog constructor too - we need to remove the parent parameter from there, it doesn't actually have one (at PHP-GTK level). When I'm saying 'I'll fix it', I'm going on the basis that the GtkFileChooserDialog works for you, give or take the parent thing - is that correct? (and also on the basis that GTK will allow me to add one, at this stage). As a side-note, the notify callback in GTK source appears to do nothing... but the useful thing to come of your debugging exercise is that it can't be anything _but_ the existing private GtkFileChooserDialog emitting it. - Steph ----- Original Message ----- From: "Scott Mattocks" <scott@crisscott.com> To: "Steph Fox" <steph@zend.com> Cc: "PHP-GTK dev" <php-gtk-dev@lists.php.net> Sent: Wednesday, April 05, 2006 5:19 PM Subject: Re: Fw: [PHP-GTK-DEV] Re: [php-gtk-cvs] cvs: php-gtk /test bug_gtkfilechooserbutton_actionselectfolder.phpw
Steph Fox wrote:
It'd be nice to be able to view that alleged GtkFileChooserDialog, but it's buried deep in privacy (and style helpers, but we won't go there). There's some reason to believe its typing hasn't always been reliable, so if you could confirm you have g_object_class_install_property() defined for the file chooser dialog in your copy of the source it'd be good.
I have exactly the same call to g_object_class_install_property that you have.
Some high-level debugging might be helpful too, e.g. are there any signals emitted prior to the death of the app? Particularly 'response', or 'current-folder-changed', or 'selection-changed'? Which directory does PHP think you're in when you're calling show()?
Attached is the output of a modified version of the bug script. First I cat'd the script then ran it. The only signals emitted are notify, show and destroy. I thought the errors were only on construction but they appear on construction, when the button is added to the window, and twice after the main loop stops. Thanks, Scott __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com
--------------------------------------------------------------------------------
Script started on Wed 05 Apr 2006 11:18:34 AM EDT ]0;scott@smattocks:~/playground/php-gtk/test[smattocks 11:18 AM test]$ cat bug_gtkgfigfilechooserbutton_actionselectfolder.phpw <?php function debug($func) { echo 'Callback: ' . $func . "\n"; } // Create a window. $window = new GtkWindow(); // Set it up to close cleanly. $window->connect_simple('destroy', array('Gtk', 'main_quit')); // Create a GtkFileChooserButton. Errors occur here. echo "\n--- CONSTRUCTOR ---\n"; $file = new GtkFileChooserButton('Test',
                                Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER
                                );
echo "\n--- END CONSTRUCTOR ---\n"; // Connect some signals. echo "\n--- CONNECT ---\n"; $file->connect_simple('current-folder-changed', 'debug', 'current-folder-changed');
$file->connect_simple('file-activated',         'debug', 'file-activated');
$file->connect_simple('selection-changed',      'debug', 'selection-changed');
$file->connect_simple('update-preview',         'debug', 'update-preview');
$file->connect_simple('notify',                 'debug', 'notify');
$file->connect_simple('show',                   'debug', 'show');
$file->connect_simple('response',               'debug', 'response');
$file->connect_simple('destroy',                'debug', 'destroy');
echo "\n--- END CONNECT ---\n"; // Add the button to the window. echo "\n--- ADD ---\n"; $window->add($file); echo "\n--- END ADD ---\n"; // Show everything and start the loop. echo "\n--- SHOW ---\n"; echo 'CWD: ' . getcwd() . "\n"; $window->show_all(); echo "\n--- END SHOW ---\n"; echo "\n--- MAIN ---\n"; Gtk::main(); echo "\n--- END MAIN ---\n"; ?> ]0;scott@smattocks:~/playground/php-gtk/test[smattocks 11:18 AM test]$ php bug_gtkfilechooserbutton_actionselectfolder.phpw --- CONSTRUCTOR --- (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_volume_for_path: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_render_icon: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_parent: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_folder: assertion `path != NULL' failed --- END CONSTRUCTOR --- --- CONNECT --- Warning: connect_simple(): unknown signal name 'response' in /home/scott/playground/php-gtk/test/bug_gtkfilechooserbutton_actionselectfolder.phpw on line 27 --- END CONNECT --- --- ADD --- (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_volume_for_path: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_render_icon: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_parent: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_folder: assertion `path != NULL' failed Callback: notify --- END ADD --- --- SHOW --- CWD: /home/scott/playground/php-gtk/test Callback: show Callback: notify (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_volume_for_path: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_render_icon: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_parent: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_folder: assertion `path != NULL' failed Callback: notify --- END SHOW --- --- MAIN --- (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_volume_for_path: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_render_icon: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_parent: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_folder: assertion `path != NULL' failed Callback: notify (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_volume_for_path: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_render_icon: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_parent: assertion `path != NULL' failed (bug_gtkfilechooserbutton_actionselectfolder.phpw:28364): Gtk-CRITICAL **: gtk_file_system_get_folder: assertion `path != NULL' failed Callback: notify Callback: destroy --- END MAIN --- ]0;scott@smattocks:~/playground/php-gtk/test[smattocks 11:18 AM test]$ esxixit exit Script done on Wed 05 Apr 2006 11:18:52 AM EDT __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com
--------------------------------------------------------------------------------
-- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com


« previous php.gtk.dev (#2713) next »