diff options
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 50 |
1 files changed, 26 insertions, 24 deletions
@@ -784,6 +784,30 @@ sub shouldStart() { to_bool($local_config{AUTOSTART} ne 'FALSE'); } +sub about_dialog() { + my $ver = 1; # automatically set from spec file + my $url = $online_site; + $url =~ s/^https:/http:/; + my $w = gtknew('AboutDialog', name => N("Mandriva Online %s", $ver), + copyright => N("Copyright (C) %s by Mandriva", '2001-2008'), + license => join('', cat_('/usr/share/common-licenses/GPL')), + icon => '/usr/share/icons/mini/mdkonline.png', + comments => N("Mandriva Online gives access to Mandriva web services."), + website => $url, + website_label => N("Online WebSite"), + authors => 'Thierry Vignaud <vignaud@mandriva.com>', + artists => 'Hélène Durosini', + 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"), + transient_for => $::main_window, modal => 1, position_policy => 'center-on-parent', + ); + + $w->show_all; + $w->run; + return 1; +} + sub setState { my ($state) = @_; my $checkme; @@ -833,30 +857,8 @@ sub setState { $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label($action->{name})), activate => $action->{launch})); } $menu->append(gtkshow(Gtk2::SeparatorMenuItem->new)); - $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("About..."))), activate => sub { - my $ver = 1; # automatically set from spec file - my $url = $online_site; - $url =~ s/^https:/http:/; - my $w = gtknew('AboutDialog', name => N("Mandriva Online %s", $ver), - copyright => N("Copyright (C) %s by Mandriva", '2001-2008'), - license => join('', cat_('/usr/share/common-licenses/GPL')), - icon => '/usr/share/icons/mini/mdkonline.png', - comments => N("Mandriva Online gives access to Mandriva web services."), - website => $url, - website_label => N("Online WebSite"), - authors => 'Thierry Vignaud <vignaud@mandriva.com>', - artists => 'Hélène Durosini', - 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"), - transient_for => $::main_window, modal => 1, position_policy => 'center-on-parent', - ); - - $w->show_all; - $w->run; - return 1; - - })); + $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("About..."))), + activate => \&about_dialog)); $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("Updates Configuration"))), activate => sub { run_program::raw({ detach => 1 }, 'mdkapplet-config') })); $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))) })); |