summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-02-25 14:00:06 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-02-25 14:00:06 +0000
commita8c63c99d9405a3e7656d1954c98fb0c49e4c5c9 (patch)
tree5384d209f17759979034966b34a2b513cf217361
parent9da35c2fa63624414b646f8fd5b2c6629490eada (diff)
downloaddrakx-a8c63c99d9405a3e7656d1954c98fb0c49e4c5c9.tar
drakx-a8c63c99d9405a3e7656d1954c98fb0c49e4c5c9.tar.gz
drakx-a8c63c99d9405a3e7656d1954c98fb0c49e4c5c9.tar.bz2
drakx-a8c63c99d9405a3e7656d1954c98fb0c49e4c5c9.tar.xz
drakx-a8c63c99d9405a3e7656d1954c98fb0c49e4c5c9.zip
rollback unwanted changes
-rwxr-xr-xperl-install/standalone/drakfont35
-rwxr-xr-xperl-install/standalone/draksec1
2 files changed, 11 insertions, 25 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index 92252201d..93f375280 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -226,11 +226,9 @@ sub search_windows_font() {
1;
}
-my @font_extensions = qw(ttf pfa pfb pcf pcf.gz pfm gsf);
-
sub is_a_font($) {
my ($file) = @_;
- any { $file =~ /\Q.$_\E$/i } @font_extensions;
+ any { $file =~ /\Q.$_\E$/i } qw(ttf pfa pfb pcf pcf.gz pfm gsf);
}
# Optimisation de cette etape indispensable
@@ -588,28 +586,15 @@ 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 = Gtk2::FileChooserDialog->new(N("File Selection"), $window1->{window}, 'open', N("Ok") => 'ok'); # 'select_folder'
- $file_dialog->set_select_multiple(1);
-
- my $filter = Gtk2::FileFilter->new;
- $filter->set_name(N("Fonts"));
- $filter->add_pattern("*.$_") foreach @font_extensions;
- $file_dialog->add_filter($filter);
- $file_dialog->set_filter($filter);
-
-# $file_dialog->ok_button->signal_connect(clicked => \&file_ok_sel, $file_dialog);
-# $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy });
+ $file_dialog = Gtk2::FileSelection->new(N("File Selection"));
+ $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"));
+ $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->response('cancel') });
+ $file_dialog->cancel_button->set_label(N("Close"));
$file_dialog->show;
- while (my $answer = $file_dialog->run) {
- print "ANSWER IS «$answer»\n";
- if (member($answer, qw(cancel delete-event))) {
- $file_dialog->destroy;
- return;
- } elsif ($answer eq 'ok') {
- #file_ok_sel();
- my @names = $file_dialog->get_filenames();
- }
- }
+ $file_dialog->run;
+ $file_dialog->destroy;
}
sub file_ok_sel {
@@ -624,7 +609,7 @@ sub file_ok_sel {
$model->append_set(undef, [ 0 => $file_name ]);
}
}
- Gtk2->main;
+ $file_selection->response('ok')
}
sub list_remove() { #- TODO : multi-selection
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index 4a40372d6..105ab92f0 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -68,6 +68,7 @@ sub wait_msg {
my $mainw = ugtk2->new(N("Please wait"), (modal => 1, if_(!$::isEmbedded, transient => $w->{rwindow})));
$mainw->{window}->add(Gtk2::WrappedLabel->new($_[0]));
$mainw->{rwindow}->show_all;
+ $mainw->{rwindow}->realize;
gtkset_mousecursor_wait($mainw->{rwindow}->window);
gtkflush();
$mainw;