From 7ee50d8b855a8fbacd6aecb8ef2c4e9fd4c96c93 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 25 Nov 2013 02:25:47 +0100 Subject: (show_about_dlg) split it out (needed for next commit) --- rpmdrake | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) (limited to 'rpmdrake') diff --git a/rpmdrake b/rpmdrake index f58f4d67..ca6a9bdb 100755 --- a/rpmdrake +++ b/rpmdrake @@ -226,6 +226,27 @@ sub quit() { real_quit(); } +sub show_about_dlg { + my $license = formatAlaTeX(translate($::license)); + $license =~ s/\n/\n\n/sg; # nicer formatting + my $w = gtknew('AboutDialog', name => N("Rpmdrake"), + version => $Rpmdrake::init::version, + copyright => N("Copyright (C) %s by Mandriva", '2002-2009'), + 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 => '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; +} + sub run_treeview_dialog { my ($callback_action) = @_; @@ -624,26 +645,7 @@ sub run_treeview_dialog { [ N("/_Help"), undef, undef, undef, '' ], [ N("/_Help") . N("/_Report Bug"), undef, sub { run_drakbug('rpmdrake') }, undef, '' ], [ N("/_Help") . N("/_Help"), undef, sub { rpmdrake::open_help('') }, 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::init::version, - copyright => N("Copyright (C) %s by Mandriva", '2002-2009'), - 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 => '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, '' + [ N("/_Help") . N("/_About..."), undef, \&show_about_dlg, undef, '' ] ); -- cgit v1.2.1