From 8c847f02b2ff79db0f8ecc0a3041d964f0658c37 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sun, 16 Feb 2003 20:22:24 +0000 Subject: - factorize "Help"-button handling - fix interactive_help_get_id (happily, it was no pb :) --- perl-install/Xconfig/resolution_and_depth.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'perl-install/Xconfig') diff --git a/perl-install/Xconfig/resolution_and_depth.pm b/perl-install/Xconfig/resolution_and_depth.pm index 0efdc6671..b84b5731e 100644 --- a/perl-install/Xconfig/resolution_and_depth.pm +++ b/perl-install/Xconfig/resolution_and_depth.pm @@ -253,6 +253,7 @@ sub choose_gtk { }; $set_chosen_x_res->($chosen_x_res, $chosen_y_res); + my $help_sub = $in->interactive_help_sub_display_id('configureX_resolution'); gtkadd($W->{window}, gtkpack_($W->create_box_with_title(N("Choose the resolution and the color depth"), if_($card->{BoardName}, "(" . N("Graphics card: %s", $card->{BoardName}) . ")"), @@ -268,11 +269,7 @@ sub choose_gtk { ), ), ), - 0, gtkadd($W->create_okcancel(N("Ok"), N("Cancel"), '', - [ N("Help"), sub { - my $message = $in->interactive_help_get_id('configureX_resolution') or return; - $in->ask_warn(N("Help"), $message); - }, 1 ])), + 0, gtkadd($W->create_okcancel(N("Ok"), N("Cancel"), '', if_($help_sub, [ N("Help"), $help_sub, 1 ]))), )); $depth_combo->disable_activate; $depth_combo->set_use_arrows_always(1); -- cgit v1.2.1