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 139423 - gtkfilechooserdefault.c
gtkfilechooserdefault.c
Status: RESOLVED INCOMPLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.4.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-04-07 22:12 UTC by Todd A. Fisher
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix check the return value of gtk_file_system_path_to_uri (652 bytes, patch)
2004-04-07 22:14 UTC, Todd A. Fisher
none Details | Review
_gtk_path_bar_set_path patch for win32 (1.25 KB, patch)
2004-04-07 23:49 UTC, Todd A. Fisher
none Details | Review
fix for g_path_is_absolute so it works correctly for C: etc... (1.04 KB, patch)
2004-04-07 23:53 UTC, Todd A. Fisher
none Details | Review

Description Todd A. Fisher 2004-04-07 22:12:29 UTC
While running glade -2.5.1 in win32 I found that the filechooser was 
crashing.  Digging into the gtkfilechooserdefualt.c source it looks
like the crash could be prevented if the return value of
gtk_file_system_path_to_uri is checked in update_from_entry.  making
this change in my source tree fixed the crash.  Its not an absolute
fix because there is still a critical messaging comming out in the 
command line but at least the application doesn't die.
Comment 1 Todd A. Fisher 2004-04-07 22:14:17 UTC
Created attachment 26451 [details] [review]
patch to fix check the return value of gtk_file_system_path_to_uri
Comment 2 Todd A. Fisher 2004-04-07 23:49:39 UTC
Created attachment 26452 [details] [review]
_gtk_path_bar_set_path patch for win32

this is another patch that helps in getting the file choooser to work in win32
specifically, it appears the logic in the gtkpathbar.c: _gtk_path_bar_set_path
is
not right when running in win32.  this patch illustrates the differences by a
#ifdef G_OS_WIN32
#else
#endif
block
Comment 3 Todd A. Fisher 2004-04-07 23:53:23 UTC
Created attachment 26453 [details] [review]
fix for g_path_is_absolute so it works correctly for C:  etc...
Comment 4 Owen Taylor 2004-04-17 12:59:39 UTC
Please don't combine GLib and GTK+ patches in a single bug report.
Can you file a separate bug for the change you are proposing for GLib?
Comment 5 Owen Taylor 2004-04-17 13:01:58 UTC
Also, more detail about the exact cases in which you think your patches
are necesary would be very useful in figuring out the correct fixes. 

(The #ifdef G_OS_WIN32 in gtkpathbar.c can't be right; neither can
be adding a g_return_if_fail() to prevent a crash. And C: isn't
really an absolute path...)
Comment 6 Todd A. Fisher 2004-04-18 07:56:22 UTC
you're right about the path. My patches were really hackish and just what I
needed to do to get 2.4.0 to work in win32 for me.  But it looks like these
patchs aren't needed any more because after recompiling everything to what is
currently in cvs everything on my machine is working fine without my changes,
which is good :)

It may just be that the only patch really needed to get glade working where the
changes made between 2.5.1 and 2.6.0 :)