File: filesel_multisel.pl

package info (click to toggle)
libgtk2-perl 2%3A1.244-1%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,524 kB
  • sloc: perl: 21,568; ansic: 122; makefile: 6
file content (14 lines) | stat: -rw-r--r-- 359 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl -w

# using a Gtk2::FileSelection to get multiple files is really easy.

use Data::Dumper;
use Gtk2 -init;

my $fs = Gtk2::FileSelection->new ('pick something');
# tell it to allow multiple selections...
$fs->set_select_multiple (TRUE);
if ('ok' eq $fs->run) {
	# and then fetch the selections as a list.
	print Dumper($fs->get_selections);
}