[arch-general] Weird GTK+ open directory chooser dialog behaviour
vadmium+al at gmail.com
Wed Nov 21 18:52:13 EST 2012
On 21 November 2012 14:09, Robbie Smith <zoqaeski at gmail.com> wrote:
> I don’t recall when this started occurring (as most applications that open
> files open them one at a time so I seldom come across it), but the directory
> selection dialog seems to always open my home directory regardless of what I
> navigate to. The programs that spawn the dialog subsequently crash, as
> they’re trying to open *every file in my home directory* instead of a
> specific directory. Googling found no results except for  on our forum,
> and the OP thinks it has to do with wxWidgets, but I get this behaviour with
> every GTK directory open dialog.
> Has anyone encountered this? Or is my computer also somewhat beserk?
Can’t say I’ve used a directory chooser recently but I have noticed
the same problem with a “Save as” file chooser in a Python GTK program
I have been playing with. It returns the correct file, but always
returned the home directory as the “current folder”. I had this issue
on Arch but not on Ubuntu.
>  https://bbs.archlinux.org/viewtopic.php?id=146064
Thanks for that link, I found it illuminating. Yes it is about WX
Widgets but the underlying issue seems to be caused by GTK itself. The
forum post links to WX Widgets bug #14525, “wxDirDialog::GetPath()
doesn't return the user-selected path”, which claims to be fixed by
remembering the path before hiding the dialog.
The WX Widgets fix:
Fix I just made for my program:
I wonder if it would be considered a GTK bug, or just that all your
applications are misusing the API :P
More information about the arch-general