37700Re: WANTED: browsedir()
- Oct 2 11:36 PM* Steve Hall <digitect@...> [03/10/04 06:18]:
> On Sat, 2004-10-02 at 15:04, Bram Moolenaar wrote:Are you willing to use the embedded perl interpreter? If so, the
> > Steve Hall wrote:
> > >
> > > WANTED: browsedir() function that selects and returns a
> > > path/directory (rather than the path/filename browse() returns).
> > >
> > > I'll pay $50 US via mail or PayPal for a patch against the current
> > > Vim source that adds the capability to both GTK2 and Windows
> > > platforms. (Perhaps just WinNT/2K/XP as I believe browse() already
> > > does this on Win95/98/ME--to be verified.) Half payment offered
> > > for patch addressing one of the two platforms. If interested,
> > > please contact me off list.
> > Didn't see a response on this. I wonder why you need to select a
> > directory in Vim.
> To select a location for placing files. I wrote a script for
> non-computer saavy users to process reams of data files and they need
> to select locations for dumping files, not selecting one.
following will do it for gtk2:
my $choose = new Gtk2::FileChooserDialog
'Choose a directory',
'gtk-ok' => 'close', 'gtk-cancel' => 'cancel';
my $id = $choose->run;
my $dir = $id eq 'close' ? $choose->get_filename() : '';
VIM::DoCommand("let dir = '$dir'");
You will need the Gtk2 perl module from CPAN. Still needs some
polishing, of course.
- << Previous post in topic Next post in topic >>