diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2006-04-06 19:17:17 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2006-04-06 19:17:17 +0000 |
commit | baaf473becfd78d1d54f42cfe6d8b5f1dbb2a006 (patch) | |
tree | 6fbab775b68673f5c7968622f1892103de5893f9 /mdkapplet | |
parent | 60316ada54674f22764592e5c6fcf02eb926d294 (diff) | |
download | mgaonline-baaf473becfd78d1d54f42cfe6d8b5f1dbb2a006.tar mgaonline-baaf473becfd78d1d54f42cfe6d8b5f1dbb2a006.tar.gz mgaonline-baaf473becfd78d1d54f42cfe6d8b5f1dbb2a006.tar.bz2 mgaonline-baaf473becfd78d1d54f42cfe6d8b5f1dbb2a006.tar.xz mgaonline-baaf473becfd78d1d54f42cfe6d8b5f1dbb2a006.zip |
(setState) when "About..." is clicked, open a dialog rather than run a browser
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 32 |
1 files changed, 31 insertions, 1 deletions
@@ -468,7 +468,37 @@ sub setState { $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label($actions{$_}{name})), activate => $actions{$_}{launch})); } $menu->append(gtkshow(Gtk2::SeparatorMenuItem->new)); - $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("About..."))), activate => sub { mdkonline::get_site($online_site) })); + $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("About..."))), activate => sub { + my $ver = 1; # automatically set from spec file + my $w = gtkset_name(Gtk2::AboutDialog->new, N("Mandriva Online %s"), $ver); + $w->set_version($ver); + $w->set_copyright(N("Copyright (C) %s by Mandriva", '2001-2006')); + my $url = $online_site; + $url =~ s/^https:/http:/; + $w->set_website($url); + #$w->set_license(formatAlaTeX(join("\n", cat_('/usr/share/common-licenses/GPL')))); + #$w->set_wrap_license(1); + $w->set_license(join('', cat_('/usr/share/common-licenses/GPL'))); + $w->set_comments(N("Mandriva Online gives access to Mandriva web services.")); + $w->set_website_label(N("Online WebSite")); + $w->set_authors('Thierry Vignaud <vignaud@mandriva.com>'); + $w->show_all; + $w->run; + return 1; + + my $dialog = gtkset_border_width(_create_dialog(N("Mandriva Online %s"), $ver), 5); + $dialog->action_area->pack_start(gtksignal_connect(Gtk2::Button->new(N("Close")), clicked => sub { $dialog->destroy }), + 0,0,0); + + gtkpack_($dialog->box, + gtktext_insert(Gtk2::TextView->new, + join("\n", + , + ) + ) + ); + + })); $menu->append(gtksignal_connect(gtkset_active($checkme = Gtk2::CheckMenuItem->new_with_label(N("Always launch on startup")), shouldStart()), toggled => sub { setAutoStart(uc(bool2text($checkme->get_active))) })); $checkme->show; $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("Quit"))), activate => sub { mainQuit() })); |