From 0239b9eef3ce4f74251956b5077a41a6b5925456 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 5 Dec 2013 13:59:59 +0100 Subject: (show_about) split it out needed for next commit --- Rpmdrake/edit_urpm_sources.pm | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index 6aa94e08..10ead8d8 100644 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -949,6 +949,27 @@ sub keys_callback() { $w->main; } +sub show_about() { + my $license = formatAlaTeX(translate($::license)); + $license =~ s/\n/\n\n/sg; # nicer formatting + my $w = gtknew('AboutDialog', name => N("Rpmdrake"), + version => $rpmdrake::distro_version, + copyright => N("Copyright (C) %s by Mandriva", '2002-2008'), + license => $license, wrap_license => 1, + comments => N("Rpmdrake is the Mageia package management tool."), + website => 'http://www.mageia.org/', + website_label => N("Mageia"), + authors => [ 'Thierry Vignaud ' ], + artists => [ 'Mageia Team' ], + 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; +} + sub mainwindow() { undef $something_changed; $mainw = ugtk3->new(N("Configure media"), center => 1, transient => $::main_window, modal => 1); @@ -972,26 +993,7 @@ sub mainwindow() { [ N("/_Help"), undef, undef, undef, '' ], [ N("/_Help") . N("/_Report Bug"), undef, sub { run_drakbug('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 => $rpmdrake::distro_version, - copyright => N("Copyright (C) %s by Mandriva", '2002-2008'), - license => $license, wrap_license => 1, - comments => N("Rpmdrake is the Mageia package management tool."), - website => 'http://www.mageia.org/', - website_label => N("Mageia"), - authors => [ 'Thierry Vignaud ' ], - artists => [ 'Mageia Team' ], - 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, '' + [ N("/_Help") . N("/_About..."), undef, \&show_about, undef, '' ] ), ); -- cgit v1.2.1