summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-02-20 10:37:59 +0000
committerOlivier Blin <oblin@mandriva.org>2005-02-20 10:37:59 +0000
commit9bd3d6915ddac3a64ae7b067bbaf409f0a65678d (patch)
tree797de68b9748fd2423889773a6eeb1b3a2176710 /perl-install/standalone
parentefa4b7b233af9832456ab8ba7e0ef6711d08952a (diff)
downloaddrakx-9bd3d6915ddac3a64ae7b067bbaf409f0a65678d.tar
drakx-9bd3d6915ddac3a64ae7b067bbaf409f0a65678d.tar.gz
drakx-9bd3d6915ddac3a64ae7b067bbaf409f0a65678d.tar.bz2
drakx-9bd3d6915ddac3a64ae7b067bbaf409f0a65678d.tar.xz
drakx-9bd3d6915ddac3a64ae7b067bbaf409f0a65678d.zip
allow to select multiple files
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakfont7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index 11d46aa3c..ad0fe0488 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -586,6 +586,7 @@ sub font_choice() {
my $file_dialog;
$select_font_msg = N("Select the font file or directory and click on 'Add'");
$file_dialog = Gtk2::FileSelection->new(N("File Selection"));
+ $file_dialog->set_select_multiple(1);
$file_dialog->signal_connect(delete_event => sub { $file_dialog->response('close') });
$file_dialog->ok_button->signal_connect(clicked => \&file_ok_sel, $file_dialog);
$file_dialog->ok_button->set_label(N("Add"));
@@ -598,12 +599,12 @@ sub font_choice() {
sub file_ok_sel {
my ($_w, $file_selection) = @_;
- my $file_name = $file_selection->get_filename;
- if ($file_name =~ /\Q$select_font_msg/) {
+ if ($file_selection->get_filename =~ /\Q$select_font_msg/) {
create_dialog(N("Error"), N("You've not selected any font"));
} else {
print "-- @install\n";
- if (!member($file_name, @install)) {
+ my @files = $file_selection->get_selections;
+ foreach my $file_name (difference2(\@files, \@install)) {
push @install, $file_name;
$model->append_set(undef, [ 0 => $file_name ]);
}