diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-08-27 09:39:29 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-08-27 09:39:29 +0000 |
commit | 64373b59fdcdb9cafd5275e904b31c2a7ad19513 (patch) | |
tree | 4e431362e4f779b6a666d99176f6eeacc0779a84 | |
parent | e97f566ac2148c81b5785dbae580d14d2feedcfb (diff) | |
download | rpmdrake-64373b59fdcdb9cafd5275e904b31c2a7ad19513.tar rpmdrake-64373b59fdcdb9cafd5275e904b31c2a7ad19513.tar.gz rpmdrake-64373b59fdcdb9cafd5275e904b31c2a7ad19513.tar.bz2 rpmdrake-64373b59fdcdb9cafd5275e904b31c2a7ad19513.tar.xz rpmdrake-64373b59fdcdb9cafd5275e904b31c2a7ad19513.zip |
(mainwindow) when run as a standalone tool, display a std "help" menu
-rwxr-xr-x | Rpmdrake/edit_urpm_sources.pm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index 0af098c1..b6178a3d 100755 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -960,6 +960,32 @@ sub mainwindow() { [ N("/_Options") . N("/Manage _keys"), N("<control>K"), \&keys_callback, undef, '<Item>' ], [ N("/_Options") . N("/_Parallel"), N("<control>P"), \¶llel_callback, undef, '<Item>' ], [ N("/_Options") . N("/P_roxy"), N("<control>R"), \&proxy_callback, undef, '<Item>' ], + if_($0 =~ /edit-urpm-sources/, + [ N("/_Help"), undef, undef, undef, '<Branch>' ], + [ N("/_Help") . N("/_Report Bug"), undef, sub { run_program::raw({ detach => 1 }, 'drakbug', '--report', 'edit-urpm-sources.pl') }, undef, '<Item>' ], + [ N("/_Help") . N("/_Help"), undef, sub { rpmdrake::open_help('sources') }, undef, '<Item>' ], + [ N("/_Help") . N("/_About..."), undef, sub { + my $license = formatAlaTeX(translate($::license)); + $license =~ s/\n/\n\n/sg; # nicer formatting + my $w = gtknew('AboutDialog', name => N("Rpmdrake"), + version => '2007', + copyright => N("Copyright (C) %s by Mandriva", '2002-2007'), + license => $license, wrap_license => 1, + comments => N("Rpmdrake is Mandriva Linux package management tool."), + website => 'http://mandrivalinux.com', + website_label => N("Mandriva Linux"), + authors => 'Thierry Vignaud <vignaud@mandriva.com>', + artists => 'Hélène Durosini <ln@mandriva.com>', + translator_credits => + #-PO: put here name(s) and email(s) of translator(s) (eg: "John Smith <jsmith@nowhere.com>") + N("_: Translator(s) name(s) & email(s)\n"), + transient_for => $::main_window, modal => 1, position_policy => 'center-on-parent', + ); + $w->show_all; + $w->run; + }, undef, '<Item>' + ] + ), ); my $list = Gtk2::ListStore->new("Glib::Boolean", "Glib::Boolean", "Glib::String"); |