diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2006-05-22 15:26:10 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2006-05-22 15:26:10 +0000 |
commit | bb885de90fc0d4b3d61e8bf7241384a6ead7ab3b (patch) | |
tree | 8961ba139e54ae06aa50d77c61b3be87fce8b42c | |
parent | 5ab79366bd6c5da4dc055dc2596ea9c584c20d5f (diff) | |
download | userdrake-bb885de90fc0d4b3d61e8bf7241384a6ead7ab3b.tar userdrake-bb885de90fc0d4b3d61e8bf7241384a6ead7ab3b.tar.gz userdrake-bb885de90fc0d4b3d61e8bf7241384a6ead7ab3b.tar.bz2 userdrake-bb885de90fc0d4b3d61e8bf7241384a6ead7ab3b.tar.xz userdrake-bb885de90fc0d4b3d61e8bf7241384a6ead7ab3b.zip |
use standard about widget
-rwxr-xr-x | userdrake | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -29,6 +29,7 @@ use common; use any; # i18n: IMPORTANT: to get correct namespace (userdrake instead of libDrakX) BEGIN { unshift @::textdomains, 'userdrake', 'drakconf' } +use mygtk2 qw(gtknew); #- do not import gtkadd which conflicts with ugtk2 version use ugtk2 qw(:all); use interactive; use POSIX qw(mktime ceil); @@ -1015,26 +1016,25 @@ sub NewDialog { } sub About() { - my $window_about = NewDialog(N("Userdrake")); - my $tree_model = Gtk2::TreeStore->new("Glib::String", "Glib::String", "Glib::String"); - my $list = Gtk2::TreeView->new_with_model($tree_model); - $list->can_focus(0); - each_index { $list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => $::i)) } 0..2; - $list->set_headers_visible(0); - foreach my $row (['Copyright', '2003-2006', 'Mandriva SA'], - [ N("Authors: "), '', '' ], - [ '', 'Daouda Lo', '' ], - [ '', 'Thierry Vignaud', '<tvignaud@mandriva.com>' ], - ['', '', '']) { - $tree_model->append_set(undef, [ map_index { $::i => $_ } @$row ]); - } - $list->get_selection->set_mode('none'); - gtkpack_($window_about->vbox, - -r "$pixdir/userdrake.png" ? - (0, Gtk2::Image->new_from_file("$pixdir/userdrake.png")) : (1, gtkmodify_font(Gtk2::Label->new(N("Users Management \n") . $us->{VERSION}), 'Bold 18'),), - 1, $list, - ); - $window_about->show_all; + my $license = formatAlaTeX(translate($::license)); + $license =~ s/\n/\n\n/sg; # nicer formatting + my $w = gtknew('AboutDialog', name => N("Userdrake"), + version => $us->{VERSION}, + copyright => N("Copyright (C) %s by Mandriva", '2001-2006'), + if_(-r "$pixdir/userdrake.png", logo => "$pixdir/userdrake.png"), + license => $license, wrap_license => 1, + comments => N("Users Management."), + website => 'http://mandrivalinux.com', + website_label => N("Mandriva Linux"), + authors => 'Daouda Lo +Thierry Vignaud <tvignaud@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"), + ); + $w->show_all; + $w->run; } sub valid { |