diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-10-12 13:55:43 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-10-12 13:55:43 +0000 |
commit | 38459fc216e9505a5174b174335ad162934ba6d8 (patch) | |
tree | c894569579abb8323d465176897c5752574ec04b | |
parent | 20302b4550de37df508b0057efb8c88b0f2dae71 (diff) | |
download | control-center-38459fc216e9505a5174b174335ad162934ba6d8.tar control-center-38459fc216e9505a5174b174335ad162934ba6d8.tar.gz control-center-38459fc216e9505a5174b174335ad162934ba6d8.tar.bz2 control-center-38459fc216e9505a5174b174335ad162934ba6d8.tar.xz control-center-38459fc216e9505a5174b174335ad162934ba6d8.zip |
run help when pressing <F1>
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | control-center | 11 |
2 files changed, 11 insertions, 1 deletions
@@ -1,5 +1,6 @@ - fix tool URL which can be a translated UTF-8 string (eg: for CD/DVD entries) (#54457) +- run help when pressing <F1> Version 12.13.2 - 05 October 2006, Nicolas Lecureuil diff --git a/control-center b/control-center index e1209086..61f044d9 100755 --- a/control-center +++ b/control-center @@ -663,7 +663,7 @@ my @menu_items = ( [ N("/_Themes") . N("/_More themes"), undef, \&more_themes, undef, '<Item>' ] ), [ N("/_Help"), undef, undef, undef, '<Branch>' ], - [ N("/_Help") . N("/_Help"), undef, sub { fork_("drakhelp --id $help_on_context", []) }, undef, '<Item>', N("Help") ], + [ N("/_Help") . N("/_Help"), undef, \&run_help, undef, '<Item>', N("Help") ], [ N("/_Help") . N("/_Release notes"), undef, sub { run_browser('Notes') }, undef, '<Item>', N("Help") ], [ N("/_Help") . N("/What's _New?"), undef, sub { run_browser("What's New?") }, undef, '<Item>', N("Help") ], [ N("/_Help") . N("/_Errata"), undef, sub { run_browser('Errata') }, undef, '<Item>', N("Help") ], @@ -673,6 +673,11 @@ my @menu_items = ( [ N("/_Help") . N("/_About..."), undef, \&about_mdk_cc, undef, '<Item>' ] ); + +sub run_help() { + fork_("drakhelp --id $help_on_context", []); +} + sub run_browser { my ($url) = @_; $url = "http://wiki.mandriva.com/en/$release->{version}_$url" if $url !~ m!^http://!; @@ -735,6 +740,10 @@ $view->set_size_request(-1, -1); $window_global->signal_connect(delete_event => \&quit_global); +my $accel = Gtk2::AccelGroup->new; +$accel->connect(Gtk2::Gdk->keyval_from_name('F1'), [], ['visible'], \&run_help); +$window_global->add_accel_group($accel); + use POSIX qw(:sys_utsname_h :math_h :sys_wait_h :unistd_h); my (undef, $nodename) = POSIX::uname(); $window_global->set_title(N("%s Control Center %s [on %s]", $branding, $version, $nodename)); |