GNOME Bugzilla – Bug 137950
gtk_file_system_win32_get_folder
Last modified: 2004-12-22 21:47:04 UTC
gtk_file_system_win32_get_folder needs to follow its unix counterpart and therefore check that the path specifies a directory. Without this, check_is_folder in gtkfilechooserdefault.c will not work.
Attempting to fix this the obvious way results in the following errors on opening a FileChooser: Gtk-WARNING **: A floating object was finalized. This means... Gtk-CRITICAL **: file gtktreemodel.c: line 1819 (gtk_tree_row_referenence_new_proxy): assertion `GTK_IS_TREE_MODEL (model)' failed Nevertheless, I attach a patch to do so in the hope that it may be useful.
Created attachment 25889 [details] [review] Naive implementation
Hmm... I'm probably to blame for the floating error. Will try to fix. However, something else is wrong. Could you please add a print statement to figure out what filename is in _get_folder? (Why does it fail, that is.)
When we have that filename, please try this: Index: gtkpathbar.c =================================================================== RCS file: /cvs/gnome/gtk+/gtk/gtkpathbar.c,v retrieving revision 1.23 diff -s -u -r1.23 gtkpathbar.c --- gtkpathbar.c 15 Mar 2004 18:12:51 -0000 1.23 +++ gtkpathbar.c 22 Mar 2004 17:36:18 -0000 @@ -1050,7 +1073,8 @@ for (l = new_buttons; l; l = l->next) { GtkWidget *button = BUTTON_DATA (l->data)->button; - gtk_widget_destroy (button); + gtk_widget_ref (button); + gtk_widget_sink (button); gtk_widget_unref (button); }
The critical appears to have been caused by bug #137316 If Gtk+ 2.4.1 does not depend on Glib 2.4.1 we will need to worry about a workaround for this.
gtkpathbar stuff is now over in bug 137956.
2004-03-24 J. Ali Harlow <ali@juiblex.co.uk> * gtk/gtkfilesystemwin32.c (gtk_file_system_win32_get_folder): Test that path is actually a directory and throw error if not. Fixed bug #137950