diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-02-20 10:37:59 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-02-20 10:37:59 +0000 |
commit | 9bd3d6915ddac3a64ae7b067bbaf409f0a65678d (patch) | |
tree | 797de68b9748fd2423889773a6eeb1b3a2176710 | |
parent | efa4b7b233af9832456ab8ba7e0ef6711d08952a (diff) | |
download | drakx-backup-do-not-use-9bd3d6915ddac3a64ae7b067bbaf409f0a65678d.tar drakx-backup-do-not-use-9bd3d6915ddac3a64ae7b067bbaf409f0a65678d.tar.gz drakx-backup-do-not-use-9bd3d6915ddac3a64ae7b067bbaf409f0a65678d.tar.bz2 drakx-backup-do-not-use-9bd3d6915ddac3a64ae7b067bbaf409f0a65678d.tar.xz drakx-backup-do-not-use-9bd3d6915ddac3a64ae7b067bbaf409f0a65678d.zip |
allow to select multiple files
-rwxr-xr-x | perl-install/standalone/drakfont | 7 |
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 ]); } |