From 64373b59fdcdb9cafd5275e904b31c2a7ad19513 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 27 Aug 2007 09:39:29 +0000 Subject: (mainwindow) when run as a standalone tool, display a std "help" menu --- Rpmdrake/edit_urpm_sources.pm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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("K"), \&keys_callback, undef, '' ], [ N("/_Options") . N("/_Parallel"), N("P"), \¶llel_callback, undef, '' ], [ N("/_Options") . N("/P_roxy"), N("R"), \&proxy_callback, undef, '' ], + if_($0 =~ /edit-urpm-sources/, + [ N("/_Help"), undef, undef, undef, '' ], + [ N("/_Help") . N("/_Report Bug"), undef, sub { run_program::raw({ detach => 1 }, 'drakbug', '--report', 'edit-urpm-sources.pl') }, undef, '' ], + [ N("/_Help") . N("/_Help"), undef, sub { rpmdrake::open_help('sources') }, undef, '' ], + [ 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 ', + artists => 'Hélène Durosini ', + translator_credits => + #-PO: put here name(s) and email(s) of translator(s) (eg: "John Smith ") + 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, '' + ] + ), ); my $list = Gtk2::ListStore->new("Glib::Boolean", "Glib::Boolean", "Glib::String"); -- cgit v1.2.1