summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-09-11 15:29:49 +0000
committerThierry Vignaud <tv@mandriva.org>2008-09-11 15:29:49 +0000
commitb333859b1411d1da7bdf4ec2986834b2dd03d556 (patch)
tree8c575e6b99d69a46b768e53d6cc17cfba4f2ec03 /perl-install/interactive
parent0967dc7c346528ddfa943bc99131e9168d9f1e82 (diff)
downloaddrakx-b333859b1411d1da7bdf4ec2986834b2dd03d556.tar
drakx-b333859b1411d1da7bdf4ec2986834b2dd03d556.tar.gz
drakx-b333859b1411d1da7bdf4ec2986834b2dd03d556.tar.bz2
drakx-b333859b1411d1da7bdf4ec2986834b2dd03d556.tar.xz
drakx-b333859b1411d1da7bdf4ec2986834b2dd03d556.zip
(display_help) create it out of ask_fromW()
Diffstat (limited to 'perl-install/interactive')
-rw-r--r--perl-install/interactive/gtk.pm43
1 files changed, 23 insertions, 20 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 0081bdc6b..9ae007c8b 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -775,25 +775,8 @@ sub get_html_file {
} $url;
}
-sub ask_fromW {
- my ($o, $common, $l) = @_;
-
- filter_widgets($l);
-
- my $mainw = ugtk2->new($common->{title}, %$o, if__($::main_window, transient => $::main_window),
- if_($common->{icon}, icon => $common->{icon}), banner_title => $common->{banner_title},
- );
-
- my ($box, $set_all) = create_widgets($o, $common, $mainw, $l);
-
- $mainw->{box_allow_grow} = 1;
- my $pack = create_box_with_title($mainw, @{$common->{messages}});
- mygtk2::set_main_window_size($mainw->{rwindow}) if $mainw->{pop_it} && !$common->{auto_window_size} && (@$l || $mainw->{box_size} == 200);
-
- my @more_buttons = (
- if_($common->{interactive_help},
- [ gtknew('Install_Button', text => N("Help"),
- clicked => sub {
+sub display_help {
+ my ($o, $common, $mainw) = @_;
if (my $file = $common->{interactive_help_id}) {
require Gtk2::Html2;
my $view = Gtk2::Html2::View->new;
@@ -827,7 +810,27 @@ sub ask_fromW {
}
my $message = $common->{interactive_help}->() or return;
$o->ask_warn(N("Help"), $message);
- }), undef, 1 ]),
+}
+
+sub ask_fromW {
+ my ($o, $common, $l) = @_;
+
+ filter_widgets($l);
+
+ my $mainw = ugtk2->new($common->{title}, %$o, if__($::main_window, transient => $::main_window),
+ if_($common->{icon}, icon => $common->{icon}), banner_title => $common->{banner_title},
+ );
+
+ my ($box, $set_all) = create_widgets($o, $common, $mainw, $l);
+
+ $mainw->{box_allow_grow} = 1;
+ my $pack = create_box_with_title($mainw, @{$common->{messages}});
+ mygtk2::set_main_window_size($mainw->{rwindow}) if $mainw->{pop_it} && !$common->{auto_window_size} && (@$l || $mainw->{box_size} == 200);
+
+ my @more_buttons = (
+ if_($common->{interactive_help},
+ [ gtknew('Install_Button', text => N("Help"),
+ clicked => sub { display_help($o, $common, $mainw) }), undef, 1 ]),
if_($common->{more_buttons}, @{$common->{more_buttons}}),
);
my $buttons_pack = ($common->{ok} || !exists $common->{ok}) && $mainw->create_okcancel($common->{ok}, $common->{cancel}, '', @more_buttons);