Bug#384635: vim-gtk: file selector forbids selecting a directory

Stefano Zacchiroli zack at debian.org
Mon Feb 12 15:16:06 UTC 2007


tags + wontfix
thanks

> In gvim, I use the great Project plugin: 
> http://www.vim.org/scripts/script.php?script_id=69
>
> With this plugin, typing \C allows you to import a whole project file
> tree. For this purpose it opens a file selector window. But the new GTK 
> file selector forbids selecting a directory. 
>
> Whenever I double click on a directory, or on the Open button, it goes
> inside that directory. There simply is no way to select a directory,
> and that makes the Project's \C command unusable.
>
> That used to work just fine with the old style GTK file selector (IIRC
> in vim6).

Unfortunately, according to my reading of [1], I believe that this bug
can't be fixed (or at least not easily enough to justify a fix). Let me
explain: it used to work, I think, not with older versions of Vim, but
with older versions of GTK, before GtkFileChooserDialog was here. With
the advent of that widget, a given file chooser is created with the
purpose of executing *one* of the actions listed in [1].

As you can notice opening a file or opening a directory are mutually
exclusive actions. Therefore I don't see an easy way to implement the
behaviour you desire.

Moreover, leaving aside the Project plugin for a moment, it's pointless
to open a directory in Vim since it will fire a directory browser,
browser that's already implemented in the GtkFileChooser. I understand
the need of Project plugin but if it really needs to input a directory
it should find other ways to do that.

I'll be happy to be proven wrong with pointers to how to enable
selection of both files and directories in a GtkFileChoose, I'm not that
expert in GTK2 programming after all ...

Cheers.

[1] http://www.gtk.org/api/2.6/gtk/GtkFileChooser.html#GtkFileChooserAction

-- 
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
(15:56:48)  Zack: e la demo dema ?    /\    All one has to do is hit the
(15:57:15)  Bac: no, la demo scema    \/    right keys at the right time
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20070212/4a5f1cd8/attachment.pgp


More information about the pkg-vim-maintainers mailing list