summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-05-15 14:42:31 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-05-15 14:42:31 +0000
commitf428a9ecda87cfcbb1877e08b25448b4577159b9 (patch)
treed4b3ce726ac644d4aa4a577303fd2d6a12525fe2 /perl-install
parent8b4492c1984e434ebb91359ea3f0f211e3423981 (diff)
downloaddrakx-f428a9ecda87cfcbb1877e08b25448b4577159b9.tar
drakx-f428a9ecda87cfcbb1877e08b25448b4577159b9.tar.gz
drakx-f428a9ecda87cfcbb1877e08b25448b4577159b9.tar.bz2
drakx-f428a9ecda87cfcbb1877e08b25448b4577159b9.tar.xz
drakx-f428a9ecda87cfcbb1877e08b25448b4577159b9.zip
fix #1352 : do not add buggy font directories
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/drakfont17
1 files changed, 12 insertions, 5 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index ac6255503..8790a9884 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -709,24 +709,31 @@ sub appli_choice() {
$font_box->show_all();
}
+my $select_font_msg;
+
sub font_choice() {
my $file_dialog;
+ $select_font_msg = N("Select the font file or directory and click on 'Add'");
$file_dialog = gtksignal_connect(new Gtk2::FileSelection(N("File Selection")), destroy => sub { $file_dialog->destroy() });
$file_dialog->ok_button->signal_connect(clicked => \&file_ok_sel, $file_dialog);
$file_dialog->ok_button->set_label(N("Add"));
$file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy() });
$file_dialog->cancel_button->set_label(N("Close"));
- $file_dialog->set_filename(N("Select the font file or directory and click on 'Add'"));
+ $file_dialog->set_filename($select_font_msg);
$file_dialog->show();
}
sub file_ok_sel {
my ($_widget, $file_selection) = @_;
my $file_name = $file_selection->get_filename();
- print "-- @install\n";
- if (!member($file_name, @install)) {
- push @install, $file_name;
- $model->append_set(undef, [ 0 => $file_name ]);
+ if ($file_name =~ /$select_font_msg/) {
+ create_dialog(N("You've not selected any font"));
+ } else {
+ print "-- @install\n";
+ if (!member($file_name, @install)) {
+ push @install, $file_name;
+ $model->append_set(undef, [ 0 => $file_name ]);
+ }
}
}