Re: Gtk2::FileChooserButton: strange behaviour when pasting location

On Sun, 2010-10-17 at 15:22 +0200, Mario Kemper wrote:
There seems to be a bug in Gtk2::FileChooserButton when pasting
locations instead of selecting them manually.

Here are the steps to reproduce:
1) Create a new folder
mkdir -p /tmp/test/dir/
2) Copy the string "/tmp/test/dir/" to clipboard and run my example
application (attached)
3) Click on the widget and select "Other..."
4) Paste the location into the address bar and hit enter
5) Signal "current-folder-changed" is emitted but home directory is
still current folder (the widget shows "dir" instead)

Is this a bug or am I doing something very wrong here?

I don't think it's a bug. The documentation for 'get_current_folder'

"Note that this is the folder that the file chooser is currently
displaying (e.g. "/home/username/Documents"), which is not the same as
the currently-selected folder if the chooser is in

In other words, you're getting the directory that's last displayed when
you close the dialog and not the one that's associated with your button.
Since you're typing and not clicking, the displayed directory doesn't

I think you want either:


depending on how you want it formatted. Hope this helps.


gtk-perl-list mailing list
gtk-perl-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]