After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 137950 - gtk_file_system_win32_get_folder
gtk_file_system_win32_get_folder
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
unspecified
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on: 137316 137956
Blocks:
 
 
Reported: 2004-03-22 16:16 UTC by Morten Welinder
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4


Attachments
Naive implementation (1.29 KB, patch)
2004-03-22 17:00 UTC, J. Ali Harlow
none Details | Review

Description Morten Welinder 2004-03-22 16:16:37 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.
Comment 1 J. Ali Harlow 2004-03-22 16:59:17 UTC
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.
Comment 2 J. Ali Harlow 2004-03-22 17:00:01 UTC
Created attachment 25889 [details] [review]
Naive implementation
Comment 3 Morten Welinder 2004-03-22 17:33:06 UTC
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.)
Comment 4 Morten Welinder 2004-03-22 17:37:04 UTC
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);
 	}
 
Comment 5 J. Ali Harlow 2004-03-22 21:08:54 UTC
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.
Comment 6 Morten Welinder 2004-03-22 21:33:39 UTC
gtkpathbar stuff is now over in bug 137956.
Comment 7 J. Ali Harlow 2004-03-24 16:51:26 UTC
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